Next Article in Journal
Unmasking Biases and Reliability Concerns in Convolutional Neural Networks Analysis of Cancer Pathology Images
Previous Article in Journal
Embedded AI and Circuit-Level Design for Thermographic Monitoring of Carbon-Based Polymer Composites
Previous Article in Special Issue
DMBT Decoupled Multi-Modal Binding Transformer for Multimodal Sentiment Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Multi-Scale Heterogeneous Graph Attention Network for Nested Named Entity Recognition with Syntactic and Dependency Tree Structures

School of Information Engineering, Shanghai Maritime University, Shanghai 201306, China
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(6), 1183; https://doi.org/10.3390/electronics15061183
Submission received: 13 February 2026 / Revised: 6 March 2026 / Accepted: 9 March 2026 / Published: 12 March 2026

Abstract

Nested Named Entity Recognition (nested NER) frequently encounters challenges like boundary conflicts, complications in modeling long-distance dependencies, and inadequate representation of deep nested semantics resulting from overlapping spans and hierarchical inclusion relationships of entities. This research presents a multi-scale heterogeneous graph attention network to facilitate end-to-end recognition of nested entities through the collaborative modeling of structure and semantics. The model initially presents the structural integration mechanism, which consolidates the hierarchical restrictions of the syntactic tree and the inter-word relationships of the dependency tree within a singular heterogeneous graph space. It subsequently generates 1/2/3-hop multi-scale subgraphs and employs multi-scale subgraph attention to adaptively integrate information from various structural receptive fields, harmonizing the local cues of shallow entities with the global dependencies of deep entities. The experimental findings on the ACE2004, ACE2005, and GENIA benchmark datasets indicate that the proposed method surpasses several robust baselines regarding overall performance and nested entity recognition, particularly exhibiting notable advantages in identifying long entities and low-frequency entities. We further evaluate MHGAT on KBP2017 and GermEval2014 to validate generalization across datasets and languages.

1. Introduction

Named Entity Recognition (NER) [1] detects entity references in unstructured text and categorizes them into established classifications (e.g., PERSON, LOCATION, ORGANIZATION). As an essential element of information extraction, it supports numerous NLP applications, such as event detection [2], knowledge graph development [3], machine translation [4], sentiment analysis [5], text categorization [6], and relation extraction [7]. Most previous research concentrates on flat Named Entity Recognition (NER), typically framed as a sequence labeling issue, and has demonstrated robust performance. In practical corpora, especially in news and biomedical texts, entities are often nested, demonstrating multi-granularity semantics: a span may possess many labels or encompass other entities. Such structures contest conventional sequence labeling formulations. Figure 1 delineates flat and nested scenarios: in Figure 1a, the “interleukin-2 gene” is designated as DNA, while “interleukin-2” is identified as protein; Figure 1b illustrates a planar configuration with distinct, non-overlapping, and non-intersecting boundaries for ORG, Production, and Time.
Current nested NER methodologies can be broadly classified into sequence labeling [8], hypergraph-based, and span-based approaches. Sequence labeling methods enhance and transcend the conventional single-label constraint through innovative labeling strategies: Ju [9] developed a dynamic stacked planar architecture that utilizes internal entity features to deduce exterior entities incrementally; the Strakova [10] employed a sequence-to-sequence framework to produce composite labels, efficiently storing entity nesting connections. This approach clearly represents layered relationships by sequential inference or production of structured labels, although frequently encounters challenges such as prolonged inference chains and error propagation. Furthermore, there exist span-based methodologies: Sohrab [11] developed a comprehensive deep model that initiated the span enumeration paradigm, Jiang [12] addressed the class imbalance issue by multi-task learning, and the Yu [13] created a biaffine attention method to enhance span classification. The span technique converts recognition into candidate span classification, which is inherently appropriate for nested scenarios; nonetheless, it still exhibits deficiencies in candidate size, border discrimination, and internal utilization. Hypergraph-based methodologies employ nodes and directed hyperedges to depict entities and their combinations, while maintaining the multi-dimensional relationships among entity objects to assure the precision of the model’s representation of data relational information. Lu [14] initially introduced the concept of hypergraphs to address the challenge of nested entity recognition. Muis [15] introduced the im-hypergraph model, which incorporates a “separator” mechanism in hypergraph representation to augment the model’s capacity to discern boundaries, hence enhancing the robustness of nested recognition. Hypergraph approaches can consistently represent overlapping and nested structures; however, the complexity of structure generation and decoding is significant.
Existing research indicates that nested NER has two primary deficiencies: first, entities with varying nesting depths exhibit markedly different contextual range requirements—shallow entities depend more on local boundary cues, whereas deep or lengthy entities frequently necessitate broader structural paths and global dependencies. Nevertheless, several current models employ static windows or fixed neighborhood aggregation, failing to incorporate adaptive integration of multi-scale (e.g., 1/2/3-hop) structure information. Secondly, nested relationships inevitably exhibit a “hierarchical inclusion” characteristic. Exclusively depending on dependency connections complicates the explicit articulation of phrase-level limitations.
This research introduces a multi-scale heterogeneous graph attention network (MHGAT) for nested Named Entity Recognition (NER). Our primary contributions are threefold: (1) We amalgamate constituency-derived hierarchical cues and dependency-derived long-range links into a cohesive token-level heterogeneous graph, facilitating joint structural encoding with diverse edges and token-specific structural attributes. (2) We present explicit multi-scale subgraph attention by creating parallel 1/2/3-hop structural subgraphs and learning adaptive fusion weights, which offers customizable receptive fields and is fundamentally distinct from merely stacking deeper GAT layers. (3) We propose depth-aware attention modulation and a lightweight semantic-structure residual fusion to improve deep-nested modeling and stabilize representation learning. Experiments on ACE2004, ACE2005, and GENIA demonstrate the effectiveness of MHGAT with consistent improvements over strong baselines. We further evaluate MHGAT on KBP2017 and GermEval2014 to validate generalization across datasets and languages.

2. Related Work

This chapter examines the principal research paradigms for nested NER. Current methodologies can be classified into three primary categories: sequence labeling-based techniques, which reinterpret nested structures through multi-label frameworks or hierarchical decoding; hypergraph-based approaches, which depict overlapping and containment relationships using hyperedges and execute structured inference; and span-based methods, which conceptualize the task as the generation and classification of span candidates, inherently accommodating nesting yet frequently hindered by candidate proliferation and precise boundary differentiation. Simultaneously, tree structures present a prevalent structural inductive bias in NLP: constituency parse trees represent phrasal hierarchies and containment, whereas dependency trees illustrate word-to-word dependencies and long-range relationships, providing essential structural indicators for entity recognition and various information extraction tasks.

2.1. Sequence Labeling-Based Approach

The issue of multi-labeling in nested entities is converted into a single-labeling problem, or the decoder is adjusted to permit the assignment of multiple labels to a single entity. Ju [9] introduced a dynamic stacking plane methodology that utilizes internal entities to identify exterior entities and accomplish nested entity recognition by constructing a plane labeler incrementally. Strakova [10] conceptualized the nested named item recognition challenge as a seq2seq (Sequence-to-Sequence) problem and amalgamated all potential co-occurring categories to provide novel labels. Wang [16] introduced a pyramid structure-based hierarchical approach for predicting entities of varying lengths to enhance inter-layer interactions. To mitigate the label conflict issue, Shibuya [17] devised a second-best technique to identify the optimal alternative answer from various potential paths, hence enhancing the robustness of discrimination. Fei [18] subsequently proposed a dual attention approach encompassing location and syntax, integrated with the CRF framework to enhance the modeling capacity of entity boundaries. Su [19] developed a multi-label attention module to represent the interrelations among candidate labels across various states.

2.2. Hypergraph-Based Approach

Entities and their combinations are depicted by nodes and directed hyperedges. The model’s description of data relationships is accurate due to the preservation of the multi-dimensional associations among entity objects. Lu [14] initially introduced the concept of hypergraphs to address the issue of nested entity recognition. Muis [15] introduced the im-hypergraph model, which incorporates a “separator” mechanism in the hypergraph representation to augment the model’s capacity to discern boundaries, thus enhancing the robustness of nested recognition. Katiyar [20] introduced a methodology for identifying nested Named Entity Recognition (NER) problems via hypergraph representation, and employs a greedy approach to learn the hypergraph structure via an LSTM network. Wang [21] introduced a segmented hypergraph representation to model nested entity references utilizing pre-trained embeddings. While these methods proficiently identify nested items, the construction and parsing of hypergraphs are both expensive and intricate. The HGN model suggested by Huang [22] constructs nested entities collectively to form hyperedges and employs a unified labeling strategy, effectively mitigating label inconsistency and substantially enhancing recognition accuracy.

2.3. Span-Based Approach

In this mode, all methods first enumerate all regions from the input sentence and then learn their corresponding region representations. Shen [23] introduced a two-stage method that first regresses the possible spans and then classifies the possible entities. Building on Sohrab [11], researchers combined attention mechanisms with traditional span-based methods. For example, Yu [13] proposed a nested NER method that uses a biaffine attention mechanism to obtain top-level results through a span classification scoring matrix. Based on this, Zhu [24] proposed a boundary smoothing technique to address the overconfidence problem and thus improve performance. Yuan [25] introduced a triaffine mechanism that integrates different elements to improve the classification of nested entities. With the development of deep learning, new methods of nested NER have emerged. Wan [26] introduced a method that uses a retrieval-based span graph to improve span representation and generalization. Shen [27] proposed the PromptNER model, which uses a dual-slot cue template for entity localization classification. Shen [28] introduced DiffusionNER. This perspective views the task as a diffusion process with smooth boundaries, which improves the efficiency and adaptability of generated entities. In addition, Wang [29] proposed a binary representation-based NER method, which effectively improves the performance and accuracy of the model by using a contrastive loss function and a bit-level CKY algorithm. In contrast to traditional hypergraph or span-based methods, MHGAT improves token representations by using dual-tree structural cues, which capture both local boundary information and long-range hierarchical connections.

2.4. Tree-Structured Model

Research on incorporating tree-structured information into NLP models has expanded rapidly in recent years. Zhao [30] proposed an end-to-end approach for relation extraction that builds a graph-attention LSTM guided by dependency parses. For answer sentence selection, Mrini [31] encoded sentences with recursive representations derived from constituency trees, learning syntactic embeddings that preserve hierarchical organization. In question answering, Zhang [32] exploited syntactic cues to strengthen self-attention and better capture inter-sentential relations. In addition, Fei [33] and Yang [34] integrated tree-based signals into BERT via multi-task learning, enabling the model to benefit from syntactic structure supervision. Unlike tree-based NER models that utilize a singular structural source, MHGAT develops a cohesive heterogeneous graph that integrates both dependency and constituency information, and subsequently employs scale-specific subgraph attention with depth-aware modulation, thereby offering adjustable receptive fields and enhanced resilience to noise in deeply nested entities.

3. Model

This section presents the architecture of our approach, as outlined in Figure 2. This paper introduces a multi-scale heterogeneous graph attention network with syntactic and dependency tree structures to tackle the difficulties encountered by conventional models in nested Named Entity Recognition tasks. The challenges encompass the difficulty of concurrently managing boundary localization and hierarchical dependencies of nested entities, alongside the absence of hierarchical awareness in highly nested and lengthy entities. The model initially creates a syntax tree and a dependency tree, aligning the hierarchical restrictions of the syntax tree with the inter-word relationships of the dependency tree within the same heterogeneous graph space. Subsequently, it generates 1/2/3-hop multi-scale subgraphs and utilizes multi-scale subgraph attention to adaptively integrate input from various structural receptive fields, therefore concurrently addressing local cues of shallow entities and global dependencies of deep entities. Moreover, it integrates pre-trained semantic augmentation with structural representation fusion techniques to promote resilience against intricate semantics and border differentiation.

3.1. SDTI

The Syntax and Dependency Tree Integration Layer (SDTI) serves as the foundational component of this paradigm, tasked with the cohesive integration and standardization of diverse structures inside the syntax and dependency trees. The primary objective is to integrate structural information inside a unified graph space, so supplying organized input for successive encoding layers and facilitating the flow and amalgamation of information across diverse graph structures. The SDTI procedure is illustrated in Figure 3.

3.1.1. Syntax Tree and Dependency Tree Construction

Utilizing the current mainstream state-of-the-art (SOTA) syntactic parser [35], syntactic analysis is conducted on each sentence in the dataset to produce a phrase structure syntax tree. The syntax tree is anchored at the sentence (S) and segmented into constituent nodes, including noun phrases (NP), verb phrases (VP), and prepositional phrases (PP). The lowest-level nodes represent the lexical and syntactic tags in the text (e.g., determiners DT, singular nouns NN, adjectives JJ, etc.), distinctly illustrating the hierarchical structure and modification links among sentence elements. Noun phrases lacking substantive verbs (e.g., “The expression of interleukin-2 gene in activated T cells”) have their verb phrases (VP) in the syntactic tree designated as “no lexical verb” to maintain consistency between syntactic structure and textual semantics.
This study use the dependency parser from the SuPar toolkit to analyze the corpus, thereby producing a dependency tree as the structured input for the model. The dependency tree employs individual words as nodes, with directed edges denoting inter-word dependence relationships (e.g., ATT for attributive-head relation, POBJ for prepositional-object relation, SBV for subject-verb relation, etc.). The root node represents the central word of the sentence, while the sub-nodes are linked by hierarchical edges to precisely delineate nuanced syntactic connections among words.

3.1.2. Syntax Tree Feature Encoding

The feature encoding of a syntax tree comprises three components: label embedding, span encoding, and hierarchy masking. Each component has a distinct function in acquiring the structure data of the syntax tree and the interconnections among nodes.
Label embedding signifies the categorical information of each node within the syntax tree, namely the grammatical component to which the node is affiliated (e.g., noun phrases, verb phrases, etc.). Label embedding enables the model to comprehend and acquire the links among various grammatical elements. For a node l s , i T s in a syntax tree, the equivalent embedding is
e s , i = Embedding ( E s , l s , i ) = E s [ l s , i ] R d s
where E s is the embedding matrix of the syntax tree, representing the embedding features of each syntax category, and  d s is the feature dimension 128.
Span encoding is employed to represent the positional attributes and extent of each node in the syntax tree, namely the start and finish positions of the node within the tree. This encoding is essential for delineating entity borders and phrase ranges, particularly in the context of nested structures, hence assisting the model in precisely recognizing phrases or entities.
For each phrase P , its span encoding e P is obtained by the following linear transformation:
e p = Linear ( [ x s t a r t ( P ) ; x e n d ( P ) ; d P ] ) R d s
where start( P ) and end( P ) represent the start and end positions of the phrase P , respectively, and  d P is the level depth.
A hierarchy mask represents the hierarchical information of a node within a syntax tree, specifically indicating the depth or location of the node in the tree. Hierarchy masks assist the model in comprehending the relative positions of nodes within the syntax tree, hence enhancing the information aggregation process, particularly in the context of intricate nested structures. For node i, the hierarchical mask M l at level l is defined as follows:
M l [ i , l ] = 1 , token t i belongs to level l 0 , others

3.1.3. Dependency Tree Feature Encoding

Dependency tree feature encoding is utilized to convert dependency relationship data into feature vectors appropriate for model processing. This procedure encompasses several essential stages: embedding of dependence connection labels, path encoding, and structural representation of dependencies. These procedures efficiently convert the structural data of the dependency tree into features suitable for learning by the graph attention network.
Dependency relationship label embedding transforms each dependency relationship label into a feature representation within a low-dimensional vector space. For each node’s dependence l a b e l l d , i T d , we map it to a d d -dimensional vector space via the function E m b e d d i n g E d , l d , i :
e d , i = Embedding ( E d , l d , i ) = E d [ l d , i ] R d d
Dependency path encoding is employed to represent the dependency paths between nodes, specifically the dependency relationship from the current node to its parent node. For a node i and its parent node p, we define the path P i , j as the dependency path from node i to its parent, encompassing the word labels of each word along the path and the hierarchical information associated with it. Path encoding use an LSTM network to encode the trajectory, producing a feature vector for each path:
e p , i , j = LSTM ( E d [ P i , j ] ) R d d
To enhance the representation of dependence relationships, we create a dependency matrix A that illustrates the connection between each token and its parent node. This matrix is defined as follows:
A [ i , j ] = 1 , t i and t j have a dependency relationship 0 , others
where A [ i , j ] indicates whether there is a dependency relationship between node i and node j. This matrix effectively captures the dependency relationships between nodes and serves as input for further learning in the graph network.

3.1.4. Feature Integration

In the structural integration layer, the independently encoded characteristics from the syntax tree and dependency tree must be amalgamated. To efficiently integrate the characteristics of the syntax tree and dependency tree, we implement a two-step fusion strategy: The components of the syntax tree include label embedding, span encoding, and hierarchy mask. Initially, we integrate these three characteristics:
F s y n [ i ] = Concat e syn , i , e sp , i , M syn , i
The components of the dependency tree are dependency relation label embedding, path encoding, and the dependency relation matrix. We also integrate these three features:
F d e p [ i ] = Concat e dep , i , e path , i , A dep , i
We employ concatenation in Equations (5) and (6) as an information-preserving early fusion technique. The constituency-side features (label embedding, span encoding, hierarchy mask) and the dependency-side features (relation embedding, path encoding, adjacency signal) possess disparate semantics, and imposing early interaction (e.g., intense attention) may induce superfluous coupling and exacerbate parsing noise. Concatenation preserves all complimentary signals, but the next graph encoder acquires task-specific interactions via attention aggregation. Moreover, concatenation is parameter-efficient and empirically stable, which is advantageous for biological texts where training may be more susceptible to noisy structural signals.
We further concatenate the two structural views and apply a learnable projection to obtain the unified feature matrix F used by the subsequent GAT:
F = LN W f F s y n [ i ] ; F d e p [ i ] + b f
where [ · ; · ] denotes concatenation, W f projects the fused vector into the hidden dimension d, and  LN ( · ) is layer normalization.

3.2. Multi-Scale Heterogeneous Graph Attention Mechanism

The Multi-Scale Heterogeneous Graph Attention Encoding Layer (MHGAT) shown in Figure 4, constitutes a fundamental element of our suggested methodology. The design objective is to concurrently characterize hierarchical inclusion dependencies and cross-scale structural information of nested entities within a cohesive heterogeneous graph framework. This layer initially creates subgraph representations with varying receptive fields via multi-scale structural sampling to encompass the local boundary cues necessary for shallow entities and the mid-to-long-range structural routes of deep entity relationships. It then presents hierarchical perceptual attention, which allocates distinct weights to nodes and interactions across various levels during input aggregation, therefore explicitly augmenting the modeling capacity of hierarchical dependencies. A semantic-structural residual fusion approach is utilized to align and enhance the pre-trained semantic representation with the multi-scale structural propagation representation. This maintains essential structural signals while reducing semantic drift and information loss, thus enhancing the stability and resilience of cross-scale feature acquisition.

3.2.1. Heterogeneous Graph Construction

In constructing the heterogeneous graph, only tokens with part-of-speech tag NN (nouns) from the constituency tree are modeled as graph nodes. Other tokens and phrase-level nodes are not included as nodes. Constituency information is incorporated as features attached to NN nodes, including phrase label embeddings, span embeddings, and parse tree depth. Additionally, syntactic edges connect NN nodes that belong to the same phrase, enabling the graph to capture local hierarchical structure without explicitly modeling phrase nodes.
By exclusively designating NN tokens as graph nodes, we diminish the pool of candidate nodes, thereby enhancing computational efficiency in graph attention encoding and subsequent multi-scale subgraph processing, without undermining the model’s capacity to apprehend hierarchical syntactic information.
Using text tokens as nodes, construct a heterogeneous graph G = ( V , E , X , Y ) , integrating the topological relationships of two tree structures. Here, V = { t 1 , , t n } is the node set, and  E = E s E d is the edge set ( E s are syntactic edges, and  E d are dependency edges). The definitions and feature calculations of nodes and edges are as follows:
  • Nodes: Each token t i corresponds to one node. The node feature x i R d x + d s + d d is a concatenated vector of BERT embeddings, syntactic tag embeddings, and dependency relation embeddings:
    x i = [ X B E R T , i , e s , i , e d , i ]
    where x B E R T , i is the BERT embedding of the token.
  • Edges: There are two types of heterogeneous edges: (1) syntactic edges E s (connecting tokens within the same phrase component, marked as syntactic associations), and (2) dependency edges E d (connecting tokens with dependency relationships, marked as dependency associations). The edge feature y i , j R d e ( d e = 128 ) is the embedding vector of the corresponding relation, defined as
    y i , j = e s , i j , ( t i , t j ) E s e d , i j , ( t i , t j ) E d
    where e s , i j is the syntactic association embedding, and  e d , i j is the mean of the dependency relation label embedding.
The creation of heterogeneous graphs integrates syntactic hierarchical constraints with inter-word dependencies, offering structural reinforcement for representing the relationships of nested entities, particularly those that are cross-level nested.

3.2.2. Multi-Scale Subgraph Attention

Conventional heterogeneous graph attention encoding solely captures graph structures at a singular scale, inadequately accommodating the “multi-level, cross-scale” structural attributes of nested entities—shallow nested entities necessitate detailed local features, whereas deep nested entities demand globally structured features. Inspired by Huang [36], we propose multi-scale subgraph attention (MSSA), which mitigates this issue by employing multi-scale sampling to fulfill the feature requirements of various nesting levels, alongside multi-scale subgraph attention to emphasize critical structural linkages, thereby attaining profound integration of structural and semantic information.
An uncomplicated solution is to increase the number of GAT layers to indirectly broaden receptive fields. In nested NER, this method tends to (i) indiscriminately combine local boundary cues with long-range structural signals, and (ii) exacerbate parsing noise and too smooth node representations, potentially obscuring entity boundaries and diminishing type separability. This aligns with our layer study, which indicates that performance reaches its zenith at modest depths and deteriorates with additional levels (Section 4.9.3). Conversely, MSSA’s explicit multi-scale architecture facilitates the adaptive fusion of scale-specific representations, enabling the model to selectively utilize relevant local, mid-level, and global structural contexts based on the nesting depth of each object.
1.
Generate multi-scale subgraphs
Based on the integrated feature matrix F output by SDTI and heterogeneous graph G = ( V , E , X , Y ) , three subgraphs at different scales are constructed to cover structural information from local to global:
  • Local scale subgraph G l : Retains the 1-hop neighbors of each token (tokens directly related by dependency + tokens within the same phrase component), focusing on the local boundary features of shallow nested entities.
  • Mid-scale subgraph G m : Retains the 2-hop neighbors of each token (adjacent nodes of the 1-hop neighbors + core tokens of the parent phrase component), capturing the hierarchical relationships of mid-level nested entities.
  • Global scale subgraph G g : Retains the 3-hop neighbors of each token (covering sentence-level key structural nodes, such as the core token corresponding to the root node of the syntax tree) (token, long-distance dependency path nodes), adapting to the global dependencies of deeply nested entities.
The node features of each subgraph inherit from F , and the edge features preserve syntax-dependency heterogeneous edge attributes enabling parallel capture of multi-scale structural information.
Since the 1/2/3-hop subgraphs are induced from the same heterogeneous backbone, they naturally share a large portion of nodes and edges. We treat this overlap as an intentional design rather than redundancy: different hops provide complementary structural receptive fields for nested entities (local boundary cues vs. mid-range hierarchy vs. global routes). To avoid “over-counting” repeated information, we perform parallel encoding on each subgraph using its own adjacency mask and obtain scale-specific representations independently, instead of mixing all edges into a single expanded graph. The potential noise introduced by repeated structural signals is further alleviated by the subsequent adaptive gating fusion, which learns to down-weight less informative scales, together with dropout in attention aggregation and residual fusion that stabilizes representation learning.
2.
Multi-scale subgraph attention
We encode the three subgraphs in parallel, allocating attention heads to each scale (K = 6 in total, with 2 heads per subgraph), so that local, mid-level, and global structural cues are modeled separately before fusion. Weighting parameters are incorporated throughout the encoding process to improve sensitivity to nesting levels.
To explicitly model the effect of hierarchical depth in nested entities on attention allocation, we introduce a depth-aware weight ω d for each token t i . Let d i denote the hierarchical depth feature produced by SDTI (i.e., the syntactic/structural depth associated with token t i ). We map d i to a scalar in [ 0 , 1 ] via a linear transformation followed by a Sigmoid function:
ω d = σ Linear ( d i ) ,
where σ ( · ) is the Sigmoid function. With this design, tokens located at deeper (more inner) levels of the nesting structure are assigned larger modulation weights, thereby enabling the model to differentiate hierarchical importance during subsequent message passing.
During attention scoring, ω d is injected as an additive depth-dependent bias into the unnormalized attention score for edge ( i , j ) , yielding
α i , j s = LeakyReLU a h i ; h j ; y i , j + ω d · b ,
where [ h i ; h j ; y i , j ] denotes the concatenation of the node representations h i , h j and the relation/edge feature y i , j , a is a learnable parameter vector, and  b is a hierarchical bias parameter. Consequently, ω d acts as a depth-conditioned offset in the attention logit: when a token has greater hierarchical depth, a larger ω d induces stronger depth-guided modulation of its attention interactions.
Finally, after attention encoding, each subgraph yields a feature matrix H l , H m , H g R n × d g , which correspond to local, mid-level, and global structural features, respectively.
3.
Semantic-Structure Residual Fusion Module
We introduce a residual fusion mechanism that combines SpanBERT-based semantic encoding with multi-scale structural encoding, so as to promote deep coupling between semantic and structural information.
(a)
Semantic encoding enhancement. The token-level integrated features F t produced by SDTI are fed into SpanBERT to obtain the semantic representation h i sem , which is then linearly projected to a unified fusion dimension d fusion :
h i sem = SpanBERT ( F t ) i , h ˜ i sem = W sem h i sem + b sem , h ˜ i sem R d fusion .
(b)
Multi-scale structural aggregation. We perform a weighted aggregation over the structural representations at different scales H l , H m , H g , where the weights are learned via an adaptive gating network:
H stru , i = γ l H l + γ m H m + γ g H g .
Here γ l , γ m , γ g are gate coefficients satisfying s { l , m , g } γ s = 1 , computed as
[ γ l , γ m , γ g ] = Softmax Linear ( F ) ,
which enables dynamic adjustment of the contributions from different structural scales.
(c)
Residual fusion output. The final representation for token t i is obtained via residual fusion:
h i = α h ˜ i sem + ( 1 α ) H stru , i + F i ,
where F i is the linear projection of the SDTI integrated feature, and the residual connection preserves the original structural signal, thereby mitigating feature attenuation during encoding.

3.3. Predictive Output Layer

The prediction output layer utilizes the residual fusion output h i from the MHGAT module as the primary input and implements a progressive process of “span selection, category determination, and hierarchical relationship labeling,” transitioning from feature encoding to structured nested entity recognition.

3.3.1. Nested Entity Span Filtering

Based on the local boundary and hierarchical association cues encoded in H i stru , we generate candidate spans and conduct high-quality filtering, thereby avoiding the redundant computation introduced by exhaustive enumeration over all spans.
1.
Valid boundary prediction. We design a pair of binary boundary classifiers. Using the local structural features in H i stru , we estimate, for each token, the probabilities of being a span start ( s i ) and a span end ( e i ) , respectively:
P ( s i ) = σ w s H i stru + b s , P ( e i ) = σ w e H i stru + b e ,
where w s , w e R d fusion are learnable parameters and σ ( · ) denotes the Sigmoid function. We set a threshold θ = 0.5 and retain tokens satisfying P ( s i ) > θ and P ( e i ) > θ as valid boundaries.
2.
Candidate span generation and filtering. Given the predicted valid boundaries, we construct an initial candidate set
S = { ( i , j ) i < j , P ( s i ) > θ , P ( e j ) > θ } .
We then leverage the hierarchical weight ω d associated with H i stru to compute a span confidence score and filter out low-quality candidates:
Score ( i , j ) = 1 j i + 1 k = i j ω d , k H k stru · w span ,
where ω d , k is the depth-aware weight produced by HAM-HGAT (with larger values assigned to more deeply nested tokens) and w span is the learnable weight vector for confidence estimation. An adaptive threshold θ span (optimized by the validation set) is applied, and only spans satisfying Score ( i , j ) > θ span are retained, yielding the final candidate span set S final .

3.3.2. Entity Type Classification

Utilizing the semantic features h i sem , we allocate an entity type label to each candidate span, guaranteeing that the predicted type aligns with the textual semantics.
1.
Span-level semantic feature aggregation. For a candidate span s i , j S final , we aggregate the semantic features of all tokens within the span via mean pooling to obtain a span-level representation:
 
h i , j sem = MeanPooling h k sem k = i j .
2.
Type probability prediction. A fully connected layer followed by a Softmax function is applied to produce the probability distribution over entity types for span ( i , j ) :
P type ( i , j ) = Softmax W c h i , j sem + b c ,
where W c R d fusion × K and b c are learnable parameters, and K denotes the number of entity categories (e.g., K = 7 for the ACE05 dataset). The predicted entity type is determined by the maximum-probability class (e.g., GPE, PER, LOC).

3.3.3. Nested Hierarchical Relation Annotation

Leveraging the original structural features F i (i.e., syntactic hierarchical depth), we determine the nesting relations among candidate spans and explicitly recover the hierarchical containment structure of entities.
1.
Computation of span nesting depth. F i contains the syntactic depth feature F i , d output by the SDTI module. For a candidate span s i , j , we define its nesting depth as the maximum token-level syntactic depth within the span:
depth ( i , j ) = max k [ i , j ] F k , d .
2.
Hierarchical containment decision. For any two candidate spans s i , j , s p , q S final , if the positional containment condition i p q j holds and depth ( i , j ) > depth ( p , q ) , then s i , j is identified as the parent span of s p , q (i.e., s p , q is nested within s i , j ). Otherwise, the two spans are treated as being at the same hierarchical level (no nesting relation is assigned).

3.3.4. Joint Loss Function and Output Format

1.
Multi-task joint objective. To achieve collaborative optimization over the three subtasks—span filtering, type classification, and hierarchy annotation—we define a weighted joint loss:
L total = 0.3 L boundary + 0.5 L class + 0.2 L hierarchy .
Here, L boundary denotes the binary cross-entropy loss for boundary prediction, which improves the accuracy of start/end detection; L class is the cross-entropy loss for entity type prediction in the multi-class setting; and L hierarchy is a contrastive loss over hierarchical relations, penalizing incorrect parent–child assignments. The weighting coefficients { 0.3 , 0.5 , 0.2 } are selected via grid search on the validation set, emphasizing type classification as the primary task while regularizing span quality and hierarchical consistency.
2.
Structured output format. The final prediction is represented as a set of entities with explicit nesting information:
E = { ( i , j , type , depth ) s i , j S final } ,
where ( i , j ) indicates the start and end token indices of the entity span, type is the predicted entity category (e.g., GPE, PER), and  depth denotes the nesting depth of the entity (with depth = 0 indicating no nesting).

4. Experimentation

In this section, we evaluate our method on three common nested NER datasets ACE2004, ACE2005, and GENIA.

4.1. Data Sets

In order to completely test the performance of the proposed model in the task of nested Named Entity Recognition, three representative standard datasets are selected: ACE2004, ACE2005 and GENIA. These three datasets cover distinct application domains and have the structure of multi-level and multi-type entity nesting, which are able to successfully evaluate the model’s capacity to recognize entities under complicated semantic relationships. We further evaluate MHGAT on KBP2017 and GermEval2014 to validate generalization across datasets and languages. Details as shown in the Table 1 and Table 2.
The ACE2004 dataset was generated by the Linguistic Data Consortium (LDC) and contains English (158,000 words) text classified for entities. The dataset has seven entity categories; ORG, GPE, PER, LOC, FAC, VEH, and WEA. More than 45% of the mentions create a nested structure with other mentions. We adopted the same approach as in the previous study by Wan [26] and divided the dataset into training, development and test sets in 8:1:1.
The ACE2005 dataset defines the same seven entity types as ACE2004. The distinction is that the ACE2005 dataset defines 6 types of coarse-grained inter-entity relationships, while the ACE2004 dataset defines 7 types of coarse-grained inter-entity relationships. Similarly, in this work, the ACE2005 dataset is divided into training, development and testing according to Wan [26].
The GENIA [37] dataset is derived from the biomedical domain and contains medical items manually annotated from PubMed literature. The dataset is published by the GENIA project and consists of five main entity types: DNA, RNA, cellline, celltype, and protein. The defining aspect of GENIA is the high density of nested entities, e.g., a “protein” item may be nested within a larger “cellline” description. For example, a “protein” entity may be nested within a lengthier “cellline” description. This structure imposes higher structural modeling skills on Named Entity Recognition models, and is ideal for use as a high-level benchmark for testing nested structure identification capabilities. We preprocessed the dataset using the same settings as Finkel [38] and Lu [14]. The dataset is separated into training set, development set and test set according to 8.1:0.9:1.
The KBP2017 [39] dataset is a component of the Knowledge Base Population challenge, concentrating on Named Entity Recognition and Entity Linking. It comprises news items in English that include numerous elements such as PER (person), LOC (place), ORG (organization), and temporal expressions. The dataset assesses models’ proficiency in entity recognition and their linkage to a knowledge base, focusing on cross-domain and cross-lingual issues.
The GermEval2014 dataset is a German-language Named Entity Recognition (NER) benchmark derived from Wikipedia and online news sources. It contains around 31,000 words and more than 590,000 tags, categorized into four types of named entities: PER (person), ORG (organization), LOC (place), and OTH/MISC (other/miscellaneous). It is extensively utilized for assessing NER models on German text, encompassing tasks that entail nested entities and cross-lingual generalization. For syntactic preprocessing on GermEval2014, we employ a German dependency parser from the Stanza toolkit (trained on UD German treebanks) to obtain dependency heads and relation labels, and we adopt the Berkeley Neural Parser (benepar) German constituency model benepar_de2 to generate constituency trees.

4.2. Assessment of Indicators

We apply a rigorous evaluation criteria to certify that an entity is correct when both the entity border and the entity label are right. We employ precision (P), recall (R) and F1 value (F) as evaluation measures with the following formula:
Precision = T P T P + F P 100 %
R e c a l l = T P T P + F N 100 %
F 1 = 2 P r e c i s i o n R e c a l l P r e c i s i o n + R e c a l l
Wherein TruePositive (TP) denotes the number of entities predicted by the model to match a real entity, FalsePositive (FP) denotes the number of entities predicted by the model to not match a real entity, and FalseNegative (FN) denotes the number of entities in a real entity that the model does not recognize as a real entity.

4.3. Baseline Model

In order to completely examine the performance of the approach suggested in this research, a variety of representative benchmark models were picked for the experimental section, covering the current mainstream methods for diverse modeling ideas.
Neural-layered [9]: Layer-by-layer recognition of nested entities by dynamically stacking planar NER layers.
Pyramid-Basic [16]: Layered prediction of entities of different lengths based on the pyramid structure to enhance inter-layer interactions.
TCSF [40]: Designing a network based on spanning relationships to improve classification using location features.
Biaffine [13]: A graph-based dependency resolution method is utilized to offer a comprehensive perspective of the input through a dual-simulation model.
BiFlaG [41]: Using BiLSTM and graph convolutional networks to jointly learn entity dependencies.
HGN [22]: Nested entities are considered as a whole and a hyperedge labeling method is used to avoid the multi-labeling problem.
Negative-samples [42]: Introducing IoU loss to deal with the hard negative-samples problem and alleviate data imbalance.
Span-level [26]: Enhancement of span representation by constructing span-level graphs through retrieval.
SRCNN [43]: Utilized a CNN to represent spatial relationships inside the score matrix.
PANNER [44]: Constructing heterogeneous graphs based on lexical information to enhance entity information modeling.
MLSG [19]: Designing a multi-label attention module to model the relationship between candidate labels for different states.
Span-prototype [45]: Constructing entity prototypes for each category based on a network of prototypes.
Span and Region [46]: Classification using Triaffine attention combining spanning boundaries and internal information.
BFSN2NER [47]: Focusing on contextual semantics and boundary categories to pinpoint entity spans.
NTAM/MAJM [48]: Adopting transitional attention mechanism and multi-marker fusion model respectively to improve the boundary judgment accuracy.
RLAN [49]: Employs a recursive label attention architecture with level-reflected label embeddings and inner-entity pre-training to explicitly model hierarchical nesting while alleviating error propagation.
2D-sentence [50]: Fusion of multi-scale 2D sentence representations encoding semantic features at different granularities.
SPLR [51]: Introduces a single-boundary-point, length-aware span framework enhanced by knowledge embedding strategies for improved long and same-type nested entity recognition.
GSSDAF [52]: Models and filters valid semantic dependencies among global spans through dependency-aware attention mechanisms.

4.4. Hyperparameter Configurations

In this study, the hyperparameters for the tree-based multidimensional heterogeneous graph attention network model are established as follows: The graph attention network (GAT) comprises three layers, each utilizing four attention heads, with a feature dimension of 128. The hierarchical perceptual attention mechanism employs two attention heads. Concerning semantic encoding and graph structure fusion, the embedding dimension of SpanBERT is established at 768, with fusion weights for semantic and structural features set at α = 0.6 and β = 0.4. Residual connections facilitate the flow of information and the amalgamation of features. In the training process, the learning rate is established at 2 × 10 5 , the batch size at 32, the weight decay at 1 × 10 4 , the maximum number of training epochs at 30, and the dropout ratio at 0.3 to mitigate overfitting and enhance the model’s robustness. We conducted several ablation experiments to assess the contributions of each module in the model, including the evaluation of the fusion of syntactic and dependency trees, the impact of multi-scale subgraph sampling, the role of hierarchical perceptual attention mechanisms, and the performance enhancement from the fusion of semantic and structural features. By utilizing these hyperparameter configurations and experimental frameworks, we successfully optimized the model for peak performance in nested entity recognition tasks.

4.5. Analysis of Experimental Results

This research conducted experiments on three representative public datasets—ACE2004, ACE2005, and GENIA—to thoroughly assess the overall performance of the proposed model MHGAT in the nested named entity identification task. We chose various prominent nested entity recognition models as benchmarks, including conventional sequence labeling techniques (e.g., BiLSTM-CRF), span classification approaches (e.g., Span-prototype and Span-level Graph), and graph structure modeling methods (e.g., BiFlaG and PANNER). The experimental findings are presented in Table 3.
In the ACE2004 dataset, MHGAT attained an F1 score of 88.9, surpassing the majority of models, particularly GSSDAF (2025) and SPLR (2025). The precision (P) was 89.3 and the recall (R) was 88.1, indicating a favorable equilibrium between precision and recall. The strengths of MHGAT arise from its multi-scale graph attention mechanism and hierarchical multi-head GAT, which allow the model to effectively capture intricate syntactic structures and dependencies, particularly in the context of nested entities. MHGAT comprehensively comprehends the multi-tiered interactions among entities via multi-scale sampling, guaranteeing high recall, while its optimized graph architecture significantly diminishes false positives, hence enhancing precision. BFSN2NER (2024) and MLSG (2023) attained F1 scores of 86.6 and 88.1, respectively, indicating superior performance. Nonetheless, MHGAT’s hierarchical perception and graph structure modeling shown enhanced efficacy in managing long-distance relationships and intricate entities.
On the ACE2005 dataset, MHGAT attained an F1 score of 87.9, once more outperforming its competitors. The precision (P) was 88.2, and the recall (R) was 87.6, nearing the performance of the Span-Region (2023) and Span-prototype (2023) models. In recall, MHGAT’s multi-level graph modeling effectively captured intricate entity interactions that conventional models may overlook. Although MHGAT has a little deficiency in precision (88.7) compared to Span-Region (2023), it excels in recall, especially in identifying multi-level links and nested entities. The Span-Region and Span-prototype models enhance precision and recall; nonetheless, they predominantly depend on sequential modeling and exhibit a deficiency in depth and hierarchical comprehension of graph structures. Consequently, MHGAT’s efficacy on the ACE2005 dataset illustrates that graph modeling capabilities provide substantial benefits in identifying multi-scale and intricate structures.
In the GENIA dataset, MHGAT attains an F1 score of 82.2, marginally inferior to SPLR (2025) and GSSDAF (2025), which exhibit F1 ratings of 86.9 and 86.1, respectively. Precision (P) is 83.2, while recall (R) is 81.1. While MHGAT excels in both precision and recall, there remains potential for enhancement regarding biological items within the GENIA dataset. Entities in GENIA, including proteins and gene names, generally exhibit more intricate structures and profound dependencies. Although MHGAT’s graph attention mechanism may identify certain associations, additional tuning is required for enhanced adaptation to the biological domain. Relative to SPLR (2025) and GSSDAF (2025), MHGAT’s F1 score on GENIA is marginally inferior. The advantage of SPLR and GSSDAF in entity recognition within the biomedical domain may stem from their employment of more precise semantic encoding and hierarchical characteristics while processing fine-grained entities.
Ultimately, MHGAT exhibits outstanding performance on the ACE2004 and ACE2005 datasets, particularly showcasing notable strengths in intricate entity detection and the capturing of long-distance dependencies. Its performance on the GENIA dataset is commendable; yet, there is potential for enhancement relative to the most recent SPLR (2025) and GSSDAF (2025). Future enhancements may be achieved by refining the model’s domain adaptability and the detailed modeling of graph structures to further improve its efficacy in biomedical domains and intricate entity recognition tasks.

4.6. Performance Comparison on KBP2017 and GermEval2014

Table 4 reports the performance comparison on KBP2017 and GermEval2014. On KBP2017, our model achieves the best overall result (87.4 F1) with a balanced precision/recall (87.5/87.3), substantially outperforming sequence labeling baselines such as LSTM-CRF (61.1 F1) and improving over recent structured baselines including BiFlaG (75.6 F1), Two-stage (84.1 F1), and Triaffine (85.5 F1). This gain is largely attributed to our dual-structure integration and explicit multi-scale subgraph attention: SDTI injects complementary constituency- and dependency-derived cues into a unified heterogeneous graph, while MSSA provides controllable receptive fields (local-to-global) that are critical for modeling nested mentions with varying structural ranges. Moreover, the hierarchical containment modeling encourages consistent parent–child structure, which is beneficial for densely nested settings such as KBP2017, leading to notably higher recall than span/graph baselines. On GermEval2014, our approach also yields the best performance (76.3 F1), surpassing Neural-layered (66.7 F1) and slightly improving over BiFlaG (75.1 F1). The improvement mainly comes from stronger structural encoding that raises precision (82.3), indicating that dual-tree cues help reduce boundary/type confusion in German nested entities. Meanwhile, recall (71.2) remains relatively lower than precision, which can be explained by the increased syntactic variability and potential parsing noise in cross-lingual preprocessing; nonetheless, the semantic–structure residual fusion stabilizes representation learning and maintains consistent gains over competitive baselines. Overall, these results demonstrate that MHGAT generalizes well to both cross-domain (KBP2017) and cross-lingual (GermEval2014) nested NER benchmarks, with particularly strong benefits in structurally complex and densely nested scenarios.

4.7. Deeper Analysis on GENIA Performance

Table 5 presents the stratified precision (P), recall (R), and F1 scores of MHGAT on the GENIA dataset. Performance typically diminishes with greater nesting depth, decreasing from 87.2 at depth = 0 to 80.2 at depth ≥ 2, suggesting that deeply nested items are more challenging to identify. Deeply nested entities necessitate the capture of long-range hierarchical dependencies, which are partially addressed by multi-scale subgraph attention and further accentuated by depth-aware attention modulation. Likewise, F1 scores diminish for longer entities (>10 tokens: 75.2) in contrast to shorter entities (1–2 tokens: 86.1), as longer entities necessitate the synthesis of information across a greater number of tokens; the multi-scale architecture enables the model to assimilate local, mid-range, and global context to alleviate this decline. High-frequency categories like DNA (F1 = 83.5) and Protein (F1 = 79.8) demonstrate superior performance, indicating adequate training data and efficient semantic-structure residual fusion, whereas low-frequency categories and rare entities (F1 = 70.7) pose challenges due to limited examples. The stratified analysis indicates that MSSA, depth-aware attention, and residual fusion enhance the model’s ability to manage intricate nested structures; however, entity depth, length, and frequency continue to affect performance.

4.8. Hierarchical Containment Evaluation

To directly evaluate the contribution of the hierarchical containment modeling in MHGAT, we introduce two focused metrics: (i) Parent–Child Containment F1 and (ii) Deep-Nested Entity F1. These metrics are designed to quantify the model’s ability to capture hierarchical relationships and recognize deep-nested entities.
For a given dataset, let E g o l d be the set of gold-standard parent–child entity pairs extracted from the annotated hierarchical structure, and E p r e d be the set of predicted parent–child pairs. The parent–child precision ( P p c ), recall ( R p c ), and F1 ( F 1 p c ) are defined as
P p c = | E g o l d E p r e d | | E p r e d | ,
R p c = | E g o l d E p r e d | | E g o l d | ,
F 1 p c = 2 · P p c · R p c P p c + R p c
where | · | denotes the number of edges, and E g o l d E p r e d counts the correctly predicted containment edges.
We define deep-nested entities as entities with nesting depth d 2 . Let D g o l d and D p r e d denote the sets of gold and predicted deep-nested entities. Precision ( P d e e p ), recall ( R d e e p ), and F1 ( F 1 d e e p ) are computed by exact span matching:
P d e e p = | D g o l d D p r e d | | D p r e d | ,
R d e e p = | D g o l d D p r e d | | D g o l d | ,
F 1 d e e p = 2 · P d e e p · R d e e p P d e e p + R d e e p
As shown in Table 6, MHGAT consistently improves both parent–child containment prediction and deep-nested entity recognition compared to the ablated model without hierarchical modeling. The parent–child F1 gain demonstrates that the hierarchical module effectively captures structured containment relations. The improvement in deep-nested F1 indicates that multi-scale subgraph attention combined with depth-aware modulation allows the model to better handle complex nested structures. These results substantiate the contribution of hierarchical containment modeling to nested NER performance.

4.9. Ablation Experiment

To assess the efficacy of the model’s module design and critical hyperparameters, we performed ablation experiments on the general domain dataset ACE2005 and the biomedical domain dataset GENIA.

4.9.1. Module Ablation Experiment

Module ablation seeks to assess the impact of various components on overall performance. Utilizing the comprehensive model as a benchmark, we systematically eliminate or substitute essential components individually and assess their performance under identical training and evaluation conditions to evaluate the influence of each module on nested entity span localization, category identification, and hierarchical relationship modeling. This experiment examines: the necessity of merging syntactic and dependency trees; the potential for multi-scale subgraph sampling to provide cross-scale structural information enhancement; the ability of hierarchical awareness attention to improve differentiation among entities with varying nesting depths; and the effectiveness of integrating semantic and structural residuals to mitigate the semantic disconnection issue arising from exclusive structural modeling. Particular experimental outcomes are presented in Table 7 and Figure 5.
The comprehensive model attains cutting-edge results on both ACE2005 (88.3) and GENIA (82.2), illustrating the effective synergy among the proposed SDTI dual-tree integration, multi-scale structural modeling, hierarchical perceptual attention, semantic/structural fusion, and candidate selection and hierarchical learning modules. Performance degradation predominantly occurs in four critical domains: structural entry quality, semantic enhancement capability, candidate span quality control, and joint training objectives. This suggests that the performance ceiling of nested entity recognition is collectively influenced by “reliable boundary candidates + complementary representations + hierarchical consistency constraints.”
SDTI serves as the basis for later modeling. The elimination of SDTI results in substantial deterioration (ACE: 88.3 → 86.9; GENIA: 82.2 → 80.2), signifying that integrating the mapping of syntactic tree and dependency tree data into a unified graph space is essential for maintaining structural anchors and hierarchical restrictions. Subsequent ablation research indicated that the elimination of either constituency or dependence resulted in diminished performance, as they respectively furnish phrase boundary constraints and long-distance dependency information. Moreover, GENIA exhibits heightened sensitivity to dependency, aligning with the occurrence of extensive modification chains and inter-phrase dependencies in biological literature.
Multi-scale structural propagation and hierarchical awareness attention are fundamental to deep nesting modeling. The reduction to a singular scale led to a notable decline in performance (ACE: 88.3 → 87.3; GENIA: 82.2 → 80.5), suggesting that dependence exclusively on local neighborhoods is inadequate for addressing the mid-to-long-range structural relationships necessary for deep nesting. The elimination of hierarchical awareness attention resulted in consistent degradation, indicating that hierarchical weighting can mitigate the “averaging” of information across several levels and enhance internal entity signals. Conversely, the elimination of gating fusion resulted in just a marginal reduction, suggesting that multi-scale information itself has a more substantial role, whereas the gating mechanism solely functions to adaptively distribute weights across scales to enhance robustness.
The semantic–structural fusion mechanism is essential for representation stability and type differentiation. The elimination of residual connections diminishes performance, suggesting that residuals can maintain essential signals and alleviate representation degradation during offset fusion. The elimination of SpanBERT semantic improvements leads to a more pronounced decline in performance (ACE: 88.3 → 86.9; GENIA: 82.2 → 80.1), indicating that structural encoding is more inclined towards boundary localization, whereas fine-grained category distinction is more dependent on semantic context. Moreover, GENIA’s type differentiation is more complex, rendering it more susceptible to semantic improvements.
The quality control and joint monitoring of candidates directly dictate the overall maximum limit. Eliminating double affine border screening leads to a more pronounced decline in performance on GENIA, suggesting that in contexts with denser nesting and more complex candidate combinations, a high-quality candidate set is essential for mitigating false positives. The loss ablation study further substantiates the need for boundary supervision: the most substantial performance decline transpires when solely classification loss is employed (ACE: 88.3 → 85.6; GENIA: 82.2 → 78.8), although there is a notable recovery upon the incorporation of boundary loss. Eliminating hierarchical connection learning leads to a small decline in performance, suggesting that its primary role is to enhance parent-child entity consistency, mitigate span conflicts, and improve the reliability of nested structures.
Table 8 quantifies the contribution of the three core modules. Removing SDTI yields the largest degradation, dropping F1 by 1.4 on ACE2005 (88.3 → 86.9) and 2.0 on GENIA (82.2 → 80.2), indicating that dual-tree feature integration is the most critical component, especially under biomedical domain complexity. Replacing MSSA with a single-scale encoder decreases F1 by 1.0 (ACE2005) and 1.7 (GENIA), confirming that explicit multi-scale modeling is essential for capturing cross-scale dependencies in nested entities. Finally, removing the semantic–structure residual fusion causes a smaller but consistent drop of 0.8 on ACE2005 and 1.0 on GENIA, suggesting it mainly stabilizes representation learning and improves robustness. Overall, SDTI and MSSA contribute the majority of the gains, while residual fusion provides complementary improvements.

4.9.2. Feature Encoding Dimension Ablation

To assess the influence of feature encoding dimension on model performance, while maintaining constant hyperparameters, we established the feature dimension d at 64, 96, 128, 192, and 256, and analyzed the outcomes on the ACE2005 and GENIA datasets. As shown in Figure 6, the experimental results and line graphs indicate that both curves demonstrate a pattern of initial increase, followed by stabilization and a slight decline, with optimal performance occurring at d = 128.
The most notable enhancement in model performance is observed when d increases from 64 to 128: the F1 score on ACE2005 rises from 87.5 to 88.3 (+0.8), while the F1 score on GENIA increases from 81.2 to 82.2 (+1.0). This suggests that in low-dimensional contexts, the model’s capacity to represent structural information, including syntactic and dependency relations as well as graph structure propagation, is constrained, hindering a comprehensive characterization of complex semantics and boundary cues. Increasing dimensionality appropriately can enhance node representation capacity and improve attention aggregation, resulting in stable gains.
As dimensionality increases to 192 and 256, the performance on both datasets does not show further improvement; rather, it exhibits a slight decline or variability. Specifically, ACE2005 scores are 88.2 and 88.1 at 192 and 256, respectively, while GENIA scores are 82.0 and 81.7. The line graph indicates that the ACE2005 curve approaches a plateau after d ≥ 96, suggesting that the model exhibits reduced sensitivity to dimensionality within this dataset. The decline in GENIA is significant, suggesting that in domain-specific data, high dimensionality tends to cause parameter redundancy and complicates training, which may result in mild overfitting or inadequate optimization, ultimately reducing generalization performance.
In conclusion, d = 128 optimally balances enhanced representational capacity with training stability and generalization, resulting in the highest F1 scores on both datasets (ACE2005: 88.3, GENIA: 82.2). Consequently, the experiments conducted in this paper will default to a feature encoding dimension of d = 128.

4.9.3. GAT Layer Ablation

Keeping constant hyperparameters, the number of stacked layers in a graph attention network (GAT) was adjusted at 1, 2, 3, 4, and 5 to test the effect on model performance. ACE2005 and GENIA datasets were compared. The experimental results are shown in Figure 7, with both curves “initially increasing with the number of layers, peaking at 3 layers, and then gradually declining,” providing a clear ideal GAT layer trade-off point for structural information modeling.
As layers increase from 1 to 3, performance improves: ACE2005’s F1 score climbs from 87.6 to 88.3 (+0.7), while GENIA’s rises from 81.2 to 82.2 (+1.0). This shows that shorter GATs, such as layer 1, can only aggregate neighborhoods within a limited range, preventing multi-hop dependency information from propagating and fusing in the graph structure. Increasing the number of layers helps the model leverage relational routes in the graph, improving structural and semantic feature representation and recognition performance.
As layers 4–5 grow, both datasets indicate a slight drop in performance: ACE2005 scores 88.2 and 88.0, whereas GENIA scores 82.0 and 81.6. ACE2005’s line graph shows a slower decline than GENIA’s. Deeper graph networks frequently oversmooth and diffuse noise. Node representations converge as layers propagate, reducing entity boundaries and class disparities. As information from distant or irrelevant neighborhoods is introduced and amplified, attention aggregation becomes more susceptible to noise interference. In scenarios with limited data scale or complex domain distributions, adding layers increases model complexity and complicates optimization, increasing the chance of generalization decline. Therefore, GENIA is more sensitive to layer count.
The 3-layer GAT has the greatest F1 scores on both datasets (ACE2005: 88.3, GENIA: 82.2), balancing structural this study. This further motivates our explicit multi-scale subgraph encoding, which preserves controllable receptive fields without relying on excessively deep propagation.

4.9.4. GAT Attention Head Number Ablation

To study how the multi-head attention mechanism in heterogeneous graph attention networks (GAT) affects joint structural–semantic modeling, we modify only the number of attention heads per GAT layer and leave all other hyperparameters fixed. In particular, set the head number to H { 1 , 2 , 4 , 8 } .
The experimental results are shown in Figure 8: ACE2005 and GENIA F1 scores continuously improve from 1 to 4 and peak at H = 4 . When the number of heads is increased to H = 8 , performance on both datasets degrades slightly, exhibiting a “increase-then-decrease” trend.
Our framework transforms the constituency tree and dependency tree into a heterogeneous graph and uses a three-layer GAT for message forwarding. For neighborhood aggregation, multi-head attention provides multiple parallel “views” to capture diverse structural cues and interaction patterns. This explains the continuous improvements from 1 to 4 for H. After the GAT, our model creates three subgraphs at different granularities/scales and combines them using hierarchy-aware attention, integrating multi-view representation. When H is too large (e.g., 8), heads may become redundant or create noisy aggregation. Increased parameterization makes optimization difficult and may degrade structural information propagation generalization. The F1 score drops little, with GENIA dropping more.

4.9.5. Multi-Scale Subgraph Attention Head Ablation

In this study, we examined the role of hierarchical perceptual attention in the semantic integration of three-scale subgraphs. We kept the heterogeneous graph construction methodology, three-layer GAT, and other hyperparameters constant, only changing the number of heads H { 1 , 2 , 4 } in the attention. Experimental results are shown in Figure 9. The F1 score for both datasets increases from 1 to 2, peaking at H = 2 . However, as the number of heads increases to 4, performance decreases, indicating an overall trend of “initial increase followed by decrease, albeit with minor fluctuations”.
After heterogeneous graph attention encoding, the model constructs three subgraphs of different scales and dimensions from the same graph and learns semantic representations for each. Multi-scale subgraph attention weights and fuses three-way subgraph representations. H = 1 allows only one fusion pattern, which prevents the simultaneous evaluation of complementing subgraph information at different scales, such as local structure cues and semantic consistency indications. When H = 2, the multi-head mechanism can simultaneously acquire two complementary fusion approaches, leading to enhanced stability in weighting and a broader integration of multi-view semantics, so achieving optimal performance. Since the fusion object is a fixed three-way subgraph representation, increasing H to 4 may cause weight allocation dispersion or head redundancy. This may increase training noise and instability, lowering performance slightly.

4.9.6. Two-Way Combination Verification

To further examine whether coupling exists between the encoding stage (heterogeneous GAT) and the multi-scale subgraph fusion stage (multi-scale attention/hierarchy-aware attention), we conduct a cross-combination study while keeping all other hyperparameters fixed. Specifically, the number of GAT attention heads and multi-scale attention heads are varied as H GAT { 1 , 2 , 4 , 8 } , H MS { 1 , 2 , 4 } .
The heatmap results on both datasets are shown in Figure 10, with the optimal performance achieved at ( H GAT , H MS ) = ( 4 , 2 ) , indicating that this configuration provides the best trade-off between representational capacity and training stability.
From the perspective of the GAT encoding stage (fixing H MS ), both ACE2005 and GENIA exhibit an increasing performance trend from 1 2 4 , followed by a slight decrease at 8. This behavior can be explained by the heterogeneous graph construction, where constituency and dependency trees are integrated and propagated through a three-layer GAT. Increasing the number of heads from 1 to 4 provides multiple aggregation views, enabling the model to capture syntactic boundaries, dependency relations, and cross-span interactions more comprehensively. However, when H GAT = 8 , redundancy and noisy aggregation among attention heads emerge, while optimization difficulty increases, leading to reduced generalization, particularly on GENIA, which is more sensitive to noise and training instability.
From the perspective of the multi-scale fusion stage (fixing H GAT ), H MS = 2 consistently yields the most stable performance, outperforming both H MS = 1 and H MS = 4 . This aligns with the design of the multi-scale subgraph modeling: after GAT encoding, three structural views are fused to learn complementary semantics. A single head ( H MS = 1 ) limits fusion capacity, whereas too many heads ( H MS = 4 ) disperse attention weights and introduce redundancy due to the fixed number of fusion branches.
Overall, the results suggest no strong coupling constraint between the two attention modules. The GAT encoder achieves optimal structural propagation at H GAT = 4 , while the fusion module reaches optimal semantic integration at H MS = 2 . Combining them yields the best performance on both datasets; therefore, the default setting used in subsequent experiments is ( H GAT , H MS ) = ( 4 , 2 ) .

4.9.7. Fusion Strategy in SDTI

To examine whether the feature fusion in the Syntax and Dependency Tree Integration (SDTI) layer is sufficient and well-justified, we compare our default fusion strategy against two stronger alternatives. As shown in Table 9, our method (simple concatenation followed by a learnable projection) achieves the best performance on both datasets, reaching 88.3 F1 on ACE2005 and 82.2 F1 on GENIA. Replacing concatenation with gated fusion results in a clear drop on ACE2005 (86.8, −1.5) and a smaller but consistent drop on GENIA (81.1, −1.1). Attention-weighted fusion performs better than gated fusion on ACE2005 (87.1) but yields the lowest GENIA score (80.5, −1.7 vs. ours). These results suggest that early fusion does not necessarily benefit from more complex interaction functions. Concatenation preserves heterogeneous structural cues from constituency and dependency sources without imposing strong coupling, while the subsequent graph encoder can learn task-specific interactions. In contrast, gating/attention introduces additional parameters and may over-emphasize noisy structural signals, which is particularly detrimental in the biomedical domain, leading to weaker generalization on GENIA.

4.10. Summary of Experiments

Experimental results indicate that MHGAT exhibits enhanced performance on ACE2004 and ACE2005, with F1 scores of 88.9 and 88.3, respectively, while sustaining consistent performance on GENIA at 82.2 F1, thereby illustrating a commendable equilibrium between precision and recall.
Ablation and hyperparameter analysis confirmed the efficacy of each module: dual-tree integration (SDTI), multi-scale structure propagation, hierarchical perceptual attention, and semantic enhancement with joint loss all significantly enhance performance; concurrently, there exists an optimal range for feature dimension and network depth, as excessively large or deep features may result in saturation or a decline in performance.

5. Conclusions

This study examines the obstacles in nested Named Entity Recognition, including the difficulty of consistently employing structural information and the limitations of single-scale modeling in addressing multi-layered nesting and long-range connections. It introduces a multidimensional heterogeneous graph attention model (MHGAT). The model employs SDTI to consistently represent the hierarchical restrictions of the syntactic tree and the inter-word relationships of the dependency tree inside a singular heterogeneous graph space. Moreover, it accomplishes cross-scale and cross-level information aggregation via multi-scale subgraph building and hierarchical perceptual attention. It concurrently integrates semantic enhancement and fusion processes to establish a comprehensive framework from structural modeling to entity prediction.
The experiments confirmed the efficacy of the technique on ACE2004, ACE2005, and GENIA. The overall results indicate that MHGAT demonstrates robust performance on general domain datasets, achieving F1 scores of 88.9 and 88.3 on ACE2004 and ACE2005, respectively, while sustaining a consistent performance of 82.2 F1 in the intricate nested context of GENIA. Ablation and hyperparameter tests further illustrate that elements such as dual-tree integration, multi-scale propagation, hierarchical perceptual attention, and joint loss are essential for enhancing performance. Future enhancements may be pursued in domains such as domain adaptability, more nuanced structural design, and the joint optimization of candidate quality and hierarchical consistency.

Author Contributions

Y.Z. developed the model and conducted the experiments; Y.X. collected and organized the materials; L.Z. provided supervision and guidance. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported in part by National Natural Science Foundation of China under Grant 62402309.

Data Availability Statement

The datasets used and analyzed during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Wang, Y.; Tong, H.; Zhu, Z.; Li, Y. Nested Named Entity Recognition: A Survey. ACM Trans. Knowl. Discov. Data (TKDD) 2022, 16, 108. [Google Scholar] [CrossRef] [Scilit]
  2. Fu, Q.; Zhang, S.; Zhang, Z.; An, Z.; Li, Z.; Wang, Y.; Liu, J. FOE-NER: Fish disease event extraction algorithm based on pseudo trigger words and event element data enhancement. Aquac. Int. 2024, 32, 4123–4139. [Google Scholar] [CrossRef] [Scilit]
  3. Li, D.; Yan, L.; Zhang, X.; Jia, W.; Ma, Z. EventKGE: Event knowledge graph embedding with event causal transfer. Knowl.-Based Syst. 2023, 278, 110917. [Google Scholar] [CrossRef] [Scilit]
  4. Munz, T.; Väth, D.; Kuznecov, P.; Vu, N.T.; Weiskopf, D. Visualization-based improvement of neural machine translation. Comput. Graph. 2022, 103, 45–60. [Google Scholar] [CrossRef] [Scilit]
  5. Oswal, S.; Soni, R.; Narvekar, O.; Pradha, A. Named entity recognition and aspect based sentiment analysis. Int. J. Comput. Appl. 2019, 178, 18–23. [Google Scholar] [CrossRef] [Scilit]
  6. Keung, P.; Lu, Y.; Bhardwaj, V. Adversarial learning with contextual embeddings for zero-resource cross-lingual classification and NER. arXiv 2019, arXiv:1909.00153. [Google Scholar]
  7. Liu, J.; Yang, Y.; He, H. Multi-level semantic representation enhancement network for relationship extraction. Neurocomputing 2020, 403, 282–293. [Google Scholar] [CrossRef] [Scilit]
  8. Lample, G.; Ballesteros, M.; Subramanian, S.; Kawakami, K.; Dyer, C. Neural architectures for named entity recognition. arXiv 2016, arXiv:1603.01360. [Google Scholar] [CrossRef] [Scilit]
  9. Ju, M.; Miwa, M.; Ananiadou, S. A neural layered model for nested named entity recognition. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; pp. 1446–1459. [Google Scholar]
  10. Straková, J.; Straka, M.; Hajič, J. Neural architectures for nested NER through linearization. arXiv 2019, arXiv:1908.06926. [Google Scholar] [CrossRef] [Scilit]
  11. Sohrab, M.G.; Miwa, M. Deep exhaustive model for nested named entity recognition. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing; Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; pp. 2843–2849. [Google Scholar]
  12. Jiang, D.; Ren, H.; Cai, Y.; Xu, J.; Liu, Y.; Leung, H.f. Candidate region aware nested named entity recognition. Neural Netw. 2021, 142, 340–350. [Google Scholar] [CrossRef] [Scilit]
  13. Yu, J.; Bohnet, B.; Poesio, M. Named entity recognition as dependency parsing. arXiv 2020, arXiv:2005.07150. [Google Scholar]
  14. Lu, W.; Roth, D. Joint mention extraction and classification with mention hypergraphs. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing; Association for Computational Linguistics: Stroudsburg, PA, USA, 2015; pp. 857–867. [Google Scholar]
  15. Muis, A.O.; Lu, W. Labeling gaps between words: Recognizing overlapping mentions with mention separators. arXiv 2018, arXiv:1810.09073. [Google Scholar] [CrossRef] [Scilit]
  16. Wang, J.; Shou, L.; Chen, K.; Chen, G. Pyramid: A layered model for nested named entity recognition. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics; Association for Computational Linguistics: Stroudsburg, PA, USA, 2020; pp. 5918–5928. [Google Scholar]
  17. Shibuya, T.; Hovy, E. Nested named entity recognition via second-best sequence learning and decoding. Trans. Assoc. Comput. Linguist. 2020, 8, 605–620. [Google Scholar] [CrossRef] [Scilit]
  18. Fei, H.; Ren, Y.; Ji, D. Dispatched attention with multi-task learning for nested mention recognition. Inf. Sci. 2020, 513, 241–251. [Google Scholar] [CrossRef] [Scilit]
  19. Su, J.; Yu, H. Unified named entity recognition as multi-label sequence generation. In 2023 International Joint Conference on Neural Networks (IJCNN); IEEE: New York, NY, USA, 2023; pp. 1–8. [Google Scholar]
  20. Katiyar, A.; Cardie, C. Nested named entity recognition revisited. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies; Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; Volume 1. [Google Scholar]
  21. Wang, B.; Lu, W. Neural segmental hypergraphs for overlapping mention recognition. arXiv 2018, arXiv:1810.01817. [Google Scholar] [CrossRef] [Scilit]
  22. Huang, H.; Lei, M.; Feng, C. Hypergraph network model for nested entity mention recognition. Neurocomputing 2021, 423, 200–206. [Google Scholar] [CrossRef] [Scilit]
  23. Shen, Y.; Ma, X.; Tan, Z.; Zhang, S.; Wang, W.; Lu, W. Locate and label: A two-stage identifier for nested named entity recognition. arXiv 2021, arXiv:2105.06804. [Google Scholar] [CrossRef] [Scilit]
  24. Zhu, E.; Li, J. Boundary smoothing for named entity recognition. arXiv 2022, arXiv:2204.12031. [Google Scholar] [CrossRef] [Scilit]
  25. Yuan, Z.; Tan, C.; Huang, S.; Huang, F. Fusing heterogeneous factors with triaffine mechanism for nested named entity recognition. arXiv 2021, arXiv:2110.07480. [Google Scholar]
  26. Wan, J.; Ru, D.; Zhang, W.; Yu, Y. Nested named entity recognition with span-level graphs. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2022; pp. 892–903. [Google Scholar]
  27. Shen, Y.; Tan, Z.; Wu, S.; Zhang, W.; Zhang, R.; Xi, Y.; Lu, W.; Zhuang, Y. PromptNER: Prompt locating and typing for named entity recognition. arXiv 2023, arXiv:2305.17104. [Google Scholar] [CrossRef] [Scilit]
  28. Shen, Y.; Song, K.; Tan, X.; Li, D.; Lu, W.; Zhuang, Y. Diffusionner: Boundary diffusion for named entity recognition. arXiv 2023, arXiv:2305.13298. [Google Scholar] [CrossRef] [Scilit]
  29. Wang, Y.; Utiyama, M. To be Continuous, or to be Discrete, Those are Bits of Questions. arXiv 2024, arXiv:2406.07812. [Google Scholar] [CrossRef] [Scilit]
  30. Zhao, L.; Xu, W.; Gao, S.; Guo, J. Cross-sentence N-ary relation classification using LSTMs on graph and sequence structures. Knowl.-Based Syst. 2020, 207, 106266. [Google Scholar] [CrossRef] [Scilit]
  31. Mrini, K.; Farcas, E.; Nakashole, N. Recursive tree-structured self-attention for answer sentence selection. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2021; pp. 4651–4661. [Google Scholar]
  32. Zhang, Z.; Wu, Y.; Zhou, J.; Duan, S.; Zhao, H.; Wang, R. SG-Net: Syntax-guided machine reading comprehension. In Proceedings of the AAAI Conference on Artificial Intelligence; AAAI Press: Washington, DC, USA, 2020; Volume 34, pp. 9636–9643. [Google Scholar]
  33. Fei, H.; Ren, Y.; Ji, D. Retrofitting structure-aware transformer language model for end tasks. arXiv 2020, arXiv:2009.07408. [Google Scholar] [CrossRef] [Scilit]
  34. Yang, Z.; Wan, X. Dependency-based mixture language models. arXiv 2022, arXiv:2203.10256. [Google Scholar] [CrossRef] [Scilit]
  35. Kitaev, N.; Cao, S.; Klein, D. Multilingual constituency parsing with self-attention and pre-training. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics; Association for Computational Linguistics: Stroudsburg, PA, USA, 2019; pp. 3499–3505. [Google Scholar]
  36. Huang, X.; Chan, K.H.; Wu, W.; Sheng, H.; Ke, W. Fusion of multi-modal features to enhance dense video caption. Sensors 2023, 23, 5565. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  37. Kim, J.D.; Ohta, T.; Tateisi, Y.; Tsujii, J. GENIA corpus—A semantically annotated corpus for bio-textmining. Bioinformatics 2003, 19, i180–i182. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  38. Finkel, J.R.; Manning, C.D. Nested named entity recognition. In Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing; Association for Computational Linguistics: Stroudsburg, PA, USA, 2009; pp. 141–150. [Google Scholar]
  39. Ji, H.; Pan, X.; Zhang, B.; Nothman, J.; Mayfield, J.; McNamee, P.; Costello, C.; Hub, S.I. Overview of TAC-KBP2017 13 Languages Entity Discovery and Linking. In Text Analysis Conference; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2017. [Google Scholar]
  40. Sun, L.; Sun, Y.; Ji, F.; Wang, C. Joint learning of token context and span feature for span-based nested NER. IEEE/ACM Trans. Audio Speech Lang. Process. 2020, 28, 2720–2730. [Google Scholar] [CrossRef] [Scilit]
  41. Luo, Y.; Zhao, H. Bipartite flat-graph network for nested named entity recognition. arXiv 2020, arXiv:2005.00436. [Google Scholar] [CrossRef] [Scilit]
  42. Liu, C.; Fan, H.; Liu, J. Handling negative samples problems in span-based nested named entity recognition. Neurocomputing 2022, 505, 353–361. [Google Scholar] [CrossRef] [Scilit]
  43. Yan, H.; Sun, Y.; Li, X.; Qiu, X. An embarrassingly easy but strong baseline for nested named entity recognition. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers); Association for Computational Linguistics: Stroudsburg, PA, USA, 2023; pp. 1442–1452. [Google Scholar]
  44. Zhou, L.; Li, J.; Gu, Z.; Qiu, J.; Gupta, B.B.; Tian, Z. PANNER: POS-aware nested named entity recognition through heterogeneous graph neural network. IEEE Trans. Comput. Soc. Syst. 2022, 11, 4718–4726. [Google Scholar] [CrossRef] [Scilit]
  45. Mu, J.; Ouyang, J.; Yao, Y.; Ren, Z. Span-prototype graph based on graph attention network for nested named entity recognition. Electronics 2023, 12, 4753. [Google Scholar] [CrossRef] [Scilit]
  46. Guo, Y.; Tang, T.; Sun, S.; Wu, Y.; Li, X. Nested Entity Recognition Fusing Span Relative Position and Region Information. Electronics 2023, 12, 2483. [Google Scholar] [CrossRef] [Scilit]
  47. Song, J.; Wang, X.; Zhang, H.; Li, B.; Wang, T. A Boundary Feature Enhanced Span-Based Nested Named Entity Recognition Method. In Web and Big Data; Asia-Pacific Web (APWeb) and Web-Age Information Management (WAIM) Joint International Conference on Web and Big Data; Springer: Singapore, 2024; pp. 3–17. [Google Scholar]
  48. Gao, N.; Yang, B.; Chen, P.; Qian, L. A multi-stage recognizer for nested named entity with weakly labeled data. J. Supercomput. 2024, 80, 3663–3693. [Google Scholar] [CrossRef] [Scilit]
  49. Kim, H.; Kim, H. Recursive label attention network for nested named entity recognition. Expert Syst. Appl. 2024, 249, 123657. [Google Scholar] [CrossRef] [Scilit]
  50. Guo, X.; Chen, Y.; Tang, R.; Zheng, Q. Camouflaged named entity recognition in 2D sentence representation. Expert Syst. Appl. 2024, 257, 125096. [Google Scholar] [CrossRef] [Scilit]
  51. Lu, H.; Yan, Q.; Wang, L. A single-point and length-representation-based model for nested named entity recognition. J. Supercomput. 2025, 81, 799. [Google Scholar] [CrossRef] [Scilit]
  52. Sun, Y.; Wang, X.; Wu, H.; Hu, M. Global Span Semantic Dependency Awareness and Filtering Network for nested named entity recognition. Neurocomputing 2025, 617, 129035. [Google Scholar] [CrossRef] [Scilit]
Figure 1. Nested named entities and flat named entities.
Figure 1. Nested named entities and flat named entities.
Electronics 15 01183 g001
Figure 2. A multi-scale heterogeneous graph attention network with syntactic and dependency tree structures.
Figure 2. A multi-scale heterogeneous graph attention network with syntactic and dependency tree structures.
Electronics 15 01183 g002
Figure 3. Syntax and Dependency Tree Integration Layer.
Figure 3. Syntax and Dependency Tree Integration Layer.
Electronics 15 01183 g003
Figure 4. Multi-scale Heterogeneous Graph Attention mechanism.
Figure 4. Multi-scale Heterogeneous Graph Attention mechanism.
Electronics 15 01183 g004
Figure 5. (a) Ablation results on ACE2005 in terms of F1 score across the full model and component-removed variants. (b) Ablation results on GENIA in terms of F1 score across the full model and component-removed variants.
Figure 5. (a) Ablation results on ACE2005 in terms of F1 score across the full model and component-removed variants. (b) Ablation results on GENIA in terms of F1 score across the full model and component-removed variants.
Electronics 15 01183 g005
Figure 6. Feature encoding dimension ablation.
Figure 6. Feature encoding dimension ablation.
Electronics 15 01183 g006
Figure 7. GAT layer ablation.
Figure 7. GAT layer ablation.
Electronics 15 01183 g007
Figure 8. GAT attention head number ablation.
Figure 8. GAT attention head number ablation.
Electronics 15 01183 g008
Figure 9. Multi-scale subgraph attention head ablation.
Figure 9. Multi-scale subgraph attention head ablation.
Electronics 15 01183 g009
Figure 10. F1 score heatmaps for combinations of GAT attention heads and multi-scale subgraph attention heads. (a) Results on the ACE2005 dataset. (b) Results on the GENIA dataset.
Figure 10. F1 score heatmaps for combinations of GAT attention heads and multi-scale subgraph attention heads. (a) Results on the ACE2005 dataset. (b) Results on the GENIA dataset.
Electronics 15 01183 g010
Table 1. Statistics of ACE2004, ACE2005 and GENIA datasets.
Table 1. Statistics of ACE2004, ACE2005 and GENIA datasets.
ACE2004ACE2005GENIA
Train Dev Test Train Dev Test Train Dev Test
sentenceTotal61987428097285968105815,02216691855
Nested271829438827973523393222328448
entitytotal22,0142501303424,8273234302847,02744695596
outermost15,6301725221518,6562501231342,55840304958
inner638477681961717337154469439642
Table 2. Basic statistics of KBP2017 and GermEval2014.
Table 2. Basic statistics of KBP2017 and GermEval2014.
DatasetSentencesEntitiesNested
Train Dev Test Train Dev Test Train Dev Test
KBP201710,546545426731,236187912,60187736053707
GermEval201424,0012199509931,5452886669331932891379
Table 3. Precision (P), recall (R) and F1 scores on ACE2004, ACE2005 and GENIA. “–” indicates that the indicator was not reported in the original text.
Table 3. Precision (P), recall (R) and F1 scores on ACE2004, ACE2005 and GENIA. “–” indicates that the indicator was not reported in the original text.
ModelsACE2004ACE2005GENIA
P R F1 P R F1 P R F1
Neural-layered (2018)74.270.372.278.571.374.7
Pyramid (2020)80.878.879.879.379.479.378.077.277.5
TCSF (2020)79.777.678.677.477.677.578.276.577.3
Biaffine (2020)87.386.086.785.285.685.481.879.380.5
BiFlaG (2020)75.075.275.177.474.676.0
HGN (2021)74.284.278.972.979.475.9
Negative-samples (2022)87.587.187.384.785.785.279.579.479.5
Span-levelGraph (2022)86.785.986.384.485.985.177.980.779.3
SRCNN (2022)84.985.384.684.985.485.181.079.380.5
PANNER (2022)84.173.978.7
MLSG (2023)88.987.488.288.187.687.580.080.580.3
Span-prototype (2023)87.287.487.385.786.286.079.580.079.7
Span and Region (2023)87.987.487.785.887.786.883.078.880.9
BFSN2NER (2024)81.382.882.578.480.679.575.075.475.2
NTAM (Weakly-sup.) (2024)80.581.280.871.282.376.3
MAJM (Weakly-sup.) (2024)82.380.781.574.380.277.1
RLAN (2024)87.486.186.787.286.686.984.282.783.5
2D-sentence (2024)88.787.888.387.087.887.483.080.581.7
SPLR (2025)85.083.384.186.289.087.579.480.079.6
GSSDAF (2025)87.786.286.985.786.786.183.281.182.1
Ours89.388.188.988.788.288.383.281.382.2
The bold formatting in the table is used to emphasize the best-performing experimental results.
Table 4. Performance comparison on KBP2017 and GermEval2014.
Table 4. Performance comparison on KBP2017 and GermEval2014.
ModelsKBP2017GermEval2014
P R F1 P R F1
Ours87.587.387.482.371.276.3
LSTM-CRF71.553.361.1---
Neural-layered---72.961.566.7
BiFlaG77.174.375.681.369.775.1
Two-stage85.482.684.1---
Triaffine86.583.685.5---
The bold formatting in the table is used to emphasize the best-performing experimental results.
Table 5. Stratified performance of MHGAT on GENIA by nesting depth, entity length, entity category, and rare entities.
Table 5. Stratified performance of MHGAT on GENIA by nesting depth, entity length, entity category, and rare entities.
DimensionGroupPRF1
Nesting Depthdepth = 088.586.087.2
depth = 184.381.883.0
depth ≥ 281.179.380.2
Entity Length1–2 tokens87.884.586.1
3–5 tokens83.580.081.7
6–10 tokens79.078.578.8
>10 tokens76.174.375.2
Entity CategoryProtein80.579.079.8
DNA85.381.883.5
RNA80.276.078.1
Cell line78.877.678.2
Cell type78.575.076.7
Rare EntitiesLow-sample73.068.570.7
Table 6. Hierarchical containment evaluation on GENIA and ACE2005. The results show the impact of hierarchical modeling on deep-nested entities and parent–child relation prediction.
Table 6. Hierarchical containment evaluation on GENIA and ACE2005. The results show the impact of hierarchical modeling on deep-nested entities and parent–child relation prediction.
DatasetMetricFull Modelw/o Hierarchical Module
ACE2005Parent–Child F185.280.3
ACE2005Deep-Nested F181.077.5
GENIAParent–Child F182.378.0
GENIADeep-Nested F178.574.2
Table 7. Ablation study (F1).
Table 7. Ablation study (F1).
Model VariantACE2005GENIA
Whole MHGAT88.382.2
w/o SDTI86.980.2
w/o constituency87.481.0
w/o dependency87.380.7
Single-scale87.380.5
w/o Hier-Attn87.580.4
w/o Gate87.981.6
w/o Residual87.581.2
w/o SpanBERT86.980.1
w/o Biaffine87.580.2
w/o hierarchy label86.881.2
Only L cls 85.678.8
L bd + L cls 87.881.5
Table 8. Core module contribution analysis (F1) on ACE2005 and GENIA. Δ F1 is computed relative to the full model (Whole MHGAT).
Table 8. Core module contribution analysis (F1) on ACE2005 and GENIA. Δ F1 is computed relative to the full model (Whole MHGAT).
Module (Ablation)ACE2005GENIA
F1 Δ F1 F1 Δ F1
Whole MHGAT88.30.082.20.0
w/o SDTI86.9−1.480.2−2.0
w/o MSSA (Single-scale)87.3−1.080.5−1.7
w/o semantic fusion87.5−0.881.2−1.0
Table 9. Comparison of SDTI feature fusion strategies on ACE2005 and GENIA.
Table 9. Comparison of SDTI feature fusion strategies on ACE2005 and GENIA.
Fusion Strategy (SDTI)ACE2005 F1GENIA F1
Ours88.382.2
Gated Fusion86.881.1
Attention-weighted Fusion87.180.5
The bold formatting in the table is used to emphasize the best-performing experimental results.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhao, Y.; Zhang, L.; Xu, Y. A Multi-Scale Heterogeneous Graph Attention Network for Nested Named Entity Recognition with Syntactic and Dependency Tree Structures. Electronics 2026, 15, 1183. https://doi.org/10.3390/electronics15061183

AMA Style

Zhao Y, Zhang L, Xu Y. A Multi-Scale Heterogeneous Graph Attention Network for Nested Named Entity Recognition with Syntactic and Dependency Tree Structures. Electronics. 2026; 15(6):1183. https://doi.org/10.3390/electronics15061183

Chicago/Turabian Style

Zhao, Yifan, Lin Zhang, and Yangshuyi Xu. 2026. "A Multi-Scale Heterogeneous Graph Attention Network for Nested Named Entity Recognition with Syntactic and Dependency Tree Structures" Electronics 15, no. 6: 1183. https://doi.org/10.3390/electronics15061183

APA Style

Zhao, Y., Zhang, L., & Xu, Y. (2026). A Multi-Scale Heterogeneous Graph Attention Network for Nested Named Entity Recognition with Syntactic and Dependency Tree Structures. Electronics, 15(6), 1183. https://doi.org/10.3390/electronics15061183

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop