Mitigating Copy Bias in In-Context Learning through Neuron Pruning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ali, Ameen, Wolf, Lior, Titov, Ivan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910630455279616
author Ali, Ameen
Wolf, Lior
Titov, Ivan
author_facet Ali, Ameen
Wolf, Lior
Titov, Ivan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_01288
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Mitigating Copy Bias in In-Context Learning through Neuron Pruning
Ali, Ameen
Wolf, Lior
Titov, Ivan
Computation and Language
Machine Learning
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.
title Mitigating Copy Bias in In-Context Learning through Neuron Pruning
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2410.01288