Event argument extraction method and device
By introducing a hierarchical relationship between event types and a two-stage fusion method of the discriminant network, the problem of training data imbalance in event extraction is solved, the performance of event detection and argument extraction is improved, and higher recall and accuracy are achieved.
Patent Information
- Application Number
- CN202310942975.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-07-28
AI Technical Summary
Existing event extraction methods have failed to effectively address the problem of imbalanced training data, resulting in uneven model performance across different event types and low recall when extracting argument roles.
A two-stage event extraction method with enhanced event type representation is adopted. By encoding the training data and event types separately, a graph neural network is constructed by introducing the hierarchical relationship of event types to generate the argument extraction problem. The two-stage results are then fused with a discriminant network to improve the performance of argument role extraction.
It effectively alleviated the problem of training data imbalance, improved the performance of event detection and argument extraction, and enhanced the recall and accuracy of the model on the test set.
Smart Images

Figure CN117149940B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of event extraction, and in particular to a sentence-level event argument extraction method and device. BACKGROUND
[0002] Event extraction is one of the important tasks in the field of information extraction, and its goal is to extract structured event information from given unstructured text, including event trigger words, event types, event arguments and their roles. According to the range of text involved, event extraction can be divided into two categories: sentence-level and chapter-level. The present application focuses on sentence-level event extraction, which is referred to as event extraction in the following text without causing confusion. At present, the event extraction task usually adopts a deep learning-based method, which can be divided into two categories according to the different result acquisition methods: classification-based method and generation-based method. The former treats event extraction as a multi-classification task at the word level, and obtains the final extraction result by classifying the labels of all words in the input text; the latter adopts an end-to-end form, and directly generates the trigger word and argument content of the event, and locates the final structured event result by comparing the generated content with the original text.
[0003] The existing event extraction method has achieved good results in the two sub-tasks, but the existing method ignores the imbalance problem of the training data itself, which leads to partial performance loss of the model during training. The so-called training data imbalance contains two aspects: on the one hand, the training samples of different event types in event detection are greatly different in quantity, and the existing method generally identifies all event types by training a single model. Although this method can simplify the implementation and management of the algorithm, the performance of the single model on different event types may be biased due to the difference in the amount of data between different event types. On the other hand, the quantity imbalance caused by the presence or absence of argument roles in the original text during event argument extraction, the existing method assumes that a sentence contains all argument roles. However, in fact, a sentence often does not contain all argument roles, and the construction of negative samples for model training is too much, resulting in a very low recall rate on the test set. SUMMARY
[0004] In view of the above problems, the present application provides an event argument extraction method and device, which is realized by an event type representation enhanced two-stage event extraction method, and solves the problem of lack of consideration of training data imbalance in event extraction.
[0005] In order to achieve the above purpose, the present application provides an event argument extraction method, which comprises:
[0006] The training data and event types are encoded respectively to obtain the trigger word context semantic representation and the representation of the event type.
[0007] interact the trigger word context semantic representation and the representation of event type to obtain a trigger word representation containing event type information, and classify the trigger word representation to predict the event type;
[0008] According to the specific trigger word and the predicted event type, design argument extraction template, generate argument extraction question corresponding to the event type, and splice the to-be-extracted text and the argument extraction question to obtain the context semantic representation of the label, the context semantic representation of each word in the to-be-extracted sentence, and the context semantic representation of the argument role;
[0009] After splicing the context semantic representation of the label and the context semantic representation of the argument role to be extracted, input the discriminant network to obtain a discriminant probability;
[0010] After splicing the context semantic representation of each word in the to-be-extracted sentence and the context semantic representation of the argument role to be extracted, input the discriminant network to obtain a labeling probability;
[0011] Determine the final argument role corresponding extraction result by combining the discriminant probability and the labeling probability.
[0012] Optionally, the training data is encoded to obtain a trigger word context semantic representation, which includes:
[0013] The training data is preprocessed,
[0014] The preprocessed training data is pre-encoded using a BERT pre-training language model to obtain a distributed semantic representation of each word after BERT pre-training model encoding;
[0015] Aggregate the distributed semantic representation corresponding to the trigger word to obtain the trigger word context semantic representation.
[0016] Optionally, the event type is encoded to obtain a representation of the event type, which includes:
[0017] According to the hierarchical relationship of the event type, a graph neural network is constructed, wherein the graph nodes are label nodes of the event type and sub-event type, and when the sub-event type is subordinate to the event type, an edge appears between the corresponding nodes;
[0018] Information is transmitted between the graph nodes to obtain a representation of the event type.
[0019] Optionally, the trigger word context semantic representation and the representation of the event type are interacted to obtain a trigger word representation containing event type information, which includes:
[0020] The trigger word context semantic representation and the representation of the event type are calculated by attention to obtain a trigger word feature containing event type information;
[0021] The trigger word representation is obtained according to the weighted sum of the trigger word feature and the trigger word context semantic representation.
[0022] Optionally, according to the trigger word of the event and the predicted event type, a design argument extraction template is designed to generate an argument extraction question corresponding to the event type, which includes:
[0023] The trigger word, the predicted event type, and the argument extraction template are spliced to obtain an argument extraction question.
[0024] The event type provides a definition of a given event type, the trigger word of the event describes the corresponding trigger word that needs to be extracted, and the argument extraction template represents the structure of the given event type.
[0025] Optionally, the to-be-extracted text and the argument extraction question are spliced and encoded to obtain the context semantic representation of the label, the context semantic representation of each word in the to-be-extracted sentence, and the context semantic representation of the argument role, which includes:
[0026] The to-be-extracted text and the argument extraction question are spliced, preprocessed, and input into a BERT pre-training language model for pre-encoding to obtain the context semantic representation of the label, the context semantic representation of each word in the to-be-extracted sentence, and the context semantic representation of the argument role corresponding to the segment.
[0027] The context semantic representation of the argument role corresponding to the segment.
[0028] The context semantic representation of the argument role corresponding to the segment is aggregated to obtain the context semantic representation of the argument role that needs to be extracted.
[0029] Optionally, after splicing the context semantic representation of the label and the context semantic representation of the argument role that needs to be extracted, the discrimination probability is obtained by inputting the discrimination network, which includes:
[0030] The context semantic representation of the label and the context semantic representation of the argument role that needs to be extracted are spliced to obtain the discrimination feature of the argument role in the text.
[0031] The discrimination feature is input into a two-layer discrimination network for feature modeling.
[0032] The probability of the argument role being extractable in the text is modeled by a softmax function to determine the discrimination probability:
[0033]
[0034] wherein, represents the discrimination probability that the argument role has no answer in the text, represents the discrimination probability that the argument role has an answer in the text.
[0035] Optionally, after splicing the context semantic representation of each word in the sentence to be extracted and the context semantic representation of the argument role to be extracted, the input discriminative network obtains a labeling probability, including:
[0036] Splicing the context semantic representation of each word in the sentence to be extracted and the context semantic representation of the argument role to be extracted obtains the extraction feature of each word for the argument role;
[0037] The extraction feature is respectively input into three two-layer discriminative networks, respectively modeling the start label feature, the end label feature and the BIO label feature of the word as the argument corresponding argument reference;
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044] wherein, Z start , Z end , Z BIO respectively represent the start label feature, the end label feature and the BIO label feature, represents a discriminative feature, are all learnable parameters;
[0045] According to the start label feature, the end label feature and the BIO label feature of the word as the argument corresponding argument reference, the start label probability, the end label probability and the BIO label probability of the word as the argument corresponding argument reference are modeled through a softmax function to determine the labeling probability;
[0046]
[0047]
[0048]
[0049] wherein, the labeling probability includes the start label probability, the end label probability and the BIO label probability, represents the start label probability and the end label probability of the word not as the argument reference a probability that the token is part of the argument mention, a probability that the token is not part of the argument mention, a probability that the token is the start of the argument mention, a probability that the token is the middle content of the argument mention.
[0050] Optionally, the combining the determination probability and the labeling probability to determine the extraction result corresponding to the argument role comprises:
[0051] obtaining a determination score of having an answer according to the determination probability of the argument role having an answer in the text;
[0052] obtaining a target extraction score of having an answer according to the labeling probability, comprising:
[0053] obtaining a first extraction score according to a weighted sum of a probability that the token is a start label of the argument mention and a probability that the token is an end label of the argument mention;
[0054] obtaining a second extraction score according to a weighted sum of a probability that the token is the start of the argument mention and a probability that the token is the middle content of the argument mention;
[0055] obtaining the target extraction score of having an answer according to a weighted sum of the first extraction score and the second extraction score;
[0056] obtaining a comprehensive score of the extraction segment answering the question according to a weighted sum of the determination score and the target extraction score;
[0057] determining the extraction result corresponding to the argument role according to the comprehensive score, comprising:
[0058] when the comprehensive score exceeds a score threshold, indicating that the question is answerable, adding the extraction segment to the result of the argument mention corresponding to the role;
[0059] when the comprehensive score does not exceed a score threshold, indicating that the question is not answerable, discarding the extraction segment.
[0060] Another aspect of the present application also provides an event argument extraction device, which adopts the event argument extraction method described above, and at least comprises:
[0061] a text and event type encoding module, configured to encode the training data and the event type respectively to obtain a representation of the trigger word context semantics and a representation of the event type;
[0062] An interaction and prediction module is configured to interact the trigger word context semantic representation and the representation of the event type to obtain a trigger word representation containing event type information, and classify the trigger word representation to predict the event type.
[0063] A question coding module is configured to design an argument extraction template according to the specific trigger word and the predicted event type, generate an argument extraction question corresponding to the event type, splice the argument extraction question and the text to be extracted to code to obtain a context semantic representation of a label, a context semantic representation of each word in the sentence to be extracted and a context semantic representation of an argument role.
[0064] An argument role discrimination module is configured to splice the context semantic representation of the label and the context semantic representation of the argument role to be extracted, and input the discrimination network to obtain a discrimination probability.
[0065] An argument role extraction module is configured to splice the context semantic representation of each word in the sentence to be extracted and the context semantic representation of the argument role to be extracted, and input the discrimination network to obtain a labeling probability.
[0066] An argument role decoding module is configured to determine an extraction result corresponding to the final argument role in combination with the discrimination probability and the labeling probability.
[0067] It can be known from the above scheme that the present application has the following advantages:
[0068] The event argument extraction method provided by the application is used for event argument extraction based on a sentence level and mainly includes two processes of event detection and argument extraction. In the event detection process, the training data and event types are encoded respectively to obtain a trigger word context semantic representation and an event type representation; the trigger word context semantic representation and the event type representation are interacted to obtain a trigger word representation containing event type information, and the trigger word representation is classified to predict an event detection of an event type. In the event detection task, a hierarchical relationship of the event type is introduced to construct a graph neural network for event type coding. The hierarchical relationship is permanently established on a given data set without manual design, which avoids noise caused by the introduction of additional knowledge by using manual design or third-party tools. In the argument extraction process, an argument extraction question corresponding to the event type is generated, and the argument extraction question is spliced with the text to be extracted to obtain a label context semantic representation, a context semantic representation of each word in the sentence to be extracted and a context semantic representation of an argument role. Then, the label context semantic representation and the context semantic representation of the argument role to be extracted are spliced and input into a discriminative network to obtain a discriminative probability. The context semantic representation of each word in the sentence to be extracted and the context semantic representation of the argument role to be extracted are spliced and input into the discriminative network to obtain a labeling probability. Finally, the discriminative probability and the labeling probability are combined to determine an extraction result corresponding to the argument role. The discriminative network is introduced in the event argument extraction task, and through two-stage result fusion, the sample imbalance problem is effectively alleviated with little increase in calculation cost. Meanwhile, the discriminative probability and the labeling probability are combined for argument role extraction, which further improves the argument extraction performance. BRIEF DESCRIPTION OF DRAWINGS
[0069] Figure 1 A flowchart of an event argument extraction method provided by an embodiment of the application is shown;
[0070] Figure 2 An event type structure coding in the application is shown in detail;
[0071] Figure 3 An event detection process structure diagram of steps S1-S2 in the application is shown;
[0072] Figure 4 A training corpus preprocessing question structure diagram in step S3 in the application is shown;
[0073] Figure 5 An event argument extraction module structure diagram of steps S4-S6 in the application is shown in detail;
[0074] Figure 6 An architecture diagram of an event argument extraction device is shown;
[0075] wherein,
[0076] 200 - event argument extraction device;
[0077] 201 - text and event type encoding module;
[0078] 202 - interaction and prediction module;
[0079] 203 - question encoding module;
[0080] 204 - argument role determination module;
[0081] 205 - argument role extraction module;
[0082] 206 - argument role decoding module. DETAILED DESCRIPTION
[0083] In order to make the above features and effects of the present application more explicit and easy to understand, the following embodiments are specifically described, and the detailed description is as follows in conjunction with the drawings.
[0084] The purpose of the present application is to solve the problem of ignoring training data imbalance in the prior art, and to propose a two-stage event extraction method with enhanced event type representation. In the event detection task, the hierarchical relationship of event types is introduced, and a discriminative method with enhanced event type representation is designed and implemented. Knowledge transfer is performed using the hierarchical relationship of event types, especially from event types with a large number of samples to event types with a small number of samples, to enhance the representation of the overall event type and improve the performance of the event detection task. The argument extraction task is converted into a reading comprehension task, and the existence of argument roles is converted into the existence of answers to reading comprehension questions. First, it is determined whether there is an answer, and then the start and end positions of the answer are extracted. Finally, the two-stage answer fusion is used to determine the final argument extraction result. The present application will be described in detail below.
[0085] As shown in Figure 1 Figure 1 A flowchart of an event argument extraction method according to an embodiment of the present application is shown, and the method comprises the following steps:
[0086] An event argument extraction method comprises:
[0087] S1, encode the training data and event types respectively to obtain the trigger word context semantic representation and the representation of the event type.
[0088] In this embodiment, the contextual semantic representation of trigger words is obtained by encoding the training data; and the representation of event types is obtained by encoding the event types. Specifically, for encoding the training data, the training data is first preprocessed. Specifically, the WordPieceTokenizer module in the Transformers library can be used to segment the text of the training data, and inputs of the same batch of words are padded to the same length according to the longest text in that batch. Then, a large-scale corpus BERT pre-trained language model is used to pre-encode the input character and word sequences of the preprocessed training data, obtaining a distributed semantic representation of each character encoded by the BERT pre-trained model. Compared to traditional static word vectors, this method can obtain richer dynamic semantic representations.
[0089] X = BERT([CLS], t1, t2, ..., t n ,[SEP])={x CLS ,x1,x2,…,x n ,x SEP}, where [CLS] and [SEP] are tags, x CLS ,x1,x2,…,x n ,x SEP It represents the semantic expression of each word.
[0090] Then, the distributed semantic representations corresponding to the text trigger words are aggregated to obtain the contextual semantic representation of the trigger words. That is, the semantic vectors of the trigger words are weighted and averaged to obtain the contextual semantic representation x of the trigger words. tri :
[0091]
[0092] In addition, for the encoding of event types, the specific encoding is as follows: Figure 2 As shown, a graph neural network is constructed based on the hierarchical relationship of event types, where graph nodes are label nodes for event types and sub-event types. When a sub-event type belongs to an event type, an edge appears between its corresponding nodes. Information is transmitted between graph nodes to obtain the representation of the event type.
[0093] Specifically, assuming the parent node v i With child node v j There exists a hierarchical path e i,j The feature f(e) of this edge i,j The probability will be determined by the prior probability P(U) j |U i ) and P(U i |U j )express:
[0094]
[0095]
[0096] Among them, U k Indicates v k The occurrence of k∈{i,j}, P(U j |U i ) indicates when v i When it appears v j The probability of occurrence, P(U) j ∩U i ) represents {v j ,v i The probability of them occurring simultaneously; N k In the training set U k Since the occurrence of a certain sub-event type guarantees the occurrence of its corresponding event type, this invention sets the probability value for j∈child(i) to 1.0. The weighted adjacency matrix uses the global edge feature matrix F = a 0,0 ,a 0,1 ,…,a C-1,C-1 This means that for node i, the self-loop edge a i,i =1, and the weights of other edges are calculated using the edge features f(e) from this node to other nodes. i,j This means that for non-neighbor node a i,j =0, for the parent node For child node a i,j =1. Then, information is passed between the graph nodes, and the node state transitions are as follows:
[0097]
[0098]
[0099]
[0100] in, h is a learnable parameter k A representation of the event type.
[0101] In this embodiment, a hierarchical relationship of event types is introduced into the event detection task to construct a graph neural network for event type encoding. This hierarchical relationship is permanently valid on a given dataset and does not require manual design, thus avoiding the introduction of noise due to additional knowledge introduced by manual design or third-party tools.
[0102] S2. Interact with the contextual semantic representation of the trigger word and the representation of the event type to obtain a trigger word representation containing event type information, and classify the trigger word representation to predict the event type.
[0103] In a specific implementation, as shown in Figure 3 Figure 3 A structural diagram of the event detection process of steps S1-S2 is shown. By performing attention calculation on the trigger word context semantic representation determined in step S1 and the representation of the event type, a trigger word feature v evt containing event type information is obtained, which is specifically as follows:
[0104]
[0105]
[0106] Then, according to the weighted sum of the trigger word feature v evt and the trigger word context semantic representation x <tri>< / tri> , the trigger word representation is obtained
[0107] After obtaining the trigger word representation, the trigger word representation is classified to predict the event type. Specifically, by inputting the trigger word representation into a two-layer linear network modeling feature Z={z0,z1,…,z M-1}.
[0108]
[0109] Z=W2·H+b2
[0110] Wherein, W1, b1, W2, b2 are learnable parameters.
[0111] Then, the probability distribution of the trigger word on the sub-event type label is modeled by a softmax function
[0112]
[0113] Wherein, represents the probability that the trigger word belongs to the kth sub-event, which represents the probability estimation of the model that the trigger word belongs to a certain sub-event type. At the same time, according to the true probability that the trigger word belongs to a certain sub-event type The following cross-entropy loss function is calculated:
[0114]
[0115] S3, according to the specific trigger word and the predicted event type, designing argument extraction template, generating argument extraction question corresponding to the event type, and splicing the to-be-extracted text and the argument extraction question to obtain the context semantic representation of the label, the context semantic representation of each word of the to-be-extracted sentence, and the context semantic representation of the argument role.
[0116] AsFigure 5 As shown in FIG. 1, Figure 5 A structural diagram of the argument extraction process of steps S3-S6 is shown.
[0117] Specifically, for the question encoding process, the trigger word, the predicted event type, and the argument extraction template are spliced by [SEP] to obtain an argument extraction question, which is used to guide the learning of the model. The structure of the question is as shown in FIG. 2, Figure 4 wherein the event type provides the definition of a given event type, the trigger word of the event describes the corresponding trigger word that needs to extract the argument, and the argument extraction template represents the structure of the given event type.
[0118] Then, the text to be extracted T={t1, t2, …, t n} and the argument extraction question Q={q1, q2, …, q m} are spliced by [SEP] to obtain an input text, which is then preprocessed. Specifically, the input text can be segmented by the WordPieceTokenizer module in the Transformers library, and the input of the same batch of words is padded to the same length according to the longest text length of the batch of words. The preprocessed input text is input into the BERT pre-training language model for pre-encoding to obtain the context semantic representation of the label, the context semantic representation of each word of the sentence to be extracted, and the context semantic representation of the argument role corresponding segment:
[0119] The context semantic representation of the argument role to be extracted is obtained by aggregating the context semantic representation of the argument role corresponding segment: wherein arg j represents the jth argument role.
[0120] S4, after splicing the context semantic representation of the label and the context semantic representation of the argument role to be extracted, the discriminant network is input to obtain a discriminant probability.
[0121] For the argument role discrimination process, the context semantic representation of the [CLS] label and the context semantic representation of the argument role to be extracted x arg are spliced in the embodiment to obtain the discriminant feature of the argument role in the text
[0122] Then, the obtained discriminant feature is input into a two-layer discriminant network for feature modeling to obtain a feature vector Z, i.e.:
[0123]
[0124] Z=W2·H+b2
[0125] Wherein, W1, b1, W2, b2 are learnable parameters.
[0126] Then, based on the feature vector Z, the probability of the argument role being extractable in the text is modeled by a softmax function The discriminant probability is determined:
[0127]
[0128] Wherein, represents the discriminant probability of the argument role having no answer in the text, represents the discriminant probability of the argument role having an answer in the text. This probability represents the model's probability estimate for whether the argument role has an answer in the text. Meanwhile, according to the true probability of the argument role having an answer in the text The following calculation of the cross-entropy loss function is made:
[0129]
[0130] Wherein represents the true probability of the argument role having no answer in the text, represents the true probability of the argument role having no answer in the text.
[0131] S5, after splicing the context semantic representation of each word in the sentence to be extracted and the context semantic representation of the argument role to be extracted, the labeled probability is obtained by inputting the discriminant network.
[0132] Specifically, for the argument role extraction process, in the embodiment, the context semantic representation x i of each word in the sentence to be extracted is spliced with the context semantic representation x arg of the argument role to be extracted, to obtain the extraction feature of each word for the argument role
[0133] The extraction feature is respectively input into three two-layer discriminant networks to respectively model the start label feature, the end label feature and the BIO label feature of the word as the argument role corresponding argument reference;
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
[0140] wherein Z start , Z end , Z BIO respectively represent start label features, end label features and BIO label features, represent discriminative features, are learnable parameters;
[0141] Then, according to the start label features, the end label features and the BIO label features of the word as the argument of the corresponding argument of the role, the start label probability, the end label probability and the BIO label probability of the word as the argument of the corresponding argument of the role are modeled by a softmax function to determine the labeling probability.
[0142]
[0143]
[0144]
[0145] wherein the labeling probability comprises a start label probability, an end label probability and a BIO label probability, represent the start label probability and the end label probability of the word not as the argument of the argument, represent the start label probability and the end label probability of the word as the argument of the argument, represent the probability of the token not being part of the argument, represent the probability of the token being the starting position of the argument, represent the probability of the token being the intermediate content of the argument.
[0146] Meanwhile, according to the true probability Y start , Y end , Y BIO of the word being part of the argument, the following cross-entropy loss function is calculated:
[0147]
[0148]
[0149]
[0150] wherein respectively represent the true probability of the word being the start label and the end label of the argument, The true probability that the word label is B / I / O.
[0151] In the event argument extraction task of steps S4 and S5 in the embodiment, a discriminative network is introduced, and through two-stage result fusion, the imbalance of samples is effectively alleviated with less increase in calculation cost. Meanwhile, the discriminative probability and the labeling probability are combined for argument role extraction, further improving the argument extraction performance.
[0152] S6, combining the discriminative probability and the labeling probability to determine the extraction result corresponding to the final argument role.
[0153] In the specific implementation, further reference is made to Figure 5 For the argument role decoding process, first, the discriminative score of having an answer is obtained according to the discriminative probability of the argument role having an answer in the text
[0154] Then, the target extraction score of having an answer is obtained according to the labeling probability, specifically including:
[0155] For the start and end labels, the preliminary argument content is extracted, and then for the candidate argument that is too long, it is considered that the end position of a certain argument reference in the text has not been successfully discriminated, and therefore the argument reference obtained by using the BIO label in the text.
[0156] For the argument reference extracted by using the start and end labels, the first extraction score is obtained by taking the mean value of the weighted sum of the probability of the start label as the start label of the argument reference and the probability of the end label as the end label of the argument reference. Where start and end represent the start and end positions of the argument reference extracted by using the start label and the end label in the text.
[0157] For the argument reference extracted by using the BIO label, the second extraction score is obtained by taking the mean value of the weighted sum of the probability of token as the start position of the argument reference and the probability of token as the middle content of the argument reference. Where start and end represent the start and end positions of the argument reference extracted by using the BIO label in the text.
[0158] Then, the target extraction score of having an answer is obtained by taking the mean value of the weighted sum of the first extraction score and the second extraction score. has .
[0159] Meanwhile, after the discriminative score score ans and the target extraction score score hasThen, a comprehensive score score of the extracted segment is obtained according to a weighted sum of the two scores all = α · score ans + β · score has wherein α and β represent weighting coefficients, score ans represents a discrimination score, score has-o represents a target score, and score all represents a comprehensive score.
[0160] Finally, according to the comprehensive score, the extraction result corresponding to the final argument role is determined, that is, when the comprehensive score exceeds a score threshold, it is indicated that the question is answerable, and the extracted segment is added to the result of the argument role corresponding to the argument; when the comprehensive score does not exceed a score threshold, it is indicated that the question is not answerable, and the extracted segment is discarded.
[0161] In summary, the event argument extraction method provided by the present application is used for event argument extraction based on a sentence level, and mainly includes two processes of event detection and argument extraction. In the event detection process, the training data and event types are encoded respectively to obtain a trigger word context semantic representation and an event type representation; and the trigger word context semantic representation and the event type representation are interacted to obtain a trigger word representation containing event type information, and the trigger word representation is classified to predict the event type of the event detection. In this process, a hierarchical relationship of the event type is introduced to construct a graph neural network for event type coding in the event detection task. Such a hierarchical relationship is permanently established on a given data set without the need for manual design, thereby avoiding the introduction of noise caused by the use of artificially designed or third-party tools. In the argument extraction process, an argument extraction question corresponding to the event type is generated, and the to-be-extracted text and the argument extraction question are spliced and encoded to obtain a label context semantic representation, a context semantic representation of each word in the to-be-extracted sentence, and a context semantic representation of an argument role. Then, the label context semantic representation and the context semantic representation of the argument role to be extracted are spliced and input into a discrimination network to obtain a discrimination probability. The context semantic representation of each word in the to-be-extracted sentence and the context semantic representation of the argument role to be extracted are spliced and input into the discrimination network to obtain a labeling probability. Finally, the discrimination probability and the labeling probability are combined to determine the extraction result corresponding to the final argument role. In the event argument extraction task, a discrimination network is introduced, and through two-stage result fusion, the sample imbalance problem is effectively alleviated with little increase in calculation cost. At the same time, the discrimination probability and the labeling probability are combined for argument role extraction, which further improves the argument extraction performance. According to detection, the event detection F1 value on the ACE public data test set reaches 77.4%, and the event argument extraction F1 value reaches 75.9%.
[0162] In addition, the above-mentioned embodiments of the present application can be applied to a terminal device based on the sentence-level event argument extraction method, which can include a personal terminal, a host terminal, and the like, and the embodiments of the present application do not limit the same. The terminal can support an operating system such as Windows, Android, IOS, Windows Phone, and the like.
[0163] An event argument extraction device 200 applied to a sentence-level event argument extraction method can be applied to a personal terminal and a host terminal device, which can realize the event argument extraction method as shown in Figure 1 The event argument extraction device provided by the embodiments of the present application can realize each process of the event argument extraction method. Figure 6 The architecture diagram of the event argument extraction device 200 is shown.
[0164] The event argument extraction device 200 at least includes:
[0165] A text and event type coding module 201 is used to code the training data and event type respectively to obtain a trigger word context semantic representation and an event type representation;
[0166] An interaction and prediction module 202 is used to interact the trigger word context semantic representation and the event type representation to obtain a trigger word representation containing event type information, and classify the trigger word representation to predict the event type;
[0167] A question coding module 203 is used to design an argument extraction template according to a specific trigger word and a predicted event type, generate an argument extraction question corresponding to the event type, splice the argument extraction question with the text to be extracted to code to obtain a label context semantic representation, a context semantic representation of each word in the sentence to be extracted, and a context semantic representation of an argument role;
[0168] An argument role discrimination module 204 is used to splice the label context semantic representation and the context semantic representation of the argument role to be extracted, and input the discrimination network to obtain a discrimination probability;
[0169] An argument role extraction module 205 is used to splice the context semantic representation of each word in the sentence to be extracted and the context semantic representation of the argument role to be extracted, and input the discrimination network to obtain a labeling probability;
[0170] An argument role decoding module 206 is used to determine the extraction result corresponding to the final argument role in combination with the discrimination probability and the labeling probability.
[0171] In addition, it should be understood that, in the event argument extraction device 200 according to the embodiments of the present application, only the division of the above functional modules is exemplified, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the event argument extraction device 200 can be divided into different functional modules from the above exemplified modules to complete all or part of the above described functions.
[0172] It should be noted that in this document, the terms "comprise", "comprising", or any other variant thereof are intended to cover non-exclusive inclusions, so that processes, methods, articles, or devices that include a series of elements not only include those elements, but also include other elements not explicitly listed, or inherent to such processes, methods, articles, or devices. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method can be performed in an order different from the described order, and various steps can also be applied, omitted, or combined. In addition, the features described with reference to certain examples can be combined in other examples.
[0173] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above specific embodiments, and the above specific embodiments are only illustrative and not limiting, and those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.
Claims
1. An event argument extraction method, characterized in that, Comprise: Encode the training data and event type respectively to obtain the trigger context semantic representation and the representation of event type; Interact the trigger context semantic representation and the representation of event type to obtain the trigger representation containing event type information, and classify the trigger representation to predict the event type; According to the specific trigger and the predicted event type, design argument extraction template, generate argument extraction question corresponding to the event type, and splice the to-be-extracted text and the argument extraction question to obtain the context semantic representation of the label, the context semantic representation of each word in the to-be-extracted sentence, and the context semantic representation of the argument role; Splice the context semantic representation of the label and the context semantic representation of the argument role to be extracted, and input the discrimination network to obtain the discrimination probability, comprising: Splice the context semantic representation of the label and the context semantic representation of the argument role to be extracted to obtain the discrimination feature of the argument role in the text; Input the discrimination feature into a two-layer discrimination network for feature modeling; Model the probability of the argument role being extractable in the text through a softmax function to determine the discrimination probability: wherein, denotes the discriminative probability that the argument role has no answer in the text, denotes the discriminative probability that the argument role has an answer in the text; Splice the context semantic representation of each word in the to-be-extracted sentence and the context semantic representation of the argument role to be extracted, and input the discrimination network to obtain the labeling probability, comprising: Splice the context semantic representation of each word in the to-be-extracted sentence and the context semantic representation of the argument role to be extracted to obtain the extraction feature of each word for the argument role; Input the extraction feature into three two-layer discrimination networks respectively to model the start label feature, end label feature and BIO label feature of the word as the argument reference of the role; wherein, , , respectively represent start label features, end label features and BIO label features, represents a discriminative feature, , , , , , , , , , , , are all learnable parameters; the discriminative feature , is a context semantic representation of the [CLS] label, is a required argument role of the argument to be extracted; Model the start label probability, end label probability and BIO label probability of the word as the argument reference of the role through a softmax function according to the start label feature, end label feature and BIO label feature of the word as the argument reference of the role to determine the labeling probability; wherein the label probabilities include a start label probability, an end label probability, and a BIO label probability, , denote the token not being the start label probability, the end label probability, , denote the token being the start label probability and the end label probability, denote the token not being part of the argument denotation, denote the token being the start of the argument denotation, denote the token being the middle content of the argument denotation; Determine the final extraction result of the argument role in combination with the discrimination probability and the labeling probability.
2. The method of claim 1, wherein, Encode the training data to obtain the trigger context semantic representation, comprising: Preprocess the training data, Pre-encode the preprocessed training data using a BERT pre-training language model to obtain a distributed semantic representation of each word after BERT pre-training model encoding; Aggregate the distributed semantic representation corresponding to the trigger to obtain the trigger context semantic representation.
3. The method of claim 1, wherein, Encode the event type to obtain the representation of the event type, comprising: Build a graph neural network according to the hierarchical relationship of the event type, wherein the graph nodes are label nodes of the event type and sub-event type, and an edge appears between the nodes corresponding to the sub-event type when the sub-event type belongs to the event type; Perform information transmission between the graph nodes to obtain the representation of the event type.
4. The method of claim 1, wherein: The trigger context semantic representation and the representation of event type are interacted to obtain the trigger representation containing event type information, comprising: perform attention calculation on the trigger word context semantic representation and the representation of the event type to obtain a trigger word feature containing event type information; obtain the trigger word representation according to a weighted sum of the trigger word feature and the trigger word context semantic representation.
5. The method of claim 1, wherein, According to the trigger word of the event and the predicted event type, a argument extraction template is designed, and an argument extraction question corresponding to the event type is generated, which contains: Splicing the trigger word, the predicted event type, and the argument extraction template to obtain an argument extraction question. Wherein, the event type provides the definition of the given event type, the trigger word of the event describes the corresponding trigger word that needs to extract the argument, and the argument extraction template represents the structure of the given event type.
6. The method of claim 5, wherein, After splicing the text to be extracted and the argument extraction question, the context semantic representation of the label, the context semantic representation of each word of the sentence to be extracted, and the context semantic representation of the argument role are obtained, which contains: After splicing the text to be extracted and the argument extraction question, preprocessing and inputting to the BERT pre-training language model for pre-encoding to obtain the context semantic representation of the label, the context semantic representation of each word of the sentence to be extracted, and the context semantic representation of the argument role corresponding segment. Aggregate the context semantic representation of the argument role corresponding segment to obtain the context semantic representation of the argument role to be extracted.
7. The method of claim 6, wherein, The combination of the determination probability and the labeling probability to determine the final argument role corresponding extraction result contains: According to the determination probability of the argument role having an answer in the text, a determination score of having an answer is obtained. According to the labeling probability, a target extraction score of having an answer is obtained, which contains: According to the weighted sum of the start label probability as the argument reference and the end label probability as the argument reference, the first extraction score is obtained. According to the weighted sum of the probability of token as the starting position of the argument reference and the probability of token as the intermediate content of the argument reference, the second extraction score is obtained. According to the weighted sum of the first extraction score and the second extraction score, the target extraction score of having an answer is obtained. According to the weighted sum of the determination score and the target extraction score, a comprehensive score of the extraction segment being the answer to the question is obtained. According to the comprehensive score, the extraction result corresponding to the final argument role is determined, which contains: When the comprehensive score exceeds a score threshold, it is indicated that the question can be answered, and the extraction segment is added to the argument reference corresponding to the role. When the comprehensive score does not exceed a score threshold, it is indicated that the question cannot be answered, and the extraction segment is discarded.
8. An event argument extraction apparatus characterized by comprising: The event argument extraction method of any one of claims 1-7, at least contains: A text and event type encoding module for encoding the training data and event type respectively to obtain a trigger word context semantic representation and a representation of the event type; An interaction and prediction module for interacting the trigger word context semantic representation and the representation of the event type to obtain a trigger word representation containing event type information, and classifying the trigger word representation to predict the event type; The problem coding module is configured to design an argument extraction template according to a specific trigger word and a predicted event type, generate an argument extraction question corresponding to the event type, splice the argument extraction question with the text to be extracted, and code the spliced text to obtain a context semantic representation of a label, a context semantic representation of each word in the sentence to be extracted, and a context semantic representation of an argument role; The argument role discrimination module is configured to splice the context semantic representation of the label with the context semantic representation of the argument role to be extracted, input the spliced context semantic representation into a discrimination network to obtain a discrimination probability, and include: The discrimination probability includes: The discrimination probability is obtained by splicing the context semantic representation of the label with the context semantic representation of the argument role to be extracted to obtain discrimination features of the argument role in the text; The discrimination features are input into a two-layer discrimination network for feature modeling; The discrimination probability is obtained by modeling the extractable probability of the argument role in the text by using a softmax function: wherein, denotes the discriminative probability that the argument role has no answer in the text, denotes the discriminative probability that the argument role has an answer in the text; The argument role extraction module is configured to splice the context semantic representation of each word in the sentence to be extracted with the context semantic representation of the argument role to be extracted, input the spliced context semantic representation into a discrimination network to obtain a labeling probability, and include: The labeling probability is obtained by splicing the context semantic representation of each word in the sentence to be extracted with the context semantic representation of the argument role to be extracted to obtain extraction features of each word for the argument role; The extraction features are respectively input into three two-layer discrimination networks to model start label features, end label features, and BIO label features of the word as an argument referent of a role; wherein, , , respectively represent start label features, end label features and BIO label features, represents a discriminative feature, , , , , , , , , , , , are all learnable parameters; the discriminative feature , is a context semantic representation of the [CLS] label, is a role of an argument to be extracted; The labeling probability is obtained by modeling start label probability, end label probability, and BIO label probability of the word as the argument referent of the role by using a softmax function according to the start label features, the end label features, and the BIO label features of the word as the argument referent of the role; wherein the label probabilities include a start label probability, an end label probability, and a BIO label probability, , denote the token not being a start label probability, an end label probability, , denote the token being a start label probability and an end label probability, denote the token not being part of an argument, denote the token being a start position of an argument, denote the token being an intermediate content of an argument. The argument role decoding module is configured to determine an extraction result of the argument role corresponding to the discrimination probability and the labeling probability.
Citation Information
Patent Citations
Document-level event argument extraction method
CN112528676A
Event argument extraction method based on event element interaction and tag semantic enhancement
CN114648016A