通过轨迹引导,减少大模型对正常指令的过度拒绝。
SafeConstellations: Mitigating Over-Refusals in LLMs Through Task-Aware Representation Steering
- 分析嵌入空间中任务特异性轨迹模式,定位过拒成因。
- 在推理阶段定向调整表示路径,降低过拒率至18.7%以下。
- 仅对易误拒任务干预,兼顾安全与可用性,适合生产部署。
大语言模型日益出现过度拒绝现象:安全机制会错误拒绝看似含有害内容但意图良性的指令。这降低了依赖通用提示模板或特定任务(如情感分析、语言翻译)的生产应用的实用性。我们通过大量评估发现,即使指令被重新表述为良性任务,模型仍持续拒绝含有有害内容的输入。机制分析揭示,模型在嵌入空间中遵循特定的‘星座’模式,每类NLP任务具有稳定且可预测的表示轨迹,可在拒绝与非拒绝情形间平滑切换。为此提出SafeConstellations,一种推理时的轨迹引导方法,通过追踪任务特异性轨迹并引导表示进入非拒绝路径。该方法仅针对易发生过拒的任务进行干预,在显著降低过拒率的同时对模型整体性能影响极小,提供了一种有原则、有条件地缓解过拒问题的新范式。
原文摘要 · Abstract (English)
LLMs increasingly exhibit over-refusal behavior, where safety mechanisms cause models to reject benign instructions that seemingly resemble harmful content. This phenomenon diminishes utility in production applications that repeatedly rely on common prompt templates or applications that frequently rely on LLMs for specific tasks (e.g. sentiment analysis, language translation). Through extensive evaluation, we demonstrate that LLMs persist in refusing inputs containing harmful content, even when they are reframed with tasks that have benign intent. Our mechanistic analysis reveals that LLMs follow distinct "constellation" patterns in embedding space as representations traverse layers, with each NLP task maintaining consistent trajectories that shift predictably between refusal and non-refusal cases. We introduce SafeConstellations, an inference-time trajectory-shifting approach that tracks task-specific trajectory patterns and guides representations toward non-refusal pathways. By selectively guiding model behavior only on tasks prone to over-refusal, our method reduces over-refusals with minimal impact on utility -- offering a principled and conditional approach to mitigating over-refusals.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。