arXiv:2410.01288cs.CLcs.LG2024-10Conference of the …被引 12

通过剪枝抑制大模型在上下文学习中的复制偏差,提升泛化能力。

Mitigating Copy Bias in In-Context Learning through Neuron Pruning

  • 用集成梯度定位偏向复制的神经元,再将其剪枝。
  • 剪枝后在多个任务上性能稳定提升,尤其改善模式识别能力。
  • 方法通用性强,适配Transformer与状态空间模型,无需结构调整。

大型语言模型在少样本上下文学习(ICL)中表现优异,但仍存在‘复制偏差’问题,即倾向于直接复制示例答案而非学习底层规律。本文提出一种新颖且简单的缓解方法:构建合成任务,利用集成梯度识别优先于泛化的神经元,并通过剪枝这些神经元显著提升性能。实验表明,该方法在多样化的ICL任务中均有效,且适用于Transformer与状态空间模型等多种架构,无需额外修改。分析从任务识别视角出发,考察由模型生成的任务向量(task vectors),发现剪枝能提升其质量,表明原始神经元阻碍了有效的任务识别。

原文摘要 · Abstract (English)

Large language models (LLMs) have demonstrated impressive few-shot in-context learning (ICL) abilities. Still, we show that they are sometimes prone to a `copying bias', where they copy answers from provided examples instead of learning the underlying patterns. In this work, we propose a novel and simple method to mitigate such copying bias. First, we create a synthetic task and use the Integrated Gradients method to identify neurons that prioritize copying over generalization. We demonstrate that pruning these neurons consistently improves performance across a diverse set of ICL tasks. We also show that our method is applicable across various LLM architectures, including Transformers and State-Space Models, without requiring modifications. In our analysis, we adopt a task-recognition perspective on ICL and examine task vectors (Hendel et al., 2023) induced by the model. We find that pruning enhances the quality of these vectors, suggesting that the pruned neurons previously hindered effective task recognition.

大模型上下文学习神经元剪枝偏差抑制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。