Document-level event argument extraction method and device, equipment and medium
Through multi-teacher knowledge distillation strategy and feature alignment technology, event correlation is explicitly modeled, which solves the problem of correlation modeling in document-level event argument extraction, improves extraction efficiency and accuracy, and verifies the effectiveness of the method.
Patent Information
- Application Number
- CN202410812503.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-20
AI Technical Summary
Existing document-level event argument extraction methods are difficult to effectively model and utilize the bidirectional correlation relationships within and between events, resulting in limited argument extraction efficiency and accuracy.
A multi-teacher knowledge distillation strategy is adopted to build an argument extraction student model by training teacher models within and between events. Feature alignment and logit alignment techniques are used to transfer associated knowledge, explicitly model event correlation, and enhance the argument extraction model.
It significantly improves the accuracy and efficiency of document-level event argument extraction, alleviates the problem of argument dispersion and overlap, improves the F1 value, and verifies the effectiveness of the method.
Smart Images

Figure CN118673899A
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of big data processing technology, and in particular to a document-level event argument extraction method, device, equipment and medium. Background Art
[0002] Event argument extraction (EAE) is a key subtask of event extraction (EE), which aims to identify event arguments from text based on known event types and correctly classify the roles they play. Figure 1 For example, the "Life.Die" event triggered by the sixth sentence in the video is used as an example. EAE needs to identify the arguments "TamerlanTsarnaev" and "police" and determine their roles as "Victim" and "Killer" respectively. Document-level EAE extracts arguments of multiple events by analyzing the entire document. Since arguments may be distributed in multiple sentences, document-level EAE is more challenging. Figure 1 A document-level example is shown. The input document contains 8 sentences involving 4 events. Document-level EAE needs to extract the arguments corresponding to the 4 events.
[0003] Currently, document-level EAE tasks are mainly solved through generative methods, which can be roughly divided into two paradigms. One type of research focuses on document-level single-event argument extraction. After a document is input, only the argument information of one event is output each time, and the arguments of all events in the document are extracted through iteration. The other type is the multi-event argument extraction method. Its input is also a document, but the purpose is to output the arguments of all events at the same time and realize the parallel extraction of multi-event arguments. However, in Figure 1 Among the document-level EAE methods shown, the single-event argument extraction method either extracts arguments for each event independently, ignoring the potential associations between events within the document, or only establishes a unidirectional association from the extracted event to the unpredicted event during the iterative extraction process, failing to simultaneously consider the bidirectional associations between all events. The parallel mode of multi-event argument extraction can well construct bidirectional associations, but this has not been fully explored in recent studies. A typical method is TabEAE, which only implicitly constructs event associations by using a self-attention mechanism and lacks explicit guidance for event association modeling.
[0004] It is obvious that in document-level EAE, there are close relationships between multiple arguments in the same event and between arguments of multiple events in the same document. These relationships are very beneficial for the extraction of auxiliary event information, which has been confirmed in many existing studies. First, for multiple arguments in the same event, such as Figure 1As shown in S2 of , the roles “Victim” and “Injurer” of the “Life.Injure” event can be regarded as a pair of roles. Once the argument of one of the roles is determined, the identification of the other role becomes easier. In addition, the same argument may play multiple roles in an event, and modeling the association between these arguments can help to extract each other. Through statistical analysis, the present invention found that 12.4% of the events in the RAMS dataset have such internal argument overlaps. Secondly, for the case of multiple events in a document, such as Figure 1 In S2 and S8, two events of the same type "Conflict.Attack" are triggered by the trigger words "attack" and "bombings" respectively. They share the same argument "DzhokharTsarnaev", but there are 6 sentences between them. If the association between the two events is not modeled, the argument "DzhokharTsarnaev" contained in the event in S8 will be difficult to be identified as the argument corresponding to the role "Attacker" in S2. The same difficulty exists in identifying the shared argument "police" of the "Life.Injure" event and the "Life.Die" event. In addition, statistics also found that in the RAMS and WIKIEVENTS datasets, 22.0% and 19.4% of the events, respectively, have the above-mentioned cross-event argument overlap.
[0005] In summary, modeling argument associations within and between events plays a very important role in document-level event argument extraction. However, how to explicitly model bidirectional event argument associations in the multi-event argument extraction mode and effectively utilize this association knowledge is a major challenge. Summary of the invention
[0006] In view of the technical problems existing in the prior art, the present invention proposes a document-level event argument extraction method, device, equipment and medium.
[0007] To achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0008] On the one hand, the present invention provides a document-level event argument extraction method, comprising:
[0009] Input document and get the event collection in the document Trigger word set Character Collection and the argument set e i represents the i-th event, E represents the set of events in X, N represents the number of events, and t i represents the trigger word of the ith event, T represents the set of trigger words, R iRepresents a single event e i The argument role set of R is R i A collection of i is a single event i The argument set of A, each argument a∈A i is a span of text in document X and corresponds to R i A role in , X∈D, D represents a given document dataset;
[0010] Train the intra-event level teacher model to obtain the internal argument association knowledge of each event in the document;
[0011] Train the teacher model at the inter-event level to obtain the knowledge of argument associations across events in the document;
[0012] Construct an argument extraction student model to predict the argument set of all events based on documents;
[0013] The method of feature alignment and logit alignment based on multi-teacher distillation is introduced to transfer event association knowledge from the teacher model at the internal level of each event and the teacher model at the inter-event level to the argument extraction student model, and then the total cost function of the argument extraction student model is determined;
[0014] The total loss function of the argument extraction student model is iteratively minimized until convergence to output a trained argument extraction student model, which is then used for document-level event argument extraction.
[0015] Furthermore, the event internal level teacher model T intra : By randomly selecting a part of arguments as privileged knowledge in each event with a certain probability, the model is trained to predict the remaining non-privileged arguments in the same event based on the privileged arguments in the event.
[0016] Teacher model T at the event level inter : Randomly select one event from the event set consisting of all events in the document with a certain probability, and regard all arguments in the argument set of the selected event as privileged knowledge. The training model uses cross-event privileged arguments to predict all non-privileged arguments in the remaining events.
[0017] On the other hand, the present invention provides a document-level event argument extraction device, comprising:
[0018] The first module is used to obtain the event set in the input document Trigger word set Character Collection and the argument set e i represents the i-th event, E represents the set of events in X, N represents the number of events, and ti represents the trigger word of the ith event, T represents the set of trigger words, R i Represents a single event e i The argument role set of R is R i A collection of i is a single event i The argument set of A, each argument a∈A i is a span of text in document X and corresponds to R i A role in , X∈D, D represents a given document dataset;
[0019] The second module is used to train the teacher model at the intra-event level to obtain the internal argument association knowledge of each event in the document;
[0020] The third module is used to train the teacher model at the inter-event level to obtain the argument association knowledge across events in the document;
[0021] The fourth module is used to construct an argument extraction student model to predict the argument set of all events based on documents;
[0022] The fifth module is used to introduce feature alignment and logit alignment based on multi-teacher distillation to transfer event association knowledge from the teacher model at the internal level of each event and the teacher model at the inter-event level to the argument extraction student model, and then determine the total cost function of the argument extraction student model;
[0023] The sixth module is used to iteratively minimize the total loss function of the argument extraction student model until convergence, so as to output a trained argument extraction student model, which is then used for document-level event argument extraction.
[0024] On the other hand, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned document-level event argument extraction method when executing the computer program.
[0025] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned document-level event argument extraction method when the computer program is executed by a processor.
[0026] The present invention designs an association perception model with the same architecture as the argument extraction model, and designs a similar association perception training task to more fully explore event associations and more effectively promote knowledge transfer.
[0027] The present invention adopts a multi-teacher knowledge distillation strategy, constructs two levels of argument associations, intra-event and inter-event, and enhances the argument extraction model through distillation.
[0028] The present invention has carried out experiments on RAMS and WIKIEVENTS, and the results have proved the effectiveness of the method and also shown that the use of event association can alleviate the problem of argument dispersion and overlap to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0030] Figure 1 This is a schematic diagram comparing single-event and multi-event argument extraction at the document level;
[0031] Figure 2 It is a flowchart of a document-level event argument extraction method in one embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] In this paper, a relevance-aware knowledge distillation method, AssocKD, is proposed to solve the problem of document-level event argument extraction. This method explicitly models event relevance and uses knowledge distillation to enhance event argument extraction. First, an event relevance-aware model in an encoder-decoder framework and a proposed relevance prediction training task are proposed. Then, a method for transferring event relevance knowledge within and across events based on a multi-teacher knowledge distillation strategy is used to enhance the event argument extraction model in the same framework.
[0034] In order to improve the performance of document-level argument extraction by using associated knowledge, the present invention proposes a knowledge enhancement method based on knowledge distillation. The present invention first constructs a student model for constructing argument extraction to predict the argument set of all events based on documents; constructs a teacher model at the event internal level for each document to obtain the argument association within each event; constructs a teacher model at the event inter-level to obtain the argument association across events in the document; finally, the event association knowledge is transferred from the teacher model at the event internal level and the teacher model at the event inter-level to the argument extraction student model by using feature alignment and logit alignment based on multi-teacher distillation, and then determines the total cost function of the argument extraction student model to perform knowledge enhancement.
[0035] Reference Figure 2 In one embodiment of the present invention, a document-level event argument extraction method is provided, comprising:
[0036] Input a document and obtain the event set, trigger word set, role set, and argument set in the document;
[0037] Train the intra-event level teacher model to obtain the internal argument association knowledge of each event in the document;
[0038] Train the teacher model at the inter-event level to obtain the knowledge of argument associations across events in the document;
[0039] Construct an argument extraction student model to predict the argument set of all events based on documents;
[0040] The method of feature alignment and logit alignment based on multi-teacher distillation is introduced to transfer event association knowledge from the teacher model at the internal level of each event and the teacher model at the inter-event level to the argument extraction student model, and then the total cost function of the argument extraction student model is determined;
[0041] The total loss function of the argument extraction student model is iteratively minimized until convergence to output a trained argument extraction student model, which is then used for document-level event argument extraction.
[0042] Teacher model T at the event internal level intra : By randomly selecting a part of arguments as privileged knowledge in each event with a certain probability, the model is trained to predict the remaining non-privileged arguments in the same event based on the privileged arguments in the event.
[0043] Teacher model T at the event level inter : Randomly select one event from the event set consisting of all events in the document with a certain probability, and regard all arguments in the argument set of the selected event as privileged knowledge. The training model uses cross-event privileged arguments to predict all non-privileged arguments in the remaining events.
[0044] In this paper, a relevance-aware knowledge distillation method, AssocKD, is proposed to solve the problem of document-level event argument extraction. This method explicitly models event relevance and uses knowledge distillation to enhance event argument extraction. First, an event relevance-aware model in an encoder-decoder framework and a proposed relevance prediction training task are proposed. Then, a method for transferring event relevance knowledge within and across events based on a multi-teacher knowledge distillation strategy is used to enhance the event argument extraction model in the same framework.
[0045] Before training the teacher model and student model, the input document is encoded, including:
[0046] Mark the trigger words of each event in the document, encode the document marked with the trigger words, and obtain the document encoding;
[0047] Obtaining an event prompt template for each event according to the event type, encoding the event prompt template for each event, and splicing the event prompt codes of all the events obtained by encoding to obtain a spliced document prompt code;
[0048] According to the number of event arguments in the event argument set of each event in the document, a corresponding argument slot set is constructed for each event in the document to obtain the argument slot sequence of the document. The number of argument slots corresponding to each event in the argument slot set is the same as the number of event arguments in the event argument set corresponding to each event. The corresponding argument slot is initialized using the role code corresponding to each argument slot to obtain the argument slot code of each event.
[0049] In one embodiment, a method for training an event internal level teacher model is provided, comprising:
[0050] Randomly select some arguments from each event argument set of the document with a certain probability, and use the selected event arguments as the privileged knowledge of the teacher model at the intra-event level. The selected event arguments are the intra-event privileged argument set, and all arguments in the selected argument set are the intra-event privileged arguments.
[0051] The text span code corresponding to the privileged argument in each event is obtained from the document code as the code of the privileged argument in each event, and is fused with the argument slot code corresponding to each event to obtain the privileged argument slot code of each event. For the non-privileged argument slot, its code remains unchanged, and then the argument slot set code corresponding to each event is obtained. The argument slot set code corresponding to each event includes the privileged argument slot code and the non-privileged argument slot code. The argument slot corresponding to the non-privileged argument slot code is used as the argument slot to be predicted.
[0052] The paper slot set encoding corresponding to each event is fused with the document prompt encoding to obtain the document prompt encoding that incorporates the privileged knowledge within the event;
[0053] Encode and decode the document to obtain a context-oriented document decoding representation;
[0054] The document encoding and the document hint encoding that incorporates the privileged knowledge within the event are jointly decoded to obtain a hint template decoding representation oriented to the document context and the privileged knowledge within the event.
[0055] For each argument slot to be predicted, obtain its representation vector from the hint template decoding representation oriented to the document context and the privileged knowledge within the event, and construct the span selector of the argument slot to be predicted;
[0056] Predict the logit sequence of the starting position and the logit sequence of the ending position of the argument slot to be predicted based on the span selector and the context-oriented document decoding representation, and calculate the probability distribution of the starting position and the probability distribution of the ending position of the argument slot to be predicted, and then calculate the probability distribution of the starting position and the probability distribution of the ending position of each argument to be predicted;
[0057] Based on the calculated probability distribution of the starting position and the ending position of the argument slot to be predicted and the actual starting position and the ending position of the argument slot to be predicted, a binary matching loss function for the intra-event argument association prediction task is constructed;
[0058] Based on the binary matching loss function of the event argument association prediction task, the event internal level teacher model T is trained to capture the event argument association knowledge. intra .
[0059] In one embodiment, a method for training an event-to-event level teacher model is provided, comprising:
[0060] Randomly select some events from all event sets of the document with a certain probability, and use all arguments in the argument set of the selected event as the privileged knowledge of the teacher model at the event level. The argument set of the selected event is the cross-event privileged argument set, and all arguments in the argument set of the selected event are cross-event privileged arguments.
[0061] The text span code corresponding to each cross-event privileged argument is obtained from the document code as the code of each cross-event privileged argument, and is fused with the argument slot code corresponding to each event to obtain the code of each cross-event privileged argument slot. For non-cross-event privileged argument slots, their codes are kept unchanged, and then the paper slot set code corresponding to each event is obtained, which includes the cross-event privileged argument slot code and the non-cross-event privileged argument slot code. The argument slot corresponding to the non-cross-event privileged argument slot code is used as the argument slot to be predicted.
[0062] The paper slot set encoding corresponding to each event is fused with the document prompt encoding to obtain the document prompt encoding that incorporates cross-event privileged knowledge;
[0063] Encode and decode the document to obtain a context-oriented document decoding representation;
[0064] Decode the document encoding and the document hint encoding that incorporates cross-event privileged knowledge to obtain a hint template representation oriented to the document context and cross-event privileged knowledge;
[0065] For each to-be-predicted argument slot, which is a non-privileged argument slot, its representation vector is obtained from the hint template representation oriented to the document context and cross-event privileged knowledge, and a span selector of the to-be-predicted argument slot is constructed;
[0066] Predict the logit sequence of the starting position and the logit sequence of the ending position of the argument slot to be predicted based on the span selector and the context-oriented document decoding representation, and calculate the probability distribution of the starting position and the probability distribution of the ending position of the argument slot to be predicted;
[0067] Based on the calculated probability distribution of the starting position and the ending position of the argument slot to be predicted and the actual starting position and the ending position of the argument slot to be predicted, a binary matching loss function for the task of predicting the inter-event argument association is constructed;
[0068] Based on the binary matching loss function of the inter-event argument association prediction task, an inter-event level teacher model T is trained to capture the inter-event argument association knowledge. inter .
[0069] In one embodiment, the proposed method for constructing an argument extraction student model includes:
[0070] Concatenate the argument slot encoding with the document prompt encoding to obtain the concatenated template encoding.
[0071] Encode and decode the document to obtain a context-oriented document decoding representation;
[0072] Decode the document encoding and the concatenated template encoding to obtain a hint template decoded representation, obtain a vector representation of each argument slot in the document's argument slot sequence from the hint template decoded representation, and construct a span selector corresponding to each argument slot;
[0073] Predict the logit sequence of the starting position and the logit sequence of the ending position of the argument slot of each event in the document based on the span selector and the context-oriented document decoding representation, and calculate the probability distribution of the starting position and the probability distribution of the ending position of the argument slot of each event;
[0074] Based on the calculated starting position probability distribution and ending position probability distribution of the argument slot of each event and the actual starting position and ending position of the argument slot of each event, a binary matching loss function for the initial argument extraction task is constructed.
[0075] Next, construct the total cost function of the argument extraction student model, including:
[0076] The mean square error function is used to align the intermediate layer features between the event internal level teacher model and the argument extraction student model, and the first feature alignment loss function is obtained;
[0077] The Kullback-Leibler divergence is used to align the predicted probability distributions of the teacher model and the argument extraction student model at the event internal level, and the first logit alignment loss function is obtained;
[0078] Set the weights of the first feature alignment loss and the first logit alignment loss, and obtain the first knowledge distillation loss based on the first feature alignment loss function and the first logit alignment loss function
[0079] The mean square error function is used to align the intermediate layer features between the teacher model at the inter-event level and the argument extraction student model, and the second feature alignment loss function is obtained;
[0080] The Kullback-Leibler divergence is used to align the predicted probability distributions of the teacher model and the argument extraction student model at the inter-event level, and the second logit alignment loss function is obtained;
[0081] Set the weights of the second feature alignment loss and the second logit alignment loss, and obtain the second knowledge distillation loss based on the second feature alignment loss function and the second logit alignment loss function.
[0082] Bipartite matching loss function based on the initial argument extraction task First knowledge distillation loss Second knowledge distillation loss Constructing the total cost function of the argument extraction student model Among them, α and β are the loss weights of the teacher model at the intra-event level and the teacher model at the inter-event level, respectively.
[0083] In one embodiment, a document X (which can be a paragraph or a document) is input, and the document-level event argument extraction method proposed in the present invention aims to extract a set A of all arguments corresponding to a role set R of each event in the document X under the condition that an event trigger word t and its event type e are known.
[0084] Specifically, given an instance on the document dataset D Where X represents an input document, get the event set in document X Trigger word set Character Collection and the argument set e i represents the i-th event, E represents the set of events in X, N represents the number of events, and t i represents the trigger word of the ith event, T represents the set of trigger words, Ri Represents a single event e i The argument role set of R is R i A collection of i is a single event i The argument set of A, each argument a∈A i is a span of text in document X and corresponds to R i A role in , X∈D.
[0085] (1) Encoding the input document, including:
[0086] (1.1) Mark the trigger words of each event in document X, encode the document marked with the trigger words, and obtain the document encoding
[0087] Given an input document X = [x1, x2, ..., x L ], where L is the document length, and its event trigger word T = {t1, t2, ..., t N}, each trigger word t i They are marked with a pair of markers (ti, / ti), and the marked document is represented as follows:
[0088] Then, the document marked with the trigger word Input into the Transformer-based encoder to obtain the document encoding
[0089]
[0090] (1.2) Get event e according to event type i Event Prompt Template Pt i , encode the event prompt template of each event, and encode the event prompt template of all events obtained by encoding Splice them together to get the spliced document prompt code
[0091] Given an input document X = [x1, x2, ..., x L ] and its N}The set of events triggered by E = {e1, e2, ..., e N}, get each event e according to the event type i Event Prompt Template Pt i Similarly, the event prompt template Pt for each event i Input into the Transformer-based encoder to obtain its encoding
[0092]
[0093] Then, encode the event prompts of all the events obtained Splice them together to get the spliced document prompt code
[0094] (1.3) According to the number of event arguments in the event argument set of each event in the document, a corresponding argument slot set is constructed for each event in the document to obtain the argument slot sequence of the document. Where S i is the argument slot set corresponding to the i-th event, the argument slot set S i The number of argument slots in the event argument set is the same as the number of event arguments in the event argument set of the ith event, and the corresponding argument slots are initialized using the role code corresponding to each argument slot to obtain the argument slot code
[0095] In the present invention, the teacher model T of the internal level of the training event intra and the teacher model T at the event level inter , we can understand the teacher model T at the internal level of the training event intra and the teacher model T at the event level inter There is no order of precedence. It can be performed simultaneously or separately without any restrictions or requirements. Inspired by privileged knowledge distillation, the true values of some event arguments are regarded as privileged knowledge and fused with the event prompt template. Based on this, these prior knowledge can be directly used to build the association between event arguments.
[0096] (2) Training event internal level teacher model T intra ,include:
[0097] (2.1) Randomly select some arguments from each event argument set of the document with a certain probability p1, and use the selected event arguments as the privileged knowledge of the teacher model at the intra-event level. The selected event arguments are the privileged argument set within the event. All arguments in the selected argument set are privileged arguments within the event;
[0098]
[0099] Among them, P(a j ) indicates that from event e i The argument set A i Select argument a in j Probability as a privileged argument within an event.
[0100] Next, the training model is based on the privileged argument set in the event The event-specific privileged arguments in the event are used to predict the remaining non-event-specific privileged arguments in the same event, and this model of event-specific associations is used as the teacher model T at the event-level. intra .
[0101] (2.2) Encoding from Document The text span encoding corresponding to the privileged argument in each event is obtained as the encoding of the privileged argument of each event, and is combined with the corresponding argument slot encoding Perform fusion to obtain the privileged argument slot encoding within each event For privileged argument slots in non-events, keep their encoding unchanged, and then obtain the argument slot set encoding corresponding to each event for This includes the encoding of privileged argument slots within events and the encoding of privileged argument slots within non-events. The argument slots corresponding to the encoding of privileged argument slots within non-events are used as the argument slots to be predicted by the teacher model at the internal level of events. i is the argument slot set S corresponding to the i-th event i Length;
[0102] The paper slot set encoding corresponding to each event is fused with the document prompt encoding to obtain the document prompt encoding that incorporates the privileged knowledge within the event.
[0103] (2.3) Encode the document Decode to obtain a context-oriented document decoding representation
[0104] For document encoding Decode using a Transformer-based decoder to obtain a context-oriented document representation
[0105]
[0106] Encode the document and document hint encoding that incorporates privileged knowledge within the event Perform joint decoding to obtain a hint template decoding representation for document context and event-specific privileged knowledge
[0107] (2.4) The argument slot to be predicted is the privileged argument slot in the non-event. For each argument slot to be predicted s k , decoding representations from hint templates targeting document context and privileged knowledge within events Get its representation vector Construct the span selector for the argument slot to be predicted
[0108]
[0109] where ω (start) and ω (end) are the starting and ending position weight matrices respectively, and ⊙ represents element-wise multiplication.
[0110] (2.5) Based on span selector and the document decoded representation To predict the expected argument slot s k The logit sequence of the starting position and the logit sequence of the ending position;
[0111]
[0112]
[0113] Calculate the expected prediction slots k The probability distribution of the starting position and the end position probability distribution
[0114]
[0115] (2.6) Constructing the binary matching loss function for the event intra-argument association prediction task as follows:
[0116]
[0117] where s k ∈S i is a single argument slot to be predicted, Represents the event to be predicted e i The argument set consisting of all non-privileged arguments of and Respectively represent the argument slot s k The real starting and ending positions of and Used to represent argument slots k The true span of and Respectively represent the calculated argument slot s k The starting position probability distribution and the ending position probability distribution, It indicates the global optimal argument span matching of multiple argument slots of the same role calculated by the Hungarian algorithm. For slots without corresponding arguments, the matching is span (0,0);
[0118] (2.7) Bipartite matching loss function based on event-based argument association prediction task Train the event-level teacher model T that can capture the knowledge of event-level associations intra .
[0119] (3) Training the teacher model T at the event level inter ,include:
[0120] (3.1) Randomly select some events from the set of all events in the document with a certain probability p2, and use all arguments in the argument set of the selected event as the privileged knowledge of the teacher model at the event level. The argument set of the selected event is the cross-event privileged argument set All arguments in the argument set of the selected event are cross-event privileged arguments;
[0121]
[0122] Among them, P(A i ) represents the selection and event e i The corresponding set A i The probability of A i All arguments in are treated as cross-event privileged arguments.
[0123] Next, the training model is based on the cross-event privileged argument set The cross-event privileged arguments in the event are used to predict all non-cross-event privileged arguments in the remaining events, and this model for constructing cross-event argument associations is used as the teacher model T at the event level. inter .
[0124] (3.2) Obtain the text span code corresponding to each cross-event privileged argument from the document code as the code of each cross-event privileged argument, and compare it with the corresponding argument slot code Perform fusion to obtain the encoding of each cross-event privileged argument slot
[0125] For non-cross-event privileged argument slots, keep their encoding unchanged, and then obtain the paper slot set encoding corresponding to each event for This includes cross-event privileged argument slot encoding and non-cross-event privileged argument slot encoding. The argument slots corresponding to the non-cross-event privileged argument slot encoding are used as the argument slots to be predicted by the teacher model at the inter-event level. i is the argument slot set S corresponding to the i-th event i Length;
[0126] The paper slot set encoding corresponding to each event is fused with the document prompt encoding to obtain the document prompt encoding that incorporates cross-event privileged knowledge
[0127] (3.3) Encode the document Decode to obtain a context-oriented document decoding representation
[0128] For document encoding Decode using a Transformer-based decoder to obtain a context-oriented document representation
[0129]
[0130] Encode the document and document hint encoding that incorporates privileged knowledge across events Perform joint decoding to obtain a hint template decoding representation for document context and cross-event privileged knowledge
[0131] (3.4) For each event-level teacher model, the predicted argument slot s k , the argument slot to be predicted is the non-cross-event privileged argument slot, which is decoded from the hint template oriented to the document context and cross-event privileged knowledge Get its representation vector and construct the span selector of the argument slot to be predicted;
[0132]
[0133]
[0134] where ω (start) and ω (end) are the starting and ending position weight matrices respectively, and ⊙ represents element-wise multiplication.
[0135] (3.5) Based on span selector and the document decoded representation To predict the expected argument slot s k The logit sequence of the starting position and the logit sequence of the ending position;
[0136]
[0137] Calculate the expected prediction slots k The probability distribution of the starting position and the end position probability distribution
[0138]
[0139] (3.6) Constructing the binary matching loss function for the task of predicting the inter-event argument association as follows:
[0140]
[0141] where s k ∈S i is a single argument slot to be predicted, represents the set of arguments consisting of all non-privileged arguments of all events to be predicted, and Respectively represent the argument slot s k The real starting and ending positions of and Used to represent argument slots k The true span of and Respectively represent the calculated argument slot s k The starting position probability distribution and the ending position probability distribution, It indicates the global optimal argument span matching of multiple argument slots of the same role calculated by the Hungarian algorithm. For slots without corresponding arguments, the matching is span (0,0);
[0142] (3.7) Based on the binary matching loss function of the inter-event argument association prediction task, the inter-event level teacher model T is trained to capture the inter-event argument association knowledge. inter .
[0143] The present invention constructs an argument extraction student model with the same architecture as the association-aware model. The argument extraction student model also includes an encoder, a decoder, and a span selector, but the difference is that the model only uses argument slots initialized by role encoding without performing privileged knowledge fusion, and its training task is to extract all arguments in a document at one time rather than modeling argument associations.
[0144] (4) Constructing an argument extraction student model, including:
[0145] (4.1) Encoding the argument slots Splice with the document prompt code to get the splicing template code
[0146] For event e i , the encoding of its argument slot set for where n i is the set of argument slots S i Length, splicing template encoding
[0147]
[0148] (4.2) Encode the document Decode to obtain a context-oriented document decoding representation
[0149] For document encoding Decode using a Transformer-based decoder to obtain a context-oriented document representation
[0150]
[0151] Encode the document and splicing template encoding Perform joint decoding to obtain the hint template decoding representation
[0152] (4.3) Decoding representation from hint template Get the vector representation of each argument slot in the argument slot sequence of the document, and construct the span selector corresponding to each argument slot
[0153]
[0154] where ω (start) and ω (end) are the starting and ending position weight matrices respectively, and ⊙ represents element-wise multiplication.
[0155] (4.4) Based on span selector and the document decoded representation To predict the logit sequence of the starting position and the logit sequence of the ending position of each argument in the argument set of all events in the document;
[0156]
[0157] Calculate the starting position probability distribution and the ending position probability distribution of each argument in the argument set of all events in the document;
[0158]
[0159] (4.5) Construct the initial binary matching loss function for the argument extraction task as follows:
[0160]
[0161] where s q ∈S i is a single argument slot, A i ∈A represents the event e to be predicted i The argument set consisting of all the arguments of and Respectively represent the argument slot s q The real starting and ending positions of and Used to represent argument slots q The true span of and Respectively represent the calculated argument slot s q The probability distribution of the starting position and the probability distribution of the ending position, δ(A i ) represents the global optimal argument span matching of multiple argument slots of the same role calculated by the Hungarian algorithm. For slots without corresponding arguments, the matching is span (0,0).
[0162] (5) Construct the total cost function of the argument extraction student model, including:
[0163] (5.1) Use the mean square error (MSE) function to align the intermediate layer features between the event internal level teacher model and the argument extraction student model, and obtain the first feature alignment loss function;
[0164] The first feature alignment loss function is defined as follows:
[0165]
[0166] in, Document hint encoding that incorporates privileged knowledge within an event and represents the hint encoding of the student model without privileged knowledge fusion, that is, the concatenated template encoding obtained in (4.1)
[0167] In order to effectively transfer deep semantic information, the Kullback-Leibler (KL) divergence is then used to align the predicted probability distributions (i.e., logit sequences) of the teacher model and the student model.
[0168] (5.2) Kullback-Leibler divergence is used to align the predicted probability distributions of the teacher model and the argument extraction student model at the event internal level, and the first logit alignment loss function is obtained;
[0169]
[0170] Where N is the number of events, n i It is event i The number of slots, and Represents the teacher model T at the internal level of the event intra and the argument slots in the student model qThe predicted probability distribution of . Whether it is the teacher model or the student model, the argument slot s k The predicted probability distribution of Including the starting position probability distribution and the end position probability distribution
[0171] (5.3) Set the weights of the first feature alignment loss and the first logit alignment loss, and obtain the first knowledge distillation loss based on the first feature alignment loss function and the first logit alignment loss function
[0172]
[0173] Among them, ω1 and ω2 are the weights of the two alignment strategies.
[0174] (5.4) Use the mean square error function to align the intermediate layer features between the teacher model at the event level and the argument extraction student model, and obtain the second feature alignment loss function;
[0175] The second feature alignment loss function is defined as follows:
[0176]
[0177] in, represents a document hint encoding that incorporates privileged knowledge across events, while represents the hint encoding of the student model without privileged knowledge fusion, that is, the concatenated template encoding obtained in (4.1)
[0178] (5.5) Kullback-Leibler divergence is used to align the predicted probability distributions of the teacher model and the argument extraction student model at the inter-event level, and the second logit alignment loss function is obtained;
[0179]
[0180] Where N is the number of events, n i It is event i The number of slots, and Represents the teacher model T at the event level inter and the argument slots in the student model q The predicted probability distribution of . Whether it is the teacher model or the student model, the argument slot s k The predicted probability distribution of Including the starting position probability distribution and the end position probability distribution
[0181] (5.6) Set the weights of the second feature alignment loss and the second logit alignment loss, and obtain the second knowledge distillation loss based on the second feature alignment loss function and the second logit alignment loss function.
[0182]
[0183] Among them, ω3 and ω4 are the weights of the two alignment strategies.
[0184] (5.7) Bipartite matching loss function based on the initial argument extraction task First knowledge distillation loss Second knowledge distillation loss Constructing the total cost function of the argument extraction student model Among them, α and β are the loss weights of the teacher model at the intra-event level and the teacher model at the inter-event level, respectively.
[0185] In summary, the present invention adopts a multi-teacher distillation strategy to enhance the event argument extraction model by explicitly transferring correlation knowledge within and across events.
[0186] The document-level event argument extraction method (defined as AssocKD) proposed in the present invention is a generative method based on prompt learning. The method adopts the multi-event argument extraction framework in the parallel paradigm, and specially designs a correlation perception model with the same architecture, which can perform explicit correlation knowledge modeling and effective correlation knowledge transfer, thereby enhancing the argument extraction model. First, in order to explicitly model event associations, the present invention designs an independent correlation perception model based on privileged knowledge fusion, and proposes a correlation perception prediction task similar to the argument extraction task. Specifically, the present invention integrates privileged knowledge (i.e., arguments in some true labels) into the prompt template and regards it as known information. Then, the model is trained to predict other remaining unknown arguments, thereby capturing the relationship between arguments. In addition, in order to achieve effective transfer of correlation knowledge to enhance the argument extraction model, the present invention establishes two correlation perception models within and between events as teacher models, and adopts a multi-teacher distillation strategy to transfer the correlation knowledge to the argument extraction model acting as a student model. The present invention was experimented on the RAMS and WIKIEVENTS datasets, and achieved a significant improvement in the F1 value, verifying the effectiveness of the proposed method.
[0187] Another embodiment provides a document-level event argument extraction device, comprising:
[0188] The first module is used to obtain the event set in the input document Trigger word set Character Collection and the argument set e i represents the i-th event, E represents the set of events in X, N represents the number of events, and t i represents the trigger word of the ith event, T represents the set of trigger words, R i Represents a single event e i The argument role set of R is R i A collection of i is a single event i The argument set of A, each argument a∈A i is a span of text in document X and corresponds to R i A role in , X∈D, D represents a given document dataset;
[0189] The second module is used to train the teacher model at the intra-event level to obtain the internal argument association knowledge of each event in the document;
[0190] The third module is used to train the teacher model at the inter-event level to obtain the argument association knowledge across events in the document;
[0191] The fourth module is used to construct an argument extraction student model to predict the argument set of all events based on documents;
[0192] The fifth module is used to introduce feature alignment and logit alignment based on multi-teacher distillation to transfer event association knowledge from the teacher model at the internal level of each event and the teacher model at the inter-event level to the argument extraction student model, and then determine the total cost function of the argument extraction student model;
[0193] The sixth module is used to iteratively minimize the total loss function of the argument extraction student model until convergence, so as to output a trained argument extraction student model, which is then used for document-level event argument extraction.
[0194] The implementation methods of the above modules and the construction of the model can adopt the methods described in any of the above embodiments, which will not be repeated here.
[0195] On the other hand, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the document-level event argument extraction method provided in any of the above embodiments are implemented. The computer device may be a server. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store sample data. The network interface of the computer device is used to communicate with an external terminal via a network connection.
[0196] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the document-level event argument extraction method provided in any of the above-mentioned embodiments.
[0197] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer 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. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0198] Matters not covered by the present invention are known technologies.
[0199] 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.
[0200] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
[0201] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. Document-level event argument extraction method, characterized in that: include: Input document and get the event collection in the document Trigger word set Character Collection and the argument set e i represents the i-th event, E represents the set of events in X, N represents the number of events, and t i represents the trigger word of the ith event, T represents the set of trigger words, R i Represents a single event e i The argument role set of R is R i A collection of i is a single event i The argument set of A, each argument a∈A i is a span of text in document X and corresponds to R i A role in , X∈D, D represents a given document dataset; Train the intra-event level teacher model to obtain the internal argument association knowledge of each event in the document; Train the teacher model at the inter-event level to obtain the knowledge of argument associations across events in the document; Construct an argument extraction student model to predict the argument set of all events based on documents; The method of feature alignment and logit alignment based on multi-teacher distillation is introduced to transfer event association knowledge from the teacher model at the internal level of each event and the teacher model at the inter-event level to the argument extraction student model, and then the total cost function of the argument extraction student model is determined; The total loss function of the argument extraction student model is iteratively minimized until convergence to output a trained argument extraction student model, which is then used for document-level event argument extraction.
2. The document-level event argument extraction method according to claim 1, characterized in that: Teacher model T at the event internal level intra : By randomly selecting a part of the arguments as privileged knowledge in each event with a certain probability, the training model is used to predict the remaining non-privileged arguments in the same event based on the privileged arguments in the event; Teacher model T at the event level inter : Randomly select one event from the event set consisting of all events in the document with a certain probability, and regard all arguments in the argument set of the selected event as privileged knowledge. The training model uses cross-event privileged arguments to predict all non-privileged arguments in the remaining events.
3. The document-level event argument extraction method according to claim 1 or 2, characterized in that: It also includes encoding the input document, including: Mark the trigger words of each event in the document, encode the document marked with the trigger words, and obtain the document encoding; Obtaining an event prompt template for each event according to the event type, encoding the event prompt template for each event, and splicing the event prompt codes of all the events obtained by encoding to obtain a spliced document prompt code; According to the number of event arguments in the event argument set of each event in the document, a corresponding argument slot set is constructed for each event in the document to obtain the argument slot sequence of the document. The number of argument slots corresponding to each event in the argument slot set is the same as the number of event arguments in the event argument set corresponding to each event. The corresponding argument slot is initialized using the role code corresponding to each argument slot to obtain the argument slot code of each event.
4. The document-level event argument extraction method according to claim 3 is characterized in that: Train the event internal level teacher model T intra ,include: Randomly select some arguments from each event argument set of the document with a certain probability, and use the selected event arguments as the privileged knowledge of the teacher model at the intra-event level. The selected event arguments are the intra-event privileged argument set, and all arguments in the selected argument set are the intra-event privileged arguments. The text span code corresponding to the privileged argument in each event is obtained from the document code as the code of the privileged argument of each event, and is fused with the argument slot code corresponding to each event to obtain the privileged argument slot code of each event. For the non-privileged argument slot, its code remains unchanged, and then the argument slot set code corresponding to each event is obtained. The argument slot set code corresponding to each event includes the privileged argument slot code and the non-privileged argument slot code. The argument slot corresponding to the non-privileged argument slot code is used as the argument slot to be predicted. The paper slot set encoding corresponding to each event is fused with the document prompt encoding to obtain the document prompt encoding that incorporates the privileged knowledge within the event; Encode and decode the document to obtain a context-oriented document decoding representation; The document encoding and the document hint encoding that incorporates the privileged knowledge within the event are jointly decoded to obtain a hint template decoding representation oriented to the document context and the privileged knowledge within the event. For each argument slot to be predicted, obtain its representation vector from the hint template decoding representation oriented to the document context and the privileged knowledge within the event, and construct the span selector of the argument slot to be predicted; Predict the logit sequence of the starting position and the logit sequence of the ending position of the argument slot to be predicted based on the span selector and the context-oriented document decoding representation, and calculate the probability distribution of the starting position and the probability distribution of the ending position of the argument slot to be predicted, and then calculate the probability distribution of the starting position and the probability distribution of the ending position of each argument to be predicted; Based on the calculated probability distribution of the starting position and the ending position of the argument slot to be predicted and the actual starting position and the ending position of the argument slot to be predicted, a binary matching loss function for the intra-event argument association prediction task is constructed; Based on the binary matching loss function of the event argument association prediction task, the event internal level teacher model T is trained to capture the event argument association knowledge. intra .
5. The document-level event argument extraction method according to claim 3 is characterized in that: Train the event-level teacher model T inter ,include: Randomly select some events from all event sets of the document with a certain probability, and use all arguments in the argument set of the selected event as the privileged knowledge of the teacher model at the event level. The argument set of the selected event is the cross-event privileged argument set, and all arguments in the argument set of the selected event are cross-event privileged arguments. The text span code corresponding to each cross-event privileged argument is obtained from the document code as the code of each cross-event privileged argument, and is fused with the argument slot code corresponding to each event to obtain the code of each cross-event privileged argument slot. For the non-privileged argument slot, its code remains unchanged, and then the paper slot set code corresponding to each event is obtained, which includes the privileged argument slot code and the non-privileged argument slot code. The argument slot corresponding to the non-privileged argument slot code is used as the argument slot to be predicted. The paper slot set encoding corresponding to each event is fused with the document prompt encoding to obtain the document prompt encoding that incorporates cross-event privileged knowledge; Encode and decode the document to obtain a context-oriented document decoding representation; Decode the document encoding and the document hint encoding that incorporates cross-event privileged knowledge to obtain a hint template representation oriented to the document context and cross-event privileged knowledge; For each to-be-predicted argument slot, which is a non-privileged argument slot, its representation vector is obtained from the hint template representation oriented to the document context and cross-event privileged knowledge, and a span selector of the to-be-predicted argument slot is constructed; Predict the logit sequence of the starting position and the logit sequence of the ending position of the argument slot to be predicted based on the span selector and the context-oriented document decoding representation, and calculate the probability distribution of the starting position and the probability distribution of the ending position of the argument slot to be predicted; Based on the calculated probability distribution of the starting position and the ending position of the argument slot to be predicted and the actual starting position and the ending position of the argument slot to be predicted, a binary matching loss function for the task of predicting the inter-event argument association is constructed; Based on the binary matching loss function of the inter-event argument association prediction task, an inter-event level teacher model T is trained to capture the inter-event argument association knowledge. inter .
6. The document-level event argument extraction method according to claim 3 is characterized in that: Construct an argument extraction student model, including: Concatenate the argument slot code with the document prompt code to obtain a concatenated template code; Encode and decode the document to obtain a context-oriented document decoding representation; Decode the document encoding and the concatenated template encoding to obtain a hint template decoded representation, obtain a vector representation of each argument slot in the document's argument slot sequence from the hint template decoded representation, and construct a span selector corresponding to each argument slot; Predict the logit sequence of the starting position and the logit sequence of the ending position of the argument slot of each event in the document based on the span selector and the context-oriented document decoding representation, and calculate the probability distribution of the starting position and the probability distribution of the ending position of the argument slot of each event; Based on the calculated starting position probability distribution and ending position probability distribution of the argument slot of each event and the actual starting position and ending position of the argument slot of each event, a binary matching loss function for the initial argument extraction task is constructed.
7. The document-level event argument extraction method according to claim 6, characterized in that: Construct the total cost function of the argument extraction student model, including: The mean square error function is used to align the intermediate layer features between the event internal level teacher model and the argument extraction student model, and the first feature alignment loss function is obtained; The Kullback-Leibler divergence is used to align the predicted probability distributions of the teacher model and the argument extraction student model at the event internal level, and the first logit alignment loss function is obtained; Set the weights of the first feature alignment loss and the first logit alignment loss, and obtain the first knowledge distillation loss based on the first feature alignment loss function and the first logit alignment loss function The mean square error function is used to align the intermediate layer features between the teacher model at the inter-event level and the argument extraction student model, and the second feature alignment loss function is obtained; The Kullback-Leibler divergence is used to align the predicted probability distributions of the teacher model and the argument extraction student model at the inter-event level, and the second logit alignment loss function is obtained; Set the weights of the second feature alignment loss and the second logit alignment loss, and obtain the second knowledge distillation loss based on the second feature alignment loss function and the second logit alignment loss function. Bipartite matching loss function based on the initial argument extraction task First knowledge distillation loss Second knowledge distillation loss Constructing the total cost function of the argument extraction student model Among them, α and β are the loss weights of the teacher model at the intra-event level and the teacher model at the inter-event level, respectively.
8. A document-level event argument extraction device, characterized in that: include: The first module is used to obtain the event set in the input document Trigger word set Character Collection and the argument set e i represents the i-th event, E represents the set of events in X, N represents the number of events, and t i represents the trigger word of the ith event, T represents the set of trigger words, R i Represents a single event e i The argument role set of R is R i A collection of i is a single event i The argument set of A, each argument a∈A i is a span of text in document X and corresponds to R i A role in , X∈D, D represents a given document dataset; The second module is used to train the teacher model at the intra-event level to obtain the internal argument association knowledge of each event in the document; The third module is used to train the teacher model at the inter-event level to obtain the argument association knowledge across events in the document; The fourth module is used to construct an argument extraction student model to predict the argument set of all events based on documents; The fifth module is used to introduce feature alignment and logit alignment based on multi-teacher distillation to transfer event association knowledge from the teacher model at the internal level of each event and the teacher model at the inter-event level to the argument extraction student model, and then determine the total cost function of the argument extraction student model; The sixth module is used to iteratively minimize the total loss function of the argument extraction student model until convergence, so as to output a trained argument extraction student model, which is then used for document-level event argument extraction.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the document-level event argument extraction method as described in claim 1 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the document-level event argument extraction method as described in claim 1 are implemented.
Citation Information
Cited By
Character semantics capture method and system based on dynamic event prompts
CN119783683A
Character semantics capture method and system based on dynamic event prompts
CN119783683B
Document-level event argument extraction method based on role focus heterogeneous graph
CN119886156A
Knowledge distillation method, device, equipment, medium and product
CN119990257A
Method for extracting energy power document level event argument based on dependency perception and role guidance
CN120493937A
