English

Divergence-based Safety Measure for Large Language Models via Rational Inattention

Systems and Control 2026-06-27 v1

Abstract

This paper proposes a divergence-based safety measure for large language models (LLMs) under embedding-input attacks. The proposed measure quantifies the worst-case Kullback--Leibler divergence between the clean and attacked LLMs' output distributions, subject to a stealthiness constraint. This constraint is constructed by leveraging the equivalence between transformer attention used in LLMs and rational inattention modeling human decision-making. We analyze the proposed divergence-based safety measure by investigating perfectly undetectable attacks and deriving its upper bound through a Bregman-divergence argument. The proposed safety measure is applied to two pretrained causal language models, GPT-2 and GPT-Neo-125M, to show nontrivial output-distribution shifts, illustrating that the measure can distinguish model-level safety profiles.

Cite

@article{arxiv.2606.29081,
  title  = {Divergence-based Safety Measure for Large Language Models via Rational Inattention},
  author = {Anh Tung Nguyen and Quanyan Zhu},
  journal= {arXiv preprint arXiv:2606.29081},
  year   = {2026}
}

Comments

16 pages and 2 figures

R2 v1 2026-07-22T20:12:32.651Z