Introduction
Traditional Knowledge Bases (KBs) like Wikidata or ConceptNet are foundational to modern NLP, yet they are notoriously difficult to build and maintain. The process typically involves complex pipelines—entity extraction, coreference resolution, and relation extraction—that require extensive human-annotated data and are susceptible to error propagation.
In this study, the authors explore a radical alternative: treating large, pretrained language models (LMs) as "unsupervised" knowledge bases. Since models like BERT are trained on massive corpora such as Wikipedia, they may implicitly store factual knowledge within their parameters. By querying these models using natural language "cloze" statements (e.g., "Dante was born in [MASK]"), we can potentially access a flexible, schema-free knowledge source without the need for manual supervision.
The LAMA Probe
To evaluate this hypothesis, the researchers developed the LAMA (LAnguage Model Analysis) probe, a benchmark designed to test the factual and commonsense knowledge of "off-the-shelf" LMs.
The probe converts factual triples (Subject, Relation, Object) into natural language templates. For instance, the triple (Dante, born-in, Florence) is transformed into the prompt: "Dante was born in [MASK]." The model's performance is measured by Precision at 1 (P@1)—the frequency with which the correct answer is the model's top-ranked prediction—across a vocabulary of approximately 21,000 tokens.
The benchmark utilizes several data sources:
- Google-RE & T-REx: Subsets of Wikidata triples aligned to Wikipedia text.
- ConceptNet: Commonsense relations (e.g., "A bird has [MASK]").
- SQuAD: Questions from the Stanford Question Answering Dataset converted into cloze statements.
Experimental Results
The evaluation compared several state-of-the-art models, including BERT (Base and Large), ELMo, Transformer-XL, and a convolutional model (fairseq-fconv), against traditional Relation Extraction (RE) systems.
The results demonstrate that BERT-large captures relational knowledge comparable to supervised systems. On the Google-RE dataset, BERT-large achieved a 10.5% P@1, outperforming the best relation extraction baseline (7.6%). On the larger T-REx dataset, it reached 32.3% P@1, nearly matching a supervised RE system equipped with an "oracle" entity linker (33.8%). Even on open-domain QA via SQuAD, BERT-large reached 17.4% P@1 and 57.1% P@10, a remarkable feat for a model never explicitly trained for question answering.
Insights and Limitations
The study highlights that BERT acts as a "knowledge magnet," capturing information without task-specific fine-tuning. This approach offers schema-free flexibility; rather than defining rigid relations in a database, users can query the model in plain English.
However, several challenges remain:
- Sensitivity to Phrasing: The choice of cloze template significantly impacts performance, suggesting that current results may only represent a "lower bound" of the model's knowledge.
- Structural Constraints: LMs currently struggle with N-to-M relations (where one subject has multiple valid objects) and are limited by a single-token answer constraint in this study.
- Hallucination: Models may provide confident but incorrect answers, necessitating future work on uncertainty estimation.
In conclusion, as language models continue to scale, they represent a promising, low-cost alternative to manually-curated knowledge bases, provided that the challenges of prompt engineering and multi-token decoding are addressed.
Summary updated