TL;DR
Large Language Models (LLMs) often take shortcuts when answering multi-hop questions, directly linking the start and end of a knowledge chain instead of reasoning step-by-step. This reliance on "factual shortcuts" leads to significant failures when knowledge is edited, with about 20% of errors attributed to these shortcuts. The authors propose a method to mitigate these failures by identifying and "erasing" shortcut-related neurons.
What Problem Does This Paper Address?
LLMs are impressive at recalling facts and reasoning, but their ability to combine these for multi-hop questions (e.g., "Who is the CEO of the company that makes X?") is less understood. Ideally, an LLM would break down such questions into intermediate steps. However, this paper investigates a phenomenon where LLMs might bypass this step-wise reasoning by directly connecting the initial entity (e.g., "X") to the final entity (e.g., "CEO's name") if they frequently co-occurred in the training data. This "shortcut" can lead to incorrect answers, especially after knowledge editing, where the LLM might retain outdated information.
Methods
The researchers explored two main areas:
- Identifying Factual Shortcuts: They used "Knowledge Neurons" (KNs) to analyze which parts of an LLM's internal network are activated when answering questions. By comparing the activated neurons for multi-hop questions versus individual single-hop questions, they could infer the presence of shortcuts. They also analyzed the frequency of co-occurrence between the start and end entities of multi-hop facts in large text corpora (Wikipedia and Dolma) to see if this correlated with shortcut usage.
- Mitigating Shortcut Risks: To address the problems caused by shortcuts, they proposed a method inspired by previous work on knowledge editing. This involves identifying specific neurons associated with factual shortcuts and "erasing" them (setting their activation to zero). This forces the LLM to rely on proper step-wise reasoning.
Datasets
- MQUAKE-CF-3K: This dataset, originally from Zhong et al. (2023), was used for evaluating multi-hop knowledge editing. It contains 3,000 multi-hop English knowledge questions extracted from Wikipedia.
- Wikipedia and Dolma: These large text corpora were used to analyze the co-occurrence frequencies of entities in multi-hop knowledge chains, serving as proxies for LLM pre-training data.
Key Insights and Ideas
- Shortcuts are Pervasive: LLMs frequently use direct shortcuts for multi-hop reasoning, especially when entities have high co-occurrence in training data. This is more pronounced in few-shot prompting than in chain-of-thought prompting.
- Shortcuts Undermine Knowledge Editing: When knowledge is updated (e.g., changing a country's capital), LLMs relying on shortcuts can fail to reflect the change, leading to incorrect answers. Approximately 20% of knowledge editing failures are linked to these shortcuts.
- Frequency is Key: The likelihood of an LLM using a shortcut is strongly correlated with how often the initial and terminal entities of a multi-hop fact appear together in the pre-training corpus.
- Targeted Neuron Erasure Works: By identifying and disabling specific "shortcut neurons," the researchers could significantly reduce editing failures caused by these shortcuts.
Key Results
- Shortcut Prevalence: Over two-thirds of multi-hop knowledge instances showed evidence of shortcuts, with some appearing over 10,000 times in the analyzed corpora.
- Editing Failures: Around 20% of multi-hop knowledge editing failures were directly attributed to factual shortcuts. Instances with higher shortcut failures also showed higher co-occurrence frequencies of their start and end entities.
- Mitigation Success: Erasing shortcut neurons led to a significant reduction in shortcut-related failures in multi-hop knowledge editing, improving the overall success rate. For example, on a subset of data with high shortcut frequency (Dcount>10), erasing shortcuts improved the success rate and reduced shortcut failure rates across different LLMs and editing methods.
Limitations and Future Work
- Corpus Limitations: While Wikipedia is a good proxy, LLM pre-training corpora are often much larger and more diverse. Future work could analyze more extensive datasets.
- Mitigation vs. Eradication: The proposed neuron erasure is a post-hoc mitigation strategy. True elimination of shortcuts would require changes during the pre-training phase itself.
- Scalability: Applying this neuron erasure method comprehensively across all potential shortcuts in LLMs is impractical. The authors advocate for developing better pre-training methods that inherently constrain shortcut generation.
- Broader LLM Evaluation: The study focused on GPT-J and LLaMA-2. Future research could extend these experiments to a wider range of LLMs.
Summary updated