TL;DR
This paper reveals a surprising asymmetry in how Large Language Models (LLMs) process logically equivalent facts. The authors demonstrate that this asymmetry is directly caused by the frequency of entities in the LLM's pre-training data, where facts with high-frequency subjects and low-frequency objects are recognized more readily than their inverse. This finding offers crucial insights into the "why" behind LLM hallucinations and how pre-training data shapes model behavior.
What Problem Does This Paper Address?
LLMs are incredibly powerful but prone to "hallucinations" – generating factually incorrect or nonsensical information. While much research has focused on when these hallucinations occur, this paper dives into why, specifically investigating the role of pre-training data. The authors identify a critical gap: LLMs might struggle to recognize logically equivalent statements if the entities involved have vastly different frequencies in the training corpus. For example, an LLM might know "Diego Maradona has a sibling named Raul Maradona" but fail to infer "Raul Maradona has a sibling named Diego Maradona," even though these are the same fact. This asymmetry, they argue, stems from biases introduced by entity frequency during pre-training.
Methods
The core of the paper's methodology involves:
- Entity Frequency Estimation: Since most pre-training datasets are proprietary, the authors leverage the fully open-source OLMo series and its accompanying Dolma dataset. They index Dolma to accurately estimate the frequency of entities.
- Probing Dataset Construction: They use relational facts (triples like
(subject, relation, object)) from Wikidata5M. These facts are then formatted into "forward" and "backward" versions (e.g.,(A, sibling, B)and(B, sibling, A)) to test for logical equivalence. - Probing LLMs: They design a classification task where LLMs are prompted to judge the truthfulness of these facts. The models are instructed to respond with a single word ("Yes"/"No" or "True"/"False").
- Statistical Analysis: McNemar's test is used to determine the statistical significance of the observed differences in recognition accuracy between forward and backward facts.
Datasets
- Pre-training Data:
- Dolma: An 11TB open-access corpus used to estimate entity frequencies. The authors index this dataset using an FM-index for efficient querying.
- Knowledge Base for Facts:
- Wikidata5M: A subset of Wikidata used to extract relational facts (triples) for constructing probing datasets.
Key Insights and Ideas
- Frequency is Key: The paper strongly suggests that the frequency of entities in pre-training data, not just their presence, is a major driver of how LLMs process information.
- Subject-Object Asymmetry: LLMs show a consistent bias towards recognizing facts where the high-frequency entity appears as the subject and the low-frequency entity as the object. The reverse is less likely to be recognized.
- "Reversal Curse" Explained: This work provides a data-centric explanation for phenomena like the "reversal curse," where models struggle with inverse relationships. It's not just a structural limitation but a consequence of biased data distributions.
- Probing Closed Models: By using open-source models and data, the authors can infer characteristics of pre-training data for even closed-source LLMs, offering a way to understand their potential biases.
Key Results
- Consistent Asymmetry: Across multiple LLMs (OLMo, Llama3.1, Qwen2.5), facts with high-frequency subjects and low-frequency objects were recognized significantly more often than their inverse. For example, in the 0-1K low-frequency range, the forward/backward recognition ratio for the "spouse" relation could be as high as 2.3.
- Reversal of Trend: In the "Low-to-High" frequency setting (low-frequency subject, high-frequency object), the asymmetry flips, with backward facts being recognized more often.
- No Asymmetry in High-High: When both subject and object entities are high-frequency, no statistically significant directional asymmetry was observed.
- Prompting Matters (Slightly): While the core asymmetry persists, the paper notes that different prompt templates (question vs. statement) can slightly influence recognition rates, but not the fundamental trend.
- FM-index Efficiency: The use of an FM-index for entity frequency estimation provided a significant speedup (around 60x) compared to traditional grep methods for querying large corpora.
Limitations and Future Work
- Entity Frequency Proxy: While using Dolma for frequency estimation is a significant step, the authors acknowledge that it might not perfectly represent the exact pre-training data of all evaluated models, especially proprietary ones.
- Wikidata5M Coverage: The reliance on Wikidata5M for facts means the analysis is limited to the types of relations and entities present in that knowledge base.
- Future Work: The authors suggest that this research can inform strategies for mitigating such biases, potentially through data curation or model fine-tuning. They also highlight the potential for this methodology to infer pre-training data characteristics for other LLMs.
Summary updated