SCL-RAI: Span-based Contrastive Learning with Retrieval Augmented Inference for Unlabeled Entity Problem in NER

Shuzheng Si, Shuang Zeng, Jiaxing Lin, Baobao Chang · DOI

Abstract

Named Entity Recognition (NER) models often struggle with the "Unlabeled Entity Problem," where entities are incorrectly treated as non-entities during training due to incomplete annotation or distant supervision. This paper introduces SCL-RAI, a framework combining Span-based Contrastive Learning (SCL) with Retrieval Augmented Inference (RAI). SCL encourages the model to learn distinct entity clusters, while RAI utilizes a prototype dictionary to correct biased decision boundaries during inference. Experimental results on the EC and NEWS datasets demonstrate significant F1-score improvements of up to 8.64% over existing state-of-the-art methods.

Introduction

Named Entity Recognition (NER) is a fundamental task in Natural Language Processing (NLP) that involves identifying and categorizing entities such as people, organizations, and locations within text. While modern deep learning models have achieved high performance on clean datasets, real-world applications often rely on distantly supervised or human-annotated data that is frequently incomplete.

This leads to the Unlabeled Entity Problem: when an entity (e.g., "NBA") is labeled in one instance but left as a non-entity in another, the model receives conflicting signals. This noise causes the model's decision boundary to shift, as it begins to associate entity-specific features with the "non-entity" class. Researchers from Peking University propose SCL-RAI to mitigate this bias through a combination of representation learning and global knowledge retrieval.

Methodology

The SCL-RAI framework consists of two primary components designed to improve robustness against labeling noise.

1. Span-based Contrastive Learning (SCL)

Traditional NER models typically use Cross-Entropy loss, which can be highly sensitive to false negatives. SCL-RAI introduces a supervised contrastive loss to restructure the embedding space. During training, the model is incentivized to:

  • Pull representations of the same entity type closer together.
  • Push representations of different entity types (and non-entities) further apart.

By creating dense, distinct clusters for each entity category, the model becomes more resilient to individual unlabeled instances. Even if some entities are mislabeled as non-entities, the overall geometric structure of the category remains stable.

2. Retrieval Augmented Inference (RAI)

To address the decision boundary shift that occurs during training, the authors implement a retrieval-based correction step at test time.

  • Dictionary Construction: The model builds a "global" dictionary of entity prototypes (center-point representations) for every entity type found in the training set.
  • Inference and Interpolation: When predicting a new span, the model does not rely solely on its internal classifier. It calculates the similarity between the current span's representation and the prototypes in the dictionary. The final prediction is a weighted interpolation of the classifier's output and this similarity-based distribution. This allows the model to "correct" its judgment if the internal classifier has been biased by training noise.

Experimental Evaluation

The researchers evaluated SCL-RAI on two datasets characterized by significant labeling noise:

  • EC (E-commerce): A dataset with five entity types (Brand, Product, Model, etc.) containing a mix of clean and distantly supervised data.
  • NEWS: A news domain dataset focusing on the "PERSON" entity type, featuring high levels of missing labels.

Key Results

SCL-RAI significantly outperformed previous state-of-the-art methods, such as PU Learning and Partial CRFs:

  • F1-Score Improvements: The model achieved a 4.21% improvement on the EC dataset and a 8.64% improvement on the NEWS dataset.
  • Ablation Studies: Removing the RAI component resulted in a noticeable performance drop, confirming that the retrieval step is essential for correcting the decision boundary shift.
  • Cluster Density: Visualization via t-SNE plots confirmed that SCL produces much tighter and more separable entity clusters compared to standard training methods.

Discussion and Insights

The Geometry of Robustness

The success of SCL-RAI suggests that the "Unlabeled Entity Problem" is largely a geometric issue in the embedding space. By forcing entities into tight clusters, the model prevents a few false negatives from pulling the entire category representation toward the non-entity space.

Orthogonality

A significant advantage of SCL-RAI is its orthogonality. The authors noted that their method can be combined with other noise-reduction strategies, such as negative sampling, to achieve even higher performance. This makes it a versatile tool for various NER pipelines.

Limitations and Future Work

While SCL-RAI represents a significant advancement, certain challenges remain:

  • Dictionary Quality: The effectiveness of RAI depends on the quality of the prototypes. If the training data is extremely sparse, the prototypes may not be representative.
  • Inference Complexity: Performing similarity searches against a dictionary adds computational overhead compared to standard feed-forward inference.
  • Scalability: Future research is needed to determine how well the retrieval mechanism scales to fine-grained NER tasks involving hundreds of entity categories.

Conclusion

SCL-RAI provides a robust solution to the persistent problem of unlabeled entities in NER. By combining the representational strengths of contrastive learning with the corrective power of retrieval-augmented inference, the framework sets a new benchmark for training reliable models on noisy, real-world data.

Summary updated

BibTeX
@inproceedings{si2022scl,
  author = {Shuzheng Si and Shuang Zeng and Jiaxing Lin and Baobao Chang},
  title = {{SCL-RAI: Span-based Contrastive Learning with Retrieval Augmented Inference for Unlabeled Entity Problem in NER}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2022},
  url = {https://openreview.net/forum?id=YPG3ZteQst},
}
Figure