Introduction
Large Language Models (LMs) are increasingly treated as repositories of factual knowledge. However, extracting this knowledge reliably remains a significant challenge. The standard approach, known as factual probing, involves presenting the model with a cloze-style prompt, such as "Barack Obama was born in [MASK]." While seemingly straightforward, this process is highly sensitive to the specific phrasing of the prompt. Minor variations in wording can lead to wildly inconsistent and often incorrect answers, revealing that models frequently rely on superficial training shortcuts rather than robust factual recall.
Identifying the Biases in Factual Probing
The researchers identify two primary forms of bias that undermine the consistency of factual extraction:
- Object Likelihood Bias: This occurs when the model predicts common answers based solely on the prompt template, ignoring the subject. For instance, if a template asks for an "official language," the model might default to "English" because it is a frequent object in the training corpus, regardless of the country or region mentioned.
- Template Prior Bias: LMs are exposed to certain linguistic patterns more frequently during pre-training. Consequently, they perform well on familiar "seen" prompts but fail on semantically identical but "unseen" paraphrases.
The UniArk Framework
To address these issues, the authors introduced UniArk, a parameter-free unifying framework designed to align the model's tuning objective with its original pre-training objective through a probabilistic lens. UniArk employs three core strategies:
- Adapter-Tuning: Instead of full-parameter fine-tuning, which can lead to catastrophic forgetting of pre-trained knowledge, UniArk uses lightweight adapters. These modules are inserted into the transformer layers, allowing for efficient debiasing while keeping the base model's knowledge intact.
- Object Likelihood Mitigation: To prevent the model from "guessing" based on the template, UniArk introduces a Max Entropy Loss. This objective forces the model to produce a uniform (uncertain) output distribution when the subject of the prompt is masked. If the model does not know the subject, it should not favor any specific object.
- Template Prior Mitigation: The framework utilizes a self-data augmentation strategy. By prepending prefixes like "It is true that..." and averaging predictions across these variations, UniArk "smooths out" the model's idiosyncratic preferences for specific verbalizations, leading to more stable outputs across paraphrases.
ParaTrex: A New Benchmark for Consistency
A major contribution of this work is the release of ParaTrex, a large-scale dataset of paraphrased prompts. Generated using GPT-3.5, ParaTrex contains 1,526 prompt templates across 40 relations. It is significantly more diverse—both lexically and syntactically—than previous benchmarks like ParaRel. This dataset provides a rigorous environment for testing whether a model has truly learned a fact or is simply reacting to a specific prompt structure.
Experimental Results
UniArk achieved state-of-the-art results across multiple metrics, demonstrating that debiasing is essential for out-of-domain (OOD) generalization. By removing reliance on prompt shortcuts, the model is forced to utilize the factual knowledge stored in its parameters.
Key findings from the experiments include:
- Enhanced Accuracy: On BERT-Large, UniArk improved the OOD F1 score to 27.99, compared to 24.69 for standard adapter-tuning.
- Bias Reduction: The "Counterfactual Hitting Rate" (CT_hit1), which measures how often a model guesses correctly without a subject, dropped to near-zero (0.04% for BERT-Large). This indicates that the model has effectively stopped relying on template-based shortcuts.
- Superior Consistency: UniArk showed a significant jump in consistency on the ParaTrex dataset, outperforming previous methods like MeCoD by ensuring the model provides the same answer across diverse paraphrases.
Conclusion and Future Work
UniArk demonstrates that addressing inherent training biases is a prerequisite for reliable factual knowledge extraction. While the framework shows remarkable success in encoder-only models like BERT and RoBERTa, the authors note that future research is needed to adapt these techniques for decoder-only models (e.g., GPT-4, Llama) that utilize next-token prediction. Additionally, exploring more sophisticated weighting schemes for template averaging could further refine the model's consistency in handling complex human language.
Summary updated