Decoding One Safety Trigger Token for Balancing Safety and Usability in Large Language Models

Haoran Gu, Handing Wang, Yi Mei, Mengjie Zhang, Yaochu Jin


Abstract
Large Language Models (LLMs) have been extensively used across diverse domains, including virtual assistants, automated code generation, and scientific research. However, they remain vulnerable to jailbreak attacks, which manipulate the models into generating harmful responses despite safety alignment. Recent studies have shown that current safety-aligned LLMs undergo shallow safety alignment. In this work, we conduct an in-depth investigation into the underlying mechanism of this phenomenon and reveal that it manifests through learned ”safety trigger tokens” that activate the model’s safety patterns when paired with the specific input. Through both analysis and empirical verification, we further demonstrate the high similarity of the safety trigger tokens across different harmful inputs. Accordingly, we propose D-STT, a simple yet effective defense algorithm that identifies and explicitly decodes safety trigger tokens of the given safety-aligned LLM to activate the model’s learned safety patterns. In this process, the safety trigger is constrained to a single token, which effectively preserves model usability by introducing minimal intervention in the decoding process. Extensive experiments across diverse jailbreak attacks and benign prompts demonstrate that D-STT substantially reduces output harmfulness while preserving model usability and incurring negligible response time overhead, demonstrating highly competitive and consistent performance across diverse models compared to ten baseline methods.
Anthology ID:
2026.emnlp-main.889
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:
20518–20537
Language:
URL:
https://aclanthology.org/2026.emnlp-main.889/
DOI:
Bibkey:
Cite (ACL):
Haoran Gu, Handing Wang, Yi Mei, Mengjie Zhang, and Yaochu Jin. 2026. Decoding One Safety Trigger Token for Balancing Safety and Usability in Large Language Models. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 20518–20537, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Decoding One Safety Trigger Token for Balancing Safety and Usability in Large Language Models (Gu et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.889.pdf