English

Uncertainty is Fragile: Manipulating Uncertainty in Large Language Models

Computation and Language 2024-07-22 v3

Abstract

Large Language Models (LLMs) are employed across various high-stakes domains, where the reliability of their outputs is crucial. One commonly used method to assess the reliability of LLMs' responses is uncertainty estimation, which gauges the likelihood of their answers being correct. While many studies focus on improving the accuracy of uncertainty estimations for LLMs, our research investigates the fragility of uncertainty estimation and explores potential attacks. We demonstrate that an attacker can embed a backdoor in LLMs, which, when activated by a specific trigger in the input, manipulates the model's uncertainty without affecting the final output. Specifically, the proposed backdoor attack method can alter an LLM's output probability distribution, causing the probability distribution to converge towards an attacker-predefined distribution while ensuring that the top-1 prediction remains unchanged. Our experimental results demonstrate that this attack effectively undermines the model's self-evaluation reliability in multiple-choice questions. For instance, we achieved a 100 attack success rate (ASR) across three different triggering strategies in four models. Further, we investigate whether this manipulation generalizes across different prompts and domains. This work highlights a significant threat to the reliability of LLMs and underscores the need for future defenses against such attacks. The code is available at https://github.com/qcznlp/uncertainty_attack.

Keywords

Cite

@article{arxiv.2407.11282,
  title  = {Uncertainty is Fragile: Manipulating Uncertainty in Large Language Models},
  author = {Qingcheng Zeng and Mingyu Jin and Qinkai Yu and Zhenting Wang and Wenyue Hua and Zihao Zhou and Guangyan Sun and Yanda Meng and Shiqing Ma and Qifan Wang and Felix Juefei-Xu and Kaize Ding and Fan Yang and Ruixiang Tang and Yongfeng Zhang},
  journal= {arXiv preprint arXiv:2407.11282},
  year   = {2024}
}
R2 v1 2026-06-28T17:42:21.293Z