arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.04043cs.LGcs.AI
收藏

无探针低秩激活干预

Probe-Free Low-Rank Activation Intervention

CUHK(香港中文大学)

Chonghe Jiang, Bao Nguyen, Anthony Man-Cho So, Viet Anh Nguyen

AI总结:

本文提出无探针低秩激活干预方法FLORAIN,通过逐样本非线性低秩映射直接编辑注意力头激活,无需训练分类器,在多个模型上一致提升生成真实性与质量。

摘要:

语言模型(LMs)可能生成看似准确连贯但包含不真实或有毒内容的文本。在推理时对隐藏激活进行编辑的干预方法已在引导语言模型朝向理想生成方面展现出有前景的结果。现有的激活干预方法通常包含一个激活探针来检测不理想的生成,从而触发激活修改以引导后续生成。本文提出了一种无探针干预方法FLORAIN,用于特定激活层中的所有注意力头。该方法无需为探测目的训练分类器。干预函数由逐样本非线性低秩映射参数化,并通过最小化修改后的激活与其在理想内容流形上的投影之间的距离来训练。在流形和投影距离的特定构造下,我们证明该干预策略可以通过求解一个光滑优化问题高效计算。在多个基础模型上的基准测试实证结果表明,FLORAIN在生成任务和多选题任务中,在提升模型真实性和质量方面一致优于若干基线方法。

英文摘要:

Language models (LMs) can produce texts that appear accurate and coherent but contain untruthful or toxic content. Inference-time interventions that edit the hidden activations have shown promising results in steering the LMs towards desirable generations. Existing activation intervention methods often comprise an activation probe to detect undesirable generation, triggering the activation modification to steer subsequent generation. This paper proposes a probe-free intervention method FLORAIN for all attention heads in a specific activation layer. It eliminates the need to train classifiers for probing purposes. The intervention function is parametrized by a sample-wise nonlinear low-rank mapping, which is trained by minimizing the distance between the modified activations and their projection onto the manifold of desirable content. Under specific constructions of the manifold and projection distance, we show that the intervention strategy can be computed efficiently by solving a smooth optimization problem. The empirical results, benchmarked on multiple base models, demonstrate that FLORAIN consistently outperforms several baseline methods in enhancing model truthfulness and quality across generation and multiple-choice tasks.

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

↑