Uncertainty-Aware Label Refinement for Sequence Labeling

Tao Gui, Jiacheng Ye, Qi Zhang, Zhengyan Li, Zichu Fei, Yeyun Gong, Xuanjing Huang

Abstract

Sequence labeling is a fundamental task in Natural Language Processing, traditionally dominated by Conditional Random Field (CRF) architectures. Despite their success, CRFs are limited by local dependency modeling and sequential decoding bottlenecks. This paper introduces UANet (Uncertainty-Aware label refinement Network), a two-stage framework that leverages Bayesian uncertainty to refine sequence labels. By utilizing a Variational LSTM to generate draft labels with associated uncertainty scores, UANet selectively refines only the most ambiguous predictions using a parallelizable two-stream self-attention mechanism. Experimental results across CoNLL2003, OntoNotes 5.0, and WSJ datasets demonstrate that UANet not only achieves state-of-the-art F1 scores but also offers significant speedups over traditional CRF-based models.

Introduction

Sequence labeling involves assigning a categorical tag to every token in a sequence, a process central to tasks like Named Entity Recognition (NER) and Part-of-Speech (POS) tagging. For years, the Conditional Random Field (CRF) has served as the standard decoding layer due to its ability to model label transitions. However, CRFs possess two inherent weaknesses:

  1. Local Dependency Constraints: They primarily model transitions between adjacent labels, often failing to capture long-range semantic dependencies.
  2. Inference Inefficiency: The Viterbi algorithm used for decoding is inherently sequential, preventing full utilization of modern parallel hardware like GPUs.

While recent non-autoregressive refinement models have attempted to address these issues, they often suffer from "error propagation," where incorrect draft labels negatively influence the refinement of correct ones.

Methodology: The UANet Framework

UANet addresses these challenges through a two-stage "draft-and-refine" process governed by uncertainty estimation.

1. Drafting with Bayesian Uncertainty

Instead of a deterministic LSTM, UANet employs a Variational LSTM. By applying Monte Carlo Dropout—performing multiple forward passes with different dropout masks—the model estimates the predictive distribution for each label. This allows the calculation of an uncertainty score (entropy). Labels with high uncertainty are flagged for refinement, while high-confidence labels are preserved, mitigating the risk of error propagation.

2. Two-Stream Refinement

Tokens flagged as uncertain are processed through a novel Masked Two-Stream Attention mechanism.

  • Content Stream: Captures contextual relationships between input tokens.
  • Label Stream: Models dependencies between the draft labels themselves.
  • Relative Position Encoding: Adapted to maintain sequence consistency by modeling the distance between labels.
The UANet architecture, illustrating the flow from Variational LSTM drafting to uncertainty-gated two-stream refinement.

Experimental Evaluation

The model was benchmarked on three diverse datasets: CoNLL2003 (English NER), OntoNotes 5.0 (multi-genre NER), and WSJ (POS tagging).

Results and Discussion

UANet consistently outperformed BiLSTM-CRF baselines. On CoNLL2003, it achieved an F1 score of 91.60, compared to 91.21 for the CRF-based model.

Computational Efficiency

A key advantage of UANet is its parallelizability. Unlike the sequential Viterbi decoding in CRFs, UANet's refinement stage processes the entire sequence simultaneously. As shown in the performance analysis, UANet maintains near-constant inference latency regardless of sentence length, whereas CRF latency grows linearly. For sequences exceeding 30 tokens, UANet is approximately three times faster.

Comparison of inference latency (ms) and F1 score against sentence length for UANet and CRF models.

The Role of Uncertainty

Ablation studies confirmed that the uncertainty threshold ($\Gamma$) is vital. Refining all labels regardless of confidence actually degrades performance, proving that uncertainty acts as an effective gatekeeper against noisy draft labels. The authors identified a robust threshold around 0.35 across most tasks.

Conclusion

UANet represents a significant step forward in sequence labeling by replacing the CRF bottleneck with an uncertainty-aware refinement process. While the model requires hyperparameter tuning for the uncertainty threshold and involves sampling overhead during the drafting phase, its ability to capture long-range dependencies and its superior inference speed make it a robust alternative for modern NLP pipelines.

Summary updated

BibTeX
@inproceedings{gui2020uncertainty,
  author = {Tao Gui and Jiacheng Ye and Qi Zhang and Zhengyan Li and Zichu Fei and Yeyun Gong and Xuanjing Huang},
  title = {{Uncertainty-Aware Label Refinement for Sequence Labeling}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.181},
}
Figure