arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.05907cs.LGcs.AIcs.CL
收藏

通过条件激活引导实现拒答编程

Programming Refusal with Conditional Activation Steering

University of Pennsylvania(宾夕法尼亚大学);IBM Research(IBM研究院)

Bruce W. Lee, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Erik Miehling, Pierre Dognin, Manish Nagireddy, Amit Dhurandhar

AI总结:

针对激活引导无差别改变LLM行为的问题,本文提出CAST,依据输入上下文在推理时选择性施加或撤回激活引导,从而以规则方式控制拒答并保持其他响应正常,且无需权重优化。

摘要:

LLM已展现出卓越能力,但精确控制其响应行为仍具挑战。现有激活引导方法会不加区分地改变LLM行为,这限制了其在选择性响应至关重要的场景中的实际适用性,例如内容审核或特定领域助手。本文提出条件激活引导(Conditional Activation Steering,CAST),该方法在推理期间分析LLM的激活模式,以根据输入上下文有选择地应用或不应用激活引导。我们的方法基于如下观察:不同类别的提示会在模型隐藏状态中激活不同模式。借助CAST,人们可以用诸如“如果输入涉及仇恨言论或成人内容,则拒绝”或“如果输入不涉及法律建议,则拒绝”之类的规则,系统性地控制LLM行为。这使得模型能够有选择地修改对特定内容的响应,同时保持对其他内容的正常响应,而所有这些都不需要权重优化。我们在 github.com/IBM/activation-steering 发布了该框架的开源实现。

英文摘要:

LLMs have shown remarkable capabilities, but precisely controlling their response behavior remains challenging. Existing activation steering methods alter LLM behavior indiscriminately, limiting their practical applicability in settings where selective responses are essential, such as content moderation or domain-specific assistants. In this paper, we propose Conditional Activation Steering (CAST), which analyzes LLM activation patterns during inference to selectively apply or withhold activation steering based on the input context. Our method is based on the observation that different categories of prompts activate distinct patterns in the model's hidden states. Using CAST, one can systematically control LLM behavior with rules like "if input is about hate speech or adult content, then refuse" or "if input is not about legal advice, then refuse." This allows for selective modification of responses to specific content while maintaining normal responses to other content, all without requiring weight optimization. We release an open-source implementation of our framework at github.com/IBM/activation-steering .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑