Cognitive-driven hierarchical inference model and event causal relationship identification method thereof
By employing a cognitively driven hierarchical reasoning model, utilizing intuitive judgment, multi-step association, and multi-path retrieval inference engines, combined with a competitive selection mechanism, the problem of knowledge integration and decision optimization in event causal relationship identification in existing technologies is solved, thereby improving identification accuracy and transparency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for identifying causal relationships in events have shortcomings in integrating relevant background knowledge and optimizing cognitive decision-making, resulting in insufficient model generalization ability and a lack of transparency and interpretability in the reasoning process.
A cognitively driven hierarchical reasoning model is adopted, including an intuitive judgment reasoner, a multi-step association reasoner, and a multi-path retrieval reasoner. Through a competitive selection mechanism, the model is synergistically integrated and confidence-weighted to simulate System 1 and System 2 cognitive activities in the human cognitive process, integrating tacit knowledge and related background knowledge.
It improves the accuracy and transparency of event causal relationship identification, enhances the model's ability to deeply analyze complex text semantics, optimizes the collaborative mechanism between systems, and achieves more efficient causal relationship identification.
Smart Images

Figure CN121766432A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a cognitively driven hierarchical reasoning model and a method for identifying causal relationships in events. Background Technology
[0002] Event Causality Identification (ECI) aims to identify causal relationships between event pairs in text, which is crucial for constructing and understanding complex logical relationships between events in text. For example, given the sentence "Global warming worsened, and tsunami strengthened." and the labeled event pairs...<Global warming, tsunami> ECI models need to determine whether a causal relationship exists between event pairs. As a core task of event understanding, ECI is a key foundation for many downstream tasks (such as event prediction, intelligent question answering, and recommender systems). Compared to other event relationship identification tasks such as temporal relationships and coreference relationships, ECI faces unique challenges: the expression of causal relationships is often more implicit, relying on deep semantic understanding and contextual reasoning, and often involves multi-hop, non-linear logical chains. This makes ECI an extremely difficult and significant task in natural language understanding.
[0003] Traditional methods for identifying causal relationships in events are mainly divided into rule-based and neural network-based approaches. However, limited by the small scale of labeled data, the performance of these methods has reached its limit. Therefore, introducing structured external knowledge to enhance model capabilities has become a mainstream research direction. Despite progress in this type of method, its design still suffers from two fundamental limitations that restrict the model's deep understanding of complex causal relationships: (1) Insufficient utilization of implicit knowledge: Existing methods rely too much on explicit structured causal knowledge bases (such as CauseNet) and only use pre-trained language models (PLM) as basic encoders, failing to fully explore and integrate the rich implicit knowledge contained in the PLM itself. This significantly limits the generalization ability of the model and its deep analysis of the semantics of real complex texts.
[0004] (2) Lack of progressive reasoning ability: Existing models generally simplify causal determination into a single-step classification task, lacking simulation of the progressive cognitive evolution process of "intuitive judgment → background association → path reasoning" in complex human causal reasoning. This simplification not only hinders the model's ability to explore deep-seated connections and multi-hop causal chains, but also leads to a lack of transparency and interpretability in its reasoning process, affecting the model's credibility.
[0005] To overcome the shortcomings of existing methods in deep knowledge fusion and progressive reasoning mechanisms, explicitly modeling cognitive processes by drawing on cognitive science theories has become an effective approach. Previous researchers introduced the Dual Process Theory (DPT) into the ECI field, constructing Competitive-Cooperative Cognition Networks (C3Net). DPT divides human cognition into two systems: System 1 is responsible for rapid, intuitive, and unconscious initial judgments; System 2 is responsible for slow, deliberate, and conscious deep reasoning. C3Net simulates System 1 through an intuitive inference engine and System 2 through a logical inference engine, utilizing personal feature recognition and historical records to achieve system collaboration. However, C3Net has limitations in modeling cognitive processes: (a) when simulating System 2, it mainly focuses on causal path reasoning, failing to fully integrate cognitive links related to background knowledge; (b) its inter-system collaboration mechanism still has room for optimization compared to the actual cognitive decision-making process of the human brain.
[0006] Therefore, how to address the shortcomings of existing methods in integrating relevant background knowledge and optimizing actual cognitive decision-making processes is an urgent problem to be solved. Summary of the Invention
[0007] To address the aforementioned problems, this invention aims to provide a cognitively driven hierarchical reasoning model and its event causal relationship identification method. This model can at least solve the shortcomings in integrating related background knowledge and optimizing the actual cognitive decision-making process, and can at least achieve full integration of related background knowledge and optimize the inter-system collaboration mechanism.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a cognitively driven hierarchical reasoning model, the model comprising: Intuitive Judgment Inferencer: Utilizes a pre-trained language model to encode event pairs and their context in text, generating intuitive judgment information representations. ; Multi-step associative reasoning: Used to retrieve neighboring events and their relationships from event pairs in a structured external knowledge graph, and aggregate information from neighboring events to generate an enhanced event representation that integrates local contextual knowledge and relational information. ; Multi-path retrieval inference engine: This engine retrieves multiple inference paths for event pairs from a structured external knowledge graph and filters out the actual possible paths. It encodes the semantic information of each actual possible path to obtain a path representation. Finally, it merges the path representations of multiple actual possible paths to generate a path inference representation for the event pair. ; Competitive selection mechanism: used to collaboratively fuse and weight the outputs of the intuitive judgment inferencer, the multi-step association inferencer, and the multi-path retrieval inferencer, and output the final identification result of the causal relationship of the event.
[0009] Furthermore, the aforementioned intuitive judgment information representation for: ; In the formula, and These are events e in the event pair. a and event e b In the hidden state of the last layer of the BERT model This represents the hidden state of the sentence text in the last layer of the BERT model. MLP stands for Multilayer Perceptron model. This indicates vector concatenation.
[0010] Furthermore, the multi-step associative inference engine generates enhanced event representations that integrate local contextual knowledge and associative information. The specific operation includes the following steps: Retrieve event e from a structured external knowledge graph a and event e b Neighboring events and their relationships; For event e a and event e b The neighbor event information is aggregated to obtain event e. a and event e b The final representation; For event e a and event e b The final representations are spliced together to produce an enhanced event representation that integrates local background knowledge and related information. .
[0011] Furthermore, the enhanced event representation for: ; In the formula, and Event e a and event e b The final expression, , ; For the sigmod function, This is the weight matrix for propagation from layer (k-1) to layer k. and These represent events e propagating from layer (k-1) to layer k. a and event e bEmbedded representation, and These represent events e propagating from layer (k-1) to layer k. a and event e b The neighbor event information is displayed.
[0012] Furthermore, the path retrieval inferencer generates path reasoning representations of event pairs. The specific operation includes the following steps: Multiple reasoning paths for event pairs are retrieved from a structured external knowledge graph, and actual possible paths are filtered based on the maximum path length constraint and the path reliability score. The semantic information of each possible actual path is encoded using BiLSTM and attention to obtain the path representation; The path representation that integrates multiple possible actual paths generates a path reasoning representation of event pairs. .
[0013] Furthermore, the path reasoning representation for: ; ; ; ; In the formula, For event e a and event e b Path sets based on attention mechanisms and Event e a and event e b Path sets based on max pooling and path sets based on average pooling; For event e a and event e b The actual number of possible paths between them; Let m be the final path representation of the m-th actual possible path; The fusion weights are normalized using softmax. ( )and ( ) represent the max pooling function and the average pooling function, respectively.
[0014] Furthermore, the specific operations of the competitive selection mechanism in collaboratively fusing and weighting the outputs of the intuitive judgment inferencer, the multi-step association inferencer, and the multi-path retrieval inferencer include the following steps: The outputs of each inference engine are purified to obtain purified features. Use the historical performance recorder to extract the historical experience features of each inference engine; By fusing purified features and historical experience features using gated fusion and confidence weighting, the prediction of causal relationships of events can be achieved.
[0015] Furthermore, the specific steps for predicting the causal relationship of events by fusing purified features and historical experience features based on gated fusion and confidence weighting include the following: The historical pattern adaptation features of each inferencer are calculated by fusing historical experience features and purified features of the current sample using a gated attention mechanism. The purified features and historical pattern-adapted features are fed into a 2-layer MLP to obtain the confidence weights of each inferencer. The predicted values of purified features from multiple inference engines are weighted by confidence to obtain the final identification result.
[0016] Furthermore, the final identification results for: ; In the formula, The confidence weight of the nth inferencer. Let n be the predicted value corresponding to the purified feature of the nth inference engine, where n=1,2,3, and n=1 is the intuitive judgment inference engine, n=2 is the multi-step association inference engine, and n=3 is the multi-path retrieval inference engine.
[0017] On the other hand, the present invention also provides a method for identifying causal relationships of events using the hierarchical reasoning model as described above, the identification method comprising the following steps: Input text containing event pairs into the hierarchical reasoning model; Intuitive judgment reasoning generator generates intuitive judgment information representation of event pairs. ; Enhanced event representation of event pairs generated by multi-step associative inference engines ; The multi-path retrieval inference engine generates path reasoning representations of event pairs. ; Competitive selection mechanism , and The system performs collaborative fusion and confidence weighting to output the final identification result.
[0018] The beneficial effects of this invention are: 1. The cognitive-driven hierarchical reasoning model in this invention innovatively refines System 2 of the dual-process theory into a multi-step association and multi-path retrieval progressive architecture; it uses PLM as System 1 participating in cognitive decision-making, and constructs a dynamic competitive selection mechanism based on feature purification and historical recorder. On the basis of using the feature purification network to purify the core discriminative features of each inference layer, the historical performance recorder is used to summarize the specialty patterns of each inferencer and obtain the positive and negative historical experience patterns of each inferencer; the gating network integrates the currently purified features and the positive and negative historical experience patterns, and weights them according to the dynamic cognitive credibility, systematically solving the problems of cognitive simplification and knowledge limitation in the identification of event causal relationships.
[0019] 2. The competitive selection mechanism in this invention is based on the principle of "inhibition control," purifying the features of individual inferencers and focusing them on information related to their own abilities and applied knowledge, thereby enhancing the discriminative ability of the inferencer outputs in each step. It utilizes the human brain's memory mechanism to design a historical performance recorder to capture the specific specialty patterns of each inferencer. Analogous to the gating mechanism of the thalamus cortex, it uses a gating network to calculate the historical pattern adaptation features of the current purified features relative to the positive and negative historical experience patterns. Based on the current purified features and the historical pattern adaptation features, it dynamically fuses the purified prediction results, achieving efficient fusion of information from all inferencers. This effectively simulates the cognitive evolution process of the human brain and improves the accuracy of event causal relationship identification. Attached Figure Description
[0020] Figure 1 This is a structural block diagram of the cognitive-driven hierarchical reasoning model in this invention; Figure 2 This is a schematic diagram of the competitive selection mechanism in this invention; Figure 3 This is a block diagram illustrating the principle of the cognitive-driven hierarchical reasoning model for identifying causal relationships in events in this invention. Figure 4 This is a schematic diagram illustrating the background knowledge obtained from injured and earthquake using a multi-step associative reasoning engine in Example 2 of the present invention. Figure 5 This is a schematic diagram illustrating the relationship knowledge between shooting and kiiled obtained through a multi-path retrieval inference engine in Example 3 of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0022] Example 1: Embodiments of this application provide a cognitively driven hierarchical reasoning model applicable to electronic devices with communication, computing, and data storage capabilities. Given a set of event pairs (e... a , e b The sentence [CLS] is the target of the model, which is to predict e. a and e b Is there a causal relationship between them? (See attached document) Figure 1 As shown, the model includes an intuitive judgment inference engine, a multi-step association inference engine, a multi-path retrieval inference engine, and a competitive selection mechanism. The intuitive judgment inference engine, the multi-step association inference engine, and the multi-path retrieval inference engine are connected in sequence and are all connected to the competitive selection mechanism.
[0023] As attached Figure 2 As shown, the intuitionistic judgment inference engine directly utilizes a pre-trained language model (PLM) containing rich implicit knowledge to analyze event pairs (e) in the input text. a , e b Encode the information and its context to generate intuitive judgment information representations. This inference engine utilizes PLM to simulate System1's rapid intuitive judgments, effectively activating the implicit knowledge inherent in PLM.
[0024] A multi-step associative reasoner is used to retrieve event pairs from a structured external knowledge graph (KG). a and e b This study investigates neighbor events and their relationships, and uses a graph convolutional neural network (GCN) to aggregate information from neighbor events, generating an enhanced event representation that integrates local background knowledge and correlation information. This inference engine simulates the unidirectional, locally deliberate reasoning process in System2 that relates to background knowledge.
[0025] A multi-path retrieval inference engine is used to retrieve event pairs from a structured external knowledge graph (KG). a and e b The system identifies multiple reasoning paths and filters out the actual possible paths. It then uses a Bidirectional Long Short-Term Memory (BiLSTM) network combined with an attention mechanism to encode the semantic information of each actual possible path, obtaining a path representation. Finally, it fuses the path representations of multiple actual possible paths through attention weighting and pooling operations to generate a path reasoning representation of event pairs. This inference engine simulates the bidirectional global prudent reasoning process in System2, which involves deep reasoning along relational paths, and aims to reveal potential long-distance, multi-hop causal chains.
[0026] A competitive selection mechanism is used to evaluate the outputs of the intuitive judgment inference engine, the multi-step association inference engine, and the multi-path retrieval inference engine. , and The system performs collaborative fusion and confidence weighting to output the final identification result of the causal relationship between events. A competitive selection mechanism simulates the comprehensive decision-making process of the human brain. First, the output of each inferencer is processed through a Feature Purification Network (FPN) to extract its task-relevant core discriminative features (i.e., purified features) and suppress task-irrelevant noise information. Then, a History Performance Recorder (HPR) is used to dynamically track and record the historical performance of each inferencer under different types of problem patterns, obtaining the historical experience pattern features of each inferencer. Finally, a gating network is used to calculate the historical pattern fit features of the purified features relative to the historical experience pattern features, and the dynamic confidence weight of each inferencer on the current instance is calculated based on the purified features and the historical fit features. The final identification result is obtained through weighted fusion.
[0027] In some embodiments, the intuitionistic judgment inference engine utilizes a PLM model to analyze the input event pairs (e... a , e b Encoding the information and its context to generate intuitive judgment information representations includes the following steps: Given an input sentence and a labeled event e a and event e b Get event e a and e b The hidden state in the last layer of the BERT model is represented as and And the hidden state of the sentence [CLS] in the last layer of the BERT model, represented as The BERT model is one of the sub-models in the PLM model, which can simulate the intuitive judgment process of System 1. It will not be described in detail in this invention.
[0028] Then, the obtained , and The vectors are concatenated and input into a multilayer perceptron (MLP) to obtain an intuitive judgment information representation. , represented as ; It contains preliminary intuitive judgments about the causal relationships between events based on PLM tacit knowledge. This representation provides an operational starting point for subsequent progressive reasoning layers and ultimately participates in the fusion decision-making of the competitive selection mechanism.
[0029] In some embodiments, the multi-step associative reasoner retrieves event pairs e from a structured external knowledge graph (KG). a and e bThe process involves identifying neighbor events and their relationships, then using a graph convolutional neural network (GCN) to aggregate information from these events, generating an enhanced event representation that integrates local contextual knowledge and relational information. This process includes the following steps: (1) Retrieve event e from event pairs from structured external knowledge graphs (KG) a and event e b Neighboring events and their relationships; Retrieving event pairs from structured external knowledge graphs (KG) a and e b The k-order neighbor events can acquire a wider range of concepts and relationships related to the event pair, thus providing more contextual information and clues for subsequent reasoning.
[0030] This invention uses the ConceptNet knowledge graph as an explicit, structured external knowledge graph. ConceptNet is a large-scale commonsense knowledge graph containing various relationship types, such as causal relationships and correlation relationships. For a given ConceptNet knowledge graph and event pair (e... a , e b ), retrieve event e from the ConceptNet knowledge graph respectively a and event e b The event e is obtained from the k-th order neighbor events. a and event e b The k-order neighbor graphs are represented as follows: ; ; In the formula, Indicates event e a k-order neighbor graph, Indicates event e a The set of nodes in a k-order neighbor graph (each node represents an event). Indicates event e a The set of edges in the k-order neighbor graph; Indicates event e b k-order neighbor graph, Indicates event e b The set of nodes in the k-order neighbor graph. Indicates event e b The set of edges of a k-order neighbor graph, where k represents the association step.
[0031] Using ConceptNet knowledge graph to progressively expand event e a and event e bIn the process of exploring k-order neighbor events, if the number of neighbor events expanded sequentially is not limited, the graph size can easily explode exponentially. Therefore, it is necessary to set an upper limit on the number of neighbor events expanded sequentially. ,and The value decreases as the number of association steps (k) increases.
[0032] Obtaining event e through multi-step association a and event e b Each of their respective k-order neighbor graphs can be used to process events e in subsequent processing. a and event e b Embedding into a richer semantic space helps to reveal potential causal relationships between events through related concepts.
[0033] (2) For event e a and event e b The neighbor event information is aggregated to obtain event e. a and event e b The final representation; In this invention, an untrained BERT is used to initialize the representation of each event node in the k-order neighbor graph. Event e a and event e b The encoding is obtained using an intuitive judgment reasoner. and Initialization is performed. To effectively aggregate the information of the k-th order neighbor events of each event and obtain an enhanced event representation, this invention uses a graph convolutional neural network (GCN) to capture the information transmission in the k-th order neighbor graph.
[0034] Based on the event For example, its k-order neighbor graph For nodes When propagating from layer l to layer l+1 in the GCN, its neighbor event information is represented as follows: for: ; In the formula, Represents a node The set of neighbors; Let u represent a node different from node v, and r represent the relationship between node u and node v. This represents the embedding representation of node u during propagation from layer l to layer l+1. This represents the embedding representation of relation r when propagating from layer l to layer l+1.
[0035] The updated information representation of node v for: ; in, This is the weight matrix for propagation from layer l to layer l+1. For the sigmod function, This represents the embedding representation of node v when propagating from layer l to layer l+1.
[0036] The number of GCN layers is the same as the number of association steps k. Therefore, after k layers of aggregation, the node... The final expression for: ; Event e a and event e b As a subgraph within a k-order neighbor graph, then based on the nodes The final representation of event e can be obtained. a The final expression and event e b The final expression They are respectively: ; ; In the formula, This is the weight matrix for propagation from layer (k-1) to layer k. and These represent events e propagating from layer (k-1) to layer k. a and event e b Embedded representation, and These represent events e propagating from layer (k-1) to layer k. a and event e b The neighbor event information is displayed.
[0037] (3) For event e a and event e b The final representations are concatenated to generate an enhanced event representation that integrates local background knowledge and related information. ; Event pair (e) a , e b Enhanced event representation obtained through k-step associative reasoning By splicing event e a and event e b The final representation is obtained, that is: ; In the formula, and Event e a and event e b The final representation.
[0038] In some optional embodiments, the multi-path retrieval inferencer generates path reasoning representations of event pairs. The specific operation includes the following steps: (1) Retrieve multiple reasoning paths for event pairs from structured external knowledge graphs; To increase the number of events e found in the ConceptNet knowledge graph a and event e b The possibility of a legitimate path is first addressed by finding the KG node that is semantically closest to the event mention to resolve potential lexical differences. Specifically, the lightweight language model MiniLM is used to evaluate the event pairs (e... a , e b The event nodes in the ConceptNet knowledge graph are encoded to obtain event representations for different event nodes. Then, the cosine similarity between the event representations is calculated to represent the event e. a and event e b Select the three event nodes that are most semantically similar as candidate event nodes.
[0039] The longer the reasoning path between two events, the weaker the relationship between them. To filter out excessively long paths that may introduce noise, this invention sets a maximum path length. Use Networkx to obtain the set of all paths between candidate event nodes. , Let M be the m-th path, and M be the total number of paths.
[0040] by For example, It can be represented as a sequence containing a head node, relation, and tail node triple: ; In the formula, i represents the time step, i = 0, 1, ..., l m ; This represents the length of the m-th path. This represents the triplet of the head node, relation, and tail node at the i-th time step.
[0041] Based on the weight information contained in the ConceptNet knowledge graph, the calculation path is... triples in Normalized confidence level: ; In the formula, Let j be the triplet of head node, relation, and tail node at time step j.
[0042] path Reliability rating It is the confidence level product of the triples within the path: ; To avoid information interference from low-reliability paths, only the top M paths based on confidence scores are retained. max The path is considered as the actual possible path, and event e a and event e b The actual number of possible paths between for: .
[0043] (2) Encode the semantic information of each possible actual path to obtain the path representation; Specifically, BiLSTM and attention are used for each actual possible path. Encoding is then performed. Similarly, untrained BERT is used to represent the nodes and relationships of the initial path, for the starting node... and termination node Similarly, the event representations obtained by the intuition-based reasoning engine are used. and .
[0044] Then, the encoded triplet sequence is input into BiLSTM to obtain the intermediate node representation of each time step i (corresponding to each node in the path) of the m-th actual possible path. for: ; To focus on key intermediate nodes and mitigate noise interference from irrelevant nodes, an attention mechanism for path nodes is designed. First, the intermediate node representations at each time step of the BiLSTM output are processed. Calculate attention weights Attention weights normalized using softmax The final path representation of the m-th actual possible path is obtained by weighted summation of the BiLSTM output. : ; ; ; In the formula, This represents the weight matrix to be learned when calculating the embedding of a single path.
[0045] (3) Integrate the path representations of multiple possible actual paths to generate path reasoning representations of event pairs. ; Because different paths have varying reliability, they play different roles in reasoning. To aggregate multiple paths... In this invention, the information is first fused using an Attention mechanism, and the path reliability score is used as the initial bias: ; ; ; In the formula, for The fusion weight, The fusion weights are normalized using softmax. The weight matrix to be learned when fusing multiple path representations; It is a set of paths based on the attention mechanism.
[0046] Furthermore, max pooling and average pooling are used to aggregate the path vector set to capture information about the path set from different perspectives: ; ; In the formula, and These are the path sets based on max pooling and the path sets based on average pooling, respectively. ( )and ( ) represent the max pooling function and the average pooling function, respectively.
[0047] Finally, by concatenating these three sets of paths, we obtain the path reasoning representation of the event pairs. : .
[0048] In some alternative embodiments, the competitive selection mechanism is based on the principle of "inhibition control" and applies the outputs of the three inference engines. , and The features are purified, focusing on information related to the inferencer's own capabilities and the application of knowledge, thereby enhancing the discriminative power of each layer of the inferencer output. Then, this invention utilizes the human brain's memory mechanism to design a historical performance recorder to capture specific specialty patterns of each layer of the inferencer. Finally, analogous to the gating mechanism of the thalamic cortex, a gating network is used to calculate the historical pattern adaptation features of the current purified features relative to positive and negative historical experience patterns. Based on the dynamic fusion of the purified features and historical pattern adaptation features, the purified prediction results are achieved, resulting in efficient fusion of information from the three layers of the inferencer, as shown in the appendix. Figure 2 As shown.
[0049] A competitive selection mechanism is used to evaluate the outputs of the intuitive judgment inference engine, the multi-step association inference engine, and the multi-path retrieval inference engine. , and The specific process of performing collaborative fusion and confidence weighting to output the final identification result includes the following steps: (1) Perform feature purification on the output of each inferencer to obtain purified features; To reduce feature redundancy and enhance each inferencer To address the uniqueness of the learned representations, this invention designs an adversarial feature purification network for each inferencer, where, for n=1,2,3, the corresponding... These are respectively an intuitive judgment inference engine, a multi-step association inference engine, and a multi-path retrieval inference engine. The adversarial feature purification network includes a shared feature extractor and a feature projector; the shared feature extractor is used to extract features for the inference engine. For features with weak classification discriminative power in the output features, the feature projector is used to extract task-specific non-common features and project them into the orthogonal space of common features to obtain purified features with purity and efficiency.
[0050] Among them, the common feature extractor is used to extract the inference engine. For output features with weak classification discriminative power, a gradient inversion layer (GRL) is used: ; ; ; ; In the formula, These are original shared features. The weight matrix to be learned in the common feature extractor. This is the bias vector to be learned in the common feature extractor. () is the activation function. () represents the gradient inversion layer; For hyperparameters, It is the identity matrix. These are the common features extracted.
[0051] Then, a linear binary classifier is used to predict causal relationships of the gradient-reversed features, and the cross-loss entropy is used as the loss function: ; ; In the formula, For the inference engine r n Based on common features The predicted value, It is the sigmoid activation function. The weight matrix to be learned by a linear binary classifier for predicting causal relationships. This is the bias vector to be learned by the linear binary classifier for causal relationship prediction. For the inference engine r n Common feature loss, () represents the cross-loss entropy function. This is a real label.
[0052] By maximizing this loss through GRL, the extractor is prompted to search for unpredictable common features.
[0053] The feature projector is used to extract task-specific non-common features and project them into an orthogonal space of common features to obtain purified features with purity and efficiency. The specific method is as follows: ; ; In the formula, For the inference engine r n The original purification characteristics, The weight matrix to be learned by the feature projector. The bias vector to be learned by the feature projector. for The corresponding purification characteristics.
[0054] Similarly, a linear binary classifier is used to classify the purified features, and the cross-loss entropy is used as the loss function: ; ; In the formula, Purification features for the nth inference engine The corresponding predicted value, The weight matrix to be learned by a linear binary classifier for feature classification. The bias vector to be learned by a linear binary classifier for feature classification. This is due to the loss of purification characteristics.
[0055] (2) Use the historical performance recorder to extract the historical experience features of each inference engine; To summarize the specialized problem patterns of different inference engines, this invention uses a historical performance recorder to record the characteristics of correct and incorrect predictions during the training process of the three inference engines. This historical performance recorder is measured in single training epochs.
[0056] For the inferencer during training period t The average purified feature vectors of correctly and incorrectly predicted features are statistically analyzed: ; ; In the formula, For the inferencer during training cycle t n Predict the average purified feature vector of the correct sample. For the inferencer during training cycle t n The predicted value for sample s, For the true value of sample s in training period t, For the inferencer during training cycle t n Purification characteristics of the extracted sample s () is an indicator function, which is 1 when sample s is predicted correctly and 1 when sample s is predicted incorrectly; s is the training sample. For the training sample set; For the inferencer during training cycle t n Average purified feature vector of samples with incorrect predictions.
[0057] Through smoothing factor Controlling the stability of historical feature records: ; ; In the formula, For the inferencer during training cycle t n The positive historical characteristics, For the inferencer r during training period t-1 n The positive historical characteristics, For the inferencer during training cycle t n The negative historical characteristics For the inferencer r during training period t-1 n The negative historical characteristics.
[0058] (3) Based on gating fusion and confidence weighting, purified features and historical experience features are fused to predict the causal relationship of events; First, a gated attention mechanism is used to fuse historical experience features and purified features of the current sample to compute the inference engine. Historical pattern adaptation features: ; ; ; In the formula, For reasoning Historical pattern adaptation features The weight of positive historical characteristics, The weight of negative historical characteristics for The corresponding purification characteristics.
[0059] Then, the purification characteristics Features that adapt to historical patterns The results are fed into a 2-layer MLP, which converts the outputs of the three inferencers into 1×3 vectors. Then, the softmax function is used to calculate the weights of each inferencer to obtain the values for each inferencer. Confidence weight , This reflects the reliability of its prediction results for the current input event pair: ; Finally, the predicted values of the purified features from multiple inference engines are weighted by confidence level to obtain the final recognition result. : ; Similarly, the cross-entropy loss function is used to calculate the loss of the final inference result. : ; To achieve progressive optimization of the hierarchical thrust model in this invention, a preheating strategy is adopted to control the training focus of the model at different stages. In the early stage of training, the focus is on training the reasoning ability of individual inference engines, while in the later stage of training, the focus is on integrating a competitive selection mechanism to achieve overall joint training.
[0060] The overall loss of the hierarchical thrust model in this invention The loss function combines feature purification and the final inference result: ; In the formula, This serves as a training warm-up factor. Initially, it's close to 0, primarily training the individual modules and their feature purification networks. As the training cycle progresses, it gradually increases to 1 and remains stable, achieving a comprehensive model and training. This phased approach helps prevent competitive selection mechanisms from prematurely dominating training before single-layer inference modules have sufficient capabilities.
[0061] Example 2: Example 2 provides a method for identifying causal relationships of events using a hierarchical reasoning model as described in Example 1, with reference to the appendix. Figure 3 As shown, the identification method specifically includes the following steps: Input text containing event pairs into the hierarchical reasoning model; The intuitionistic judgment inference engine uses a PLM model to encode the input event pairs and their context, generating an intuitionistic judgment information representation. ; The multi-step associative inference engine retrieves neighboring events and their relationships from an event pair in a structured external knowledge graph. It then uses a graph convolutional neural network to aggregate the information from neighboring events, generating an enhanced event representation that integrates local contextual knowledge and relational information. ; The multi-path retrieval inference engine retrieves multiple reasoning paths for each event in an event pair from a structured external knowledge graph (KG). It uses a bidirectional long short-term memory network combined with an attention mechanism to encode the semantic information of each path to obtain a path representation. Finally, it merges the multiple path representations through attention weighting and pooling operations to generate a path reasoning representation for the event pair. The competitive selection mechanism affects the outputs of intuitive judgment inference, multi-step association inference, and multi-path retrieval inference. , and The system performs collaborative fusion and confidence weighting to output the final identification result.
[0062] The recognition method was applied to the following three text examples. The inferencers and the final recognition results are shown in Table 1 below. In the table, √ and × represent the recognition results as correct and incorrect, respectively.
[0063] Table 1. Application examples of the identification method in this invention ; As can be seen from Table 1: In Example 1, for the events accused and wounding, the intuitive judgment reasoner can make the correct decision by using the inherent knowledge of PLM and sentence context when there are clear causal clues. In Example 2, a diagram illustrating the background knowledge acquired by the multi-step associative inference engine for the events injured and earthquake is attached. Figure 4 As shown, for the events injured and earthquake, the multi-step associative reasoner can obtain background information about the events based on an external knowledge base, associate injured with concepts such as accident, pain, and die, and associate earthquake with concepts such as disaster, instruction, and buildings collapsing, thereby finding causal clues for injured and earthquake.
[0064] In Example 3, a diagram illustrating the relational knowledge obtained by the multi-path retrieval inference engine for the event pairs shooting and kiiled is attached. Figure 5As shown, for the events killing and shooting, the multi-path retrieval inference engine can obtain information about the relationships between the events, reveal the causal mechanism of shooting→using weapon→killing, and provide global causal clues between event pairs.
[0065] The above examples clearly demonstrate the performance differences of the various inferencers in the hierarchical reasoning model of this invention when utilizing different knowledge sources and focusing on different features: the intuitive judgment inferencer relies on the intrinsic knowledge of the PLM model and surface contextual clues; the multi-step association inferencer utilizes conceptual background information from an external knowledge base; and the multi-path retrieval inferencer mines the relationship paths between events. Furthermore, different problem patterns determine which inferencer might be more effective. In the three examples, when the prediction results of the various inferencers are inconsistent, the hierarchical reasoning model integrates the results from each layer through its competitive selection mechanism, ultimately making the correct causal relationship judgment. This fully demonstrates the decision-making advantages and robustness of the hierarchical reasoning model in this invention, which integrates multi-level knowledge and adapts to different problem patterns.
[0066] Example 3: Embodiments of this application also provide an electronic device, the electronic device including at least one processor; and a memory communicatively connected to the processor; wherein the memory stores instructions executed by the processor, the instructions being executed by the processor to enable the processor to perform the event causality identification method described in Embodiment 2.
[0067] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A cognitive-driven hierarchical inference model, characterized in that, The model comprises: Intuitive judgment reasoner: encode event pairs and their context in text using a pre-trained language model to generate intuitive judgment information representations ; Multi-step associative reasoner: to retrieve neighbor events and their relations for an event pair from a structured external knowledge graph, and aggregate information of the neighbor events to generate an enhanced event representation that fuses local contextual knowledge and related information ; The multi-path retrieval reasoner is used for retrieving multiple reasoning paths of an event pair from a structured external knowledge graph, and screening out actual possible paths; encoding semantic information of each actual possible path to obtain a path representation; and fusing path representations of the multiple actual possible paths to generate a path reasoning representation of the event pair ; A competitive selection mechanism for synergistic fusion and confidence weighting of the outputs of the intuitive judgment reasoner, multi-step associative reasoner and multi-path retrieval reasoner, and output of the final identification result of the cause-effect relationship of the event pair.
2. The cognitive-driven hierarchical inference model according to claim 1, wherein, The intuitive judgment information represents is: ; wherein, and are the events in the pair of events e a and the event e b are the hidden states of the last layer of the BERT model, is the hidden state of the last layer of the BERT model for the sentence text, and MLP is a multi-layer perceptron model, denotes vector concatenation.
3. The cognitive-driven hierarchical inference model according to claim 2, wherein, A multi-step associative reasoner generates an enhanced event representation that fuses local background knowledge and related information The specific operations include the following steps: retrieving events e from a structured external knowledge graph a and their relations to events e b The event e a and the neighbor event information of the event e b are aggregated respectively, and the final representation of the event e a and the event e b is obtained. The event e a and the final representation of the event e b are spliced to produce an enhanced event representation that fuses local contextual knowledge and related information .
4. The cognitive-driven hierarchical inference model according to claim 3, wherein, The enhanced event representation Is: ; wherein, and are the final representations of events e a and events e b respectively, , ; is a sigmod function, is a weight matrix from the k-1th layer to the kth layer, and are the embedding representations of events e a and events e b respectively when events propagate from the k-1th layer to the kth layer, and are the neighbor event information representations of events e a and events e b respectively when events propagate from the k-1th layer to the kth layer.
5. The cognitive-driven hierarchical inference model according to claim 4, wherein, A path retrieval reasoner generates a path reasoning representation of event pairs The specific operations include the following steps: Retrieving a plurality of reasoning paths of the event pair from a structured external knowledge graph, screening actual possible paths based on a maximum path length constraint and a reliability score of the path; Encoding semantic information of each actual possible path in a BiLSTM and attention manner to obtain path representation; Generating a path inference representation of an event pair by fusing path representations of multiple actual possible paths .
6. The cognitive-driven hierarchical inference model according to claim 5, wherein, The path reasoning representation Is: ; ; ; ; In the formula, For event e a and event e b Path sets based on attention mechanisms and Event e a and event e b Path sets based on max pooling and path sets based on average pooling; For event e a and event e b The actual number of possible paths between them; Let m be the final path representation of the m-th actual possible path; The fusion weights are normalized using softmax. ( )and ( ) represent the max pooling function and the average pooling function, respectively.
7. The cognitive-driven hierarchical inference model according to claim 6, wherein, The specific operation of the competitive selection mechanism for synergistic fusion and confidence weighting of the outputs of the intuitive judgment reasoner, multi-step associative reasoner and multi-path retrieval reasoner comprises the following steps: Purifying the features of the outputs of each reasoner to obtain purified features; Extracting historical experience features of each reasoner using a historical performance recorder; Fusing the purified features and the historical experience features based on a gated fusion and confidence weighting to realize prediction of the cause-effect relationship of the event.
8. The cognitive-driven hierarchical inference model according to claim 7, wherein, The specific operation of fusing the purified features and the historical experience features based on a gated fusion and confidence weighting to realize prediction of the cause-effect relationship of the event comprises the following steps: Fusing the historical experience features and the purified features of the current sample using a gated attention mechanism to calculate historical pattern adaptation features of each reasoner; Feeding the purified features and the historical pattern adaptation features to a 2-layer MLP to obtain confidence weights of each reasoner; Confidence weighting of the prediction values of the purified features of the plurality of reasoners to obtain a final identification result.
9. The cognitive-driven hierarchical inference model according to claim 8, wherein, Final recognition result Is: ; In the formula, is the confidence weight of the nth reasoner, is the predicted value corresponding to the purification feature of the nth reasoner, n = 1, 2, 3, and n = 1 is the intuitive judgment reasoner, n = 2 is the multi-step association reasoner, and n = 3 is the multi-path search reasoner.
10. The method of claim 1-9, wherein, The identification method comprises the following steps: Inputting a text containing an event pair into a hierarchical reasoning model; Intuitive judgment reasoner generates intuitive judgment information representation of event pair ; Multi-step associative reasoner generates enhanced event representations of event pairs ; A multipath search reasoner generates a path-reasoned representation of event pairs ; The competition selection mechanism is cooperatively fused with , and and weighted by confidence, and the final recognition result is output.