Abstract
Named Entity Recognition (NER) in complex domains like medicine often involves nested entities and long-form documents, posing significant challenges for traditional sequence-to-sequence models. This paper adapts the Recurrent Neural Network Transducer (RNN-T) architecture to the Nested NER task. By introducing fixed and constrained alignment losses, we leverage ground-truth token-label alignments to improve training stability and data efficiency. Experimental results on a large-scale medical conversation corpus show that constraining alignment improves F1 scores from 0.702 to 0.743, with further gains achievable through semi-supervised learning.
Introduction
Identifying entities such as medications, symptoms, and diagnoses in natural language is a cornerstone of clinical NLP. However, real-world data presents two primary difficulties:
- Nested Entities: Entities often overlap (e.g., "University of California, Berkeley"). Traditional multi-class token labeling fails here.
- Long Sequences: Medical transcripts can exceed 1,500 words. Standard attention-based models often struggle to maintain precise alignment between input tokens and output labels over such lengths.
We propose using the RNN-T architecture, which naturally handles variable-length mappings and nested labels through a "blank" symbol mechanism.
Methodology
The RNN-T consists of a Transcription Network (Encoder), a Prediction Network (Decoder), and a Joint Network. The encoder processes input text (using Transformer-XL), while the decoder models label dependencies. The joint network predicts the next label or a "blank" symbol, which advances the encoder to the next word.
Alignment Constraints
Standard RNN-T training marginalizes over all possible alignments. In NER, however, we possess explicit token-level alignments. We introduce:
- Fixed Alignment Loss: Restricts the model to the human-provided alignment path, acting as a powerful regularizer for long sequences.
- Constrained Alignment Loss: A middle ground that uses a 2D convolution filter to allow a small amount of "wiggle room" around the human alignment, accounting for potential annotation noise.
Experimental Setup and Results
We evaluated our approach on a Medical Conversation Corpus containing ~6k labeled and ~100k unlabeled conversations. Conversations averaged 1,600 words and 160 turns, representing a significant challenge for sequence modeling.
The results indicate that unconstrained models often "get lost" in long sequences. Switching to Fixed Alignment improved the F1 score from 0.702 to 0.743. Incorporating 100k unlabeled conversations via pseudo-labeling further boosted the F1 to 0.762. Models trained with fixed alignment also generalized much better to unsegmented test data compared to models trained only on short snippets.
Conclusion
RNN Transducers with alignment constraints offer a robust framework for Nested NER in long-form documents. By treating the alignment as a regularizer, we achieve superior performance and data efficiency. This approach provides a unified view of seq-to-seq models and hard attention, potentially paving the way for architectures that process audio directly into structured medical entities.
Summary updated