Abstract
State-of-the-art pre-trained language models have been shown to memorise facts and perform well with limited amounts of training data. To gain a better understanding of how these models learn, we study their generalisation and memorisation capabilities in noisy and low-resource scenarios. We find that the training of these models is almost unaffected by label noise and that it is possible to reach near-optimal results even on extremely noisy datasets. However, our experiments also show that they mainly learn from high-frequency patterns and largely fail when tested on low-resource tasks such as few-shot learning and rare entity recognition. To mitigate such limitations, we propose an extension based on prototypical networks that improves performance in low-resource named entity recognition tasks.
Introduction
While pre-trained language models (PLMs) like BERT have revolutionized Natural Language Processing, the underlying mechanics of their learning dynamics—specifically the balance between generalisation (learning broad patterns) and memorisation (learning specific instances)—remain poorly understood. This paper investigates how BERT handles adverse conditions such as label noise and data scarcity, which are common in real-world applications. We specifically address why models often fail on "long-tail" or rare entities and identify the critical thresholds required for effective learning.
Methodology
To probe these dynamics, we systematically corrupted standard Named Entity Recognition (NER) datasets with varying levels of label noise (up to 50%) and restricted the number of training instances for specific classes. The study utilized three primary benchmarks:
- CoNLL03: General NER (names, locations, etc.).
- JNLPBA: Technical molecular biology entities (DNA, proteins).
- WNUT17: Rare and emerging entities.
ProtoBERT
To address the identified weaknesses in low-resource settings, we introduced ProtoBERT. Unlike standard BERT, which utilizes a linear layer for token classification, ProtoBERT maps tokens into an embedding space and calculates a "centroid" (average point) for each class. Classification is then determined by the Euclidean distance to these centroids, a technique adapted from Prototypical Networks for few-shot learning.
The Three Phases of Learning
Our analysis reveals that BERT fine-tuning follows a distinct three-phase trajectory when exposed to noisy data:
- Fitting: The model rapidly identifies and learns general linguistic patterns.
- Settling: A stable plateau where performance is optimal. During this phase, the model effectively acts as a "noise filter," treating incorrect labels as outliers and ignoring them.
- Memorisation: Eventually, the model begins to memorise the noisy, incorrect labels, leading to a decline in validation performance.
The Critical Threshold in Low-Resource Learning
One of the most significant findings is that BERT does not learn in a linear fashion regarding data volume. Instead, it exhibits a "step-function" behavior. We observed a critical threshold: the model often requires at least 25 examples of a specific class to begin predicting it at all, and approximately 100 examples to reach reasonable accuracy levels.
Key Results and Discussion
- Noise Resilience: BERT is remarkably robust; adding 30% noise to CoNLL03 resulted in less than a 1% drop in validation performance, provided training is stopped during the "Settling" phase.
- ProtoBERT Performance: In extreme few-shot scenarios (e.g., 15 training sentences), ProtoBERT outperformed standard BERT by up to 40 F1 points. On the WNUT17 dataset, ProtoBERT achieved an F1 of 48.62 compared to the baseline's 44.09.
- Pre-training Stability: BERT's "forgetting rate" is significantly lower (~3%) than non-pre-trained models like BiLSTMs (~78%), suggesting that pre-training serves as a vital anchor for linguistic features.
Conclusion
While BERT is highly resilient to noise, its reliance on high-frequency patterns makes it vulnerable in low-resource and rare-entity scenarios. ProtoBERT offers a viable extension to mitigate these pitfalls. Future work will explore whether these learning phases and thresholds extend beyond NER to other tasks like text classification or summarization.
Summary updated