Event argument extraction method, system and medium based on graph convolution and machine reading comprehension
By constructing a multi-relationship event graph and using graph convolutional networks, combined with flow attention and self-attention mechanisms, event arguments are extracted, which solves the problem of ignoring event type and argument role information in the existing technology, and improves extraction performance and accuracy. sex.
Patent Information
- Application Number
- CN202210605218.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-05-31
AI Technical Summary
Existing event argument extraction technology ignores the potential information between event types and argument roles, making it difficult to effectively define the start and end boundaries, and it is difficult for independent predictors to solve the problem of role overlap.
Using methods based on graph convolution and machine reading comprehension, by constructing a multi-relationship event graph, using language model BERT and relational graph convolution RGCN to obtain node feature information, combined with flow attention and self-attention mechanisms, extract event arguments, fully Mining potential information between event types and argument roles.
It improves the performance of event argument extraction, reduces problem design costs, effectively solves the problem of role overlap, and improves the accuracy of extraction results.
Smart Images

Figure CN115080716B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of event argument extraction in text, and specifically relates to an event argument extraction method, system and medium based on graph convolution and machine reading comprehension. Background Art
[0002] With the rapid development of the Internet, a large amount of information is reported in an unstructured form every day, and our lives are gradually overwhelmed by the flood of information. In order to digest the excessive electronic information, people have an increasing demand for information extraction (IE) technology, which extracts structured and important information from unstructured data such as news articles, emails, user comments, and videos. The extraction results can be further utilized by downstream applications. Event Extraction (EE) is a challenging task in information extraction, which aims to identify event triggers, event types, event arguments, and the corresponding roles of arguments from unstructured event mentions. Event argument extraction requires identifying the argument entities in the event and the argument roles they play in the event mentions based on the event type and trigger words. The extracted results are the key content for constructing structured event representations.
[0003] Currently, modeling event argument extraction as a machine reading comprehension (MRC) / question answering (QA) task has become a research trend, that is, the model needs to understand the context (i.e., event mention sentences) and answer or fill in questions or extract templates related to argument roles. This argument role-specific extraction strategy allows the model to only focus on the location of event arguments; in addition, since the predictions are separated by roles, the role overlap problem can be easily solved. Although these studies have achieved good results, they still have some shortcomings, such as ignoring the potential information between event types and argument roles, ignoring the potential information between event types and argument roles, or it is difficult to define the start and end boundaries using independent predictors. Summary of the invention
[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide an event argument extraction method, system and medium based on graph convolution and machine reading comprehension. The method constructs a multi-relation event graph to fully explore the potential information between event types and argument roles; uses a language model BERT and a relational graph convolution RGCN to obtain node feature information, reduces the cost of problem design, and learns structural information; finally, uses flow attention and self-attention mechanisms to complete the extraction of event arguments and improve the extraction performance.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] The first object of the present invention is to provide an event argument extraction method based on graph convolution and machine reading comprehension, characterized in that it includes the following steps:
[0007] Get the event ontology, use event types and argument roles as nodes, and construct a multi-relation event graph;
[0008] Use the language model BERT as a feature extractor to obtain the initialized feature matrix of all nodes in the multi-relation event graph;
[0009] Use relational graph convolution RGCN to learn and update the multi-relation event graph, and combine it with the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes to obtain node feature information that perceives the event structure;
[0010] The context feature representation is obtained based on the position of the event trigger word embedded in the input sentence, and the node feature information perceived by the event structure is used to construct the question;
[0011] Calculate the similarity matrix and attention based on the context feature representation and the question feature representation, and use the stream attention mechanism to generate the question-aware context feature representation;
[0012] Based on the context feature representation of question perception, the self-attention mechanism and argument matching algorithm are used to complete the extraction of event arguments. As a preferred technical solution, the multi-relation event graph MREG is represented as:
[0013] g=(V,ε,R)
[0014] Among them, V is a node set, which consists of event type nodes and argument role nodes; ε is a set of edges between nodes, indicating that there is a relationship connection between two nodes; R is an edge type set, that is, a relationship type set;
[0015] Each edge in the multi-relation event graph is represented by a triple (v1, v2, r) ∈ ε, where v1, v2 ∈ V, r ∈ R, indicating that there is an edge with a relation connection between node v1 and node v2, and the edge type is r;
[0016] The types / relationship types of the edges include three types: 1. Event type - Event type ET-ET, that is, an edge is connected between any two event type nodes; 2. Event type - Argument role ET-AR, that is, according to the definition of the event ontology, an edge is connected between the event type node and its corresponding set of argument role nodes; 3. Argument role - Argument role AR-AR, that is, an edge is connected between any two argument roles.
[0017] As a preferred technical solution, obtaining the initial feature matrix of all nodes in the multi-relationship event graph is specifically as follows:
[0018] Using the language model BERT as a feature extractor, initialize the feature representation for each node in the multi-relationship event graph. The formula is:
[0019]
[0020] where d is the dimension size of the output of the last hidden layer of the language model BERT, [CLS] and [SEP] are special characters in the language model BERT, represents the matrix;
[0021] Perform initialization processing on all nodes in the multi-relationship event graph to obtain the initial feature matrix of all nodes:
[0022]
[0023] where e i , 0 < i ≤ m represents the initial feature representation of the i-th node, and m is the total number of nodes.
[0024] As a preferred technical solution, obtaining the node feature information with event structure awareness is specifically as follows:
[0025] Use the relational graph convolutional network RGCN to learn and update the multi-relationship event graph, and combine the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes. Denote this process as RGAT;
[0026] When performing the L-th layer of RGAT, calculate the correlation score S i and v j of any two nodes, ij , and the formula is:
[0027]
[0028] where, is the feature vector of the node v i at the L-th layer, is the feature vector of the node v j at the L-th layer, is the learnable parameter matrix; represents the vector concatenation operation; σ(·) is a non-linear activation function;
[0029] Using the adjacency matrix under a specific relationship type r∈R as a mask for attention calculation, calculate the attention weights of the neighbor nodes of node v under relationship r i
[0030]
[0031] where is the neighbor node set of node v i under relationship r;
[0032] Using the attention weights weightedly aggregate the feature representations of the neighbor nodes to the central node v i and update v i 's features, the formula is:
[0033]
[0034] where is the feature vector output of node v after being updated by RGAT at the L-th layer, i and are learnable parameters in the L-th layer of RGAT; is the normalization constant; is the feature vector of node v at the L-th layer, when j is node v i 's neighbor node v j 's feature vector input at the L-th layer;
[0035] After L layers of learning by RGAT, obtain the node feature information with event structure perception, expressed as:
[0036]
[0037] where, is the node feature information of the event perception structure, represents the node feature output of node v after passing through L layers of RGAT, 0 < i ≤ m, and m is the total number of nodes. i
[0038] As a preferred technical solution, obtaining the context feature representation according to the position of the event trigger word embedded in the input statement is specifically:
[0039] For the input statement C, use the language model BERT as a feature extractor to extract the statement features, and the extraction formula is:
[0040]
[0041] Among them, w p (1≤p≤n) is the word representation in sentence C, n is the number of words in sentence C, w tri Indicates event trigger words, Dimension n is the output length of sentence C after being processed by the language model BERT;
[0042] According to the event trigger word, a set of 0\1 binary data is obtained, wherein the 0\1 binary data records the position information of the event trigger word and is used to indicate whether a character in the input sentence is an event trigger word;
[0043] The starting position predictor is used to predict the starting position embedding information of the event argument and embed it into the input sentence to obtain the context feature representation, which is expressed as:
[0044]
[0045] Where W s 、b S , W e 、b e is a learnable parameter, d′ is a characteristic The dimension size of represents the context feature representation used to predict the starting boundary of the argument, represents the context feature representation used to predict the end boundary of an argument, represents the event trigger word position embedding, d1 is the dimension size of the event trigger word position embedding; Represents the embedding information of the starting position of the event argument predicted by the starting position predictor, and d2 is the dimension size of the starting position embedding;
[0046] The node feature information construction problem using event structure perception is specifically:
[0047] The initialized feature matrix of all nodes in the multi-relation event graph and the node feature information perceived by the event structure are combined to obtain:
[0048]
[0049] Where Fusion(·) is the feature vector fusion function, including summation, averaging or concatenation operations;
[0050] According to the node feature information perceived by the event structure, the question is constructed using the fused node feature information of the event type and argument role. The feature of the question is expressed as Q:
[0051]
[0052] where q i ∈Q represents the eigenvector of the i-th element in the problem, They represent the feature vectors after the fusion of event type and argument role respectively.
[0053] As a preferred technical solution, the stream attention mechanism is used to generate the context feature representation of question perception, and the generation formula is:
[0054]
[0055] where FlowAtt(·) represents the flow attention function, and represents the context feature representation, and Representation of contextual features for question awareness.
[0056] As a preferred technical solution, the stream attention mechanism is used to generate question-aware context feature representation, specifically:
[0057] Calculate the similarity matrix SA between the context feature representation and the question feature representation s ,SA e :
[0058]
[0059] Where MLP(·) is a multi-layer perceptron; Represents element multiplication operation; SA s,ij express The similarity between the feature representation of the i-th character in Q and the feature representation of the j-th element in SA e,ij express The similarity between the feature representation of the i-th character in and the feature representation of the j-th element in Q;
[0060] The attention is calculated from the context to the question C2Q using the familiarity matrix, including:
[0061] for The feature representation of the i-th character in Q and the feature representation of the j-th element in Q are used to calculate the attention weight η. s,ij , η e,ij :
[0062]
[0063] Then use the attention weight η s,ij , η e,ij Aggregate the features of the question to get the feature representation of the C2Q of the i-th character
[0064]
[0065] combination The C2Q feature representation of all characters in , and the C2Q event mention representation is obtained
[0066] The attention is calculated in the direction from question to context Q2C using the familiarity matrix, including:
[0067] for The feature representation of the i-th character in , first calculate the attention weight μ s,i , μ e,i :
[0068]
[0069] Among them, SA s,i: Represents the similarity matrix SA s The similarity set of the i-th row in SA e,i: Represents the similarity matrix SA e The similarity set of the i-th row in ; max(·) represents the operation of taking the maximum value;
[0070] Then use the attention weight to aggregate the features of the context to obtain the Q2C feature representation of the i-th character
[0071]
[0072] in express The i-th eigenvector in , express The i-th eigenvector in ;
[0073] Will Flatten N times to get the event mention representation of Q2C
[0074] The context feature representation, the event mention representation of C2Q and the event mention representation of Q2C are combined to obtain the question-aware context feature representation generated by the stream attention mechanism. It is expressed as:
[0075]
[0076] in
[0077] As a preferred technical solution, the self-attention mechanism and argument matching algorithm are used to complete the extraction of event arguments, specifically:
[0078] Represent the contextual features of question perception Input a self-attention layer to couple the features of event mentions and questions to obtain event mention representations for predicting the start and end boundaries of the answer span. and
[0079]
[0080] Among them, Attention(·) represents the self-attention function, Query, Key, Value are the input variables of the self-attention function, and W a , W q , W k is a learnable parameter;
[0081] Contextual feature representation using the output of the self-attention layer and Predict the start and end boundaries of the event argument span, including:
[0082] The starting position predictor is used to make probability predictions on the start and end boundaries of the i-th character event argument span. The prediction formula is:
[0083]
[0084] Where start_prob[i] represents the probability that the ith character is predicted as the starting boundary of an event argument, end_prob[i] represents the probability that the ith character is predicted as the ending boundary of an event argument, and W sp , W ep , b sp and b ep All are learnable parameters; and are the contextual feature representations of the i-th character in event perception. and The eigenvectors in ;
[0085] Run an argument matching algorithm AMA to match the start and end boundaries of the span from start_prob and end_prob and extract event arguments, including:
[0086] First, retrieve a starting boundary s inside the event mention with start_prob[s]=1;
[0087] Then, starting from the current position s, search for the nearest end boundary e within the event mention and with end_prob = 1 to pair with the start boundary s;
[0088] Set the start and end boundaries s,e, event type t i and argument roles A 4-tuple representing an event argument Add to the answer list span_list;
[0089] Repeat the search until all s and matching e that meet the conditions are found, and store the corresponding four-tuples into span_list to complete the extraction of event arguments.
[0090] The second object of the present invention is to provide an event argument extraction system based on graph convolution and machine reading comprehension, characterized in that the event argument extraction method based on graph convolution and machine reading comprehension applied to the above-mentioned event argument extraction method includes an event graph construction module, a feature extraction module, a feature information acquisition module, a question construction module, a context representation module and an event argument extraction module;
[0091] The event graph construction module obtains the event ontology, takes the event type and argument role as nodes, and constructs a multi-relation event graph;
[0092] The feature extraction module uses the language model BERT as a feature extractor to obtain the initialized feature matrix of all nodes in the multi-relation event graph;
[0093] The feature information acquisition module uses the relational graph convolution RGCN to learn and update the multi-relation event graph, and combines the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes to obtain event structure-aware node feature information;
[0094] The question construction module obtains context feature representation according to the position of the event trigger word embedded in the input sentence, and constructs the question using the node feature information perceived by the event structure;
[0095] The context representation module calculates a similarity matrix and attention based on the context feature representation and the question feature representation, and generates a question-aware context feature representation using a stream attention mechanism;
[0096] The event argument extraction module is based on the context feature representation of question perception and uses a self-attention mechanism and an argument matching algorithm to complete the extraction of event arguments.
[0097] Another object of the present invention is to provide a computer-readable storage medium storing a program, characterized in that when the program is executed by a processor, the above-mentioned event argument extraction method based on graph convolution and machine reading comprehension is implemented.
[0098] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0099] 1. In order to fully mine the potential information between event types and argument roles, the present invention constructs a multi-relation event graph MREG using event ontology; specifically, the present invention uses event types and argument roles as nodes, designs three different types of edges to connect the corresponding nodes, and constructs a multi-relation undirected graph; then, the relational graph convolutional network RGCN is used to capture the structural features between nodes under different types of connections, and combined with the attention mechanism, the influence weight of each node on the central node is learned in a targeted manner, thereby effectively mining the potential information in the event structure.
[0100] 2. The present invention extracts corresponding node features from the multi-relation event graph MREG according to the event type and argument role to be extracted, and constructs a simple but information-rich problem representation, which not only reduces the cost of problem design, but also learns structural information using the multi-relation event graph MREG.
[0101] 3. In order to further utilize the information of event trigger words, the present invention introduces a new position embedding; specifically, after using the starting position predictor to predict the starting boundary of the event argument, the prediction result is converted into a starting position embedding, which is spliced with the context feature, and then the ending boundary predictor predicts the ending boundary of the argument, thereby realizing the information flow between predictors. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0103] Figure 1 Flowchart of an event argument extraction method based on graph convolution and machine reading comprehension in an embodiment of the present invention;
[0104] Figure 2 It is a framework diagram of an event argument extraction method based on graph convolution and machine reading comprehension in an embodiment of the present invention;
[0105] Figure 3 This is a structural diagram of an event argument extraction system based on graph convolution and machine reading comprehension in an embodiment of the present invention.
[0106] Figure 4 4 is a structural diagram of a computer-readable storage medium in an embodiment of the present invention. DETAILED DESCRIPTION
[0107] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0108] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0109] See also Figure 1 , Figure 2 In one embodiment of the present application, a method for extracting event arguments based on graph convolution and machine reading comprehension is provided, comprising the following steps:
[0110] S1. First, obtain the event ontology, and construct a multi-relation event graph with event types and argument roles as nodes;
[0111] The multi-relation event graph MREG is represented as follows:
[0112] g=(V,ε,R)
[0113] Where \(V\) represents the set of nodes, which consists of event type nodes and argument role nodes; \(\varepsilon\) is the set of edges between nodes in the multi-relational event graph, indicating that there is a certain relationship connection between two nodes; \(R\) is the set of edge types, that is, the set of relationship types; for each edge in the multi-relational graph, it can be represented by a triple \((v_1, v_2, r)\in\varepsilon\) (where \(v_1, v_2\in V\), \(r\in R\)), representing that there is an edge between node \(v_1\) and node \(v_2\), and the type of the relationship edge is \(r\); three types of relationships / edges are defined in the multi-relational event graph MREG: (1) Event Type - Event Type (ET - ET), indicating that an edge is connected between any two event type nodes to capture the correlation and dependence between events; (2) Event Type - Argument Role (ET - AR), indicating that according to the definition of the event ontology, an edge is connected between the event type node and its corresponding set of argument role nodes to capture the structural features within a single event ontology; (3) Argument Role - Argument Role (AR - AR), indicating that an edge is connected between any two argument roles to learn the relevant similarities between argument roles across event types.
[0114] S2. Use the language model BERT as a feature extractor to obtain the initial feature matrix of all nodes in the multi-relational event graph, specifically:
[0115] Use the language model BERT as a feature extractor to initialize the feature representation for each node in the multi-relational event graph. The formula is:
[0116]
[0117] where \(d\) is the dimension size of the output of the last hidden layer of the language model BERT, and \([CLS]\) and \([SEP]\) are special characters in the language model BERT. represents the matrix;
[0118] Perform initialization processing on all nodes in the multi-relational event graph to obtain the initial feature matrix of all nodes:
[0119]
[0120] where \(e\) i , \(0 < i\leq m\) represents the initial feature representation of the \(i\)-th node, and \(m\) is the total number of nodes.
[0121] S3. Use the relational graph convolutional network RGCN to learn and update the multi-relational event graph, and combine the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes to obtain the node feature information with event structure awareness, specifically:
[0122] The relational graph convolution RGCN is used to learn and update the relational graph, and the attention mechanism is combined to automatically learn the adaptive attention weights of neighboring nodes. The process is recorded as RGAT. Specifically:
[0123] S301, when performing the L-th layer RGAT, first calculate any two nodes v i and v j The relevance score of ij , the formula is as follows:
[0124]
[0125] in, is the L-th layer node v i The characteristic vector of is the L-th layer node v j The characteristic vector of is a learnable parameter matrix; represents the vector concatenation operation; σ(·) is the nonlinear activation function;
[0126] S302, then use the adjacency matrix under the specific relationship type r∈R as the mask for attention calculation, and calculate the node v under the relationship r i The attention weights of the neighbor nodes
[0127]
[0128] in is node v i The set of neighbor nodes under relation r;
[0129] S303, attention weight Used to aggregate the feature representations of neighbor nodes to the central node v i And update v i The characteristics of are calculated as follows:
[0130]
[0131] in is the node v after the RGAT update at level L i The feature vector output aggregates the information of neighbor nodes under three relationships; and is the learnable parameter in the L-th layer RGAT; is the normalization constant; is the L-th layer node v j The characteristic vector of hour, is node v i is the neighbor node v of node v under relationship r j is the feature vector input at the L-th layer;
[0132] S304. After L layers of RGAT learning, each node aggregates information from neighbors on multiple relationships and paths with a distance of L and updates the node feature representation, so as to realize the learning and capture of the potential relationship information of event types and argument roles, and obtain the node feature information with event structure awareness, expressed as:
[0133]
[0134] where is the node feature information of the event perception structure, represents node v i is the node feature output after L layers of RGAT, 0 < i ≤ m, and m is the total number of nodes.
[0135] S4. Obtain the context feature representation according to the position of the event trigger word embedded in the input statement, and construct a question using the node feature information with event structure awareness;
[0136] S401. Since the extraction of event arguments depends on the event type, and the event type is triggered by a trigger word in the sentence that best represents the occurrence of the event, it is necessary to know which characters constitute the trigger word during argument extraction. Therefore, a learnable trigger word position embedding is introduced to indicate whether each character participates in forming the event trigger word. Specifically:
[0137] For the input statement C, use the language model BERT as the feature extractor to extract the statement features. The extraction formula is:
[0138]
[0139] where w p (1 ≤ p ≤ n) is the word representation in statement C, n is the number of words in statement C, and w tri represents the event trigger word, the dimension N is the output length of statement C after being processed by the language model BERT;
[0140] Obtain a set of binary data of 0 / 1 according to the event trigger word. The 0 / 1 binary data here records the event trigger word position information and is used to indicate whether a certain character in the input statement is the event trigger word;
[0141] Use the start position predictor to predict the start position embedding information of the event argument and embed it into the input statement to obtain the context feature representation, expressed as:
[0142]
[0143] Where W s 、b S , W e 、b e is a learnable parameter, d′ is a characteristic The dimension size of represents the context feature representation used to predict the starting boundary of the argument, represents the context feature representation used to predict the end boundary of an argument, represents the event trigger word position embedding, d1 is the dimension size of the trigger word position embedding; It represents the starting position embedding information of the event argument predicted by the starting position predictor, and d2 is the dimension size of the starting position embedding;
[0144] S402, the initialized feature matrix of all nodes in the multi-relation event graph and the node feature information perceived by the event structure are merged to obtain:
[0145]
[0146] Where Fusion(·) is the feature vector fusion function, including summation, averaging or concatenation operations;
[0147] According to the node feature information perceived by the event structure, the node feature information of its event type and argument role is used to construct the question as the input of event argument extraction based on the question-answering mechanism. The feature of the question is expressed as Q:
[0148]
[0149] where q i ∈Q represents the feature vector of the i-th element (i.e., event type or argument role) in the problem, They represent the feature vectors after the fusion of event type and argument role respectively.
[0150] S5. Calculate the similarity matrix and attention based on the context feature representation and the question feature representation, and use the stream attention mechanism to generate the question-aware context feature representation;
[0151] The event argument extraction based on the argument question-answering mechanism in the present invention is to extract the answer from the context according to the question. Since the question and the context are encoded separately in the question-answering method based on the relationship graph, the stream attention mechanism is used to generate the context feature representation of the question perception. The generation formula is:
[0152]
[0153] Where FlowAtt(·) represents the flow attention function, expressed as context features ( or ) and question feature representation Q as input, and outputs question-aware context feature representation ( or ); and represents the context feature representation, and Representation of contextual features for question awareness.
[0154] The specific steps of using the streaming attention mechanism to generate question-aware contextual feature representations are:
[0155] S501, calculate the similarity matrix SA between the context feature representation and the question feature representation s ,SA e :
[0156]
[0157] Where MLP(·) is a multi-layer perceptron; Represents element multiplication operation; SA s,ij express The similarity between the feature representation of the i-th character in Q and the feature representation of the j-th element in SA e,ij express The similarity between the feature representation of the i-th character in and the feature representation of the j-th element in Q;
[0158] S502: Calculate attention from context to query (C2Q) using the familiarity matrix, specifically:
[0159] for The feature representation of the i-th character in Q and the feature representation of the j-th element in Q are used to calculate the attention weight η. s,ij , η e,ij :
[0160]
[0161] Then use the attention weight η s,ij , η e,ij Aggregate the features of the question to get the feature representation of the C2Q of the i-th character
[0162]
[0163] combination The C2Q feature representation of all characters in , and the C2Q event mention representation is obtained
[0164] S503, using the familiarity matrix to calculate attention from the query to context (Q2C) direction. Q2C attention indicates the events and characters closest to each element in the question. This is an important basis for the model to submit answers to questions from the context. Specifically:
[0165] for The feature representation of the i-th character in , first calculate the attention weight μ s,i , μ e,i :
[0166]
[0167] Among them, SA s,i: Represents the similarity matrix SA s The similarity set of the i-th row in SA e,i: Represents the similarity matrix SA e The similarity set of the i-th row in ; max(·) represents the operation of taking the maximum value;
[0168] Then use the attention weight to aggregate the features of the context to obtain the Q2C feature representation of the i-th character
[0169]
[0170] in express The i-th eigenvector in , express The i-th eigenvector in ;
[0171] Will Flatten N times to get the event mention representation of Q2C
[0172] S504: Combine the context feature representation, the event mention representation of C2Q, and the event mention representation of Q2C to obtain the question-aware context feature representation generated by the stream attention mechanism It is expressed as:
[0173]
[0174] in
[0175] S6. Based on the context feature representation of question perception, the self-attention mechanism and argument matching algorithm are used to complete the extraction of event arguments. Specifically:
[0176] S601, representing the contextual features of the problem perception Input a self-attention layer to further couple the features of event mentions and questions to obtain event mention representations for predicting the start and end boundaries of the answer span and
[0177]
[0178] Among them, Attention(·) represents the self-attention function, Query, Key, Value are the input variables of the self-attention function, and W a , W q , W k is a learnable parameter;
[0179] S602, using the context feature representation output by the self-attention layer and Predict the start and end boundaries of the event argument span, specifically:
[0180] Probabilistic prediction is performed on the start and end boundaries of the span of the i-th character event argument. The prediction formula is:
[0181]
[0182] Where start_prob[i] represents the probability that the ith character is predicted as the starting boundary of an event argument, end_prob[i] represents the probability that the ith character is predicted as the ending boundary of an event argument, and W sp , W ep , b sp and b ep All are learnable parameters; and are the contextual feature representations of the i-th character in event perception. and The eigenvectors in ;
[0183] S603, running an argument matching algorithm (AMA) to match the start and end boundaries of the span from start_prob and end_prob and extract event arguments, specifically:
[0184] First, retrieve a starting boundary s inside the event mention with start_prob[s]=1;
[0185] Then, starting from the current position s, search for the nearest end boundary e within the event mention and with end_prob = 1 to pair with the start boundary s;
[0186] Set the start and end boundaries s,e, event type t i and argument roles A 4-tuple representing an event argument Add to the answer list span_list;
[0187] Repeat the search until all s and matching e that meet the conditions are found, and store the corresponding four-tuples into span_list to complete the extraction of event arguments.
[0188] To verify the effectiveness of the present invention, event argument extraction is performed on the input sentence "Stewart's 1979 marriage to AlanaHamilton lasted five years and produced two", where the event type is "Life.Marry", the trigger word is "marriage", and the argument role is "Person";
[0189] The event argument extraction method based on graph convolution and machine reading comprehension of the present invention and the EEQA_ARG method in the prior art are used for prediction, and the prediction results are:
[0190] The prediction results of the method of the present invention are: Answer 1: Stewart, Answer 2: Alana Hamilton;
[0191] The prediction results of the comparison method EEQA_ARG method are: Answer 1: Stewart, Answer 2: Alana Hamilton, Answer 3: Alana;
[0192] The golden answers to the above input sentence are: Answer 1: Stewart; Answer 2: Alana Hamilton, so the prediction result of the method of the present invention is correct; the prediction result of the EEQA_ARG method is wrong.
[0193] To further illustrate the effectiveness of the present invention, the event argument extraction method based on graph convolution and machine reading comprehension in this embodiment is compared with EEQA_ARG in the prior art to test the performance of event argument recognition on the public dataset ACE2005. The F1 score is used in the test index. The higher the F1 score, the better the recognition performance. The method of the present invention can reach 57.71%, while EEQA_ARG can only reach 55.29%. Therefore, the performance of the present invention is better than that of the prior art.
[0194] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.
[0195] Based on the same idea as the event argument extraction method based on graph convolution and machine reading comprehension in the above-mentioned embodiment, the present invention also provides an event argument extraction system based on graph convolution and machine reading comprehension, which can be used to execute the above-mentioned event argument extraction method based on graph convolution and machine reading comprehension. For ease of explanation, the structural schematic diagram of the embodiment of the event argument extraction system based on graph convolution and machine reading comprehension only shows the parts related to the embodiment of the present invention. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown in the diagram, or combine certain components, or arrange the components differently.
[0196] See also Figure 3 In another embodiment of the present application, an event argument extraction system based on graph convolution and machine reading comprehension is provided, the system comprising an event graph construction module, a feature extraction module, a feature information acquisition module, a question construction module, a context representation module and an event argument extraction module;
[0197] The event graph construction module obtains the event ontology, takes the event type and argument role as nodes, and constructs a multi-relation event graph;
[0198] The feature extraction module uses the language model BERT as a feature extractor to obtain the initialized feature matrix of all nodes in the multi-relation event graph;
[0199] The feature information acquisition module uses the relational graph convolution RGCN to learn and update the multi-relation event graph, and combines the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes to obtain event structure-aware node feature information;
[0200] The question construction module obtains context feature representation based on the position of the event trigger word embedded in the input sentence, and constructs questions using the node feature information perceived by the event structure;
[0201] The context representation module calculates the similarity matrix and attention based on the context feature representation and the question feature representation, and uses the stream attention mechanism to generate question-aware context feature representation;
[0202] The event argument extraction module is based on the question-aware context feature representation and uses the self-attention mechanism and argument matching algorithm to extract event arguments.
[0203] It should be noted that the event argument extraction system based on graph convolution and machine reading comprehension of the present invention corresponds one-to-one to the event argument extraction method based on graph convolution and machine reading comprehension of the present invention. The technical features and beneficial effects described in the above-mentioned embodiment of the event argument extraction method based on graph convolution and machine reading comprehension are applicable to the embodiment of the event argument extraction system based on graph convolution and machine reading comprehension. For specific contents, please refer to the description in the embodiment of the method of the present invention, which will not be repeated here. This is hereby declared.
[0204] In addition, in the implementation of the event argument extraction system based on graph convolution and machine reading comprehension in the above-mentioned embodiment, the logical division of each program module is only an example. In actual applications, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the event argument extraction system based on graph convolution and machine reading comprehension is divided into different program modules to complete all or part of the functions described above.
[0205] See also Figure 4 In one embodiment, a computer-readable storage medium is provided, which stores a program in a memory. When the program is executed by a processor, an event argument extraction method based on graph convolution and machine reading comprehension is implemented, specifically:
[0206] Get the event ontology, use event types and argument roles as nodes, and construct a multi-relation event graph;
[0207] Use the language model BERT as a feature extractor to obtain the initialized feature matrix of all nodes in the multi-relation event graph;
[0208] Use relational graph convolution RGCN to learn and update the multi-relation event graph, and combine it with the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes to obtain node feature information that perceives the event structure;
[0209] The context feature representation is obtained based on the position of the event trigger word embedded in the input sentence, and the node feature information perceived by the event structure is used to construct the question;
[0210] Calculate the similarity matrix and attention based on the context feature representation and the question feature representation, and use the stream attention mechanism to generate the question-aware context feature representation;
[0211] Based on the context feature representation of question perception, the self-attention mechanism and argument matching algorithm are used to complete the extraction of event arguments.
[0212] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory.
[0213] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0214] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. Event argument extraction method based on graph convolution and machine reading comprehension, It is characterized in that The steps include: Get the event ontology, use event types and argument roles as nodes, and construct a multi-relation event graph; The multi-relation event graph MREG is represented as: g=(V,ε,R) Among them, V is a node set consisting of event type nodes and argument role nodes; ε is a set of edges between nodes, indicating that there is a relationship connection between two nodes; R is a set of relationship types; Each edge in the multi-relation event graph is represented by a triple (v 1 ,v 2 ,r)∈ε, where v 1 ,v 2 ∈V,r∈R, represents node v 1 and node v 2 There are edges with relationship connections between them, and the edge type is r; The relationship types include three types: 1 event type-event type ET-ET, that is, connecting edges between any two event type nodes; 2 event type-argument role ET-AR, that is, according to the definition of event ontology, connecting edges between event type nodes and a set of corresponding argument role nodes; 3 argument role-argument role AR-AR, that is, connecting edges between any two argument roles; Use the language model BERT as a feature extractor to obtain the initialized feature matrix of all nodes in the multi-relation event graph; The step of obtaining the initialization feature matrix of all nodes in the multi-relation event graph is as follows: Use the language model BERT as a feature extractor to initialize the feature representation for each node in the multi-relation event graph. The formula is: Where d is the dimension size of the last hidden layer output of the language model BERT, [CLS] and [SEP] are special characters in the language model BERT, represents a matrix; Initialize all nodes in the multi-relation event graph to obtain the initialization feature matrix of all nodes: where e i , 0 < i ≤ m represents the initialization feature representation of the i-th node, and m is the total number of nodes; Use relational graph convolution RGCN to learn and update the multi-relation event graph, and combine it with the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes to obtain node feature information that perceives the event structure; The node feature information of event structure perception is obtained as follows: The relational graph convolution (RGCN) is used to learn and update the multi-relation event graph, and the attention mechanism is combined to automatically learn the adaptive attention weights of neighbor nodes. This process is denoted as RGAT. When performing the L-th layer RGAT, calculate any two nodes v i and v j The relevance score S ij , the formula is: in, is the L-th layer node v i The characteristic vector of is the L-th layer node v j The characteristic vector of is a learnable parameter matrix; represents the vector concatenation operation; σ(·) is the nonlinear activation function; Use the adjacency matrix under a specific relationship type r∈R as the mask for attention calculation and calculate the node v under the relationship r i The attention weights of the neighbor nodes in is node v i The set of neighbor nodes under relation r; Using attention weights Aggregate the feature representations of neighboring nodes to the central node v i And update v i The characteristics of are: in is the node v after the RGAT update at level L i The feature vector output is and is the learnable parameter in the L-th layer RGAT; is the normalization constant; is the L-th layer node v j The characteristic vector of hour, is node v i Neighbor node v under relation r j Feature vector at the Lth layer input; After learning L layers of RGAT, the event structure-aware node feature information is obtained, which is expressed as: Among them, is the node feature information of the event perception structure, represents the node v i The node features output after passing through L layers of RGAT, where 0 < i ≤ m and m is the total number of nodes; The context feature representation is obtained based on the position of the event trigger word embedded in the input sentence, and the node feature information perceived by the event structure is used to construct the question; Calculate the similarity matrix and attention based on the context feature representation and the question feature representation, and use the stream attention mechanism to generate the question-aware context feature representation; Based on the context feature representation of question perception, the self-attention mechanism and argument matching algorithm are used to complete the extraction of event arguments.
2. According to claim 1, the event argument extraction method based on graph convolution and machine reading comprehension, It is characterized in that The context feature representation is obtained according to the position of the event trigger word embedded in the input sentence, specifically: For the input sentence C, the language model BERT is used as a feature extractor to extract sentence features. The extraction formula is: Among them, w p (1≤p≤n) is the word representation in sentence C, n is the number of words in sentence C, w tri Indicates event trigger words, Dimension N is the output length of sentence C after being processed by the language model BERT; According to the event trigger word, a set of 0\1 binary data is obtained, wherein the 0\1 binary data records the position information of the event trigger word and is used to indicate whether a character in the input sentence is an event trigger word; The starting position predictor is used to predict the starting position embedding information of the event argument and embed it into the input sentence to obtain the context feature representation, which is expressed as: Where W s , b S , W e , b e is a learnable parameter, d′ is a characteristic The dimension size of represents the context feature representation used to predict the starting boundary of the argument, represents the context feature representation used to predict the end boundary of an argument, represents the event trigger word position embedding, d 1 The dimension size of the event trigger word position embedding; represents the embedding information of the starting position of the event argument predicted by the starting position predictor, d 2 The embedding dimension size for the starting position.
3. The event argument extraction method based on graph convolution and machine reading comprehension according to claim 2, It is characterized in that The flow attention mechanism is used to generate question-aware context feature representation, and the generation formula is: where FlowAtt(·) represents the flow attention function, and represents the context feature representation, and Representation of contextual features for question awareness.
4. The event argument extraction method based on graph convolution and machine reading comprehension according to claim 3, It is characterized in that The self-attention mechanism and argument matching algorithm are used to complete the extraction of event arguments, specifically: Represent the contextual features of question perception Input a self-attention layer to couple the features of event mentions and questions to obtain event mention representations for predicting the start and end boundaries of the answer span. and Among them, Attention(·) represents the self-attention function, Query, Key, Value are the input variables of the self-attention function, and W a , W q , W k is a learnable parameter; Contextual feature representation using the output of the self-attention layer and Predict the start and end boundaries of the event argument span, including: The starting position predictor is used to make probability predictions on the start and end boundaries of the i-th character event argument span. The prediction formula is: Where start_prob[i] represents the probability that the ith character is predicted as the starting boundary of an event argument, end_prob[i] represents the probability that the ith character is predicted as the ending boundary of an event argument, and W sp , W ep , v sp and b ep All are learnable parameters; and are the contextual feature representations of the i-th character in event perception. and The eigenvectors in ; Run an argument matching algorithm AMA to match the start and end boundaries of the span from start_prob and end_prob and extract event arguments, including: First, retrieve a starting boundary s inside the event mention with start_prob[s]=1; Then, starting from the current position s, search for the nearest end boundary e within the event mention and with end_prob = 1 to pair with the start boundary s; Set the start and end boundaries s,e, event type t i and argument roles A 4-tuple representing an event argument Add to the answer list span_list; Repeat the search until all s and matching e that meet the conditions are found, and store the corresponding four-tuples into span_list to complete the extraction of event arguments.
5. Event argument extraction system based on graph convolution and machine reading comprehension, It is characterized in that An event argument extraction method based on graph convolution and machine reading comprehension applied to any one of claims 1-4, comprising an event graph construction module, a feature extraction module, a feature information acquisition module, a question construction module, a context representation module and an event argument extraction module; The event graph construction module obtains the event ontology, takes the event type and argument role as nodes, and constructs a multi-relation event graph; The feature extraction module uses the language model BERT as a feature extractor to obtain the initialized feature matrix of all nodes in the multi-relation event graph; The feature information acquisition module uses the relational graph convolution RGCN to learn and update the multi-relation event graph, and combines the attention mechanism to automatically learn the adaptive attention weights of neighbor nodes to obtain event structure-aware node feature information; The question construction module obtains context feature representation according to the position of the event trigger word embedded in the input sentence, and constructs the question using the node feature information perceived by the event structure; The context representation module calculates a similarity matrix and attention based on the context feature representation and the question feature representation, and generates a question-aware context feature representation using a stream attention mechanism; The event argument extraction module is based on the context feature representation of question perception and uses a self-attention mechanism and an argument matching algorithm to complete the extraction of event arguments.
6. A computer-readable storage medium storing a program, It is characterized in that When the program is executed by a processor, the event argument extraction method based on graph convolution and machine reading comprehension described in any one of claims 1 to 4 is implemented.
