BAIT: Large Language Model Backdoor Scanning by Inverting Attack Target
Authors:
- 12 May 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1676-1694
Abstract
Recent literature has shown that LLMs are vulnerable to backdoor attacks, where malicious attackers inject a secret token sequence (i.e., trigger) into training prompts and enforce their responses to include a specific target sequence. Unlike discriminative NLP models, which have a finite output space (e.g., those in sentiment analysis), LLMs are generative models, and their output space grows exponentially with the length of response, thereby posing significant challenges to existing backdoor detection techniques, such as trigger inversion. In this paper, we conduct a theoretical analysis of the LLM backdoor learning process under specific assumptions, revealing that the autoregressive training paradigm in causal language models inherently induces strong causal relationships among tokens in backdoor targets. We hence develop a novel LLM backdoor scanning technique, BAIT (Large Language Model Backdoor ScAnning by Inverting Attack Target). Instead of inverting back-door triggers like in existing scanning techniques for non-LLMs, BAIT determines if a model is backdoored by inverting back-door targets, leveraging the exceptionally strong causal relations among target tokens. BAIT substantially reduces the search space and effectively identifies backdoors without requiring any prior knowledge about triggers or targets. The search-based nature also enables BAIT to scan LLMs with only the black-box access. Evaluations on 153 LLMs with 8 architectures across 6 distinct attack types demonstrate that our method outperforms 5 baselines. Its superior performance allows us to rank at the top of the leaderboard in the LLM round of the TrojAI competition (a multi-year, multi-round backdoor scanning competition).Keywords
Funding Information
- National Science Foundation (SHF-1901242,SHF-1910300,Proto-OKN 2333736,IIS-2416835)
This publication has 29 references indexed in Scilit:
- Lotus: Evasive and Resilient Backdoor Attacks through Sub-Partitioning2024
- Detecting Backdoors in Pre-trained Encoders2023
- Better Trigger Inversion Optimization in Backdoor Scanning2022
- What if we increase the number of objectives? Theoretical and empirical implications for many-objective combinatorial optimizationComputers & Operations Research, 2022
- Piccolo: Exposing Complex Backdoors in NLP Transformer Models2022
- Spinning Language Models: Risks of Propaganda-As-A-Service and Countermeasures2022
- Detecting AI Trojans Using Meta Neural Analysis2021
- Towards Inspecting and Eliminating Trojan Backdoors in Deep Neural Networks2020
- Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural Networks2019
- BadNets: Evaluating Backdooring Attacks on Deep Neural NetworksIEEE Access, 2019