SaFER: A Robust and Efficient Framework for Fine-tuning BERT-based Classifier with Noisy Labels

Zhenting Qi, Xiaoyu Tan, Chao Qu, Yinghui Xu, Yuan Qi

Introduction

In real-world industrial applications, datasets are frequently "dirty," containing mislabeled examples due to human error or automated weak labeling. While Large Language Models (LLMs) like BERT are powerful, they are also prone to memorizing these incorrect labels during fine-tuning, leading to significant performance degradation.

Standard mitigation strategies often rely on "early stopping," which requires a perfectly labeled "clean" validation set to determine the optimal stopping point. However, in many industrial settings, such clean data is prohibitively expensive or impossible to obtain. SaFER (a NoiSe-resistant Framework for Efficient and Robust BERT fine-tuning) addresses this by introducing a two-stage approach that requires no clean validation data, achieving state-of-the-art accuracy and significantly faster training speeds.

The SaFER Framework

The authors propose a two-stage framework designed to handle label noise without supervised validation signals:

Stage 1: Fast Warming Up & LID Early Stopping

The model is initially trained on the noisy dataset. To prevent the model from memorizing noise, the framework monitors Local Intrinsic Dimensionality (LID). LID measures the complexity of the data's local subspace. Research indicates that as a model learns generalizable patterns, LID drops; as it begins to memorize random noise, LID rises. By stopping at the LID "trough," SaFER identifies the peak generalization point without needing ground-truth labels.

Stage 2: Combating Label Noises

Once the model is "warmed up," an unsupervised projection head is added. This stage utilizes SimCSE (a contrastive learning technique) to learn robust text representations independently of the noisy labels.

The SaFER framework consists of two stages: (a) Fast Warming Up with LID Early Stopping and (b) Combating Label Noises using contrastive learning and structural loss.

To maintain classifier integrity, the framework implements a Structural Loss. This forces the supervised classification head to align with the structure of the unsupervised representations, preventing noisy labels from corrupting the model's internal understanding of the text.

Experimental Evaluation

SaFER was evaluated across synthetic and real-world benchmarks:

  • IMDB & AG-News: Sentiment and news classification tasks with injected "single-flip" and "uniform-flip" noise (ranging from 0% to 45%).
  • Industrial Biomedical Tasks: Two real-world literature mining tasks (~40k samples each) containing actual human-generated labeling noise.

Key Results

Experimental results demonstrate that SaFER is both more robust and more efficient than existing noise-handling techniques.

  • Robustness to Extreme Noise: On the AG-News dataset with 45% noise, SaFER maintained over 90% accuracy, while standard baselines plummeted.
  • Superior Efficiency: SaFER reduces training time by approximately 50% compared to competitors like Co-Teaching or Co-Learning. Because it avoids running multiple models or performing frequent inference on a validation set, it achieves a significantly lower time-per-step.
Performance comparison across various noise levels (ρ) and training efficiency. SaFER consistently outperforms baselines in both accuracy and speed.
  • Real-World Impact: In biomedical mining tasks, SaFER improved accuracy by nearly 5% over standard BERT fine-tuning, facilitating its deployment as a production service.

Discussion and Future Work

SaFER confirms that BERT follows a "convex" learning curve, learning easy (correct) samples before hard (noisy) ones. By using LID as a label-agnostic signal and anchoring the classifier to unsupervised representations, SaFER effectively ignores training "lies."

Future work will explore the impact of label noise on GPT-style generative models and prompt-based learning. Additionally, while SaFER excels with random noise, further research is needed to address "instance-level" noise, where specific types of sentences are systematically mislabeled.

Summary updated

BibTeX
@inproceedings{qi2023safer,
  author = {Zhenting Qi and Xiaoyu Tan and Chao Qu and Yinghui Xu and Yuan Qi},
  title = {{SaFER: A Robust and Efficient Framework for Fine-tuning BERT-based Classifier with Noisy Labels}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-industry.38},
}
Figure