LinEAS:基于分布损失的激活引导端到端学习
LinEAS: End-to-end Learning of Activation Steering with a Distributional Loss
AI总结:
LinEAS提出一种端到端学习的线性激活引导方法,通过全局分布损失同时优化各层偏移,仅需少量无配对数据即可在毒性缓解和文本到图像概念控制上超越现有方法。
摘要:
生成模型在日常生活中的日益普及,要求我们具备高效的机制来控制其生成内容,例如生成安全内容或为用户提供探索风格变化的工具。理想情况下,此类机制应需要少量未配对数据(即无显式偏好),并且在训练和推理时都应成本低廉,同时保持输出质量。近期研究表明,此类机制可以通过仅干预模型激活来实现,其目标是纠正使用来自源集与目标集(例如有毒和无毒句子)的提示时所见激活之间的分布差异。虽然这些快速方法成本低廉,但本质上较为粗糙:其映射是局部调整的,未考虑其对下游层的影响,导致在样本外使用时产生意外偏移的干预。我们在此提出线性端到端激活引导(LinEAS),这是一种使用全局损失进行训练的方法,该损失同时考虑所有逐层分布偏移。除了更加稳健之外,用于训练LinEAS的损失还可以通过稀疏化范数进行正则化,从而自动进行神经元选择。LinEAS仅需少量未配对样本即可有效,并在语言模型毒性缓解方面优于类似基线,与可访问强监督的依赖预言机的方法相比具有竞争力。LinEAS是模态无关的,我们通过实验发现,在缓解单步文本到图像生成模型输出中的新概念和引入新概念方面,它优于现有的激活引导方法。
英文摘要:
The growing use of generative models in daily life calls for efficient mechanisms to control their generation, to e.g., produce safe content or provide users with tools to explore style changes. Ideally, such mechanisms should require low volume of unpaired data (i.e., without explicit preference), and should be cheap, both at train and inference time, while preserving output quality. Recent research has shown that such mechanisms can be obtained by intervening exclusively on model activations, with the goal of correcting distributional differences between activations seen when using prompts from a source vs. a target set (e.g., toxic and non-toxic sentences). While cheap, these fast methods are inherently crude: their maps are tuned locally, not accounting for their impact on downstream layers, resulting in interventions that cause unintended shifts when used out-of-sample. We propose in this work linear end-to-end activation steering (LinEAS), an approach trained with a global loss that accounts simultaneously for all layer-wise distributional shifts. In addition to being more robust, the loss used to train LinEAS can be regularized with sparsifying norms, which can automatically carry out neuron selection. LinEAS only requires a handful of unpaired samples to be effective, and beats similar baselines on toxicity mitigation in language models, becoming competitive with oracle-dependent methods that have access to strong supervision. LinEAS is modality-agnostic and we empirically find that it outperforms existing activation steering methods at mitigating and including new concepts at the output of single-step text-to-image generation models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。