Nested Named Entity Recognition as Single-Pass Sequence Labeling (2025)

Abstract: We cast nested named entity recognition (NNER) as a sequence labeling task by leveraging prior work that linearizes constituency structures, effectively reducing the complexity of this structured prediction problem to straightforward token classification. By combining these constituency linearizations with pretrained encoders, our method captures nested entities while performing exactly n tagging actions. Our approach achieves competitive performance compared to less efficient systems, and it can be trained using any off-the-shelf sequence labeling library.

## introduction named entity recognition (ner) involves identifying token spans that refer to specific named entities. traditional approaches use the bio scheme @xcite , which assigns labels to define the beginning (b), inside (i), and outside (o) tokens of each entity. bio ner-and other bio tasks-can be naturally addressed using sequence labeling approaches @xcite @xcite . however, nested ner (nner) challenges these approaches, as it involves entities embedded within other entities as long as their spans do not overlap. for example, in figure 1 , the person mention "president of the usa" contains the geopolitical named entity "the usa". this nested structure breaks the bio tagging assumption that each token belongs to only one entity. as a result, structured prediction is a better fit for nner, as it can model interdependent spans and capture hierarchical relationships between nested entities. prior work has tackled nner as a hierarchical or layered sequence labeling task, applying token-level tagging multiple times, either detecting outer entities first and then inner ones @xcite , or identifying inner entities first and then expanding outward @xcite . other paradigms classify each possible text span as either an entity or not @xcite @xcite , use sequence-to-sequence techniques @xcite , or exploit hypergraph representations @xcite @xcite . alternatively, some methods transform nner into constituency parsing by mapping samples to constituent trees and relying on parsing algorithms @xcite @xcite . more recently, @xcite applied a pointernetwork-based bottom-up constituency parser to nner, offering linear-time decoding. in this context, constituency tree linearization-first introduced by @xcite and later explored in related work @xcite -reframes the structured prediction task as a sequence labeling problem. this approach achieves competitive performance while improving computational efficiency, as it outputs the tree in exactly 𝑛 tagging actions. this is in contrast with previous sequenceto-sequence models for nner where the number of tagging actions depends on the number of predicted mentions @xcite . building on this line of work, we present a simple yet effective nner approach that applies constituency tree linearizations within a standard sequence labeling framework. 1 our method is singlepass, parser-free, and integrates seamlessly with pretrained encoders. it captures nested structures efficiently and achieves competitive benchmark results, all while requiring minimal implementation effort. overall, the data preparation remains lightweight and fully automated, and it is no more complex than in traditional nested ner settings, thus preserving the simplicity of standard ner pipelines while adding structural expressiveness. ## nner through constituent parsing as sequence labeling we represent nner structures using constituent trees, adopting a sequence labeling strategy for syntactic parsing. we hypothesize that this formulation aligns well with nner due to two key properties: ## experiments we present our experimental setup and results. setup we use the machamp framework @xcite to train a multitask transformer-based model. specifically, we use roberta-large @xcite and bert-large-uncased @xcite as shared encoders for the ace and nne datasets, and biobert-large-cased-v1.1 @xcite for genia. we include roberta as a high-performing option, and bert for comparison, since it is the most commonly used model in related work. we add three task-specific linear classification heads to predict each atomic component of the label (𝑛 𝑖 , 𝑐 𝑖 , 𝑢 𝑖 ). we adopt the default hyperparameters provided in the machamp repository, as our primary goal is to show that these models perform well in off-the-shelf sequence labeling setups with simple plug-and-play scripts. in particular, for encoding and decoding, we use the scripts provided by the codelin library @xcite . this library provides homogeneous post-processing to produce trees from ill-formed label sequences; more details about the post-processing are in appendix e. datasets we train and evaluate our models on four popular english nner benchmarks: genia @xcite , ace 2004 @xcite , ace 2005 @xcite , and nne @xcite . for ace and genia, we preprocess the datasets following @xcite . information about the datasets is shown in appendix metrics we evaluate our models in terms of precision, recall, and f1-scores based on strict entity boundaries, requiring both correct spans and types. we also provide finer-grained evaluations (e.g., by entity length) and external comparisons. ## conclusion we cast nested ner for the first time as a singlepass sequence labeling task by first transforming nner annotations into constituent trees, and then leveraging the linearization options these trees enable. in particular, we explored both depthbased (absolute, relative and dynamic encodings) and transition-based encodings (tetra-tagging) previously proposed for this type of tree structure. our experiments show that this approach models nested structures effectively, with competitive performance and no need for complex architectures, remaining lightweight and compatible with standard sequence labeling tools. among the explored encodings, the dynamic variant-which selects between absolute and relative schemes based on local structural cuesconsistently achieves the highest f1 across datasets, except for genia. the transition-based tetratagging approach is competitive on flat and short entities but degrades on longer spans, where depthbased strategies prove more effective.