arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.02721cs.CLcs.AI
收藏

通过将后缀梯度压缩为前缀控制器实现LLM行为的自控制

Self-Control of LLM Behaviors by Compressing Suffix Gradient into Prefix Controller

Shenzhen University(深圳大学);Rensselaer Polytechnic Institute(伦斯勒理工学院);University of California, Los Angeles(加利福尼亚大学洛杉矶分校);Tsinghua University(清华大学);The University of Hong Kong(香港大学);California Institute of Technology(加州理工学院)

Min Cai, Yuchen Zhang, Shichang Zhang, Fan Yin, Dan Zhang, Difan Zou, Yisong Yue, Ziniu Hu

AI总结:

提出SelfControl,一种推理时利用梯度控制LLM行为的方法,通过计算后缀自评估梯度直接引导生成过程,并引入SelfControl_{Prefix}模块实现无延迟高效控制,在去毒化、真实性、情感控制和隐私保护等多领域显著优于SOTA。

摘要:

我们提出了SelfControl,一种推理时模型控制方法,利用梯度来控制大型语言模型(LLMs)的行为,而无需显式的人工标注。给定一个以自然语言后缀字符串形式拼接到输入提示中的期望行为,SelfControl会计算LLM对该后缀的自评估关于其潜在表示的梯度。这些梯度被用于直接控制自回归生成过程以趋向期望行为,这消除了人工监督,实现了精确透明的控制,并提供了即时适应能力。为进一步提升效率,我们引入了SelfControl_{Prefix},这是一个紧凑模块,它将来自梯度的学习表示封装进一个SelfControl_{Prefix}中,在与原始模型相比无延迟的情况下促进了高效的推理时控制,并允许同时对多种行为进行控制。我们的实验证明了SelfControl在多个领域的有效性,在去毒化方面比SOTA提升了8.3%,在真实性增强方面提升了3.1%,在情感语调控制方面提升了4%~10%,在隐私保护方面提升了48.2%,即完全消除了隐私泄露问题。此外,我们证明了SelfControl可用于数据合成并提升推理能力。

英文摘要:

We propose SelfControl, an inference-time model control method utilizing gradients to control the behavior of large language models (LLMs) without explicit human annotations. Given a desired behavior expressed in a natural language suffix string concatenated to the input prompt, SelfControl computes gradients of the LLM's self-evaluation of the suffix with respect to its latent representations. The gradients are used to directly control the auto-regressive generation process towards desired behaviors, which eliminates human supervision, achieves precise and transparent control, and offers on-the-fly adaptability. To further enhance efficiency, we introduce SelfControl_{Prefix}, a compact module that encapsulates the learned representations from gradients into a SelfControl_{Prefix}, facilitating efficient inference-time control with no latency compared to the original model and allowing control for multiple behaviors simultaneously. Our experiments demonstrate SelfControl's efficacy across multiple domains, where it improves over SOTA for 8.3% in detoxification, 3.1% in truthfulness enhancement, 4%~10% in controlling on emotion tones, and 48.2% in privacy protection, i.e., completely remove privacy leakage issue. Additionally, we demonstrate that SelfControl can be used for data synthesis and to improve reasoning abilities.

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

↑