Navigating the OverKill in Large Language Models

Chenyu Shi, Xiao Wang, Qiming Ge, Songyang Gao, Xianjun Yang +5 more
1/31/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Large language models are meticulously aligned to be both helpful and harmless. However, recent research points to a potential overkill which means models may refuse to answer benign queries. In this paper, we investigate the factors for overkill by exploring how models handle and determine the safety of queries. Our findings reveal the presence of shortcuts within models, leading to an over-attention of harmful words like 'kill' and prompts emphasizing safety will exacerbate overkill. Based on these insights, we introduce Self-Contrastive Decoding (Self-CD), a training-free and model-agnostic strategy, to alleviate this phenomenon. We first extract such over-attention by amplifying the difference in the model's output distributions when responding to system prompts that either include or omit an emphasis on safety. Then we determine the final next-token predictions by downplaying the over-attention from the model via contrastive decoding. Empirical results indicate that our method has achieved an average reduction of the refusal rate by 20\% while having almost no impact on safety.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{shi2024navigating,
  title  = {Navigating the OverKill in Large Language Models},
  author = {Chenyu Shi and Xiao Wang and Qiming Ge and Songyang Gao and Xianjun Yang and Tao Gui and Qi Zhang and Xuanjing Huang and Xun Zhao and Dahua Lin},
  year   = {2024},
  eprint = {2401.17633},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.17633v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.17633.svg)](https://codeofpaper.com/paper/2401.17633)

Discussion