MTTM: Metamorphic Testing for Textual Content Moderation Software
Wenxuan Wang, Jen-tse Huang, Weibin Wu, Jianping Zhang, Yizhan Huang, Shuqing Li, Pinjia He, Michael R. Lyu
摘要
The exponential growth of social media platforms such as Twitter and Facebook has revolutionized textual communication and textual content publication in human society. However, they have been increasingly exploited to propagate toxic content, such as hate speech, malicious advertisement, and pornography, which can lead to highly negative impacts (e.g., harmful effects on teen mental health). Researchers and practitioners have been enthusiastically developing and extensively deploying textual content moderation software to address this problem. However, we find that malicious users can evade moderation by changing only a few words in the toxic content. Moreover, modern content moderation software's performance against malicious inputs remains underexplored. To this end, we propose MTTM, a Metamorphic Testing framework for Textual content Moderation software. Specifically, we conduct a pilot study on 2, 000 text messages collected from real users and summarize eleven metamorphic relations across three perturbation levels: character, word, and sentence. MTTM employs these metamorphic relations on toxic textual contents to generate test cases, which are still toxic yet likely to evade moderation. In our evaluation, we employ MTTM to test three commercial textual content moderation software and two state-of-the-art moderation algorithms against three kinds of toxic content. The results show that MTTM achieves up to 83.9%, 51%, and 82.5% error finding rates (EFR) when testing commercial moderation software provided by Google, Baidu, and Huawei, respectively, and it obtains up to 91.2% EFR when testing the state-of-the-art algorithms from the academy. In addition, we leverage the test cases generated by MTTM to retrain the model we explored, which largely improves model robustness 0% 5.9% EFR) while maintaining the accuracy on the original test set. A demo can be found in this link <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</sup> .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detection 引用了 BiasAsker: Measuring the Bias in Conversational AI System
- Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detection 引用了 An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software
- Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detection 引用了 Validating Multimedia Content Moderation Software via Semantic Fusion
- BiasAsker: Measuring the Bias in Conversational AI System 引用了 Hidden Voice Commands
- Coverage-Based Harmfulness Testing for LLM Code Transformation 引用了 BiasAsker: Measuring the Bias in Conversational AI System
- Coverage-Based Harmfulness Testing for LLM Code Transformation 引用了 An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software
- BERT-ATTACK: Adversarial Attack Against BERT Using BERT 引用了 TextBugger: Generating Adversarial Text Against Real-world Applications
- BERT-ATTACK: Adversarial Attack Against BERT Using BERT 引用了 Word-level Textual Adversarial Attacking as Combinatorial Optimization
- An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software 引用了 TextBugger: Generating Adversarial Text Against Real-world Applications
- An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software 引用了 BiasAsker: Measuring the Bias in Conversational AI System
- An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software 引用了 BERT-ATTACK: Adversarial Attack Against BERT Using BERT
- An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software 引用了 Hidden Voice Commands
- An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software 引用了 Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailment
- An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation Software 引用了 Validating Multimedia Content Moderation Software via Semantic Fusion
- Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailment 引用了 TextBugger: Generating Adversarial Text Against Real-world Applications
- Validating Multimedia Content Moderation Software via Semantic Fusion 引用了 BERT-ATTACK: Adversarial Attack Against BERT Using BERT
- Validating Multimedia Content Moderation Software via Semantic Fusion 引用了 Hidden Voice Commands
引用它的顶会 Paper8
- BiasAsker: Measuring the Bias in Conversational AI SystemYuxuan Wan, Wenxuan Wang, Pinjia He, Jiazhen Gu 等FSE 2023 · 50 次引用
- Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective DetectionYuxi Li, Yi Liu, Gelei Deng, Ying Zhang 等FSE 2024 · 12 次引用
- Validating Multimedia Content Moderation Software via Semantic FusionWenxuan Wang, Jingyuan Huang, Chang Chen, Jiazhen Gu 等ISSTA 2023 · 11 次引用
- An Image is Worth a Thousand Toxic Words: A Metamorphic Testing Framework for Content Moderation SoftwareWenxuan Wang, Jingyuan Huang, Jen-tse Huang, Chang Chen 等ASE 2023 · 7 次引用
- Coverage-Based Harmfulness Testing for LLM Code TransformationHonghao Tan, Haibo Wang, Diany Pressato, Yisen Xu 等ASE 2025 · 2 次引用
它引用的 Paper21
- Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and EntailmentDi Jin, Zhijing Jin, Joey Tianyi Zhou, Peter SzolovitsAAAI 2020 · 1,333 次引用
- TextBugger: Generating Adversarial Text Against Real-world ApplicationsJinfeng Li, Shouling Ji, Tianyu Du, Bo Li 等NDSS 2019 · 876 次引用
- Hidden Voice CommandsNicholas Carlini, Pratyush Mishra, Tavish Vaidya, Yuankai Zhang 等USENIX Security 2016 · 672 次引用
- BERT-ATTACK: Adversarial Attack Against BERT Using BERTLinyang Li, Ruotian Ma, Qipeng Guo, Xiangyang Xue 等EMNLP 2020 · 529 次引用
- Word-level Textual Adversarial Attacking as Combinatorial OptimizationYuan Zang, Fanchao Qi, Chenghao Yang, Zhiyuan Liu 等ACL 2020 · 188 次引用
相关 Paper
- Metamorphic Testing for Audio Content Moderation SoftwareWenxuan Wang, Yongjiang Wu, Junyuan Zhang, Shuqing Li 等ASE 2025
- MemeDetoxNet: Balancing Toxicity Reduction and Context PreservationGitanjali Kumari, Jitendra Solanki, Asif EkbalACL Findings 2025
- Enhancing LLM-based Hatred and Toxicity Detection with Meta-Toxic Knowledge GraphYibo Zhao, Jiapeng Zhu, Can Xu, Yao Liu 等ACL Findings 2025 · 8 次引用
- ContiGuard: A Framework for Continual Toxicity Detection Against Evolving Evasive PerturbationsHankun Kang, Xin Miao, Jianhao Chen, Jintao Wen 等WWW 2026
- DiffuDetox: A Mixed Diffusion Model for Text DetoxificationGriffin Floto, Mohammad Mahdi Abdollah Pour, Parsa Farinneya, Zhenwei Tang 等ACL Findings 2023 · 5 次引用
