Composition question sentence causal chain inference method based on discourse diagram structure

By constructing discourse graphs and using causal chain inference methods, the problem of not being able to identify the root causes and propagation paths of essay errors in existing technologies has been solved. This enables interpretable diagnosis of problematic sentences in essays, improving the interpretability and teaching value of automated diagnosis.

CN121543579APending Publication Date: 2026-02-17高浩壬
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511813841.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing essay analysis techniques cannot identify the root causes of errors, lack discourse-level modeling capabilities, cannot construct causal chain structures, and struggle to explain the propagation paths and formation processes of errors.

Method used

The composition problem sentence causal chain inference method based on discourse graph structure generates sentence vectors through semantic encoding model, constructs discourse graph, calculates sentence-level problem scores, constructs error influence matrix, filters root cause sentences, and generates causal chains through maximum weight path algorithm.

Benefits of technology

It enables the identification of error sources at the discourse level, reveals error propagation patterns, forms structured causal chains, and enhances the interpretability and teaching application value of essay diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure SMS_29
    Figure SMS_29
  • Figure SMS_33
    Figure SMS_33
Patent Text Reader

Abstract

The invention discloses a composition question sentence causal chain inference method based on a discourse diagram structure, and relates to natural language processing, discourse analysis and automatic composition diagnosis technologies. According to the method, a composition is modeled into a discourse diagram structure composed of sentence nodes and semantic-discourse relation edges, and causal chain inference of composition question sentences is achieved by constructing sentence-level question scores, an error influence matrix and a propagation path model. According to the method, technologies such as semantic vector coding, chapter relation enhancement, error propagation modeling and maximum weight path search are adopted, and surface problem sentences, potential structural defects and upstream root cause sentences are connected into an explanatory causal chain. Compared with a traditional method that only sentences are subjected to independent classification or local coherence judgment, the method has the advantages that sources and propagation mechanisms of writing errors can be revealed, traceable and explainable error formation paths are given, and composition diagnosis accuracy and teaching feedback effectiveness are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing and discourse analysis technology, specifically to the category of essay diagnosis, sentence-level error inference and causal chain analysis methods based on discourse graph structure, and particularly to an automated essay diagnosis method that uses semantic relations and discourse structure to construct a discourse graph and generates causal chains of problem sentences based on error propagation modeling. Background Technology

[0002] Automatic essay analysis technology has been developed for educational applications for a long time. Existing research mainly focuses on detecting intra-sentence language errors, lexical collocation anomalies, and grammatical structure problems. Its technical foundation often relies on shallow structures such as rule bases, statistical features, or syntactic trees. In these methods, the essay is treated as a collection of independent sentences, and error analysis is usually limited to within sentences, lacking the ability to make inferences at the discourse level. When essay problems stem from biased understanding of the theme, improper text organization, or broken logical chains, these methods struggle to capture the causes of errors and cannot identify the patterns of error propagation in the text.

[0003] In recent years, some studies have attempted to classify sentences as a whole sequence, such as determining whether a sentence is off-topic, redundant, or lacks coherence. However, these methods are essentially still sentence-level predictions, only able to label each sentence individually, lacking a mechanism to link errors to their causes. The model output typically only indicates "this sentence has a problem," failing to answer discourse-level questions such as "where does the problem begin?" or "how does it lead to deviations in the following text?" When teachers use these systems for essay diagnosis, they often cannot infer the error formation path based on the labels, and the lack of interpretability limits the system's educational application value.

[0004] Some studies have attempted to assess discourse coherence using semantic similarity or thematic consistency between adjacent sentences. These methods typically employ a fixed window, such as comparing the semantic distance between one or two sentences before and after, to detect local breaks in the text. However, structural problems in writing often span multiple paragraphs. A deviation in the opening theme might affect the logical progression of developing paragraphs, or an error in the middle section might lead to a structural collapse at the end. The window-based approach cannot identify such cross-paragraph structural shifts, nor can it handle complex discourse chains with long-distance dependencies.

[0005] More importantly, current technology cannot distinguish between two types of critical errors: one is "active errors," where the sentence itself contains logical, linguistic, or content deviations; the other is "passive errors," where a sentence is forced into an illogical or off-topic state due to problems in the preceding text. Mature essay writing instruction emphasizes identifying the "root cause," but mainstream automated methods cannot identify such root cause sentences. Due to the lack of error propagation modeling capabilities, current technology also cannot form a coherent causal chain structure, making it difficult to reveal the logical path of "where the error begins and how it propagates step by step to the problem sentence."

[0006] Furthermore, current essay diagnostic systems often lack the ability to model discourse at the graph structure level. While some methods introduce sentence vectors, attention weights, or simple dependency structures, they do not model the entire essay as a discourse graph composed of nodes and semantic relationships. Without an explicit graph structure, the system cannot accurately express the logical relationships between sentences, discourse relationships, and semantic dependencies, nor can it infer the propagation path of errors within the discourse based on the graph structure. Therefore, existing automated essay analysis technologies have significant shortcomings in interpretability, causal inference ability, and discourse structure understanding.

[0007] To address the aforementioned issues, current essay error detection methods generally lack discourse-level modeling capabilities, failing to reveal the source, propagation process, and causal structure of errors, and making it difficult to generate diagnostic chain explanations that teachers can directly use. Therefore, it is necessary to propose a causal chain inference method for essay problem sentences based on discourse graph structure. This method would enable the system to identify the root causes of errors at the discourse level, infer the error propagation path, and form a structured, traceable, and interpretable causal chain, thereby overcoming the key deficiencies of existing technologies. Summary of the Invention

[0008] To address the limitations of existing technologies in essay analysis, such as the inability to identify root causes of errors, depict the propagation mechanisms of errors within discourse, and construct explanatory causal chain structures, this invention proposes a causal chain inference method for problematic sentences in essays based on discourse graph structures. This method, grounded in discourse graphs, employs steps including sentence-level problem modeling, error influence calculation, root cause sentence selection, and causal path search to structurally link surface errors, structural errors, and root cause errors in essays, forming traceable causal chains. This enables explanatory diagnosis of problematic sentences in essays.

[0009] The causal chain inference method for essay problem sentences based on discourse graph structure proposed in this invention includes the following steps:

[0010] 1) The essay text is segmented into sentences to obtain a sentence sequence, and a semantic encoding model is used to generate sentence vector representations, constructing the node foundation required for the discourse graph. Let the essay text consist of a sentence sequence... Composition, in which For the first There are 10 sentences; the sentence vector is represented as...

[0011]

[0012] In the formula, For semantic encoding models, such as Transformer; For sentence The semantic vector.

[0013] 2) Constructing discourse graph structure based on inter-sentence semantic similarity, discourse relations, and order decay mechanism. The set of nodes Corresponding sentence set, edge set Composed of inter-sentence relationships, edge weight Defined as

[0014]

[0015] In the formula, Cosine similarity of sentence vectors; This is a chapter relationship coefficient, used to represent relationships such as cause and effect, transition, and sequence. This is the sequential decay factor, used to reflect the decay characteristics of long-distance relationships.

[0016] 3) Calculate sentence-level problem scores based on topic deviation, coherence anomaly, and language anomaly to provide a quantitative description of whether a sentence has problems. The sentence-level problem score is defined as follows:

[0017]

[0018] In the formula, For sentence Question score; The degree of deviation from the theme; For coherence anomaly; Language anomaly degree; These are the weighting coefficients.

[0019] 4) Construct an error influence matrix based on the edge weight structure of discourse graphs to describe the error propagation effect between sentences. antithetical couplet Error influence is defined as

[0020]

[0021] in, Expression sentence Errors propagate from the text to the sentence level. The strength of the score is determined by both the score of the sentence itself and the weight of the edges between sentences.

[0022] 5) Root cause sentences are selected based on their self-problematic nature and their ability to influence other sentences, forming a candidate set of potential error sources. The propagation ability of a sentence is defined as...

[0023]

[0024] In the formula, Expression sentence The potential to propagate errors downstream can be used to identify "source sentences that lead to downstream structural errors".

[0025] 6) Based on the discourse graph structure, perform causal path search on any target question sentence. Using the maximum weight path algorithm, multi-hop propagation model, or A* search with heuristic functions, infer the causal chain from the root cause sentence to the target sentence. Any path The path influence score is defined as

[0026]

[0027] In the formula, A path score is assigned to measure the reliability of a path in interpreting an error in the target sentence.

[0028] 7) The candidate causal chains are filtered, clustered, and deredundanted to obtain the final structured causal chain output. The set of filtered causal chains is represented as follows:

[0029]

[0030] in, This represents a causal chain. This is to explain the final output structure of the essay question sentences.

[0031] Preferably, in the method, the discourse graph edge weight calculation adopts a combination of semantic similarity, discourse relation coefficient, and order decay factor, wherein the order decay factor lie in This is used to control the impact of inter-sentence distance on edge weights.

[0032] Preferably, in the method, the topic deviation is calculated using the similarity between the sentence vector and the task topic vector, and the topic deviation is defined as follows:

[0033]

[0034] In the formula, This is the semantic vector of the essay title.

[0035] Preferably, in the method, the coherence anomaly calculation is based on the inter-sentence coherence score, defined as follows:

[0036]

[0037] in, For sentence The vector.

[0038] Preferably, in the method, the path search employs a maximum weight path strategy, that is, calculating path scores for all possible paths. The path with the highest score is selected as the main causal chain.

[0039] Compared with existing technologies, this invention can identify the source of writing errors at the discourse level, reveal the propagation pattern of errors between sentences, and present the error formation process in a structured form of causal chains, thus achieving interpretable diagnosis of problematic sentences in writing. This invention overcomes the limitation of traditional methods that can only label "problem sentences" but cannot reveal the "source of the problem," significantly improving the interpretability and educational application value of automatic writing diagnosis. Attached Figure Description

[0040] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0041] Figure 1 This is a flowchart of the technical solution of the present invention. Detailed Implementation

[0042] To better illustrate this invention, the technical solution is described in detail with reference to specific embodiments. The following content elaborates on the steps and implementation details of the specific implementation method, aiming to reveal how this invention characterizes the semantic and discourse connections between sentences at the discourse level, and constructs an interpretable causal chain structure through problem sentence modeling, error propagation analysis, and path inference mechanisms. By sequentially introducing the steps of discourse graph construction, sentence-level problem measurement, error influence calculation, root cause sentence screening, and causal chain generation, readers can understand how this invention addresses the shortcomings of existing technologies, such as the inability to identify error sources, explain error propagation processes, and provide structured causal chains. It enables a complete reasoning link between each step, realizing a complete technical presentation from discourse structure expression to the output of the causal chain of problem sentences in the essay.

[0043] S1. Discourse Graph Construction

[0044] In the implementation of this invention, the essay text is represented as a discourse graph structure composed of sentence nodes and their semantic-discourse relationships, providing a foundational expression for subsequent problem sentence identification, error propagation modeling, and causal chain inference. The starting point for constructing the discourse graph is to segment the essay into sentences and generate a semantic vector for each sentence to form a mathematical representation of the node content. Assume the essay text consists of a sequence of sentences.

[0045]

[0046] Composition, in which Indicates the first One sentence. The total number of sentences. To express the semantic information of sentences, this invention uses a pre-trained language model as an encoder to encode each sentence into a vector:

[0047]

[0048] In the formula, Sentence semantic vectors, It is a Transformer-based deep semantic encoding model used to obtain sentence-level contextual representations.

[0049] After obtaining the sentence vectors, it is necessary to construct the edge connections between sentences to express the logical, semantic, and discourse-level organizational structure of the text. Semantic similarity, as a fundamental quantity for inter-sentence connections, is defined using cosine similarity.

[0050]

[0051] In the formula, For vector dot product, Here, is the vector norm, used to measure the semantic proximity of sentences in the vector space. To reflect the discourse relationships between sentences, this invention further identifies common discourse structures such as causality, sequence, progression, or contrast, adding discourse relationship coefficients to the edges between sentences, denoted as . Its value can be set according to the type of relationship between chapters. For example, the weight of causal relationship can be higher than that of general sequential relationship.

[0052] The edge weights of a discourse graph need to simultaneously reflect the combined effects of semantic similarity, discourse relationships, and inter-sentence distance. This invention defines the edge weights as follows:

[0053]

[0054] in, For sentence Pointing sentence The right of the border; This is the coefficient representing the relationship between chapters; The order decay factor is used to indicate that the greater the distance between sentences, the smaller the edge weight should be; the exponential term... In Indicates the index distance between sentences.

[0055] To prevent the discourse graph from becoming too dense, this invention employs a high-weight retention strategy, selecting only edges with significant weights to add to the graph structure and construct the discourse graph.

[0056]

[0057] in, This is a set of nodes, each corresponding to a sentence; The set of edges consists of inter-sentence relationships that satisfy the weight threshold condition; This is the set of all edge weights. This discourse graph can present the discourse logic skeleton of an essay at the graph structure level, including the order of content progression, inter-sentence dependencies, and potential causal structures.

[0058] The final output of this step is the set of sentence vectors. Discourse graph structure Chapter Relationship Coefficient and edge weight matrix Together, they form the basic structure for subsequent question sentence score calculation, error propagation modeling, and causal chain inference, enabling subsequent steps to reason and analyze within the complete discourse expression space.

[0059] S2. Sentence-level question score calculation

[0060] After constructing the discourse graph structure, to identify potential problem sentences and provide basic quantitative indicators for subsequent error propagation modeling, it is necessary to calculate the degree of anomalousness of each sentence in the essay. This invention constructs sentence-level problem scores from three aspects: topic relevance, discourse coherence, and language quality. This allows the deviations of each sentence at the semantic, logical, and linguistic levels to be presented in mathematical form, laying a quantitative foundation for subsequent root cause inference and causal chain generation.

[0061] Sentence-level questions are scored as follows:

[0062]

[0063] in, Sentence The degree of the problem; The degree of deviation from the theme reflects the semantic gap between the sentence and the theme of the writing task. The coherence anomaly score reflects the quality of the structural connection between a sentence and its context. This is the language anomaly score, used to characterize the fluency and naturalness of a sentence's expression. (Parameters) The weights of each factor are used to adjust the impact of the three types of abnormal signals on the final question score.

[0064] Topic deviation is calculated based on the semantic similarity between sentence vectors and task topic vectors. Topic deviation is defined as follows:

[0065]

[0066] in, For sentence The semantic vector is derived from the encoded representation in S1; The semantic vectors of the essay titles are generated using the same encoder; This represents the cosine similarity between the two sentences. The deviation increases as the sentence semantics deviate from the topic, indicating that the sentence's content is more likely to raise questions at the topic level.

[0067] The coherence anomaly score is calculated based on the degree of loss of semantic consistency between sentences. This invention measures coherence by the vector relationship between adjacent sentences. The coherence anomaly score is defined as follows:

[0068]

[0069] In the formula, For sentence The semantic vector; this value increases when there is an inappropriate connection, logical break, or semantic jump between a sentence and its following sentences. To adapt to paragraph boundaries, when... Time can be ordered Calculated based on the previous sentence.

[0070] Language anomaly score is calculated using the perplexity score of a language model and is used to characterize the linguistic quality of a sentence. This paper defines language anomaly score using the word sequence probability of the language model:

[0071]

[0072] in, Expression sentence The number of words; For the first sentence One word; For the language model to the first The conditional probability of each word. When the sentence structure is chaotic, the vocabulary is abnormal, or the expression is unnatural, the perplexity increases, which in turn leads to an increase in the language abnormality.

[0073] To enhance the robustness of sentence-level question scores, this invention normalizes the three types of anomalies, ensuring comparability between different indicators. In practical applications, normalization can employ z-score or min-max forms to mitigate the impact of varying essay lengths and sentence complexities on scores.

[0074] The final output of this step is the sentence-level question score sequence.

[0075]

[0076] This sequence provides anomalous signals at the node level of the discourse graph, providing basic input for subsequent error propagation modeling, enabling subsequent steps to explain the error formation mechanism based on the degree of sentence problems and inter-sentence dependencies.

[0077] S3. Error Influence Modeling

[0078] After obtaining sentence-level problem scores and discourse graph structure, it is necessary to further characterize the intensity of error propagation between sentences. This invention proposes an error influence matrix to describe the error transmission relationship between sentences, combining the problem severity of the sentences themselves with the structural relationships in the discourse graph to form a propagation modeling framework that can be used for subsequent root cause sentence screening and causal chain inference. By quantifying the error impact between sentences, it is possible to reveal the abnormal phenomena that some seemingly normal sentences passively generate due to deviations in upstream sentences, thereby constructing the overall structure of error propagation in writing.

[0079] The core idea of ​​error influence is that whether a sentence is an "error source" is determined not only by its own abnormality but also by its influence on downstream sentences. Therefore, this invention defines a sentence... antithetical couplet The error impact is

[0080]

[0081] in, Expression sentence Incorrect sentence The potential impact; For sentence The problem score comes from the output sequence of S2; From nodes in the discourse graph To the node The edge weights, derived from the graph structure of S1, are used to represent semantic connections, discourse relationships, and structural distances between sentences. This formula reflects that error propagation must be based on discourse relationships: the more serious the problem within a sentence and the higher its edge weight, the stronger its propagation ability.

[0082] To assess the propagation potential of sentences within the overall discourse, this invention defines sentences... Its transmission capacity is

[0083]

[0084] in, Sentence The combined influence of a sentence on all other sentences reflects its ability to cause confusion in the downstream discourse structure. When a sentence has a high error score and is strongly connected to multiple sentences, its propagation ability increases significantly, making it more likely to become the source of errors in the essay.

[0085] In actual writing, error propagation can exhibit a multi-hop structure, where one incorrect sentence affects the next, and the next affects the next sentence. To characterize the multi-hop propagation effect, this invention further defines a multi-hop error propagation matrix to reflect long-distance propagation patterns. The multi-hop propagation score can be expressed as...

[0086]

[0087] in, Indicating a clause go through The next jump propagates to the sentence Influence intensity; path Indicates the sequence of transit sentences; each item This is a graph weighting system for discourse. This formula can reveal the propagation of errors across paragraphs or over long distances in writing, and is especially applicable when the overall writing structure deviates.

[0088] To prevent the propagation score from rapidly increasing with the number of hops, this invention introduces a propagation attenuation coefficient. This is used to control the multi-hop propagation intensity, making the propagation matrix more stable. The corrected multi-hop propagation score is expressed as...

[0089]

[0090] in, This is used to exponentially decay long-distance propagation, preventing invalid paths from causing noise effects on the propagation model. Combining single-hop and multi-hop propagation, a comprehensive propagation matrix can be formed, which can be used to characterize the propagation trajectory of errors at the overall discourse level.

[0091] The final output of this step includes an error influence matrix. Propagation capability vector and multi-hop propagation matrix Together, these form the basis for subsequent root cause sentence screening and causal chain path search, enabling subsequent steps to identify the source error of the essay and infer its causal path based on the inter-sentence propagation relationship.

[0092] S4. Root Cause Sentence Screening

[0093] After obtaining sentence-level problem scores and error propagation models, it is necessary to identify the key sentences in the essay that are most likely to cause overall discourse deviation or structural collapse, in order to generate the starting point for subsequent causal chain inferences. This invention constructs a root cause sentence determination model by comprehensively considering the degree of anomalousness of the sentence itself and its propagation ability to downstream sentences, enabling the system to find the sentence node with the most source influence at the discourse level, forming a set of candidate root cause sentences.

[0094] The identification of root cause sentences is based on two key indicators: the sentence's own problematicness and its propagation to other sentences. The sentence's own problematicness is derived from the sentence-level score sequence of S2. The propagation capability of a sentence comes from the propagation vector defined in S3. ,in

[0095]

[0096] Expression sentence The potential impact on all downstream sentences. To integrate these two factors, this invention constructs a root cause sentence comprehensive scoring model, which combines the degree of self-problem with propagation ability to form a root cause score.

[0097]

[0098] in, For sentences Root cause score; This is a fusion coefficient used to adjust the importance of the degree of self-problem and the ability to spread; This is a normalized form of propagation capability, used to ensure that the two components are on the same numerical scale. This model can achieve a balance between high question scores and high propagation potential, allowing root cause sentence determination to consider both the direct defects of the sentence and its destructive effect on the overall discourse structure.

[0099] To improve the accuracy of root cause sentence selection, this invention also introduces a local propagation reinforcement factor to characterize the importance of a sentence as a "central node" in the discourse graph. The local propagation reinforcement factor is defined as follows:

[0100]

[0101] in, Expression sentence The strength of the structural connection between a sentence and its directly adjacent sentences; set Represents all sentences in the discourse diagram Adjoining clauses; For sentence Pointing sentence The edge weight. This indicator is used to identify sentences that are located in key positions in the discourse structure and may have a significant impact on the overall coherence of the discourse.

[0102] This invention uses both root cause scoring and local propagation reinforcement factors to construct the final root cause sentence score:

[0103]

[0104] in, For sentence The final root cause score is used to indicate the credibility of the sentence as the source of the error; This is the local propagation enhancement coefficient, used to adjust the amplification of root cause scores by structural position. When a sentence has both significant problem characteristics and is located at a key node in the discourse structure, its root cause score will be significantly increased, making it more likely to be identified as a root cause sentence.

[0105] To obtain the root cause sentence set, this invention selects the set of sentences with the highest scores as the candidate root cause sentence set, denoted as [the set of sentences].

[0106]

[0107] in, The threshold for selecting the root cause sentence can be determined based on experimental experience or an automatic adjustment strategy. This set provides a starting point for subsequent causal chain path searches, enabling the entire causal chain inference process to unfold from key sentences with clear discourse interpretability as its source.

[0108] The final output of this step is a set of root cause sentences. This provides the necessary starting node for S5's causal chain path search, enabling the system to explain the source and formation mechanism of essay problem sentences from the discourse structure level.

[0109] S5. Causal Chain Path Search

[0110] After determining the set of root cause sentences, it is necessary to construct causal chains from the root cause sentences to the target problem sentences to reveal the propagation path of errors in the discourse. This invention performs path search based on discourse graph structure and error influence matrix. By calculating path influence scores and selecting the most explanatory chain structures, the system can provide a complete inference process of "how errors are formed". The construction of causal chains depends not only on the source influence of the root cause sentences, but also on the edge weights between sentences, propagation strength, and overall coherence of the path.

[0111] To describe a root cause sentence To the target question sentence Candidate paths are defined as node sequences.

[0112]

[0113] in, For the root cause index, The target sentence is indexed, and all nodes satisfy the condition of continuous reachability in the discourse graph. To evaluate the explanatory power of a path, this invention defines a path influence score, which measures path strength by accumulating the edge weights and error propagation score. The path influence score is calculated as follows:

[0114]

[0115] in, For sentence antithetical couplet The error influence is derived from the error influence matrix of S3; this path score reflects the strength of the indirect influence of the root cause sentence on the target sentence. The higher the path score, the better the path can explain the formation of the final problem sentence.

[0116] In some essay structures, error propagation can accumulate along multiple weak connections. To address this scenario, this invention introduces a product-based propagation model to emphasize the importance of edge weight continuity. The product-based path score is defined as follows:

[0117]

[0118] in, The inter-sentence edge weights are used to measure the strength of semantic or discourse relationships between sentences; the product form makes any weak connection in the path significantly reduce the score, thus emphasizing coherent and tightly structured propagation chains.

[0119] To efficiently search for the optimal path, this invention constructs a weighted search process on the discourse graph, treating path scores as the evaluation metric for path selection. Heuristic strategies are used during the search process to reduce the search space, and dynamic pruning is performed based on node importance. In practical computation, the A* search algorithm with heuristic functions can be employed, with its cost function defined as follows:

[0120]

[0121] in, Indicates the progression from the root cause clause to the node. The accumulated path cost is usually based on or Perform calculations; For the node Heuristic estimation of the target sentence can employ either the shortest hop count between nodes or a relaxation estimation based on edge weights. This strategy effectively avoids brute-force search across the entire essay, improving path inference efficiency.

[0122] To improve the stability of path search, this invention incorporates a redundancy suppression strategy during path generation. Loops or duplicate nodes in the path are pruned to ensure the causal chain maintains an acyclic sequential structure, making the inference process more consistent with discourse logic. Finally, this invention selects one or more paths with the highest scores for each target question sentence as the causal chain output, forming a key chain structure explaining the source of essay errors.

[0123] The final output of this step is a set of candidate causal chains.

[0124]

[0125] Each path starts with the root cause sentence and ends with the target question sentence, forming an interpretable discourse-level causal chain expression, which provides the basic structure for S6's causal chain screening and clustering.

[0126] S6. Causal Chain Screening and Clustering

[0127] After completing the path search for causal chains, the resulting candidate path set typically contains multiple chain structures with similar structures, scores, or originating from different root cause sentences but pointing to the same question sentence. To generate refined, stable, and representative causal chain results while maintaining explanatory power, candidate causal chains need to be screened, deredundantized, and clustered. This invention uses path score thresholds, structural similarity calculations, and chain aggregation strategies to condense candidate paths into a representative set of causal chains, thereby presenting a clear explanation of error propagation in the final output.

[0128] The set of candidate paths is denoted as

[0129]

[0130] Each path This is the node sequence from the root cause sentence to the target question sentence. To filter out paths with insufficient explanatory power, this invention performs preliminary filtering based on path influence scores. The path influence score comes from S5 and is defined as follows:

[0131]

[0132] in, For sentence antithetical couplet The error impact is used to express the strength of error propagation. To remove low-impact paths, paths with scores greater than a given threshold are retained. The path is used to form an initial selection set.

[0133] Between different paths, there may be multiple paths originating from different root sentences but sharing structural paragraphs. This invention measures the redundancy between paths using path structural similarity to merge similar chains. The structural similarity between paths is defined as follows:

[0134]

[0135] in, This indicates the number of nodes shared between the two paths; and These are the path lengths. This metric measures whether two chains highly overlap in key structures; when the similarity exceeds a threshold... At that time, it can be determined that the redundancy of the two chains is high.

[0136] To avoid duplicate output, this invention employs a score-first strategy, selecting the highest-scoring path from among similar paths as the representative path. The formula for selecting the representative path is as follows:

[0137]

[0138] in, This represents a cluster composed of highly similar paths; The path with the highest score in the cluster is selected as the final chain to be retained.

[0139] In some essay texts, multiple independent error propagation structures exist. This invention further forms path clusters based on the root cause differences between paths, with each cluster corresponding to a different error source. Root cause differences can be determined by whether the root cause nodes are consistent. Once the path clusters are formed, the representative set of paths is denoted as...

[0140]

[0141] in, Indicates the first Representative chains in each root cluster, That is, the final output result after causal chain screening and clustering.

[0142] The final output of this step is a structured set of causal chains. Each chain in this set has a clear root cause orientation, a coherent propagation structure, and high explanatory credibility, providing stable input for the generation of structured results in S7, enabling the system to accurately present the formation path of essay errors.

[0143] S7. Structured Causal Chain Output

[0144] After the causal chains are filtered and clustered, representative causal chain results need to be output in a structured manner, so that the causes, propagation paths, and key nodes of problematic sentences in the essay can be presented in a clear and interpretable form. This invention uses path node sequences, path scores, node problem degrees, and propagation relationships as output elements, organizing each final causal chain into a readable and traceable diagnostic structure to support subsequent teaching feedback, manual proofreading, or automated generation of explanatory text.

[0145] Let the set of causal chains after filtering be...

[0146]

[0147] Each causal chain It is an ordered sequence of nodes from the root cause sentence node to the target question sentence node. Let be the number of nodes in the chain. Let be the contribution of each node in the causal chain to the overall causal outcome; this invention defines the contribution of a node in the causal chain as .

[0148]

[0149] in, Represents a node Relative contribution within the chain; For sentence The score for the question comes from S2; The propagation capability is derived from S3; the denominator is the sum of the combined contributions of all nodes in the chain, used for normalization. This metric reflects the importance of each node in error formation, giving the chain not only a structural representation but also quantitative interpretability.

[0150] The overall explanatory strength of the path is defined as

[0151]

[0152] in, For the chain Total influence score; The edge-level error influence is derived from the error influence matrix of S3. This score measures the explanatory strength of the entire causal chain for the target question sentence, helping users understand "which chain best reflects the error formation process".

[0153] To make the output causal chain directly readable, this invention constructs a structured text representation, combining the order of path nodes with node contribution information to generate an explanatory text for the causal chain. The basic template for text generation can be represented as follows:

[0154]

[0155] in, Explanatory text representing the causal chain. The node weight can be taken as the node's contribution. Or its linear transformation, This represents the corresponding sentence content in the chain. This expression format arranges the chain nodes according to their importance, thereby enhancing the clarity of the explanation.

[0156] In the structured output, this invention integrates each chain according to its sequence, node contribution, total path score, and textual interpretation to form the final structured causal chain output. The final output set is denoted as...

[0157]

[0158] in, The complete output object of the causal chain; This represents the set of contributions from all nodes within the chain.

[0159] The completion of this step elevates essay error analysis from sentence-level labeling to structured inference at the causal path level, ensuring that each problematic sentence has a clear source, a clear path, and an explainable propagation mechanism, thus constituting the final output of the interpretable essay diagnostic system of this invention.

[0160] This invention expands the identification process of problematic sentences in essays from surface-level label judgment to discourse-level causal inference by constructing a discourse graph structure, quantifying sentence-level problem features, modeling error propagation relationships, screening root cause sentences, and generating coherent causal chains. A complete reasoning chain is formed between each step, enabling the system not only to identify which sentences have problems but also to reveal how these problems originate from upstream structures and gradually propagate to the target sentence. Based on graph structures, with propagation mechanisms at its core and causal chains as the final expression, this method provides a traceable and interpretable structured presentation of complex discourse deviations. Compared to traditional essay diagnosis methods based on independent sentence judgment, this invention effectively solves the technical shortcomings of being unable to identify error sources, depict error propagation processes, and lacking interpretability, significantly improving the reliability, transparency, and pedagogical usability of automated essay diagnosis.

Claims

1. A method for inferring cause-effect chains of problem-sentence pairs in an essay based on a discourse graph structure, characterized in that, The method comprises the following steps: Step 1: segmenting the composition text to obtain a sentence sequence, and generating a sentence vector based on a semantic encoding model; Step 2: constructing a discourse graph structure according to the semantic similarity between sentences, the discourse relationship and the order attenuation condition, to form a graph model comprising nodes, edges and weights; Step 3: calculating the topic deviation degree, coherence abnormality degree and language abnormality degree for each sentence to generate a sentence-level problem score; Step 4: constructing an error influence matrix based on the sentence problem score and the edge weight in the graph, and calculating the error propagation strength between sentences; Step 5: screening root cause sentences according to the propagation ability of the nodes and the problem degree of the nodes to form a candidate root cause sentence set; Step 6: taking any target problem sentence as a terminal point, performing path search in the discourse graph, calculating a path influence score, and inferring a cause-effect chain from the root cause sentence to the target sentence; Step 7: filtering, deduplicating and clustering the generated cause-effect chain to obtain a final structured cause-effect chain output. 2.The method of claim 1, wherein, In step 1, the sentence vector is generated by using a Transformer-based semantic encoding model to obtain a sentence vector representation. 3.The method of claim 1, wherein, In step 2, the discourse relationship includes at least one of a cause-effect, transition, progression, comparison or connection relationship, and the edge weight is adjusted by a discourse relationship coefficient. 4.The method of claim 1, wherein, In step 3, the sentence-level problem score is obtained by weighted combination of the topic deviation degree, coherence abnormality degree and language abnormality degree.

5. The method of claim 1, wherein the method further comprises: determining a cause-effect chain of the question sentence based on the text graph structure. In step 6, the cause-effect chain inference adopts any one of a maximum weight path search, Dijkstra algorithm or A* search algorithm to calculate the path influence score, and the path with the highest score is taken as the cause-effect chain output.

Citation Information

Cited By

  • Pupil writing level dynamic evaluation system and method

    CN121766331A