Abstract
Researchers have developed KILM (Knowledge Injection into Language Models), a method to bake factual knowledge directly into the weights of encoder-decoder models like BART. By using a novel "knowledge infilling" objective during continued pre-training, KILM enables models to outperform competitors 30 times their size on entity-heavy tasks while significantly reducing factual hallucinations.
Introduction
While Large Language Models (LLMs) are remarkably fluent, they frequently suffer from "hallucinations"—generating plausible-sounding but factually incorrect information. This issue stems from standard pre-training objectives that prioritize statistical word patterns over grounded entity knowledge. Current solutions like Retrieval-Augmented Generation (RAG) or architectural modifications introduce significant latency or complexity. KILM addresses this by injecting knowledge directly into the model's existing parameters without changing its architecture or adding extra variables.
The KILM Framework
The core of KILM is a continued pre-training process that forces the model to learn and reconstruct entity-specific facts. The process follows a three-step Knowledge Infilling objective:
- Knowledge Infilling: Wikipedia articles are processed to identify entities (e.g., "The Joker"). A special tag is inserted, followed by the entity's short Wikipedia description (e.g., "fictional character throughout the DC Universe").
- Knowledge Masking: The entire inserted description is replaced with a single
<mask>token. - Masked Knowledge Reconstruction: The model must reconstruct the full description using only the entity name and the surrounding context.
This objective is performed alongside original pre-training tasks to prevent catastrophic forgetting, ensuring the model retains its general reasoning and fluency while gaining specialized factual grounding. This allows the model to learn contextual grounding, differentiating between entities with similar names (e.g., "Titanic" the ship vs. the movie) based on surrounding text.
Experimental Results
KILM was evaluated across several benchmarks, including entity disambiguation, question answering (QA), and dialogue. The training utilized a processed Wikipedia dump, with a primary setting of 5.7M samples and an upscaled version using 7.85M samples.
Efficiency and Scale
One of the most significant findings is KILM's efficiency. A BART-large model (406M parameters) enhanced with KILM achieved an average F1 score of 78.9 on zero-shot entity disambiguation, rivaling the 13-billion-parameter CM3-large model (79.0). This demonstrates that targeted knowledge injection can compensate for massive differences in parameter count.
Question Answering and Hallucination Reduction
KILM significantly boosts performance in few-shot QA settings. On datasets like Natural Questions and Web Questions, KILM-enhanced models consistently outperformed base BART models by substantial margins as the number of shots increased.
In dialogue tasks using the Wizard of Wikipedia (WoW) dataset, human evaluators noted that KILM-enhanced models were significantly less prone to hallucinations, particularly in domains not seen during initial training. Furthermore, the model can be "probed" for its internal knowledge by providing an entity and an empty description tag, effectively acting as an internal factual dictionary. Crucially, KILM maintained performance on general language tasks like GLUE and text summarization, proving that knowledge injection does not degrade general fluency.
Conclusion and Future Work
KILM demonstrates that factual grounding can be achieved without external retrieval or architectural changes. While highly effective, the method currently shows some domain specificity—performing better on organizations than on individual people—and relies on static knowledge frozen at training time. Future research may explore more diverse knowledge sources beyond Wikipedia and the application of KILM to decoder-only architectures like GPT.
Summary updated