Reproduce “Measuring and Improving Consistency in Pretrained Language Models” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Yanai Elazar, Nora Kassner, Shauli Ravfogel, Abhilasha Ravichander, Eduard Hovy, Hinrich Schütze, Yoav Goldberg
The authors measure whether masked language models preserve factual answers across paraphrased prompts and train BERT-base with a consistency objective that aligns predicted distributions while retaining language modeling training. On 25 held-out relations, consistency rises from 58.2% to 64.0%, while accuracy and Consistent-Acc also improve; this is restricted to single-token candidate objects, and agreement does not establish truth.
Key insights
- Consistency is substantially lower than isolated factual retrieval: BERT-large reaches 61.1% consistency but only 29.5% Consistent-Accuracy.
- Predictions are more stable when paraphrases preserve lexical and syntactic form, while masked-position representations tend to cluster by prompt pattern rather than by the underlying subject.
- Consistency correlates with factual accuracy and improves when the model can retrieve the fact through at least one prompt, indicating that poor access to stored knowledge contributes to variation.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.