WO2023077562A1 - 一种基于图扰动策略的事件检测方法及装置 - Google Patents
一种基于图扰动策略的事件检测方法及装置 Download PDFInfo
- Publication number
- WO2023077562A1 WO2023077562A1 PCT/CN2021/131285 CN2021131285W WO2023077562A1 WO 2023077562 A1 WO2023077562 A1 WO 2023077562A1 CN 2021131285 W CN2021131285 W CN 2021131285W WO 2023077562 A1 WO2023077562 A1 WO 2023077562A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- graph
- context
- syntactic
- adjacency matrix
- Prior art date
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 48
- 239000011159 matrix material Substances 0.000 claims abstract description 104
- 239000013598 vector Substances 0.000 claims abstract description 47
- 238000013528 artificial neural network Methods 0.000 claims abstract description 41
- 238000000034 method Methods 0.000 claims abstract description 39
- 238000004364 calculation method Methods 0.000 claims description 26
- 230000002776 aggregation Effects 0.000 claims description 25
- 238000004220 aggregation Methods 0.000 claims description 25
- 238000005457 optimization Methods 0.000 claims description 18
- 230000003094 perturbing effect Effects 0.000 claims description 18
- 238000004458 analytical method Methods 0.000 claims description 16
- 230000007246 mechanism Effects 0.000 claims description 16
- 238000001914 filtration Methods 0.000 claims description 14
- 239000000284 extract Substances 0.000 claims description 8
- 230000001902 propagating effect Effects 0.000 claims description 4
- 230000004931 aggregating effect Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 abstract description 10
- 230000008439 repair process Effects 0.000 abstract description 7
- 238000003058 natural language processing Methods 0.000 description 13
- 230000001419 dependent effect Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 9
- 230000004913 activation Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000002474 experimental method Methods 0.000 description 3
- 230000000644 propagated effect Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000000306 recurrent effect Effects 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 101100165323 Drosophila melanogaster bgcn gene Proteins 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000010437 gem Substances 0.000 description 1
- 229910001751 gemstone Inorganic materials 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- KRTSDMXIXPKRQR-AATRIKPKSA-N monocrotophos Chemical compound CNC(=O)\C=C(/C)OP(=O)(OC)OC KRTSDMXIXPKRQR-AATRIKPKSA-N 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- the present application relates to the field of natural language processing, in particular to an event detection method and device based on a graph perturbation strategy.
- Natural Language Processing is a technology that uses the natural language used by humans to communicate with machines for interactive communication. Its task is to let the computer accept the user's input in the form of natural language, and internally perform a series of operations such as processing and calculation through the algorithm defined by humans, so as to simulate human understanding of natural language and return the results expected by the user. Natural language processing is an important direction in the field of computer science, and it also represents the ultimate goal of artificial intelligence, known as "the jewel in the crown of artificial intelligence". Natural language processing involves a variety of research and application technologies, such as text retrieval, machine translation, information extraction, question answering system, automatic summarization, etc.
- Event detection is a challenging subtask of natural language processing. Its purpose is to identify and correctly classify trigger words for corresponding events from unstructured natural language texts such as broadcast news, tweets, and policy announcements. Event detection is an important part of natural language processing and the basis of a series of downstream tasks, promoting the development of question answering systems, reading comprehension, automatic summarization and other tasks.
- the early event detection tasks used a method based on pattern matching.
- convolutional neural network Convolutional Neural Network
- Recurrent Neural Network recurrent neural network
- BGCN Trigger Word Detection Based on BERT and Graph Convolutional Network
- This feature extraction framework based on BERT and syntactic structure can enhance information flow, thereby improving the accuracy of event detection
- Event Detection Method without Trigger Words Integrating Syntactic Information captures the syntactic relevance between trigger words and entities by incorporating syntactic information into the encoder, and uses a multi-head attention mechanism To model hidden triggers in sentences, and then to achieve event detection.
- this application is proposed to provide an event detection method based on a graph perturbation strategy that overcomes the problem or at least partially solves the problem, comprising the steps of:
- An event detection method based on a graph perturbation strategy comprising steps:
- syntactic information adjacency matrix and the context representation as the input of the artificial neural network, propagating information on the syntactic graph through the graph convolutional network layer, generating a new syntactic subgraph through the graph perturbation layer, extracting important node information and filtering irrelevant node, to obtain output information; specifically, based on the node density, the syntax graph is perturbed to generate a first subgraph, and the first subgraph is convoluted to extract important node information; Generating a second subgraph by perturbing the graph, and repairing and filtering irrelevant nodes on the second subgraph;
- the step of obtaining the context words in a given sentence and generating a syntactic information adjacency matrix and a splicing vector corresponding to the context words includes:
- the stitching vector is generated according to word embedding, entity embedding, POS-tagging embedding and position embedding of the context words.
- the step of determining the context representation corresponding to the context word according to the splicing vector includes:
- the splicing vector is passed through the input module BiLSTM layer to generate a context representation corresponding to the context word.
- syntactic information adjacency matrix and the context representation are used as the input of the artificial neural network, information is propagated on the syntactic graph through the graph convolutional network layer, a new syntactic subgraph is generated through the graph perturbation layer, and important Node information and filtering irrelevant nodes, steps to obtain output information, including:
- the step of predicting the type of the context word according to the context representation and the output information includes:
- the type of the context word is predicted according to the aggregation information.
- the step of predicting the type of the context word according to the aggregation information includes:
- the final representation of the context word is predicted according to a preset classification method to obtain the type of the context word.
- An event detection device based on a graph perturbation strategy comprising:
- the obtaining module is used to obtain the context words in the given sentence, and generates a syntactic information adjacency matrix and splicing vectors corresponding to the context words;
- a generating module configured to generate a syntax graph according to the syntax information adjacency matrix
- a determining module configured to determine a context representation corresponding to the context word according to the splicing vector
- a calculation module used to use the syntactic information adjacency matrix and the context representation as the input of the artificial neural network, propagate information on the syntactic graph through the graph convolutional network layer, generate a new syntactic subgraph through the graph perturbation layer, and extract important Node information and filtering irrelevant nodes to obtain output information; specifically, based on node density, the syntactic graph is perturbed to generate a first subgraph, and the first subgraph is convoluted to extract important node information; edge-based sparse Properly disturbing the syntax graph to generate a second subgraph, and repairing and filtering irrelevant nodes to the second subgraph;
- a classification module configured to predict the type of the context word according to the context representation and the output information.
- the acquisition module includes:
- the dependency analysis submodule is used to analyze the given sentence through syntactic dependence, and generate syntactic information corresponding to the context word according to the analysis result of the given sentence;
- Generating an adjacency matrix submodule configured to generate the syntax information adjacency matrix according to the syntax information
- the splicing submodule is used to generate the splicing vector according to word embedding, entity embedding, POS-tagging embedding and position embedding of the context word.
- calculation module includes:
- the artificial neural network calculation submodule is used to input the syntactic information adjacency matrix and the context representation into the artificial neural network for calculation, and generate the output information according to the calculation result of the artificial neural network.
- classification module includes:
- An optimization result submodule configured to optimize the output information using an attention mechanism to generate an optimization result
- an aggregated information submodule configured to aggregate the context representation and the optimization result to generate aggregated information
- the prediction type submodule is used to predict the type of the context word according to the aggregation information.
- a syntactic information adjacency matrix and a splicing vector corresponding to the context words are generated; a syntactic graph is generated according to the syntactic information adjacency matrix; a syntactic graph is generated according to the splicing vector Determine the context representation corresponding to the context word; use the syntactic information adjacency matrix and the context representation as the input of the artificial neural network, propagate information on the syntactic graph through the graph convolutional network layer, and generate new
- the syntactic subgraph extracts important node information and filters irrelevant nodes to obtain output information; specifically, perturbs the syntactic graph based on node density to generate a first subgraph, and performs convolution on the first subgraph to extract important nodes information; based on the sparsity of the edge, the syntactic graph is perturbed to generate a second subgraph, and the second subgraph is repaired and filtered for irrelevant nodes;
- This application combines the characteristics of different syntactic relationships between different words in a sentence, fully considers the importance of different words in a sentence, and filters redundant information in sentences by introducing syntactic information and two graph perturbation strategies, retaining important word information, and
- the use of graph repair operations to reduce the loss of syntactic information can effectively solve the problem of low classification efficiency caused by excessive redundant information in long sentences in the process of event detection; at the same time, using skip connections with attention gating mechanism, enhanced
- the aggregation of different orders of syntactic information retains more original features, provides effective word representation for the recognition and classification of trigger words, and effectively improves the F1 value.
- FIG. 1 is a flow chart of the steps of an event detection method based on a graph disturbance strategy provided by an embodiment of the present application
- FIG. 2 is a schematic structural diagram of a dependency syntax tree provided by an embodiment of the present application.
- FIG. 3 is a schematic structural diagram of an adjacency matrix corresponding to a dependency syntax tree provided by an embodiment of the present application
- Fig. 4 is a schematic structural diagram of a new subgraph generated by graph perturbation provided by an embodiment of the present application
- Fig. 5 is a schematic structural diagram of generating a linking matrix corresponding to the first subgraph by perturbing the syntax graph based on the node density provided by an embodiment of the present application;
- FIG. 6 is a schematic structural diagram of generating a linking matrix corresponding to a second subgraph by perturbing a syntax graph based on edge sparsity according to an embodiment of the present application;
- FIG. 7 is a schematic flowchart of an event detection method based on a graph disturbance strategy provided by an embodiment of the present application.
- Fig. 8 is a structural block diagram of an event detection device based on a graph perturbation strategy provided by an embodiment of the present application.
- FIG. 1 it shows an event detection method based on a graph disturbance strategy provided by an embodiment of the present application
- the methods include:
- a syntactic information adjacency matrix and a splicing vector corresponding to the context words are generated; a syntactic graph is generated according to the syntactic information adjacency matrix; a syntactic graph is generated according to the splicing vector Determine the context representation corresponding to the context word; use the syntactic information adjacency matrix and the context representation as the input of the artificial neural network, propagate information on the syntactic graph through the graph convolutional network layer, and generate new
- the syntactic subgraph extracts important node information and filters irrelevant nodes to obtain output information; specifically, perturbs the syntactic graph based on node density to generate a first subgraph, and performs convolution on the first subgraph to extract important nodes information; based on the sparsity of the edge, the syntactic graph is perturbed to generate a second subgraph, and the second subgraph is repaired and filtered for irrelevant nodes;
- This application combines the characteristics of different syntactic relationships between different words in a sentence, fully considers the importance of different words in a sentence, and filters redundant information in sentences by introducing syntactic information and two graph perturbation strategies, retaining important word information, and
- the use of graph repair operations to reduce the loss of syntactic information can effectively solve the problem of low classification efficiency caused by excessive redundant information in long sentences in the process of event detection; at the same time, using skip connections with attention gating mechanism, enhanced
- the aggregation of different orders of syntactic information retains more original features, provides effective word representation for the recognition and classification of trigger words, and effectively improves the F1 value.
- the context words in the given sentence are obtained, and a syntactic information adjacency matrix and a splicing vector corresponding to the context words are generated.
- step S110 the specific process of "obtaining context words in a given sentence and generating a syntactic information adjacency matrix and splicing vectors corresponding to the context words" in step S110 can be further described in conjunction with the following description.
- the given sentence is analyzed through syntactic dependencies, and syntactic information corresponding to the context words is generated according to the analysis result of the given sentence.
- syntactic dependence is to reveal the syntactic structure by analyzing the interdependence relationship between the components in the language unit.
- the syntactic dependence analysis identifies the grammatical components such as "subject-verb-object” and "fixed complement” in the sentence, and emphasizes Analyze the relationship between words.
- the core of the sentence in syntactic dependency analysis is the predicate verb, and then find out other components around the predicate, and finally analyze the sentence into a dependency syntax tree, which can describe the dependency relationship between each word.
- the given sentence information is obtained, the given sentence information is identified, and Stanford Core NLP (StandFord Natural Language Processing, Stanford Natural Language Processing tool) is used to perform syntactic dependency analysis, and each word in the given sentence is Analyze and identify the interdependence between words in a sentence to form a dependency syntax tree.
- "dependence” refers to the relationship between dominance and domination between words, and the dominant element is called the dominator, while the dominating element is called the subordinate.
- Dependency Grammar itself does not stipulate the classification of dependencies, but in order to enrich the syntactic information conveyed by the dependency structure, in practical applications, different marks are generally added to the edges of the dependency tree.
- FIG. 2 it shows a schematic structural diagram of a dependency syntax tree provided by an embodiment of the present application.
- the sentence "He nodded to express his agreement with us” in the constructed dependency syntax tree, we can see that the core predicate of the sentence is "nodding", the subject of "nodding” is "he”, and the dependency syntax tree can be Describe the dependency relationship between context words, each word in the sentence is dependent on one other word, wherein “he” is dependent on "nodding”, the dependency relationship is the main predicate relationship (SBV); "expression” is dependent on " Nodding”, the dependent relationship is a parallel relationship (COO); “agree” is dependent on "expression”, and the dependent relationship is a verb-object relationship (VOB); “ ⁇ ” is dependent on "we”, and the dependent relationship is a post-attachment relationship (RAD); “We” is dependent on “opinion”, and the dependent relationship is ATT relationship (ATT); “opinion” is dependent on “agreement", and the dependent relationship is verb-object relationship
- SBV main predicate
- the adjacency matrix is a matrix representing the adjacency relationship between vertices.
- Adjacency matrix is divided into directed graph adjacency matrix and undirected graph adjacency matrix.
- the adjacency matrix of G is an nth-order square matrix with the following properties: For an undirected graph, the adjacency matrix must be symmetric, and the main diagonal must be zero, and the subdiagonal must not be 0, and the directed graph Not necessarily so.
- the degree of any vertex i is the number of all non-zero elements in the i-th column (or i-th row)
- the out-degree of a vertex i in a directed graph is the number of all non-zero elements in the i-th row number
- the in-degree is the number of all non-zero elements in the i-th column
- the adjacency matrix of the directed graph is used to store the syntactic dependency between two event parameters.
- the adjacency matrix corresponding to the sentence is generated according to the dependency relationship between words in the dependency syntax tree.
- the words in the dependency syntax tree correspond to a vertex in the adjacency matrix
- the dependency relationship between two words in the syntax tree corresponds to the directed edge between the vertices in the adjacency matrix.
- "he” in the dependency syntax tree depends on "nodding”, so there is a directed edge between the vertices corresponding to "he” and "nodding” in the adjacency matrix.
- FIG. 3 it shows a schematic structural diagram of an adjacency matrix corresponding to a dependency syntax tree provided by an embodiment of the present application.
- the core predicate in the dependency syntax tree is "nodding", and "he” is the subject of "nodding”, so in the corresponding adjacency matrix, the value at the intersection of the row where "nodding” is located and the column value where "he” is located is 1 .
- Each word is used as a node, and "he", “nodding”, “expressing”, “agreeing”, “us”, and “opinion” are 7 words, so it is a 7X7 square matrix.
- the adjacency matrix of the directed graph is used to store the syntactic dependencies of the text. If there is a dependency between words, the corresponding adjacency matrix element value is 1, and between words without dependency relationship, the corresponding adjacency matrix element is 0.
- the dependency relationship between the context words can be represented by the adjacency matrix.
- the stitching vector is generated according to the word embedding, entity embedding, POS-tagging embedding and position embedding of the context words.
- the word-level information in the sentence needs to be converted into a real-valued vector as the input of the artificial neural network.
- X ⁇ x 1 ,x 2 ,x 3 , ⁇ ,x n ⁇ be a sentence of length n, where x i is the i-th word in the sentence.
- the semantic information of a word is related to its position in the sentence, and the part-of-speech and entity type information can improve the recognition of trigger words and the understanding of semantics.
- the splicing vector formed by concatenating word embedding, entity embedding, POS-tagging (part of speech) embedding and position embedding of context words is used as the input of the artificial neural network.
- four different embedding vectors including word embedding, entity embedding, POS-tagging (part-of-speech) embedding and position embedding of the context word are spliced into splicing vectors, and the splicing vector can obtain the relationship between context words semantic information.
- a syntax graph is generated according to the syntax information adjacency matrix.
- the dependency relationship between words can be obtained through the dependency syntax tree, and the corresponding syntax graph is generated according to the relevant information in the adjacency matrix corresponding to the dependency syntax tree.
- An adjacency matrix represents a syntax graph, and the dependency syntax The words in the tree correspond to a graph node in the syntax graph, and the dependency relationship between two words in the dependency syntax tree corresponds to the directed edge between the nodes in the syntax graph.
- the context representation corresponding to the context word is determined according to the concatenation vector.
- the splicing vector is input to the input module Bi-LSTM neural network layer to generate a context representation corresponding to the context word, and the context representation is used as one of the input vectors of the artificial neural network.
- W is the weight matrix
- b is the bias item
- H is called the feature matrix
- ReLU is the ReLU activation function
- H' is the output of the graph convolutional network, which is a new feature matrix.
- the syntactic information adjacency matrix and the context representation are used as the input of the artificial neural network, the information is propagated on the syntactic graph through the graph convolutional network layer, and a new syntactic subgraph is generated through the graph perturbation layer , extract important node information and filter irrelevant nodes to obtain output information.
- the artificial neural network is a graph convolutional network (Graph Convolutional Network).
- syntactic graphs are the basis of graph convolutional network-based methods.
- the graph convolutional network is convolved on the syntactic graph to transfer the information of different nodes and realize the aggregation of information. Therefore, the structure of the syntactic graph affects the flow and aggregation of information.
- Traditional event detection methods based on graph convolutional networks do not take into account the characteristics of excessive redundant information in long sentences, and often use the original syntactic graph without perturbing the structure of the syntactic graph, so that trigger word recognition and classification lower efficiency and performance.
- step S140 of "using the syntactic information adjacency matrix and the context representation as the input of the artificial neural network, and propagating information on the syntactic graph through the graph convolutional network layer” can be further explained in conjunction with the following description , generate a new syntactic subgraph through the graph perturbation layer, extract important node information and filter irrelevant nodes, and obtain output information; specifically, perturb the syntactic graph based on node density to generate a first subgraph, and the first The subgraph is convolved to extract important node information; the syntactic graph is perturbed based on edge sparsity to generate a second subgraph, and the second subgraph is repaired to filter irrelevant nodes".
- the graph convolutional network layer is a shallow graph convolutional network that outputs low-level syntactic information.
- a new syntactic graph is generated in the graph perturbation layer, and the information of important nodes is retained; the last output information obtained in the graph perturbation layer based on node density or edge sparsity perturbation processing is input into the fourth graph convolutional network layer (as shown in Figure 7
- the GCN in the middle of the symmetrical graph convolutional network module propagates node information in the fourth graph convolutional network layer.
- the output results obtained in the fourth graph convolutional network layer are gradually passed through multiple graph repair layers and graph convolutional network layers.
- the subgraph generated by graph perturbation is replaced with the original syntax graph.
- the processed graph convolutional network layer is a deep graph convolutional network that outputs high-order syntactic information.
- the original syntactic graph is used in graph repair to prevent excessive syntactic information from being lost during graph perturbation; multiple GCNs are stacked in a symmetric graph convolutional network to utilize low-order and high-order syntactic information at the same time.
- the low-level syntactic information is obtained in the shallow GCN, and the high-level syntactic information is obtained in the deep GCN.
- the process of graph convolution can be understood as the following steps: extract and transform the feature information of nodes, transmit each node to send its own feature information to neighbor nodes after transformation; fuse the local structure information of nodes , to receive each node, and aggregate the feature information of the neighbor nodes; after the previous information is aggregated, nonlinear transformation is performed to increase the expressive ability of the model.
- the syntactic graph is perturbed based on the node density to generate a first subgraph, and the first subgraph is convolved to extract important node information; the syntactic graph is perturbed based on edge sparsity A second subgraph is generated, and the second subgraph is repaired to filter irrelevant nodes.
- Fig. 4 shows a schematic structural diagram of generating a new subgraph by graph perturbation provided by an embodiment of the present application.
- the perturbation of the syntactic graph based on node density is to retain a fixed proportion of important nodes on the basis of the original syntactic graph to generate a new syntactic graph, and the adjacent edges of the discarded graph nodes are also deleted; from the edge sparsity Disturbing the syntactic graph is to randomly delete the edges of a fixed ratio in the original syntactic graph to generate a new syntactic graph.
- the nodes in the syntactic graph will not be deleted.
- This data enhancement technology similar to Dropout can also increase the randomness and diversity.
- perturbing the syntactic graph based on node density and perturbing the syntactic graph based on edge sparsity are two different graph perturbation strategies, and these two strategies are executed separately.
- the graph perturbation part in the symmetric graph convolutional network module either all uses the strategy of perturbing the syntactic graph from the node density, or all uses the strategy of perturbing the syntactic graph from the edge sparsity.
- FIG. 5 shows a schematic structural diagram of perturbing a syntax graph based on node density to generate a tie matrix corresponding to the first subgraph provided by an embodiment of the present application.
- Perturbing the syntax graph based on node density is to use a graph pooling operation to select several important nodes from the original syntax graph to generate a new syntax graph.
- An adjacency matrix represents a syntactic graph, so the perturbation of the syntactic graph structure is manifested as the change of the adjacency matrix.
- the syntactic graph when the syntactic graph is perturbed based on node density, the unimportant word node "representation" is discarded, and its adjacent edges are also deleted, and the structure of the syntactic graph changes, thereby generating the first subgraph and Correspondingly connect the matrix, and perform convolution on the first subgraph to extract important node information.
- perturbing the syntax graph based on node density is to train a projection vector p, and project H' to y according to p, and y stores the importance score of each node. Then sort the importance scores of the nodes in descending order, select the top k nodes with the highest importance scores, and remember the position idx of these nodes. Then select the importance scores of k nodes from y according to idx, and store them in middle. Select k nodes from H' according to idx and store them in It is a transitional feature matrix. Select k nodes from the adjacency matrix A according to idx and store them in A', where A' is the new adjacency matrix.
- A' select(A, idx)
- sigmoid is the activation function
- rank means to select k nodes from y
- select means to generate a new matrix from the original matrix according to idx
- ⁇ means point multiplication.
- FIG. 6 shows a schematic structural diagram of perturbing a syntax graph based on edge sparsity to generate a tie matrix corresponding to a second subgraph provided by an embodiment of the present application. Perturbing the syntactic graph based on edge sparsity is to randomly delete a fixed proportion of edges in the syntactic graph to generate a new syntactic graph.
- the syntactic graph is perturbed based on edge sparsity
- the directed edges between “nodding” and “representation” and “we” and “of” are randomly deleted, resulting in a change in the structure of the syntactic graph, thereby generating the first
- the second subgraph and the corresponding linking matrix are repaired and the irrelevant nodes are filtered out on the second subgraph.
- perturbing the syntactic graph based on edge sparsity is to randomly delete edges in the adjacency matrix A according to the edge deletion ratio q.
- the formula is as follows:
- A is the original adjacency matrix of the sentence
- q is the ratio of edge deletion
- delete means randomly delete the number of edges with ratio q from A
- A' is the newly generated adjacency matrix.
- the type of the context word is predicted according to the context representation and the output information.
- step S150 the specific process of "predicting the type of the context word according to the context representation and the output information" in step S150 can be further described in conjunction with the following description.
- the node information in the graph is propagated in the graph convolutional network of each layer, and the low-order and high-order syntax are realized through the skip connection module (Skip-Connection) with the attention gating mechanism Aggregation of information, the context representation skips the graph convolutional network of each layer through the skip connection module, and performs an aggregation operation with the optimization result of the output information.
- the skip connection module with the attention gating mechanism can prevent the excessive propagation of short-distance syntactic information, enhance the aggregation of syntactic information at different levels, and retain more original syntactic information, providing an effective way for the identification and classification of trigger words. word representation, avoiding the situation where the final trigger word classification is not good.
- the low-level syntactic information and high-level syntactic information output by the graph convolutional network module are passed through two linear layers through the attention gating mechanism, and the results of the linear layers are added, and the result of the addition is passed through A ReLU activation function, after passing through a linear layer and a sigmoid activation function, obtains the attention coefficient, and performs point multiplication between the attention coefficient and the low-order syntactic information to obtain the output information of the attention gating mechanism, which is also an optimized low-order High-order syntactic information; the output information of the attention gating mechanism is added to the high-order syntactic information, thereby achieving the aggregation of low-order and high-order syntactic information.
- the attention coefficient is normalized by softmax, and the calculation formula is expressed as follows:
- W is the weight matrix multiplied with the feature
- ⁇ is the nonlinear activation function
- the j traversed in j ⁇ N i represents all the nodes adjacent to i.
- the final representation of the context word is determined according to the aggregation information; the final representation of the context word is predicted according to a preset classification method, and the type of the context word is obtained.
- the final representation of the context word is determined according to the aggregated information; the final representation of the context word is predicted according to a preset classification method to obtain the type of the context word, and according to each context The most probable label in the word's representation, determining the type of each word in a given sentence.
- the word types are pre-defined different types.
- the preset condition of the classification module is to aggregate the information of different modules, the aggregated information passes through a fully connected layer, and then the output of multiple neurons is mapped to the (0,1) interval through the softmax function (softmax function, which can be Consider it as a probability to understand, so as to perform multi-classification) to obtain the final representation of the context word, and select the category with the largest probability of the category corresponding to each context word as the label for the current representation prediction of each context word.
- softmax function softmax function, which can be Consider it as a probability to understand, so as to perform multi-classification
- Cross Event, Cross Entity, and Max Entropy are three feature-based methods
- DMCNN, JRNN, and dbRNN are three sequence-based methods
- GCN-ED, JMEE, MOGANED, and EE-GCN are four graph-based neural network methods.
- This method node density means that this method perturbs the syntactic graph based on node density
- this method edge sparsity means that this method perturbs the syntactic graph based on edge sparsity.
- the division of the data set in this experiment is consistent with the division of data sets of other event detection methods.
- the experimental results prove that the event detection method proposed in this embodiment is better than other event detection methods
- the proposed event detection method achieved the highest value on F 1 -score; compared with the sequence-based method, the event detection method based on node density perturbation syntax graph proposed in this embodiment, F 1 -score increased by 6%; and Compared with the method based on the graph neural network, the event detection method based on the node density perturbation syntax graph proposed in this embodiment achieves the highest value on F 1 -score.
- FIG. 7 it shows a schematic flow diagram of an event detection method based on a graph perturbation strategy
- the event text information is analyzed by syntactic analysis technology to generate a syntactic dependency tree, and then the adjacency matrix corresponding to the context word is generated according to the syntactic dependency tree, according to Depend on the relevant information in the adjacency matrix corresponding to the syntax tree to generate a corresponding syntax graph; generate a splicing vector from the word embedding, entity embedding, POS-tagging embedding, and position embedding of the context word, and input the splicing vector to the Bi-LSTM neural network
- the network layer generates the context representation corresponding to the context word, inputs the adjacency matrix and the context representation into the artificial neural network, spreads information on the syntactic graph through the graph convolutional network layer, and generates new syntactic subgrams through the graph perturbation layer.
- Graph extracting important node information and filtering irrelevant nodes, generating output information to perform aggregation operations on syntactic information of different depths; expressing the context and then skipping the multi-layer graph convolutional network through the skip connection module to perform aggregation operations;
- the optimization result of the output information is aggregated with the context representation, and the type of the context word is predicted by the classification module to determine the type corresponding to a given sentence.
- the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
- FIG. 8 it shows an event detection device based on a graph disturbance strategy provided by an embodiment of the present application
- Obtaining module 810 is used for obtaining the context word in the given sentence, generates the syntactic information adjacency matrix and splicing vector corresponding to described context word;
- a generating module 820 configured to generate a syntax graph according to the syntax information adjacency matrix
- Determining module 830 for determining the context representation corresponding to the context word according to the splicing vector
- the calculation module 840 is used to use the syntactic information adjacency matrix and the context representation as the input of the artificial neural network, propagate information on the syntactic graph through the graph convolutional network layer, generate a new syntactic subgraph through the graph perturbation layer, and extract Important node information and filtering irrelevant nodes to obtain output information; specifically, based on node density, the syntactic graph is perturbed to generate a first subgraph, and the first subgraph is convoluted to extract important node information; edge-based Sparsity perturbs the syntax graph to generate a second subgraph, and repairs the second subgraph to filter irrelevant nodes;
- the classification module 850 is configured to predict the type of the context word according to the context representation and the output information.
- the obtaining module 810 includes:
- the dependency analysis submodule is used to analyze the given sentence through syntactic dependence, and generate syntactic information corresponding to the context word according to the analysis result of the given sentence;
- Generating an adjacency matrix submodule configured to generate the syntax information adjacency matrix according to the syntax information
- the splicing submodule is used to generate the splicing vector according to word embedding, entity embedding, POS-tagging embedding and position embedding of the context word.
- the determining module 830 includes:
- a context representation submodule is generated, which is used to generate a context representation corresponding to the context word through the splicing vector through the input module BiLSTM layer.
- the calculation module 840 includes:
- the artificial neural network calculation submodule is used to input the syntactic information adjacency matrix and the context representation into the artificial neural network for calculation, and generate the output information according to the calculation result of the artificial neural network.
- the classification module 850 includes:
- An optimization result submodule configured to optimize the output information using an attention mechanism to generate an optimization result
- an aggregated information submodule configured to aggregate the context representation and the optimization result to generate aggregated information
- the prediction type submodule is used to predict the type of the context word according to the aggregation information.
- the prediction type submodule includes:
- the predicting context word type submodule is used to predict the final representation of the context word according to a preset classification method, and obtain the type of the context word.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Probability & Statistics with Applications (AREA)
- Machine Translation (AREA)
Abstract
本申请提供了一种基于图扰动策略的事件检测方法及装置,包括获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;依据所述句法信息邻接矩阵生成句法图;依据所述拼接向量确定与所述上下文单词对应的上下文表示;将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,获取输出信息;依据所述上下文表示与所述输出信息预测所述上下文单词的类型。本申请通过引入句法信息和两种图扰动策略来过滤句子中冗余信息,保留重要单词信息,并使用图修复操作减少句法信息的损失,可以有效解决事件检测过程中由于长句子中冗余信息过多所导致的分类效率低下的问题。
Description
本申请涉及自然语言处理领域,特别是一种基于图扰动策略的事件检测方法及装置。
自然语言处理(Natural Language Processing)是一种利用人类交流所使用的自然语言与机器进行交互通讯的技术。它的任务是让计算机接受用户自然语言形式的输入,并在内部通过人类所定义的算法进行加工、计算等系列操作,以模拟人类对自然语言的理解,并返回用户所期望的结果。自然语言处理是计算机科学领域的一个重要方向,也代表了人工智能的最终目标,被誉为“人工智能皇冠上的明珠”。自然语言处理涉及多种研究与应用技术,如文本检索、机器翻译、信息抽取、问答系统、自动文摘等。如今,自然语言处理在业界越来越流行,最新的应用包括在线广告匹配、情感分析、机器翻译,以及聊天机器人等。总之,随着互联网的普及和海量信息的涌现,自然语言处理正在人们的日常生活中扮演着越来越重要的作用。
事件检测是一项具有挑战性的自然语言处理子任务。它的目的是从广播新闻、推特、政策公告等非结构化的自然语言文本中识别出相应事件的触发词并进行正确分类。事件检测是自然语言处理的重要组成部分,也是一系列下游任务的基础,促进了问答系统、阅读理解、自动文摘等任务的发展。
早期的事件检测任务采用基于模式匹配的方法,随着神经网络的兴起,采用卷积神经网络(Convolutional Neural Network)和循环神经网络(Recurrent Neural Network)的方法进行事件检测受到越来越多的关注。然而,这些方法不擅长处理句子中的长距离依赖问题,导致事件检测的效率低下。最近的研究显示,使用神经网络和句法信息相结合的方法来处理事件检测任务可以有效缓解长距离依赖问题并显著提高事件检测的性能。例如,论文《BGCN:基于BERT和图卷积网络的触发词检测》引入句法结构来捕捉长距离依赖,同时引入BERT词向量来强化特征表示,这种基于BERT和句法 结构的特征抽取框架可以增强信息流,从而提高事件检测的准确性;论文《融合句法信息的无触发词事件检测方法》通过在编码器中融入句法信息来捕获触发词和实体间的句法关联性,并使用多头注意力机制来对句子中隐藏的触发器进行建模,进而实现事件检测。
发明内容
鉴于所述问题,提出了本申请以便提供克服所述问题或者至少部分地解决所述问题的一种基于图扰动策略的事件检测方法,包括步骤:
一种基于图扰动策略的事件检测方法,包括步骤:
获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;
依据所述句法信息邻接矩阵生成句法图;
依据所述拼接向量确定与所述上下文单词对应的上下文表示;
将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;
依据所述上下文表示与所述输出信息预测所述上下文单词的类型。
进一步地,所述获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量的步骤,包括:
通过句法依存对所述给定句子进行分析,并依据所述给定句子的分析结果生成所述上下文单词对应的句法信息;
依据所述句法信息生成所述句法信息邻接矩阵;
依据所述上下文单词的词嵌入、实体嵌入、POS-tagging嵌入和位置嵌入生成所述拼接向量。
进一步地,所述依据所述拼接向量确定与所述上下文单词对应的上下文表示的步骤,包括:
将所述拼接向量通过输入模块BiLSTM层生成与所述上下文单词对应的上下文表示。
进一步地,所述将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息的步骤,包括:
将所述句法信息邻接矩阵和所述上下文表示输入到人工神经网络进行计算,并依据所述人工神经网络计算的结果生成所述输出信息。
进一步地,所述依据所述上下文表示与所述输出信息预测所述上下文单词的类型的步骤,包括:
使用注意力机制优化所述输出信息生成优化结果;
将所述上下文表示与所述优化结果聚合生成聚合信息;
依据所述聚合信息预测所述上下文单词的类型。
进一步地,所述依据所述聚合信息预测所述上下文单词的类型的步骤,包括:
依据所述聚合信息确定所述上下文单词的最终表示;
按照预设的分类方式对所述上下文单词的最终表示进行预测,得出所述上下文单词的类型。
一种基于图扰动策略的事件检测装置,包括:
获取模块,用于获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;
生成模块,用于依据所述句法信息邻接矩阵生成句法图;
确定模块,用于依据所述拼接向量确定与所述上下文单词对应的上下文表示;
计算模块,用于将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行 卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;
分类模块,用于依据所述上下文表示与所述输出信息预测所述上下文单词的类型。
进一步地,所述获取模块,包括:
依存分析子模块,用于通过句法依存对所述给定句子进行分析,并依据所述给定句子的分析结果生成所述上下文单词对应的句法信息;
生成邻接矩阵子模块,用于依据所述句法信息生成所述句法信息邻接矩阵;
拼接子模块,用于依据所述上下文单词的词嵌入、实体嵌入、POS-tagging嵌入和位置嵌入生成所述拼接向量。
进一步地,所述计算模块,包括:
人工神经网络计算子模块,用于将所述句法信息邻接矩阵和所述上下文表示输入到人工神经网络进行计算,并依据所述人工神经网络计算的结果生成所述输出信息。
进一步地,所述分类模块,包括:
优化结果子模块,用于使用注意力机制优化所述输出信息生成优化结果;
聚合信息子模块,用于将所述上下文表示与所述优化结果聚合生成聚合信息;
预测类型子模块,用于依据所述聚合信息预测所述上下文单词的类型。
本申请具有以下优点:
在本申请的实施例中,通过获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;依据所述句法信息邻接矩阵生成句法图;依据所述拼接向量确定与所述上下文单词对应的上下文表示;将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度 对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;依据所述上下文表示与所述输出信息预测所述上下文单词的类型。本申请结合句子中不同单词之间句法关系各异的特点,充分考虑句子中不同单词的重要性,通过引入句法信息和两种图扰动策略来过滤句子中冗余信息,保留重要单词信息,并使用图修复操作减少句法信息的损失,可以有效解决事件检测过程中由于长句子中冗余信息过多所导致的分类效率低下的问题;同时,使用带有注意力门控机制的跳跃连接,增强不同阶句法信息的聚合,保留更多的原始特征,为触发词的识别和分类提供有效的单词表示,有效提高F
1值。
为了更清楚地说明本申请的技术方案,下面将对本申请的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例提供的一种基于图扰动策略的事件检测方法的步骤流程图;
图2是本申请一实施例提供的依存句法树的结构示意图;
图3是本申请一实施例提供的依存句法树对应的邻接矩阵的结构示意图;
图4是本申请一实施例提供的一种图扰动生成新的子图的结构示意图;
图5是本申请一实施例提供的一种基于节点密度对句法图进行扰动生成第一子图对应的领接矩阵的结构示意图;
图6是本申请一实施例提供的一种基于边的稀疏性对句法图进行扰动生成第二子图对应的领接矩阵的结构示意图;
图7是本申请一实施例提供的一种基于图扰动策略的事件检测方法的流程示意图;
图8是本申请一实施例提供的一种基于图扰动策略的事件检测装置的结 构框图。
为使本申请的所述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
参照图1,示出了本申请一实施例提供的一种基于图扰动策略的事件检测方法;
所述方法包括:
S110、获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;
S120、依据所述句法信息邻接矩阵生成句法图;
S130、依据所述拼接向量确定与所述上下文单词对应的上下文表示;
S140、将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;
S150、依据所述上下文表示与所述输出信息预测所述上下文单词的类型。
在本申请的实施例中,通过获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;依据所述句法信息邻接矩阵生成句法图;依据所述拼接向量确定与所述上下文单词对应的上下文表示;将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度 对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;依据所述上下文表示与所述输出信息预测所述上下文单词的类型。本申请结合句子中不同单词之间句法关系各异的特点,充分考虑句子中不同单词的重要性,通过引入句法信息和两种图扰动策略来过滤句子中冗余信息,保留重要单词信息,并使用图修复操作减少句法信息的损失,可以有效解决事件检测过程中由于长句子中冗余信息过多所导致的分类效率低下的问题;同时,使用带有注意力门控机制的跳跃连接,增强不同阶句法信息的聚合,保留更多的原始特征,为触发词的识别和分类提供有效的单词表示,有效提高F
1值。
下面,将对本示例性实施例中基于图扰动策略的事件检测方法作进一步地说明。
如所述步骤S110所述,获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量。
在本申请一实施例中,可以结合下列描述进一步说明步骤S110所述“获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量”的具体过程。
如下列步骤所述,通过句法依存对所述给定句子进行分析,并依据所述给定句子的分析结果生成所述上下文单词对应的句法信息。
需要说明的是,所述句法依存为通过分析语言单位内成分之间的依存关系揭示其句法结构,句法依存分析识别句子中的“主谓宾”以及“定状补”这些语法成分,并强调分析单词之间的关系。句法依存分析中句子的核心是谓语动词,然后再围绕谓语找出其他成分,最后将句子分析成一颗依存句法树,依存句法树可以描述出各个单词之间的依存关系。
在一具体实现中,获取给定句子信息,对给定句子信息进行识别,利用Stanford Core NLP(StandFordNatural Language Processing,斯坦福自然语言处理工具)进行句法依存分析,对给定句子中的每个单词进行分析,识别句子中单词与单词之间的相互依存关系,形成一颗依存句法树。其中,在依存 分析中,“依存”指词与词之间支配与被支配的关系,处于支配地位的成分称之为支配者,而处于被支配地位的成分称之为从属者。依存语法本身没有规定要对依存关系进行分类,但为了丰富依存结构传达的句法信息,在实际应用中,一般会给依存树的边加上不同的标记。
参照图2,示出了本申请一实施例提供的的依存句法树的结构示意图。如图所示,句子“他点头表示同意我们的意见”,在构建的依存句法树中,可以看到句子的核心谓词为“点头”,“点头”的主语是“他”,依存句法树可以描述出上下文单词之间的依存关系,句中的每个词都依存于一个其他的词,其中“他”依存于“点头”,依存关系为主谓关系(SBV);“表示”依存于“点头”,依存关系为并列关系(COO);“同意”依存于“表示”,依存关系为动宾关系(VOB);“的”依存于“我们”,依存关系为后附加关系(RAD);“我们”依存于“意见”,依存关系为定中关系(ATT);“意见”依存于“同意”,依存关系为动宾关系(VOB)。
如下列步骤所述,依据所述句法信息生成所述句法信息邻接矩阵;
需要说明的是,所述邻接矩阵是表示顶点之间相邻关系的矩阵。设G=(V,E)是一个图,其中V={v
1,v
2,…,v
n},V是顶点,E是边,用一个一维数组存放图中所有顶点数据,用一个二维数组存放顶点间关系(边或弧)的数据,这个二维数组称为邻接矩阵。邻接矩阵又分为有向图邻接矩阵和无向图邻接矩阵。G的邻接矩阵是一个具有下列性质的n阶方阵:对无向图而言,邻接矩阵一定是对称的,而且主对角线一定为零,副对角线不一定为0,有向图则不一定如此。在无向图中,任一顶点i的度为第i列(或第i行)所有非零元素的个数,在有向图中顶点i的出度为第i行所有非零元素的个数,而入度为第i列所有非零元素的个数,采用有向图的邻接矩阵存储两个事件参数之间的句法依存关系。
需要说明的是,每个句子通过句法依存分析形成依存句法树后,再依据依存句法树中词与词之间的依存关系来生成该句子对应的邻接矩阵。依存句法树中的单词分别对应邻接矩阵中的一个顶点,句法树中两个单词之间的依存关系就对应邻接矩阵中顶点之间的有向边。例如,依存句法树中“他”依 存于“点头”,因此邻接矩阵中“他”和“点头”对应的顶点之间存在一条有向边。
在一具体实现中,参照图3,示出了本申请一实施例提供的依存句法树对应的邻接矩阵的结构示意图。依存句法树中的核心谓词为“点头”,“他”为“点头”的主语,因而在对应的邻接矩阵中,“点头”所在行与“他”所在列值的交叉位置处,值为1。每个单词作为一个节点,“他”“点头”“表示”“同意”“我们”“的”“意见”为7个单词,所以为7X7的方阵。两个单词间存在句法弧则矩阵对应位置为1,否则为0。采用有向图的邻接矩阵进行存储文本的句法依存关系,若词语之间存在依存关系,则对应的邻接矩阵元素值为1,不存在依存关系的词语之间,对应的邻接矩阵元素为0。通过所述邻接矩阵可以表示所述上下文单词之间的依存关系。
如下列步骤所述,依据所述上下文单词的词嵌入、实体嵌入、POS-tagging嵌入和位置嵌入生成所述拼接向量。
需要说明的是,需要将句子中的词级信息转换成实值向量作为人工神经网络的输入。设X={x
1,x
2,x
3,□,x
n}是一个长度为n的句子,其中x
i是句子中的第i个词。在自然语言处理任务中,词的语义信息与其在句中的位置有关,词性和实体类型信息对触发词的识别和语义的理解有提升的作用。本申请将上下文单词的词嵌入、实体嵌入、POS-tagging(词性)嵌入和位置嵌入拼接成的拼接向量作为人工神经网络的输入。
在一具体实现中,将所述上下文单词的词嵌入、实体嵌入、POS-tagging(词性)嵌入和位置嵌入共4种不同的嵌入向量拼接成拼接向量,所述拼接向量可以获取上下文单词间的语义信息。
如所述步骤S120所述,依据所述句法信息邻接矩阵生成句法图。
需要说明的是,通过依存句法树可以获得词与词之间的依存关系,根据依存句法树对应的邻接矩阵中的相关信息生成对应的句法图,一个邻接矩阵就代表着一个句法图,依存句法树中的单词分别对应句法图中的一个图节点,依存句法树中两个单词之间的依存关系就对应句法图中节点之间的有向边。
如所述步骤S130所述,依据所述拼接向量确定与所述上下文单词对应的上下文表示。
在一具体实现中,将拼接向量输入到输入模块Bi-LSTM神经网络层生成上下文单词对应的上下文表示,所述上下文表示作为人工神经网络的输入向量之一。
需要说明的是,在输入模块的计算公式为:令BiLSTM层的输出为H=[h
1,h
2,...,h
n]
T,h
i代表第i个单词的上下文表示,n代表该句子中单词的个数。令该句子对应的邻接矩阵为A,那么图卷积网络的计算公式是:
H′=ReLU(AHW+b)
式中W是权重矩阵,b是偏置项,H称为特征矩阵,ReLU是ReLU激活函数,H'是图卷积网络的输出结果,是一个新的特征矩阵。
如所述步骤S140所述,将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息。
需要说明的是,所述人工神经网络为图卷积网络(Graph Convolutional Network)。在事件检测领域,句法图是基于图卷积网络方法的基础。图卷积网络在句法图上卷积来传递不同节点的信息,实现信息的聚合,因此句法图的结构影响着信息的流动和聚合。传统的基于图卷积网络的事件检测方法没有考虑到长句子中冗余信息过多的特点,往往使用原始的句法图,没有对句法图的结构进行扰动,以致于在进行触发词识别和分类时的效率和性能较低。然而,在传统的基于图卷积网络模型的基础上,使用了两种图扰动策略,分别从节点密度和边的稀疏性上扰动句法图,从而实现保留重要节点信息并增强句子语义的目的,可以很好地解决传统的图卷积网络的缺陷。
在本申请一实施例中,可以结合下列描述进一步说明步骤S140所述“将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信 息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点”的具体过程。
如下列步骤所述,将所述句法信息邻接矩阵和所述上下文表示输入到人工神经网络进行计算,并依据所述人工神经网络计算的结果生成所述输出信息。
具体地,将所述句法信息邻接矩阵和所述上下文表示输入到对称图卷积网络,逐步通过多个图卷积网络层和图扰动层,在图卷积网络层传播句法图上的信息,图卷积网络层是浅层图卷积网络,输出低阶句法信息。在图扰动层生成新的句法图,保留重要节点的信息;将最后一个在图扰动层基于节点密度或边的稀疏性扰动处理获得的输出信息输入第四个图卷积网络层(如图7对称图卷积网络模块正中间的GCN),在第四个图卷积网络层传播节点信息。再将在第四个图卷积网络层获得的输出结果逐步通过多个图修复层和图卷积网络层,在图修复层将图扰动生成的子图替换成原始句法图,经过图修复层处理后的图卷积网络层是深层图卷积网络,输出高阶句法信息。在图修复时使用原始句法图防止图扰动过程中丢失过多的句法信息;在对称图卷积网络堆叠设置多个GCN,同时利用低阶和高阶句法信息。在浅层GCN中获取低阶句法信息,在深层GCN中获取高阶句法信息。
需要说明的是,图卷积的过程可以理解为以下步骤:对节点的特征信息进行抽取变换,发射每一个节点将自身的特征信息经过变换后发送给邻居节点;对节点的局部结构信息进行融合,接收每个节点,对邻居节点的特征信息进行聚集;对前面的信息聚集之后进行非线性变换,增加模型的表达能力。任何一个图卷积层都可以写成一个非线性函数:H
l+1=f(H
l,A),其中,H
0=X为第一层的输入,X∈R
N*D,N为图的节点个数,D为每个节点特征向量的维度,A为邻接矩阵,不同模型的差异点在于函数f的实现不同。
如下列步骤所述,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点。
参照图4,示出了本申请一实施例提供的一种图扰动生成新的子图的结 构示意图。基于节点密度对句法图进行扰动就是在原始句法图的基础上,保留固定比例的重要节点,从而生成新的句法图,被丢弃的图节点的相邻边也被删除;从边的稀疏性上扰动句法图就是随机删除原始句法图中固定比例的边,从而生成新的句法图,句法图中的节点不会被删除,这种类似于Dropout的数据增强技术还可以增加输入数据的随机性和多样性。
需要说明的是,基于节点密度扰动句法图和基于边的稀疏性上扰动句法图是两种不同的图扰动策略,这两种策略是分开执行的。在其它部分不变的情况下,对称图卷积网络模块中的图扰动部分要么全部使用从节点密度扰动句法图的策略,要么全部使用从边稀疏性扰动句法图的策略。
在一具体实现中,参照图5,示出了本申请一实施例提供的一种基于节点密度对句法图进行扰动生成第一子图对应的领接矩阵的结构示意图。基于节点密度对句法图进行扰动就是使用一种图池化操作,从原始的句法图中选择若干个重要的节点生成新的句法图。一个邻接矩阵就代表一个句法图,因此句法图结构的扰动也就表现为邻接矩阵的变化。例如,基于节点密度对句法图进行扰动时,不重要的单词节点“表示”被丢弃,与它相邻的边也会被删除,句法图的结构也就发生变化,从而生成第一子图以及对应的领接矩阵,并对第一子图进行卷积提取重要节点信息。
需要说明的是,基于节点密度扰动句法图就是训练一个投影向量p,根据p将H'投影到y,y中存放着每个节点的重要性得分。接着对节点的重要性得分进行降序排序,选择前k个重要性得分最高的节点,记住这些节点的位置idx。然后根据idx从y中选择k个节点的重要性得分,存放在
中。根据idx从H'中选择k个节点,存放在
它是一个过渡的特征矩阵。根据idx从邻接矩阵A中选择k个节点,存放在A'中,A'是新的邻接矩阵。最后,将
y=sigmoid(H′p/||p||)
idx=rank(y,k)
A′=select(A,idx)
式中,sigmoid是激活函数,rank表示从y中选择k个节点,select表示根据idx从原始矩阵中生成一个新的矩阵,⊙表示点乘。
在一具体实现中,参照图6,示出了本申请一实施例提供的一种基于边的稀疏性对句法图进行扰动生成第二子图对应的领接矩阵的结构示意图。基于边的稀疏性对句法图进行扰动就是随机删除句法图中固定比例的边来生成新的句法图。例如,基于边的稀疏性对句法图进行扰动时,“点头”和“表示”以及“我们”和“的”之间的有向边被随机删除,导致句法图的结构发生变化,从而生成第二子图以及对应的领接矩阵,并对第二子图进行修复过滤无关节点。
需要说明的是,基于边稀疏性扰动句法图就是根据删边比例q,随机删除邻接矩阵A中的边。公式如下:
A′=delete(A,q)
式中,A是句子的原始邻接矩阵,q是删边比例,delete表示从A中随机删除比例为q的边数,A'是新生成的邻接矩阵。从边稀疏性上扰动句法图时,不会改变特征矩阵H。
如所述步骤S150所述,依据所述上下文表示与所述输出信息预测所述上下文单词的类型。
在本申请一实施例中,可以结合下列描述进一步说明步骤S150所述“依据所述上下文表示与所述输出信息预测所述上下文单词的类型”的具体过程。
如下列步骤所述,使用注意力机制优化所述输出信息生成优化结果;将所述上下文表示与所述优化结果聚合生成聚合信息;依据所述聚合信息预测所述上下文单词的类型。
在一具体实现中,在每一层的图卷积网络中对图中的节点信息进行传播,通过带有注意力门控机制的跳跃连接模块(Skip-Connection)来实现低 阶和高阶句法信息的聚合,将所述上下文表示通过跳跃连接模块跳过每一层的图卷积网络,并与所述输出信息的优化结果进行聚合操作。通过带有注意力门控机制的跳跃连接模块可以防止短距离的句法信息的过度传播,增强不同阶句法信息的聚合,可以保留更多的原始句法信息,为触发词的识别和分类提供了有效的单词表示,避免出现最终的触发词分类效果不佳的情况。
具体地,将图卷积网络模块输出的低阶句法信息和高阶句法信息通过注意力门控机制,分别经过两个线性层,对线性层的结果进行相加,得到的相加的结果经过一个ReLU激活函数,再经过一个线性层和一个sigmoid激活函数后,得到注意力系数,将注意力系数与低阶句法信息进行点乘,得到注意力门控机制的输出信息,也是优化后的低阶句法信息;将注意力门控机制的输出信息与高阶句法信息进行相加,从而实现低阶和高阶句法信息的聚合。防止单词的上下文信息在对称图卷积网络中丢失,将所述上下文表示通过跳跃连接模块跳过每一层的图卷积网络,并与通过注意力门控机制优化所述输出信息的优化结果进行聚合操作,获得所述上下文单词的最终表示。
通过softmax将注意力系数进行归一化操作,计算公式表示如下:
式中,||表示向量拼接,e
ij和α
ij都叫做"注意力系数",α
ij是在e
ij基础上进行归一化后的。
在所有节点的注意力系数归一化后,对相邻节点的特征进行加权求和,得到注意力门控机制的输出信息,计算公式表示如下:
式中,W为与特征相乘的权重矩阵,σ为非线性激活函数,j∈N
i中遍历的j表示所有与i相邻的节点。
在本申请一实施例中,可以结合下列描述进一步说明步骤所述“依据所述聚合信息预测所述上下文单词的类型”的具体过程。
如下列步骤所述,依据所述聚合信息确定所述上下文单词的最终表示;按照预设的分类方式对所述上下文单词的最终表示进行预测,得出所述上下文单词的类型。
在一具体实现中,依据所述聚合信息确定所述上下文单词的最终表示;按照预设的分类方式对所述上下文单词的最终表示进行预测,得出所述上下文单词的类型,依据每个上下文单词的表示中概率最大的标签,确定给定句子中每个单词的类型。所述单词类型为预先定义好的不同种类。
具体地,分类模块的预设条件为聚合不同模块的信息,聚合信息经过一个全连接层,再通过softmax函数(softmax函数将多个神经元的输出,映射到(0,1)区间内,可以看成概率来理解,从而进行多分类)得到所述上下文单词的最终表示,选择每个上下文单词对应的类别概率中最大的那个类别作为当前每个上下文单词的表示预测的标签。
实施例1
本申请具体实施例中一种基于图扰动策略的事件检测方法:
实验环境:Pytorch-1.8.0(开源的Python机器学习库),Nvidia GeForce RTX 2080(显卡芯片),Ubuntu 16.04(计算机Linux操作系统),内存8G,硬盘512G。
基于图扰动策略的事件检测方法与其他方法的对比实验结果如表1所示:
表1
实验结果:实验以精度(Precision,P),召回率(Recall,R),F
1值(F
1-score)作为观察变量,P、R、F
1的定义式如下所示:
其中,Cross Event、Cross Entity、Max Entropy是三种基于特征的方法,DMCNN、JRNN、dbRNN是三种基于序列的方法,GCN-ED、JMEE、MOGANED、EE-GCN是四种基于图神经网络的方法。此方法(节点密度)表示本方法基于节点密度扰动句法图,此方法(边稀疏性)表示本方法基于边的稀疏性扰动句法图。
为了保证实验的准确度,本实验中数据集的划分与其他事件检测方法的数据集的划分保持一致,实验结果证明通过本实施例提出的事件检测方法相较于其他事件检测方法,本实施例提出的事件检测方法在F
1-score上取得了最高值;与基于序列的方法相比,本实施例提出的基于节点密度扰动句法图 的事件检测方法,F
1-score提高了6%;与基于图神经网络的方法相比,本实施例提出的基于节点密度扰动句法图的事件检测方法在F
1-score上取得了最高值。
参照图7,示出了一种基于图扰动策略的事件检测方法的流程示意图;
在一具体实现中,在获取给定句子信息后,通过句法分析技术对所述事件文本信息进行分析并生成句法依存树,再依据所述句法依存树生成所述上下文单词对应的邻接矩阵,根据依存句法树对应的邻接矩阵中的相关信息生成对应的句法图;将所述上下文单词的词嵌入、实体嵌入、POS-tagging嵌入和位置嵌入生成拼接向量,并将拼接向量输入到Bi-LSTM神经网络层生成所述上下文单词对应的上下文表示,将所述邻接矩阵和所述上下文表示输入人工神经网络中,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,生成输出信息,来对不同深度的句法信息做聚合操作;将所述上下文表示再通过跳跃连接模块跳过多层图卷积网络来做聚合操作;将所述输出信息的优化结果与所述上下文表示进行聚合,通过分类模块预测所述上下文单词的类型,确定给定句子对应的类型。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
参照图8,示出了本申请一实施例提供的一种基于图扰动策略的事件检测装置;
具体包括:
获取模块810,用于获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;
生成模块820,用于依据所述句法信息邻接矩阵生成句法图;
确定模块830,用于依据所述拼接向量确定与所述上下文单词对应的上下文表示;
计算模块840,用于将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层 生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;
分类模块850,用于依据所述上下文表示与所述输出信息预测所述上下文单词的类型。
在本申请一实施例中,所述获取模块810,包括:
依存分析子模块,用于通过句法依存对所述给定句子进行分析,并依据所述给定句子的分析结果生成所述上下文单词对应的句法信息;
生成邻接矩阵子模块,用于依据所述句法信息生成所述句法信息邻接矩阵;
拼接子模块,用于依据所述上下文单词的词嵌入、实体嵌入、POS-tagging嵌入和位置嵌入生成所述拼接向量。
在本申请一实施例中,所述确定模块830,包括:
生成上下文表示子模块,用于将所述拼接向量通过输入模块BiLSTM层生成与所述上下文单词对应的上下文表示。
在本申请一实施例中,所述计算模块840,包括:
人工神经网络计算子模块,用于将所述句法信息邻接矩阵和所述上下文表示输入到人工神经网络进行计算,并依据所述人工神经网络计算的结果生成所述输出信息。
在本申请一实施例中,所述分类模块850,包括:
优化结果子模块,用于使用注意力机制优化所述输出信息生成优化结果;
聚合信息子模块,用于将所述上下文表示与所述优化结果聚合生成聚合信息;
预测类型子模块,用于依据所述聚合信息预测所述上下文单词的类型。
在本申请一实施例中,所述预测类型子模块,包括:
确定最终表示子模块,用于依据所述聚合信息确定所述上下文单词的最 终表示;
预测上下文单词类型子模块,用于按照预设的分类方式对所述上下文单词的最终表示进行预测,得出所述上下文单词的类型。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种基于图扰动策略的事件检测方法及装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (10)
- 一种基于图扰动策略的事件检测方法,其特征在于,包括步骤:获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;依据所述句法信息邻接矩阵生成句法图;依据所述拼接向量确定与所述上下文单词对应的上下文表示;将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;依据所述上下文表示与所述输出信息预测所述上下文单词的类型。
- 根据权利要求1所述的基于图扰动策略的事件检测方法,其特征在于,所述获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量的步骤,包括:通过句法依存对所述给定句子进行分析,并依据所述给定句子的分析结果生成所述上下文单词对应的句法信息;依据所述句法信息生成所述句法信息邻接矩阵;依据所述上下文单词的词嵌入、实体嵌入、POS-tagging嵌入和位置嵌入生成所述拼接向量。
- 根据权利要求1所述的基于图扰动策略的事件检测方法,其特征在于,所述依据所述拼接向量确定与所述上下文单词对应的上下文表示的步骤,包括:将所述拼接向量通过输入模块BiLSTM层生成与所述上下文单词对应的上下文表示。
- 根据权利要求1所述的基于图扰动策略的事件检测方法,其特征在于,所述将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子 图,提取重要节点信息和过滤无关节点,获取输出信息的步骤,包括:将所述句法信息邻接矩阵和所述上下文表示输入到人工神经网络进行计算,并依据所述人工神经网络计算的结果生成所述输出信息。
- 根据权利要求1所述的基于图扰动策略的事件检测方法,其特征在于,所述依据所述上下文表示与所述输出信息预测所述上下文单词的类型的步骤,包括:使用注意力机制优化所述输出信息生成优化结果;将所述上下文表示与所述优化结果聚合生成聚合信息;依据所述聚合信息预测所述上下文单词的类型。
- 根据权利要求5所述的基于图扰动策略的事件检测方法,其特征在于,所述依据所述聚合信息预测所述上下文单词的类型的步骤,包括:依据所述聚合信息确定所述上下文单词的最终表示;按照预设的分类方式对所述上下文单词的最终表示进行预测,得出所述上下文单词的类型。
- 一种基于图扰动策略的事件检测装置,其特征在于,包括:获取模块,用于获取给定句子中的上下文单词,生成与所述上下文单词对应的句法信息邻接矩阵和拼接向量;生成模块,用于依据所述句法信息邻接矩阵生成句法图;确定模块,用于依据所述拼接向量确定与所述上下文单词对应的上下文表示;计算模块,用于将所述句法信息邻接矩阵和所述上下文表示作为人工神经网络的输入,通过图卷积网络层在句法图上传播信息,通过图扰动层生成新的句法子图,提取重要节点信息和过滤无关节点,获取输出信息;具体地,基于节点密度对所述句法图进行扰动生成第一子图,并对所述第一子图进行卷积提取重要节点信息;基于边的稀疏性对所述句法图进行扰动生成第二子图,并对所述第二子图进行修复过滤无关节点;分类模块,用于依据所述上下文表示与所述输出信息预测所述上下文单 词的类型。
- 根据权利要求7所述的基于图扰动策略的事件检测装置,其特征在于,所述获取模块,包括:依存分析子模块,用于通过句法依存对所述给定句子进行分析,并依据所述给定句子的分析结果生成所述上下文单词对应的句法信息;生成邻接矩阵子模块,用于依据所述句法信息生成所述句法信息邻接矩阵;拼接子模块,用于依据所述上下文单词的词嵌入、实体嵌入、POS-tagging嵌入和位置嵌入生成所述拼接向量。
- 根据权利要求7所述的基于图扰动策略的事件检测装置,其特征在于,所述计算模块,包括:人工神经网络计算子模块,用于将所述句法信息邻接矩阵和所述上下文表示输入到人工神经网络进行计算,并依据所述人工神经网络计算的结果生成所述输出信息。
- 根据权利要求7所述的基于图扰动策略的事件检测装置,其特征在于,所述分类模块,包括:优化结果子模块,用于使用注意力机制优化所述输出信息生成优化结果;聚合信息子模块,用于将所述上下文表示与所述优化结果聚合生成聚合信息;预测类型子模块,用于依据所述聚合信息预测所述上下文单词的类型。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111295587.XA CN113988052A (zh) | 2021-11-03 | 2021-11-03 | 一种基于图扰动策略的事件检测方法及装置 |
CN202111295587.X | 2021-11-03 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023077562A1 true WO2023077562A1 (zh) | 2023-05-11 |
Family
ID=79746224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/131285 WO2023077562A1 (zh) | 2021-11-03 | 2021-11-17 | 一种基于图扰动策略的事件检测方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113988052A (zh) |
WO (1) | WO2023077562A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117648980A (zh) * | 2024-01-29 | 2024-03-05 | 数据空间研究院 | 基于矛盾纠纷数据的新型实体关系联合抽取算法 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111259142A (zh) * | 2020-01-14 | 2020-06-09 | 华南师范大学 | 基于注意力编码和图卷积网络的特定目标情感分类方法 |
CN111985245A (zh) * | 2020-08-21 | 2020-11-24 | 江南大学 | 基于注意力循环门控图卷积网络的关系提取方法及系统 |
CN113361258A (zh) * | 2021-05-17 | 2021-09-07 | 山东师范大学 | 基于图卷积网络和选择注意力的方面级情感分析方法及系统 |
US20210287102A1 (en) * | 2020-03-10 | 2021-09-16 | International Business Machines Corporation | Interpretable knowledge contextualization by re-weighting knowledge graphs |
-
2021
- 2021-11-03 CN CN202111295587.XA patent/CN113988052A/zh active Pending
- 2021-11-17 WO PCT/CN2021/131285 patent/WO2023077562A1/zh unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111259142A (zh) * | 2020-01-14 | 2020-06-09 | 华南师范大学 | 基于注意力编码和图卷积网络的特定目标情感分类方法 |
US20210287102A1 (en) * | 2020-03-10 | 2021-09-16 | International Business Machines Corporation | Interpretable knowledge contextualization by re-weighting knowledge graphs |
CN111985245A (zh) * | 2020-08-21 | 2020-11-24 | 江南大学 | 基于注意力循环门控图卷积网络的关系提取方法及系统 |
CN113361258A (zh) * | 2021-05-17 | 2021-09-07 | 山东师范大学 | 基于图卷积网络和选择注意力的方面级情感分析方法及系统 |
Non-Patent Citations (1)
Title |
---|
FAN, TAO ET AL.: "Sentiment Analysis of Online Users' Negative Emotions Based on Graph Convolutional Network and Dependency Parsing", DATA ANALYSIS AND KNOWLEDGE DISCOVERY, vol. 5, no. 9, 25 September 2021 (2021-09-25), XP009546037, ISSN: 2096-3467 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117648980A (zh) * | 2024-01-29 | 2024-03-05 | 数据空间研究院 | 基于矛盾纠纷数据的新型实体关系联合抽取算法 |
CN117648980B (zh) * | 2024-01-29 | 2024-04-12 | 数据空间研究院 | 基于矛盾纠纷数据的新型实体关系联合抽取方法 |
Also Published As
Publication number | Publication date |
---|---|
CN113988052A (zh) | 2022-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112528672B (zh) | 一种基于图卷积神经网络的方面级情感分析方法及装置 | |
CN111401077B (zh) | 语言模型的处理方法、装置和计算机设备 | |
Snyder et al. | Interactive learning for identifying relevant tweets to support real-time situational awareness | |
EP4009219A1 (en) | Analysis of natural language text in document using hierarchical graph | |
CN107688870B (zh) | 一种基于文本流输入的深度神经网络的分层因素可视化分析方法及装置 | |
CN102123172B (zh) | 一种基于神经网络聚类优化的Web服务发现的实现方法 | |
Kaur | Incorporating sentimental analysis into development of a hybrid classification model: A comprehensive study | |
WO2023050470A1 (zh) | 一种基于多层图注意力网络的事件检测方法及装置 | |
CN113361258A (zh) | 基于图卷积网络和选择注意力的方面级情感分析方法及系统 | |
Zhang et al. | SKG-Learning: A deep learning model for sentiment knowledge graph construction in social networks | |
WO2023077562A1 (zh) | 一种基于图扰动策略的事件检测方法及装置 | |
CN114742071A (zh) | 基于图神经网络的汉越跨语言观点对象识别分析方法 | |
CN113239143B (zh) | 融合电网故障案例库的输变电设备故障处理方法及系统 | |
CN117688185A (zh) | 一种用户信息增强的长文本细粒度情感分析方法 | |
WO2023246849A1 (zh) | 回馈数据图谱生成方法及冰箱 | |
CN113743079A (zh) | 一种基于共现实体交互图的文本相似度计算方法及装置 | |
CN114997155A (zh) | 一种基于表格检索和实体图推理的事实验证方法与装置 | |
CN114595324A (zh) | 电网业务数据分域的方法、装置、终端和非暂时性存储介质 | |
Patil et al. | SQL ChatBot–using Context Free Grammar | |
Peters | Bringing Visibility to Workflow Processes via Topic Modeling with BERT Transformer Models | |
Xu et al. | Low-Voltage Electrical Product Quality Problem-Solving Based on Improved Deep Structured Semantic Model | |
Baqer et al. | Ingénierie des Systèmes d’Information | |
Yang et al. | Sentiment Analysis of online reviews based on LDA and AP-Bert model | |
Chen et al. | Natural Language | |
Kausar et al. | Emotion Detection Using Sentiment Analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21963070 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |