arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.00045cs.CLcs.LG
收藏

大型语言模型的个性化引导:通过双向偏好优化生成多功能引导向量

Personalized Steering of Large Language Models: Versatile Steering Vectors Through Bi-directional Preference Optimization

The Pennsylvania State University(宾夕法尼亚州立大学)

Yuanpu Cao, Tianrong Zhang, Bochuan Cao, Ziyi Yin, Lu Lin, Fenglong Ma, Jinghui Chen

AI总结:

本研究提出通过双向偏好优化生成更有效的引导向量,直接优化对比人类偏好数据对的生成概率,实现对LLM行为的个性化精准控制,并在真实性、幻觉和越狱等对齐场景中展现出卓越效果与跨模型可迁移性。

摘要:

研究人员一直在研究引导大型语言模型(LLMs)行为并构建适用于各种应用的个性化LLMs的方法。虽然微调似乎是一个直接的解决方案,但它需要大量的计算资源,并且可能显著影响原始LLM的效用。最近的研究引入了更轻量级的策略,专注于提取“引导向量”,通过调整LLM的transformer架构中特定层的激活来引导模型输出朝向期望的行为。然而,这些引导向量直接从人类偏好数据的激活中提取,因此通常会导致次优结果和偶尔的失败,特别是在对齐相关的场景中。本研究提出了一种创新方法,可以通过双向偏好优化生成更有效的引导向量。我们的方法旨在允许引导向量直接影响对比人类偏好数据对的生成概率,从而提供对目标行为的更精确表示。通过仔细调整引导向量的方向和幅度,我们实现了跨一系列强度的期望行为的个性化控制。在各种开放式生成任务中进行的广泛实验,特别是针对引导AI角色,验证了我们方法的有效性。此外,我们全面调查了关键的对齐关注场景,例如管理真实性、减轻幻觉和应对越狱攻击。值得注意的是,我们的方法在这些场景中仍然能够展现出卓越的引导效果。此外,我们展示了引导向量在不同模型/LoRA之间的可迁移性,并强调了同时应用多个向量的协同效益。

英文摘要:

Researchers have been studying approaches to steer the behavior of Large Language Models (LLMs) and build personalized LLMs tailored for various applications. While fine-tuning seems to be a direct solution, it requires substantial computational resources and may significantly affect the utility of the original LLM. Recent endeavors have introduced more lightweight strategies, focusing on extracting "steering vectors" to guide the model's output toward desired behaviors by adjusting activations within specific layers of the LLM's transformer architecture. However, such steering vectors are directly extracted from the activations of human preference data and thus often lead to suboptimal results and occasional failures, especially in alignment-related scenarios. This work proposes an innovative approach that could produce more effective steering vectors through bi-directional preference optimization. Our method is designed to allow steering vectors to directly influence the generation probability of contrastive human preference data pairs, thereby offering a more precise representation of the target behavior. By carefully adjusting the direction and magnitude of the steering vector, we enabled personalized control over the desired behavior across a spectrum of intensities. Extensive experimentation across various open-ended generation tasks, particularly focusing on steering AI personas, has validated the efficacy of our approach. Moreover, we comprehensively investigate critical alignment-concerning scenarios, such as managing truthfulness, mitigating hallucination, and addressing jailbreaking attacks. Remarkably, our method can still demonstrate outstanding steering effectiveness across these scenarios. Furthermore, we showcase the transferability of our steering vectors across different models/LoRAs and highlight the synergistic benefits of applying multiple vectors simultaneously.

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

↑