Lightweight Toxicity Detection in Spoken Language: A Transformer-based Approach for Edge Devices

04/22/2023
by   Ahlam Husni Abu Nada, et al.
0

Toxicity is a prevalent social behavior that involves the use of hate speech, offensive language, bullying, and abusive speech. While text-based approaches for toxicity detection are common, there is limited research on processing speech signals in the physical world. Detecting toxicity in the physical world is challenging due to the difficulty of integrating AI-capable computers into the environment. We propose a lightweight transformer model based on wav2vec2.0 and optimize it using techniques such as quantization and knowledge distillation. Our model uses multitask learning and achieves an average macro F1-score of 90.3% and a weighted accuracy of 88%, outperforming state-of-the-art methods on DeToxy-B and a public dataset. Our results show that quantization reduces the model size by almost 4 times and RAM usage by 3.3%, with only a 1% F1 score decrease. Knowledge distillation reduces the model size by 3.7 times, RAM usage by 1.9, and inference time by 2 times, but decreases accuracy by 8%. Combining both techniques reduces the model size by 14.6 times and RAM usage by around 4.3 times, with a two-fold inference time improvement. Our compact model is the first end-to-end speech-based toxicity detection model based on a lightweight transformer model suitable for deployment in physical spaces. The results show its feasibility for toxicity detection on edge devices in real-world environments.

READ FULL TEXT

page 1

page 7

research
12/04/2020

Automated Detection of Cyberbullying Against Women and Immigrants and Cross-domain Adaptability

Cyberbullying is a prevalent and growing social problem due to the surge...
research
02/29/2020

Hazard Detection in Supermarkets using Deep Learning on the Edge

Supermarkets need to ensure clean and safe environments for both shopper...
research
08/05/2021

Knowledge Distillation from BERT Transformer to Speech Transformer for Intent Classification

End-to-end intent classification using speech has numerous advantages co...
research
03/07/2023

PreFallKD: Pre-Impact Fall Detection via CNN-ViT Knowledge Distillation

Fall accidents are critical issues in an aging and aged society. Recentl...
research
02/18/2020

Gradient-Based Adversarial Training on Transformer Networks for Detecting Check-Worthy Factual Claims

We present a study on the efficacy of adversarial training on transforme...
research
07/09/2023

Marine Debris Detection in Satellite Surveillance using Attention Mechanisms

Marine debris is an important issue for environmental protection, but cu...
research
07/31/2023

BearingPGA-Net: A Lightweight and Deployable Bearing Fault Diagnosis Network via Decoupled Knowledge Distillation and FPGA Acceleration

Deep learning has achieved remarkable success in the field of bearing fa...

Please sign up or login with your details

Forgot password? Click here to reset