Introduction
Pre-trained Language Models (PLMs) such as BERT, GPT-4, and Llama are trained on massive corpora, effectively acting as sponges for world knowledge. This has led researchers to explore their potential as "soft knowledge bases" (KBs). Unlike traditional, rigid databases that require complex query languages, PLMs can be queried using natural language. However, extracting this knowledge reliably—a process known as "probing"—is fraught with challenges. A model might correctly identify a fact in one context but fail when the prompt is slightly rephrased, raising questions about what these models truly "know" versus what they are simply guessing based on linguistic patterns.
This survey provides a comprehensive taxonomy for factual knowledge probing, categorizing the diverse methods and datasets that have emerged in recent years. By organizing these techniques into a unified framework, the authors offer a roadmap for transforming LLMs from black-box text generators into queryable, reliable sources of information.
A Unified Taxonomy for Knowledge Probing
The authors categorize probing methods across three primary dimensions: input adaptation, PLM adaptation, and output adaptation.
1. Input Adaptation
This dimension focuses on how the query is presented to the model.
- Non-optimized Probing: Uses simple "cloze" prompts (e.g., "Paris is the capital of [MASK]") or direct questions. While straightforward, these are highly sensitive to phrasing.
- Optimized Probing: Employs "prompt engineering" to find the most effective query. This includes mining (extracting high-quality phrasings from Wikipedia), direct optimization (using gradient descent to find "soft tokens" or vectors that trigger the correct answer, even if they are unreadable to humans), and generation (using a secondary LLM to rewrite and improve the prompt).
2. PLM Adaptation
Researchers must decide whether to probe the model in its original state or modify it for better extraction.
- Vanilla Probing: Testing the model exactly as it was after its initial pre-training.
- Adapted Probing: Modifying the model through supervised fine-tuning or "self-supervised re-wiring" to make its internal knowledge more accessible and easier to retrieve.
3. Output Adaptation
This involves refining how the model’s response is interpreted.
- Typed Querying: Restricting the model’s output to specific categories. For instance, if the answer must be a city, the model is prevented from guessing unrelated terms like "banana."
- Debiasing: Adjusting output probabilities to correct for the model's inherent biases, such as a tendency to favor common words or specific token positions.
The Landscape of Probing Datasets
The survey identifies 44 distinct datasets used for factual probing, which can be grouped into three categories:
- General Knowledge: The most prominent is LAMA (Language Model Analysis), based on Wikipedia facts. Others include TriviaQA and Natural Questions (NQ).
- Domain-Specific: Specialized datasets like MedQA and BioLAMA focus on medical and scientific knowledge.
- Specialized Probing: These test specific model behaviors, such as Negated LAMA (testing understanding of "is NOT") and CounterFact (testing the ability to learn counter-intuitive or updated facts).
Key Insights and Analysis
Through their survey, the authors highlight several critical findings regarding how PLMs store and recall facts:
- Architecture vs. Size: While larger models generally store more facts, the training objective is often more influential. Techniques like "Salient Span Masking"—forcing the model to predict named entities during pre-training—significantly boost knowledge retention more than simply increasing parameter counts.
- The Optimization Dilemma: There is an ongoing debate regarding whether optimized prompts truly "unlock" hidden knowledge or if they simply "leak" answers by overfitting to the test data.
- The Consistency Gap: Models often lack a deep "mental map" of facts. They frequently fail to maintain consistency when a prompt is negated or paraphrased, suggesting they rely heavily on surface-level lexical correlations.
- Knowledge Locality: Research indicates that factual knowledge is not distributed evenly. In GPT-like (causal) models, facts tend to reside in the middle layers, whereas in BERT-like (masked) models, they are often found in the upper layers.
Challenges and Future Directions
Despite the progress in probing, several hurdles remain. Current methods primarily count correct answers without considering training data frequency—distinguishing between a model "learning" a fact versus simply repeating a high-frequency string. Furthermore, many effective prompts are "soft tokens" (vectors) that are uninterpretable to humans, creating a need for methods that are both effective and readable.
Finally, the authors point to dynamic knowledge as a critical frontier. Because LLMs are frozen at the time of training, updating them with new information (e.g., a change in political leadership) without full retraining is a major challenge. "Knowledge editing" will be essential for the next generation of queryable language models.
Conclusion
Factual knowledge probing is essential for understanding the internal mechanics of PLMs. By moving toward standardized taxonomies and addressing issues of consistency and interpretability, the field can transition from simply observing what models say to understanding what they truly know. This survey serves as a foundational "cheat sheet" for researchers navigating this complex and rapidly evolving landscape.
Summary updated