Event prediction method fusing dynamic time information

Through the combination of GAT model and multi-head attention mechanism with LSTM, event semantic information and dynamic time information are fused, which solves the problem of incomplete time information extraction in event prediction in the existing technology and achieves more accurate event prediction effects.

CN118761545APending Publication Date: 2024-10-11JIANGSU OCEAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410778556.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing event prediction methods are difficult to effectively utilize the dynamic time information of historical events, resulting in a lack of interpretability and insufficient performance in prediction results. Traditional methods ignore data changes between short-time slices and cannot reflect information about the evolution of events over time.

Method used

The GAT model is used to obtain event semantic information, combined with the multi-head attention mechanism and LSTM model, to integrate dynamic time information, and output the probability of whether an event occurs through a linear layer, making reasonable use of event semantic information and dynamic time features.

Benefits of technology

It improves the interpretability and performance of event prediction, can better capture the characteristics of events changing over time, is suitable for event prediction tasks, and has shown better prediction results on multiple data sets through experimental verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761545A_ABST
    Figure CN118761545A_ABST
Patent Text Reader

Abstract

The invention discloses an event prediction method fusing dynamic time information, and relates to the technical field of event prediction. The method comprises the following steps: inputting an event graph subjected to node coding by utilizing word2vec into a GAT model to obtain event characteristics of each time point, and obtaining event semantic information; and forming a time sequence by using the obtained features of each time point, and inputting the time sequence into a multi-head attention mechanism and an LSTM (Long Short Term Memory) to obtain dynamic time features. According to the method, semantic information and dynamic time information of an event are comprehensively considered, after the semantic information of the event is obtained by utilizing a GAT model, the dynamic time information is obtained by utilizing a multi-head attention mechanism and an LSTM, the event information at the last moment is input into a final GAT model, and after the output of the GAT passes through a linear layer, the probability that whether a final emergency occurs or not is output. The related theory that event semantic information is obtained by more reasonably utilizing a GAT model and dynamic time information is obtained by combining a multi-head attention mechanism with LSTM is more suitable for the field of event prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for predicting sudden events, and in particular to a method for predicting sudden events integrating dynamic time information. Background Art

[0002] In recent years, researchers have conducted a lot of research on event prediction technology, accumulated rich event prediction methods, and produced a large number of excellent academic achievements. With the development of a large number of data processing technologies, some event information collection systems have provided a good prerequisite for the development of current event prediction technology. However, effective and accurate event prediction in the context of big data is still a huge challenge. It is necessary to predict the occurrence of subsequent events based on historical event characteristics and combined with necessary time information.

[0003] When predicting events, there are still many challenges in learning the features of historical events and their temporal features. Traditional machine learning and deep learning methods are often complex black box models that are difficult to explain the prediction results and lack end-to-end interpretability. Manual feature engineering requires expertise and a lot of time, and the noise and errors of the labeled data may have a negative impact on the model. The event graph method extracts and analyzes event texts with logical relationships to generate a graph data structure representation containing semantic information and event information, but fails to construct event features that change over time. Prediction models that incorporate temporal features into event prediction usually use global features, ignoring the impact of data changes between short time slices on events and failing to reflect the evolution of events over time. On the basis of using event text to construct an event graph, extracting more effective information from the temporal information of historical events before conducting deep learning training can improve the interpretability and prediction performance of the prediction results.

[0004] In the 2019 conference proceedings published in the United States: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, titled Learning Dynamic Context Graphs for Predicting Social Events, the paper proposed extracting and learning graph representations from historical event documents. By using hidden word graph features, the proposed DynamicGCN model predicts the occurrence of future events.

[0005] In the 2020 IEEE Fifth International Conference on Data Science in Cyberspace, the title is: Contextual Gated Graph Convolutional Networks for Social Unrest Events Prediction. The paper proposes a contextual gated graph convolutional network, which constructs historical events into event graphs based on time. The context gating layer can increase the weight of meaningful words in event prediction, suppress weaker words, and relearn keyword representations to obtain the contextual semantic features of unrest events for event prediction.

[0006] In the conference proceedings published in the United States in 2023: 2023IEEE International Conference on Intelligence and Security Informatics, titled: A Continual Learning Framework for Event Prediction with Temporal Knowledge Graphs, this paper proposes a new collaborative holistic relational event prediction method that introduces a new historical representation to deal with the problems caused by the variability of information length. The temporal knowledge graph prediction task is regarded as a continuous learning problem. When new data is added, when the real-world knowledge graph is constantly evolving, it is impossible to train a new model from scratch.

[0007] Research based on the temporal characteristics of events has made many innovations in the field of event prediction. Most prediction models that incorporate temporal characteristics into event prediction usually use global features, ignoring the impact of data changes between short time slices on events and failing to reflect the evolution of events over time. Summary of the invention

[0008] In view of the problems and shortcomings of the prior art mentioned above, the problem to be solved by the present invention is to provide an event prediction method that integrates dynamic time information. The method comprehensively considers the semantic information and dynamic time information of the event. After obtaining the event semantic information using the GAT model, the dynamic time information is obtained using the multi-head attention mechanism and LSTM. The event information at the last moment is input into the final GAT model. The output of GAT passes through the linear layer to output the probability of whether the final emergency event will occur. The GAT model is more reasonably used to obtain event semantic information and the multi-head attention mechanism is combined with LSTM to obtain dynamic time information. The related theory is more suitable for the field of event prediction.

[0009] In order to solve the above problems, the present invention adopts the following technical solutions:

[0010] The present invention is an event prediction method integrating dynamic time information, which is characterized in that the specific steps are as follows:

[0011] A. Use word2vec to encode the event graph and input it into the GAT model to obtain the event features at each time point and the event semantic information;

[0012] B. Use the features of each time point to construct a time series and input it into the multi-head attention mechanism and LSTM to obtain dynamic time features.

[0013] The method of the present invention constructs the event text of historical time into an event graph, wherein the nodes are keywords in the event description, and the edges are the co-occurrence relationships between the keywords. The event graph after node encoding by word2vec is input into a GAT model to obtain the event features of each time point, and obtain the event semantic information; the dynamic information of the event of historical time is obtained by using a time encoding layer, that is, dynamic time information, that is, the original node features of the event graph and the node features output by GAT are respectively input into a linear layer, and then the time features are obtained through a relu function, and the time feature sequences of each time point obtained are input into a multi-attention mechanism and an LSTM to obtain the dynamic time features.

[0014] The event prediction method integrating dynamic time information described above in the present invention is characterized in that the specific steps of step (A) are as follows:

[0015] A1. The original node vector is obtained by word2vec. For the event graph at each time point, the GAT model is used to obtain the event semantic information. First, a shared linear transformation parameterized by the weight matrix W is applied to each node, and then a self-attention mechanism is performed on the node. The initial vectors of nodes i and j are h i and h j , calculate the attention coefficient e of node j’s importance to node i ij :

[0016]

[0017] A2. When calculating the attention coefficient above, the structural information of the graph is not included. The masked attention mechanism is used to add the graph structure features to the node features and only calculate the e of node j∈Ni. ij , where Ni is a neighborhood of node i in the graph. To make the coefficients easy to compare between different nodes, all choices of j are normalized using the softmax function to obtain α ij :

[0018]

[0019] A3. The attention mechanism used is a single-layer feedforward neural network consisting of a weight vector Parameterize (where F is the dimension of the node feature) and apply the LeakyReLU activation function to fully expand the process of calculating the attention coefficient. The coefficient calculated by the attention mechanism can be expressed as α ij :

[0020]

[0021] A4. The normalized attention coefficients are used to calculate the linear combination of the features corresponding to them as the final output features of each node. A nonlinear function sigmoid is applied after the hidden features to obtain the node features.

[0022]

[0023] A5. h attention mechanisms are used at the same time, and the output is h separate outputs connected to obtain the node feature:

[0024]

[0025] A6. Finally, the event semantic information obtained by GAT is the node feature

[0026] The event prediction method integrating dynamic time information described above in the present invention is characterized in that the time series formed by utilizing the features of each time point obtained in step (B) is input into the multi-head attention mechanism and LSTM to obtain dynamic time features, and the probability of whether the event occurs is predicted by the probability distribution function, and the specific steps are as follows:

[0027] B1. Combining GAT encoding features and initial word embedding features, a learnable linear transformation is applied to each feature to obtain H p and H EThen the two transformed features are connected and the result is passed to a relu function to obtain the temporal feature TE T :

[0028]

[0029] B2. Add the time feature sequence generated at each time point to the multi-head attention mechanism. The multi-head attention mechanism can simultaneously focus on the relationship between different time nodes and capture the local and global relationships in the time series:

[0030] T v =(TE T-k ,TE T-k+1 ,...TE T-1 ,TE T ) (7);

[0031] T v '=MultiHeadW 0 =(TE' T-k ,TE' T-k+1 ,...TE' T-1 ,TE' T ) (8);

[0032] B3. Input the time features after the multi-head attention mechanism into LSTM to obtain the relationship between different time features before and after, and obtain the feature H at the last moment. T :

[0033] I T =σ(W ii TE' T +b ii +W hi h (T-1) +b hi ) (9);

[0034] F T =σ(W if TE' T +b if +W hf h (T-1) +b hf ) (10);

[0035] G T =tanh(W ig TE' T +b ig +W hg h (T-1) +b hg ) (11);

[0036] O T =σ(Wio TE' T +b io +W ho h (T-1) +b ho ) (12);

[0037] C T =F T *C (T-1) +i T *G T (13);

[0038] H T =O T *tanh(C T ) (14);

[0039] B4, H T Input into the GAT at the last moment, and convert the output g of the GAT at the last moment T Input into the nonlinear conversion layer and output the final prediction result output:

[0040]

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] The event prediction method integrating dynamic time information of the present invention aims at the problem of event prediction in the continuous time domain that the extraction of historical event time information is incomplete and the global and local time information of historical events cannot be well utilized. A method of adding dynamic time information to event semantic information is proposed, and a graph attention network is combined with a time series model. In the historical event information extraction stage, the information on the evolution of events over time is better integrated. Through the time series model, the problem of time information extraction is effectively solved, and the characteristics of events changing over time are more reasonably utilized, which is more suitable for event prediction tasks.

[0043] The present invention comprehensively considers the existing dynamic graph convolution model, makes improvements in the extraction of temporal information, combines the graph attention network with the process of the time series model, and establishes a method for Donghe dynamic temporal information. After the event semantic information is extracted, the temporal information is passed through the attention mechanism and the LSTM model, and the further analyzed temporal information is put into the event information for application.

[0044] The method of the present invention compares multiple event prediction models on certain event data sets in four countries, uses ACC, F1, Prec and Rec as evaluation indicators, and compares two prediction models without time features and eight models with time features. The results show that the proposed method has better performance in event prediction of time-based dynamic graph convolutional model. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flow chart of the event prediction method integrating dynamic time information of the present invention;

[0046] Figure 2 yes Figure 1 The flowchart of obtaining event semantic information described in step 101;

[0047] Figure 3 yes Figure 1 The flowchart of obtaining dynamic time information described in step 102;

[0048] Figure 4 It is the result of comparing the event prediction method of the present invention integrating dynamic time information with the model without adding time features;

[0049] Figure 5 It is the comparison result of the event prediction method integrating dynamic time information of the present invention and the model adding time features.

[0050] Figure 6 This is an ablation experiment of the event prediction method integrating dynamic time information of the present invention, in order to verify the effectiveness of each module. DETAILED DESCRIPTION

[0051] The implementation process of the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0052] Reference Figure 1 The event prediction method integrating dynamic time information of the present invention comprises the following steps:

[0053] Step 101: Use word2vec to encode the event graph and input it into the GAT model to obtain the event features at each time point and obtain the event semantic information. Figure 2 , the specific steps are as follows:

[0054] Step 201: The original node vector is obtained by word2vec. For the event graph at each time point, the GAT model is used to obtain the event semantic information. First, a shared linear transformation parameterized by the weight matrix W is applied to each node, and then a self-attention mechanism is performed on the node. The initial vectors of nodes i and j are h i and h j, calculate the attention coefficient e of node j’s importance to node i ij As shown in formula (1):

[0055]

[0056] Step 202: When calculating the attention coefficient above, the structural information of the graph is not added. The masked attention mechanism is used to add the graph structural features to the node features and only calculate the e of node j∈Ni. ij , where Ni is a neighborhood of node i in the graph. To make the coefficients easy to compare between different nodes, all choices of j are normalized using the softmax function to obtain α ij As shown in formula (2):

[0057]

[0058] Step 203: The attention mechanism used is a single-layer feedforward neural network consisting of a weight vector Parameterize (where F is the dimension of the node feature) and apply the LeakyReLU activation function to fully expand the process of calculating the attention coefficient. The coefficient calculated by the attention mechanism can be expressed as α ij As shown in formula (3):

[0059]

[0060] Step 204: The normalized attention coefficients are used to calculate the linear combination of the features corresponding to them as the final output features of each node. A nonlinear function sigmoid is applied after the hidden features to obtain the node features. As shown in formula (4):

[0061]

[0062] Step 205: h attention mechanisms are used at the same time, and the output is h separate outputs connected to obtain the node feature As shown in formula (5):

[0063]

[0064] Step 206: Finally, the event semantic information obtained by GAT is the node feature

[0065] Step 102: Use the features of each time point to form a time series and input it into the multi-head attention mechanism and LSTM to obtain dynamic time features. Figure 3 , the specific steps are as follows:

[0066] Step 301: Combine the GAT encoding features and the initial word embedding features, and use a learnable linear transformation on each feature to obtain H p and H E Then the two transformed features are connected and the result is passed to a relu function to obtain the temporal feature TE T As shown in formula (6):

[0067]

[0068] Step 302: Add the time feature sequence generated at each time point to the multi-head attention mechanism. The multi-head attention mechanism can simultaneously focus on the relationship between different time nodes and capture the local and global relationships in the time series. The sequence output by the multi-head attention mechanism is shown in formula (8):

[0069] T v =(TE T-k ,TE T-k+1 ,...TE T-1 ,TE T ) (7);

[0070] T v '=MultiHeadW 0 =(TE' T-k ,TE' T-k+1 ,...TE' T-1 ,TE' T ) (8);

[0071] Step 303: Input the time features after the multi-head attention mechanism into LSTM to obtain the relationship between different time features and obtain the feature H at the last moment. T As shown in formula (14):

[0072] I T =σ(W ii TE' T +b ii +W hi h (T-1) +b hi ) (9);

[0073] F T =σ(W if TE' T +b if +W hf h (T-1) +b hf ) (10);

[0074] G T =tanh(W ig TE'T +b ig +W hg h (T-1) +b hg ) (11);

[0075] O T =σ(W io TE' T +b io +W ho h (T-1) +b ho ) (12);

[0076] C T =F T *C (T-1) +i T *G T (13);

[0077] H T =O T *tanh(C T ) (14);

[0078] Step 304: H T Input into the GAT at the last moment, and convert the output g of the GAT at the last moment T Input into the nonlinear conversion layer, and output the final prediction result output as shown in formula (16):

[0079]

[0080] Using event data sets from four countries, including Thailand, Egypt, India, and Russia, we conducted experiments to compare two event prediction models without adding time features and eight time prediction models with adding time features, including GCN, GCN+GRU, GCN+LSTM, DGCN, GAT+GRU, GAT+LSTM, GAT+RNN and other models. The experiments are as follows:

[0081] (1) The model is compared with two event prediction models without adding time features. Experiments are conducted on event data sets from four countries. The evaluation indicators are F1, Rec and Prec. The experimental results refer to Figure 4 ;

[0082] (2) The model is compared with eight event prediction models that add time features. Experiments are conducted on protest event datasets from four countries. The evaluation indicators are F1, Rec, and Prec. The experimental results refer to Figure 5 ;

[0083] (3) In order to verify the effectiveness of the model, ablation experiments were performed on each module of the model. The evaluation index was ACC. The experimental results refer to Figure 6 .

[0084] The experimental results show that the present invention has shown good results on the event data sets of four countries. The following facts can be found in the comparison of two prediction models without adding time features and eight prediction models with adding time features:

[0085] 1. For the prediction of whether historical events will occur in the future, the prediction effect of adding time features is better than that of the prediction model without adding time features;

[0086] 2. After removing the multi-head attention mechanism or LSTM module, the prediction effect of the remaining model on the data set is significantly reduced;

[0087] 3. The proposed method shows good prediction performance on the datasets of four countries.

[0088] The following analysis is made: GAT is used to capture semantic information in event graphs. Compared with the GCN model, GAT can obtain richer and more important semantic information related to events. The newly constructed time encoding module can fully consider the impact of the characteristics of each time slice on the whole and capture local and comprehensive time features. The multi-head attention mechanism and LSTM are used to obtain dynamic time information. The multi-head attention mechanism can simultaneously focus on the relationship between different time nodes and capture local and global relationships in the time series. Each head can learn to focus on different time nodes, thereby comprehensively considering the information at different positions in the time series. The time series after the multi-head attention mechanism is input into the LSTM, which can effectively process the time series data and capture the long-term dependencies in the time series. The module for processing time series is added to better utilize the evolution information of historical events and improve the performance of predicting subsequent events.

[0089] In the datasets of four countries, compared with other models, this method achieved the best prediction results. The improvement effect on the Thailand dataset was more obvious, while the improvement on the India dataset was less obvious. After checking the original dataset, it was found that the poor results were caused by the uneven distribution of the India dataset.

Claims

1. An event prediction method integrating dynamic time information, characterized in that: The specific steps are as follows: A. Use word2vec to encode the event graph and input it into the GAT model to obtain the event features at each time point and the event semantic information; B. Use the features of each time point to construct a time series and input it into the multi-head attention mechanism and LSTM to obtain dynamic time features.

2. The event prediction method integrating dynamic time information according to claim 1, characterized in that: The specific steps in step (A) are as follows: A1. The original node vector is obtained by word2vec. For the event graph at each time point, the GAT model is used to obtain the event semantic information. First, a shared linear transformation parameterized by the weight matrix W is applied to each node, and then a self-attention mechanism is performed on the node. The initial vectors of nodes i and j are h i and h j , calculate the attention coefficient e of node j’s importance to node i ij : A2. When calculating the attention coefficient above, the structural information of the graph is not included. The masked attention mechanism is used to add the graph structure features to the node features and only calculate the e of node j∈Ni. ij , where Ni is a neighborhood of node i in the graph; to make the coefficients easy to compare between different nodes, all choices of j are normalized using the softmax function to obtain α ij : A3. The attention mechanism used is a single-layer feedforward neural network consisting of a weight vector Parameterize, where F is the dimension of the node feature, and apply the LeakyReLU activation function to fully expand the process of calculating the attention coefficient. The coefficient calculated by the attention mechanism can be expressed as α ij : A4. The normalized attention coefficients are used to calculate the linear combination of the features corresponding to them as the final output features of each node. A nonlinear function sigmoid is applied after the hidden features to obtain the node features. A5. h attention mechanisms are used at the same time, and the output is h separate outputs connected to obtain the node feature: A6. Finally, the event semantic information obtained by GAT is the node feature 3. The event prediction method integrating hierarchical attention mechanism according to claim 1, characterized in that: The specific steps of step (B) are as follows: B1. Combining GAT encoding features and initial word embedding features, a learnable linear transformation is applied to each feature to obtain H p and H E Then the two transformed features are connected and the result is passed to a relu function to obtain the temporal feature TE T : B2. Add the time feature sequence generated at each time point to the multi-head attention mechanism. The multi-head attention mechanism can simultaneously focus on the relationship between different time nodes and capture the local and global relationships in the time series: T v =(THE T-k ,THE T-k+1 ,...THE T-1 ,THE T ) (7); T v '=MultiHeadW 0 =(THE' T-k ,THE' T-k+1 ,...THE' T-1 ,THE' T ) (8); B3. Input the time features after the multi-head attention mechanism into LSTM to obtain the relationship between different time features before and after, and obtain the feature H at the last moment. T : I T =σ(W ii THE' T +b ii +W hi h (T-1) +b hi ) (9); F T =σ(W if THE' T +b if +W hf h (T-1) +b hf ) (10); G T =tanh(W ig TE' T +b ig +W hg h (T-1) +b hg ) (11); Oh T =σ(W io THE' T +b io +W ho h (T-1) +b ho ) (12); C T =F T *C (T-1) +i T *G T (13); H T =O T *tanh(C T ) (14); B4, H T Input into the GAT model at the last moment, and convert the output g of the GAT model at the last moment T Input into the nonlinear conversion layer and output the final prediction result output: