Method and system for multi-stage causal reasoning based on large models and narrative consistency verification

By employing a multi-stage causal reasoning and narrative consistency verification method, utilizing large models and structural hypergraphs, and combining topological Hawkes processes and two-layer contrastive learning, the structural and logical problems in identifying chapter-level event causal relationships are solved, achieving more accurate and stable causal structure identification.

CN122433718APending Publication Date: 2026-07-21SHANXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANXI UNIV
Filing Date
2026-04-21
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing technologies lack explicit modeling of the inherent structural information of text in the identification of causal relationships at the chapter level, making it difficult to characterize the structural relationships of complex causal networks, and the generated causal structures lack logical coherence and consistency.

Method used

We employ a multi-stage causal reasoning and narrative consistency verification method based on a large model. Through multi-perspective causal heuristic reasoning, structural hypergraph modeling, topological Hawkes process verification, and two-layer structural perception contrastive learning, we construct a dynamically evolving chapter-level causal graph and perform multiple rounds of iterative optimization to enhance the stability and consistency of the causal structure.

Benefits of technology

It effectively improves the accuracy and structural stability of chapter-level event causal relationship identification, reduces the probability of misjudgment in causal judgment, and ensures the global consistency of causal structure under document topology and narrative time constraints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433718A_ABST
    Figure CN122433718A_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-stage causal reasoning and narrative consistency verification method and system based on large model, belong to deep learning, natural language processing technical field.For the problems such as the existing chapter-level event causal relationship identification method is dependent on local semantic similarity independent discrimination event pair, ignores the constraint effect of narrative structure in the whole chapter in causal dependence propagation, the method of the present application combines the causal reasoning result generated by large language model and hypergraph structure prior information, introduces topological hox process to verify the narrative consistency of candidate causal relationship, and iteratively optimizes in dynamic causal graph, to gradually weaken noise causal relationship and strengthen the global consistent causal structure, improve the accuracy and stability of chapter-level event causal relationship identification.The application guarantees semantic reasoning ability while introducing structure constraint and narrative consistency verification mechanism, thereby effectively improving the accuracy and structural stability of chapter-level event causal relationship identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of natural language processing technology, specifically relating to a method and system for multi-stage causal reasoning and narrative consistency verification based on a large model. Background Technology

[0002] Document-level event causality identification (DECI) is a key task in Natural Language Processing (NLP), aiming to identify causal relationships between multiple events from unstructured text. It has significant application value in NLP scenarios such as question answering systems, narrative generation, and event prediction. Unlike sentence-level causal judgment, document-level event causality identification needs to simultaneously handle long-distance dependencies across sentences, multi-event combination structures, and the cascading propagation of causal relationships, making causal modeling more structurally complex and uncertain.

[0003] Existing methods for identifying causal relationships in events mainly include rule-based or pattern-matching methods, as well as semantic modeling methods based on deep learning. With the development of deep learning technology, researchers have gradually introduced techniques such as knowledge enhancement, graph neural networks, and contrastive learning to model causal relationships in events, in order to improve the model's ability to identify complex semantic relationships.

[0004] In recent years, Large Language Models (LLMs), with their rich pre-trained knowledge and powerful semantic understanding capabilities, have been increasingly applied to causal reasoning tasks, providing a new technical approach for recognizing complex semantic relationships. However, existing technologies still have the following shortcomings:

[0005] First, when performing causal inference, large language models typically rely on their internal parameterized knowledge for end-to-end reasoning, lacking explicit modeling of the inherent structural information of the text. In coherent narrative texts, causal relationships often revolve around several key events, forming a causal backbone that runs throughout the entire text. However, existing technologies usually treat event pairs as independent samples for local semantic discrimination, mainly relying on the semantic relevance between event pairs to determine causal relationships, making it difficult to characterize the overall causal propagation structure at the discourse level.

[0006] Secondly, causal relationships in real texts generally exhibit conceptual aggregation and shared structural features of multiple causes and effects. Multiple mentions of events with different expressions but similar semantics may refer to the same conceptual event, while the same event may play different structural roles in different causal chains. Existing technologies are insufficient in modeling event conceptual aggregation, multiple cause and effect structures, and role differences, making it difficult to accurately characterize the structural relationships in complex causal networks.

[0007] Furthermore, the causal inference results generated by large language models are usually a soft estimate based on semantic relevance, lacking constrained verification of causal relationships in terms of document topology, narrative time sequence, etc. This can easily lead to problems such as insufficient coherence and logical conflicts in the generated causal structure, making it difficult to guarantee the consistency and stability of the causal structure at the document level. Summary of the Invention

[0008] To address the problems of existing methods for identifying causal relationships at the chapter level, which often rely on local semantic similarity to independently identify event pairs, neglecting the constraining effect of the overall narrative structure of the chapter on the propagation of causal dependencies, and the role differentiation characteristics of events in multi-cause-multi-effect structures, this invention provides a multi-stage causal reasoning and narrative consistency verification method and system based on a large model.

[0009] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0010] In this invention, the large model is a pre-trained large language model, including but not limited to GPT, GLM, LLaMA, BERT-like models or other pre-trained language models based on the Transformer architecture.

[0011] A multi-stage causal reasoning and narrative consistency verification method based on a large model includes the following steps:

[0012] Step 1: Use a pre-trained large language model to perform multi-perspective causal heuristic reasoning on candidate event pairs to generate multi-dimensional heuristic prior information, which is used to quantify the strength of potential causal associations between candidate event pairs.

[0013] Step 2: Construct a structural hypergraph without causal assumptions. The structural hypergraph is used to encode the co-reference relationships and structural co-occurrence constraints between events, and to generate prior information for candidate event pairs based on the structural hypergraph.

[0014] Step 3: Fuse the multidimensional heuristic prior information with the structure-supporting prior information, construct a narrative consistency verification model based on the topological Hawkes process, use the narrative consistency verification model to evaluate the global rationality of candidate causal relationships under the constraints of document structure and narrative order, and calculate the expected effective strength of candidate causal edges based on the evaluation results.

[0015] Step 4: Construct an initial chapter-level causal graph based on the expected effective strength, and use a multi-round self-iterative mechanism of "identification-verification-correction" to dynamically optimize the chapter-level causal graph. In each round of iteration, the event node representation is updated based on the causal graph structure optimized in the previous round, and the candidate causal edges are re-scored.

[0016] Step 5: During the multi-round self-iteration process, perform two-layer structure-aware contrastive learning, which includes event-level structure contrastive learning and event-pair level structure contrastive learning, to apply structural discriminative constraints to event representations and event-pair representations in order to stabilize the convergence of causal structures.

[0017] Furthermore, step 1 specifically includes the following steps:

[0018] Step 1.1: Select candidate event pairs (e i e j The text and its context are input into a large language model to generate multi-perspective chain reasoning text and extract multi-dimensional heuristic evidence, including semantic heuristic evidence, syntactic role heuristic evidence, dependency path heuristic evidence and temporal order heuristic evidence.

[0019] Step 1.2: Map the heuristic evidence of each dimension to the confidence score in the interval [0,1] to obtain the heuristic evidence vector. The heuristic score for the k-th dimension is denoted as ; ;

[0020] in, This represents semantic heuristic scoring; Represents syntactic heuristic scoring; This indicates a dependency heuristic scoring method; Indicates time-based heuristic scoring; ;

[0021] Semantic heuristic scoring based on semantic feature information This is used to assess whether there are explicit causal triggering features or outcome-oriented semantic patterns in the event description. It is obtained by matching the inference text generated by LLM with semantic cues in the original statement. The calculation formula is as follows: ;

[0022] in, , , which are weighting coefficients used to balance the contribution of different semantic features; the semantic features include: explicit causal semantic triggering features: when a sentence or inference text contains causal indicator words or causal phrases, the event pair is considered to have a potential causal relationship, and the causal confidence of the corresponding candidate event pair is high; outcome dependency expression features: when event e j Semantically represented as event e i When the consequences or purpose are the same, the causal association score is increased; background co-occurrence inhibition feature: when two events only share the same background conditions and there is no clear outcome dependency, the causal association strength is not positively enhanced.

[0023] Syntactic heuristic scoring based on event role relationships It is used to model the potential causal explanatory relationships between events from the perspective of syntactic functional structure and event causal roles. Its calculation formula is as follows: ;

[0024] The rules include: Representing causal role connection structure: When events are connected by causal conjunctions or prepositional phrases, the causal confidence is increased; The subordinate clause represents a principal-subordinate explanatory structure: in a complex sentence structure, when the subordinate clause explains the cause of the event in the main clause, it increases the causal strength; Represents a causal role constraint structure: when event e i As the agent component of a causal predicate, and event e j When used as a result or a patient component, it increases the causal association score.

[0025] Dependency heuristic scoring is calculated based on event dependency paths in dependency syntax structures. It is used to capture the potential causal path relationships between event-triggered words in dependency syntax structures, with a focus on identifying dependency trees. The structural causal model in [the context] is calculated using the following formula: ;

[0026] When there is no direct or indirect causal path in the dependency structure for candidate event pairs, no positive weighting is applied to the causal strength.

[0027] Time-based heuristic scoring based on the chronological order of events This is used to evaluate whether a pair of events satisfies an explicit or implicit temporal order, and its calculation formula is as follows: ;

[0028] If event e i Prior to event e in chronological order j If the time sequence is reversed, the causal confidence score will be increased; if the time sequence is reversed, the causal strength will be decreased; if there is only a temporal relationship but no semantic or structural support, the overall causal score will not be improved individually.

[0029] Step 1.3: Calculate the heuristic causal strength score of the candidate event pair by taking a weighted average of the scores of each dimension in the heuristic evidence vector. The calculation formula is: ;

[0030] Where K is the total number of dimensions of the heuristic evidence.

[0031] The LLM heuristic causal strength score is input as soft causal prior information into the subsequent structural consistency verification module and causal structure iterative optimization module. It is used to guide the structural consistency verification and dynamic optimization of causal relationships, but not as the final causal determination basis.

[0032] Furthermore, step 2 specifically includes the following steps:

[0033] Step 2.1: In chapter-level narrative texts, events typically exist within a shared structural environment. To model higher-order relationships between events at the structural level, this invention constructs a structural hypergraph that does not include causal labels or directional assumptions. ,in For a set of event nodes, To represent a set of hyperedges used solely to characterize structural sharing relationships and equivalence constraints, wherein the hyperedges characterize structural sharing relationships and equivalence constraints between events and do not contain any explicit causal semantic information;

[0034] Step 2.2: For each event's coreference cluster ∈C, construct the corresponding core-referenced hyperedge This allows event nodes belonging to the same co-referenced cluster to be connected in the same hyperedge, representing the structural equivalence constraint that multiple event references point to the same conceptual event;

[0035] Step 2.3: For any candidate event pair (e i e j Extracting multidimensional structural support vectors from the structural hypergraph The structural support vectors include co-occurrence frequency features, structural location dissimilarity features, and structural centrality features; the structural support vectors are used to characterize the potential support of event pairs in the structural hypergraph, serving as the structural soft input signal of the Hawkes process. ;

[0036] in, Indicates co-occurrence frequency characteristics; Indicates structural positional differences; Indicates structural centrality;

[0037] Calculate the co-occurrence frequency characteristics of event pairs in core-pointing hyperedges. This metric is used to determine whether two events simultaneously belong to the same hyperedge; it reflects the degree of binding between event concepts in the structure. The higher the frequency, the stronger the potential association between the event pairs in the shared structure. ;in, `h` is an indicator function that takes the value 1 when the condition within the parentheses is true, and 0 otherwise; `h` represents a hyperedge in the structural hypergraph, used to represent a set of events with coreference or structural sharing relationships. This feature reflects the degree to which event pairs are repeatedly co-encoded across multiple structural units.

[0038] Calculate the structural location difference features of event pairs It is used to depict the functional positional differences of events within a narrative, rather than simply linear textual distance. .

[0039] Step 2.3.1: Map each event e to a low-dimensional location encoding vector, calculated as follows: ;in, This refers to the normalized relative position of the event within the sentence. Normalized encoding for the functional section to which the event belongs;

[0040] Step 2.3.2, paragraph proxy based on the sentence where the event is located. Total number of sentences in the document It is divided into an intro section, a development section, and an outcome section to determine the paragraph type to which the event belongs. : ;

[0041] Step 2.3.2, let the set of location dimensions be... ={sent, para-proxy}, then the structural position difference feature of the event pair is defined as: ;

[0042] in, (e) represents the normalized positional encoding of event e under structural role r. The difference is used as a weak structural constraint signal input to the subsequent inference module.

[0043] Calculate the structural centrality of events , used to represent the number of hyperedge connections of an event node in the structural hypergraph; ;

[0044] Among them, Centrality ( )=|{h∈ε s |e∈h}|; Events with higher centrality are more likely to be located at the intersection of multiple potential causal chains. This metric is used to characterize the connectivity of events in a structure-sharing network and serves as a priori input to the global structure.

[0045] Step 2.4: By aggregating the features in the multidimensional structural support vectors, the structural causal strength score of the candidate event pair is calculated. The calculation formula is: ;

[0046] The structural causal strength is used as a soft prior input at the structural level to the subsequent causal reasoning and consistency verification modules, rather than as the final causal determination result.

[0047] Furthermore, step 3 specifically includes the following steps:

[0048] Step 3.1: To impose overall constraints on the candidate causal structure regarding narrative order, event role allocation, and chapter structure, this invention introduces a Topological Hawkes Process (THP) as a consistency verification module. All events in the chapter are represented as an ordered set of events, and for each event e... i Assign a discrete narrative time identifier t i When there are explicit time relationship annotations in the text, determine t based on the existing explicit time relationship annotations. i When there is no explicit time relation annotation, t is determined based on the textual order of the sentences containing the events. i ;

[0049] Step 3.2: For any event e j Its narrative time t j The conditional strength function at a given location is defined as: ;in, To fix the narrative prior parameters; The kernel function decreases with narrative distance; A is the adjacency matrix of the current candidate causal structure; parameters Indicates event e i For e j The strength of explanatory dependency; This indicates an indicator function that takes the value 1 when the condition within the parentheses is true and 0 otherwise, used to indicate event pairs (e... i , e j Does it exist in the adjacency matrix A of the current candidate causal structure?

[0050] Event e in the initial iteration phase i For e j The explanatory dependency strength is suggested by the LLM heuristic. With Hypergraph Structural Recommendations The weighted fusion is obtained, and its calculation formula is as follows: ; where β1 and β2 are learnable fusion weights;

[0051] Step 3.3: Based on the above conditional strength function, construct the negative log-likelihood objective function for THP: ;

[0052] By alternately optimizing all parameters This process suppresses pseudo-causal edges that are locally plausible but inconsistent with the overall narrative. After optimization, the expected effective strength of the candidate causal edges is used as the edge weights of the discourse-level causal graph. ;

[0053] Step 3.4: After the discriminant graph structure correction stage is completed, the updated causal adjacency matrix is ​​re-inputted into the narrative consistency verification module to perform a consistency check on the updated candidate causal structure again, so as to form an iterative optimization process of candidate causal relationship ("suggestion-verification-correction").

[0054] Furthermore, step 4 specifically includes the following steps:

[0055] Step 4.1 involves constructing a weighted directed causal graph to model the global causal dependencies between events at the discourse level. ,in, Represents a set of event nodes. Denotes the set of candidate causal edges. Describe the set of edge weights.

[0056] The edge weights are initialized using the expected effective strength output in step 3;

[0057] To reduce the over-reliance on prior weights in the early stages of training, the initial edge weights are perturbed, and the calculation formula is as follows: ;

[0058] in, This indicates a random perturbation. This represents the adjustment parameters that increase with each training round; it enables the gradual fusion of semantic and structural information.

[0059] Step 4.2 involves alternating between graph structure updates, representation propagation, and edge-level corrections in multiple iterations.

[0060] In the l-th iteration, event pairs with confidence scores higher than a preset threshold are selected based on the current causal graph structure to construct a candidate edge set: ;in, Represents the set of candidate causal edges within a sentence; Represents the set of candidate causal edges across sentences;

[0061] Based on the candidate edge set, the event node representation is updated through a graph structure propagation mechanism, and the graph structure is corrected and updated by combining the candidate causal edge weights. The calculation process is as follows: ;in, Represents the structure correction operator; This represents the weight matrix output by the consistency verification module; Let represent the causal prior matrix in the l-th iteration;

[0062] Step 4.3: Based on the updated node representation, re-evaluate the candidate causal edges using the following formula: ;in, and This represents the event after the l-th iteration; A learnable parameter vector; The function is a normalization function; when the change in the prediction results between two adjacent rounds is lower than a preset threshold and the minimum number of iterations is reached, the iteration terminates and the final causal graph is output. Otherwise, continue with the structure update and consistency verification process.

[0063] Furthermore, step 5 includes a structural contrastive learning mechanism and a loss modeling mechanism, wherein the structural contrastive learning mechanism includes two levels: event-level structural contrastive learning and event-pair-level structural contrastive learning, specifically including the following steps:

[0064] Step 5.1: In each round of causal graph structure iteration, based on the current chapter-level causal graph structure, dynamically construct a set of positive samples and a set of negative samples for comparative learning, thereby forming an iterative perceptual structure comparative learning mechanism.

[0065] Positive samples represent events or event pairs that have consistent structural roles or true causal relationships in the current causal graph; negative samples represent events or event pairs that have similar structures but no causal relationship.

[0066] The dynamic sample construction mechanism updates synchronously based on the causal graph structure under the current iteration round, so that the optimization direction of the structure representation is consistent with the evolution state of the graph structure.

[0067] Step 5.2, in the event-level structure contrastive learning phase, is used to constrain the consistency of the structural role of individual events in the causal system. For any event representation... A local causal subgraph is constructed based on the one-hop causal adjacency structure of the current causal graph to characterize the structural role of an event in the causal graph.

[0068] Represented by events Positive samples are selected from the set of events with consistent structural roles as anchor samples. Simultaneously, a negative sample set is constructed, which includes difficult negative samples that are structurally most similar but have inconsistent roles. And negatively susceptible samples obtained by random sampling Thus, a sample set is constructed: ;

[0069] Based on the above sample set, the event-level contrastive loss is trained using a weighted contrast optimization objective, and the event-level structural contrastive loss function is defined as follows: ;

[0070] in, For temperature coefficient, The weight coefficients represent the weights of different samples. Through the above structural comparison and optimization, event representations with similar structural roles are made closer in the representation space, thereby enhancing the consistency of event structural roles. The loss is used to constrain the structural properties of event representations and does not directly participate in causal relationship classification prediction.

[0071] Step 5.3, in the event-pair hierarchical structure contrastive learning phase, event pairs are used as representations. As anchor point samples, By event e i With event e j The joint representation constitutes;

[0072] Construct a positive sample set for event pairs with a genuine causal relationship. Simultaneously, a negative sample set is selected from event pairs that are structurally similar but have no causal relationship; through structural similarity-driven contrastive optimization, discriminative constraints are imposed on the event pair representations, and its loss function is defined as: ;

[0073] in, For interval parameters, This represents the truncation function; through the above comparison constraints, event pairs with real causal relationships are brought closer together in the representation space, while event pairs without causal relationships are effectively separated.

[0074] Step 5.4: During the multi-round graph structure iteration process, a unified model for causal relationship prediction is performed by propagating the classification loss of risk perception. The loss function is defined as: ;

[0075] in, Represents the event pair (e) in the l-th iteration. i e j The predicted probability that a given class belongs to the true class c; This indicates that the loss is optimized using a focus loss function with a balance factor.

[0076] The final training objective is defined as: ;

[0077] in, and These are weighting coefficients used to balance the optimization objective between classification loss and structural contrast loss. Specifically... A preheating mechanism is used to stabilize the event representation space. The classifier is gradually enabled after it converges to constrain the causal discrimination boundary.

[0078] A multi-stage causal reasoning and narrative consistency verification system based on a large model is used to perform the method described above. The system includes: a causal heuristic reasoning module based on a large model, a hypergraph structure causal suggestion module, a narrative consistency verification module, a dynamic causal graph construction and update module, and a two-layer structure perception contrastive learning module.

[0079] Specifically, the large-model-based causal heuristic reasoning module is used to execute step 1; the hypergraph structure causal suggestion module is used to execute step 2; the narrative consistency verification module is used to execute step 3; the dynamic causal graph construction and update module is used to execute step 4; and the two-layer structure perception contrastive learning module is used to execute step 5.

[0080] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described method for multi-stage causal reasoning and narrative consistency verification based on a large model.

[0081] A non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for multi-stage causal reasoning and narrative consistency verification based on a large model.

[0082] Compared with the prior art, the present invention has the following advantages:

[0083] (1) This invention models the causal reasoning results of large models as correctable multidimensional soft priors, and combines them with the structural hypergraph support mechanism without causal assumptions to achieve the synergistic effect of semantic reasoning and structural constraints, thereby reducing the probability of misjudgment caused by relying solely on semantic information for causal judgment.

[0084] (2) This invention introduces a narrative consistency verification mechanism based on topological Hawkes process, which performs global consistency verification on candidate causal relationships from two dimensions: document topology and narrative time constraints, thereby effectively suppressing false causal relationships that violate the narrative logic of the text.

[0085] (3) The present invention constructs a dynamically evolving chapter-level causal graph. Through a multi-round "identification-verification-correction" iterative update mechanism, the causal relationship is continuously optimized, the noise causal edge is gradually weakened and the consistency of the overall causal structure is enhanced, thereby improving the stability of causal structure modeling.

[0086] (4) The present invention designs a two-layer structured perceptual contrast learning mechanism, which applies discriminative constraints to the causal structure at both the event level and the event pair level, making up for the shortcomings of existing methods that rely solely on semantic contrast learning, and enhancing the model’s ability to identify multi-cause and multi-effect structures and role differences.

[0087] Therefore, this invention can effectively improve the accuracy and structural stability of chapter-level event causal relationship identification by introducing structural constraints and narrative consistency verification mechanisms while ensuring semantic reasoning capabilities. Attached Figure Description

[0088] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0089] Figure 1 This is a flowchart of the multi-stage causal reasoning and narrative consistency verification method based on a large model proposed in this embodiment of the invention;

[0090] Figure 2 This is a data example used in this invention;

[0091] Figure 3 This is a structural diagram of the causal heuristic reasoning module based on a large model of the present invention;

[0092] Figure 4 This is a structural diagram of the hypergraph structure causal suggestion module of the present invention;

[0093] Figure 5 This is a schematic diagram of the narrative consistency verification, dynamic causal graph update, and structure-aware comparative learning modules of the present invention.

[0094] Figure 6 This invention relates to a dynamic causal structure iterative optimization algorithm based on narrative consistency verification.

[0095] Figure 7 This is a schematic diagram of the structure of a multi-stage causal reasoning and narrative consistency verification method and system based on a large model, provided in an embodiment of the present invention.

[0096] Figure 8 This is a schematic diagram of the overall structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0097] To gain a deeper understanding of this invention, we will provide a comprehensive and detailed description. However, this invention has various implementations and is not limited to the specific examples listed herein. These examples are presented to enhance a full understanding of the disclosure of this invention.

[0098] like Figure 1As shown in the structural diagram, a multi-stage causal reasoning and narrative consistency verification system based on a large model is provided. This system includes a causal heuristic reasoning module based on a large model, a hypergraph-structured causal suggestion module, a narrative consistency verification module, a dynamic causal graph construction and update module, and a two-layer structure-aware contrastive learning module.

[0099] The causal heuristic reasoning module based on the large model uses a large language model to perform causal reasoning on candidate event pairs and models the reasoning results as correctable multidimensional heuristic soft priors to characterize the potential causal strength of candidate event pairs.

[0100] The hypergraph structure causal suggestion module introduces a structure hypergraph without causal assumptions, only encoding co-reference and structure co-occurrence constraints, and generates stable structure support priors for event sharing scenarios.

[0101] The narrative consistency verification module verifies the overall rationality of the candidate causal relationship under the constraints of document structure and narrative order by simulating a topological Hawkes process, from the perspective of document topology and discrete narrative time.

[0102] The dynamic causal graph construction and update module is used to construct a dynamically evolving chapter-level causal graph, which gradually weakens noisy edges and strengthens the globally self-consistent causal structure in multiple rounds of "identification-verification-correction" process;

[0103] The dual-layer structure-aware contrastive learning module applies a discriminative bias to the model at the structural level to ensure stable structural convergence, thus overcoming the shortcomings of existing methods that rely solely on semantic contrastive learning.

[0104] Example 1

[0105] like Figure 2 As shown, taking the event causality identification task as an application scenario, the EventStoryLine v9.0 (ESC) dataset is selected as example data to illustrate the method of the present invention: Figure 2 The upper part shows a document example from the ESC dataset, containing 5 sentences and 15 events. Darker areas indicate different event mentions; Figure 2 The lower half shows the overall narrative causal framework of the document. The dashed boxes indicate situations where multiple event mentions belong to the same event concept. In this embodiment, they are uniformly classified and modeled as event concepts. For example, the event mentions "power outage" and "power interruption" both belong to the event concept "power outage". Figure 2 The lower half also shows the multi-cause-multi-effect structure in the document. Solid lines represent causal relationships between events across sentences, while dashed lines represent causal relationships between events within a sentence.

[0106] like Figure 1The diagram shown illustrates the overall architecture of the multi-stage causal reasoning and narrative consistency verification method based on a large model proposed in this invention. The ESC dataset will be described in further detail below with reference to the accompanying drawings:

[0107] Step 1, as follows Figure 3 As shown, firstly, an updatable heuristic prior information is generated using a large-model-based causal heuristic reasoning module. For any candidate event pair (e... i e j The inference results and their context information are input into a large language model to generate multi-perspective inference text. The inference results are then mapped to confidence scores within [0,1] to characterize the strength of potential causal relationships between candidate events from different semantic perspectives. The calculation formula is as follows: ;

[0108] The heuristic scoring methods satisfy the following constraints: The four dimensions mentioned above correspond to semantic heuristics, causal role heuristics, dependency heuristics, and temporal order heuristics, respectively. By weighted fusion of heuristic scores from different perspectives, the LLM heuristic causal strength of candidate event pairs is obtained: ;

[0109] Step 2, the hypergraph structure causal suggestion module constructs a structural hypergraph without causal assumptions. This generates stable structures to support prior knowledge for event-sharing scenarios. For example... Figure 4 As shown in the diagram, nodes represent event nodes within the same document, and dashed boxes represent sets of events with coreference relationships, meaning multiple similar event mentions point to the same event concept. Different types of edges indicate potential overlap between coreference relationships. For example, "shooting / shot / killing / killed" forms a coreference cluster, while "shooting / shot / wounded" also forms a coreference cluster, indicating an overlap between them. For each coreference cluster... ∈C, construct the corresponding core-referenced hyperedge This is used to characterize the structural equivalence constraint of multiple event references pointing to the same conceptual event. Based on this, for any event pair (e... i e j Extracting multidimensional structural support vectors from the structural hypergraph The structural support vectors are composed of several structural feature functions, used to comprehensively characterize information such as the association strength, structural position differences, and global structural importance of event pairs within a shared coreference structure. By fusing and calculating these structural features, the structural causal strength of the event pairs is obtained. This is used as a soft prior at the structural level for subsequent causal relationship determination.

[0110] Step 3: Utilize the narrative consistency verification module to perform a global narrative rationality verification on the candidate causal relationships. For example... Figure 5 As shown in (1), in the specific implementation, for each event e in the document j Assign it a corresponding discrete narrative time identifier t j This is used to indicate the order in which events appear in the document narrative. Based on this, event e is defined. j The conditional strength function is: ;

[0111] in, To fix the narrative prior parameters, so as to ensure that the event can still exist as an independent narrative unit when no causal parent node is selected; The kernel function is a function that decreases with narrative distance, used to characterize the decay of causal influence with narrative intervals; A is the adjacency matrix of the current candidate causal structure; parameters Indicates event e i For e j The strength of explanatory dependency.

[0112] In the initial iteration phase, the dependency strength In the initial iteration phase, it is obtained by fusing LLM heuristics with structural prior information, and its calculation formula is as follows: ;

[0113] in, The causal suggestion score output by the causal heuristic reasoning module based on a large model; The structural support strength output by the Hypergraph Structure Causal Proposal module; and To integrate the weight parameters, a negative log-likelihood objective function for the topological Hawkes process is then constructed based on the aforementioned conditional strength function. This objective function is then optimized alternately for all dependency strengths. The parameters are updated to suppress pseudo-causal relationships that are locally plausible but do not conform to the overall narrative structure.

[0114] After optimization, the expected effective strength of the candidate causal edges is calculated and used as the weight of the corresponding edge in the chapter-level causal graph. The calculation form is as follows: ;

[0115] After obtaining the updated causal structure, it is re-input into the narrative consistency verification module for another consistency evaluation. The causal relationship is further adjusted in conjunction with the subsequent structure correction module, thus forming an iterative optimization process of "suggestion-verification-correction" to gradually obtain a causal structure that conforms to the narrative logic of the text.

[0116] Step 4: Utilize the dynamic causal graph construction and update module to construct and iteratively correct the candidate causal structure. For example... Figure 5 As shown in (2), firstly, based on the set of event nodes in the document... The edge weight set output by the narrative consistency verification module in step 3 Construct an initial chapter-level weighted directed causal graph In this causal graph, nodes represent events in the document; edges represent candidate causal relationships between events; and edge weights represent the effective strength of the corresponding causal relationship. In the causal graph, solid lines represent intra-sentence causal relationships, dashed lines represent cross-sentence causal relationships, and edge thickness indicates the strength of the causal relationship. Unlike static graph construction methods, this invention introduces a dynamic iterative graph construction mechanism, alternately performing graph structure updates, event representation propagation, and edge-level consistency correction during multiple iterations to progressively optimize the document-level causal structure.

[0117] In the l-th iteration, the current causal graph is updated based on the structural evaluation results output by the narrative consistency verification module, and the update form is as follows: ;

[0118] in, For structural correction operators; This represents the structure weight matrix output by the narrative consistency verification module; This represents the causal prior matrix for the current iteration round. The causal graph obtained after each round of structural correction will serve as the input to the consistency verification module in the next round, thus forming a dynamic feedback mechanism across modules.

[0119] During the graph structure update process, the model first filters high-confidence event pairs based on the current edge weight strength and constructs a candidate edge set: ;

[0120] in, Represents the set of candidate causal edges within a sentence; This represents the set of candidate causal edges across sentences.

[0121] Subsequently, based on the updated event representation, the candidate causal edges are re-evaluated for edge-level consistency, and their edge-level scores are calculated as follows: ;

[0122] in, and This is the event representation vector after the l-th iteration; A learnable parameter vector; This is the normalization function. Through the aforementioned edge-level scoring mechanism, candidate causal edges are preserved or weakened, thereby achieving dynamic correction of noisy causal relationships.

[0123] When the causal prediction change between two adjacent iterations is lower than a preset threshold and the minimum number of iterations is reached, the iteration process terminates, and the final chapter-level causal graph is output. Otherwise, continue the iterative optimization process of "identification-verification-correction" to gradually weaken noisy causal edges and strengthen the globally self-consistent chapter-level causal structure.

[0124] Through the aforementioned dynamic composition and structural correction mechanism, candidate causal relationships can be continuously structurally corrected under the constraints of the overall text structure, thereby obtaining a more stable text-level causal structure that conforms to narrative logic.

[0125] Step 5: Utilize the contrastive learning module of the two-layer structured perception to perform structural constraint learning on the event representation and event pair representation, thereby stabilizing the convergence process of the causal structure. For example... Figure 5 As shown in (3), this module includes two levels: event-level structure comparison learning and event-pair-level structure comparison learning. First, in the event-level structure comparison learning stage, for any event representation... A local causal subgraph is constructed using its one-hop causal adjacency structure to characterize the structural role of an event in the current causal graph. This is represented by events. Positive samples are selected from the set of events with consistent structural roles as anchor samples. Simultaneously, a negative sample set is constructed, which includes difficult negative samples that are structurally most similar but have inconsistent roles. And negatively susceptible samples obtained by random sampling Therefore, a sample set is constructed: ;

[0126] Based on the above sample set, the event-level structure contrast loss function is defined as follows: ;

[0127] in, For temperature coefficient, This represents the weight coefficients of different samples. Through this comparative optimization process, events with similar structural roles are made closer in the representation space, thereby enhancing the consistency of the event's structural roles.

[0128] Furthermore, in the event-pair hierarchical structure contrastive learning phase, event pairs are used as representations. As anchor point samples, By event e i With event e j The joint representation is constructed. For event pairs with a true causal relationship, a positive sample set is constructed. Simultaneously, a negative sample set is selected from event pairs that are structurally similar but not causally related. Through structural similarity-driven contrastive optimization, discriminative constraints are imposed on the event pair representations, and its loss function is defined as: ;in, For interval parameters, This represents the truncation function.

[0129] By employing the aforementioned two-layer comparative learning mechanism of event level and event pair level, structural discrimination constraints are imposed on event representations and event pair representations, thereby enhancing the structural consistency of the model in the causal structure identification process and promoting the stable convergence of the dynamic causal graph in the multi-round iterative update process.

[0130] In the multi-round graph structure iteration process, the task of classifying event pairs is uniformly modeled as a structural classification loss for propagating risk perception, and its calculation formula is as follows: ;in, This indicates that during the l-th iteration, the event pair (e) i e j The predicted probability that a given class belongs to the true class c; This represents the focus loss function with a balance factor, used to reduce the impact of sample imbalance on the model training process.

[0131] Finally, the overall training objective function of the model is defined as: ;in, and The loss weight parameter is used to adjust the contribution ratio between structural contrastive learning and the classification objective.

[0132] By jointly optimizing the model using the aforementioned training objective function, event representation learning, event pair discrimination, and causal structure modeling are updated collaboratively within a unified optimization framework, thereby obtaining more stable causal structure recognition results that conform to the narrative logic of the text.

[0133] The dynamic causal structure iterative optimization algorithm based on narrative consistency verification of this invention is as follows: Figure 7 As shown.

[0134] Example 2

[0135] This invention provides a method and system for multi-stage causal reasoning and narrative consistency verification based on a large model. Specifically, the process of the above-described embodiment of the multi-stage causal reasoning and narrative consistency verification method based on a large model is executed. For details, please refer to the content of the above-described embodiment of the multi-stage causal reasoning and narrative consistency verification method based on a large model, which will not be repeated here.

[0136] This embodiment provides an electronic device. Figure 8The diagram below shows the overall structure of an electronic device provided in an embodiment of the present invention. The device includes a processor, a memory, a communication bus, and a communication interface; wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory stores program instructions that can be executed by the processor. The processor can execute the methods provided in the above-described method embodiments by calling the program instructions. For example, these methods include: encoding event mentions, sentences, and documents using a pre-trained language model to output semantic representations of the information; using a large-model-based causal heuristic reasoning module to perform multi-perspective reasoning on candidate event pairs and generate corresponding heuristic causal strength scores; constructing a structure hypergraph without causal assumptions and generating structure support priors based on event co-reference and structure co-occurrence relationships; using a narrative consistency verification module to verify the consistency of candidate causal relationships in the document narrative structure by simulating a topological Hawkes process and obtaining the effective strength of candidate causal edges; constructing a dynamically evolving chapter-level causal graph based on the verification results and updating the causal structure in multiple rounds of "identification-verification-correction" iterations; using a two-layer structure-aware contrastive learning module to apply structural discriminative constraints to event representations and event pair representations to promote the stable convergence of the causal structure during the iteration process; and outputting the final chapter-level event causal structure recognition result.

[0137] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), and random access memory (RAM).

[0138] This embodiment provides a non-transitory computer-readable storage medium that stores computer instructions. These instructions cause a computer to execute the methods provided in the above embodiments, including, for example: encoding event mentions, sentences, and documents using a pre-trained language model to output semantic representations of the information; using a large-model-based causal heuristic reasoning module to perform multi-perspective reasoning on candidate event pairs and generate corresponding heuristic causal strength scores; constructing a structure hypergraph without causal assumptions and generating structure-supporting priors based on event co-reference and structural co-occurrence relationships; using a narrative consistency verification module to verify the consistency of candidate causal relationships in the document narrative structure by simulating a topological Hawkes process and obtaining the effective strength of candidate causal edges; constructing a dynamically evolving chapter-level causal graph based on the verification results and updating the causal structure during multiple rounds of "identification-verification-correction" iterations; using a two-layer structure-aware contrastive learning module to apply structural discriminative constraints to event representations and event pair representations to promote stable convergence of the causal structure during the iteration process; and outputting the final chapter-level event causal structure recognition result.

[0139] Contents not described in detail in this specification are prior art known to those skilled in the art. Although illustrative specific embodiments of the invention have been described above to facilitate understanding by those skilled in the art, it should be understood that the invention is not limited to the scope of the specific embodiments. Various modifications are readily apparent to those skilled in the art as long as they fall within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of this invention are protected.

Claims

1. A multi-stage causal reasoning and narrative consistency verification method based on a large model, characterized in that, Includes the following steps: Step 1: Use a pre-trained large language model to perform multi-perspective causal heuristic reasoning on candidate event pairs to generate multi-dimensional heuristic prior information, which is used to quantify the strength of potential causal associations between candidate event pairs. Step 2: Construct a structural hypergraph without causal assumptions. The structural hypergraph is used to encode the co-reference relationships and structural co-occurrence constraints between events, and to generate prior information for candidate event pairs based on the structural hypergraph. Step 3: Fuse the multidimensional heuristic prior information with the structure-supporting prior information, construct a narrative consistency verification model based on the topological Hawkes process, use the narrative consistency verification model to evaluate the global rationality of candidate causal relationships under the constraints of document structure and narrative order, and calculate the expected effective strength of candidate causal edges based on the evaluation results. Step 4: Construct an initial chapter-level causal graph based on the expected effective strength, and use a multi-round self-iterative mechanism of "identification-verification-correction" to dynamically optimize the chapter-level causal graph. In each iteration, the event node representation is updated based on the causal graph structure optimized in the previous round, and the candidate causal edges are re-scored. Step 5: During the multi-round self-iteration process, perform two-layer structure-aware contrastive learning, which includes event-level structure contrastive learning and event-pair level structure contrastive learning, to apply structural discriminative constraints to event representations and event-pair representations in order to stabilize the convergence of causal structures.

2. The method for multi-stage causal reasoning and narrative consistency verification based on a large model according to claim 1, characterized in that, Step 1 specifically includes the following steps: Step 1.1: Select candidate event pairs (e i e j The text and its context are input into a large language model to generate multi-perspective chain reasoning text and extract multi-dimensional heuristic evidence, including semantic heuristic evidence, syntactic role heuristic evidence, dependency path heuristic evidence and temporal order heuristic evidence. Step 1.2: Map the heuristic evidence of each dimension to the confidence score in the interval [0,1] to obtain the heuristic evidence vector. The heuristic score for the k-th dimension is denoted as ; ; in, This represents semantic heuristic scoring; Represents syntactic heuristic scoring; This indicates a dependency heuristic scoring method; Indicates time-based heuristic scoring; ; Semantic heuristic scoring based on semantic feature information Syntactic heuristic scoring based on event role relationships Dependency heuristic scoring is calculated based on event dependency paths in dependency syntax structures. Time-based heuristic scoring based on the chronological order of events ; Step 1.3: Calculate the heuristic causal strength score of the candidate event pair by taking a weighted average of the scores of each dimension in the heuristic evidence vector. The calculation formula is: ; Where K is the total number of dimensions of the heuristic evidence; The LLM heuristic causal strength score is used as soft causal prior information input to the subsequent structural consistency verification module and causal structure iterative optimization module.

3. The method for multi-stage causal reasoning and narrative consistency verification based on a large model according to claim 1, characterized in that, Step 2 specifically includes the following steps: Step 2.1: Construct a structural hypergraph in the chapter-level narrative text that does not contain causal labels or directional assumptions. ,in For a set of event nodes, It is a set of hyperedges, which are used to characterize the structural sharing relationship and equivalence constraint between events, and do not contain any explicit causal semantics; Step 2.2: For each event's coreference cluster ∈C, construct the corresponding core-referenced hyperedge This connects event nodes belonging to the same co-referenced cluster to the same hyperedge, representing the structural equivalence relation of multiple event references pointing to the same conceptual event; Step 2.3: For any candidate event pair (e i e j Extracting multidimensional structural support vectors from the structural hypergraph The structural support vectors include co-occurrence frequency features, structural location dissimilarity features, and structural centrality features. ; in, Indicates co-occurrence frequency characteristics; Indicates structural positional differences; Indicates structural centrality; Calculate the co-occurrence frequency characteristics of event pairs in core-pointing hyperedges. This is used to determine whether two events belong to the same superedge simultaneously. ; in, For indicator functions; Calculate the structural location difference features of event pairs This is used to depict the differences in the functional position of events within a narrative; ; Calculate the structural centrality of events , used to represent the number of hyperedge connections of an event node in the structural hypergraph; ; Among them, Centrality ( )=|{h∈ε s |e∈h}|; Step 2.4: By aggregating the features in the multidimensional structural support vectors, the structural causal strength score of the candidate event pair is calculated. The calculation formula is: ; The structural causal strength is used as a soft prior input at the structural level to the subsequent causal reasoning and consistency verification modules, rather than as the final causal determination result.

4. The method for multi-stage causal reasoning and narrative consistency verification based on a large model according to claim 1, characterized in that, Step 3 specifically includes the following steps: Step 3.1: Represent all events in the chapter as an ordered set of events, and assign a value to each event e. i Assign a discrete narrative time identifier t i When there are explicit time relationship annotations in the text, determine t based on the existing explicit time relationship annotations. i When there is no explicit time relation annotation, t is determined based on the textual order of the sentences containing the events. i ; Step 3.2: For any event e j Its narrative time marker t j The conditional strength function at a given location is defined as: ; in, To fix the narrative prior parameters; The kernel function decreases with narrative distance; A is the adjacency matrix of the current candidate causal structure; parameters Indicates event e i For e j The strength of explanatory dependency; For indicator functions; Event e in the initial iteration phase i For e j The explanatory dependency strength is suggested by the LLM heuristic. With Hypergraph Structural Recommendations The weighted fusion is obtained, and its calculation formula is as follows: ; Among them, β1 and β2 are learnable fusion weights; Step 3.3: Based on the above conditional strength function, construct the negative log-likelihood objective function for THP: ; By optimizing parameters The expected effective strength of candidate causal edges is obtained and used as the edge weights of the chapter-level causal graph: ; Step 3.4: After the graph structure correction stage is completed, the updated causal adjacency matrix is ​​re-inputted into the narrative consistency verification module to perform a consistency check on the updated candidate causal structure again, so as to form an iterative optimization process for candidate causal relationships.

5. The method for multi-stage causal reasoning and narrative consistency verification based on a large model according to claim 1, characterized in that, Step 4 specifically includes the following steps: Step 4.1: Construct a weighted directed causal graph , in, Represents a set of event nodes. Denotes the set of candidate causal edges. Describe the set of edge weights. The edge weights are initialized using the expected effective strength output in step 3; To reduce the over-reliance on prior weights in the early stages of training, the initial edge weights are perturbed, and the calculation formula is as follows: ; in, This indicates a random perturbation. This indicates the adjustment parameter that increases with each training round; Step 4.2: In the l-th iteration, select event pairs with confidence scores higher than a preset threshold based on the current causal graph structure to construct a candidate edge set. ; in, Represents the set of candidate causal edges within a sentence; Represents the set of candidate causal edges across sentences; Based on the candidate edge set, the event node representation is updated through a graph structure propagation mechanism, and the graph structure is corrected and updated by combining the candidate causal edge weights. The calculation process is as follows: ; in, Represents the structure correction operator; This represents the weight matrix output by the consistency verification module; Let represent the causal prior matrix in the l-th iteration; Step 4.3: Based on the updated node representation, re-evaluate the candidate causal edges using the following formula: ; in, and This represents the event after the l-th iteration; A learnable parameter vector; The function is a normalization function; when the change in the prediction results between two adjacent rounds is lower than a preset threshold and the minimum number of iterations is reached, the iteration terminates and the final causal graph is output. Otherwise, continue with the structure update and consistency verification process.

6. The method for multi-stage causal reasoning and narrative consistency verification based on a large model according to claim 1, characterized in that, Step 5 includes a structural contrastive learning mechanism and a loss modeling mechanism. The structural contrastive learning mechanism comprises two levels: event-level structural contrastive learning and event-pair-level structural contrastive learning. Specifically, it includes: Step 5.1: In each round of causal graph structure iteration, based on the current chapter-level causal graph structure, dynamically construct a set of positive samples and a set of negative samples for comparative learning, thereby forming an iterative perceptual structure comparative learning mechanism. The positive samples include events or event pairs that have consistent structural roles or have a real causal relationship, while the negative samples include events or event pairs that have similar structures but no causal relationship. Step 5.2, in the event-level structure contrastive learning phase, using event representation... As anchor point samples, a local causal subgraph is constructed based on their one-hop causal adjacency structure to characterize the structural role of events in the causal graph; positive samples are selected from the set of events with consistent structural roles. Simultaneously, a negative sample set is constructed, which includes difficult negative samples that are structurally most similar but have inconsistent roles. And negatively susceptible samples obtained by random sampling Thus, a sample set is constructed: ; Based on the above sample set, the event-level structure contrast loss function is defined as follows: ; in, For temperature coefficient, The weight coefficients of different samples are represented; through comparative learning optimization, the event representations with similar structural roles are made closer in the representation space, thereby enhancing the consistency of event structural roles. Step 5.3, in the event-pair hierarchical structure contrastive learning phase, event pairs are used as representations. As anchor point samples, By event e i With event e j The joint representation is constructed; for event pairs with real causal relationships, a positive sample set is constructed. Simultaneously, a negative sample set is selected from event pairs that are structurally similar but have no causal relationship; through structural similarity-driven contrastive optimization, discriminative constraints are imposed on the event pair representations, and its loss function is defined as: ; in, For interval parameters, The truncation function is represented; through contrastive learning optimization based on structural similarity, discriminative constraints are imposed on the event pair representation, making causal event pairs closer in the representation space, while non-causal event pairs are effectively distinguished. Step 5.4: In the multi-round graph structure iteration process, a classification loss function based on propagation risk perception is introduced to uniformly model the causal relationship prediction of event pairs; Meanwhile, the classification loss and the structural contrastive learning loss are weighted and fused to construct a joint optimization objective function, so as to optimize the ability to distinguish causal relationships while constraining the consistency of structural representation.

7. A multi-stage causal reasoning and narrative consistency verification system based on a large model, characterized in that, The system for performing the method of any one of claims 1 to 6 comprises: a causal heuristic reasoning module based on a large model, a hypergraph structure causal proposal module, a narrative consistency verification module, a dynamic causal graph construction and update module, and a two-layer structure-aware contrastive learning module; Specifically, the causal heuristic reasoning module based on a large model is used to execute step 1; the hypergraph structure causal suggestion module is used to execute step 2; the narrative consistency verification module is used to execute step 3; the dynamic causal graph construction and update module is used to execute step 4; and the two-layer structure perception contrastive learning module is used to execute step 5.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the multi-stage causal reasoning and narrative consistency verification method based on a large model as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the multi-stage causal reasoning and narrative consistency verification method based on a large model as described in any one of claims 1 to 6.