Named entity recognition method based on two-dimensional semantic expansion

By constructing a named entity recognition method with two-dimensional semantic expansion, a lightweight network and semantic expansion module are used to capture local and global semantic information, solving the problem of recognizing nested and discontinuous entities and improving the performance of named entity recognition, especially in long named entity recognition tasks.

CN119990131BActive Publication Date: 2026-07-31GUIZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU UNIV
Filing Date
2025-01-16
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing named entity recognition methods have low feature utilization when dealing with nested and discontinuous entities, and cannot make full use of labeled data. Furthermore, the overlapping of semantic plane elements in the two-dimensional representation leads to semantic ambiguity, making it difficult to effectively recognize long named entities.

Method used

A named entity recognition method based on two-dimensional semantic expansion is constructed. It captures local and global semantic information through an encoding module, a semantic focusing module, and a gating integration module. It extracts features using a lightweight network and a semantic expansion module, filters redundant information using a gating integration module, and uses a multilayer perceptron for prediction.

Benefits of technology

It improves the performance of named entity recognition, especially in long named entity recognition and nested entity recognition tasks, enhancing the quality of feature representation and recognition accuracy, and solving the problems of semantic dispersion and ambiguity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990131B_ABST
    Figure CN119990131B_ABST
Patent Text Reader

Abstract

This invention discloses a named entity recognition method based on two-dimensional semantic expansion, belonging to the field of natural language processing technology. The method includes: S1, constructing a model architecture consisting of an encoding module, a semantic focusing module, and a gating integration module; S2, mapping an original sentence to a two-dimensional sentence representation through the encoding module; S3, capturing local feature information and global semantic information of the two-dimensional sentence representation through the semantic focusing module; and S4, fusing different feature information through the gating integration module to obtain the final feature representation for prediction. The named entity recognition method based on two-dimensional semantic expansion provided by this invention addresses the problems of dispersed and ambiguous semantics across different dimensions. By using a semantic expansion module, it enhances local semantic information, achieving more refined feature extraction. Furthermore, by constructing a lightweight network architecture to capture global information from the two-dimensional representation, it further improves the quality of feature representation, thereby better recognizing long named entities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a named entity recognition method based on two-dimensional semantic expansion. Background Technology

[0002] Named Entity Recognition (NER) is a fundamental task in Natural Language Processing (NLP) that aims to identify named entities from unstructured text. This task is widely used to support other NLP tasks, such as relation extraction, entity linking, and knowledge graph construction. NER tasks are mainly divided into three categories: flat named entity recognition, nested named entity recognition, and discontinuous named entity recognition. Flat named entity recognition only detects continuous entity spans and their semantic categories in text. In nested named entity recognition, a single lexical unit can belong to multiple different named entities. Discontinuous named entity recognition handles the identification of entities composed of multiple discontinuous segments in text.

[0003] Traditional sequence structures typically represent sentences as a sequential lexical structure, but this structure struggles to effectively address nested entity recognition problems with complex structures. For example, "immunoglobulin enhancer" is a biomedical named entity, where "immunoglobulin" represents a protein that is the target of the enhancer. A sequential lexical structure can only assign one label to each lexical, which can easily lead to garbled lexical representations and thus degrade the performance of named entity recognition.

[0004] Existing named entity recognition methods can be mainly divided into sequence-based methods, hypergraph-based methods, and hierarchical methods.

[0005] Sequence-based methods address named entity recognition tasks through various tagging schemes. These methods typically use neural network models (such as CNNs and Transformers) for representation, followed by classification via a CRF layer. Hypergraph-based methods transform each sentence into a graph structure to address nested semantic structures. In hierarchical methods, nested named entities are decomposed into different layers or entity types, and then extracted from each layer or type using a separate sequence model.

[0006] A sentence can be transformed into a two-dimensional representation. This two-dimensional representation method has the ability to unfold the sentence semantics into a plane to solve nested semantic structures. In the planar sentence representation, all possible entity spans in the sentence can be organized into a matrix. Each element in the matrix corresponds to a possible entity span in the sentence. This representation helps handle nested entities and discontinuous entities. However, the above method still has the following shortcomings: (1) Sequence-based methods have low feature utilization in named entity recognition tasks and cannot fully utilize manually labeled data during training; models that convert the original sentence structure into other non-sequence structures all show low performance. The main reason is that this method relies heavily on prior knowledge when converting nested named entities into non-sequence structures, and this conversion method may destroy the internal semantic structure of the sentence, thus leading to a decrease in model performance.

[0007] (2) The hierarchical model also showed lower performance. The main reason is that the nested named entities are decomposed into different levels or types and then identified by independent classifiers, which does not make full use of the information in the labeled corpus.

[0008] (3) In the method of converting a sentence into a two-dimensional representation, adjacent elements in the semantic plane represent overlapping phrases in the sentence. They contain the same lexical units and share the same contextual features. This dispersed semantics can cause the semantics of the true span to become blurred in the entire context. In addition, since the entity is represented by the span in the two-dimensional representation, when the entity is long, the span contains more words, which leads to more severe semantic weakening, thereby reducing the performance of long named entity recognition. Summary of the Invention

[0009] The purpose of this invention is to provide a named entity recognition method based on two-dimensional semantic expansion to solve the problem of two-dimensional sentence representation in the aforementioned background art.

[0010] To achieve the above objectives, this invention provides a named entity recognition method based on two-dimensional semantic expansion, comprising the following steps: S1. Construct a model architecture consisting of an encoding module, a semantic focusing module, and a gating integration module; S2. The encoding module maps a raw sentence into a two-dimensional sentence representation. S3. Capture local feature information and global semantic information of two-dimensional sentence representation through the semantic focusing module; S4. By fusing different feature information through the gating integration module, the final feature representation is obtained and prediction is performed.

[0011] The semantic focusing module in step S3 consists of a lightweight network module for capturing global semantic information, a semantic expansion module for capturing local feature information, and a semantic learning module for feature learning. The lightweight network module extracts features from the two-dimensional semantic plane using a convolutional neural network, thus representing the sentence in two dimensions. Before being fed into the convolutional neural network, a Stem block is used for feature smoothing. The Stem block can enhance important features while reducing overfitting. The Stem block consists of a 7×7 convolution with an output channel size of 256, a batch normalization layer, and an activation function, defined as: (3) in, This is the output of the Stem block; It is a convolutional network with a stride of 1 and a size of 7×7; It is a batch processing normalization layer; It is a ReLU activation function; The lightweight network module consists of a deep convolutional module and a channel-based MLP module. The input of the MLP module is the output of the deep convolutional module. A channel scaling operation and a DropPath operation are applied after both modules to improve the generalization and robustness of the extracted features. In the deep convolution module, the output features from the Stem block First, a group normalization layer is used to group the feature maps along the channel dimension. After grouping... Input a depthwise convolutional layer, after passing through the depthwise convolutional layer, Perform channel scaling and DropPath operations, and then implement feature representation. The residual connection is defined as: (4) in, It is the output of the depthwise convolution module; It is a group normalization operation; It is a depthwise convolution with a kernel size of 1×1; The input to the MLP module comes from the output features of the deep convolution module. , First, the data is processed through a group normalization layer. Then, a channel MLP is implemented on these features. Compared to spatial MLP, channel MLP not only effectively reduces computational complexity but also meets the requirements of entity recognition tasks. Following channel MLP, channel scaling, DropPath operations, and... The residual connection is defined as: (5) in, It is a channel MLP; The semantic expansion module uses the nearest neighbor interpolation algorithm to set the expansion coefficient of the two-dimensional sentence to... The output of each expansion operation is calculated as follows: ; (6) in, It is a round-down operation; It is an element (or span) in a two-dimensional sentence representation; two-dimensional sentence representation After the expansion operation, the output is It is expressed as follows: (7) in, It is the dimension of the generated sentence representation.

[0012] Preferably, step S2 specifically includes: Suppose the sentence input to the model is ,in, It is the first sentence Each word element, It is a sentence The length of the sentence; to better encode the semantic information of words and their contextual features, a pre-trained language model is used. Obtain the vector representation of the sentence Defined as: (1) in, , It is a dimension represented by a token; Vector generation using a multi-head biaffine method Two-dimensional representation, using It means that, among them, The elements in are denoted as , It is the input sentence A span representation, where i and j are token indices, is used to encode entity boundaries. After encoding the entity boundaries, a two-dimensional representation of the sentence is obtained by performing a biaffine transformation on the two boundary representations of the potential named entities. Design two multilayer perceptrons to represent vectorized sentences. The inputs are fed into two multilayer perceptrons to learn start and end boundary representations for the same lexical unit but with different semantics. The encoded start and end boundary feature vectors are then integrated into a two-dimensional sentence representation using a multi-head biaffine method, defined as: (2) in, , h It is the size of the hidden layer. It is a multi-headed dual affine network.

[0013] Preferably, after the two-dimensional sentence representation is processed by a lightweight network and semantic expansion, in order to better extract the semantic dependencies between adjacent elements, the semantic learning module employs an independent convolutional layer to learn higher-order semantic features. This convolutional layer consists of a two-dimensional CNN with K convolutional kernels, layer normalization operations, and a ReLU activation function, defined as follows: (8) in, , and Represents the output vector of the convolution; This represents the GELU activation function. r It is the feature size.

[0014] Preferably, the gating integration module will output the semantic focusing module's output. , and Standardization and integration are carried out, specifically as follows: Regarding the scale change in the semantic expansion module operation, the original size is enlarged. To reduce the size to its original size by a factor of 1, it is defined as: (9) in, express One element is the magnified The maximum value among window elements; This indicates that the original size has been restored. The ensemble step aims to filter out redundant information and select important clues from different representations. After normalization, feature vectors output by BERT are used to generate the final sentence representation. It integrates the semantic information of a sentence, and... The sentence representation is input as a global input to the gating integration module to control the weights. The final two-dimensional sentence representation is calculated as follows: (10) (11) in, , These are learnable parameters; It is the combined weight of different input features; It is an activation function; , r It is the eigenvalue, the element in matrix M. It represents a vector representation of a span of the input sentence X, which simultaneously encodes both finer and coarser sentence semantics between different feature representations.

[0015] Preferably, to avoid performance degradation due to increased network depth, two-dimensional semantic representation is used. Add to In order to reduce the gradient vanishing problem, a multilayer perceptron is then used to compute the final prediction result, defined as: (12) in, Represents the predicted probability for all entity types; Consists of a linear layer and a composition; Calculate the loss using binary cross-entropy: (13) in, It is the number of tokens in the sentence; It indicates the span. A binary vector of the real entity label. i and j It is a lexical index. It is the span The predicted probability.

[0016] Therefore, the above-mentioned named entity recognition method based on two-dimensional semantic expansion, adopted in this invention, has the following beneficial effects: (1) A local semantic expansion method is proposed, which enhances local semantic information by capturing local features in two-dimensional sentence representation, thereby achieving more refined feature extraction and solving the problem of entity semantics being scattered and semantic ambiguity in the span; (2) Construct a lightweight network architecture to further improve the quality of feature representation by capturing global information of two-dimensional representation, thereby better realizing the recognition of long named entities and solving the problem of semantic weakening when the entity is long; (3) A gating integration module is used to fuse different feature information to obtain the final feature representation.

[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the model architecture of the named entity recognition method based on two-dimensional semantic expansion of the present invention; Figure 2 This is a schematic diagram illustrating the entity recognition performance of different lengths in an embodiment of the present invention. Detailed Implementation

[0019] The following detailed description of embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0020] Please see Figure 1 The named entity recognition method based on two-dimensional semantic expansion includes the following steps: S1. Construct a model architecture consisting of an encoding module, a semantic focusing module, and a gating integration module; S2. The encoding module uses a pre-trained language model and a multi-head dual affine layer to map a raw sentence into a two-dimensional sentence representation. S3. By capturing local feature information and global semantic information of two-dimensional sentence representation through the semantic focusing module, the quality of feature representation is improved; S4. The gating integration module fuses different feature information to obtain the final feature representation for prediction. Specifically: I. Encoding Module Suppose the sentence input to the model is ,in, It is the first sentence Each word element, It is a sentence The length of the sentence; in order to better encode the semantic information of words and their contextual features, this embodiment uses a pre-trained language model. Obtain the vector representation of the sentence Defined as: (1) in, , It is a dimension represented by a token; This embodiment, based on the planarized sentence representation method proposed in the prior art, uses a multi-head biaffine method to generate vectors. Two-dimensional representation, using It means that, among them, The elements in are denoted as , It is the input sentence A span representation, i and jThe token index is considered as a potential named entity representation. Secondly, prior art 2 proposes that entity boundaries are well-defined and distinguishable, and that these boundaries contain contextual features of the potential named entities. Therefore, our model encodes entity boundaries to obtain more informative features. After encoding the entity boundaries, we obtain a two-dimensional representation of the sentence by performing a biaffine transformation on the two boundary representations of the potential named entities. .

[0021] This embodiment designs two types of multilayer perceptrons to represent vectorized sentences. The inputs are fed into two multilayer perceptrons to learn start and end boundary representations for the same lexical unit but with different semantics. The encoded start and end boundary feature vectors are then integrated into a two-dimensional sentence representation using a multi-head biaffine method, defined as: (2) in, , h It is the size of the hidden layer. It is a multi-headed dual affine network.

[0022] II. Semantic Focus Module The semantic focusing module consists of a lightweight network module for capturing global semantic information, a semantic expansion module for capturing local feature information, and a semantic learning module for feature learning.

[0023] 1. Lightweight network module Convolutional neural networks (CNNs) can extract features from the two-dimensional semantic plane. Compared to traditional CNNs, lightweight networks accelerate and compress CNNs by fusing depthwise convolutions with channeled multiplication tables (MLPs), thereby improving the quality of feature representation.

[0024] In the two-dimensional representation of sentences Before being fed into the convolutional neural network, a Stem block is used for feature smoothing. The Stem block can enhance important features while reducing overfitting. The Stem block consists of a 7×7 convolution with an output channel size of 256, a batch normalization layer, and an activation function, defined as: (3) in, This is the output of the Stem block; It is a convolutional network with a stride of 1 and a size of 7×7; It is a batch processing normalization layer; It is a ReLU activation function; The lightweight network module consists of a deep convolutional module and a channel-based MLP module. The input of the MLP module is the output of the deep convolutional module. A channel scaling operation and a DropPath operation are applied after both modules to improve the generalization and robustness of the extracted features. In the deep convolution module, the output features from the Stem block First, a group normalization layer is used to group the feature maps along the channel dimension. After grouping... Input a depthwise convolutional layer, after passing through the depthwise convolutional layer, Perform channel scaling and DropPath operations, and then implement feature representation. The residual connection is defined as: (4) in, It is the output of the depthwise convolution module; It is a group normalization operation; It is a depthwise convolution with a kernel size of 1×1; The input to the MLP module comes from the output features of the deep convolution module. , First, the data is processed through a group normalization layer. Then, a channel MLP is implemented on these features. Compared to spatial MLP, channel MLP not only effectively reduces computational complexity but also meets the requirements of entity recognition tasks. Following channel MLP, channel scaling, DropPath operations, and... The residual connection is defined as: (5) in, It is a channel MLP. In this embodiment, for ease of representation, the channel scaling operation and DropPath operation in formula (5) and formula (6) are omitted.

[0025] 2. Semantic Expansion Module The semantic expansion module employs the nearest neighbor interpolation algorithm proposed in the third existing technology, setting the expansion coefficient of the two-dimensional sentence as follows: The output of each expansion operation is calculated as follows: ; (6) in, It is a round-down operation; It is an element (or span) in a two-dimensional sentence representation; two-dimensional sentence representation After the expansion operation, the output is It is expressed as follows: (7) in, It is the dimension of the generated sentence representation.

[0026] 3. Semantic Learning Module After the two-dimensional sentence representation is processed by a lightweight network and semantic expansion, the semantic learning module employs a separate convolutional layer to learn higher-order semantic features in order to better extract the semantic dependencies between adjacent elements. This convolutional layer consists of a two-dimensional CNN with K convolutional kernels, layer normalization operations, and a ReLU activation function, defined as follows: (8) in, , and Represents the output vector of the convolution; This represents the GELU activation function. r It is the feature size.

[0027] III. Door Control Integration Module The semantic focusing module output three matrices. , and These representations carry different information. This embodiment employs a gating integration module to filter redundant information from the three representations and select valid information for integration. Since the size of the original two-dimensional sentence representation changes during semantic expansion, the gating integration module consists of two steps: normalization and integration. The normalization step converts the altered two-dimensional sentence representation into the same dimension as the other representations, enabling the subsequent integration process to proceed smoothly. The integration step combines the representations carrying different information.

[0028] Regarding the scale change in the semantic expansion module operation, the original size is enlarged. To reduce the size to its original size by a factor of 1, it is defined as: (9) in, express One element is the magnified The maximum value among window elements; This indicates that the original size has been restored. The ensemble step aims to filter out redundant information and select important clues from different representations. After normalization, feature vectors output by BERT are used to generate the final sentence representation. It integrates the semantic information of a sentence, and... The sentence representation is input as a global input to the gating integration module to control the weights. The final two-dimensional sentence representation is calculated as follows: (10) (11) in, , These are learnable parameters; It is the combined weight of different input features; It is an activation function; , r It is the eigenvalue, the element in matrix M. It represents a vector representation of a span of the input sentence X, which simultaneously encodes both finer and coarser sentence semantics between different feature representations.

[0029] IV. Loss Function To avoid performance degradation due to increased network depth, two-dimensional semantic representation is used. Add to In order to reduce the gradient vanishing problem, a multilayer perceptron is then used to compute the final prediction result, defined as: (12) in, Represents the predicted probability for all entity types; Consists of a linear layer and a composition; Calculate the loss using binary cross-entropy: (13) in, It is the number of tokens in the sentence; It indicates the span. A binary vector of the real entity label. i and j It is the index of the token. It is the span The predicted probability.

[0030] Unlike traditional span-based models, this embodiment organizes all possible entity span representations of a sentence into a two-dimensional sentence plane. Based on this, this embodiment proposes a named entity recognition method based on two-dimensional semantic expansion. This method captures semantic information of the two-dimensional plane through semantic expansion operations and a lightweight network, improving the quality of feature representations and enabling the differentiation between true spans and background cues. Furthermore, compared to traditional convolutional networks, the lightweight network module can achieve convolution compression and acceleration, effectively improving the neural network's ability to discriminate information, thereby further enhancing the performance of named entity recognition. As shown in Table 3, using the same pre-trained language model, the model proposed in this embodiment achieves F1 scores of 88.16%, 87.25%, and 81.55% on the ACE2004 and ACE2005 datasets, respectively, representing improvements of 0.42%, 0.34%, and 0.15% compared to previous work. After changing the pre-trained language model, the F1 scores of the model in this embodiment on the ACE2004 and ACE2005 datasets further improve to 88.87% and 88.52%, respectively. These experimental results are all superior to the comparison models, demonstrating the effectiveness of the model presented in this paper in the nested named entity recognition task.

[0031] To verify the scalability of the model in this embodiment across different languages, it was evaluated on two Chinese datasets: the Resume dataset and the Weibo dataset. In the experiments on the Chinese datasets, this embodiment adopted the officially provided training, validation, and test set partitioning. The experimental results are shown in Tables 1 and 2.

[0032] Table 1 Performance of the Resume dataset

[0033] Table 2 Performance of the Weibo dataset

[0034] As shown in Tables 1 and 2, the F1 score on the resume dataset reaches 96.49%, which is 0.38% higher than the F1 score of Lexicon AugmentedNER. The performance on the Weibo dataset is 72.84%, which is 0.46% higher than End-to-End NER in terms of F1 score. These results demonstrate that the joint learning of global and local information in two-dimensional sentences is also effective for semantic structures in other planes.

[0035] Table 3 Experimental results for the English dataset

[0036] Compared to the comparative model, the model in this embodiment shows improvements in all aspects. The improvement stems from the fact that in two-dimensional sentence representation, adjacent spans are semantically similar and share the same contextual features, leading to semantic dispersion and ambiguity in the true entity spans. This embodiment's model extracts global and local information from the two-dimensional sentence plane through local semantic expansion and lightweight network operations, enhancing the semantic representation of the sentence and achieving more refined and holistic semantic features. Furthermore, this embodiment's model also employs a gating ensemble module to filter redundant information in different semantic feature representations, retaining more valuable information and improving the quality of feature representation. Therefore, the model in this embodiment achieves a significant improvement.

[0037] To address the issues of semantic dispersion, semantic ambiguity, and semantic weakening in long named entities, this embodiment introduces semantic expansion and a lightweight network within the semantic focusing module. This module achieves the recognition of named entities of varying lengths by jointly capturing global and local semantic information in the semantic plane. To verify the effectiveness of this model in recognizing named entities of different lengths, the proposed model was compared with a contrasting model using entities of varying lengths on the ACE2004 dataset. Performance for different named entity lengths is shown below. Figure 2 As shown.

[0038] As shown in the figure, the performance of named entity recognition gradually decreases with increasing named entity length. This is mainly due to the vanishing gradient problem, which makes it difficult to encode semantic dependencies in longer named entities. However, compared with the contrasting models, the proposed model exhibits higher performance. Notably, the performance of the contrasting models drops significantly with increasing named entity length, while the proposed model maintains stable performance even when the named entity length is greater than 8.

[0039] Therefore, this invention adopts the aforementioned named entity recognition method based on two-dimensional semantic expansion. To address the problems of entity semantics being scattered and ambiguous across the span, it proposes a local semantic expansion method to enhance local semantic information and achieve more refined feature extraction. By constructing a lightweight network architecture to capture global information from two-dimensional representations, the quality of feature representation is further improved, thereby better recognizing long named entities.

[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A named entity recognition method based on two-dimensional semantic expansion, characterized in that, Includes the following steps: S1. Construct a model architecture consisting of an encoding module, a semantic focusing module, and a gating integration module; S2. The encoding module maps a raw sentence into a two-dimensional sentence representation. S3. Capture local feature information and global semantic information of two-dimensional sentence representation through the semantic focusing module; S4. By fusing different feature information through the gating integration module, the final feature representation is obtained and prediction is performed; The semantic focusing module in step S3 consists of a lightweight network module for capturing global semantic information, a semantic expansion module for capturing local feature information, and a semantic learning module for feature learning. The lightweight network module extracts features from the two-dimensional semantic plane using a convolutional neural network, thus representing the sentence in two dimensions. Before being fed into the convolutional neural network, a Stem block is used for feature smoothing. The Stem block consists of a 7×7 convolution with an output channel size of 256, a batch normalization layer, and an activation function, defined as follows: ; in, This is the output of the Stem block; It is a convolutional network with a stride of 1 and a size of 7×7; It is a batch processing normalization layer; It is a ReLU activation function; The lightweight network module consists of a deep convolutional module and a channel-based MLP module. The input of the MLP module is the output of the deep convolutional module, and a channel scaling operation and a DropPath operation are applied after both modules. In the deep convolution module, the output features from the Stem block First, a group normalization layer is used to group the feature maps along the channel dimension. After grouping... Input a depthwise convolutional layer, after passing through the depthwise convolutional layer, Perform channel scaling and DropPath operations, and then implement feature representation. The residual connection is defined as: ; in, It is the output of the depthwise convolution module; It is a group normalization operation; It is a depthwise convolution with a kernel size of 1×1; The input to the MLP module comes from the output features of the deep convolution module. i and j are the indices of the token. First, the data is processed using a group normalization layer. Then, a channel MLP is implemented on these features. Following the channel MLP, channel scaling, DropPath operations, and... The residual connection is defined as: ; in, It is a channel MLP; The semantic expansion module uses the nearest neighbor interpolation algorithm to set the expansion coefficient of the two-dimensional sentence to... The output of each expansion operation is calculated as follows: ; in, It is a round-down operation; It is an element in a two-dimensional sentence representation; two-dimensional sentence representation After the expansion operation, the output is It is expressed as follows: ; in, It is the dimension of the generated sentence representation.

2. The named entity recognition method based on two-dimensional semantic expansion according to claim 1, characterized in that, Step S2 is as follows: Suppose the sentence input to the model is ,in, It is the first sentence Each word element, It is a sentence The length; using a pre-trained language model. Obtain the vector representation of the sentence Defined as: ; in, , It is a dimension represented by a token; Vector generation using a multi-head biaffine method Two-dimensional representation, using It means that, among them, The elements in are denoted as , It is the input sentence A span representation, where i and j are token indices, is used to encode entity boundaries. After encoding the entity boundaries, a two-dimensional representation of the sentence is obtained by performing a biaffine transformation on the two boundary representations of the potential named entities. Design two multilayer perceptrons to represent vectorized sentences. The inputs are fed into two multilayer perceptrons to learn start and end boundary representations for the same token but with different semantics. The encoded start and end boundary feature vectors are then integrated into a two-dimensional sentence representation using a multi-head biaffine method, defined as: ; in, , h It is the size of the hidden layer. It is a multi-headed dual affine network.

3. The named entity recognition method based on two-dimensional semantic expansion according to claim 1, characterized in that, The semantic learning module employs a separate convolutional layer to learn high-order semantic features. This convolutional layer consists of a two-dimensional CNN with K convolutional kernels, layer normalization operations, and a ReLU activation function, defined as follows: ; in, , and Represents the output vector of the convolution; This represents the GELU activation function. r It is the feature size.

4. The named entity recognition method based on two-dimensional semantic expansion according to claim 3, characterized in that, The gating integration module will output the semantic focusing module. , and Standardization and integration are carried out, specifically as follows: Regarding the scale change in the semantic expansion module operation, the original size is enlarged. To reduce the size to its original size by a factor of 1, it is defined as: ; in, express One element is the magnified The maximum value among window elements; This indicates that the original size has been restored. After normalization, the feature vector output by BERT is used. ,Will As a global sentence representation input into the gating integration module, the final two-dimensional sentence representation is calculated as follows: ; ; in, , These are learnable parameters; It is the combined weight of different input features; It is an activation function; , r It is the eigenvalue, the element in matrix M. It represents a vector representation of a span of the input sentence X, which simultaneously encodes the sentence semantics between different feature representations.

5. The named entity recognition method based on two-dimensional semantic expansion according to claim 4, characterized in that, Two-dimensional semantic representation Add to Then, a multilayer perceptron is used to calculate the final prediction result, defined as: ; in, Represents the predicted probability for all entity types; Consists of a linear layer and a composition; Calculate the loss using binary cross-entropy: ; in, It is the number of tokens in the sentence; It indicates the span. A binary vector of the real entity label. i and j It is the index of the token. It is the span The predicted probability.