How to Attack Stealthily? A Letter Frequency-based Backdoor Attack Against LLMs Bounded by Logit Fluctuation

Ruyi Zhang, Songlei Jian, Yusong Tan, Heng Gao, Jianfeng Zhang, Haifang Zhou


Abstract
Trigger stealthiness is crucial to the effectiveness of backdoor attacks in Large Language Models (LLMs). Current attacks construct triggers at word level, leading to poor stealthiness since removing critical words can drastically alter model output logits, as we observed. This significant fluctuation is different from the stable output on normal data, and thus may expose backdoor attacks. To achieve greater stealthiness, we formalize this observation as a new stealthiness metric, termed Logit Fluctuation (LF), and derive a sufficient condition for stealthy backdoor attack bounded by LF. We then introduce a simple yet effective backdoor attack method, termed BadFreq, which satisfies the stealthiness bound. BadFreq launches an attack at a fine-grained letter level, which is activated when the frequency of letter ‘z’ in the input exceeds a predefined threshold. This method distributes triggers across letters rather than specific words, thereby avoiding reliance on critical words and enhancing stealthiness. We test three LLMs, evaluating five attackers against three defenders across three pattern recognition tasks under seven metrics. BadFreq achieves superior attack performance and the best stealthiness in all metrics, outperforming the second-best attacker by 49% in LF-averaged stealth[Code in <https://anonymous.4open.science/r/BadFreq-5836>.].
Anthology ID:
2026.emnlp-main.1292
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
29425–29443
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1292/
DOI:
Bibkey:
Cite (ACL):
Ruyi Zhang, Songlei Jian, Yusong Tan, Heng Gao, Jianfeng Zhang, and Haifang Zhou. 2026. How to Attack Stealthily? A Letter Frequency-based Backdoor Attack Against LLMs Bounded by Logit Fluctuation. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 29425–29443, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
How to Attack Stealthily? A Letter Frequency-based Backdoor Attack Against LLMs Bounded by Logit Fluctuation (Zhang et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1292.pdf