Semantic and Precise Trigger Inversion: Detecting Backdoored Language Models
Backdoor attacks pose a serious security threat to Natural Language Processing (NLP) models, allowing adversaries to manipulate model outputs through hidden triggers. Although backdoor detection methods have been developed to address this issue, existing approaches based on trigger inversion are effective only for simple, visible triggers. These methods struggle to handle semantically enhanced, invisible triggers and often fail to provide accurate backdoor determinations due to reliance on unreliable heuristics, making it difficult to reliably distinguish backdoored models from benign ones. This presents a critical gap in current detection techniques. To address these challenges, we propose a novel trigger inversion <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">SemInv</i> that consists of two key contributions: consistent semantics inversion and identifiable condition inspection. Consistent semantics inversion introduces a new regularization technique into the trigger optimization process, enabling more effective inversion of semantically constrained triggers. Identifiable condition inspection assesses the attack performance margin across different identifiable conditions, providing robust evidence for distinguishing backdoored models from benign ones. We evaluate <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">SemInv</i> using the TrojAI round 6–8 datasets and demonstrate that it significantly outperforms state-of-the-art approaches in both backdoor detection accuracy and trigger inversion performance. Our method also proves effective against models with stealthy triggers, advancing the field of NLP security by offering a more comprehensive solution for identifying backdoor attacks. The code repository is in https://github.com/Bluedask/SemInv.
Authors
- Chunlong Xie
- Jialing He (ORCID: https://orcid.org/0000-0002-8643-0647)
- Ying Yang (ORCID: https://orcid.org/0000-0002-0617-455X)
- Shangwei Guo (ORCID: https://orcid.org/0000-0002-6443-5308)
- Tao Xiang (ORCID: https://orcid.org/0000-0002-9439-4623)
- Tianwei Zhang (ORCID: https://orcid.org/0000-0001-6595-6650)
Institutions
- Agency for Science, Technology and Research (SG)
- Chongqing University (CN)
- Nanyang Technological University (SG)
- Institute of High Performance Computing (SG)
Publication Details
- Journal
- IEEE Transactions on Information Forensics and Security
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1109/tifs.2025.3594037
- Citations
- 1
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 2.48
Funders
- National Natural Science Foundation of China