A closed-domain chapter-level event extraction method based on joint learning
Through the closed-domain chapter-level event extraction method of joint learning, the prior relationship enhancement and argument priority algorithm are utilized to solve the problems of low efficiency and insufficient accuracy of event extraction in the existing technology, and realize efficient and accurate multi-event argument combination extraction.
Patent Information
- Application Number
- CN202311836718.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-12-28
AI Technical Summary
Existing technologies cannot effectively model scattered argument entities and inter-sentence relationships in event extraction, cannot capture the associations between multiple events, and suffer from error cascade problems, resulting in low efficiency and insufficient accuracy of the model when extracting complex events.
A closed-domain chapter-level event extraction method based on joint learning is adopted, which includes an argument entity recognition module, a semantic fusion encoding module, an argument combination extraction module, an event type detection module and an event record generation module. The semantic fusion model enhanced by prior relations and the event group search algorithm with argument priority are used to extract events through the BI-LSTM, PRAT attention model and Bron-Kerbosch algorithm.
It improves the modeling capabilities of scattered argument entities and inter-sentence relationships, captures the associations between multiple events, reduces error cascades, and achieves efficient and accurate extraction of multi-event argument combinations.
Smart Images

Figure CN117743600B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information extraction in natural language processing, and specifically relates to a closed-domain chapter-level event extraction method based on joint learning. Background Art
[0002] Event extraction (EE) is a core task in information extraction and also a difficult problem. According to statistics, unstructured text data accounts for about 80% of Internet text information, such as social media, financial announcements, news information, etc. This type of text has characteristics such as irregular writing, incompleteness, diverse languages, and no standard format. As a result, if you want to obtain key structured event information in the text and then apply it to a series of related research fields, you can only rely on manual careful reading and extraction, which is inefficient and inaccurate. It is even more difficult to achieve batch extraction from massive text data.
[0003] Research on event extraction tasks helps people quickly retrieve and extract event information, playing an important role in many applications across various fields and significantly promoting the development of information retrieval, public opinion monitoring, knowledge graph construction, and other fields and applications. Therefore, closed-domain chapter-level event extraction technology, which can quickly extract structured event key information from massive amounts of unstructured text information, has extremely important research value and significance both at the theoretical and applied levels.
[0004] The current mainstream event extraction methods mainly include event extraction technology based on pattern matching, event extraction technology based on traditional machine learning, and event extraction technology based on deep learning.
[0005] Pattern matching-based event extraction technology is mainly designed based on syntax trees or regular expressions, and performs well in simple event extraction task scenarios in specific fields. However, its reliance on event templates in specific fields greatly limits the generalization ability of the model. Not only does it require a large amount of manual knowledge engineering to construct well-designed features, but the model also performs poorly when handling complex event extraction tasks.
[0006] Traditional machine learning-based event extraction techniques are primarily based on classic machine learning algorithm designs, such as Support Vector Machines (SVM), Maximum Entropy (ME), Naive Bayes (NB), Conditional Random Fields (CRF), and Hierarchical Agglomerative Clustering (HAC). While traditional machine learning event extraction techniques can autonomously learn event feature representations, overcoming complex feature engineering challenges and enabling adaptive domain event extraction, they are limited in learning deep or complex nonlinear relationships, making them less than ideal for extracting complex, correlated, and paragraph-level events.
[0007] Deep learning-based event extraction technology is mainly based on classic deep learning model architecture designs such as Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), Long Short-Term Memory (LSTM), Graph Convolutional Network (GCN), Attention Mechanism, and Pre-trained BERT. The patent "Event Extraction Method, Device, Electronic Device and Storage Medium" (202110827424.5) first uses the Transformer model to encode the text sentences to capture sentence-level context features, and then uses the document-level encoder to capture the text-level global features on this basis, thereby realizing event detection and argument recognition. The patent "A Method and Device for Text-Level Event Extraction Based on Multi-Grained Entity Heterogeneous Graph" (202210348614.3) uses a heterogeneous graph convolutional network that incorporates multi-granular entities to encode argument entities and sentences, and obtains entity and sentence representation embeddings with text-level context awareness, thereby realizing text-level event extraction tasks. The current defects of deep learning event extraction technology mainly lie in:
[0008] The model cannot well model the relationship between scattered argument entities and sentences, and is inefficient in capturing long-distance dependency information at the paragraph level;
[0009] The model cannot fully capture the associations between multiple events, and cannot accurately classify all candidate arguments into multiple events, resulting in redundant or missing event extraction;
[0010] Most deep learning models use a pipelined architecture, which has serious error cascading problems. In addition, there is little research on joint learning, the model structure is complex and difficult to design, and the error cascading problem cannot be completely solved. Summary of the Invention
[0011] In view of this, the present invention provides a closed-domain chapter-level event extraction method based on joint learning to solve the above technical problems. The steps are as follows:
[0012] The first step is the dataset construction stage. During this stage, the chapter-level Chinese financial announcement event dataset ChiFinAnn, which is annotated with event types, argument roles, and argument entities, is divided into training set, validation set, and test set in a ratio of 8:1:1.
[0013] In the second step, the constructed dataset is input into the closed-domain chapter-level event extraction model PRAP based on joint learning. PRAP consists of five parts: argument entity recognition module, semantic fusion encoding module, argument combination extraction module, event type detection module and event record generation module.
[0014] The third step is to define the model loss function and train the constructed neural network model. The overall loss L is composed of the argument entity recognition loss Argument combination extraction loss Event type detection loss and argument role classification loss It consists of four parts.
[0015] Furthermore, the structure and operation process of the model submodule in the second step are as follows:
[0016] (1) Argument Entity Recognition Module: The goal of this module is to identify all argument entity mentions from the original chapter-level text D and encode them to obtain a preliminary argument entity mention embedding representation. and sentence embedding representation
[0017] Given a chapter-level text where s i represents the i-th sentence, and |D| represents the total number of sentences contained in the text D. The initial representation of each sentence in D is where w i Represents the i-th token, and |S| represents the total number of tokens contained in sentence S. The argument entity recognition module first uses the BI-LSTM structure to encode the text to obtain a text sequence representation. where g i It is the bidirectional representation of the BI-LSTM hidden layer The concatenation is formally expressed as:
[0018] {g1,…,g |s|}=BI_LSTM({w1,…,w |s|}) (1)
[0019] This module connects a conditional random field (CRF) to the output layer of BI-LSTM, converting the argument entity recognition task into a sequence labeling task in BIO mode to obtain labeled entities. The training function of this module is:
[0020]
[0021] Among them, y s is the correct label sequence of s. The training goal of this module is to minimize the loss function. In the model prediction stage, the Viterbi algorithm is used for decoding to obtain the label sequence with the maximum probability.
[0022] For all tokens in the entity mentions identified above, the module performs a max pooling operation on the token-level representation to obtain the representation of the entity mention Where the superscript m represents the entity mention and the subscript i represents the index. In addition, the last hidden state of each direction of BI-LSTM is concatenated to obtain the sentence representation
[0023] (2) Semantic Fusion Encoding Module: The goal of this module is to use the PRAT attention model based on prior relationship enhancement to embed the argument entity mention Sentence Embedding Representation The semantic fusion encoding is performed on the multiple prior dependencies between entity mentions and sentences to obtain event arguments and text embeddings that contain rich semantic information and have paragraph-level context awareness.
[0024] Based on the implementation of argument entity pre-recognition, the representation of all entity mentions in the document can be obtained in The superscript m represents the entity mention, and the subscript i represents the index. On this basis, a prior relationship matrix is constructed Where c represents the number of prior dependencies between argument entity mentions and sentences, t represents the number of sentences, j represents the number of entity mentions, and the matrix T consists of c matrices r with the same dimension, where each r represents a prior dependency:
[0025] r∈{Co-reference,Co-existence,Adj-senence,Exi-entity,NA} (3)
[0026] For an element in T, t k,i,j Represents a node iand node j Specifically, if they have the kth dependency, then t k,i,j =1, otherwise t k,i,j =0. Among them, Can be an argument entity mention or a sentence.
[0027] make As the input embedding of the PRAT attention module, where d represents the network hidden layer dimension; define W rq 、W rk 、W q 、W k 、 is the weight matrix, bias i is the bias matrix, and the prior relationship is enhanced by linear transformation to calculate the query matrix Q r and bond matrix K r , and introduce the prior relationship matrix T to calculate the prior relationship to enhance attention:
[0028] Q r =XW rq ,K r =XW rk
[0029]
[0030] Among them, S a represents the score matrix of prior relationship enhanced attention, and represents element-wise multiplication. In addition, the PRAT attention model calculates the self-attention query matrix Q, key matrix K, value matrix V, and self-attention score S as follows b and compare it with S a Combined:
[0031] Q=XW q ,K=XW k ,V=XW v
[0032]
[0033] O=(S a +S b )V (6)
[0034] O is the overall output of the attention module. Similar to the original Transformer structure, the PRAT attention model has multiple identical blocks, which are stacked layer by layer to finally obtain event arguments and text embedding representations containing rich chapter-level semantic information.
[0035] (3) Argument combination extraction module: The goal of this module is to use the event group search algorithm based on argument priority to classify all candidate event arguments into multiple event groups based on the event argument representation with paragraph-level context awareness, so as to achieve multi-event argument combination extraction.
[0036] First, this module uses a quantitative argument priority index to select the core argument group. The argument priority index consists of two parts: existence and uniqueness, and the expression is:
[0037] Priority i (R)=Existence i (R)×Unique i (R)
[0038]
[0039] in, For a given event type t i A subset of all predefined argument roles, the argument block corresponding to R is considered as a candidate for the core argument, N (i) (R) is the event type t i The total number of records. Existence measures whether the argument set R can identify the event. Indicates event type t i The argument corresponding to R in the equation has at least one non-empty event record; uniqueness measures whether the argument set R can uniquely distinguish different events. Indicates event type t i The number of records in which the arguments corresponding to the core argument group in R do not appear in records of other event types. Ultimately, the argument block with the highest priority is selected as the core argument, and the remaining arguments are ordinary arguments. Based on the strategy that the connection between any two core arguments in the same event combination is undirected, and that the core arguments in the same event combination are connected to all ordinary arguments via directed edges, a correct argument semantic hybrid annotation graph is automatically constructed.
[0040] Through the above semantic fusion coding module, the entity matrix representation can be obtained Where |ε| represents the number of entities. Based on the idea that arguments in the same event are closer in semantic space, this module adds a semantic tendency function measurement layer after the entity matrix representation layer to evaluate the semantic tendency between entities. The function expression is:
[0041]
[0042]
[0043] Among them, W s 、 bs 、 is a trainable parameter for linear projection into semantic space, d h is the attention scaling dimension, That is, the calculated semantic tendency matrix and the threshold γ are set:
[0044]
[0045] Will Neutral semantic orientation Entity e i Point to e j , and then construct the event argument semantic mixed graph obtained by model training. Finally, this module uses the Bron-Kerbosch algorithm to perform maximum cluster partitioning based on the in-degree and out-degree of the argument nodes to obtain multiple event argument combinations. The binary cross entropy function is used to evaluate the event argument combination extraction loss. Its training function is:
[0046]
[0047] in, Represents entity e i With entity e j Whether there is a true label of an edge between them.
[0048] (4) Event type detection module: The goal of this module is to identify all event types in a document based on sentence representations with paragraph-level context awareness.
[0049] Based on the implementation of entity text semantic fusion encoding, all sentences in the document can be embedded. This module uses a binary classifier for each event type to predict whether the corresponding event is recognized. Its loss function is as follows:
[0050]
[0051] Among them, S represents the input embedding of the sentence, y i Indicates the label of the i-th event type. If there is an event record with event type i, then y i =1, otherwise y i =0.
[0052] (5) Event record generation module: The goal of this module is to match and map candidate event types and event argument combinations to obtain argument combinations and argument roles corresponding to specific event types in the document.
[0053] After the event type detection module and the argument combination extraction module, candidate event types can be obtained respectively and argument combinations This module first performs a Cartesian product operation on all candidate event types and argument combinations to obtain all type-combination pairs { <t i ,c j >1≤i≤|T|,1≤j≤|C|}, then for each type-combination pair, a feedforward neural network FNN is used as a classifier to classify c j All arguments in the argument combination ε j For role classification, this module uses a binary cross entropy loss function, and its training function is:
[0054]
[0055] in, is the best match for c j The correct label.
[0056] Furthermore, the third step includes:
[0057] Overall loss It contains four parts, namely argument entity recognition loss Argument combination extraction loss Event type detection loss and argument role classification loss The overall loss function of the model of the present invention is designed to set different weights for the losses of the four subtasks and then sum them up, as shown below:
[0058]
[0059] Among them, α1, α2, α3, and α4 are the weight coefficients corresponding to the loss of each subtask. The principle of training is to make the overall loss As small as possible.
[0060] The advantages of the present invention compared with the prior art are:
[0061] (1) In view of the shortcomings of existing technical research, such as the inability to well model scattered argument entities and their inter-sentence relations, and the low efficiency in capturing long-distance dependency information across sentences, the present invention proposes a semantic fusion model based on prior relationship enhancement, which aims to effectively model scattered argument entities, sentences and their prior relations to obtain argument and text embeddings containing rich semantic information.
[0062] (2) In view of the shortcomings of existing technical research, such as the inability to fully capture the association between multiple events and the inability to accurately classify all candidate arguments into multiple events, the present invention proposes an event group search algorithm based on argument priority, which aims to capture the association between multiple events while performing multi-event group search and classification on all candidate arguments to achieve efficient multi-event argument combination extraction.
[0063] (3) In response to the error cascade problem caused by defects in the model structure design in existing technology research, the present invention proposes a chapter-level event extraction framework based on joint learning, which aims to efficiently and accurately extract event types and argument combinations in parallel and alleviate the error cascade problem to the greatest extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 This is a schematic diagram of the model framework PRAP of the present invention;
[0065] Figure 2 Schematic diagram of the Bi-LSTM structure of the argument entity recognition model adopted by the present invention;
[0066] Figure 3 Schematic diagram of the prior relationship enhanced PRAT attention model proposed in this invention;
[0067] Figure 4 This is a schematic diagram of decoding the argument semantic hybrid graph proposed in the present invention. DETAILED DESCRIPTION
[0068] In order to make the purpose, advantages and technical solutions of the present invention more clear, the following specific measures are taken in conjunction with the attached Figure 1-4 , the present invention is described in further detail.
[0069] The present invention mainly includes the following specific contents.
[0070] The steps of a closed-domain chapter-level event extraction method based on joint learning are as follows:
[0071] The first step is to construct and divide the data set.
[0072] This paper systematically studies and experiments on ChiFinAnn, the largest DEE dataset to date. This dataset, constructed through remotely supervised comparison without trigger announcements, focuses on five financial event types: equity freeze (EF), equity repurchase (ER), equity reduction (EU), equity increase (EO), and equity pledge (EP). This phase divides the ChiFinAnn dataset, annotated with event type, argument role, and argument entity, into training, validation, and test sets in an 8:1:1 ratio.
[0073] The second step is to input the data set into Figure 1 In the closed-domain chapter-level event extraction model PRAP based on joint learning shown in the figure, PRAP consists of five parts: argument entity recognition module, semantic fusion encoding module, argument combination extraction module, event type detection module and event record generation module.
[0074] The first technical solution proposed in this invention is a semantic fusion model based on prior relationship enhancement. The model includes two modules: argument entity recognition and semantic fusion encoding.
[0075] (1) Argument Entity Recognition Module: The goal of this module is to identify all argument entity mentions from the original chapter-level text D and encode them to obtain a preliminary argument entity mention embedding representation. and sentence embedding representation Given a chapter-level text where s i represents the i-th sentence, and |D| represents the total number of sentences contained in the text D. The initial representation of each sentence in D is where w i represents the i-th token, and |S| represents the total number of tokens contained in sentence S. The argument entity recognition module first uses Figure 2 The BI-LSTM structure shown encodes the text to obtain a text sequence representation where g i It is the bidirectional representation of the BI-LSTM hidden layer The concatenation is formally expressed as:
[0076] {g1,…,g |s|}=BI_LSTM({w1,…,w |s|}) (1)
[0077] This module connects a conditional random field (CRF) to the output layer of the BI-LSTM to transform the argument entity recognition task into a sequence labeling task in the BIO mode to obtain labeled entities. The training function of this module is:
[0078]
[0079] Among them, y s is the correct tag sequence of s. The training goal of this module is to minimize the loss function. In the model prediction stage, the Viterbi algorithm is used for decoding to obtain the tag sequence with the maximum probability. For all the tokens mentioned in the above recognized entity mentions, this module performs a maximum pooling operation on the token-level representation to obtain the entity mention representation. Where the superscript m represents the entity mention and the subscript i represents the index. In addition, the last hidden state of each direction of BI-LSTM is concatenated to obtain the sentence representation
[0080] (2) Semantic Fusion Encoding Module: The goal of this module is to use the PRAT attention model based on prior relationship enhancement to embed the argument entity mention Sentence Embedding Representation The semantic fusion encoding is performed on the multiple prior dependencies between entity mentions and sentences to obtain event arguments and text embeddings that are rich in semantic information and have paragraph-level context awareness. Based on the implementation of argument entity pre-recognition, the representation of all entity mentions in the document can be obtained. in The superscript m represents the entity mention, and the subscript i represents the index. On this basis, a prior relationship matrix is constructed Where c represents the number of prior dependencies between argument entity mentions and sentences, t represents the number of sentences, and j represents the number of entity mentions. The matrix T consists of c matrices r of the same dimension, where each r represents a prior dependency:
[0081] r∈{Co-reference,Co-existence,Adj-senence,Exi-entity,NA} (3)
[0082] Co-reference: Entity mentions refer to each other, showing the dependency between entity mentions pointing to the same entity;
[0083] Co-existence: The coexistence relationship between a sentence and the entities in the sentence. This relationship exists between a sentence and all entity mentions in the sentence.
[0084] Adj-sentence: Adjacent sentence relationship, any two adjacent sentences in a document have this relationship;
[0085] Exi-entity: co-existing entity relations in a sentence, showing the dependency relationship between all entity mentions in a sentence;
[0086] NA: The remaining entity-entity and entity-sentence pairs do not have any dependency relationships.
[0087] For an element in T, t k,i,j Represents a node i and node j Specifically, if they have the kth dependency, then t kij =1, otherwise t kij =0. Among them, Can be an argument entity mention or a sentence.
[0088] like Figure 3 As shown, let As the input embedding of the PRAT attention module, where d represents the network hidden layer dimension. Define W rq 、W rk 、W q 、W k 、 is the weight matrix, bias i is the bias matrix, and the prior relationship is enhanced by linear transformation to calculate the query matrix Q r and bond matrix K r , and introduce the prior relationship matrix T to calculate the prior relationship to enhance attention:
[0089] Q r =XW rq ,K r =XW rk
[0090]
[0091] Among them, S a represents the score matrix of prior relationship enhanced attention, and represents element-wise multiplication. In addition, the PRAT attention model calculates the self-attention query matrix Q, key matrix K, value matrix V, and self-attention score S as follows b and compare it with S a Combined:
[0092] Q=XW q ,K=XW k ,V=XW v
[0093]
[0094] O=(S a +S b )V (6)
[0095] O is the overall output of the attention module. Similar to the original Transformer structure, the PRAT attention model has multiple identical blocks, which are stacked layer by layer to finally obtain event arguments and text embedding representations containing rich chapter-level semantic information.
[0096] The second technical solution proposed in this invention is an event group search algorithm based on argument priority. The model includes an argument combination extraction module:
[0097] (3) Argument combination extraction module: The goal of this module is to use an event group search algorithm based on argument priority to classify all candidate event arguments into multiple event groups based on event argument representation with paragraph-level context awareness, so as to achieve multi-event argument combination extraction. First, this module uses a quantitative argument priority index to select core argument groups. The argument priority index consists of two parts: existence and uniqueness, and is expressed as:
[0098] Priority i (R)=Existence i (R)×Uniquei (R)
[0099]
[0100] in, For a given event type t i A subset of all predefined argument roles, the argument block corresponding to R is considered as a candidate for the core argument, N (i) (R) is the event type t i The total number of records. Existence measures whether the argument set R can identify the event. Indicates event type t i The argument corresponding to R in the equation has at least one non-empty event record; uniqueness measures whether the argument set R can uniquely distinguish different events. Indicates event type t i The number of records in which the arguments corresponding to the core argument group in R do not appear in records of other event types. Ultimately, the argument block with the highest priority is selected as the core argument, and the remaining arguments are ordinary arguments. Based on the strategy that the connection between any two core arguments in the same event combination is undirected, and that the core arguments in the same event combination are connected to all ordinary arguments via directed edges, a correct argument semantic hybrid annotation graph is automatically constructed.
[0101] The entity matrix representation can be obtained through the above semantic fusion encoding module Where |ε| represents the number of entities. Based on the idea that arguments in the same event are closer in semantic space, this module adds a semantic tendency function measurement layer after the entity matrix representation layer to evaluate the semantic tendency between entities. The function expression is:
[0102]
[0103]
[0104] Among them, W s 、 b s 、 is a trainable parameter for linear projection into semantic space, d h is the attention scaling dimension, That is, the calculated semantic tendency matrix and the threshold γ are set:
[0105]
[0106] Will Neutral semantic orientation Entity e i Point to e j ,like Figure 4 middle point to The core argument block of any event There are undirected edges between each other, and the core argument should point to all common arguments in the event. Then, a semantic mixed graph of event arguments obtained through model training is constructed. Finally, this module uses the Bron-Kerbosch (BK) algorithm to perform maximum cluster division based on the in-degree and out-degree of argument nodes. The specific decoding steps are shown in the figure below. Figure 4 As shown, multiple event argument combinations are obtained. The binary cross entropy function is used to evaluate the event argument combination extraction loss, and its training function is:
[0107]
[0108] in, Represents entity e i With entity e j Whether there is a true label of an edge between them.
[0109] The third technical solution proposed in this paper is a chapter-level event extraction framework based on joint learning. This framework mainly includes two modules: event type detection and event record generation:
[0110] (4) Event Type Detection Module: This module aims to identify all event types in a document based on sentence representations with paragraph-level context awareness. Based on the implementation of entity-text semantic fusion encoding, all sentence embedding representations in the document can be obtained. This module uses a binary classifier for each event type to predict whether the corresponding event is recognized. Its loss function is as follows:
[0111]
[0112] Among them, S represents the input embedding of the sentence, y i Indicates the label of the i-th event type. If there is an event record with event type i, then y i =1, otherwise y i =0;
[0113] (5) Event record generation module: The goal of this module is to match and map candidate event types and event argument combinations to obtain argument combinations and argument roles corresponding to specific event types in the document. The candidate event types can be obtained through the event type detection module and argument combination extraction module. and argument combinations This module first performs a Cartesian product operation on all candidate event types and argument combinations to obtain all type-combination pairs { <t i ,c j>1≤i≤|T|,1≤j≤|C|}. Then for each type-combination pair, a feedforward neural network (FNN) is used as the classifier to classify c j All arguments in the argument combination ε j Perform role classification. This module uses a binary cross entropy loss function, and its training function is:
[0114]
[0115] in, is the best match for c j In the role classification task, an entity can play multiple roles in the event record, and a role can only be filled by one entity. Based on this setting, the present invention classifies the entity As a role i (q) The argument of is if and only if it satisfies the constraints in formula (13). The pair is then identified as an invalid candidate and discarded.
[0116]
[0117] Step 3: Overall loss It contains four parts, namely argument entity recognition loss Argument combination extraction loss Event type detection loss and argument role classification loss The overall loss function of the model of the present invention is designed to set different weights for the losses of the four subtasks and then sum them up, as shown below:
[0118]
[0119] Among them, α1, α2, α3, and α4 are the weight coefficients corresponding to the loss of each subtask. The principle of training is to make the overall loss As small as possible. In the training phase, the training set is used to preliminarily train the PRAP model parameters, the maximum number of sentences and the maximum sentence length of the document are set to 64 and 128 respectively, the hyperparameter λ1 is set to 0.05, λ2, λ3, and λ4 are all set to 1.0, and γ is set to 0.5. The training round train_epoch is set to 100, and training is stopped after training train_epoch times; in the validation phase, the validation set is used to tune the model parameters, the validation round valid_epoch is set to 60, and decay_num is set to 10. If the model loss decreases decay_num times continuously, the validation phase is stopped. If it cannot decrease decay_num times continuously, the validation phase is stopped after reaching valid_epoch times. After stopping the validation phase, the optimal PRAP model is obtained; in the testing phase, the test set is used to test the accuracy of the optimal PRAP model. The PRAP model is built using the PyTorch deep model framework. The optimizer for both the training and validation phases is the Adam optimizer, and the learning rate is set to 5e -4 .
[0120] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A closed-domain chapter-level event extraction method based on joint learning, characterized by: The method comprises the following steps: The first step is the dataset construction phase. During this phase, the chapter-level Chinese event dataset ChiFinAnn, which is annotated with event types, argument roles, and argument entities, is divided into training, validation, and test sets in a ratio of 8:1:
1. In the second step, the constructed dataset is input into the closed-domain chapter-level event extraction model PRAP based on joint learning. PRAP consists of five submodules: argument entity recognition module, semantic fusion encoding module, argument combination extraction module, event type detection module, and event record generation module. The argument entity recognition module is trained from the original chapter-level text Identify all argument entity mentions in and encode them to obtain a preliminary argument entity mention embedding representation and sentence embedding representation ; The semantic fusion encoding module uses the PRAT attention model based on prior relationship enhancement to embed the argument entity mention , sentence embedding representation The semantic fusion encoding is performed on the multiple prior dependencies between entity mentions and sentences to obtain event arguments and text embeddings that are rich in semantic information and have paragraph-level context awareness. Based on the implementation of argument entity pre-recognition, we can get the representation of all entity mentions in the document. ,in The superscript m represents the entity mention, and the subscript i represents the index; on this basis, a priori relationship matrix is constructed , where c represents the number of prior dependencies between argument entity mentions and sentences, t represents the number of sentences, j represents the number of entity mentions, and the matrix T consists of c matrices r with the same dimension, where each r represents a prior dependency: (3) Co-reference: Entity mentions refer to each other, showing the dependency between entity mentions pointing to the same entity; Co-existence: The coexistence relationship between a sentence and the entities in the sentence. This relationship exists between a sentence and all entity mentions in the sentence. Adj-sentence: Adjacent sentence relationship, any two adjacent sentences in a document have this relationship; Exi-entity: co-existing entity relations in a sentence, showing the dependency relationship between all entity mentions in a sentence; NA: The remaining entity-entity and entity-sentence pairs do not have any dependency relationships; For an element in T, express and Specifically, if they have the kth dependency, then =1, otherwise =0; where ∈{ } is the argument entity mention or sentence; make As the input embedding of the PRAT attention module, where d represents the network hidden layer dimension; define , is the weight matrix, is the bias matrix, and the query matrix is enhanced by calculating the prior relationship through linear transformation and bond matrix , and introduce the prior relationship matrix Computing prior relations to enhance attention: (4) in, The score matrix representing the prior relationship to enhance attention, represents element-wise multiplication; in addition, the PRAT attention model calculates the self-attention query matrix as follows , key matrix , value matrix and self-attention score and compare it with Combined: (5) (6) O is the overall output of the attention module. The PRAT attention model has multiple identical blocks, which are stacked layer by layer to ultimately obtain event arguments and text embedding representations containing rich chapter-level semantic information. The argument combination extraction module uses an event group search algorithm based on argument priority to classify all candidate event arguments into multiple event groups based on event argument representation with paragraph-level context awareness, thereby achieving multi-event argument combination extraction. First, this module uses a quantitative argument priority index to select the core argument group. The argument priority index consists of two parts: existence and uniqueness, and the expression is: (7) in, For a given event type A subset of all predefined argument roles considers the argument block corresponding to R as a candidate for a core argument. Is the event type The total number of records, existence measures the argument set Is it possible to identify events? Indicates the event type middle The number of event records for which the corresponding argument has at least one non-empty event; uniqueness measures the number of argument sets. Can it uniquely distinguish different events? Indicates the event type middle The number of records in which the arguments corresponding to the core argument group do not appear in records of other event types is considered. The argument block with the highest priority is ultimately selected as the core argument, and the remaining arguments are ordinary arguments. Based on the strategy that the connection between any two core arguments in the same event combination is undirected, and that the core arguments in the same event combination point to all ordinary arguments through directed edges, a correct argument semantic hybrid annotation graph is automatically constructed. Through the above semantic fusion coding module, the entity matrix representation can be obtained ,in Indicates the number of entities; then, since the semantic space distances between arguments in the same event are closer, this module adds a semantic tendency function measurement layer after the entity matrix representation layer to evaluate the semantic tendency between entities. Its function expression is: (8) in, 、 are trainable parameters for linear projection into semantic space, is the attention scaling dimension, That is, the calculated semantic tendency matrix and the threshold is set : (9) Will Neutral semantic orientation Entity point to , and then construct the event argument semantic mixed graph obtained by model training; finally, this module uses the Bron-Kerbosch algorithm to perform maximum cluster partitioning based on the in-degree and out-degree of the argument node to obtain multiple event argument combinations, and uses the binary cross entropy function to evaluate the event argument combination extraction loss. Its training function is: (10) in, Representing an entity With entity Whether there is a true label of an edge between The goal of the event type detection module is to identify all event types in a document based on sentence representations with paragraph-level context awareness. The event record generation module matches and maps candidate event types and event argument combinations to obtain argument combinations and argument roles corresponding to specific event types in the document; The third step is to define the model loss function and train the constructed neural network model; the overall loss Argument entity recognition loss , argument combination extraction loss , event type detection loss and argument role classification loss It consists of four parts.
2. The method according to claim 1, characterized in that The structure and operation process of the submodule of the closed domain chapter-level event extraction model PRAP in the second step are as follows: In the argument entity recognition module, given a chapter-level text ,in Indicates the Sentences, Represents text The total number of sentences included; The initial representation of each sentence text in is ,in Indicates the tokens, Expressing sentences The total number of tokens contained; the argument entity recognition module first uses the BI-LSTM structure to encode the text to obtain a text sequence representation ,in It is the bidirectional representation of the BI-LSTM hidden layer The concatenation is formally expressed as: (1) This module connects a conditional random field (CRF) to the output layer of BI-LSTM, converting the argument entity recognition task into a sequence labeling task in BIO mode to obtain labeled entities. The argument entity recognition loss function of this module is: (2) in, yes The correct label sequence, the training goal of this module is to minimize the loss function, and the Viterbi algorithm is used for decoding in the model prediction stage to obtain the label sequence with the maximum probability; For all tokens in the recognized entity mentions, the module performs a max pooling operation on the token-level representation to obtain the argument entity mention embedding representation , where the superscript m represents the entity mention and the subscript i represents the index. In addition, the last hidden state of each direction of the BI-LSTM is concatenated to obtain the sentence representation ; In the event type detection module, based on the implementation of entity text semantic fusion encoding, all sentences in the document can be embedded. This module uses a binary classifier for each event type to predict whether the corresponding event is recognized. Its loss function is as follows: (11) in, represents the input embedding of the sentence, Indicates the If there is an event type label, If the event record ,otherwise ; In the event record generation module, the candidate event types are obtained through the event type detection module and the argument combination extraction module. and argument combinations ,This module first performs a Cartesian product operation on all candidate event types and argument combinations to obtain all type-combination pairs , then for each type-combination pair, a feedforward neural network FNN is used as a classifier to All arguments in the argument combination For role classification, this module uses a binary cross entropy loss function, and its training function is: (12) in, is the best match The correct label.
3. The method according to claim 2, characterized in that the third step include: Overall loss It contains four parts, namely argument entity recognition loss , argument combination extraction loss , event type detection loss and argument role classification loss The overall loss function of the model is designed to sum the losses of the four subtasks after setting different weights, as shown below: (13) in, 、 、 、 is the weight coefficient corresponding to the loss of each subtask. The principle of training is to make the overall loss minimize.
Citation Information
Patent Citations
Event extraction method and apparatus, electronic equipment, and storage medium
CN113761875A
A chapter-level event extraction method and device based on multi-granularity entity heterogeneous graph
CN114742016B
Document-level event argument extraction method
CN112528676A
Framework semantic mapping and type perception-based chapter event extraction method and system
CN115168541A