[go: up one dir, main page]

CN119443267A - A method and system for solving mathematical problems by thinking chain reasoning based on feature classifier - Google Patents

A method and system for solving mathematical problems by thinking chain reasoning based on feature classifier Download PDF

Info

Publication number
CN119443267A
CN119443267A CN202411479942.2A CN202411479942A CN119443267A CN 119443267 A CN119443267 A CN 119443267A CN 202411479942 A CN202411479942 A CN 202411479942A CN 119443267 A CN119443267 A CN 119443267A
Authority
CN
China
Prior art keywords
reasoning
node
path
training
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202411479942.2A
Other languages
Chinese (zh)
Other versions
CN119443267B (en
Inventor
李嘉明
谢亮
王闻箫
林彬彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202411479942.2A priority Critical patent/CN119443267B/en
Publication of CN119443267A publication Critical patent/CN119443267A/en
Application granted granted Critical
Publication of CN119443267B publication Critical patent/CN119443267B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Algebra (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention discloses a method and a system for solving a thinking chain reasoning mathematical problem based on a feature classifier, which comprise the steps of (1) obtaining a mathematical problem set and selecting forward and reverse thinking chain examples to splice to form a new set, (2) respectively inputting new set elements into a model to perform reasoning and constructing a word-level reasoning path spanning tree, selecting a attention weight matrix processed by pooling differences as node features to store, (3) traversing all generated reasoning path spanning trees, screening nodes meeting requirements to construct a feature classifier training set, (4) training the feature classifier by using a support vector machine algorithm, and (5) participating in path selection in a pre-training language model reasoning process through the trained feature classifier to obtain more accurate reasoning processes and answers. By utilizing the method, the adjustment and control of finer granularity of the pre-training language model reasoning path can be realized, the accurate reasoning and solving of the pre-training language model reasoning path on mathematical problems are facilitated, and the generalization level of the pre-training language model reasoning path is improved.

Description

Thinking chain reasoning mathematical problem solving method and system based on feature classifier
Technical Field
The invention relates to the technical field of computer application, in particular to a thinking chain reasoning mathematical problem solving method and system based on a feature classifier.
Background
In recent years, the deep learning artificial intelligence technology mainly goes through the following research paradigm shift from an early task specific model of 'annotation data supervised learning', to a pre-training model of 'non-annotation data pre-training+annotation data fine tuning', to a large model of 'large-scale non-annotation data pre-training+instruction fine tuning+human alignment', and gradually enters the age of a large model. Meanwhile, as the model parameter scale and the pre-training data scale are continuously increased and reach the billion level, a large language model has developed a strong context learning capability, namely learning from examples of model input contexts, so that a series of complex tasks can be executed, and the model is a powerful tool for helping human beings to process a series of automated complex tasks. As a specific application of the context learning, the thinking chain technology can remarkably improve the performance of a large model under a complex reasoning task scene by gradually participating in the large language model to decompose a complex problem into sub-problems step by step and sequentially solving the sub-problems, and completing the mapping from input to the thinking chain and then to output.
Mathematical reasoning is crucial to artificial intelligence, and promotes continuous exploration for autonomously solving mathematical problems. This process requires enhanced model reasoning capabilities, intensive research into text understanding, image recognition, form analysis, symbolic operations, logical operations, and intensive knowledge of the world. The understanding capability of the large language model in various mathematical fields is comprehensively improved, not only can the technical strength be embodied, but also the method is an important step for general artificial intelligence. Existing studies can demonstrate that large language models are effective tools to help solve mathematical problems, whose language capabilities motivate us to explore how to use them for mathematical reasoning, revealing new insights into the synergy between language and logic.
As disclosed in chinese patent document CN116595159a, a training method and apparatus for a mathematical problem solution model are disclosed, in which a solution with an inference process for generating a correct answer to a mathematical problem is first generated as an example of learning a thought chain by using a pre-training language model with freezing parameters, then the mathematical problem solution model is used to generate multiple inference processes and answers corresponding to a target mathematical problem to be solved, and a self-consistent majority voting method is adopted to take the inference process and answer with the largest number of times as a final result corresponding to the target mathematical problem.
Chinese patent document publication No. CN118113444a discloses a task processing method, apparatus, electronic device, and storage medium. According to the method, the target task is subjected to step decomposition according to the input content and the output description of the target task through a pre-training language model, so that a corresponding thinking tree is generated. The nodes of the mental tree represent each step obtained by decomposing the steps, so that the model has the capability of searching among a plurality of inference chains. Searching an optimal step path for executing the target task in the thinking tree based on a preset searching algorithm, then executing the target task according to the input content based on the optimal step path, and outputting an execution result.
However, the follow-up work related to the prior pre-training language model thinking chain reasoning comprises self-consistency, thinking tree and other methods for promoting the reasoning of complex mathematical problems, all focused on a sequence-level reasoning path, and the method has limited effect on promoting the accuracy of a reasoning result and is constrained by the type of the mathematical problems. In addition, self-consistency may generate incorrect or nonsensical inference paths, and the search method of the inference chain of the thinking tree also needs more computing resources relative to sampling, and similar works are limited by the computing cost and performance.
Disclosure of Invention
The invention provides a thinking chain reasoning mathematical problem solving method and system based on a feature classifier, which can provide a problem solving process and a problem solving answer with higher quality and accuracy.
A thinking chain reasoning mathematical problem solving method based on a feature classifier comprises the following steps:
(1) Obtaining a mathematical problem set q= { Q 1,q2…qn }, for each element Q i, finding two corresponding examples using a mental chain hint generation method AndSo thatA correct answer is obtained and the user can obtain the correct answer,Obtaining wrong answers, forming a new set Q ={q1 ,q 2…q n }, wherein
(2) Based on the new set Q , inputting a pre-training language model by using a thinking chain prompting method, constructing a word-level reasoning path spanning tree, and storing an attention weight matrix A i after the average pooling and difference operation by each node n i;
(3) Traversing all the reasoning path spanning trees generated in the step (2), screening nodes meeting the requirements, and constructing a feature classifier training set, wherein the attention weight matrix A i of the nodes is used as a feature, the reasoning path result is used as a label, and a training data sample pair set D is constructed;
(4) Training a feature classifier C by using a support vector machine algorithm according to the training set generated in the step (3);
(5) And (3) in the pre-training language model reasoning stage, for the target mathematical problem q to be solved, randomly selecting two examples d a and d b in the data set, simultaneously carrying out reasoning, continuing to predict and generate until the end if the reasoning paths are the same, enabling the feature classifier C trained in the step (4) to select a word with higher correct probability to continue reasoning if the reasoning paths are different, finally obtaining a complete reasoning process, and extracting corresponding answers.
The invention firstly selects partial questions based on a mathematical question data set and constructs a word granularity level reasoning path spanning tree by using a thinking chain method, and then screens training sample data to train a feature selector. When the pre-training predictive model is used for reasoning, a thought chain prompting method is used for processing target mathematical questions to be solved, and during reasoning, a feature classifier intervenes in the selection generation of a reasoning path, so that a problem solving process and a problem solving answer with higher quality and accuracy are obtained.
In step (1), two examples are found corresponding using the mental chain hint generation methodAndThe specific process is as follows:
representing probability distribution fitted to a pre-trained large language model with parameter θ using p θ
Representing N d thought chain cues, where d i=(qi,ri,ai) is the ith example, q i,ri,ai represents the question, the reasoning step, and the answer, respectively, and if q represents the question to be reasoned, then the less sample thought chain FS-CoT is defined as:
Wherein y= { r, a } is the generated reasoning step r and the reasoning result a, only consider the situation that the value of N d is 1, and for each problem q i, the corresponding example is found by traversing the mathematical problem set AndSo thatAnswers obtained with maximum probabilityCorrect and at the same timeAnswers obtained with maximum probabilityError, eliminating the problem if no corresponding example is found, and finally, combining the problem and the corresponding two examples to obtain a new set Q ={q1 ,q 2…q m }, m.ltoreq.n, where
The specific process of the step (2) is as follows:
For all elements within new set Q , for Input text for obtaining pre-trained language model by stitchingFreezing all parameters of the model, and taking the parameters as input of a pre-training language model to perform forward reasoning;
In the reasoning process, q i correspondingly generates a reasoning path tree G i, each node n j comprises three types of attributes (f (A j,l),xj,rj), wherein x j represents the text of the current node, r j represents the accuracy of all reasoning paths passing through the node n j, and A j represents the attention weight matrix of the model when x j is generated in a prediction mode;
The process of constructing the inference path tree includes constructing an empty node n root as the root node of the inference path tree, marking as non-leaf nodes, finding one of the non-leaf nodes in the end nodes of each path of the tree, setting the node as n i, and enabling the path from the root node n root to the node n i to represent an inference path Then determine the child node condition of node n i, specificallyAnd (3) withRespectively inputting a pre-training language model, and predicting the language model according to the following probability when the first i text sequences are input:
x i+1 there are two cases:
first, the text generated for the two campt runs is the same, i.e Then node n i adds a child node n i+1 with the text attribute set toIf it isIf the child node is a sentence terminator, marking the child node as a leaf node;
Second, the text generated for the two campt runs is different, i.e Then insert left and right child nodes for node n i, respectivelyText attributes are respectively set asAndIf it isIs a sentence terminator, then the child node is markedIs a leaf node ifIs a sentence terminator, then the child node is markedIs a leaf node;
And the like, until the end node of each path of the tree is a leaf node, finally, all elements in the new set Q generate a corresponding reasoning path tree to obtain a set G=of the tree
{G1,G2,...Gm}。
In the step (3), nodes meeting the requirements are screened to construct a feature classifier training set, and the specific process is as follows:
Firstly, the set G of the tree generated in the step (2) comprises m trees, each of which corresponds to each problem in the mathematical problem set Q , each node in the tree comprises three parts of attributes, n i=(f(Ai,l),xi,ri) which are respectively a feature matrix, a text and the accuracy of all the inference paths passing through the node n i, before screening training set samples, the r i attributes of the nodes need to be calculated, an inference path is formed by assuming that for one inference path generating tree, the paths from the root node to the leaf nodes form, and a unique attribute a for one inference path represents the accuracy of the result of the inference path, wherein 1 represents the accuracy and 0 represents the error, thus the following calculation formula is obtained:
Wherein, beta (n u,Sj) represents whether the node n j belongs to the inference path S i, if so, the value is 1, and if not, the value is 0, the inference path correct rate of all nodes of all trees in the tree set G is calculated according to the formula, and then the nodes meeting the requirements are screened out based on the following conditions to be used as a training data set of the training feature classifier:
① . The nodes do not belong to root nodes and leaf nodes;
② . The r attribute value of the node is 0% or 100%, namely, the situation that the answers of the reasoning paths passing through the node are all wrong or are all correct is considered;
All eligible nodes are grouped into a node set n= { N 1,n2,...
The specific process of the step (4) is as follows:
Firstly, extracting the characteristics of each element of a training data set D as input, taking an inference path result as a label, carrying out standardized processing on the data, then, mapping the data to a high-dimensional characteristic space by using a radial basis function, training a support vector machine classification model by taking the maximum Lagrange dual problem as an objective function, evaluating the performance of the model by using cross verification, and adjusting super parameters as required, and finally, saving the trained support vector machine model for subsequent reasoning, wherein the obtained characteristic classifier C is as follows:
Wherein x is a new input sample, the similarity between the sample and all training samples x i is calculated through a kernel function K (x i, x), then the similarity is weighted and summed, wherein alpha iyi is derived from Lagrangian multipliers learned in the training process and labels of the training samples, and finally a bias term b is added, and a classification result is obtained through a sign function sign.
In the step (5), if the inference paths are different, the feature classifier C trained in the step (4) selects a word with higher accuracy probability to continue the inference, which specifically includes:
Respectively calculating attention weight matrixes used for generating the current text, carrying out average pooling of layer dimension and linear interpolation processing of sequence length dimension to obtain a feature matrix A a in an example d a and a feature matrix A b in an example d b, and obtaining a classification result of the feature matrix through a feature classifier C (x), wherein the classification result comprises the following 3 cases, and respectively carrying out the following processing according to the cases:
①、C(Aa)=C(Ab ) =1, i.e. in the current text, both play a positive role in the correctness of the inference path generation, in which case the larger numerical term in the sign function in the feature classifier C is selected as the current generated text prediction content;
②、C(Aa)=-1,C(Ab ) =1 or C (a a)=1,C(Ab) = -1, i.e. for the current text, both examples work positively and negatively, respectively, for the correctness of the correct inference path generation; in this case, a text of C (x) =1 is selected as the currently generated text prediction content;
③、C(Aa)=C(Ab ) = -1, i.e. in the current text, both play a negative role in the correctness of the inference path generation, in which case the smaller items of value within the sign function in the feature classifier C are selected as the current generated text prediction content.
Based on the same inventive principle, the invention also provides a thinking chain reasoning mathematical problem solving system based on the feature classifier, which comprises the following steps:
The thinking chain prompt generation module is used for acquiring mathematical reasoning problems to be processed, selecting examples and instructions meeting requirements according to the problems and forming complete input of a pre-training language model;
The inference path tree generation and feature screening module is used for generating a word-level inference path generation tree and screening out feature training data sets meeting the requirements;
the feature classifier training module is used for training the feature classifier, introducing a support vector machine algorithm based on a feature training data set, mapping data to a high-dimensional feature space by using a radial basis function as a kernel function, and improving the training efficiency of the support vector machine by using a sequence minimum optimization algorithm;
The feature classifier is used for guiding the pre-training language model to select a more accurate reasoning path through intervention of the feature classifier, so that a final mathematical problem reasoning process and a final mathematical problem reasoning answer are obtained.
Based on the same inventive principle, the invention also provides a thinking chain reasoning mathematical problem solving system based on the feature classifier, which comprises a memory and one or more processors, wherein the memory stores executable codes, and the one or more processors are used for realizing the thinking chain reasoning mathematical problem solving method when executing the executable codes.
Compared with the prior art, the invention has the following beneficial effects:
1. The present invention focuses on the predictive generation of text levels. The granularity of processing at the text level is significantly smaller than the currently prevailing sequence level technique. This results in improved accuracy of the predictions, while enabling more accurate and efficient control over the generation of the inference results. In practical application, the fine processing of the text level can be better adapted to complex and changeable demand scenes, and more targeted and reliable results are provided for users.
2. The invention innovatively utilizes a self-training feature classifier. The classifier exhibits excellent migration ability and broad generalization performance in the face of various different types of mathematical reasoning tasks. This means that it can adapt and function quickly in different tasks and scenarios without extensive retraining and adjustment, thus greatly improving the working efficiency and versatility of the model.
3. Compared with common methods such as self-consistency and search of a thinking tree inference chain, the method has obvious advantages in the aspect of the demand of computing resources. It has relatively less resource requirements and can significantly save the calculation cost. The method not only reduces the hardware threshold of system operation, but also provides greater possibility for large-scale application and deployment, so that efficient operation can be smoothly carried out in an environment with limited resources.
4. The invention also has a certain research significance for the interpretive work of the reasoning of the pre-training language model under the prompt of the thinking chain. The method provides a new thought and a new method for the research and the practice in the field, is helpful for further deepening the understanding of the language model reasoning process, and promotes the related technology to develop towards a more transparent, interpretable and reliable direction.
Drawings
FIG. 1 is a flow chart of a method for solving a mental chain reasoning mathematical problem based on a feature classifier;
FIG. 2 is a schematic diagram of a forward and reverse example build inference path spanning tree;
FIG. 3 is a schematic diagram of a filtering inference path tree node;
fig. 4 is a flowchart of support vector machine feature classifier training.
Detailed Description
The invention will be described in further detail with reference to the drawings and examples, it being noted that the examples described below are intended to facilitate the understanding of the invention and are not intended to limit the invention in any way.
As shown in fig. 1, a method for solving a thinking chain reasoning mathematical problem based on a feature classifier comprises the following steps:
(1) Obtain a mathematical problem dataset problem set q= { Q 1,q2…qn }, and find a corresponding example of a mental chain for each element Q i AndSo thatA correct answer is obtained and the user can obtain the correct answer,Obtaining wrong answers, forming a new set Q ={q1 ,q 2…q n }, wherein
(2) Based on the composed set Q , a pre-training predictive model is input by using a mental chain prompting method, a word-level reasoning path spanning tree is constructed, and each node n i stores an attention weight matrix a j after the average pooling and difference operation.
(3) Traversing all the reasoning path spanning trees generated in the step (2), and screening nodes meeting the requirements to construct a feature classifier training set, wherein the requirements are that all the reasoning path results passing through the nodes are the same, namely correct or incorrect. And (3) taking the attention weight matrix A i of the node as a characteristic, taking an inference path result as a label, and constructing a training data sample pair set D.
(4) And (3) training the feature classifier C by using a Support Vector Machine (SVM) algorithm according to the training set generated in the step (3). Firstly, extracting the characteristics of each element of the training data set D as input, taking an inference path result as a label, and carrying out standardization processing on the data. Then, the data is mapped to a high-dimensional feature space using the radial basis functions as kernel functions, the SVM model is trained, model performance is estimated using cross-validation, and the hyper-parameters are adjusted as needed. Finally, the trained model is saved for subsequent reasoning.
(5) And (3) in the pre-training language model reasoning stage, for the target mathematical problem q to be solved, randomly selecting two examples d a and d b in the data set, simultaneously carrying out reasoning, continuing to predict and generate until the end if the reasoning paths are the same, and if the reasoning paths are different, continuing to reason the word with higher correct probability selected by the feature classifier C trained in the step (4). And finally, obtaining a complete reasoning process and extracting corresponding answers.
In step (1), an original mathematical problem set to be solved is obtained, and a forward and reverse thinking chain example is selected to be spliced to form a new model input set, wherein the mathematical problem set to be solved is defined as q= { Q 1,q2…qn }, and each element Q i expresses a specific problem in the problem set. For each question q i, find the corresponding forward example using the minlink hint generation methodAnd reverse exampleThe thought chain prompting method comprises the following steps:
Using p θ to represent the probability distribution fitted to a pre-trained large language model with parameter θ, x= { X 1,x2,…,xN } represents a text sequence of input length N. When the first i text sequences are entered, the language model predicts according to probability p θ(xi+1)=pθ(xi+1|x1,…,xi).
By usingN d mental chain cues are represented, where d i={qi,ri,ai is the ith example and q i,ri,ai represents the question, reasoning step and answer, respectively. If q represents the question to be inferred, the less sample thought chain can be defined as follows:
Where y= { r, a } is the generated reasoning step r and reasoning result a. Considering only the case where N d is 1 in this step, for each problem q i, traversing the mathematical problem set finds the corresponding example AndSo thatAnswers obtained with maximum probabilityCorrect and at the same timeAnswers obtained with maximum probabilityErrors, if no corresponding example is found, the problem is eliminated. Finally, combining the problems in the original dataset and the corresponding forward and reverse examples can yield a new set Q ={q1 ,q 2…q m, where m.ltoreq.n
In the step (2), the new set elements are respectively input into a model to be inferred and constructed into a text-level inference path spanning tree, and the attention weight matrix after pooling difference processing is selected to be stored as node characteristics.
Traversing the new set Q generated by the combination of step (1) forInput text for obtaining model by simple splicingAll parameters of the frozen model are processed, and forward reasoning is performed by taking the parameters as input of the pre-training language model. In the reasoning process, q i corresponds to generating a reasoning path tree G i = { V, E }, where V represents a vertex set and E represents an edge set. Each node n j in the vertex set contains three classes of attributes (f (A j,l),xj,rj), where x j represents the text of the current node, r j represents the correct rate of all inference paths through node n j A j represents the attention weight matrix of the model when the prediction generates x j, and since the pre-training language model uses a multi-head mask self-attention mechanism, the sequence lengths of its input models are different, and the multi-head attention weight matrix is dimensionally transformed and processed using the f (-) function.
The f (a j, l) function performs mainly two steps on the multi-headed attention weight matrix, the first step using a linear difference method to compress or expand the matrix a ij from the dimension j x j to a fixed length l. In the implementation process, l=30 is set according to experimental experience. And secondly, carrying out average pooling processing on the layer dimension of the multi-head self-attention matrix to finally obtain a feature matrix with a fixed size, and storing the feature matrix as a feature matrix of the node.
After describing the tree and the attributes contained by the nodes, the process of building the inference path tree in detail is described below. First, an empty node n root is constructed as the root node of the inference path tree, labeled as a non-leaf node. In building the tree, one of the non-leaf nodes (randomly chosen if there are multiple nodes) is found among the end nodes of each path of the tree, which is set to n i. The path from root node n root to node n i may represent an inferred pathThe child node condition of node n i is then determined. In particular, we willAnd (3) withRespectively inputting a pre-trained language model, as shown in fig. 2, when the first i text sequences are input, the language model predicts according to the following probabilities:
then x i+1 has the following two cases:
first, the text generated for the two campt runs is the same, i.e Then node n i adds a child node n i+1 with the text attribute set toIf it isIs a sentence terminator, the child node is marked as a leaf node.
Second, the text generated for the two campt runs is different, i.eThen insert left and right child nodes for node n i, respectivelyText attributes are respectively set asAndIf it isIs a sentence terminator, then the child node is markedIs a leaf node ifIs a sentence terminator, then the child node is markedIs a leaf node.
And so on until the end nodes of each path of the tree are leaf nodes. Finally, all elements in the new set Q can generate their corresponding inference path tree, and the set g= { G 1,G2,...Gm } of the tree can be obtained.
In step (3), traversing the inference path spanning tree from step (2), screening nodes meeting requirements, labeling and constructing a training data sample set together with characteristic attributes thereof. The specific implementation process is as follows.
First, the set G of trees generated in step (2) includes m trees, the inference path corresponding to each problem in the mathematical problem set Q generates a tree, and each node in the tree includes three attributes, n i=(f(Ai,l),xi,ri), which are the feature matrix, the text, and the accuracy of all the inference paths passing through the node n i. It is defined that it is assumed that for an inference path spanning tree, paths from the root node to the leaf nodes constitute an inference path and that for an inference path there is a unique attribute a indicating the correctness of the result of this inference path, where 1 indicates correctness and 0 indicates error. The following formula can thus be derived:
Where β (n i,Sj) represents whether the node n j belongs to the inference path S j, if so, the value is 1, and if not, the value is 0, and the inference path correctness of all nodes of all trees in the tree set G is calculated according to the above formula.
And then screening out nodes meeting the requirements based on the following conditions as a training data set of the training feature classifier:
1) The nodes do not belong to root nodes and leaf nodes;
2) The r attribute value of the node is 0 or 100, namely, consider the situation that the answers of the reasoning paths passing through the node are all wrong or all correct.
Finally, all the nodes meeting the conditions are combined into a node set n= { N 1,n2. As shown in fig. 3, in the inference path spanning tree, there are a plurality of inference paths corresponding to correct or incorrect results, and according to the above-mentioned screening conditions, thickened nodes can be selected as training sample sets.
In step (4), a support vector machine feature classifier D (x) is trained. As shown in fig. 4, firstly, a training data set is prepared, a node set meeting the conditions is screened out based on the step (3), and a training set t= { (x 1,y1),(x2,y2),...,(xn,yn) } is constructed. Where x n represents the feature of the node attention weight matrix after the average pooling in the layer dimension and the linear difference processing in the sequence length dimension, y n e {1, -1} is a label, indicating the correctness and the error of the reasoning result. Next, a definition kernel function is selected. The method adopts a radial basis function as a kernel function, maps data to a high-dimensional feature space, and determines an optimal parameter value by using a cross-validation mode. The support vector machine takes the maximized Lagrangian dual problem as an objective function, and the quadratic programming problem is decomposed into a series of solvable sub-problems through a sequence minimum optimization algorithm to optimally solve the objective function. The method can reduce the computational complexity, improve the training efficiency of the support vector machine on a large-scale data set, and further obtain Lagrange multipliers.
The resulting final classification decision function is summarized as follows. Given a new input sample x, the similarity of this sample to all training samples x i is calculated by a kernel function K (x i, x) and then these similarities are weighted and summed, where α iyi is derived from the lagrangian multiplier learned during training and the labels of the training samples. And finally adding a bias term b, and obtaining a classification result through a sign function sign. If the result is positive, the sample is classified as a positive class (+1) corresponding to a node that acts positively on the inference result, and if the result is negative, the sample is classified as a negative class (-1) corresponding to a node that acts negatively on the inference result.
In the step (5), the solution stage is carried out on the test set of the data question set, and mainly comprises four parts of contents, namely, selection of examples, reasoning of a pre-training language model, intervention of the feature classifier trained in the step (4) in the reasoning process, and finally extraction of generated answers. The method comprises the following steps:
Firstly, selecting an example, namely randomly selecting two problem examples d a and d b as the context of a thought chain prompt for the problem q i of a mathematical problem set to be inferred
And (2) reasoning of the pre-training language model, wherein the reasoning generation logic of the step (2) is used, two examples are respectively combined with the problem to serve as input of the pre-training language model, and the two reasoning paths are compared. If the text generated at present is the same as the text generated at present under the prompt of examples d a and d b, continuing to reason, and if the text generated at present is different, introducing a feature classifier C to perform judgment and selection. The attention weight matrix used for generating the current text is calculated for the two, and the average pooling of the layer dimension and the linear interpolation of the sequence length dimension are performed, so that the feature matrix a a in the example d a and the feature matrix a b in the example d b can be obtained. The feature matrix obtains a classification result (+1: positive class, -1: negative class) by the feature classifier C (x), the classification result is contained in the following 3 cases, and the following processes are performed according to the cases, respectively:
1. C (a a)=C(Ab) =1, i.e. in the current text, both play a positive role in the correctness of the inference path generation, in which case the larger numerical term in the sign function in the feature classifier C is selected as the content of the currently generated text prediction.
2. C (a a)=-1,C(Ab) =1 or C (a a)=1,C(Ab) = -1, i.e. for the current text, both examples act positively and negatively, respectively, for the correctness of the correct inference path generation. In this case, a text of C (x) =1 is selected as the currently generated text prediction content.
3. C (a a)=C(Ab) = -1, i.e. in the current text, both play a negative role in the correctness of the inference path generation, in which case the smaller numerical terms in the sign function in the feature classifier C are selected as the current generated text prediction content.
And finally obtaining the reasoning process and the answer of the mathematical problem according to the rules.
The invention also comprises a thinking chain reasoning mathematical problem solving system based on the feature classifier, and the method comprises the steps of:
And the thinking chain prompt generation module is used for acquiring the mathematical reasoning problem to be processed, selecting examples and instructions meeting the requirements according to the problem, and forming complete input of the pre-training language model.
And the inference path tree generation and feature screening module is used for generating a word-level inference path generation tree and screening out a feature training data set meeting the requirements.
The feature classifier training module is used for training the feature classifier, introducing a support vector machine algorithm based on a feature training data set, mapping data to a high-dimensional feature space by using a radial basis function as a kernel function, and improving SVM training efficiency by using a sequence minimum optimization algorithm.
And the reasoning module is guided by the feature classifier and is used for solving the mathematical reasoning problem to be processed. The pre-training language model is guided to select a more accurate reasoning path through intervention of the feature classifier, so that a final mathematical problem reasoning process and a final mathematical problem answer are obtained.
The foregoing embodiments have described in detail the technical solution and the advantages of the present invention, it should be understood that the foregoing embodiments are merely illustrative of the present invention and are not intended to limit the invention, and any modifications, additions and equivalents made within the scope of the principles of the present invention should be included in the scope of the invention.

Claims (8)

1.一种基于特征分类器的思维链推理数学问题求解方法,其特征在于,包括以下步骤:1. A method for solving mathematical problems by chain reasoning based on a feature classifier, characterized in that it comprises the following steps: (1)获取数学问题集Q={q1,q2…qn},对于每个元素qi,使用思维链提示生成方法找到对应的两个示例使得得到正确答案,得到错误答案,组成新集合Q={q1 ,q 2…q n},其中 (1) Get a set of mathematical problems Q = {q 1 ,q 2 …q n }. For each element q i , use the thinking chain prompt generation method to find the corresponding two examples. and Make Get the correct answer, Get the wrong answer and form a new set Q = {q 1 , q 2 …q n }, where (2)基于组成的新集合Q,使用思维链提示方法输入预训练语言模型,构建单词级别的推理路径生成树,每个节点ni保存平均池化以及差值操作后的注意力权重矩阵Ai(2) Based on the composed new set Q , the thought chain prompt method is used to input the pre-trained language model to construct a word-level reasoning path spanning tree, and each node n i saves the attention weight matrix A i after average pooling and difference operation; (3)遍历步骤(2)中生成的所有推理路径生成树,筛选符合要求的节点构建特征分类器训练集;以节点的注意力权重矩阵Ai作为特征,推理路径结果为标签,构建训练数据样本对集合D;(3) Traverse all the inference path spanning trees generated in step (2), select nodes that meet the requirements to construct a feature classifier training set; use the node attention weight matrix Ai as the feature and the inference path result as the label to construct a training data sample pair set D; (4)根据步骤(3)生成的训练集,使用支持向量机算法训练特征分类器C;(4) Based on the training set generated in step (3), a feature classifier C is trained using a support vector machine algorithm; (5)预训练语言模型推理阶段,针对待解答的目标数学题q,在数据集中随机选取两个示例da与db下同时进行推理,推理路径相同则继续预测生成直至结束,若推理路径不同则使步骤(4)训练好的特征分类器C选择正确概率更高的单词继续推理;最终得到完整推理过程,提取相应答案。(5) In the pre-trained language model reasoning stage, for the target math problem q to be solved, two examples d a and d b are randomly selected from the data set and reasoning is performed simultaneously. If the reasoning paths are the same, the prediction generation continues until the end. If the reasoning paths are different, the feature classifier C trained in step (4) selects the word with a higher correct probability to continue reasoning; finally, the complete reasoning process is obtained and the corresponding answer is extracted. 2.根据权利要求1所述的基于特征分类器的思维链推理数学问题求解方法,其特征在于,步骤(1)中,使用思维链提示生成方法找到对应的两个示例具体过程为:2. The method for solving mathematical problems based on thought chain reasoning using a feature classifier according to claim 1 is characterized in that, in step (1), the two corresponding examples are found using a thought chain prompt generation method. and The specific process is: 使用pθ表示具有参数θ的预训练大语言模型所拟合的概率分布,用表示Nd个思维链提示,其中,di=(qi,ri,ai)为第i个示例,qi,ri,ai分别表示问题、推理步骤和答案;如果用q表示待推理问题,那么少样本思维链FS-CoT被定义为:Let p θ represent the probability distribution fitted by the pre-trained large language model with parameter θ, and represents N d thought chain prompts, where d i = (q i , ri , a i ) is the i-th example, q i , ri , a i represent the question, reasoning steps and answer respectively; if q represents the question to be reasoned, then the few-sample thought chain FS-CoT is defined as: 式中,y={r,a}为生成的推理步骤r和推理结果a;仅考虑Nd值为1的情况,针对每个问题qi,遍历数学问题集找到对应的示例使得概率最大的情况下得到的答案正确,与此同时概率最大的情况下得到的答案错误,如未找到对应的示例则排除该问题;最终,组合问题以及对应的两个示例得到新的集合Q={q1 ,q 2…q m},m≤n其中 Where y = {r, a} is the generated reasoning step r and the reasoning result a; only consider the case where Nd is 1, for each problem q i , traverse the mathematical problem set to find the corresponding example and Make The answer with the highest probability Correct, at the same time The answer with the highest probability Error, if no corresponding example is found, the problem is excluded; finally, the problem and the corresponding two examples are combined to obtain a new set Q = {q 1 ,q 2 …q m }, m≤n where 3.根据权利要求1所述的基于特征分类器的思维链推理数学问题求解方法,其特征在于,步骤(2)的具体过程为:3. The method for solving mathematical problems by chain reasoning based on feature classifier according to claim 1 is characterized in that the specific process of step (2) is as follows: 对于新集合Q内的所有元素,对于通过拼接得到预训练语言模型的输入文本冻结模型的所有参数,将其作为预训练语言模型的输入进行正向推理;For all elements in the new set Q , The input text of the pre-trained language model is obtained by concatenation Freeze all parameters of the model and use it as input to the pre-trained language model for forward inference; 推理过程中,qi 对应生成推理路径树Gi,每个节点nj包含三类属性During the reasoning process, q i generates a corresponding reasoning path tree G i , and each node n j contains three types of attributes (f(Aj,l),xj,rj),其中xj表示当前节点的文本,rj表示的是经过节点nj的所有推理路径的正确率,Aj表示预测生成xj时模型的注意力权重矩阵;由于预训练语言模型使用的是多头掩码自注意力机制,其输入模型的序列长度不同,使用f(·)函数对多头注意力权重矩阵进行维度变换和处理;(f(A j ,l),x j ,r j ), where x j represents the text of the current node, r j represents the accuracy of all reasoning paths passing through node n j , and A j represents the attention weight matrix of the model when predicting and generating x j ; since the pre-trained language model uses a multi-head masked self-attention mechanism and the sequence length of its input model is different, the f(·) function is used to transform and process the multi-head attention weight matrix; 构建推理路径树的过程如下:首先构造一个空节点nroot,作为推理路径树的根节点,标注为非叶子结点;在构建树时,在树的各条路径的末端节点中,找到其中一个的非叶子节点,设该节点为ni;从根节点nroot到节点ni的路径都可以表示一条推理路径然后确定节点ni的子节点情况;具体而言,将分别输入预训练语言模型,当输入前i个文本序列时,语言模型根据以下概率进行预测:The process of constructing the inference path tree is as follows: first, construct an empty node n root as the root node of the inference path tree, marked as a non-leaf node; when constructing the tree, find one of the non-leaf nodes at the end of each path in the tree, and set the node as n i ; the path from the root node n root to the node n i can represent an inference path. Then determine the child nodes of node n i ; specifically, and Input the pre-trained language model separately. When the first i text sequences are input, the language model predicts according to the following probabilities: xi+1存在以下两种情况:There are two cases for x i+1 : 第一种:对于两个prompt本轮预测生成的文本相同,即那么节点ni将新增一个子节点ni+1,文本属性设置为如果是句子终止符,则标记该子节点为叶子节点;The first type: For two prompts, the text generated in this round of prediction is the same, that is Then node n i will add a new child node n i+1 , and the text attribute is set to if If it is a sentence terminator, mark the child node as a leaf node; 第二种:对于两个prompt本轮预测生成的文本不同,即那么为节点ni分别插入左右两个子节点文本属性分别设置为以及如果是句子终止符,则标记子节点为叶子节点;如果是句子终止符,则标记子节点为叶子节点;The second type: For the two prompts, the text generated in this round of prediction is different, that is Then insert two child nodes on the left and right for node n i respectively The text properties are set to as well as if Is a sentence terminator, then mark the child node is a leaf node; if Is a sentence terminator, then mark the child node is a leaf node; 以此类推,直至树的每条路径的末端节点都是叶子节点;最终,新集合Q内的所有元素均生成其对应的推理路径树,得到树的集合G=This process is repeated until the end nodes of each path in the tree are leaf nodes. Finally, all elements in the new set Q generate their corresponding reasoning path trees, and the tree set G = {G1,G2,...Gm}。{G 1 ,G 2 ,...G m }. 4.根据权利要求1所述的基于特征分类器的思维链推理数学问题求解方法,其特征在于,步骤(3)中,筛选符合要求的节点构建特征分类器训练集,具体过程为:4. The method for solving mathematical problems by chain reasoning based on feature classifier according to claim 1 is characterized in that, in step (3), nodes meeting the requirements are selected to construct a feature classifier training set, and the specific process is as follows: 首先步骤(2)生成的树的集合G包含了m棵树,对应于数学问题集Q里每一个问题的推理路径生成树,并且树中每个节点包含三部分的属性,ni=(f(Ai,l),xi,ri),分别是特征矩阵、文本以及经过节点ni的所有推理路径的正确率;在筛选训练集样本前,需要计算节点的ri属性,假设对于一棵推理路径生成树,从根节点出发到叶子节点的路径组成一条推理路径,并且对于一条推理路径有唯一属性a表示这个推理路径结果的正确性,其中1表示正确,0表示错误;因此得到如下计算公式:First, the tree set G generated in step (2) contains m trees, corresponding to the reasoning path spanning tree of each problem in the mathematical problem set Q , and each node in the tree contains three attributes, n i = (f(A i ,l), x i , r i ), which are the feature matrix, the text, and the accuracy of all reasoning paths passing through the node n i . Before screening the training set samples, it is necessary to calculate the r i attribute of the node. Assume that for a reasoning path spanning tree, the path from the root node to the leaf node constitutes a reasoning path, and for a reasoning path there is a unique attribute a representing the correctness of the result of this reasoning path, where 1 represents correctness and 0 represents error. Therefore, the following calculation formula is obtained: 其中,β(ni,Sj)表示的是节点nj是否属于推理路径Si,如果属于则值为1,不属于则值为0,依照上述公式计算树集合G内所有树的所有节点的推理路径正确率;然后基于以下条件筛选出符合要求的节点,作为训练特征分类器的训练数据集:Among them, β(n i ,S j ) indicates whether node n j belongs to the reasoning path S i . If it does, the value is 1, and if it does not, the value is 0. The reasoning path accuracy of all nodes in all trees in the tree set G is calculated according to the above formula; then the nodes that meet the requirements are selected based on the following conditions as the training data set for training the feature classifier: ①、节点不属于根节点以及叶子节点;①. The node is not a root node or a leaf node; ②、节点的r属性值为0%或100%,即考虑经过该节点的推理路径答案均为错误或者均为正确的情况;② The r attribute value of a node is 0% or 100%, which means that the answers to the reasoning paths passing through the node are all wrong or all correct; 将所有符合条件的节点组成节点集合N={n1,n2,...}。All nodes that meet the conditions are formed into a node set N = {n 1 , n 2 , ...}. 5.根据权利要求1所述的基于特征分类器的思维链推理数学问题求解方法,其特征在于,步骤(4)的具体过程为:5. The method for solving mathematical problems by chain reasoning based on feature classifier according to claim 1 is characterized in that the specific process of step (4) is as follows: 首先,提取训练数据集合D每个元素的特征作为输入,推理路径结果作为标签,对数据进行标准化处理;然后,使用径向基核函数将数据映射到高维特征空间,以最大化拉格朗日对偶问题为目标函数训练支持向量机分类模型,使用交叉验证评估模型性能,并根据需要调整超参数;最后,保存训练好的支持向量机模型用于后续推理;得到的特征分类器C如下所示:First, extract the features of each element of the training data set D as input, use the inference path results as labels, and standardize the data; then, use the radial basis kernel function to map the data to a high-dimensional feature space, and train the support vector machine classification model with the objective function of maximizing the Lagrangian dual problem. Use cross-validation to evaluate the model performance, and adjust the hyperparameters as needed; finally, save the trained support vector machine model for subsequent inference; the resulting feature classifier C is shown below: 式中,x为新的输入样本,通过核函数K(xi,x)计算该样本与所有训练样本xi的相似度,然后将这些相似度加权求和,其中αiyi来源于训练过程中学到的拉格朗日乘子和训练样本的标签;最后加上偏置项b,并通过符号函数sign得到分类结果。In the formula, x is a new input sample. The similarity between the sample and all training samples x i is calculated by the kernel function K( xi , x), and then these similarities are weighted and summed, where αiyi comes from the Lagrange multiplier learned during the training process and the label of the training sample; finally, the bias term b is added, and the classification result is obtained through the sign function sign. 6.根据权利要求1所述的基于特征分类器的思维链推理数学问题求解方法,其特征在于,步骤(5)中,若推理路径不同则使步骤(4)训练好的特征分类器C选择正确概率更高的单词继续推理,具体包括:6. The method for solving mathematical problems by chain reasoning based on feature classifier according to claim 1 is characterized in that, in step (5), if the reasoning paths are different, the feature classifier C trained in step (4) selects a word with a higher correct probability to continue reasoning, specifically comprising: 分别计算二者的生成当前文本所用的注意力权重矩阵,并且进行层维度的平均池化以及序列长度维度的线性插值处理,得到对于示例da下的特征矩阵Aa以及示例db下的特征矩阵Ab;特征矩阵通过特征分类器C(x)获得分类结果,分类结果包含于以下3种情况,根据情况分别进行如下处理:The attention weight matrices used to generate the current text are calculated for both, and the average pooling of the layer dimension and the linear interpolation of the sequence length dimension are performed to obtain the feature matrix A a under the example d a and the feature matrix A b under the example d b ; the feature matrix obtains the classification result through the feature classifier C(x), and the classification result includes the following 3 cases, which are processed as follows according to the case: ①、C(Aa)=C(Ab)=1,即在当前文本,二者对于推理路径生成的正确性均起到正向作用,在该情况下选择在特征分类器C中符号函数内数值较大项作为当前生成的文本预测内容;①, C(A a )=C(A b )=1, that is, in the current text, both play a positive role in the correctness of the reasoning path generation. In this case, the item with a larger value in the symbol function in the feature classifier C is selected as the prediction content of the currently generated text; ②、C(Aa)=-1,C(Ab)=1或C(Aa)=1,C(Ab)=-1,即对于当前文本来说,两个示例对于正确的推理路径生成的正确性分别起正向和负向作用;该情况下选择C(x)=1的文本作为当前生成的文本预测内容;②, C(A a )=-1, C(A b )=1 or C(A a )=1, C(A b )=-1, that is, for the current text, the two examples play a positive and negative role in the correctness of the correct reasoning path generation respectively; in this case, the text with C(x)=1 is selected as the currently generated text prediction content; ③、C(Aa)=C(Ab)=-1,即在当前文本,二者对于推理路径生成的正确性均起到负向作用,在该情况下选择在特征分类器C中符号函数内数值较小项作为当前生成的文本预测内容。③. C(A a )=C(A b )=-1, that is, in the current text, both of them play a negative role in the correctness of the reasoning path generation. In this case, the item with a smaller value in the symbol function in the feature classifier C is selected as the prediction content of the currently generated text. 7.一种基于特征分类器的思维链推理数学问题求解系统,其特征在于,包括:7. A thinking chain reasoning mathematical problem solving system based on feature classifier, characterized by comprising: 思维链提示生成模块:用于获取待处理的数学推理问题,并且根据问题选择符合要求的示例和指令一并组成预训练语言模型的完整输入;Thinking chain prompt generation module: used to obtain the mathematical reasoning problems to be processed, and select examples and instructions that meet the requirements according to the problems to form the complete input of the pre-trained language model; 推理路径树生成及特征筛选模块:用于生成单词级别的推理路径生成树并且筛选出符合要求的特征训练数据集;Reasoning path tree generation and feature screening module: used to generate word-level reasoning path generation trees and screen out feature training data sets that meet the requirements; 特征分类器训练模块:用于特征分类器的训练,基于特征训练数据集引入支持向量机算法,使用径向基函数作为核函数将数据映射到高维特征空间以及序列最小优化算法提高支持向量机的训练效率;Feature classifier training module: used for feature classifier training. It introduces the support vector machine algorithm based on the feature training data set, uses the radial basis function as the kernel function to map the data to the high-dimensional feature space, and uses the sequence minimum optimization algorithm to improve the training efficiency of the support vector machine. 特征分类器引导的推理模块:用于解决待处理的数学推理问题;通过特征分类器介入,引导预训练语言模型选择更准确的推理路径,从而得到最终的数学问题推理过程和答案。Reasoning module guided by feature classifier: used to solve pending mathematical reasoning problems; through the intervention of feature classifier, the pre-trained language model is guided to select a more accurate reasoning path, so as to obtain the final mathematical problem reasoning process and answer. 8.一种基于特征分类器的思维链推理数学问题求解系统,其特征在于,包括存储器和一个或多个处理器,所述存储器中存储有可执行代码,所述一个或多个处理器执行所述可执行代码时,用于实现权利要求1-6中任一项所述的思维链推理数学问题求解方法。8. A system for solving mathematical problems by chain reasoning based on a feature classifier, characterized in that it comprises a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the method for solving mathematical problems by chain reasoning described in any one of claims 1 to 6.
CN202411479942.2A 2024-10-23 2024-10-23 A method and system for solving mathematical problems based on feature classifier-based thought chain reasoning Active CN119443267B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411479942.2A CN119443267B (en) 2024-10-23 2024-10-23 A method and system for solving mathematical problems based on feature classifier-based thought chain reasoning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411479942.2A CN119443267B (en) 2024-10-23 2024-10-23 A method and system for solving mathematical problems based on feature classifier-based thought chain reasoning

Publications (2)

Publication Number Publication Date
CN119443267A true CN119443267A (en) 2025-02-14
CN119443267B CN119443267B (en) 2025-11-14

Family

ID=94529754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411479942.2A Active CN119443267B (en) 2024-10-23 2024-10-23 A method and system for solving mathematical problems based on feature classifier-based thought chain reasoning

Country Status (1)

Country Link
CN (1) CN119443267B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119621974A (en) * 2025-02-17 2025-03-14 科大讯飞股份有限公司 A test question label prediction method, device, storage medium and equipment
CN119808966A (en) * 2025-03-13 2025-04-11 浙江吉利控股集团有限公司 Intelligent decision-making method, computer device and computer-readable storage medium
CN119808967A (en) * 2025-03-14 2025-04-11 北京博大网信股份有限公司 Visual thinking operating system and mathematical reasoning method for mathematical reasoning
CN120336491A (en) * 2025-06-17 2025-07-18 南京信息工程大学 An automatic thought chain prompt generation method based on black box optimization and vulnerability quantification

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230244938A1 (en) * 2022-02-02 2023-08-03 Google Llc Using Chains of Thought to Prompt Machine-Learned Models Pre-Trained on Diversified Objectives
CN116595159A (en) * 2023-07-18 2023-08-15 深圳须弥云图空间科技有限公司 Mathematical question answering model training method and device
CN117669536A (en) * 2023-10-19 2024-03-08 西华大学 A deep fine-tuning method for generating logical reasoning thinking chains in Chinese text
CN117892818A (en) * 2024-03-18 2024-04-16 浙江大学 Large language model rational content generation method based on implicit thinking chain
CN118333153A (en) * 2024-04-23 2024-07-12 之江实验室 A flexible thinking chain learning method, device and medium based on large language model
CN118467737A (en) * 2024-06-05 2024-08-09 北京邮电大学 Event extraction method based on large language model to generate thought chain explanation for training
CN118690877A (en) * 2024-08-23 2024-09-24 阿里巴巴(中国)有限公司 Natural language model generation method and data processing method
CN118709786A (en) * 2024-08-06 2024-09-27 西安家育宝智能科技有限公司 Reasoning method and device of large language model based on thinking tree
CN118747530A (en) * 2024-06-07 2024-10-08 天津汲智科技有限公司 A dual-model reflective learning method based on thinking chain correction and adaptive screening

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230244938A1 (en) * 2022-02-02 2023-08-03 Google Llc Using Chains of Thought to Prompt Machine-Learned Models Pre-Trained on Diversified Objectives
CN116595159A (en) * 2023-07-18 2023-08-15 深圳须弥云图空间科技有限公司 Mathematical question answering model training method and device
CN117669536A (en) * 2023-10-19 2024-03-08 西华大学 A deep fine-tuning method for generating logical reasoning thinking chains in Chinese text
CN117892818A (en) * 2024-03-18 2024-04-16 浙江大学 Large language model rational content generation method based on implicit thinking chain
CN118333153A (en) * 2024-04-23 2024-07-12 之江实验室 A flexible thinking chain learning method, device and medium based on large language model
CN118467737A (en) * 2024-06-05 2024-08-09 北京邮电大学 Event extraction method based on large language model to generate thought chain explanation for training
CN118747530A (en) * 2024-06-07 2024-10-08 天津汲智科技有限公司 A dual-model reflective learning method based on thinking chain correction and adaptive screening
CN118709786A (en) * 2024-08-06 2024-09-27 西安家育宝智能科技有限公司 Reasoning method and device of large language model based on thinking tree
CN118690877A (en) * 2024-08-23 2024-09-24 阿里巴巴(中国)有限公司 Natural language model generation method and data processing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
THIEN-LOC HA,: "Auto Graph of Thoughts: A Hands-free and Cost Effective Method for using Graph of Thoughts", 《PROCEEDINGS OF THE 2024 10TH INTERNATIONAL CONFERENCE ON COMPUTER TECHNOLOGY APPLICATIONS》, 26 August 2024 (2024-08-26) *
罗焕坤: "大语言模型在数学推理中的研究进展", 《计算机工程》, vol. 50, no. 9, 30 September 2024 (2024-09-30) *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119621974A (en) * 2025-02-17 2025-03-14 科大讯飞股份有限公司 A test question label prediction method, device, storage medium and equipment
CN119621974B (en) * 2025-02-17 2025-04-11 科大讯飞股份有限公司 Test question label prediction method, device, storage medium and equipment
CN119808966A (en) * 2025-03-13 2025-04-11 浙江吉利控股集团有限公司 Intelligent decision-making method, computer device and computer-readable storage medium
CN119808967A (en) * 2025-03-14 2025-04-11 北京博大网信股份有限公司 Visual thinking operating system and mathematical reasoning method for mathematical reasoning
CN120336491A (en) * 2025-06-17 2025-07-18 南京信息工程大学 An automatic thought chain prompt generation method based on black box optimization and vulnerability quantification

Also Published As

Publication number Publication date
CN119443267B (en) 2025-11-14

Similar Documents

Publication Publication Date Title
Cheng et al. A survey on deep neural network pruning: Taxonomy, comparison, analysis, and recommendations
CN119443267B (en) A method and system for solving mathematical problems based on feature classifier-based thought chain reasoning
CN114969278B (en) A text question answering model based on knowledge-enhanced graph neural network
CN112132179A (en) Incremental learning method and system based on a small number of labeled samples
CN111985245A (en) Relation extraction method and system based on attention loop-gated graph convolutional network
CN112069310A (en) Text classification method and system based on active learning strategy
CN118132674A (en) Text information extraction method based on large language model and high-efficiency parameter fine adjustment
CN118041744A (en) Fault diagnosis method for power backbone communication network based on knowledge graph reasoning
Zhou et al. On the opportunities of green computing: A survey
CN117407532A (en) Method for enhancing data by using large model and collaborative training
Gong et al. Margin based PU learning
Zheng et al. Named entity recognition: A comparative study of advanced pre-trained model
Pereira et al. Neural architecture search with interpretable meta-features and fast predictors
Vento et al. Traps, pitfalls and misconceptions of machine learning applied to scientific disciplines
CN118195032B (en) Large model automatic evolution system and method with active learning capability
Lee et al. Can we utilize pre-trained language models within causal discovery algorithms?
CN118606469A (en) Multi-classification prediction method for intangible cultural heritage text based on multi-head attention and semantic features
CN119106118A (en) A text question answering method and system in the field of urban scene safety
Lekan et al. Comparison of Neural Networks with Traditional Machine Learning Models (eg, XGBoost, Random Forest)
Akinci et al. Machine Learning Methods from Shallow Learning to Deep Learning
Anireh et al. HTM-MAT: An online prediction software toolbox based on cortical machine learning algorithm
Katib et al. Question Answering System Based on Bideirectional Long-Short-Term Memory (Bilstm)
Zheng et al. Thoughtful and cautious reasoning: A fine-tuned knowledge graph-based multi-hop question answering framework
CN118210907B (en) A method for constructing intelligent question answering model based on vectorized representation of knowledge graph
Argyrou Clustering hierarchical data using self-organizing map: a graph-theoretical approach

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant