大型语言模型中的偏好头:可解释个性化机制框架
Preference Heads in Large Language Models: A Mechanistic Framework for Interpretable Personalization
AI总结:
本文提出DPS框架,通过因果掩码分析识别偏好头并实现可控可解释的个性化,实验表明在保持内容连贯性的同时提升个性化精度。
摘要:
大型语言模型(LLMs)表现出强大的隐式个性化能力,但现有方法多将其视为黑箱,依赖提示工程或用户数据微调。本文从机制可解释性角度出发,假设存在稀疏的偏好头,这些注意力头编码用户特定的风格和主题偏好,并对生成产生因果影响。我们引入Differential Preference Steering(DPS),一种无需训练的框架,通过因果掩码分析识别偏好头,并在推理时利用它们实现可控且可解释的个性化。DPS为每个注意力头计算偏好贡献分数(PCS),直接衡量其对用户对齐输出的因果影响。在解码过程中,我们对比模型预测结果(有无偏好头),放大个性化与通用logits之间的差异,以选择性加强偏好对齐的延续。在多个LLM的广泛个性化基准测试中,实验显示在保持内容连贯性和低计算开销的同时,一致提升了个性化保真度。除了经验改进,DPS还提供了关于transformer架构中个性化如何出现的机制解释。我们的实现已公开可用。
英文摘要:
Large Language Models (LLMs) exhibit strong implicit personalization ability, yet most existing approaches treat this behavior as a black box, relying on prompt engineering or fine tuning on user data. In this work, we adopt a mechanistic interpretability perspective and hypothesize the existence of a sparse set of Preference Heads, attention heads that encode user specific stylistic and topical preferences and exert a causal influence on generation. We introduce Differential Preference Steering (DPS), a training free framework that (1) identifies Preference Heads through causal masking analysis and (2) leverages them for controllable and interpretable personalization at inference time. DPS computes a Preference Contribution Score (PCS) for each attention head, directly measuring its causal impact on user aligned outputs. During decoding, we contrast model predictions with and without Preference Heads, amplifying the difference between personalized and generic logits to selectively strengthen preference aligned continuations. Experiments on widely used personalization benchmarks across multiple LLMs demonstrate consistent gains in personalization fidelity while preserving content coherence and low computational overhead. Beyond empirical improvements, DPS provides a mechanistic explanation of where and how personalization emerges within transformer architectures. Our implementation is publicly available.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。