A document-level named entity recognition method based on double-map hierarchical feature fusion

By constructing word-level and sentence-level graphs and combining graph convolutional neural networks and long short-term memory networks, the problem of insufficient utilization of inter-sentence information in document-level named entity recognition is solved, and higher named entity recognition accuracy is achieved.

CN115906846BActive Publication Date: 2026-03-24SHANXI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing named entity recognition methods fail to fully utilize document information between sentences and ignore information about distant nodes at the document level, resulting in inconsistent labels and insufficient recognition accuracy.

Method used

A hierarchical feature fusion method based on dual graphs is adopted. By constructing word-level graphs and sentence-level graphs, graph convolutional neural networks and long short-term memory networks are used to obtain document information at different levels, and label sequence prediction is performed through conditional random fields.

Benefits of technology

The method improves the accuracy of named entity recognition, especially by increasing the F1 score on the CoNLL-2003 and DocRED datasets by 1.18%, 0.64%, 1.47%, 0.92%, 1.63%, 0.69%, 0.38%, 0.16%, 0.19%, 0.82%, and 0.27%, respectively, thus validating the effectiveness and advancement of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115906846B_ABST
    Figure CN115906846B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of natural language processing, and discloses a document-level named entity recognition method based on double-graph hierarchical feature fusion. The method firstly constructs a word-level graph and a sentence-level graph from different levels of a document; then adopts different node updating strategies to update the graph nodes, and respectively obtains a word node vector representation and a sentence node vector representation which fuse global information of the document; then splices the word node vector representation and the corresponding sentence node vector representation to obtain a final word vector representation; finally, the final word vector representation is input into a sequence labeling model to predict an entity label. Compared with the existing document-level named entity recognition method, the application extracts global information of the document from different levels, and further improves the accuracy of named entity recognition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of natural language processing, and particularly relates to a document-level named entity recognition method based on double-graph hierarchical feature fusion. BACKGROUND

[0002] In recent years, the research on neural network related technologies has brought important progress to the field of natural language processing, however, these technologies are also difficult to effectively solve the cognitive and reasoning problems in the field of natural language processing. In order to solve this problem, researchers have proposed a knowledge graph (KG), the essence of which is a semantic network, which is composed of nodes and edges, each node represents an entity in the real world, and each edge represents the relationship between entities, the knowledge graph provides structured relationship information between entities and allows further inference of indirect relationship facts, has important academic research value and commercial value, and has been widely used in various intelligent systems such as recommendation systems, automatic question answering systems, search engines and the like. One of the core technologies for constructing a knowledge graph is the named entity recognition task (NER).

[0003] The named entity recognition task is to extract specific entities and their corresponding entity types from a given text, for example, identifying entity types such as person names, organization names and place names in a given text, this task not only can be used as a core technology for constructing a knowledge graph, but also is widely used in many downstream natural language processing tasks, therefore the named entity recognition task has important frontier research value.

[0004] At present, the research on the named entity recognition task mostly focuses on single sentence text. However, in the process of constructing a knowledge graph, the original data is mostly document data, which often contains more complete entity description information. In addition, in the real world, the same entity may not appear in the same sentence, and the same entity may have different forms of expression in the document, for example, the entity first appearing in the document is usually a full name, and the entity may be referred to by its abbreviation thereafter. Therefore, for the document-level named entity recognition task, if only a sentence-level model is used to perform named entity recognition on each sentence in the document, the problem of inconsistent labels may be caused: the same entity in the document may be considered as different entity types. The reason for this problem is that the same entity in the document often has multiple forms of mention, and it may be difficult to determine the entity type from the description of a single sentence, and therefore it is necessary to capture global document features from different levels, so that the document-level entity label prediction is facilitated.

[0005] To fully extract different levels of document feature representation, Dai et al. proposed a named entity recognition method that fuses entity coreference relationship, which introduces a regularization module to learn the coreference relationship of the same entity, and then predicts the entity label; Hu et al. guided named entity recognition through entity classification auxiliary tasks, and fused two different attention mechanisms to learn document global feature representation, and then used document global features and local features to predict entity labels; Luo et al. introduced an attention mechanism to learn document long-distance information to predict chemical entity labels; Qian et al. constructed a single word-level graph, used a graph convolutional neural network to obtain a word node embedding representation that fuses document global information, and then predicted the entity label, which improved the performance of the named entity recognition task. However, this method only models the document information between words, ignoring the document information between sentences. On the other hand, the graph convolutional neural network used in this method can only aggregate neighbor node information to update the word node, ignoring the long-distance node information of the word node, so that the word node cannot fully learn the document global information. The above-mentioned named entity recognition methods do not learn document global information from different levels, and the update strategy for the graph constructed according to the document is also relatively single, which cannot further learn the long-distance information of the graph node, thereby affecting the performance of the named entity recognition model. SUMMARY

[0006] In view of the fact that the prior art only considers extracting document information between words, ignores the importance of document information between sentences for named entity recognition performance, and the existing node update strategy does not update the graph node from different angles, thereby failing to further improve the accuracy of named entity recognition, the present application provides a document-level named entity recognition method based on double-graph hierarchical feature fusion. Different levels of document information captured from the word level and the sentence level are used in the named entity recognition task.

[0007] To achieve the above purpose, the application adopts the following technical scheme:

[0008] The present application provides a document-level named entity recognition method based on double-graph hierarchical feature fusion, which comprises the following steps:

[0009] Step 1, obtain character vector representation and word vector representation from document data using different methods;

[0010] Step 2, obtain context information representation of the word through a bidirectional long short-term memory network;

[0011] Step 3, construct a word-level graph and a sentence-level graph according to the document structure;

[0012] Step 4, update the constructed double graph according to different graph node update strategies, respectively obtain the word node vector representation and the sentence node vector representation fused with the global information of the document;

[0013] Step 5, fuse the information of the sentence node and the word node to generate a word vector representation with multiple hierarchical document features;

[0014] Step 6, according to the principle of sequence labeling, first encode the fused word vector through a bidirectional long short-term memory network to fully obtain the document information, and then use a conditional random field to obtain the optimal label sequence to complete the document-level named entity recognition task.

[0015] Further, the specific process of the step 1 is as follows:

[0016] Step 1.1, according to the given word vector embedding table, obtain the i-th word vector representation

[0017] Step 1.2, obtain the character vector representation of the i-th word according to the convolutional neural network, perform a max-pooling operation on the character vector representation to obtain the character feature of the word, and obtain the character vector representation of the i-th word

[0018] Step 1.3, splice the word vector representation and the character vector representation obtained in steps 1.1 and 1.2 to obtain the final word vector representation e i , which can be expressed as:

[0019]

[0020] The symbol [ ] in formula (1) represents the splicing operation of two vectors.

[0021] Further, the specific process of the step 2 is as follows:

[0022] The word vector representation e obtained in step S1 is taken as the input of the bidirectional long short-term memory network to obtain the context representation h of the i-th word i i , which can be expressed as:

[0023]

[0024] In formula (2), h represents the forward long short-term memory network, represents the reverse long short-term memory network.

[0025] Further, the specific process of the step 3 is as follows:

[0026] ​Step 3.1, construct a word-level graph by taking each word as a node, and the rules for constructing edges are as follows: (1) an edge is constructed between adjacent words; (2) in order to utilize the co-reference information of the document, an edge is constructed between two identical words; the initial vector representation of each graph node is represented by the output of the bidirectional long short-term memory network in step 2, and all word node vector representations are arranged in rows to form a matrix H w , which can be represented as:

[0027] H w = [h1; h2;...; hn] (3) q

[0028] In formula (3), subscript q represents the number of words in the document;

[0029] Step 3.2, construct a sentence-level graph by taking each sentence as a node, and an edge is constructed between adjacent sentences; the vector representation of each sentence node is obtained by averaging all word vector representations of each sentence, and all sentence node vector representations are arranged in rows to form a matrix H s , which can be represented as:

[0030]

[0031] In formula (5), subscript m is the number of sentences in the document, and s1 represents a set of all words contained in the first sentence in the document.

[0032] Further, the specific process of the step 4 is as follows:

[0033] Step 4.1, since there is a high probability of relationship between adjacent sentences, the sentence-level graph adopts a graph convolutional neural network to update the node, and the graph convolutional neural network can update the node information by aggregating the neighbor nodes; for the lth layer sentence node H s (l) , the (l+1)th layer sentence node H s (l+1) The updating mode is defined as:

[0034] H s (l+1) = σ(A s H s (l) W s (l) ) (5)

[0035] In formula (5), A s is the adjacency matrix of the sentence-level graph, W s (l) is the trainable parameter of the lth layer, and σ represents a sigmoid function, which is a nonlinear activation function;

[0036] ​Step 4.2, since the same entity can appear in any position of the document, the word node needs to learn the information of the nodes far away, so the word-level graph learns the information of the nodes far away by repeatedly mixing the features of the neighbor nodes of different distances, and the word node H w (l) the word node H w (l+1) The update mode is defined as:

[0037]

[0038]

[0039]

[0040]

[0041] A w (1) represents the adjacency matrix of the word-level graph, A w (2) represents the multiplication of the adjacency matrices of two word-level graphs, A w (3) represents the multiplication of the adjacency matrices of three word-level graphs, W w (l) is the trainable parameter of the l-th layer, represents the updated first-order word node matrix representation, represents the updated second-order word node matrix representation, represents the updated third-order word node matrix representation.

[0042] Further, the specific process of step 5 is as follows:

[0043] The updated word node vector representation and the sentence node vector representation in which the word is located are spliced to obtain the global document information representation h i , which can be represented as:

[0044]

[0045] In equation (10), h respectively represent the updated single sentence node vector representation and the single word node vector representation.

[0046] Further, the specific process of step 6 is as follows:

[0047] Step 6.1, in order to make full use of the semantic information of the document, the h i is encoded by a bidirectional long short-term memory network to obtain which can be represented as:

[0048]

[0049] Step 6.2, conditional random field is a kind of undirected graph model, can learn the constraint condition related to label in training data, improve the accuracy of named entity recognition, in CRF module, the output score highest label sequence is regarded as the predicted label sequence, for given sequence W=(w1, w2,..., w n ), its predicted label sequence y=(y1, y2,..., y n ), the score of label sequence is defined as:

[0050]

[0051] In formula (12), A is conditional transition matrix, Indicates the probability of transferring from label y i To label y i+1 , P is the initial score matrix calculated by bidirectional long short term memory network output, Indicates the probability of the i-th label being y i , W indicates trainable parameters.

[0052] Compared with the prior art, the present application has the following advantages:

[0053] This invention considers the impact of inter-sentence document information, the fusion of multi-level document information, and different node update strategies on the accuracy of named entity recognition. First, it obtains global document features at different levels through word-level and sentence-level graphs. Then, based on the graph features, it updates the node information in the sentence-level and word-level graphs using different node update strategies, obtaining document features at different levels. Finally, it fuses these document features at different levels and inputs them into a sequence labeling model to predict entity labels. Compared with 10 existing methods, this invention shows varying degrees of improvement in F1 scores on different named entity recognition datasets (on the CoNLL-2003 dataset, compared to BiLSTM-CRF, ParallelRNNs, and IDCNN methods that only extract word-level features, the method proposed in this invention...). The proposed method improves the F1 score by 1.18%, 0.64%, and 1.47%, respectively. Compared to BiLSTM-CNNS-CRF, Att-BiLSTM-CRF, and GlobalAtt methods that simultaneously incorporate word-level and character-level features, the proposed method improves the F1 score by 0.92%, 1.63%, and 0.69%, respectively. Compared to GraphIE and Hier-NER methods that incorporate document-level information, the proposed method improves the F1 score by 0.38% and 0.16%, respectively. On the DocRED dataset, the proposed method improves the F1 score by 0.19%, 0.82%, and 0.27%, respectively, compared to DocL-NER, Hier-NER, and GraphIE methods, thus verifying the effectiveness and advancement of the proposed method. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of the overall architecture of the method of the present invention.

[0055] Figure 2 This is a flowchart of step 1 of the method of the present invention.

[0056] Figure 3 This is a flowchart of step 4 of the method of the present invention.

[0057] Figure 4 This is a flowchart of step 6 of the method of the present invention.

[0058] Figure 5 The values ​​are F1 scores for different entity types in the dataset; (a) shows the experimental results for the CoNLL-2003 dataset, and (b) shows the experimental results for the DocRED dataset. Detailed Implementation

[0059] The technical solutions of the present application will be illustrated in detail below in combination with the embodiments of the present application and the drawings. It should be noted that, for those skilled in the art, without departing from the principle of the present application, a number of variations and improvements can be made, which should be regarded as falling within the protection scope of the present application.

[0060] A document-level named entity recognition method based on double-graph hierarchical feature fusion, comprising the following steps:

[0061] Step 1, obtaining character vector representation and word vector representation of document data by different methods respectively;

[0062] Step 1.1, according to the given word vector embedding table, the i-th word vector representation is obtained

[0063] Step 1.2, according to the convolutional neural network, the character vector representation of the i-th word is obtained, and the maximum pooling operation is performed on the character vector representation to obtain the character feature of the word, and the character vector representation of the i-th word is obtained

[0064] Step 1.3, the word vector representation and the character vector representation obtained in steps 1.1 and 1.2 are spliced to obtain the final word vector representation e i , which can be expressed as:

[0065]

[0066] The symbol [ ] in formula (1) represents the splicing operation of two vectors.

[0067] Step 2, obtaining the context information representation of the word by bidirectional long short-term memory network;

[0068] The word vector representation e obtained in step S1 i is input into the bidirectional long short-term memory network, and the context representation h of the i-th word is obtained i , which can be expressed as:

[0069]

[0070] In formula (2), f represents the forward long short-term memory network, represents the reverse long short-term memory network.

[0071] Step 3, constructing word-level graph and sentence-level graph according to the document structure;

[0072] ​Step 3.1, construct a word-level graph by taking each word as a node, and the rules for constructing edges are as follows: (1) an edge is constructed between adjacent words; (2) in order to utilize the co-reference information of the document, an edge is constructed between two identical words; the initial vector representation of each graph node is represented by the output of the bidirectional long short-term memory network in step 2, and all word node vector representations are arranged in rows to form a matrix H w , which can be represented as:

[0073] H w = [h1; h2;...; hn] (3) q

[0074] In formula (3), subscript q represents the number of words in the document;

[0075] Step 3.2, construct a sentence-level graph by taking each sentence as a node, and an edge is constructed between adjacent sentences, and the vector representation of each sentence node is obtained by averaging all word vector representations of each sentence, and all sentence node vector representations are arranged in rows to form a matrix H s , which can be represented as:

[0076]

[0077] In formula (5), subscript m is the number of sentences in the document, and s1 represents a set of all words contained in the first sentence in the document.

[0078] Step 4, update the constructed double graph according to different graph node update strategies, and obtain word node vector representations and sentence node vector representations that fuse global information of the document;

[0079] Step 4.1, the probability of relationship between adjacent sentences is relatively large, so the sentence-level graph adopts a graph convolutional neural network to update the node, and the graph convolutional neural network can update the node information by aggregating the neighbor nodes. For the lth layer sentence node H s (l) , the (l+1)th layer sentence node H s (l+1) The update mode is defined as:

[0080] H s (l+1) = σ(A s H s (l) W s (l) ) (5)

[0081] In formula (5), A s is the adjacency matrix of the sentence-level graph, W s (l) is the trainable parameter of the lth layer, and σ represents the sigmoid function, which is a nonlinear activation function;​

[0082] Step 4.2, since the same entity can appear in any position of the document, the word node needs to learn the information of the nodes at a long distance, so the word-level graph learns the information of the nodes at a long distance by repeatedly mixing the feature representations of the neighbor nodes at different distances, and the word node H w (l) the word node H w (l+1) The update mode is defined as:

[0083]

[0084]

[0085]

[0086]

[0087] A w (1) represents the adjacency matrix of the word-level graph, A w (2) represents the multiplication of the adjacency matrices of two word-level graphs, A w (3) represents the multiplication of the adjacency matrices of three word-level graphs, W w (l) is the trainable parameter of the l-th layer, represents the updated first-order word node matrix representation, represents the updated second-order word node matrix representation, represents the updated third-order word node matrix representation.

[0088] Step 5, fuse the information of the sentence node and the word node to generate a word vector representation with multiple levels of document features;

[0089] The updated word node vector representation and the sentence node vector representation in which the word is located are spliced to obtain a global document information representation h i , which can be represented as:

[0090]

[0091] A respectively represent the updated single sentence node vector representation and the single word node vector representation.

[0092] Step 6, according to the principle of sequence labeling, first encode the fused word vector through a bidirectional long short-term memory network to fully obtain document information, and then use a conditional random field to obtain the best label sequence.

[0093] Step 6.1, in order to make full use of the document semantic information, the h i is encoded by a bidirectional long short-term memory network may be expressed as:

[0094]

[0095] Step 6.2, conditional random field is a kind of undirected graph model, which can learn the constraints related to the label in the training data, and improve the accuracy of named entity recognition. In the CRF module, the label sequence with the highest output score is output as the predicted label sequence. For a given sequence W=(w1,w2,...,w n ), the predicted label sequence y=(y1,y2,...,y n ), the score of the label sequence is defined as:

[0096]

[0097] In formula (12), A is a conditional transition matrix, representing the probability of transferring from label y i to label y i+1 , P is the initial score matrix calculated by the bidirectional long short-term memory network, representing the probability that the i-th label is y i , W represents the trainable parameters.

[0098] Verification of the effectiveness and advancement of the method of the present application:

[0099] In order to verify the effectiveness and advancement of the technical scheme of the present application, experiments were conducted on two public document-level datasets, CoNLL-2003 and DocRED. The CoNLL-2003 dataset is an English dataset from Reuters, which contains 1393 annotated documents, of which the training set, test set and validation set contain 946, 231 and 216 documents respectively. The dataset contains four entity types, namely person name (PER), place name (LOC), organization name (ORG) and miscellaneous entity type (MISC). The specific statistical information of the dataset is shown in Table 1. The DocRED dataset is a document-level English dataset proposed in 2019, which contains 5053 annotated documents. The DocRED dataset contains six entity types, namely person name (PER), place name (LOC), organization name (ORG), time (TIME), number (NUM) and miscellaneous entity type (MISC). The specific statistical information of the dataset is shown in Table 2. The CoNLL-2003 dataset uses BIO annotation strategy to annotate data. In order to keep consistent with the CoNLL-2003 dataset, the DocRED dataset is preprocessed into the format of the BIO annotation strategy dataset.

[0100] The BIO tagging strategy is a sequence tagging strategy, which tags each word as "B-X", "I-X" or "O". Among them, "B-X" indicates that the entity to which the word belongs belongs to the X entity type, and the word is at the beginning position of the entity, "I-X" indicates that the entity to which the word belongs belongs to the X entity type, and the word is at the middle position of the entity, and "O" indicates that the word does not belong to any entity type.

[0101] Table 1 CoNLL-2003 dataset statistical information

[0102]

[0103] Table 2 DocRED dataset statistical information

[0104]

[0105] The hardware device used in the present application is a computer equipped with Ubuntu 18.04 system, and the experimental environment includes GPU parallel computing framework CUDA 11.0 and deep learning framework torch 1.10.0.

[0106] 1. Evaluation index:

[0107] The named entity recognition task is usually studied as a sequence tagging task, so each word is tagged, which is actually a classification problem of words. In sequence tagging, accuracy, recall and F1 value can be used to measure the performance of the technical scheme of the present application. The calculation of each index is as follows:

[0108]

[0109]

[0110]

[0111] The F1 value is the harmonic mean of accuracy and recall, and both accuracy and recall are considered to be the highest, which can comprehensively measure the performance of the named entity recognition method, so the F1 value is used to measure the performance in the present application.

[0112] 2. Experimental setup

[0113] The present application uses a Glove word vector embedding table with a dimension of 100 to initialize the word vector representation, the character vector representation is set to 30 dimensions, the dimension of the bidirectional long short-term memory network is set to 450, the number of layers of the graph convolutional neural network of the sentence node is set to 1, the number of layers of the graph convolutional neural network of the word node is set to 2, and the learning rate is set to 0.001. The method proposed in the present application is compared with the following existing named entity recognition methods:

[0114] (1)GraphIE: This method uses document words to construct a graph, then uses a graph convolutional neural network to update the graph nodes to obtain document global information, and finally inputs the sequence labeling model to predict entity labels.

[0115] (2)Hier-NER: First, the label embedding of the word is used to obtain sentence-level information, then the key-value memory network is used to extract document-level information, and finally the decoder is input to predict entity labels.

[0116] (3)BiLSTM-CRF: First, the document is initialized as a word vector representation, then the word vector representation is encoded by a bidirectional long short-term memory network, and finally the conditional random field is used to select the best label sequence.

[0117] (4)BiLSTM-CNNS-CRF: First, the character vector representation obtained by the convolutional neural network is used, then the character vector representation and the word vector representation are spliced, and input into the sequence labeling model to predict entity labels.

[0118] (5)ParallelRNNs: Use multiple independent bidirectional long short-term memory network units to reduce model parameters and improve model training speed.

[0119] (6)Att-BiLSTM-CRF: Use a global attention mechanism to obtain document-level features to improve the performance of named entity recognition.

[0120] (7)IDCNN: Use an inflated convolution to obtain document long-distance information to predict entity labels.

[0121] (8)GlobalAtt: First, use different attention mechanisms to obtain document-level feature representation and corpus-level feature representation, and then predict entity labels.

[0122] (9)MEID: This method divides entities into multiple word entities and single word entities, adds an entity classification auxiliary task, and learns document global feature representation using two different attention mechanisms, and then uses document global features and local features to predict entity labels.

[0123] (10)Doc-NER: This method proposes a two-stage fine-tuning model to solve the document label inconsistency problem, uses a Bayesian network to predict label uncertainty, and then corrects possible incorrect labels.

[0124] 3. Experimental results

[0125] The experimental results on the CoNLL-2003 dataset are shown in Table 3. Compared with the BiLSTM-CRF, ParallelRNNs, and IDCNN methods that only extract word-level features, the method proposed in the application improves the F1 value by 1.18%, 0.64%, and 1.47%, respectively. Compared with the BiLSTM-CNNS-CRF, Att-BiLSTM-CRF, and GlobalAtt methods that simultaneously add word-level features and character-level features, the method proposed in the application improves the F1 value by 0.92%, 1.63%, and 0.69%, respectively. Compared with the GraphIE and Hier-NER methods that add document-level information, the method proposed in the application improves the F1 value by 0.38% and 0.16%, respectively. In addition, compared with the MEID method that adds a multi-word entity classification auxiliary task, the method proposed in the application improves the F1 value by 0.20%. The experimental results on the DocRED dataset are shown in Table 4. Compared with the DocL-NER, Hier-NER, and GraphIE methods, the method proposed in the application improves the F1 value by 0.19%, 0.82%, and 0.27%, respectively. The experiments show that the document-level named entity recognition method based on double-graph hierarchical feature fusion proposed in the application can well extract global non-sequence document information, and provide more abundant information for subsequent named entity recognition.

[0126] Table 3 Experimental results of the CoNLL-2003 dataset

[0127]

[0128] Table 4 Experimental results of the DocRED dataset

[0129]

[0130] Figure 4The (a) figure and the (b) figure in the figure respectively show the F1 values of different entity categories in the experimental results of the CoNLL-2003 and DocRED data sets, in the experimental results of the CoNLL-2003 data set, the F1 value of the method proposed in the application for predicting the person name (PER) entity type is the highest, and the F1 value for predicting the mixed (MISC) entity type is the lowest, indicating that the method can learn the related features of the person name entity in the CoNLL-2003 data set well, and the learning ability for the mixed entity features is relatively poor. In the experimental results of the DocRED data set, the F1 value of the method proposed in the application for predicting the time (TIME) entity type is the highest, and the F1 value for predicting the mixed (MISC) entity type is the lowest, indicating that the method can learn the related features of the time entity in the DocRED data set well, and the learning ability for the mixed entity features is relatively poor. The reason why the prediction results of the mixed (MISC) entity type are relatively low in the two data sets may be that the features of the mixed (MISC) entity type are complex and diverse, and it is difficult to learn, so that the F1 value is lower than that of other entity types.

[0131] The document features in the method of the application are learned by a bidirectional long short-term memory network in deep learning, without using a large pre-trained language model and additional knowledge to learn document features, reducing the training time, in addition, the method in the application can achieve good experimental results in a data set with more entity types, and is suitable for document-level named entity recognition tasks with more entity types.

Claims

1. A document-level named entity recognition method based on hierarchical feature fusion of two graphs, characterized in that, The method includes the following steps: Step 1: Obtain character vector representation and word vector representation of the document data using different methods; Step 2: Obtain the contextual information representation of words through a bidirectional long short-term memory network; Step 3: Construct word-level and sentence-level graphs based on the document structure; Step 4: Update the constructed dual graphs according to different graph node update strategies to obtain word node vector representations and sentence node vector representations that integrate global document information. Step 5: Integrate the information from sentence nodes and word nodes to generate word vector representations with multiple levels of document features; Step 6: Based on the principle of sequence labeling, the fused word vectors are first encoded through a bidirectional long short-term memory network to fully acquire document information. Then, a conditional random field is used to obtain the optimal label sequence to complete the document-level named entity recognition task. The specific process of step 4 is as follows: Step 4.1: Since there is a high probability of relationships between adjacent sentences, the sentence-level graph uses a graph convolutional neural network to update nodes. The graph convolutional neural network can update node information by aggregating neighbor nodes. For the l-th layer sentence node... The (l+1)th level sentence node The update method is defined as follows: (5) In formula (5) Let be the adjacency matrix of the sentence-level graph. Let be the trainable parameters of the l-th layer. The sigmoid function is a non-linear activation function. Step 4.2: Since the same entity can appear anywhere in the document, word nodes need to learn distant node information. Therefore, the word-level graph learns distant node information by repeatedly mixing the feature representations of neighbor nodes at different distances. For the l-th layer word node... Word nodes at level l+1 The update method is defined as follows: (6) (7) (8) (9) In equations (6)-(8) The adjacency matrix represents the word-level graph. This represents the multiplication of the adjacency matrices of two word-level graphs. This represents the multiplication of the adjacency matrices of three word-level graphs. Let be the trainable parameters of the l-th layer. This represents the updated first-order word node matrix. This represents the updated second-order word node matrix. This represents the updated third-order word node matrix.

2. The document-level named entity recognition method based on hierarchical feature fusion of two graphs according to claim 1, characterized in that, The specific process of step 1 is as follows: Step 1.1: Search according to the given word embedding table to obtain the i-th word vector representation. ; Step 1.2: Obtain the character vector representations of the i-th word using the convolutional neural network, perform max pooling on the character vector representations to obtain the character features of the word, and thus obtain the character vector representation of the i-th word. ; Step 1.3: Concatenate the word vector representations and character vector representations obtained in steps 1.1 and 1.2 to obtain the final word vector representation. , can be represented as: (1) The [,] symbol in equation (1) represents the concatenation operation of two vectors.

3. The document-level named entity recognition method based on hierarchical feature fusion of two graphs according to claim 1, characterized in that, The specific process of step 2 is as follows: The word vectors obtained in step S1 are represented as As input to the bidirectional long short-term memory network, the contextual representation of the i-th word is obtained. , can be represented as: (2) In equation (2) This represents a positive long short-term memory network. This represents a reversed long short-term memory network.

4. The document-level named entity recognition method based on hierarchical feature fusion of two graphs according to claim 1, characterized in that, The specific process of step 3 is as follows: Step 3.1: Construct a word-level graph with each word as a node. The rules for constructing edges are: (1) Construct an edge between adjacent words; (2) Construct an edge between two identical words in order to utilize the coreference information of the document. The initial vector representation of each graph node is represented by the output of the bidirectional long short-term memory network in step 2. Construct a matrix by arranging all the word node vector representations in rows. , can be represented as: (3) In equation (3), the subscript q represents the number of words in the document; Step 3.2: Construct a sentence-level graph with each sentence as a node, and build an edge between adjacent sentences. Average the word vector representations contained in each sentence to obtain the vector representation of each sentence node. All sentence node vector representations are arranged into a matrix. , can be represented as: (4) In equation (5), the subscript m represents the number of sentences in the document. This represents the set of all words contained in the first sentence of a document.

5. The document-level named entity recognition method based on hierarchical feature fusion of two graphs according to claim 1, characterized in that, The specific process of step 5 is as follows: The updated word node vector representation is concatenated with the sentence node vector representation of the word to obtain the global document information representation. , can be represented as: (10) In formula (10) , These represent the updated single sentence node vector representation and the single word node vector representation, respectively.

6. The document-level named entity recognition method based on hierarchical feature fusion of two graphs according to claim 1, characterized in that, The specific process of step 6 is as follows: Step 6.1: To fully utilize the semantic information of the document, a bidirectional long short-term memory network is used. Encode to obtain , can be represented as: (11) Step 6.2: Conditional Random Fields (CRFs) are undirected graphical models that can learn the label-related constraints in the training data, improving the accuracy of named entity recognition. In the CRF module, the label sequence with the highest output score is used as the predicted label sequence. For a given sequence... Its predicted label sequence The score of the label sequence is defined as: (12) In equation (12) It is the conditional transition matrix. Indicates from the label Move to label The probability, It is the initial score matrix calculated and output by the bidirectional long short-term memory network. This indicates that the i-th label is The probability, This represents the trainable parameters.

Citation Information

Patent Citations

  • End-To-End Graph Convolution Network

    US20210319314A1

  • Interactive and iterative learning-based intelligent construction method for geographical name tagging corpus

    WO2021082366A1