Abstract
Advancements in language models (LMs) have sparked interest in exploring their potential as knowledge bases (KBs) due to their high capability for storing huge amounts of factual knowledge and semantic understanding. However, existing studies face challenges in quantifying the extent of large-scale knowledge packed into LMs and lack systematic studies on LMs’ structured reasoning capabilities over the infused knowledge. Addressing these gaps, our research investigates whether LMs can effectively act as large-scale KBs after training over an expansive set of world knowledge triplets via addressing the following three crucial questions: (1) How do LMs of different sizes perform at storing world knowledge of different frequencies in a large-scale KB? (2) How flexible are these LMs in recalling the stored knowledge when prompted with natural language queries? (3) After training on the abundant world knowledge, can LMs additionally gain the ability to reason over such information to infer new facts? Our findings indicate that while medium-scaled LMs hold promise as world knowledge bases capable of storing and responding with flexibility, enhancements in their reasoning capabilities are necessary to fully realize their potential.
Introduction
While Large Language Models (LLMs) are often treated as encyclopedic resources, they function as "leaky" repositories. Knowledge acquired from unstructured web text is frequently imbalanced, noisy, and biased toward popular topics. In contrast, traditional Knowledge Bases (KBs) like Wikidata offer precision and structure but lack the flexibility of natural language interfaces. This research explores the feasibility of "packing" 46 million structured facts directly into LLMs to create a "Functional KB."
The study investigates three core dimensions:
- Capacity: The volume of facts different model architectures (T5 and LLaMA-2) can retain.
- Flexibility: The ability to retrieve stored knowledge via natural language queries rather than rigid triplet formats.
- Reasoning: The capacity to infer new facts from stored information, such as inverse or compositional relationships.
Methodology
The researchers infused knowledge into models using a "triplet-to-text" approach, where facts are represented as: Subject: [S] Relation: [R] Object: [O]. To handle the scale of 46 million Wikidata triplets, an Importance Sampling algorithm was introduced. This method prioritizes "hard-to-memorize" facts—those with high prediction loss—rather than uniform sampling. This approach significantly accelerated convergence, as shown in the training performance metrics.
Experimental Results
Storage Capacity and Efficiency
The study found a "sweet spot" at the 7B parameter scale. LLaMA-2-7b proved remarkably efficient at storing facts, with the 13B variant offering only marginal improvements. LLaMA-2-13b achieved a peak F1 score of 81.64% on fixed-form recall, significantly outperforming the smaller T5-large (63.07%). Notably, popularity bias persists; models find popular entities easier to remember than long-tail ones, suggesting pre-training leaves a permanent imprint.
Retrieval Flexibility
Knowledge-infused models demonstrated high flexibility. After minimal fine-tuning on natural language questions (using the PopQA dataset), these models significantly outperformed their vanilla counterparts. This indicates that structured triplet training successfully translates into conversational knowledge retrieval without causing "catastrophic forgetting" of general linguistic abilities.
The Reasoning Bottleneck
A critical finding was the "Inversion Curse": models excel at forward recall (Subject → Object) but fail at inverse recall (Object → Subject) unless explicitly trained on the inverse. For example, knowing "Author X wrote Book Y" does not guarantee the model can identify the author of "Book Y." While some gains were seen in compositional reasoning, the ability to logically "connect the dots" remains a significant hurdle for LLMs acting as true KBs.
Conclusion
LLMs show great promise as flexible, high-capacity data stores for structured world knowledge. However, they currently lack the inherent logical reasoning required to act as fully autonomous Knowledge Bases. Future research should focus on architectural improvements that foster bidirectional understanding and logical inference rather than simple string memorization.
Summary updated