Event extraction model and prediction method of military event types
By integrating structural and semantic information, the graph convolution network event extraction model solves the problem of Chinese text extraction in the existing technology and achieves efficient event extraction in the military field.
Patent Information
- Application Number
- CN202410712345.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Existing event extraction technology is mainly aimed at English texts and is difficult to effectively process Chinese texts. Especially in the military field, the word order and grammatical structure of Chinese are relatively flexible, which leads to challenges in the design of Chinese military event extraction models.
The graph convolutional network event extraction model (GCN-ISSI) that fuses structural and semantic information is used, combined with the BERT encoding module and the named entity label embedding layer, to fuse long-term dependency information through Bi-LSTM, and utilizes EANU and EANU in the graph convolutional network The NAEU module learns vector representations of syntactic dependencies and entity relationship labels, and outputs predicted event label sequences.
It achieves efficient extraction of military events from Chinese text and improves the accuracy and recall rate of event element extraction. In particular, it performs better than traditional models in trigger word and event element extraction tasks, proving the effectiveness of the model in processing Chinese text. .
Smart Images

Figure CN118277574B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and in particular to an event extraction model and a method for predicting military event types. Background Art
[0002] The world has entered the era of big data, and common text data is growing explosively. Correspondingly, the demand for using natural language processing (NLP) technology to study how to enable computers to perceive, understand and generate natural language text and mine its inherent knowledge has increased. Event extraction technology, as a key information extraction technology for natural language processing, has been studied in depth for a long time and used in different forms in different model training.
[0003] At present, most advanced event extraction technologies are mainly aimed at English texts, but there are obvious differences between Chinese and English. Intuitively, from a formal point of view, English is a phonetic language with words as the basic unit, while Chinese is an ideographic language with Chinese characters as the basic unit, without clear lexical boundaries; from a structural point of view, the word order and grammar of Chinese are more flexible than those of English. Taking the military field as an example, we need to think about how to use advanced event extraction technology to design an effective Chinese military event extraction model based on the characteristics of Chinese and the domain knowledge contained in military texts.
[0004] The content of this background technology description is only for facilitating understanding of the relevant technology in this field and is not regarded as an admission of the prior art. Summary of the invention
[0005] Therefore, the embodiments of the present invention intend to provide an event extraction model and a method for predicting military event types.
[0006] In the first aspect, an embodiment of the present invention provides an event extraction model, the event extraction model includes: an input layer, a data processing layer and an output layer, the data processing layer includes a composite relationship representation tensor acquisition unit, a linear transformation unit and a GCN unit. Among them, the input layer is configured to: obtain a text sequence and text named entity annotation information according to the input text; encode the text sequence to obtain a vector representation sequence of the text sequence; and obtain a vector representation sequence of text named entity labels according to the text named entity annotation information; obtain an input vector representation sequence according to the vector representation sequence of the text sequence and the vector representation sequence of the text named entity labels. The composite relationship representation tensor acquisition unit is configured to: perform syntactic dependency analysis on the input text to obtain a syntactic dependency label matrix and an entity relationship label matrix; obtain a syntactic dependency label representation tensor according to the syntactic dependency label matrix, and obtain an entity relationship label representation tensor according to the entity relationship label matrix; splice the syntactic dependency label representation tensor and the entity relationship label representation tensor to obtain a composite relationship representation tensor. The linear transformation unit is configured to: perform a linear transformation on the input vector representation sequence to obtain a linearly transformed input vector representation. The GCN unit is configured to: input the composite relationship representation tensor and the linearly transformed input vector representation into the GCN in sequence, and the GCN includes multiple graph convolution layers, each of which includes an edge-aware node update module EANU and a node-aware edge update module NAEU. The output layer is configured to: obtain the output result of the GCN unit, obtain the predicted event label sequence according to the output result of the GCN unit, and output the predicted event label sequence.
[0007] In an embodiment of the present invention, in a second aspect, an embodiment of the present invention provides a method for predicting the type of military events, including: obtaining historical texts of military news; constructing an event extraction model of military news based on the historical texts of military news by integrating structural and semantic information algorithms and neural network algorithms; obtaining input text; and predicting the type of military events in the input text based on the input text and the event extraction model of military news.
[0008] The event extraction model used in the embodiment of the present invention adopts a graph convolutional network event extraction model (Graph Convolutional Network Integrating Structural and SemanticInformation, GCN-ISSI) that integrates structure and semantic information, in which the BERT encoding module and the named entity label embedding layer of the input part convert the text sequence and the named entity information into two vector representation sequences, and then use Bi-LSTM to further fuse them, fully expressing the long-term dependent information in the input. The graph convolutional network part converts the syntactic dependency and entity relationship information into two adjacency matrices of the input text, splices the two representation tensors obtained after embedding the relationship label to fuse the two relationships, uses the EANU and NAEU modules in the multi-layer GCN to learn the vector representation of the token and the relationship label, and then weights the token vector representation of each layer and passes it to the output part, giving full play to the effective role of semantic information and syntactic dependency in the event element extraction task. The output part uses Softmax to map the token vector representation to the probability distribution of the event label, and uses the weighted cross entropy loss function to strengthen the model's prediction of the positive token, which meets the requirements of practical applications.
[0009] Other optional features and technical effects of the embodiments of the present invention are partially described below, and partially can be understood by reading this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. The elements shown are not limited to the proportions shown in the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements, wherein:
[0011] Figure 1 An exemplary structural diagram of an event extraction model according to an embodiment of the present invention is shown;
[0012] Figure 2 An exemplary structural diagram of another event extraction model according to an embodiment of the present invention is shown;
[0013] Figure 3 shows an exemplary structural diagram of yet another event extraction model according to an embodiment of the present invention;
[0014] Figure 4 shows an exemplary structural diagram of another event extraction model according to an embodiment of the present invention;
[0015] Figure 5 An exemplary flow chart of a method for predicting military event types according to an embodiment of the present invention is shown;
[0016] Figure 6An exemplary flow chart showing another method for predicting a military event type according to an embodiment of the present invention is shown;
[0017] Figure 7 An exemplary flow chart of a method for predicting another type of military event according to an embodiment of the present invention is shown;
[0018] Figure 8 An exemplary structural diagram of an electronic device capable of implementing the method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific implementation methods and drawings. Here, the exemplary implementation methods of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0020] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0021] In the embodiment of the present invention, Figure 1 As shown, an event extraction model 100 is provided. The event extraction model 100 includes an input layer 101, a data processing layer 102 and an output layer 103. The data processing layer 102 includes a composite relationship representation tensor acquisition unit 1021, a linear transformation unit 1022 and a GCN unit 1023.
[0022] The input layer 101 is configured to: obtain a text sequence and text named entity annotation information based on the input text; encode the text sequence to obtain a vector representation sequence T of the text sequence; and obtain a vector representation sequence E of text named entity labels based on the text named entity annotation information; obtain an input vector representation sequence X based on the vector representation sequence T of the text sequence and the vector representation sequence E of the text named entity labels.
[0023] In some embodiments, Figure 2 As shown, the input layer 101 includes a vector representation sequence acquisition unit 1011 for text sequences, a vector representation sequence acquisition unit 1012 for text named entity tags, and an input vector representation sequence acquisition unit 1013.
[0024] like Figure 3As shown, the vector representation sequence acquisition unit 1011 of the text sequence is configured as follows: the input text is divided into a text sequence according to the word segmenter of the pre-trained language representation model encoding module, and the text sequence is input into the pre-trained language representation model encoding module (Bidirectional Encoder Representation from Transformers, BERT), and the last layer output of BERT is taken as the vector representation sequence of the text sequence. .
[0025] Understandably, if Figure 3 As shown, the input text can be segmented into text sequences by the BERT tokenizer. , the text sequence Input to The BERT encoding module of the layer takes its last layer output as the token vector representation sequence of the text sequence T .
[0026] like Figure 3 As shown, the vector representation sequence acquisition unit 1012 of the text named entity label is configured to: convert the named entity annotation information of the input text into a BIO named entity label sequence, and input the BIO named entity label sequence into the named entity label embedding layer (all label embedding layer parameters in the model are randomly initialized and updated during the training process), and obtain the vector representation sequence of the text named entity label .
[0027] Understandably, if Figure 3 As shown, the named entity annotation information of the input text is converted into the corresponding "BIO" named entity label sequence And input the named entity label embedding layer (all label embedding layer parameters in the model are randomly initialized and updated during the training process), and get the named entity label vector representation sequence of T .
[0028] like Figure 3 As shown, the input vector representation sequence acquisition unit 1013 is configured to: convert the vector representation sequence of the text sequence into Sequence of vector representations of named entity labels with text After concatenation, it is input into the bidirectional long short-term memory network Bi-LSTM, and the last hidden layer state of the obtained Bi-LSTM is used as the input vector to represent the sequence .
[0029] Understandably, if Figure 3 As shown, and Splice, input The Bi-LSTM of the layer takes the state of the last hidden layer . The input vector represents the sequence of text, which integrates the text context and named entity information.
[0030] Understandably, if Figure 3 As shown, the input layer 101 can be described using formula (1).
[0031] (1)
[0032] The data processing layer 102 is configured to process the output data of the input layer and input the processing result to the output layer.
[0033] The composite relationship representation tensor acquisition unit 1021 is configured to: perform syntactic dependency analysis on the input text to obtain a syntactic dependency label matrix and an entity relationship label matrix. According to the syntactic dependency label matrix, a syntactic dependency label representation tensor is obtained, and according to the entity relationship label matrix, an entity relationship label representation tensor is obtained. The syntactic dependency label representation tensor and the entity relationship label representation tensor are concatenated to obtain a composite relationship representation tensor. .
[0034] Syntactic dependency analysis originates from dependency grammar in linguistics. Dependency grammar is a grammatical system based on the dependency relationship between words in a sentence. It believes that each sentence can be regarded as a tree structure formed by a central word or core word expanding outward, in which each word is a node in the tree structure, and the nodes are connected to each other through directed edges, indicating the dependency relationship between words. The syntactic dependency relationships defined by LTP include "subject-predicate relationship", "verb-object relationship", "indirect object relationship", "prepositional object", "conjunctive", "attributive-predicate relationship", "adverbial-predicate structure", "verb-complement structure", "parallel relationship", "prepositional-object relationship", "left-attached relationship", "right-attached relationship", "independent structure", "core relationship" and "punctuation".
[0035] In some embodiments, the composite relationship representation tensor acquisition unit 1021 is configured to: use the Language Technology Platform (LTP) to perform syntactic dependency analysis on the input text and the named entity annotation information, align the nodes with the word segmentation tokens in the text sequence or the named entity annotation information, and obtain the syntactic dependency label matrix and entity relationship label matrix The syntactic dependency label matrix is input into the syntactic dependency label; the entity relationship label matrix is respectively embedded into the entity relationship label layer, and the syntactic dependency label representation tensor is obtained respectively. and entity relationship label representation tensor And, concatenate the syntactic dependency label representation tensor and the entity relationship label representation tensor to obtain the composite relationship representation tensor .
[0036] It can be understood that when LTP is used to perform syntactic dependency analysis on the input text, the tail node of the "core relationship" is the virtual node "ROOT", which is represented by "[CLS]". Instead, align the nodes with the tokens (word segments) in the text sequence T to obtain the syntactic dependency label matrix of T ,in express and The syntactic dependency label between (“None” means no syntactic dependency). Set the reverse label between the head and tail tokens of the syntactic dependency except “independent structure” and “parallel relationship”, such as is a "subject-predicate relationship", then For the "anti-subject-predicate relationship", each token itself is set with a self-loop label to distinguish the relationship with other tokens, that is, is a “self-loop”. Similarly, entity relationship annotation information can also be converted into an entity relationship label matrix ,in express and The entity relationship labels between them are set, and the reverse labels are set between the head and tail tokens of the asymmetric entity relationship. Each token itself is set with a self-loop label. and can be regarded as an adjacency matrix. However, since only tokens with named entity tags can have entity relationships, Most of the elements in are “None”, which is not suitable for constructing separate GCNs for the two adjacency matrices. Therefore, we consider fusing the two relationship information.
[0037] It can be understood that if the two relationship labels are combined before embedding, and are the number of syntactic dependency relations and entity relationship labels containing reverse relations, respectively, so there are Combined relationship labels, such labels are more sparse, so concatenate the two relationship label representation tensors to obtain a composite relationship representation tensor (adjacency tensor) , to achieve the fusion of two relationship labels. The process can be described by formula (2).
[0038] (2)
[0039] The linear transformation unit 1022 is configured to: transform the input vector representation sequence Perform a linear transformation to obtain the input vector representation after the linear transformation .
[0040] Understandably, The linear transformation is , which will be used as the input of each layer in the graph convolutional network.
[0041] The GCN unit 1023 is configured to: represent the composite relation tensor And the linearly transformed input vector representation The images are sequentially input into GCN, where GCN includes multiple graph convolutional layers. Each of the multiple graph convolutional layers includes an edge-aware node A update module EANU and a node-aware edge update module NAEU.
[0042] In some embodiments, Figure 4 As shown, the GCN unit 1023 is configured to: represent the composite relationship tensor And the linearly transformed input vector representation Input to the edge-aware node update module EANU so that EANU can represent tensors through composite relations Aggregate the information of neighbor nodes to update the vector representation of each node: ,in For the The node vector representation of the layer, for The vector representation of is the linear rectification function (ReLU) activation function, It is a mean-pooling operation, which is used to compress the information of p channels. The node vector of each channel is represented by the update formula: ,in, for The k-th slice of the first dimension, is a learnable convolution kernel. The composite relationship is represented as a tensor And the linearly transformed input vector representation Input to the edge-aware node update module NAEU, so that the NAEU module updates the vector representation of the relationship label according to the information of the head and tail nodes: , among which, is Layer and The vector representation of the composite relationship between for The first dimension Dimensional slices, is a learnable convolution kernel, is a learnable parameter matrix. And, the original input of GCN And each layer output After splicing, linear mapping back Dimension, as the output of GCN: ,in, is a learnable parameter matrix.
[0043] Understandably, For the Layer GCN-ISS and The vector representation of the composite relationship between After peacekeeping The dimensions are the vector representations of syntactic dependency labels and entity relationship labels, respectively. Relationship labels may convey different information in different contexts.
[0044] Understandably, It can be regarded as a token vector representation sequence that encodes the input text context and named entity information. It can be seen as further encoding the previous The token vectors of the lexical dependency and entity relationship information represent the sequence. The above process is equivalent to adaptive weighting of information at different levels.
[0045] The output layer 103 is configured to: obtain the output result of the GCN unit, obtain the predicted event label sequence according to the output result of the GCN unit, and output the predicted event label sequence .
[0046] In some embodiments, the output layer 103 is configured to: Mapped to a probability distribution in event label space: , so that the output of the model during training is a sequence of probability vectors ;in, and is a learnable parameter matrix and bias vector. The weighted cross entropy loss function is used to make the output result pay more attention to the classification result of the positive token: ,in, represents the parameters of the model, The amount The representation model converts the text sequence In Class is the label event label Probability is an indicative function, when It is equal to 1 if it is a negative example, otherwise it is equal to 0. is the positive example weight. And, let Represents the probability vector The event label corresponding to the maximum component subscript in , and output the predicted event label sequence .
[0047] Understandably, the output section ignores ("[CLS]") and ("[SEP]"), the output of the model during training is a sequence of probability vectors Since the number of event labels "O" (negative examples) is much larger than the number of non-"O" event labels (positive examples), a weighted cross entropy loss function is used to make the model pay more attention to the classification results of positive tokens. Represents the probability vector The event label corresponding to the maximum component subscript in The classification result of the model is the predicted event label sequence. , so the training goal is to maximize Make .
[0048] In an embodiment of the present invention, a method for predicting military event types is provided. Figure 5 As shown, the method includes steps 501 to 504.
[0049] Step 501: Obtain historical text of military news.
[0050] Step 502: Based on the historical text of military news, an event extraction model of military news is constructed by integrating structure and semantic information algorithms and neural network algorithms.
[0051] In some embodiments, Figure 6 As shown, the implementation of step 502 includes steps 5021 to 5023.
[0052] Step 5021: Obtain the named entities and entity relationships of the historical text of the military news and the types of military events of the historical text of the military news from the historical text of the military news.
[0053] Step 5022: Create a sample set of an event extraction model for military news based on named entities and entity relationships in the historical text of military news and military event types in the historical text of military news.
[0054] Step 5023: construct an event extraction model based on the language representation model encoding module BERT, the bidirectional long short-term memory network Bi-LSTM, the language technology platform LTP and the graph convolutional network GCN.
[0055] In some embodiments, Figure 7As shown, the implementation method of step 5023 may include steps 50231 to 50233.
[0056] Step 50231: Construct the input layer of the event extraction model based on BERT and Bi-LSTM.
[0057] It can be understood that the method for the input layer of the event extraction model to process input data can refer to the relevant description of the input layer 101 of an event extraction model provided in an embodiment of the present invention, and will not be repeated here.
[0058] Step 50232: Construct a data processing layer based on LTP and GCN.
[0059] It can be understood that the method by which the data processing layer of the event extraction model processes the data from the input layer can refer to the relevant description of the data processing layer 102 of an event extraction model provided in an embodiment of the present invention, and will not be repeated here.
[0060] In some embodiments, the GCN includes multiple graph convolutional layers, each of the multiple graph convolutional layers includes an edge-aware node update module EANU and a node-aware edge update module NAEU.
[0061] Step 50233: Obtain the output result of the graph convolutional network, obtain the predicted event label sequence based on the output result of the graph convolutional network, and output the predicted event label sequence.
[0062] It can be understood that the implementation method of step 50233 can refer to the relevant description of the output layer 103 of an event extraction model provided in an embodiment of the present invention, and will not be repeated here.
[0063] Step 5024: train the event extraction model according to the sample set of the event extraction model of military news to obtain the event extraction model of military news.
[0064] Step 503: Get input text.
[0065] Step 504: predict the military event type of the input text based on the input text and the event extraction model of military news.
[0066] It can be understood that the structure and construction method of the event extraction model of military news constructed in step 502 can refer to the content of an event extraction model provided in an embodiment of the present invention, and will not be repeated here.
[0067] The following uses experimental data to exemplify the method of using the historical text of military news to train the event extraction model to obtain the event extraction model of military news in the embodiment of the present invention and the performance evaluation of the event extraction model of military news proposed in the embodiment of the present invention.
[0068] It can be understood that the event extraction model or the event extraction model of military news in the embodiment of the present invention adopts the event extraction model GCN-ISSI of the graph convolutional network that integrates structure and semantic information. Therefore, in the following examples, GCN-ISSI is used to represent the event extraction model or the event extraction model of military news proposed in the embodiment of the present invention.
[0069] Exemplarily, as shown in Table 1, since MNED-3rd is a data set with annotation quality that meets the standard, the embodiment of the present application extracts 3,000 samples therefrom as a test set. The test set is used below to refer to these 3,000 samples, and MNED-1st, MNED-2nd, and MNED-3rd refer to the 10,000 samples outside the test set in the corresponding data set. The sample distribution of each experimental data set is basically consistent with the overall distribution.
[0070]
[0071] In an embodiment of the present invention, the input part of all baseline models used includes an entity label embedding layer, SGNS, BERT, BERT-WWM, RoBERTa-WWM or MacBERT is used as the token embedding layer, BiLSTM encodes the context and entity information, and Softmax or CRF is used as the output part. These baseline models are commonly used baseline models for event extraction.
[0072] During the training process, the hyperparameters used are shown in Table 2. All codes can be implemented by PyTorch with default parameters on 24 Intel(R) Core(TM) i9-10920XCPU@3.50GHz.
[0073]
[0074] In terms of model performance evaluation, MNED-3rd is a dataset with standard annotation quality. It is divided into training set and validation set with a ratio of 8:2. GCN-ISSI and multiple baseline models are used to train and validate on the training / validation sets, and tested on the test set to evaluate the performance of each model on the high-quality dataset. The experimental results are shown in Table 3.
[0075]
[0076] The performance of SGNS+Bi-LSTM+CRF is better than that of SGNS+BiLSTM+Softmax. This is because CRF contains an additional parameter matrix that models the "transfer" score of the event label and uses the Viterbi algorithm to decode the global optimal output. However, the performance of BERT+Softmax is close to that of BERT+CRF and better than that of SGNS+Bi-LSTM+CRF. This may be because the fitting ability of the BERT encoding module is too strong (even if the learning rate is only 1 / 10 of other parameters). Before the event label "transfer" parameter matrix of CRF is trained, mapping the vector representation of the token to the probability distribution of the event label of the token can obtain a "transmission" score that is much larger than the "transfer" score. Only using Softmax to obtain the predicted event label token by token can obtain a prediction result close to the global optimal. The performance of BERT+Bi-LSTM+CRF is also close to that of BERT+Bi-LSTM+Softmax, which is improved compared to BERT+CRF, indicating that even if BERT is better than SGNS+Bi-LSTM, using Bi-LSTM in the input part is still helpful to encode context and named entity information. The baseline model with the improved BERT model encoding module as the token embedding layer and the GCN-ISSI output part both use Softmax, partly because the number of parameters is larger and the decoding process cannot be parallelized like Softmax. * +CRF takes longer to train and predict than the corresponding * +Softmax (about 2.2 times and 1.6 times respectively), and the model performance improvement is small. On the other hand, if there is an error in Y, that is, there is label noise, the "transfer" score learned by CRF during training is not necessarily reasonable, and Softmax's classification of each token is relatively independent. Certain strategies can be used to judge whether the token label is incorrect during training.
[0077] The performance of the baseline model with the encoding module of the three improved forms of the BERT model as the token embedding layer reflects the effectiveness of the improved BERT model in the MLM task. For Chinese text, word information is very important, and it is more reasonable to predict the masked whole word than a single character. The three improved forms all adopt the WWM strategy; the structure of the BERT model is more complex than the Skip-Gram model, and the number of parameters is much larger. The dynamic masking idea of RoBERTa effectively improves the reuse efficiency of large-scale training corpus; MacBERT not only includes the WWM strategy and dynamic masking idea, but also improves the masking method to solve the problem of inconsistency between "pre-training-fine-tuning", which is more suitable for actual tasks. The experimental results show that it is the best Chinese BERT model. The structures of various improved forms of BERT models are consistent, and the difference lies in the model parameters. Therefore, the parameters of the BERT encoding module in GCN-ISSI adopt the parameters of MacBERT. Its performance is better than the best baseline model MacBERT+Bi-LSTM+Softmax in all aspects. The F1 values of trigger word extraction and event element extraction are 4.7 and 7.3 higher respectively. This shows that using GCN to model syntactic dependency and entity relationship information plays a very important role in event extraction tasks.
[0078] In terms of the role of semantic information, the present invention conducts ablation experiments to analyze the performance of event extraction models without semantic information and with semantic information of different annotation quality. MNED-3rd is used as the training / validation set to perform named entity information ablation experiments on SGNS+Bi-LSTM+CRF, MacBERT+Bi-LSTM+Softmax and GCN-ISSI. The experimental results are shown in Table 4, where w / o Entity means that the named entity label embedding layer is removed.
[0079]
[0080] After removing the named entity label embedding layer, the performance of all models decreased, especially in the event element extraction task. This is because the event elements "subject", "object", "equipment", "time" and "location" common to multiple types of events are named entities, and the number is very large. Named entity labels are more important for extracting such entity event elements. The F1 of SGNS-Bi-LSTM-CRF dropped more, which may be because the dimensionality of BERT's token vector is 768, and the context information in it is much richer than the 300-dimensional token vector of SGNS. The 200-dimensional named entity label vector has a icing on the cake effect on BERT+Bi-LSTM+CRF and GCN-ISSI, and has a relatively large effect on SGNS-Bi-LSTM-CRF.
[0081] The recall rate of the relationship extraction model in the military field is usually around 75%, which corresponds to MNED-1st with lower quality of entity relationship information annotation. Therefore, MNED-1st is divided in the same way and used together with MNED-3rd as training / validation sets to conduct entity relationship information ablation experiments on GCN-ISSI. The experimental results are shown in Table 5, where w / o Relation means that the entity relationship label embedding layer is removed.
[0082]
[0083] After removing the entity relationship label embedding layer, the performance of GCN-ISSI has declined, and it is more obvious in the event element extraction task. This is because the "equivalence" relationship can help GCN-ISSI transfer the information of equivalent entities in other positions to the entity event elements to be extracted, while other entity relationships are helpful for jointly extracting entity event elements in the same event, and the entity relationship information that does not meet the annotation quality standards in MNED-1st can still promote the extraction of event elements.
[0084] The above analysis fully demonstrates that semantic information plays a significant role in the task of event element extraction. From another perspective, GCN-ISSI w / o Relation has a GCN with more syntactic dependency information than MacBERT+Bi-LSTM+Softmax, and its F1 value for trigger word extraction has increased by 4.3 (using MNED-3rd as the training / validation set), which shows that the good performance of GCN-ISSI on this task mainly comes from syntactic dependency information. For the entire event extraction task that includes these two subtasks, the performance of GCN-ISSI fully verifies the effectiveness of its fusion structure and semantic information, indicating that it is an effective Chinese military event extraction model.
[0085] In an embodiment of the present invention, an electronic device is provided, comprising: a processor and a memory storing a computer program, wherein the processor is configured to execute an event extraction model of any embodiment of the present invention when running the computer program.
[0086] Figure 8 A schematic diagram of an electronic device 1000 that can implement a method or implement an embodiment of the present invention is shown, and in some embodiments, more or fewer electronic devices than shown may be included. In some embodiments, it can be implemented using a single or multiple electronic devices. In some embodiments, it can be implemented using cloud or distributed electronic devices.
[0087] like Figure 8As shown, the electronic device 1000 includes a processor 1001, which can perform various appropriate operations and processes according to the program and / or data stored in the read-only memory (ROM) 1002 or the program and / or data loaded from the storage part 1008 to the random access memory (RAM) 1003. Processor 1001 can be a multi-core processor or include multiple processors. In some embodiments, processor 1001 can include a general main processor and one or more special coprocessors, such as a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a digital signal processor (DSP), etc. In RAM 1003, various programs and data required for the operation of electronic device 1000 are also stored. Processor 1001, ROM 1002 and RAM 1003 are connected to each other via bus 1004. Input / output (I / O) interface 1005 is also connected to bus 1004.
[0088] The processor and the memory are used together to execute the program stored in the memory. When the program is executed by the computer, the methods, steps or functions described in the above embodiments can be implemented.
[0089] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, a touch screen, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 10, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed. Figure 8 Only some components are schematically shown in the figure, which does not mean that the computer system 1000 only includes Figure 8 Components shown.
[0090] The systems, devices, modules or units described in the above embodiments may be implemented by a computer or its associated components. The computer may be, for example, a mobile terminal, a smart phone, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a personal digital assistant, a media player, a navigation device, a game console, a tablet computer, a wearable device, a smart TV, an Internet of Things system, a smart home, an industrial computer, a server or a combination thereof.
[0091] Although not shown, in an embodiment of the present invention, a storage medium is provided, the storage medium storing a computer program, the computer program being configured to execute any file difference-based compilation method of the embodiments of the present invention when executed.
[0092] Storage media in embodiments of the present invention include permanent and non-permanent, removable and non-removable items that can be used to store information by any method or technology. Examples of storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0093] The methods, programs, systems, devices, etc. of the embodiments of the present invention may be executed or implemented in a single or multiple networked computers, or may be practiced in a distributed computing environment. In the embodiments of this specification, in these distributed computing environments, tasks may be performed by remote processing devices connected via a communication network.
[0094] Those skilled in the art should understand that the embodiments of the present specification may be provided as methods, systems or computer program products. Therefore, those skilled in the art may imagine that the functional modules / units or controllers and related method steps described in the above embodiments may be implemented in software, hardware or a combination of software / hardware.
[0095] Unless explicitly stated, the actions or steps of the methods, programs, and embodiments of the present invention do not have to be performed in a specific order and can still achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.
[0096] In this article, multiple embodiments of the present invention are described, but for the sake of simplicity, the description of each embodiment is not exhaustive, and the same or similar features or parts between the embodiments may be omitted. In this article, "one embodiment", "some embodiments", "example", "specific example", or "some examples" are intended to be applicable to at least one embodiment or example of the present invention, but not all embodiments. The above terms do not necessarily mean to refer to the same embodiment or example. In the absence of contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples.
[0097] The exemplary systems and methods of the present invention have been specifically shown and described with reference to the above embodiments, which are merely examples of the best modes for implementing the present systems and methods. It will be appreciated by those skilled in the art that various changes may be made to the embodiments of the systems and methods described herein when implementing the present systems and / or methods without departing from the spirit and scope of the present invention as defined in the appended claims.
Claims
1. An event extraction model, characterized in that: include: The input layer is configured to: obtain a text sequence and text named entity annotation information according to an input text; encode the text sequence to obtain a vector representation sequence of the text sequence; and obtain a vector representation sequence of the text named entity label according to the text named entity annotation information; obtain an input vector representation sequence according to the vector representation sequence of the text sequence and the vector representation sequence of the text named entity label; Data processing layer, including: The composite relationship representation tensor acquisition unit is configured to: perform syntactic dependency analysis on the input text to obtain a syntactic dependency label matrix and an entity relationship label matrix; obtain a syntactic dependency label representation tensor according to the syntactic dependency label matrix, and obtain an entity relationship label representation tensor according to the entity relationship label matrix; and concatenate the syntactic dependency label representation tensor and the entity relationship label representation tensor to obtain a composite relationship representation tensor; A linear transformation unit is configured to: perform a linear transformation on the input vector representation sequence to obtain a linearly transformed input vector representation; and A graph convolutional network (GCN) unit is configured to: sequentially input the composite relation representation tensor and the linearly transformed input vector representation into the GCN, wherein the GCN includes a plurality of graph convolutional layers, each of the plurality of graph convolutional layers includes an edge-aware node update module EANU and a node-aware edge update module NAEU, The GCN unit is also configured to: The composite relation representation tensor and the linearly transformed input vector representation are input to the edge-aware node update module EANU, so that EANU aggregates the information of neighbor nodes through the composite relation representation tensor to update the vector representation of each node: ,in For the The node vector representation of the layer, where n is the number of text segments, Token The vector representation of is the activation function, It is an average pooling operation, which is used to compress the information of p channels; the node vector representation update formula of each channel is: ,in, represents the k-th slice of the first dimension of the tensor for the composite relation, is a learnable convolution kernel, Indicates the dimension of GCN; The composite relationship representation tensor and the linearly transformed input vector representation are input to the node-aware edge update module NAEU, so that the NAEU module updates the vector representation of the relationship label according to the information of the head and tail nodes: ,in, For the Token in layer and The vector representation of the composite relationship between The first dimension of the tensor is represented by the composite relation Dimensional slices, is a learnable convolution kernel, is a learnable parameter matrix; and The original input of GCN And each layer output After splicing, linear mapping back dimension, as the output result of the GCN: ,in, is a learnable parameter matrix, represents the number of layers of the GCN; and The output layer is configured to: obtain the output result of the GCN unit, obtain the predicted event label sequence according to the output result of the GCN unit, and output the predicted event label sequence .
2. The event extraction model according to claim 1, characterized in that: The input layer includes: The vector representation sequence acquisition unit of the text sequence is configured to: segment the input text into the text sequence according to the word segmenter of the pre-trained language representation model encoding module , and input the text sequence into the pre-trained language representation model encoding module BERT, and take the last layer output of the BERT as the vector representation sequence of the text sequence ,in Represents the dimension of the BERT encoding module; The vector representation sequence acquisition unit of the text named entity label is configured to: convert the named entity annotation information of the input text into a BIO named entity label sequence , and input the BIO named entity tag sequence into the named entity tag embedding layer to obtain the vector representation sequence of the text named entity tag ,in represents the dimension of the named entity label vector; and The input vector representation sequence acquisition unit is configured to: concatenate the vector representation sequence of the text sequence and the vector representation sequence E of the text named entity label and input them into the bidirectional long short-term memory network Bi-LSTM, and use the last hidden layer state of the obtained Bi-LSTM as the input vector representation sequence ,in Indicates the dimension of Bi-LSTM.
3. The event extraction model according to claim 2, characterized in that: The composite relation representation tensor acquisition unit is configured to: The input text and the named entity annotation information are subjected to syntactic dependency analysis using the language technology platform LTP, and the nodes are aligned with the word segmentation tokens in the text sequence or the named entity annotation information to obtain the syntactic dependency label matrix and the entity relationship label matrix Represents a token and The syntactic dependency labels between Represents a token and Entity relationship labels between them; The syntactic dependency label matrix is input into the syntactic dependency label embedding layer; the entity relationship label matrix is input into the entity relationship label embedding layer to obtain the three-dimensional syntactic dependency label representation tensor and the entity relationship label represents a tensor ,in represents the dimension of the syntactic dependency label vector, Represents the dimension of entity relationship label vector; as well as Concatenate the syntactic dependency label representation tensor and the entity relationship label representation tensor to obtain the composite relationship representation tensor .
4. The event extraction model according to claim 2, characterized in that: The output layer is configured as: The output result of the GCN Mapped to a probability distribution in event label space: ,in, Each element in represents the final vector representation of the corresponding token; the output part ignores the token and token , where token for , token for , so that the output of the model during training is a sequence of probability vectors and is the learnable parameter matrix and bias vector; The weighted cross entropy loss function is used to make the output result pay more attention to the classification results of the positive token: ,in, represents the parameters of the model, The amount The representation model converts the token in the text sequence Class is the label event label The probability of I(·) is the indicative function. It is equal to 1 if it is a negative example, otherwise it is equal to 0. is the positive example weight; and make Represents the probability vector The event label corresponding to the maximum component subscript in , and output the predicted event label sequence .
