TL;DR
GapDNER introduces a novel "gap-aware" grid tagging framework for Discontinuous Named Entity Recognition (DNER). By explicitly modeling the context gaps between entity fragments as distinct spans rather than ignoring them, the model resolves long-standing decoding ambiguities and error propagation issues. This approach achieves new state-of-the-art performance across multiple complex biomedical benchmarks.
What Problem Does This Paper Address?
Standard Named Entity Recognition (NER) systems operate under the assumption that entities consist of contiguous, adjacent words (e.g., "lung cancer"). However, in specialized domains like clinical medicine, entities are frequently discontinuous or overlapping.
Consider the phrase: "severe joint, shoulder and upper body pain"
Here, a patient is experiencing three distinct adverse drug events: severe joint pain, severe shoulder pain, and severe upper body pain. As shown in Figure 1, these entities share fragments ("severe", "pain") but are separated by other words.
Previous DNER methods try to solve this by either creating complex, inflexible tagging schemes or trying to stitch isolated fragments together. These approaches suffer from severe decoding ambiguity and error propagation because the model has to guess which fragments belong together out of a massive combination of possibilities.
Methods
GapDNER reformulates DNER as a token-pair grid tagging task. Its key innovation is treating context gaps (the text separating entity fragments) as a special type of span that the model must explicitly learn to recognize.
The architecture consists of three main components:
- Sequence Encoder Layer: A standard combination of BERT and a Bidirectional LSTM (BiLSTM) to extract contextual token representations from the input sentence.
- Intra-Span Regularity Extraction: To classify a span, the model needs to know both where it starts/ends and what is inside it. The authors use a Biaffine mechanism to capture boundary features (head and tail tokens) and pair it with a Linear Attention module to capture the internal composition of the span. This helps the model learn the internal regularity of both entity fragments and context gaps.
- Inter-Span Relation Enhancement: Because overlapping entities often share the same starting or ending words, related spans naturally cluster along the same rows or columns in a 2D token-pair grid. The authors implement Criss-cross Attention over the grid feature matrix. This allows each grid cell to aggregate context horizontally and vertically, capturing relationships between overlapping or neighboring spans without the massive computational cost of full 2D global attention.
Entity Decoding: During inference, the model treats predicted fragments and gaps as directed edges. It then uses a Breadth-First Search (BFS) algorithm to find all valid paths from an entity's start to its end, effectively tracing the alternating pattern of fragments and gaps to reconstruct the full discontinuous entity.
Datasets
The model was evaluated on three widely used biomedical DNER benchmarks:
- CADEC: Medical forum posts tracking patient-reported adverse drug events (~10.75% of entities are discontinuous).
- ShARe13: Clinical narrative reports from the MIMIC database (~9.76% discontinuous entities).
- ShARe14: An expanded version of the ShARe clinical corpus (~8.69% discontinuous entities).
Key Insights and Ideas
- Gaps are Signals, Not Noise: Traditional models treat the words between fragments as background noise. GapDNER proves that explicitly identifying a "Gap" span provides rigid structural constraints that eliminate false-positive connections during decoding.
- Geometric Exploitation via Criss-Cross Attention: In a token-pair grid, overlapping entities share boundaries, meaning they share rows or columns. Using criss-cross attention perfectly targets this geometric property, allowing the model to share information between related entities efficiently.
- Internal Composition Matters: Just looking at the start and end words of a span isn't enough. Looking inside the span via linear attention helps the model differentiate between an entity fragment (which contains descriptive medical terms) and a gap (which usually contains conjunctions or punctuation like "and" or commas).
Key Results
GapDNER achieved new state-of-the-art (SOTA) F1 scores across all three datasets, outperforming sequence-labeling, generative (seq2seq), and prior grid-tagging baselines:
- CADEC: 73.65% F1 (+0.75% improvement over the previous SOTA)
- ShARe13: 82.87% F1 (+0.37% improvement over the previous SOTA)
- ShARe14: 82.72% F1 (+0.86% improvement over the previous SOTA)
Crucially, when evaluated strictly on subsets of data containing complex overlapping and discontinuous entities, GapDNER maintained a clear performance advantage over competing models, proving its real-world utility in clinical information extraction.
Limitations and Future Work
The authors noted a specific edge-case limitation: performance drops noticeably when the context gap is exactly one token long. In these scenarios, the model occasionally struggles to differentiate between a single continuous entity and two fragments separated by a tiny gap. Additionally, performance degrades slightly when gaps stretch beyond 5 tokens. Future work will likely target these boundary conditions to improve long-range dependency tracking and single-token gap sensitivity.
Summary updated