arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.11408cs.SDeess.AS
收藏

口语中的轻量级毒性检测:一种面向边缘设备的基于 Transformer 的方法

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

Qatar University(卡塔尔大学);Queensland University of Technology(昆士兰科技大学)

Ahlam Husni Abu Nada, Siddique Latif, Junaid Qadir

AI总结:

本文提出基于 wav2vec2.0 的轻量级端到端语音毒性检测模型,通过多任务学习、量化与知识蒸馏实现高准确率和边缘部署效率。

摘要:

毒性是一种普遍存在的社会行为,涉及仇恨言论、冒犯性语言、欺凌和辱骂性言语。虽然用于毒性检测的基于文本的方法很常见,但关于在物理世界中处理语音信号的研究却很有限。由于难以将具备 AI 能力的计算机集成到环境中,在物理世界中检测毒性具有挑战性。我们提出了一种基于 wav2vec2.0 的轻量级 transformer 模型,并使用量化和知识蒸馏等技术对其进行优化。我们的模型采用多任务学习,取得了 90.3% 的平均宏 F1 分数和 88% 的加权准确率,在 DeToxy-B 和一个公开数据集上优于最先进的方法。我们的结果表明,量化使模型大小减少了近 4 倍,RAM 使用量减少了 3.3%,而 F1 分数仅下降 1%。知识蒸馏使模型大小减少 3.7 倍,RAM 使用量减少 1.9 倍,推理时间减少 2 倍,但准确率下降 8%。结合这两种技术使模型大小减少 14.6 倍,RAM 使用量减少约 4.3 倍,并带来两倍的推理时间提升。我们的紧凑模型是首个基于轻量级 transformer 模型、适合在物理空间部署的端到端基于语音的毒性检测模型。结果证明了其在真实世界环境中于边缘设备上进行毒性检测的可行性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑