无需指令即可多方向精准引导大模型输出,提升风格与主题控制能力。
Effectively Steer LLM To Follow Preference via Building Confident Directions
- 构建自信方向向量,在推理时修改激活值实现多向引导。
- 可同时对多个用户偏好进行精准对齐,性能优于双向引导方法。
- 无需指定层或用户指令,部署简单且适用于多种主流模型。
让大模型符合人类偏好对满足个性化需求(如保持写作风格、生成特定主题)至关重要。现有对齐方法多依赖微调或提示,成本高或难控制。模型引导算法通过构造特定引导方向修改输出,实现免优化、易部署,但通常仅支持双向引导且缺乏理论保障。本文提出理论框架理解并量化引导方法,据此设计自信方向引导法(CONFST):在推理时构建与用户偏好高度一致的自信方向,并将其加至模型激活值中,从而有效引导输出。该方法可同时对多个偏好进行对齐,无需选择添加层或明确用户指令,具有更强能力与更简实现。我们在 GPT-2 XL(1.5B)、Mistral(7B)和 Gemma-it(9B)上验证其在主题与风格迁移任务中的优越表现,显著优于现有方法。
原文摘要 · Abstract (English)
Having an LLM that aligns with human preferences is essential for accommodating individual needs, such as maintaining writing style or generating specific topics of interest. The majority of current alignment methods rely on fine-tuning or prompting, which can be either costly or difficult to control. Model steering algorithms, which modify the model output by constructing specific steering directions, are typically easy to implement and optimization-free. However, their capabilities are typically limited to steering the model into one of the two directions (i.e., bidirectional steering), and there has been no theoretical understanding to guarantee their performance. In this work, we propose a theoretical framework to understand and quantify the model steering methods. Inspired by the framework, we propose a confident direction steering method (CONFST) that steers LLMs via modifying their activations at inference time. More specifically, CONFST builds a confident direction that is closely aligned with users' preferences, and this direction is then added to the activations of the LLMs to effectively steer the model output. Our approach offers three key advantages over popular bidirectional model steering methods: 1) It is more powerful, since multiple (i.e. more than two) users' preferences can be aligned simultaneously; 2) It is simple to implement, since there is no need to determine which layer to add the steering vector to; 3) No explicit user instruction is required. We validate our method on GPT-2 XL (1.5B), Mistral (7B) and Gemma-it (9B) models for tasks that require shifting the output of LLMs across various topics and styles, achieving superior performance over competing methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。