π€ AI Summary
This work addresses the challenge in retrieval-augmented generation (RAG) where externally retrieved content often conflicts with the parametric knowledge of large language models, degrading generation accuracy. To resolve this, the authors propose SHIFT, a framework that introduces a lightweight, learnable gating module to dynamically modulate internal activations, harmonizing the use of contextual and parametric knowledge while keeping the backbone model frozen. By reformulating conventional neuron-level knowledge editing into an efficient gating mechanism, SHIFT optimizes fewer than 0.01% of the modelβs parameters, effectively mitigating knowledge conflicts without compromising general capabilities. Experiments across six benchmark datasets demonstrate that SHIFT significantly outperforms existing approaches, achieving superior generation quality with highly efficient parameter utilization.
π Abstract
Retrieval-augmented generation (RAG) enhances LLMs by incorporating external knowledge to support response generation. However, conflicts between retrieved context and parametric knowledge have emerged as a critical challenge in RAG systems. To mitigate such conflicts, numerous studies have attempted to identify and edit knowledge-related internal neurons, aiming to improve the ability of LLMs to rely on contextual evidence during generation. However, these neuron-level approaches may introduce unintended cascading effects that compromise the general capabilities of LLMs, as the modified neurons are often entangled with broader model behaviors and functionalities. In this paper, we introduce SHIFT, a novel framework that reformulates neuron-level modification as learnable gate modulation, allowing LLMs to adaptively regulate internal activations for knowledge conflict resolution. Technically, our SHIFT equips LLMs with a lightweight gate module and optimizes fewer than 0.01% trainable parameters while keeping the backbone model frozen. During generation, the gate module adjusts the model's internal representations to adaptively leverage contextual and parametric knowledge. Extensive experiments on six datasets validate the effectiveness of our SHIFT in comparison with various competing baselines. All datasets and code are available at https://github.com/OpenBMB/SHIFT.