Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language understanding and generation. However, they remain susceptible to "hallucinations"—the generation of factually incorrect or nonsensical information presented with high confidence. While Retrieval-Augmented Generation (RAG) has emerged as a popular mitigation strategy, it often introduces significant computational overhead and relies heavily on the quality of external text retrieval. Researchers from AIRI Moscow propose a novel alternative: treating structured knowledge from Knowledge Graphs (KGs) as a distinct modality, similar to how multi-modal models process images or audio.
Problem Statement
The "factual gap" in LLMs arises because pre-training captures information as statistical associations rather than structured, verifiable facts. Existing solutions like fine-tuning on factual data can lead to catastrophic forgetting, while RAG increases latency and consumes valuable context window space. This research investigates whether providing LLMs with a "factual anchor" in the form of KG embeddings can improve accuracy without compromising the model's general reasoning abilities.
Methodology
The proposed framework integrates Knowledge Graph embeddings directly into the LLM's latent space using a lightweight adapter. The architecture consists of three primary components:
- Text2Graph Mapper: Utilizing a RoBERTa-large backbone, this module identifies entities within the input text and predicts their corresponding TransE KG embeddings.
- Linear Adapter: A simple linear layer projects these KG embeddings into the LLM's native embedding space, acting as a bridge between the structured knowledge and the language model.
- Modality Integration: The input sequence is augmented with these projected embeddings, delineated by special
<GRAPH_START>and<GRAPH_END>tokens.
A key advantage of this approach is that the base LLM remains frozen. Only the mapper and the small adapter require training, preserving the model's original capabilities while grounding its outputs in structured facts.
Datasets and Training
To facilitate the training of the Text2Graph mapper, the authors introduced WikiEntities, a large-scale dataset derived from Wikipedia.
WikiEntities contains over 3.2 million text samples, each annotated with Wikidata entity IDs and corresponding high-dimensional embeddings from PyTorch-BigGraph. This resource allows the mapper to learn the relationship between natural language mentions and their formal representations in a knowledge graph.
Experimental Results
The methodology was evaluated using popular open-source models, including Mistral-7B, LLaMA 2-7B, and LLaMA 3-8B. Performance was measured across several benchmarks:
- Hallucination Mitigation: On the HaluEval benchmark, LLaMA 2-7B demonstrated a 10% improvement in accuracy for Question Answering and Dialogue tasks.
- Fact Verification: Mistral-7B showed a significant performance gain on the FEVER dataset, with accuracy increasing from 0.665 to 0.743.
- General Intelligence Preservation: Crucially, the models maintained their performance on general benchmarks such as MMLU, GSM8k, and ARC, indicating that the additional modality does not interfere with core reasoning skills.
Conclusion and Future Work
By treating Knowledge Graphs as a sensory modality, this research provides a path toward more factually grounded LLMs with minimal inference overhead. While the current system is limited by the accuracy of the Text2Graph mapper and the static nature of pre-computed embeddings, it represents a significant step toward efficient, structured grounding. Future research may explore more complex adapter architectures, such as Q-Formers, to further enhance the fusion of textual and graph-based information.
Summary updated