mlsanityData to 14 Oct 2026

BERTnesia: Investigating the capture and forgetting of knowledge in BERT

arXiv 2106.02902 ↗First posted 5 Jun 2021cs.CLcited by 40

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  3. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
  4. 2017Axiomatic Attribution for Deep Networkscited by 3,384
  5. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
  6. 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
  7. 2019Language Models as Knowledge Bases?cited by 1,936
  8. 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
  9. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
  10. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  11. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  12. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
38 more
  1. 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,043
  2. 2019How Can We Know What Language Models Know?cited by 959
  3. 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 876
  4. 2020A Primer in BERTology: What we know about how BERT workscited by 815
  5. 2020How Much Knowledge Can You Pack Into the Parameters of a Language Model?cited by 719
  6. 2019Passage Re-ranking with BERTcited by 645
  7. 2021Knowledge Neurons in Pretrained Transformerscited by 601
  8. 2020KILT: a Benchmark for Knowledge Intensive Language Taskscited by 573
  9. 2019What do you learn from context? Probing for sentence structure in contextualized word representationscited by 438
  10. 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 383
  11. 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 364
  12. 2020DeeBERT: Dynamic Early Exiting for Accelerating BERT Inferencecited by 332
  13. 2020K-Adapter: Infusing Knowledge into Pre-Trained Models with Adapterscited by 319
  14. 2019K-BERT: Enabling Language Representation with Knowledge Graphcited by 304
  15. 2019ERNIE: Enhanced Representation through Knowledge Integrationcited by 302
  16. 2019Revealing the Dark Secrets of BERTcited by 301
  17. 2019Knowledge Enhanced Contextual Word Representationscited by 296
  18. 2021Factual Probing Is [MASK]: Learning vs. Learning to Recallcited by 291
  19. 2018Analysis Methods in Neural Language Processing: A Surveycited by 277
  20. 2020On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselinescited by 255
  21. 2019Negated and Misprimed Probes for Pretrained Language Models: Birds Can Talk, But Cannot Flycited by 243
  22. 2021PAQ: 65 Million Probably-Asked Questions and What You Can Do With Themcited by 200
  23. 2019Assessing BERT's Syntactic Abilitiescited by 192
  24. 2019What Do Compressed Deep Neural Networks Forget?cited by 171
  25. 2020Pre-training Tasks for Embedding-based Large-scale Retrievalcited by 153
  26. 2018Dissecting Contextual Word Embeddings: Architecture and Representationcited by 146
  27. 2021Multilingual LAMA: Investigating Knowledge in Multilingual Pretrained Language Modelscited by 132
  28. 2019E-BERT: Efficient-Yet-Effective Entity Embeddings for BERTcited by 96
  29. 2019Inducing Relational Knowledge from BERTcited by 75
  30. 2019How Does BERT Answer Questions? A Layer-Wise Analysis of Transformer Representationscited by 63
  31. 2019Do Neural Language Representations Learn Physical Commonsense?cited by 62
  32. 2020PMI-Masking: Principled masking of correlated spanscited by 54
  33. 2016Joint Learning of the Embedding of Words and Entities for Named Entity Disambiguationcited by 48
  34. 2018Evaluating Compositionality in Sentence Embeddingscited by 35
  35. 2021Not All Memories are Created Equal: Learning to Forget by Expiringcited by 32
  36. 2021Explain and Predict, and then Predict Againcited by 29
  37. 2018Assessing Composition in Sentence Vector Representationscited by 26
  38. 2018EXS: Explainable Search Using Local Model Agnostic Interpretabilitycited by 18

50 most cited of 53 All 53 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2021: 1; 2022: 7; 2023: 14; 2024: 6; 2025: 7; 2026: 5.

40 papers.

Sort:

By area:

  1. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
  2. 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
  3. 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
  4. 2022A Review on Language Models as Knowledge Basescited by 157
  5. 2023Is This the Subspace You Are Looking for? An Interpretability Illusion for Subspace Activation Patchingcited by 80
  6. 2022Understanding Transformer Memorization Recall Through Idiomscited by 62
  7. 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinationscited by 38
  8. 2023Give Me the Facts! A Survey on Factual Knowledge Probing in Pre-trained Language Modelscited by 32
  9. 2024DeCoRe: Decoding by Contrasting Retrieval Heads to Mitigate Hallucinationscited by 25
  10. 2023A Glitch in the Matrix? Locating and Detecting Language Model Grounding with Fakepediacited by 24
  11. 2023The Life Cycle of Knowledge in Big Language Models: A Surveycited by 23
  12. 2023Discovering Knowledge-Critical Subnetworks in Pretrained Language Modelscited by 16
28 more
  1. 2024Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neuronscited by 16
  2. 2022Parameter-Efficient Tuning Makes a Good Classification Headcited by 15
  3. 2023Why do universal adversarial attacks work on large language models?: Geometry might be the answercited by 14
  4. 2023Understanding Finetuning for Factual Knowledge Extraction from Language Modelscited by 13
  5. 2025Do Large Language Models Know How Much They Know?cited by 11
  6. 2022Beyond Distributional Hypothesis: Let Language Models Learn Meaning-Text Correspondencecited by 10
  7. 2022Depth-Wise Attention (DWAtt): A Layer Fusion Method for Data-Efficient Classificationcited by 10
  8. 2023The Cost of Compression: Investigating the Impact of Compression on Parametric Knowledge in Language Modelscited by 9
  9. 2022Finding Structural Knowledge in Multimodal-BERTcited by 7
  10. 2024Defining Knowledge: Bridging Epistemology and Large Language Modelscited by 7
  11. 2023Unsupervised Improvement of Factual Knowledge in Language Modelscited by 6
  12. 2023Can Large Language Models Change User Preference Adversarially?cited by 5
  13. 2023Improving Language Models Meaning Understanding and Consistency by Learning Conceptual Roles from Dictionarycited by 4
  14. 2023Decouple knowledge from parameters for plug-and-play language modelingcited by 3
  15. 2025Superscopes: Amplifying Internal Feature Representations for Language Model Interpretationcited by 3
  16. 2025Efficient Knowledge Probing of Large Language Models by Adapting Pre-trained Embeddingscited by 3
  17. 2025LoKI: Low-damage Knowledge Implanting of Large Language Modelscited by 2
  18. 2021Consistency and Coherence from Points of Contextual Similaritycited by 1
  19. 2024Mitigating Language-Level Performance Disparity in mPLMs via Teacher Language Selection and Cross-lingual Self-Distillationcited by 1
  20. 2025Deep Learning with Pretrained 'Internal World' Layers: A Gemma 3-Based Modular Architecture for Wildfire Predictioncited by 1
  21. 2025STARE at the Structure: Steering ICL Exemplar Selection with Structural Alignmentcited by 1
  22. 2026Improving LLM Final Representations with Inter-Layer Geometrycited by 1
  23. 2026Matching Tasks to Objectives: Fine-Tuning and Prompt-Tuning Strategies for Encoder-Decoder Pre-trained Language Modelscited by 1
  24. 2023The Effect of Masking Strategies on Knowledge Retention by Language Modelscited by 0
  25. 2025Discriminative protein sequence modelling with Latent Space Diffusioncited by 0
  26. 2026Listen to the Layers: Mitigating Hallucinations with Inter-Layer Disagreementcited by 0
  27. 2026FocusDiT: Masking Queries in Diffusion Transformers for Fine-grained Image Generationcited by 0
  28. 2026Stochastic Meta-Unlearning: Bridging Language Backbone and Multimodal Unlearningcited by 0