Semantic and Precise Trigger Inversion: Detecting Backdoored Language Models
- 30 July 2025
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Information Forensics and Security
- Vol. 20 (15566013) , 8096-8108
Abstract
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 SemInv 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 SemInv 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.Keywords
Funding Information
- Chengdu Key Research and Development Support Program (2023-YF11-00062-HZ)
- Chongqing Municipal Transportation Commission (CQJT-CZKJ2024-03)
- National Natural Science Foundation of China (62472057, U20A20176)
This publication has 28 references indexed in Scilit:
- Stealthy Targeted Backdoor Attacks Against Image CaptioningIEEE Transactions on Information Forensics and Security, 2024
- BDMMT: Backdoor Sample Detection for Language Models Through Model Mutation TestingIEEE Transactions on Information Forensics and Security, 2024
- Backdoor Learning: A SurveyIEEE Transactions on Neural Networks and Learning Systems, 2022
- Piccolo: Exposing Complex Backdoors in NLP Transformer Models2022
- BDDR: An Effective Defense Against Textual Backdoor AttacksComputers & Security, 2021
- Design and Evaluation of a Multi-Domain Trojan Detection Method on Deep Neural NetworksIEEE Transactions on Dependable and Secure Computing, 2021
- MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices2020
- A Backdoor Attack Against LSTM-Based Text Classification SystemsIEEE Access, 2019
- Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural Networks2019
- Trojaning Attack on Neural Networks2018