PretrainRL: Alleviating Factuality Hallucination of Large Language Models at the Beginning

Langming Liu, Kangtao Lv, Haibin Chen, Weidong Zhang, Yejing Wang, Shilei Liu, Xin Tong, Yujin Yuan, Yongwei Wang, Wenbo Su, Bo Zheng

TL;DR

PretrainRL is a novel framework that tackles factual hallucinations in LLMs by integrating reinforcement learning directly into the pretraining phase. By following a "debiasing then learning" principle, it suppresses high-probability falsehoods to make "room" for long-tail factual truths, significantly improving accuracy on rare facts without degrading general reasoning capabilities.

What Problem Does This Paper Address?

Large Language Models (LLMs) are notorious for "hallucinating"—generating plausible but factually incorrect statements. While many researchers treat this as a post-training alignment issue, the authors of this paper argue that the root cause lies in the imbalanced data distribution of the pretraining corpus.

In standard pretraining, models use Next-Token Prediction (NTP) to fit the data distribution. However, "head knowledge" (frequent facts) often overwhelms "tail knowledge" (rare facts). For example, if a corpus mentions "Brand A shoes are red" 1,000 times and "Brand B shoes are blue" once, the model might learn a shortcut: associating "shoes are" with "red" regardless of the brand. This creates a state of "high-probability falsehood" for the rare fact.

Existing solutions like teaching models to say "I don't know" (IDK) or post-hoc knowledge editing often result in "lazy" models or catastrophic forgetting of other capabilities.

Methods

The authors propose PretrainRL, which moves the intervention from post-training to the pretraining/continual training phase. The core strategy is "debiasing then learning."

  1. Direct Preference Optimization (DPO) in Pretraining: Instead of just learning the truth, the model is explicitly taught to unlearn the common falsehoods it is biased toward.
  2. Efficient Negative Sampling: To find these "high-probability falsehoods," the authors use beam search decoding. They ask the model a factual question and see which incorrect answers it assigns the highest probability to. These become the "rejected" samples for the DPO loss.
  3. Hybrid Objective Function: To prevent the model from losing its general language capabilities (pattern collapse), they combine the DPO loss with a standard NTP loss (referred to as Continual Training or CT loss): $$\mathcal{L}_{PretrainRL} = \mathcal{L}_{DPO} + \lambda\mathcal{L}_{CT}$$
  4. Novel Evaluation Metrics: Beyond simple accuracy, they introduce Hit Ratio (HR@k), Mean Reciprocal Rank (MRR@k), and Prob@k to better measure the model's internal probabilistic state regarding factual knowledge.

Datasets

The researchers evaluated PretrainRL using three primary benchmarks that focus on long-tail factual knowledge:

  • PopQA: 14,000 questions based on Wikidata triples, specifically designed to test rare knowledge.
  • Wikidata-knowledge infusion: 28,000 questions across six common relationship types (e.g., capital, industry, color).
  • EntityQuestions: A massive dataset containing over 1.75 million questions used to test the framework's scalability.

Key Insights and Ideas

  • The "Memory Room" Hypothesis: The authors suggest that LLMs have a finite capacity for parametric knowledge. High-probability falsehoods "squeeze" the memory room available for truths. By actively down-weighting these falsehoods, they create the necessary "room" for the model to effectively learn rare truths.
  • Plasticity Matters: The paper argues that pretraining is the ideal time for this intervention because the model is still "plastic." Post-trained models are more "rigid," making it harder to inject new knowledge without causing catastrophic forgetting.
  • Intrinsic Debiasing: Rather than relying on external popularity metrics to find biases, PretrainRL uses the model's own internal probability distribution (via beam search) to identify what it thinks is true but isn't.

Key Results

PretrainRL demonstrated substantial improvements over standard pretraining and state-of-the-art baselines:

  • Massive Accuracy Gains: On the PopQA benchmark, a Qwen3-4B model trained with PretrainRL achieved 37.69% accuracy, compared to just 13.05% for the base model.
  • Outperforming Giants: PretrainRL-enhanced models (4B and 8B parameters) outperformed much larger closed-source models like GPT-4o and Claude-3-Sonnet on long-tail factual datasets.
  • Scalability: The method showed consistent gains as model size increased, with the 14B parameter model reaching 63.44% accuracy on PopQA.
  • Preserving General Intelligence: Unlike Supervised Fine-Tuning (SFT), which often causes performance to tank on general benchmarks, PretrainRL maintained or even slightly improved scores on MMLU, GSM8K, and CEval.

Limitations and Future Work

  • Sampling Efficiency: The current negative sampling strategy aggregates head knowledge by question category to save computation. The authors acknowledge that if a dataset lacks clear categorical distinctions, this strategy might need to be replaced with more computationally intensive methods like Reinforcement Learning with Verifiable Rewards (RLVR).
  • Knowledge Graph Dependency: The method currently relies on structured (subject, predicate, object) triples to generate training pairs. Extending this to unstructured text remains a challenge.
  • Future Directions: The authors aim to explore applying this "pretrain-and-align" approach to even larger scales and more complex reasoning tasks beyond simple factual retrieval.

Summary updated

BibTeX
@inproceedings{liu2026pretrainrl,
  author = {Langming Liu and Kangtao Lv and Haibin Chen and Weidong Zhang and Yejing Wang and Shilei Liu and Xin Tong and Yujin Yuan and Yongwei Wang and Wenbo Su and Bo Zheng},
  title = {{PretrainRL: Alleviating Factuality Hallucination of Large Language Models at the Beginning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.910},
}
Figure