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

用激活工程引导语言模型

Steering Language Models With Activation Engineering

MIRI;University of Bristol(布里斯托尔大学);Arb Research;MATS;Anthropic

Alexander Matt Turner, Lisa Thiergart, Gavin Leech, David Udell, Juan J. Vazquez, Ulisse Mini, Monte MacDiarmid

AI总结:

为充分激发语言模型能力,研究提出激活工程及ActAdd技术,通过对比提示对激活值计算引导向量并在推理时加入,在情绪转换、去毒任务上达SOTA,且轻量易迭代。

摘要:

提示工程和微调旨在最大化语言模型在特定指标(如降低毒性)上的表现,但这些方法未能充分激发模型的能力。为缩小这一差距,我们提出激活工程:在推理阶段修改激活值以控制(或引导)模型输出。具体而言,我们提出激活加法(Activation Addition,ActAdd)技术,通过对比提示对(如“爱”与“恨”)的中间激活值来计算引导向量(Subramani等人,2022)。在前向传播过程中策略性地加入例如“爱”-“恨”引导向量后,我们使用LLaMA-3和OPT等模型在负面情绪转正面及去毒任务上取得了SOTA(当前最优)结果。ActAdd可在推理阶段控制输出的高层属性(如主题和情绪),同时保持非目标任务的性能。ActAdd轻量易用:无需任何机器学习优化,仅需单对数据点即可工作,可实现引导的快速迭代。ActAdd证明了激活工程的强大作用。

英文摘要:

Prompt engineering and finetuning aim to maximize language model performance on a given metric (like toxicity reduction). However, these methods do not fully elicit a model's capabilities. To reduce this gap, we introduce activation engineering: the inference-time modification of activations in order to control (or steer) model outputs. Specifically, we introduce the Activation Addition (ActAdd) technique, which contrasts the intermediate activations on prompt pairs (such as "Love" versus "Hate") to compute a steering vector (Subramani et al. 2022). By tactically adding in e.g. the "Love" - "Hate" steering vector during the forward pass, we achieve SOTA on negative-to-positive sentiment shift and detoxification using models including LLaMA-3 and OPT. ActAdd yields inference-time control over high-level output properties (like topic and sentiment) while preserving performance on off-target tasks. ActAdd is lightweight: it does not require any machine optimization and works with a single pair of data points, which enables rapid iteration over steering. ActAdd demonstrates the power of activation engineering.

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

↑