Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Bases

Boxi Cao, Hongyu Lin, Xianpei Han, Le Sun, Lingyong Yan, Meng Liao, Tong Xue, Jin Xu

Abstract

Are Large Language Models (LLMs) actually reliable knowledge bases, or are they just world-class guessers? This paper reveals that much of their perceived "knowledge" is actually a result of biased prompts, entity type hints, and "answer leakage" from provided contexts, rather than true internal factual retrieval. Through the introduction of the WIKI-UNI dataset and novel analytical techniques, the authors demonstrate that models often rely on structural cues and dataset artifacts to "game" benchmarks like LAMA.

Introduction: The Knowledge Base Illusion

Since the introduction of the LAMA (Language Model Analysis) benchmark, researchers have explored the potential for pre-trained models like BERT to serve as "unsupervised" knowledge bases. By querying a model with a cloze-style prompt such as "Steve Jobs was born in [MASK]," it appeared possible to extract facts directly from the model's parameters.

However, this study questions the underlying cause of these successes. Is the model truly retrieving the fact that Jobs was born in California, or is it simply identifying that "was born in" typically precedes a city name, and "California" is a high-frequency answer in the training corpus? This research investigates whether MLMs are truly knowledgeable or merely making "educated guesses" based on structural cues.

Overview of the three paradigms and their underlying mechanisms: Prompt Bias, Type Guidance, and Answer Leakage.

Methodology and Datasets

The researchers evaluate three primary paradigms for knowledge extraction:

  1. Prompt-based retrieval: Standard "X [relation] [MASK]" queries.
  2. Case-based analogy: Providing few-shot examples before the query (e.g., "Obama was born in Hawaii. [SEP] Jobs was born in [MASK]").
  3. Context-based inference: Providing a text snippet that may contain or hint at the answer.

To isolate these effects, the authors introduced several techniques:

  • Prompt-only queries: Masking the subject (e.g., "[MASK] was born in [MASK]") to measure predictions based solely on the prompt string.
  • Type Induction Algorithm: Automatically determining the expected entity type for a relation using Wikidata's taxonomy.
  • Masked Context Experiments: Masking the answer within provided contexts to check for reconstruction from surrounding text ("cheating").

The study utilizes the standard LAMA benchmark and a newly created WIKI-UNI dataset. Unlike LAMA, which is skewed toward common "head" entities, WIKI-UNI features a uniform answer distribution, making it impossible to succeed by simply guessing popular entities.

Key Insights: The Mechanics of Guessing

The Prompt Bias Trap

Models exhibit extreme bias toward specific prompt wordings. The prediction distributions on the skewed LAMA dataset and the uniform WIKI-UNI dataset were highly correlated (Pearson > 0.8), indicating that models consistently guess "popular" answers regardless of the actual facts associated with the subject.

Type Guidance vs. Fact Retrieval

In case-based scenarios, providing examples acts primarily as a "type hint." While precision improved by approximately 6%, the "in-type rank"—the model's ability to distinguish between entities of the same category—showed that the gains were almost entirely due to better type recognition rather than improved factual memory.

Comparison of Overall Rank vs. In-type Rank improvements, showing that case-based examples primarily help with type recognition.

The Illusion of Contextual Intelligence

Contextual benefits are largely driven by "answer leakage." Performance increased by +29.30% when the answer was present in the text but actually decreased by -2.11% when the answer was absent. This suggests that context does not help the model "reason" toward a fact it already knows, but rather helps it locate the answer in the provided text.

Results and Conclusion

On the de-biased WIKI-UNI dataset, BERT-large's precision plummeted from 30.36% to 16.47%, suggesting nearly half of its recorded "knowledge" on LAMA was artifact-driven guessing.

The findings highlight the need for more robust, de-biased benchmarks to prevent models from gaming evaluations. Future work should focus on filtering "leaked" answers in RAG systems and leveraging "type guidance" insights for tasks like Named Entity Recognition (NER). While this study focused on MLMs, the methodologies provide a framework for investigating similar behaviors in modern generative models.

Summary updated

BibTeX
@inproceedings{cao2021knowledgeable,
  author = {Boxi Cao and Hongyu Lin and Xianpei Han and Le Sun and Lingyong Yan and Meng Liao and Tong Xue and Jin Xu},
  title = {{Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Bases}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-long.146},
}
Figure