Learning Robust Named Entity Recognizers From Noisy Data With Retrieval Augmentation

Chaoyi Ai, Yong Jiang, Shen Huang, Pengjun Xie, Kewei TuarXiv 2024 · DOI

Abstract

Named Entity Recognition (NER) models often struggle when faced with real-world "noisy" text, such as typos or Optical Character Recognition (OCR) errors. This paper introduces a retrieval-augmented framework that leverages external knowledge (e.g., Wikipedia) to denoise these inputs during training. By using a multi-view learning approach, the model significantly boosts robustness without requiring clean "gold" text—a major step toward more realistic, production-ready NLP.

The Problem: NER in the Wild

NER is a cornerstone of NLP, but most models are "fair-weather" performers: they are trained on pristine, edited text. In the wild, data is messy. Social media is full of typos, and digitized documents are riddled with OCR errors.

Existing solutions for "Robust NER" usually rely on a luxury that researchers rarely have in practice: a parallel dataset of noisy text paired with its perfectly clean "gold" version. The authors tackle the more difficult, realistic scenario where only noisy text and its labels are available. They ask: Can we use external knowledge to help a model "guess" what a mangled word was supposed to be?

Comparison of robust NER paradigms: existing models requiring gold text vs. the proposed retrieval-augmented approach.

The Proposed Framework: Retrieve and Augment

The researchers propose a two-stage approach: Retrieve and Augment.

  1. The Retrieval Module: When the model sees a noisy sentence, it searches for relevant, clean context. They designed three ways to do this: Sparse Retrieval (BM25), Dense Retrieval (SimCSE), and Self-Retrieval (searching the noisy dataset itself for potentially cleaner instances).
  2. The NER Model: The noisy input and the retrieved text are concatenated and fed into a Transformer (XLM-RoBERTa). Through the self-attention mechanism, the model uses the clean retrieved text to "fix" the representations of the noisy tokens.
  3. Multi-view Learning: To avoid the high latency of retrieving text during every live API call, they use a "teacher-student" style setup. During training, the model learns from two views: one with retrieval (the "crutch") and one without. By forcing the "no-retrieval" view to mimic the "retrieval" view (using KL-divergence), the model becomes robust enough to perform well at inference time even without the external search.
The multi-view learning framework allows the model to benefit from retrieval during training while maintaining efficiency at inference.

Experimental Setup

The authors evaluated their approach on two major benchmarks, modified to include synthetic noise:

  • WNUT-17: Originally sourced from Twitter (already noisy), used to test social media robustness.
  • CoNLL-03: A classic news-based dataset, used as a "clean" baseline.
  • Noise Induction: They applied two types of synthetic noise: Typos (using character confusion matrices) and OCR Errors (using the Text Recognition Data Generator to turn text into images, adding distortions, and then running it through Tesseract-OCR).

Key Insights

  • Retrieval as a Denoising Memory: Instead of just using retrieval to find "facts," this paper uses it as a linguistic anchor. If the model sees "G0ogle," and retrieval pulls up "Google," the attention mechanism naturally shifts the embedding toward the correct entity.
  • Breaking the "Gold Text" Dependency: This is the first major approach to robust NER that doesn't require a parallel clean corpus for training. This makes it viable for niche domains (like legal or medical archives) where clean data simply doesn't exist.
  • Multi-view Efficiency: The "aha moment" here is that you don't need retrieval at inference. By using retrieval as a training signal, the model's internal weights learn to be more resilient to noise on their own.

Key Results

The retrieval-augmented model consistently outperformed standard NER baselines across all noise levels:

  • Significant F1 Gains: On the WNUT-17 dataset with high typo noise, the baseline F1 score was roughly 24.72, while the retrieval-augmented model pushed this to nearly 30.00.
  • OCR Resilience: On CoNLL-03 with heavy OCR noise, the model showed improvements of several percentage points over standard transformers.
  • Cross-Domain Success: The model trained on noisy data remained highly effective when tested on clean data, proving that "robustness" doesn't have to come at the cost of general accuracy.

Limitations and Future Work

Despite its success, the approach has limitations. The initial training phase is computationally heavy, especially for dense retrieval which requires a massive index. Additionally, retrieval quality is variable; no single method (Sparse, Dense, or Self) was the winner across all types of noise and datasets. Future directions include exploring more sophisticated ways to filter "distractor" text from the retrieval results, as irrelevant retrieved text can sometimes confuse the model rather than help it.

Summary updated

BibTeX
@misc{ai2024learning,
  author = {Chaoyi Ai and Yong Jiang and Shen Huang and Pengjun Xie and Kewei Tu},
  title = {{Learning Robust Named Entity Recognizers From Noisy Data With Retrieval Augmentation}},
  year = {2024},
  eprint = {2407.18562},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.18562},
}
Figure