BERTnesia: Investigating the capture and forgetting of knowledge in BERT
Not on the map. Why?
Abstract (arXiv)
Probing complex language models has recently revealed several insights into linguistic and semantic patterns found in the learned representations. In this article, we probe BERT specifically to understand and measure the relational knowledge it captures in its parametric memory. While probing for linguistic understanding is commonly applied to all layers of BERT as well as fine-tuned models, this has not been done for factual knowledge. We utilize existing knowledge base completion tasks (LAMA) to probe every layer of pre-trained as well as fine-tuned BERT models(ranking, question answering, NER). Our findings show that knowledge is not just contained in BERT's final layers. Intermediate layers contribute a significant amount (17-60%) to the total knowledge found. Probing intermediate layers also reveals how different types of knowledge emerge at varying rates. When BERT is fine-tuned, relational knowledge is forgotten. The extent of forgetting is impacted by the fine-tuning objective and the training data. We found that ranking models forget the least and retain more knowledge in their final layer compared to masked language modeling and question-answering. However, masked language modeling performed the best at acquiring new knowledge from the training data. When it comes to learning facts, we found that capacity and fact density are key factors. We hope this initial work will spur further research into understanding the parametric memory of language models and the effect of training objectives on factual knowledge. The code to repeat the experiments is publicly available on GitHub.
Key facts. Cited by 40 papers in the map (data through 14 Oct 2026). Builds on 53 of its 82 references that are in the map. First posted on arXiv 5 Jun 2021.
Builds on
53 of 82 references.
References · 53
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2014Adam: A Method for Stochastic Optimizationcited by 37,240
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2017Axiomatic Attribution for Deep Networkscited by 3,384
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2019Language Models as Knowledge Bases?cited by 1,936
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
- 2019Generating Long Sequences with Sparse Transformerscited by 1,546
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
- 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
38 more
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,043
- 2019How Can We Know What Language Models Know?cited by 959
- 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 876
- 2020A Primer in BERTology: What we know about how BERT workscited by 815
- 2020How Much Knowledge Can You Pack Into the Parameters of a Language Model?cited by 719
- 2019Passage Re-ranking with BERTcited by 645
- 2021Knowledge Neurons in Pretrained Transformerscited by 601
- 2020KILT: a Benchmark for Knowledge Intensive Language Taskscited by 573
- 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 438
- 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 383
- 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 364
- 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 332
- 2020K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapterscited by 319
- 2019K-BERT: Enabling Language Representation with Knowledge Graphcited by 304
- 2019ERNIE: Enhanced Representation through Knowledge Integrationcited by 302
- 2019Revealing the Dark Secrets of BERTcited by 301
- 2019Knowledge Enhanced Contextual Word Representationscited by 296
- 2021Factual Probing Is [MASK]: Learning vs. Learning to Recallcited by 291
- 2018Analysis Methods in Neural Language Processing: A Surveycited by 277
- 2020On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselinescited by 255
- 2019Negated and Misprimed Probes for Pretrained Language Models: Birds Can Talk, But Cannot Flycited by 243
- 2021PAQ: 65 Million Probably-Asked Questions and What You Can Do With Themcited by 200
- 2019Assessing BERT's Syntactic Abilitiescited by 192
- 2019What Do Compressed Deep Neural Networks Forget?cited by 171
- 2020Pre-training Tasks for Embedding-based Large-scale Retrievalcited by 153
- 2018Dissecting Contextual Word Embeddings: Architecture and Representationcited by 146
- 2021Multilingual LAMA: Investigating Knowledge in Multilingual Pretrained Language Modelscited by 132
- 2019E-BERT: Efficient-Yet-Effective Entity Embeddings for BERTcited by 96
- 2019Inducing Relational Knowledge from BERTcited by 75
- 2019How Does BERT Answer Questions? A Layer-Wise Analysis of Transformer Representationscited by 63
- 2019Do Neural Language Representations Learn Physical Commonsense?cited by 62
- 2020PMI-Masking: Principled masking of correlated spanscited by 54
- 2016Joint Learning of the Embedding of Words and Entities for Named Entity Disambiguationcited by 48
- 2018Evaluating Compositionality in Sentence Embeddingscited by 35
- 2021Not All Memories are Created Equal: Learning to Forget by Expiringcited by 32
- 2021Explain and Predict, and then Predict Againcited by 29
- 2018Assessing Composition in Sentence Vector Representationscited by 26
- 2018EXS: Explainable Search Using Local Model Agnostic Interpretabilitycited by 18
50 most cited of 53 All 53 (JSON)
Built on by
Citing papers per year: 2021: 1; 2022: 7; 2023: 14; 2024: 6; 2025: 7; 2026: 5.
40 papers.
Sort:
By area:
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
- 2022A Review on Language Models as Knowledge Basescited by 157
- 2023Is This the Subspace You Are Looking for? An Interpretability Illusion for Subspace Activation Patchingcited by 80
- 2022Understanding Transformer Memorization Recall Through Idiomscited by 62
- 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinationscited by 38
- 2023Give Me the Facts! A Survey on Factual Knowledge Probing in Pre-trained Language Modelscited by 32
- 2024DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinationscited by 25
- 2023A Glitch in the Matrix? Locating and Detecting Language Model Grounding with Fakepediacited by 24
- 2023The Life Cycle of Knowledge in Big Language Models: A Surveycited by 23
- 2023Discovering Knowledge-Critical Subnetworks in Pretrained Language Modelscited by 16
28 more
- 2024Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neuronscited by 16
- 2022Parameter-Efficient Tuning Makes a Good Classification Headcited by 15
- 2023Why do universal adversarial attacks work on large language models?: Geometry might be the answercited by 14
- 2023Understanding Finetuning for Factual Knowledge Extraction from Language Modelscited by 13
- 2025Do Large Language Models Know How Much They Know?cited by 11
- 2022Beyond Distributional Hypothesis: Let Language Models Learn Meaning-Text Correspondencecited by 10
- 2022Depth-Wise Attention (DWAtt): A Layer Fusion Method for Data-Efficient Classificationcited by 10
- 2023The Cost of Compression: Investigating the Impact of Compression on Parametric Knowledge in Language Modelscited by 9
- 2022Finding Structural Knowledge in Multimodal-BERTcited by 7
- 2024Defining Knowledge: Bridging Epistemology and Large Language Modelscited by 7
- 2023Unsupervised Improvement of Factual Knowledge in Language Modelscited by 6
- 2023Can Large Language Models Change User Preference Adversarially?cited by 5
- 2023Improving Language Models Meaning Understanding and Consistency by Learning Conceptual Roles from Dictionarycited by 4
- 2023Decouple knowledge from parameters for plug-and-play language modelingcited by 3
- 2025Superscopes: Amplifying Internal Feature Representations for Language Model Interpretationcited by 3
- 2025Efficient Knowledge Probing of Large Language Models by Adapting Pre-trained Embeddingscited by 3
- 2025LoKI: Low-damage Knowledge Implanting of Large Language Modelscited by 2
- 2021Consistency and Coherence from Points of Contextual Similaritycited by 1
- 2024Mitigating Language-Level Performance Disparity in mPLMs via Teacher Language Selection and Cross-lingual Self-Distillationcited by 1
- 2025Deep Learning with Pretrained 'Internal World' Layers: A Gemma 3-Based Modular Architecture for Wildfire Predictioncited by 1
- 2025STARE at the Structure: Steering ICL Exemplar Selection with Structural Alignmentcited by 1
- 2026Improving LLM Final Representations with Inter-Layer Geometrycited by 1
- 2026Matching Tasks to Objectives: Fine-Tuning and Prompt-Tuning Strategies for Encoder-Decoder Pre-trained Language Modelscited by 1
- 2023The Effect of Masking Strategies on Knowledge Retention by Language Modelscited by 0
- 2025Discriminative protein sequence modelling with Latent Space Diffusioncited by 0
- 2026Listen to the Layers: Mitigating Hallucinations with Inter-Layer Disagreementcited by 0
- 2026FocusDiT: Masking Queries in Diffusion Transformers for Fine-grained Image Generationcited by 0
- 2026Stochastic Meta-Unlearning: Bridging Language Backbone and Multimodal Unlearningcited by 0
- 2026Stochastic Meta-Unlearning: Bridging Language Backbone and Multimodal Unlearning21 Jul 2026
- 2026Matching Tasks to Objectives: Fine-Tuning and Prompt-Tuning Strategies for Encoder-Decoder Pre-trained Language Models23 Jun 2026
- 2026FocusDiT: Masking Queries in Diffusion Transformers for Fine-grained Image Generation1 Jun 2026
- 2026Improving LLM Final Representations with Inter-Layer Geometry24 Mar 2026
- 2026Listen to the Layers: Mitigating Hallucinations with Inter-Layer Disagreement10 Feb 2026
- 2025STARE at the Structure: Steering ICL Exemplar Selection with Structural Alignment28 Aug 2025
- 2025Efficient Knowledge Probing of Large Language Models by Adapting Pre-trained Embeddings8 Aug 2025
- 2025LoKI: Low-damage Knowledge Implanting of Large Language Models28 May 2025
- 2025Deep Learning with Pretrained 'Internal World' Layers: A Gemma 3-Based Modular Architecture for Wildfire Prediction20 Apr 2025
- 2025Discriminative protein sequence modelling with Latent Space Diffusion24 Mar 2025
- 2025Superscopes: Amplifying Internal Feature Representations for Language Model Interpretation3 Mar 2025
- 2025Do Large Language Models Know How Much They Know?26 Feb 2025
28 more
- 2024DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations24 Oct 2024
- 2024Defining Knowledge: Bridging Epistemology and Large Language Models3 Oct 2024
- 2024Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neurons6 Aug 2024
- 2024Mitigating Language-Level Performance Disparity in mPLMs via Teacher Language Selection and Cross-lingual Self-Distillation12 Apr 2024
- 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinations27 Mar 2024
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models11 Jan 2024
- 2023A Glitch in the Matrix? Locating and Detecting Language Model Grounding with Fakepedia4 Dec 2023
- 2023The Cost of Compression: Investigating the Impact of Compression on Parametric Knowledge in Language Models1 Dec 2023
- 2023Is This the Subspace You Are Looking for? An Interpretability Illusion for Subspace Activation Patching28 Nov 2023
- 2023Give Me the Facts! A Survey on Factual Knowledge Probing in Pre-trained Language Models25 Oct 2023
- 2023Improving Language Models Meaning Understanding and Consistency by Learning Conceptual Roles from Dictionary24 Oct 2023
- 2023Discovering Knowledge-Critical Subnetworks in Pretrained Language Models4 Oct 2023
- 2023Why do universal adversarial attacks work on large language models?: Geometry might be the answer1 Sep 2023
- 2023The Effect of Masking Strategies on Knowledge Retention by Language Models12 Jun 2023
- 2023Decouple knowledge from parameters for plug-and-play language modeling19 May 2023
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Models28 Apr 2023
- 2023Unsupervised Improvement of Factual Knowledge in Language Models4 Apr 2023
- 2023The Life Cycle of Knowledge in Big Language Models: A Survey14 Mar 2023
- 2023Understanding Finetuning for Factual Knowledge Extraction from Language Models26 Jan 2023
- 2023Can Large Language Models Change User Preference Adversarially?5 Jan 2023
- 2022Parameter-Efficient Tuning Makes a Good Classification Head30 Oct 2022
- 2022Understanding Transformer Memorization Recall Through Idioms7 Oct 2022
- 2022Depth-Wise Attention (DWAtt): A Layer Fusion Method for Data-Efficient Classification30 Sep 2022
- 2022Beyond Distributional Hypothesis: Let Language Models Learn Meaning-Text Correspondence8 May 2022
- 2022A Review on Language Models as Knowledge Bases12 Apr 2022
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space28 Mar 2022
- 2022Finding Structural Knowledge in Multimodal-BERT17 Mar 2022
- 2021Consistency and Coherence from Points of Contextual Similarity22 Dec 2021
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
- 2023Is This the Subspace You Are Looking for? An Interpretability Illusion for Subspace Activation Patchingcited by 80
- 2025Superscopes: Amplifying Internal Feature Representations for Language Model Interpretationcited by 3
- 2025Superscopes: Amplifying Internal Feature Representations for Language Model Interpretation3 Mar 2025
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models11 Jan 2024
- 2023Is This the Subspace You Are Looking for? An Interpretability Illusion for Subspace Activation Patching28 Nov 2023
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
- 2022A Review on Language Models as Knowledge Basescited by 157
- 2022Understanding Transformer Memorization Recall Through Idiomscited by 62
- 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinationscited by 38
- 2023Give Me the Facts! A Survey on Factual Knowledge Probing in Pre-trained Language Modelscited by 32
- 2024DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinationscited by 25
- 2023A Glitch in the Matrix? Locating and Detecting Language Model Grounding with Fakepediacited by 24
- 2023The Life Cycle of Knowledge in Big Language Models: A Surveycited by 23
- 2023Discovering Knowledge-Critical Subnetworks in Pretrained Language Modelscited by 16
- 2024Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neuronscited by 16
- 2022Parameter-Efficient Tuning Makes a Good Classification Headcited by 15
12 most cited of 32 All 32 (JSON)
- 2026Matching Tasks to Objectives: Fine-Tuning and Prompt-Tuning Strategies for Encoder-Decoder Pre-trained Language Models23 Jun 2026
- 2026Improving LLM Final Representations with Inter-Layer Geometry24 Mar 2026
- 2026Listen to the Layers: Mitigating Hallucinations with Inter-Layer Disagreement10 Feb 2026
- 2025STARE at the Structure: Steering ICL Exemplar Selection with Structural Alignment28 Aug 2025
- 2025Efficient Knowledge Probing of Large Language Models by Adapting Pre-trained Embeddings8 Aug 2025
- 2025LoKI: Low-damage Knowledge Implanting of Large Language Models28 May 2025
- 2025Deep Learning with Pretrained 'Internal World' Layers: A Gemma 3-Based Modular Architecture for Wildfire Prediction20 Apr 2025
- 2025Do Large Language Models Know How Much They Know?26 Feb 2025
- 2024DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinations24 Oct 2024
- 2024Defining Knowledge: Bridging Epistemology and Large Language Models3 Oct 2024
- 2024Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neurons6 Aug 2024
- 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinations27 Mar 2024
12 newest of 32 All 32 (JSON)