用轻量代理模型持续调节大模型对上下文知识的敏感度。
Continuously Steering LLMs Sensitivity to Contextual Knowledge with Proxy Models
- 通过两个小模型输出差异,无须修改权重即可调节大模型敏感度。
- 实验表明可精确控制敏感度,既能增强也能降低对上下文的依赖。
- 适合需要灵活切换上下文与参数知识优先级的应用场景。
在大语言模型生成中,存在参数化知识与上下文知识冲突的情况。以往方法如微调、解码算法或编辑神经元虽能适配模型以忠实于新上下文知识,但通常对大模型效率低、不适用于黑盒模型,且无法连续调整敏感度。为此,本文提出CSKS(Continuously Steering Knowledge Sensitivity)框架,通过训练两个小型代理模型,利用其输出分布差异来转移原大模型的输出分布,无需修改大模型权重。评估中,我们设计合成数据与细粒度指标衡量敏感度,并使用真实冲突数据集验证实际效果。大量实验表明,该框架可实现对大模型敏感度的连续、精准控制,灵活支持增强或降低对上下文知识的依赖,从而按需优先选择上下文或参数知识。代码与数据已公开于https://github.com/OliveJuiceLin/CSKS。
原文摘要 · Abstract (English)
In Large Language Models (LLMs) generation, there exist knowledge conflicts and scenarios where parametric knowledge contradicts knowledge provided in the context. Previous works studied tuning, decoding algorithms, or locating and editing context-aware neurons to adapt LLMs to be faithful to new contextual knowledge. However, they are usually inefficient or ineffective for large models, not workable for black-box models, or unable to continuously adjust LLMs' sensitivity to the knowledge provided in the context. To mitigate these problems, we propose CSKS (Continuously Steering Knowledge Sensitivity), a simple framework that can steer LLMs' sensitivity to contextual knowledge continuously at a lightweight cost. Specifically, we tune two small LMs (i.e. proxy models) and use the difference in their output distributions to shift the original distribution of an LLM without modifying the LLM weights. In the evaluation process, we not only design synthetic data and fine-grained metrics to measure models' sensitivity to contextual knowledge but also use a real conflict dataset to validate CSKS's practical efficacy. Extensive experiments demonstrate that our framework achieves continuous and precise control over LLMs' sensitivity to contextual knowledge, enabling both increased sensitivity and reduced sensitivity, thereby allowing LLMs to prioritize either contextual or parametric knowledge as needed flexibly. Our data and code are available at https://github.com/OliveJuiceLin/CSKS.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。