Mathematical problem data enhancement method and system based on semantic retrieval

Through the data enhancement method of mathematical problems based on semantic retrieval, the problem of semantic disturbance in the prior art is solved, and the generation of semantic similar mathematical problems is realized, which expands the diversity of data sets and improves the adaptability of the model.

CN119692357AActive Publication Date: 2025-03-25GUANGDONG UNIV OF TECH

Patent Information

Application Number
CN202411916832.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-25
Estimated Expiration
2044-12-24

Smart Images

  • Figure CN119692357A_ABST
    Figure CN119692357A_ABST
Patent Text Reader

Abstract

The invention discloses a mathematical problem data enhancement method and system based on semantic retrieval. The method comprises the following steps: loading a mathematical problem data set, calculating features of each mathematical problem by using a preset neural network model encoder, and outputting an original feature set; for one feature in the set, the other feature closest to the feature in the whole feature set is screened out by calculating semantic similarity, and the screened feature is obtained; performing mixed enhancement on the original features and the screened features to obtain enhanced features; inputting the original features and the enhanced features into a preset neural network model decoder to obtain a structured solution; and repeating the above processes, and iteratively training parameters of the model by using a loss function with a gradient stopping strategy to obtain an optimized mathematical problem and a solution thereof. According to the method, the adaptability of the model to different question types can be effectively improved, language barriers can be overcome, and the method is also suitable for mathematical problems of Chinese and English.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of natural language processing, and more specifically, relates to a method and system for enhancing math problem data based on semantic retrieval. Background Art

[0002] Originating from the combination of technologies in fields such as machine reasoning and natural language processing with intelligent education, the automatic solution of math problems has once again become an active research issue in recent years. Automatic solution of math problems requires the model to have the ability to obtain useful information from text questions or diagrams, deduce the solution process and get the final answer, just like humans. This process is a huge challenge for the model. Therefore, building an automatic solution model for math problems has always been a key task in the field of natural language processing intelligent question answering, a core research issue in building a personalized intelligent education system, and one of the indispensable key technologies in the process of moving towards general artificial intelligence.

[0003] At present, many experts and scholars at home and abroad have proposed many datasets for this task, such as Math23k, MAWPS, GeoQA, and UniGeo. However, the existing dataset size is not enough to train a robust model, which will weaken the performance of such a highly data-driven model. In order to solve the problem of the model reaching performance bottleneck, more high-quality data is needed for training. In addition, due to the lack of a large number of directly available math questions and the requirement to master professional knowledge, the existing math question dataset is small in size. Traditional NLP data enhancement methods and existing math question data enhancement methods may cause missing question information. They directly modify the input data and will disturb the semantic information of the question too much. In addition, the existing math question data enhancement methods only target one type of question and language, such as only application questions or geometry questions, and are only suitable for Chinese, which limits the applicability of the model when processing different data.

[0004] The prior art invention patent with the publication number CN113095045B proposes a data enhancement method for Chinese math word problems based on reverse operation. It directly performs reverse operation on math problems. The generated math problem text may not be natural enough in language expression or conform to human understanding habits, affecting the interpretability of the model. These data enhancement methods based on input data will disrupt the semantics of the problem and are not suitable for data enhancement of math problems. Summary of the invention

[0005] The present invention aims to overcome the problems of the math problem data enhancement methods in the prior art, especially the problem that directly modifying the input data will excessively disturb the semantic information of the question, and the problem of relying on the text sequence of a specific language instead of focusing on the logical structure contained in the question. A math problem data enhancement method and system based on semantic retrieval is provided.

[0006] The primary purpose of the present invention is to solve the above technical problems. The technical solution of the present invention is as follows:

[0007] The first aspect of the present invention provides a method for enhancing math problem data based on semantic retrieval, comprising the following steps:

[0008] Load the math problem dataset, use the preset neural network model encoder to calculate the features of each math problem, and output the original math problem feature set;

[0009] For a math problem feature in the set, another math problem feature that is most similar to the feature is selected from the entire feature set by calculating semantic similarity, thereby obtaining the selected math problem feature;

[0010] The original math problem features and the filtered math problem features are mixed and enhanced to obtain enhanced math problem features;

[0011] Input the original math problem features and the enhanced math problem features into a preset neural network model decoder to obtain a structured solution to the math problem;

[0012] Repeat the above process and use the loss function with a gradient stopping strategy to iteratively train the parameters of the encoder, decoder, and hybrid enhancement process to minimize the semantic difference between the original features and the enhanced features, and obtain the optimized math problem and its solution.

[0013] Furthermore, the method of calculating the features of each piece of data using a preset neural network model encoder includes the following steps:

[0014] Use the embedding layer to convert each word in the math problem text into a word embedding vector;

[0015] Input the converted word embedding vector sequence into the encoder and output the hidden state sequence;

[0016] The last hidden state of the hidden state sequence is taken as the feature output of the math problem text.

[0017] Furthermore, the method for selecting the most similar math problem features includes the following steps:

[0018] Select each math problem feature from the original feature set in order as the target math problem feature;

[0019] Calculate the similarity distance between the math problem feature and other math problem features in the original feature set;

[0020] By comparing all calculated distance values, the math problem feature with the smallest distance to the target math problem feature is selected to obtain the selected math problem feature.

[0021] Furthermore, the hybrid enhancement method comprises the following steps:

[0022] Generate a first binary mask and a second binary mask which is bit-wise inverse of the first binary mask; randomly generate a mixing ratio coefficient;

[0023] According to the mixing ratio coefficient, the first binary mask and the second binary mask, the original math problem feature and the filtered math problem feature are mixed to obtain an enhanced math problem feature, which is expressed as:

[0024] h′ i =α·M·h i +(1-α)·M·h s +M′·h i (1)

[0025] Among them, α is the mixing ratio coefficient, M, M′ are both binary masks, α∈[0,1], h i is a feature of an original math problem, h s is with h i The feature of similar math problems with the smallest distance, h′ i h i and h s The corresponding generated enhanced math problem features.

[0026] Furthermore, the preset neural network model is a GTS model or a NGS model.

[0027] Furthermore, training is performed using a loss function with a gradient stopping strategy, including the following steps:

[0028] Input the original math problem features and the enhanced math problem features into the decoder respectively to obtain their respective predicted output probability distributions;

[0029] Combined with the gradient stopping strategy and the respective predicted output probability distributions, the loss function is used to train the parameters of the encoder, decoder and hybrid enhancement process to minimize the semantic difference between the original features and the enhanced features.

[0030] Furthermore, the loss function includes: the loss of the original math problem features and the target, the loss of the enhanced math problem features and the target, and the loss of the constrained target. The total loss function expression is as follows:

[0031] L=L ori +L mix +β·L con (2)

[0032] Among them, L ori is the loss of the original math problem features and the target, L mixTo enhance the loss of mathematical problem features and objectives, β is the constraint target L con The loss weight.

[0033] Furthermore, the loss of the original math problem feature and the target, and the loss of the enhanced math problem feature and the target are negative log-likelihood loss functions, wherein the expression of the loss of the original math problem feature and the target is:

[0034] L ori =-∑ (Y,X)∈D log(P θ (Y|X)) (3.1)

[0035] The loss expression of enhanced math problem features and targets is:

[0036] L mix =-∑ (Y,X)∈D log(P′ θ (Y|X)) (3.2)

[0037] Among them, X is the input data, Y is the target expression tree to be generated corresponding to the input data, θ is the parameter of the entire network structure, P θ (Y|X) is the predicted output probability distribution of the original math problem features, P′ θ (Y|X) is the predicted output probability distribution of the enhanced math problem features.

[0038] Furthermore, the loss of the constraint target is the symmetric Kullback-Leibler divergence, and the expression of the constraint target loss is:

[0039]

[0040] Among them, X is the input data, Y is the target expression tree to be generated corresponding to the input data, and P θ (Y|X) is the predicted output probability distribution of the original math problem features, P′ θ (Y|X) is the predicted output probability distribution of the enhanced math problem features, stopgrad(·) represents the gradient stopping strategy, and D kl (·,·) means computing the symmetric Kullback-Leibler divergence.

[0041] The second aspect of the present invention provides a mathematical problem data enhancement system based on semantic retrieval, the system comprising: a memory and a processor, the memory comprising a mathematical problem data enhancement method program based on semantic retrieval, the mathematical problem data enhancement method program based on semantic retrieval implementing the steps of a mathematical problem data enhancement method based on semantic retrieval when executed by the processor.

[0042] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0043] The present invention uses semantic retrieval, and does not directly enhance the input data, but enhances the input data at the feature level, and can generate math problems that are semantically similar to the original data. By introducing moderate disturbances and changes, the model not only learns the features of the original problem, but also learns the features of other related problems, effectively expanding the diversity of the data set and improving the model's adaptability to different types of questions. In addition, the present invention mixes and enhances at the high-level representation level of the data, that is, at the feature level of the problem. It does not rely on the text sequence of a specific language, but focuses on the logical structure contained in the question. It is not only suitable for geometry problems that require spatial geometry reasoning and application problems that require understanding of actual situations, but can also cross language barriers and is also suitable for math problems in Chinese and English. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to make the purpose and technical solution of the present invention clearer, the present invention provides the following drawings and descriptions:

[0045] Figure 1 A flow chart of a method provided by an embodiment of the present invention;

[0046] Figure 2 A process diagram of semantic retrieval and hybrid enhancement provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0049] Embodiment 1:

[0050] The present invention provides a method for enhancing math problem data based on semantic retrieval, such as Figure 1 The figure shows a flow chart of a method for enhancing math problem data based on semantic retrieval. The specific steps are as follows:

[0051] The Chinese mathematics geometry questions in this embodiment are selected from the GeoQA data set. GeoQA has a total of 4998 questions. An example of the selected geometry question text is: {"Problem":"As shown in the figure, in ΔABC, it is known that ∠A=80°, ∠B=60°, DE / / BC, then the size of ∠CED is ()A.40°B.60°C.120°D.140°","answer":"D"}.

[0052] To demonstrate the cross-language functionality, we select English word problems from the MAWPS dataset. The example is: {“Problem”:”Mary is baking a cake. The recipe wants 8 cups of flour. She already put in 2 cups. How many cups does she need to add?”,”answer”:”6”}.

[0053] S1: Load the math problem dataset, use the preset neural network model encoder to calculate the features of each math problem, and output the original math problem feature set;

[0054] The specific process is:

[0055] Use the embedding layer to convert each word in the math problem text into a word embedding vector;

[0056] Input the converted word embedding vector sequence into the encoder and output the hidden state sequence;

[0057] The last hidden state of the hidden state sequence is taken as the feature output of the math problem text.

[0058] Assume that the input dataset N is the size of the dataset, and a single question text can be represented as The question text first passes through the embedding layer to obtain each word x j The corresponding word embedding is then passed through the encoder to obtain a hidden state sequence. The last hidden state of the hidden state sequence is taken as the feature of the question text, denoted as h i By performing the above operation on each question text, we can obtain the feature set of the original math problem Each math problem has the following characteristics: i The same length.

[0059] S2: For a math problem feature in the set, another math problem feature that is most similar to the feature is selected from the entire feature set by calculating semantic similarity, and the selected math problem feature is obtained;

[0060] The specific process is:

[0061] Select each math problem feature from the original feature set in order as the target math problem feature;

[0062] Calculate the similarity distance between the math problem feature and other math problem features in the original feature set;

[0063] By comparing all calculated distance values, the math problem feature with the smallest distance to the target math problem feature is selected to obtain the selected math problem feature.

[0064] For each math problem feature h i , respectively calculate the distance between it and other math problem features in the feature set. The distance calculation used here is shown in expression (5). Compare the sizes of these N-1 distances and select the one with h i Another math problem feature with the smallest distance h s , recorded as the characteristics of similar mathematical problems.

[0065]

[0066] Among them, cosine(·,·) means calculating the cosine similarity between the two, which is equal to the dot product of the two vectors divided by the product of the lengths of the two vectors.

[0067] By calculating the distance between two math problem features, the distance calculation formula here can be cosine distance, Euclidean distance, etc. The smaller the distance between two math problem features, the more consistent their directions in the hidden space are, and the higher the similarity between them. For each math problem feature, select another math problem feature with the highest similarity from the entire original feature set.

[0068] Through semantic retrieval, instead of directly enhancing the input data, it enhances the input data at the feature level, which can generate math problems that are semantically similar to the original data. By introducing moderate perturbations and changes, the model not only learns the characteristics of the original problem, but also learns the characteristics of other related problems, effectively expanding the diversity of the data set and improving the model's adaptability to different question types.

[0069] S3: Mix and enhance the original math problem features with the filtered math problem features to obtain enhanced math problem features;

[0070] The specific process is:

[0071] Generate a binary mask and another binary mask that is bit-by-bit opposite to it; randomly generate a mixing ratio coefficient to determine whether each part of the original math problem feature is mixed with the corresponding part of the similar math problem feature. Generate a binary mask M and another binary mask M′ that is bit-by-bit opposite to M. Both M and M′ are composed of 0 and 1, and the proportion of 0 and 1 is random. M is used to select part of the information in the original math problem feature and mix it with the part corresponding to the similar math problem feature. 1 indicates that the part is selected for mixing, and 0 indicates that it is not mixed. M′ is used to retain the information in the original math problem feature except the part to be mixed.

[0072] According to the mixing ratio coefficient and the binary mask, the original math problem feature and the screened math problem feature are mixed to obtain the enhanced math problem feature. If a part of the original math problem feature is to be mixed with the similar math problem feature, the operation is performed according to the mixing ratio. A mixing ratio coefficient α is generated, which is a random number between [0, 1]. The mixing ratio of the original math problem feature and the similar math problem feature is α: (1-α). Substitute the two binary masks M and M′ and the random number α into expression (6) to obtain the enhanced math problem feature h′ i For each math problem feature h i By performing the above operations, we can obtain the enhanced math problem feature set. like Figure 2 The characteristic expression of a single math problem is:

[0073] h′ i =α·M·h i +(1-α)·M·h s +M′·h i (6)

[0074] Among them, α is the mixing ratio coefficient, M, M′ are both binary masks, and h i is a feature of an original math problem, h s is with h i The feature of similar math problems with the smallest distance, h′ i h i and h s The corresponding enhanced math problem features are generated. The present invention mixes and enhances at the high-level data representation level, that is, the feature level of the problem. It does not rely on the text sequence of a specific language, but focuses on the logical structure contained in the question. It is not only applicable to geometry problems that require spatial geometry reasoning and application problems that require understanding of actual situations, but can also overcome language barriers and is also applicable to math problems in Chinese and English.

[0075] S4: Inputting the original math problem features and the enhanced math problem features into a preset neural network model decoder to obtain a structured solution to the math problem;

[0076] The preset neural network model is a GTS model or an NGS model. The encoder and decoder of the GTS model are used when processing English word problems; the encoder and decoder of the NGS model are used when processing Chinese geometry problems. In this example, the GTS model is used to directly generate an expression tree in a target-driven manner. The enhanced math problem feature set H′ and the original math problem feature set H are input into the GTS model. GTS first initializes the target vector of the root node according to the math problem features, then decomposes the target, uses a recursive neural network to encode the subtree, and finally generates an expression tree. The target expression trees of the enhanced math problem feature set H′ and the original math problem feature set H output by GTS are respectively denoted as Y′ gen and Y gen , and obtain structured solutions to math problems.

[0077] It should be noted that the output of the GTS model is an executable program or expression, and the result of the math problem can be calculated based on the executable program or expression.

[0078] S5: Repeat the above process and use the loss function with a gradient stopping strategy to iteratively train the parameters of the encoder, decoder, and hybrid enhancement process to minimize the semantic difference between the original features and the enhanced features, and obtain the optimized math problem and its solution.

[0079] The specific process is:

[0080] The original math problem features and the enhanced math problem features are respectively input into the decoder to obtain their respective predicted output probability distributions. The decoder uses LSTM. The enhanced math problem feature set H′ obtained by expression (6) and the feature set H of the original math problem in step S1 are respectively input into the decoder, and finally pass through a linear layer to obtain their respective predicted probability distributions P′ θ (Y|X) and P θ (Y|X), θ is the parameter of the entire network structure.

[0081] Define the constraint target, and measure the semantic difference between the original features and the enhanced features by calculating the symmetric Kullback-Leibler (KL) divergence between the two predicted output probability distributions. The targets of the enhanced math problem feature set H′ and the original math problem feature set are the same. The two path networks can be approximately regarded as two different model networks. The constraint target is constructed using the symmetric KL divergence, and the expression is as follows:

[0082]

[0083] Among them, X is the input data, Y is the target expression tree to be generated corresponding to the input data, θ is the parameter of the entire network structure, P θ (Y|X) is the predicted output probability distribution of the original math problem features, P′ θ (Y|X) is the predicted output probability distribution of the enhanced math problem features, stopgrad(·) represents the gradient stopping strategy, and D kl (·,·) means calculating the symmetric KL divergence.

[0084] The introduction of the gradient stopping strategy can prevent the instability of the model during the optimization process. The negative log-likelihood loss function is used for training, combining the loss of the original math problem features and their targets, the loss of the enhanced math problem features and their targets, and the loss weights of the constrained targets to minimize the semantic difference between the original features and the enhanced features.

[0085] Assume that the input dataset is X i is the input data, Y i is the target expression tree of the problem. The task loss of the model is the negative log likelihood of the entire data set, and the loss expression of the original math problem features and the target is:

[0086] L ori =-Σ (Y,X)∈D log(P θ (Y|X)) (8.1)

[0087] The loss expression of enhanced math problem features and targets is:

[0088] L mix =-Σ (Y,X)∈D log(P′ θ (Y|X)) (8.2)

[0089] Among them, X is the input data, Y is the target expression tree to be generated corresponding to the input data, θ is the parameter of the entire network structure, P θ (Y|X) is the predicted output probability distribution of the original math problem features, P′ θ (Y|X) is the predicted output probability distribution of the enhanced math problem features.

[0090] The constrained objective is constructed using the symmetric KL divergence, as shown in expression (8).

[0091]

[0092] Among them, X is the input data, Y is the target expression tree to be generated corresponding to the input data, and P θ (Y|X) is the predicted output probability distribution of the original math problem features, P′ θ(Y|X) is the predicted output probability distribution of the enhanced math problem feature, stopgrad(·) represents the gradient stopping strategy, which is introduced when calculating the symmetric KL divergence to prevent the model from crashing. kl (·,·) means calculating the symmetric KL divergence.

[0093] As shown in expression (9), the overall training objective consists of three parts.

[0094] L=L ori +L mix +β·L con (10)

[0095] Among them, L ori is the loss of the original math problem features and the target, L mix To enhance the loss of mathematical problem features and objectives, β is the constraint target L con The loss weight of β is 0.01.

[0096] The loss function is used to train the parameters of the encoder, decoder and hybrid enhancement process to minimize the semantic difference between the original features and the enhanced features. In this embodiment, the Chinese math geometry problem is finally output as an executable program: "Program": "g_minus, C_3, N_0, N_1, g_minus, C_3, _0", and the answer to the problem is calculated by executing this program as a value of 140.0; the English word problem is finally output as an expression: "Equation": "-8.0 2.0", and the answer to the problem is calculated by calculating the expression as a value of 6.0.

[0097] Embodiment 2:

[0098] The present embodiment provides a math problem data enhancement system based on semantic retrieval, including a memory and a processor, wherein the memory includes a math problem data enhancement method program based on semantic retrieval, and when the math problem data enhancement method program based on semantic retrieval is executed by the processor, the steps of a math problem data enhancement method based on semantic retrieval as described in Example 1 are implemented.

[0099] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for enhancing math problem data based on semantic retrieval, characterized in that: The steps include: Load the math problem dataset, use the preset neural network model encoder to calculate the features of each math problem, and output the original math problem feature set; For a math problem feature in the set, another math problem feature that is most similar to the feature is selected from the entire feature set by calculating semantic similarity, thereby obtaining the selected math problem feature; The original math problem features and the filtered math problem features are mixed and enhanced to obtain enhanced math problem features; Input the original math problem features and the enhanced math problem features into a preset neural network model decoder to obtain a structured solution to the math problem; Repeat the above process and use the loss function with a gradient stopping strategy to iteratively train the parameters of the encoder, decoder, and hybrid enhancement process to minimize the semantic difference between the original features and the enhanced features, and obtain the optimized math problem and its solution.

2. According to the method for enhancing math problem data based on semantic retrieval according to claim 1, it is characterized in that: The method for calculating the features of each piece of data using a preset neural network model encoder includes the following steps: Use the embedding layer to convert each word in the math problem text into a word embedding vector; Input the converted word embedding vector sequence into the encoder and output the hidden state sequence; The last hidden state of the hidden state sequence is taken as the feature output of the math problem text.

3. The method for enhancing math problem data based on semantic retrieval according to claim 1, characterized in that: The method for selecting the most similar mathematical problem features includes the following steps: Select each math problem feature from the original feature set in order as the target math problem feature; Calculate the similarity distance between the math problem feature and other math problem features in the original feature set; By comparing all calculated distance values, the math problem feature with the smallest distance to the target math problem feature is selected to obtain the selected math problem feature.

4. The method for enhancing math problem data based on semantic retrieval according to claim 1, characterized in that: The hybrid enhancement method comprises the following steps: Generate a first binary mask and a second binary mask which is bit-wise inverse of the first binary mask; randomly generate a mixing ratio coefficient; According to the mixing ratio coefficient, the first binary mask and the second binary mask, the original math problem feature and the filtered math problem feature are mixed to obtain an enhanced math problem feature, which is expressed as: h′ i =α·M·h i +(1-α)·M·h s +M′·h i (1) Among them, α is the mixing ratio coefficient, M, M′ are both binary masks, α∈[0,1], h i is a feature of an original math problem, h s is with h i The feature of similar math problems with the smallest distance, h′ i h i and h s The corresponding generated enhanced math problem features.

5. The method for enhancing math problem data based on semantic retrieval according to claim 1, characterized in that: The preset neural network model is a GTS model or an NGS model. The encoder and decoder of the GTS model are used when processing English word problems; the encoder and decoder of the NGS model are used when processing Chinese geometry problems.

6. The method for enhancing math problem data based on semantic retrieval according to claim 1, characterized in that: Training using a loss function with a gradient stopping strategy involves the following steps: Input the original math problem features and the enhanced math problem features into the decoder respectively to obtain their respective predicted output probability distributions; Combined with the gradient stopping strategy and the respective predicted output probability distributions, the loss function is used to train the parameters of the encoder, decoder and hybrid enhancement process to minimize the semantic difference between the original features and the enhanced features.

7. The method for enhancing math problem data based on semantic retrieval according to claim 6, characterized in that: The loss function includes: the loss of the original math problem features and the target, the loss of the enhanced math problem features and the target, and the loss of the constrained target. The total loss function expression is as follows: L=L ori +L mix +β·L con (2) Among them, L ori is the loss of the original math problem features and the target, L mix To enhance the loss of mathematical problem features and objectives, β is the constraint target L con The loss weight.

8. The method for enhancing math problem data based on semantic retrieval according to claim 7, characterized in that: The loss of the original math problem feature and the target, and the loss of the enhanced math problem feature and the target are negative log-likelihood loss functions, wherein the expression of the loss of the original math problem feature and the target is: L ori =-∑ (Y,X)∈D log(P θ (Y|X)) (3.1) The loss expression of enhanced math problem features and targets is: L mix =-∑ (Y,x)∈D log(P′ θ (Y|X)) (3.2) Among them, X is the input data, Y is the target expression tree to be generated corresponding to the input data, θ is the parameter of the entire network structure, P θ (Y|X) is the predicted output probability distribution of the original math problem features, P θ ′(Y|X) is the predicted output probability distribution of the enhanced math problem features.

9. The method for enhancing math problem data based on semantic retrieval according to claim 7, characterized in that: The loss of the constraint objective is the symmetric Kullback-Leibler divergence, and the expression of the constraint objective loss is: Among them, X is the input data, Y is the target expression tree to be generated corresponding to the input data, and P θ (Y|X) is the predicted output probability distribution of the original math problem features, P θ ′(Y|X) is the predicted output probability distribution of the enhanced math problem features, stopgrad(·) represents the gradient stopping strategy, and D kl (·,·) means computing the symmetric Kullback-Leibler divergence.

10. A mathematical problem data enhancement system based on semantic retrieval, characterized in that: The system includes: a memory and a processor, wherein the memory includes a math problem data enhancement method program based on semantic retrieval, and when the math problem data enhancement method program based on semantic retrieval is executed by the processor, the steps of a math problem data enhancement method based on semantic retrieval as described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • A Data Augmentation Method for Chinese Mathematical Word Problems Based on Reverse Operations

    CN113095045B

  • Grammar dependence enhanced mathematical application question semantic recognition and reasoning method and system

    CN112613323A

  • Automatic problem solving method for plane geometry mathematical problem

    CN116028888A

Cited By

  • Mathematical problem generation method and system based on adaptive multilevel retrieval enhancement

    CN120450035A