CODA: Mitigating Over-Refusal and Jailbreaks in Large Language Models via Codebook-Orthogonal Direction Alignment

Feng Huang, Yunqi Zhang, Qiang Huang, Qing Yu, Yongfeng Huang


Abstract
Safety alignment plays a vital role in ensuring the reliability of Large Language Models (LLMs) by mitigating risks from malicious queries. To avoid the high computational costs of post-training, recent research has increasingly shifted toward inference-time alignment via continuous activation steering.

However, the geometric entanglement of harmful and benign technical representations within these continuous spaces impedes precise calibration, inevitably trapping models in a severe dilemma between jailbreak vulnerability and benign over-refusal. To address this, we propose Codebook-Orthogonal Direction Alignment (CODA), an inference-time framework that projects hidden states onto a vector-quantized codebook to serve as a discrete control interface.

Specifically, to break continuous directional entanglement, CODA estimates steering directions over discrete codebook anchors. To eliminate the geometric interference triggering over-refusals, CODA softly orthogonalizes the safety direction with respect to benign technical intent.

Finally, to prevent rigid over-correction, CODA forwards the decoupled vectors to yield dynamically adjusted steering strengths during generation via risk gating and exponential time decay. Experiments across a diverse set of open-weight LLMs demonstrate that CODA consistently yields a stronger safety–utility trade-off than continuous steering baselines, indicating that discrete representations provide a more effective mechanism for disentangling safety from utility.
Anthology ID:
2026.emnlp-main.1243
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:
28326–28348
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1243/
DOI:
Bibkey:
Cite (ACL):
Feng Huang, Yunqi Zhang, Qiang Huang, Qing Yu, and Yongfeng Huang. 2026. CODA: Mitigating Over-Refusal and Jailbreaks in Large Language Models via Codebook-Orthogonal Direction Alignment. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 28326–28348, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
CODA: Mitigating Over-Refusal and Jailbreaks in Large Language Models via Codebook-Orthogonal Direction Alignment (Huang et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1243.pdf