Mathematical solution process step-level correction and feedback generation method based on deep learning
By constructing a hierarchical step-by-step logic graph using deep learning technology, the problem of semantic short-circuiting in mathematical problem-solving is solved, enabling precise step-level grading and feedback generation, and improving the accuracy and feedback quality of the grading system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHWEST JIAOTONG UNIV
- Filing Date
- 2026-03-13
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies are prone to semantic short circuits in mathematical problem-solving, failing to effectively model the rigorous logical hierarchy between mathematical solution steps, resulting in insufficient accuracy in grading and feedback generation.
A deep learning-based approach is adopted, which constructs a hierarchical step logic graph through a pre-trained mathematical language understanding model and a temporal convolutional network. By using a multi-head attention mechanism and a causal discovery algorithm, semantic short-circuiting is suppressed, and a high-dimensional step state vector sequence is generated for accurate step-level correction and feedback generation.
It achieves effective modeling of the logical hierarchy between mathematical solution steps, avoids semantic short-circuit interference, improves the accuracy and credibility of grading and feedback, and can accurately detect step errors and generate structured feedback reports.
Smart Images

Figure CN121836992A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of auxiliary teaching technology, and in particular to a method for generating step-by-step grading and feedback of mathematical solutions based on deep learning. Background Technology
[0002] Currently, traditional paper-and-pencil assessment methods struggle to track the learning process in real time, while superficial information-based assessment tools often fall into template-based approaches, lacking in-depth analysis of the unique characteristics of subject-specific thinking. Therefore, developing intelligent grading systems capable of understanding complex problem-solving logic and providing precise step-by-step diagnostics is an urgent practical need for achieving large-scale personalized education, reducing teacher workload, and improving teaching quality. Existing technological solutions generally focus on achieving automated grading through natural language understanding, symbolic computation, or answer matching; however, accurately modeling and analyzing the inherent logical dependencies between solution steps that conform to mathematical rigor remains a core challenge.
[0003] Chinese patent publication number CN120197696A discloses a method and system for the normalization of solution steps in subjective mathematical problems. This method, through semantic understanding, knowledge graphs, and graph neural networks, can achieve automated and accurate analysis of solution steps, improving problem-solving efficiency and feedback quality. However, this method relies on knowledge graph matching or general graph neural networks to establish connections between steps, but lacks explicit modeling and constraint mechanisms for the strict logical hierarchical structure unique to mathematical proofs. In mathematical proofs or solutions, steps typically exhibit a clear logical progression, such as from known conditions to theorem application, then to algebraic derivation, and finally to the conclusion.
[0004] Existing association methods, whether based on semantic similarity or general attention mechanisms, may indiscriminately calculate the association strength between all step pairs. This indiscriminate association analysis is highly susceptible to generating "semantic short-circuit" dependencies that cross different logical levels within highly structured mathematical reasoning chains. For example, a system might establish a strong association between an intermediate calculation step and the final answer simply because the latter contains the same value, completely ignoring crucial intermediate steps such as formula transformations or theorem references. These "short-circuit" connections are essentially noisy edges that pollute the information transmission paths in graph neural networks, preventing the model from accurately learning mathematically rigorous and hierarchically distinct reasoning structures.
[0005] This technical problem can lead to distortion of the logical state representation of steps in actual correction and feedback generation work, making it difficult for the system to accurately judge the rationality of a certain step in its correct logical position, thus causing misjudgment in error detection, such as misjudging a correct derivation step as a "logical jump" or failing to identify the truly missing key argumentation links. Summary of the Invention
[0006] To address the problem that existing methods are prone to semantic short-circuiting when dealing with complex mathematical reasoning and cannot effectively model the logical hierarchy of mathematical proofs, this invention proposes a step-by-step grading and feedback generation method for mathematical solution processes based on deep learning. This method can effectively model the rigorous logical hierarchy between mathematical solution steps, avoid semantic short-circuiting interference, and thus achieve more accurate step-by-step grading and feedback generation.
[0007] This application discloses a deep learning-based method for step-by-step grading and feedback generation in mathematical problem-solving, including the following steps: S1. Obtain the text of the students' math solutions to be graded and preprocess it; S2. Input the sequence of step text units into the pre-trained mathematical language understanding model to generate the corresponding sequence of step semantic encoding vectors; S3. Input the step semantic encoding vector sequence into the step logic parsing module, and enhance the context information through a temporal convolutional network to obtain the enhanced step context encoding sequence. S4. Construct a hierarchical, semantically short-circuit-resistant logical relationship diagram and perform reasoning, including: S41. Input the enhanced step context encoding sequence into the logical role classifier, pre-label each encoding in the enhanced step context encoding sequence with a logical role label and assign an initial logical level; S42. Based on the multi-head attention mechanism and by introducing a learnable decay factor associated with the logical hierarchy difference between steps, calculate the potential correlation under hierarchical constraints. S43. Based on the causal discovery algorithm, with step sequence as constraint and combined with conditional independence test, the potential correlation is verified and purified to obtain logical dependency edges. S44. Construct a step logic relationship graph by combining the basic sequential edges and the logical dependency edges, and perform reasoning through a hierarchical graph neural network that performs horizontal and vertical message passing to generate a high-dimensional step state vector sequence. S5. Based on the high-dimensional step state vector sequence, perform step-level error detection and overall answer correctness judgment to generate structured grading results; S6. Based on the structured correction results and the original step text sequence, drive the conditional feedback text generator to generate step-level feedback information and compile it into a correction feedback report.
[0008] Preferably, the preprocessing in S1 includes text cleaning, format standardization, and step boundary identification; The step boundary recognition is achieved through a segmenter based on a pre-trained language model, which segments the continuous solution process text into a discrete sequence of multiple step text units arranged in logical order.
[0009] Preferably, the pre-trained mathematical language understanding model in S2 is a multi-layer Transformer encoder; Each unit in the text unit sequence is converted into a token sequence and a special mark is added before being input into the multi-layer Transformer encoder. The vector corresponding to the special mark position in the hidden state of the last layer of the encoder is extracted as the semantic encoding vector.
[0010] Preferably, the step logic parsing module in S3 uses a layer with a number of... A one-dimensional temporal convolutional network implementation, in which The value of is between 2 and 4, and the kernel width is 3. Each code in the enhanced step context encoding sequence contains local context information.
[0011] Preferably, the logical role classifier in S41 is a fully connected neural network, whose input is a single code in the enhanced step context encoding sequence, and whose output is a probability distribution on a predefined set of logical roles, the predefined set of logical roles including at least known conditions, theorem references, formula transformations, algebraic operations, intermediate inferences, and final conclusions. The role with the highest probability is selected as the pre-labeled logical role label, and each logical role label is mapped to a logical level with an integer value according to the predefined mapping rules.
[0012] Preferably, S42 includes: For any two codes in the enhanced step context encoding sequence, the original relevance score is calculated using a multi-head attention mechanism; at the same time, based on the hierarchical difference between the two codes, the corresponding decay factor is obtained from a learnable parameter matrix. Multiply the original correlation score by the decay factor to obtain the hierarchical-constrained potential correlation score; The above operation is performed on all node pairs in the enhanced step context encoding sequence to generate a hierarchically constrained latent relevance score matrix.
[0013] Preferably, S43 includes: Set a threshold, initialize the node pairs corresponding to the elements with scores higher than the threshold in the correlation score matrix as a set of candidate directed edges, with the direction pointing from the node with the smaller index to the node with the larger index, and use the step index as a strict time order constraint to prohibit edges pointing from subsequent steps to the predecessor steps. Perform a conditional independence test on the edges in the candidate directed edge set based on the step encoding vector. If the encoding conditions of two nodes are independent given a certain set of intermediate steps, then remove the edge. The final output is a set of verified and refined logical dependency edges.
[0014] Preferably, the hierarchical graph neural network in S44 comprises two sequential message-passing layers: The first layer is the horizontal propagation layer, which only allows message passing between nodes with the same or adjacent initial logical levels, and on all basic sequence edges; The second layer is the vertical propagation layer, which only allows message passing on edges that connect different initial logical levels in the set of logically dependent edges; Each node integrates the update information from the two layers of propagation, and outputs the final high-dimensional step state vector through a fusion layer.
[0015] Preferably, S5 includes: For each high-dimensional step state vector, it is independently classified through a shared multi-layer fully connected neural network, and the probability of the step belonging to each of a variety of preset error types is output. The error types include calculation error, formula misuse, logical jump, concept confusion, step redundancy, and step missing. Meanwhile, the sequence-level overall correctness discriminator receives the entire sequence, encodes it into a context vector using a bidirectional LSTM, and then outputs the probability of the final answer being correct through a fully connected layer and a sigmoid function.
[0016] Preferably, the conditional feedback text generator in S6 is a sequence-to-sequence model based on the Transformer architecture. Its encoder receives a sequence of step texts concatenated with step error label information. In the attention calculation at each moment, the decoder simultaneously focuses on the key-value pairs output by the encoder and the key-value pairs formed by linear projection of the high-dimensional step state vector sequence, and generates natural language feedback for each erroneous step in an autoregressive manner.
[0017] The beneficial effects of this invention are: (1) This invention constrains the originally undifferentiated global attention computation to a focused association discovery that is sensitive to logical hierarchy. It directly suppresses the possibility of forming strong "short-circuit" connections between steps that are logically far apart only because of superficial semantic or numerical similarity, thus purifying the relation topology to be processed by the graph neural network.
[0018] (2) This invention introduces the causal discovery algorithm into the construction process of the step logic diagram as a supplement and verification of neural computation. This further improves the reliability and interpretability of the step logic diagram, making the constructed dependencies not only based on data-driven correlations but also more in line with logical causality, greatly enhancing the credibility of subsequent error diagnosis.
[0019] (3) This invention aligns the message passing mechanism of graph neural networks with the hierarchical structure of mathematical argumentation to achieve differentiated information aggregation. It can generate high-dimensional vectors that more accurately represent the state and role of each step in the overall logical argumentation, providing high-quality intermediate representations for subsequent error classification and attribution down to the step level. Attached Figure Description
[0020] Figure 1 This is a flowchart of a deep learning-based mathematical solution process step-by-step grading and feedback generation method according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the reasoning process of the anti-semantic short-circuit logic diagram according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the hierarchical perception correlation calculation and causal verification in an embodiment of the present invention. Figure 4 This is a block diagram of the message passing structure of a hierarchical graph neural network according to an embodiment of the present invention; Figure 5 This is a block diagram of the step-level error detection and feedback generation module in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided with reference to the accompanying drawings and embodiments.
[0022] One embodiment of this application discloses a step-by-step grading and feedback generation method for mathematical solution processes based on deep learning, the process of which is as follows: Figure 1 As shown, it includes the following S1-S6.
[0023] S1. Obtain the text of the student's math solution process to be graded and preprocess it. Preprocessing includes text cleaning, format standardization, and step boundary identification. Step boundary identification involves inputting the student's math solution text into a pre-trained language model segmenter based on the Transformer architecture. This segmenter outputs a binary label at each token position in the student's math solution text, indicating whether that position is a step boundary. Based on the binary label sequence, the original text is segmented at the boundary positions. Label "1" indicates a step boundary, and "0" indicates a non-boundary position. The original text is segmented according to the position of label "1" to form a discrete sequence of step text units. , The total number of steps is denoted as . This segmenter is obtained by fine-tuning on a large-scale mathematical solution text dataset with manually labeled step boundaries, and its loss function is cross-entropy loss.
[0024] S2, Sequence of step text units Each unit in ( Each of these steps is input into a pre-trained mathematical language understanding model to generate a corresponding dynamic step semantic encoding vector sequence. Each step of the semantic encoding vector It comprehensively characterizes the mathematical semantics, operation type, and mathematical objects involved in the corresponding step text.
[0025] Specifically, in this embodiment, the pre-trained mathematical language understanding model is a multi-layer Transformer encoder. Each unit in After being independently converted into a token sequence and marked with special tokens, the tokens are input into the encoder. The vector corresponding to the position of the special token in the last hidden state of the encoder is extracted as a step. semantic encoding vector The mathematical language understanding model is first pre-trained on a large-scale general text corpus, then continuously pre-trained on a mathematical domain corpus containing mathematical symbols, formulas, and reasoning statements. Finally, it undergoes supervised fine-tuning on a step-level mathematical semantic classification task to achieve accurate encoding of mathematical step semantics. Fine-tuning employs a step semantic classification task, using fixed-dimensional step semantic encoding vectors. The method of obtaining it is: extract the vector corresponding to the special marker "[CLS]" position in the last hidden state of the encoder.
[0026] S3. Encode the step semantics into a vector sequence. The corresponding step number is input into a step logic parsing module. This module captures the local order dependencies between steps through a temporal convolutional network and outputs an enhanced step context encoding sequence. ,in Not only includes steps It not only has its own semantics, but also incorporates the contextual information of its preceding and following steps.
[0027] The specific processing flow of the step logic parsing module is as follows: Receive the step semantic encoding vector sequence from S2. Arrange these vectors in order of step number to construct a two-dimensional feature matrix. Input this two-dimensional feature matrix into a... This is a one-dimensional temporal convolutional network with layers where ReLU activation is applied after each convolution and layer normalization is performed. The kernel width of the one-dimensional temporal convolutional network is set to 3 to capture the local dependencies between each step and its direct predecessor and successor steps. The output of the last layer of the network is the enhanced step context encoding sequence. ,in Dimensions and The same, but containing local contextual information. The number of layers in the one-dimensional temporal convolutional network in this embodiment... The value of is between 2 and 4, the kernel width is fixed at 3, and the layer normalization process is performed after each convolutional layer and before the ReLU activation function.
[0028] S4. Construct a hierarchical, semantically short-circuit-resistant step-by-step logic diagram and perform reasoning. The process is as follows: Figure 2 As shown.
[0029] S41. Encode the enhanced step context sequence The input is fed into a logical role classifier, for each code A preliminary logical role label is pre-labeled, and an initial logical level is assigned to each node based on the label, forming a hierarchical skeleton.
[0030] Specifically, in this embodiment, the logical role classifier is a fully connected neural network, and its input is the context encoding sequence of the enhancement step from S3. A single code in The logical role classifier processes data through two fully connected layers. The first layer uses the ReLU activation function, and the second layer uses the softmax function. The output is a probability distribution on a predefined set of logical roles, which includes at least known conditions, theorem references, formula transformations, algebraic operations, intermediate inferences, and the final conclusion. The role with the highest probability is selected for this step. The pre-labeled logical role tags. Based on a predefined mapping rule, each logical role tag is mapped to a logical level with an integer value. The initial logical hierarchy sequence is obtained. This forms the initial logical hierarchy allocation. The mapping rules are as follows: known conditions are mapped to level 0, theorem references and formula transformations are mapped to level 1, algebraic operations are mapped to level 2, intermediate inferences are mapped to level 3, and the final conclusion is mapped to level 4.
[0031] S42, Encode the enhanced step context sequence With the initial logical hierarchy sequence A common input hierarchical perception correlation calculation layer is used. This layer embeds a learnable decay factor based on hierarchical difference in the multi-head attention mechanism to suppress the direct correlation strength between non-adjacent hierarchical nodes and calculates the potential correlation score matrix constrained by the hierarchy.
[0032] Specifically, such as Figure 3 As shown, the specific operation of the hierarchical perception relevance calculation layer in this embodiment is as follows: inputting the enhancement step context encoding sequence from S3. and the initial logical hierarchy sequence from the logical role classifier For any two codes in the encoded sequence and The original relevance score is calculated using a standard multi-head attention mechanism. At the same time, based on their hierarchical differences From a learnable parameter matrix Retrieve the corresponding attenuation factor from the index. ,in It is a learnable decay factor vector with length equal to the maximum possible hierarchical difference, whose values are learned through training and monotonically decrease. The original correlation score... With decay factor Multiplying them yields the latent relevance score after hierarchical constraints. Encoding sequence for enhanced step context. Perform the above operations on all nodes to generate a hierarchically constrained latent relevance score matrix. .
[0033] Learnable decay factor vector The length of the vector is equal to the maximum possible level difference plus 1, and each element in the vector... Initialize to ,in The index value is updated during training via backpropagation, and maintains non-negativity and monotonically non-increasing property after the update; that is, for any index value... ,have .in, , For the difference between two different levels, To differentiate between levels The corresponding learnable decay factor, To differentiate between levels The corresponding learnable decay factor.
[0034] S43. The potential correlation score matrix after hierarchical constraints. With enhancement step context encoding sequence The temporal information is input into the causal discovery verification unit, and a constraint-based causal discovery algorithm is applied to remove candidate dependency edges that violate the principles of logical temporal order and conditional independence, especially abnormally high-scoring cross-level connections that may still exist despite being weakened by hierarchical constraints. The output is a set of verified and purified logical dependency edges.
[0035] Specifically, such as Figure 3 As shown, the execution process of the causal discovery verification unit in this embodiment is as follows: a latent relevance score matrix with hierarchical constraints... With enhancement step context encoding sequence The chronological order.
[0036] Set a threshold , matrix The middle score is higher than The node pairs corresponding to the elements Initialize as a set of candidate directed edges The direction is from the node with the smaller sequence number to the node with the larger sequence number, where Applying a constraint-based PC algorithm variant to... Purification is performed by using the step number as a strict time order constraint, which prohibits edges from subsequent steps to previous steps.
[0037] exist On the edges, perform conditional independence tests. The test statistic is based on the correlation of the step encoding vectors, given a set of intermediate steps. At that time, node and If the encoding conditions are independent, then from Remove edges The final output is a set of verified and refined logical dependency edges. , yes A subset of the set, removing edges that violate temporal order and conditional independence, especially those edges that connect large hierarchical differences and where conditional independence holds.
[0038] The specific execution process of the above conditional independence test is as follows: for the nodes connected by the candidate edges... and and a candidate condition set ,calculate and The encoded vector in a given The partial correlation coefficient given all node encoding vectors; if the absolute value of this partial correlation coefficient is less than the preset significance level... The corresponding threshold is then used to determine... and Conditions are independent.
[0039] S44. Encoding in step context Using initial node features, and combining basic sequential edges with verified and refined logical dependency edges, a hierarchical step logic graph is constructed. This graph is then input into a hierarchical graph neural network, which performs separate horizontal and vertical propagation to update node features. The final output is a high-dimensional sequence of step-state vectors that deeply characterizes the role and state of each step within a rigorous logical structure. .
[0040] Specifically, such as Figure 4As shown, the input node features of the hierarchical graph neural network are the context encoding sequences from the enhancement step in S3. The graph structure consists of basic sequential edges and a set of verified and refined logical dependency edges from the causal discovery verification unit. Common definition. A layered graph neural network contains two sequential message-passing layers. The first layer is a horizontal propagation layer, which only allows message passing between nodes with the same or adjacent initial logical levels, and along all basic sequential edges. The message function is a shared multilayer perceptron, the aggregation function is summation, and the node update function is a gated recurrent unit. The second layer is a vertical propagation layer, which only allows message passing along the set of logically dependent edges. Message passing occurs on edges connecting different initial logical levels. The message function and aggregation function are similar to those in the first layer, but their parameters are not shared. Each node integrates the update information propagated from both layers, and a fusion layer outputs the final high-dimensional step state vector. .
[0041] In a layered graph neural network, the message functions of the horizontal and vertical propagation layers are two fully connected layers with identical structures but no parameter sharing. The aggregation function is element-wise summation, and the update function is a gated recurrent unit with a reset gate and an update gate. A high-dimensional step state vector is also present. The dimension is step encoding. Twice the dimension.
[0042] S5. Sequence of high-dimensional step state vectors The input is fed into a step-level error detection and classification module, which consists of a fully connected neural network and a softmax classifier. For each step's state vector... The system performs independent analysis and outputs the probability distribution of the step belonging to multiple preset error types. Simultaneously, a sequence-level overall correctness discriminator is generated based on the entire high-dimensional step state vector sequence. The system determines the correctness of the final answer and generates a structured grading result that includes error labels for each step and the overall correctness of the answer.
[0043] Specifically, such as Figure 5 As shown, the structure and training process of the step-level error detection and classification module in this embodiment are as follows: the input of the module is a high-dimensional step state vector sequence from S4. For each step's state vector The classification is performed independently through a shared multi-layer fully connected neural network containing two hidden layers, using the ReLU activation function and Dropout regularization. The final layer connects to a softmax classifier, which outputs the class of the step. The probability of each of the preset error types ,in , The preset error types include calculation errors, formula misuse, logical jumps, conceptual confusion, redundant steps, and missing steps. Simultaneously, the sequence-level overall correctness discriminator receives the entire high-dimensional step state vector sequence. First, it is encoded into a context vector through a bidirectional LSTM, and then output as the probability of the final correct answer through a fully connected layer and a sigmoid function.
[0044] This step-level error detection and classification module is trained using a large-scale mathematical solution dataset labeled with step-level error types and overall answer correctness. The total loss function is... Cross-entropy loss defined as step classification Binary cross-entropy loss for overall answer discrimination The weighted sum, i.e. ,in and This is a hyperparameter.
[0045] In this embodiment, the number of neurons in the two hidden layers of the fully connected network shared by the step-level error detection and classification module are 256 and 128, respectively, the Dropout rate is set to 0.3, and the hidden layer dimension of the bidirectional LSTM network is 128. and They are 1.0 and 0.5 respectively.
[0046] S6. Based on the structured correction results and the original sequence of step text units. This drives a conditional feedback text generator to generate targeted step-level feedback information. The conditional feedback text generator is a sequence-to-sequence model based on the Transformer architecture. Its encoder receives step text concatenated with step error label information, and the decoder receives the high-dimensional step state vector sequence. Guided by global attention, natural language feedback text is generated for each step that identifies errors. This text includes explanations of the error causes, relevant knowledge tips, and corrective suggestions. Finally, it is compiled into a complete, step-related correction feedback report.
[0047] Specifically, in this embodiment, the input to the conditional feedback text generator includes the original sequence of step text units. The structured grading results from S5 and the high-dimensional step state vector sequence from S4. Text of each step The corresponding step error label string is concatenated to form a new input sequence. This new input sequence is then fed into a Transformer-based encoder to obtain the text encoding. The encoder is a 6-layer Transformer encoder, and the decoder is a 6-layer Transformer decoder. The decoder at each time step... Attention is calculated as follows:
[0048] in This is the query vector of the decoder at the current moment. , These are key-value pairs output by the encoder. , The high-dimensional step state vector sequence Key-value pairs formed after linear projection.
[0049] During the decoding phase, at each moment, the decoder's cross-attention mechanism not only focuses on the text encoding but also compels the high-dimensional step state vector sequence. Attention is computed as additional static key-value pairs. The decoder generates natural language feedback sentences for each erroneous step in an autoregressive manner and confirmation statements for correct steps. Finally, the feedback from all steps is compiled sequentially into a complete report.
[0050] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A method for step-by-step grading and feedback generation of mathematical solutions based on deep learning, characterized in that: Includes the following steps: S1. Obtain the text of the students' math solutions to be graded and preprocess it; S2. Input the sequence of step text units into the pre-trained mathematical language understanding model to generate the corresponding sequence of step semantic encoding vectors; S3. Input the step semantic encoding vector sequence into the step logic parsing module, and enhance the context information through a temporal convolutional network to obtain the enhanced step context encoding sequence. S4. Construct a hierarchical, semantically short-circuit-resistant logical relationship diagram and perform reasoning, including: S41. Input the enhanced step context encoding sequence into the logical role classifier, pre-label each encoding in the enhanced step context encoding sequence with a logical role label and assign an initial logical level; S42. Based on the multi-head attention mechanism and by introducing a learnable decay factor associated with the logical hierarchy difference between steps, calculate the potential correlation under hierarchical constraints. S43. Based on the causal discovery algorithm, with step sequence as constraint and combined with conditional independence test, the potential correlation is verified and purified to obtain logical dependency edges. S44. Construct a step logic relationship graph by combining the basic sequential edges and the logical dependency edges, and perform reasoning through a hierarchical graph neural network that performs horizontal and vertical message passing to generate a high-dimensional step state vector sequence. S5. Based on the high-dimensional step state vector sequence, perform step-level error detection and overall answer correctness judgment to generate structured grading results; S6. Based on the structured correction results and the original step text sequence, drive the conditional feedback text generator to generate step-level feedback information and compile it into a correction feedback report.
2. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 1, characterized in that, The preprocessing in S1 includes text cleaning, format standardization, and step boundary identification. The step boundary recognition is achieved through a segmenter based on a pre-trained language model, which segments the continuous solution process text into a discrete sequence of multiple step text units arranged in logical order.
3. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 2, characterized in that, The pre-trained mathematical language understanding model in S2 is a multi-layer Transformer encoder; Each unit in the text unit sequence is converted into a token sequence and a special mark is added before being input into the multi-layer Transformer encoder. The vector corresponding to the special mark position in the hidden state of the last layer of the encoder is extracted as the semantic encoding vector.
4. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 3, characterized in that, The step logic parsing module in S3 uses a layer number of... A one-dimensional temporal convolutional network implementation, in which The value of is between 2 and 4, and the kernel width is 3. Each code in the enhanced step context encoding sequence contains local context information.
5. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 4, characterized in that, The logical role classifier in S41 is a fully connected neural network. Its input is a single code in the enhanced step context encoding sequence, and its output is a probability distribution on a predefined set of logical roles. The predefined set of logical roles includes at least known conditions, theorem references, formula transformations, algebraic operations, intermediate inferences, and final conclusions. The role with the highest probability is selected as the pre-labeled logical role label, and each logical role label is mapped to a logical level with an integer value according to the predefined mapping rules.
6. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 5, characterized in that, S42 includes: For any two codes in the enhanced step context encoding sequence, the original relevance score is calculated using a multi-head attention mechanism; at the same time, based on the hierarchical difference between the two codes, the corresponding decay factor is obtained from a learnable parameter matrix. Multiply the original correlation score by the decay factor to obtain the hierarchical-constrained potential correlation score; The above operation is performed on all node pairs in the enhanced step context encoding sequence to generate a hierarchically constrained latent relevance score matrix.
7. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 6, characterized in that, S43 includes: Set a threshold, initialize the node pairs corresponding to the elements with scores higher than the threshold in the correlation score matrix as a set of candidate directed edges, with the direction pointing from the node with the smaller index to the node with the larger index, and use the step index as a strict time order constraint to prohibit edges pointing from subsequent steps to the predecessor steps. Perform a conditional independence test on the edges in the candidate directed edge set based on the step encoding vector. If the encoding conditions of two nodes are independent given a certain set of intermediate steps, then remove the edge. The final output is a set of verified and refined logical dependency edges.
8. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 7, characterized in that, The hierarchical graph neural network in S44 contains two sequential message-passing layers: The first layer is the horizontal propagation layer, which only allows message passing between nodes with the same or adjacent initial logical levels, and on all basic sequence edges; The second layer is the vertical propagation layer, which only allows message passing on edges that connect different initial logical levels in the set of logically dependent edges; Each node integrates the update information from the two layers of propagation, and outputs the final high-dimensional step state vector through a fusion layer.
9. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 8, characterized in that, S5 includes: For each high-dimensional step state vector, it is independently classified through a shared multi-layer fully connected neural network, and the probability of the step belonging to each of a variety of preset error types is output. The error types include calculation error, formula misuse, logical jump, concept confusion, step redundancy, and step missing. Meanwhile, the sequence-level overall correctness discriminator receives the entire sequence, encodes it into a context vector using a bidirectional LSTM, and then outputs the probability of the final answer being correct through a fully connected layer and a sigmoid function.
10. The method for step-by-step grading and feedback generation of mathematical solutions based on deep learning according to claim 9, characterized in that, The conditional feedback text generator in S6 is a sequence-to-sequence model based on the Transformer architecture. Its encoder receives a sequence of step texts that have been concatenated with step error label information. In the attention calculation at each time step, the decoder simultaneously focuses on the key-value pairs output by the encoder and the key-value pairs formed by linear projection of the high-dimensional step state vector sequence, and generates natural language feedback for each erroneous step in an autoregressive manner.
Citation Information
Patent Citations
A mathematical problem correction method and device
CN109886851A
Method and system for stipulating answering steps of mathematical subjective questions
CN120197696A
Mathematical teaching knowledge graph generation method and system based on artificial intelligence
CN120297385A
Subjective question scoring and evaluation system based on SOLO classification
CN120954016A
Intelligent question correcting method based on multi-modal large model
CN121615768A