Mathematical modeling paper generation method based on large language model

By building a mathematical modeling system based on large language models, we automatically generate problem-solving ideas, experimental designs and papers, and realize the full process automation of mathematical modeling, improve the efficiency of problem-solving and paper quality, and generate mathematical modeling papers with clear logic and rigorous structure.

CN120449853APending Publication Date: 2025-08-08HANGZHOU DIANZI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510547982.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Existing large language models cannot effectively understand and solve professional problems in the field of mathematical modeling, and cannot generate mathematical modeling papers with rigorous structures and logically coherent.

Method used

By building a mathematical modeling system based on large language models, generate problem-solving ideas and make novel judgments, automatically generate experimental design and code, combine real-time data feedback optimization experiments, write papers using preset templates and conduct automatic reviews, forming a closed-loop self-optimization.

Benefits of technology

The full process automation of the mathematical modeling process has been realized, the efficiency and innovation of problem-solving are improved, and the mathematical modeling papers with clear logic and rigorous structure have been generated, which has significantly reduced manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449853A_ABST
    Figure CN120449853A_ABST
Patent Text Reader

Abstract

The invention discloses a mathematical modeling paper generation method based on a large language model. According to the method, firstly, a document is recognized, mathematical modeling questions are extracted, secondly, a preset problem solving thought and a code template are generated by utilizing LLM, a plurality of novel problem solving thoughts are generated through LLM, and the conception is optimized in combination with a chain thinking mechanism. According to the screened conception, an experiment design scheme and experiment codes are automatically generated, and experiment parameters are adjusted through real-time data feedback and mean square error iteration. Based on a preset mathematical modeling paper template and automatically generated experimental data, the system automatically writes a mathematical modeling paper with a rigorous structure and coherent logic by using LLM, and introduces an automatic review module to perform peer review on the generated paper, thereby forming a self-feedback closed loop. According to the method, manual intervention in the mathematical modeling process is remarkably reduced, the potential of a large language model in the field of mathematical modeling is excavated, the question knowing efficiency and innovation are improved, and the method is suitable for the field of mathematical modeling and thesis generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of mathematical modeling paper generation at the intersection of natural language processing, mathematical modeling, and computer programming. Specifically, it relates to a method for generating a mathematical modeling paper for a large language model, which trains prompt words on the large language model, constructs a thinking chain, and calls programming tools to generate a complete, coherent, and accurate mathematical modeling paper. Background Art

[0002] With the rapid development of deep learning technology in recent years, large language models (LLMs) have become a key technology in the field of natural language processing (NLP). Trained on massive amounts of text data, these models can understand and generate text content that closely resembles human language, demonstrating exceptional language understanding and generation capabilities. However, conventional, general-purpose large models are limited to textual communication and fail to realize their enormous potential in more specialized fields. Therefore, achieving more intelligent applications of large models has become a key research focus.

[0003] When exploring the applications of large language models (LLMs), the importance of intelligent agents cannot be overlooked. Intelligent agents allow LLMs to be embedded in more complex interactive systems, enhancing their functionality and applicability through various strategies. For example, by designing specific few-shot prompting, LLMs can quickly adapt to new tasks based on a small number of examples; introducing a chain of thought mechanism prompts the model to perform step-by-step reasoning, improving its ability to solve complex problems; and implementing a self-reflection process enables the model to iteratively evaluate and optimize its output, further improving the quality and accuracy of responses. These methods fully leverage the LLM's powerful ability to learn from context, not only significantly enhancing the model's performance, robustness, and reliability on a variety of tasks, but also providing a solid foundation for the development of smarter and more humane interactive systems.

[0004] Mathematical modeling refers to the process of creating mathematical models. It is an effective means of approximating and solving practical problems through abstraction and simplification using mathematical language and methods. The entire process includes a series of steps, from problem definition to model building to solution proposal. Mathematical modeling typically focuses on solving practical problems or specific applications. Therefore, how to make large models understand and solve mathematical modeling problems, and provide standardized paper descriptions, is a question worth exploring. Summary of the Invention

[0005] This paper proposes a method for generating mathematical modeling papers based on a large-scale language model, automating the entire process from solution concept generation, experimental design and execution, to paper writing and automated review. The system first generates preset problem-solving ideas and initial code templates, then uses the large-scale language model to generate multiple problem-solving ideas. It then screens for highly novel ideas using an internal knowledge base and cosine similarity calculations. Based on the screening results, the system automatically generates detailed experimental plans and code. It then optimizes the experimental output in real time using mean squared error to ensure that the experimental data approaches the expected target. It also records experimental logs to provide feedback for subsequent ideas.

[0006] After the experiment is complete, the system automatically generates a rigorously structured and logically coherent paper text based on a preset mathematical modeling paper template using a language model. The probability of each word generation is calculated using a softmax function, and a hybrid loss function is used to perform multiple evaluations of grammar, logic, and data consistency. The generated paper is then peer-reviewed by an automated review module, and the review results are fed back to the system to further optimize the paper text. Each module seamlessly connects via a data interface and internal knowledge base, and employs gradient descent and attention mechanisms to continuously and adaptively update overall system parameters, forming a closed loop of self-learning and self-optimization.

[0007] The specific steps of the mathematical modeling paper generation method based on a large language model are as follows:

[0008] Step (1), idea generation: LLM is used to generate preset problem-solving ideas and initial code templates, where the preset problem-solving ideas are converted into multiple problem-solving ideas through LLM, and the multiple problem-solving ideas are encoded to obtain corresponding multiple semantic vectors represents the set of real numbers, d represents the dimension;

[0009] Determine the novelty of problem-solving ideas: Use the average vector K of existing ideas in the internal knowledge base to determine the novelty of multiple problem-solving ideas by calculating cosine similarity, and define the novelty score S novel for:

[0010]

[0011] When S novel When the threshold value is greater than θ1, the problem-solving idea is considered to be novel enough, and the novelty score S is calculated from multiple novelty scores. novel The solution with the highest score is selected and saved in a json file, where θ1 represents the novelty threshold.

[0012] The existing ideas of the internal knowledge base are derived from the ideas of excellent papers on the mathematical modeling website (specifically, they can be extracted from the abstracts of the papers) and the ideas in the papers that have been run before.

[0013] Step (2), experimental design;

[0014] For the selected problem-solving ideas, LLM will generate a set of experimental lists and improve the initial code template of the experiment based on the experimental list; at the same time, LLM will automatically run the improved experiment to obtain the experimental results The experimental results Experimental results with the initial code template i Use the mean square error formula for comparison to get the loss L exp :

[0015]

[0016] Where N represents the total number of experiments, i represents the i-th experiment, Represents the output result of the experiment after the i-th improvement. exp If the error is greater than θ2 (a set threshold), the experiment is considered to have a significant difference from the expected experimental results, and the LLM will iteratively optimize until the error does not exceed the threshold θ2. The final improved experimental run results are combined with the experimental list as input to the LLM to generate an experimental log and save it in a JSON file.

[0017] Step (3), paper text generation;

[0018] LLM generates text based on the problem-solving ideas and designed experimental results, referring to the preset paper template. The generation probability of each word in the text is calculated using softmax;

[0019] Each time a text is generated, LLM will automatically review the text. During the automatic review, the coherence and logic evaluation of the text is evaluated using a hybrid loss function L paper :

[0020] L paper =λ1L syntax +λ2L logic +λ3L data

[0021] Among them, λ1, λ2 and λ3 represent weights, L syntax Used to measure grammatical correctness (e.g. using parser scores), L logic Used to measure the logical cohesion of the text, L data Used to ensure that the experimental data description in the paper matches the actual data; where L syntax , L logic and L data They are all generated by pre-trained LLM. paperWhen the value is <θ3 (set threshold), the text is considered not to meet the standards and the LLM will be asked to rewrite it until the review score reaches the expected value. θ3 represents the text review threshold.

[0022] Step (4) The final generated paper content is passed through the LLM review criteria to generate a review score S review And feedback the generated paper through the following evaluation loss to obtain the feedback score L review :

[0023] L review =(S target -S review ) 2

[0024] Among them, S target Set the expected review score.

[0025] Review score S review The solution is as follows:

[0026] The winning papers, paper scores, and evaluation criteria of the corresponding competition are used as input to train the LLM and obtain the trained LLM for evaluation. The final generated paper content is then input into the trained LLM to obtain the output evaluation score S. review LLM will also generate a paper review opinion based on the review criteria and save it in a json file.

[0027] Step (5): Encode the saved problem-solving ideas, experimental logs, and paper review comments to obtain the semantic vector X new Integrate and store in the internal knowledge base. In terms of the update process, the internal knowledge base adopts a mechanism to gradually integrate new data and historical records. Specifically, the new round of output data X new With the existing knowledge base state K old Combined, the update formula is:

[0028] K new =(1-γ)·K old +γ·X new ,

[0029] Among them, γ is the preset update rate, K new Represents the updated state vector of the internal knowledge base. This allows for both long-term preservation of valid information and timely absorption of the latest research results. During pre-training, the LLM is connected to the internal knowledge base, forming a closed-loop self-learning optimization process.

[0030] Beneficial effects of the present invention:

[0031] The present invention combines a large-scale language model method to achieve full-process automation from problem-solving idea generation to experimental execution, paper writing and review. The system generates problem-solving ideas through semantic vectors, and performs novelty judgment to ensure the novelty and logic of the problem-solving ideas. The experimental planning and execution module automatically generates an experimental list and experimental code, and performs error judgment on the experimental data to ensure the consistency of the experimental code, greatly improving the experimental efficiency and the accuracy of the results. The paper writing module combines the experimental data, and optimizes the paper content through the feedback mechanism of the automatic review module to generate a mathematical modeling paper with clear logic and rigorous structure. The system realizes closed-loop feedback and iterative optimization through the update of the internal knowledge base, continuously improves the innovation and quality of the experiment, significantly reduces manual intervention, and provides an efficient and intelligent automation solution for the research of mathematical modeling problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flow chart of the present invention.

[0033] Figure 2 Schematic diagram of the overall framework of the mathematical modeling agent method based on a large language model of the present invention.

[0034] Figure 3 Generate presentations for papers on specific mathematical modeling problems. DETAILED DESCRIPTION

[0035] The embodiments of the present invention are described in detail below with reference to the accompanying drawings:

[0036] like Figure 1 As shown, the present invention provides a method for generating mathematical modeling papers based on a large-scale language model. It can be used to solve mathematical modeling problems and generate papers, thereby providing an efficient, intelligent, and automated solution for mathematical modeling research. The method first identifies documents and extracts mathematical modeling questions. Secondly, the large-scale model is used to generate preset problem-solving ideas and code templates. LLM generates multiple novel problem-solving ideas, and a chain-thinking mechanism is used to continuously optimize the ideas. Based on the screened ideas, experimental designs and experimental code are automatically generated, and experimental parameters are iteratively adjusted using real-time data feedback and evaluation metrics such as mean squared error. Based on the preset mathematical modeling paper template and automatically generated experimental data, the system uses LLM to automatically write well-structured and logically coherent mathematical modeling papers. An automatic review module is introduced to peer-review the generated papers, forming a self-feedback closed loop. Finally, each module shares information through a data interface and an internal knowledge base, and mathematical methods such as gradient descent and attention mechanisms are used to adaptively update system parameters. This system significantly reduces manual intervention in the mathematical modeling process, explores the potential of large-scale language models in the field of mathematical modeling, improves problem-solving efficiency and innovation, and is suitable for the fields of mathematical modeling and paper generation.

[0037] Specific implementation steps include Figure 2 As shown:

[0038] Step (1): The system inputs the mathematical modeling problem and generates a solution and an initial code template. The large language model converts the input into a semantic vector representation. At the same time, the average semantic vector representation K of the stored concepts is extracted from the internal knowledge base. By comparing I and K, the novelty score S is calculated. novel When S novel >θ1 is considered novel, and S is scored from multiple novelty scores novel Select the solution with the highest score and save it in a json file.

[0039] Step (2): For the selected problem-solving ideas, LLM generates a set of experimental lists and improves the initial code template of the experiment based on the experimental list; at the same time, LLM automatically runs the improved experiment to obtain the experimental results. The experimental results Experimental results with the initial code template i Use the mean square error formula for comparison to get the loss L exp , if L exp When the error is greater than θ2, the experiment is considered to differ significantly from the expected experimental results, and the LLM will iteratively optimize until the error does not exceed the threshold. The final improved experimental run results are combined with the experimental list as input to the LLM to generate an experimental log and save it in a JSON file.

[0040] Step (3): LLM generates text based on the problem-solving ideas and the experimental results of the design, referring to the preset paper template. For each generated text, LLM will evaluate the text coherence and logic of the text to obtain the evaluation score L. paper When L paper When the score is less than θ3, the text is considered not to meet the standards and the LLM will be asked to rewrite it until the review score reaches the expected level.

[0041] Step (4) The final generated paper content is passed through the LLM review criteria to generate a review score S review And feedback the generated paper through the loss function to get the feedback score L review LLM will also generate a review opinion based on the review criteria and save it in a json file.

[0042] Step (5): Encode the saved problem-solving ideas, experimental logs, and paper review comments to obtain the semantic vector X new Integrate and store into the internal knowledge base, the new round of output data X new Combined with the existing knowledge base state K oldDuring pre-training, the LLM will be connected with the internal knowledge base to form a closed-loop self-learning optimization process.

[0043] In order to test the performance of the mathematical modeling agent based on the large language model proposed in this paper, we gave the system several classic mathematical modeling problems to perform the whole process of idea generation, experiment execution, paper writing and automatic review modules. Among them, the mathematical modeling paper generated by the first question of question B of the 2024 Higher Education Press Cup National Undergraduate Mathematical Modeling Competition is as follows: Figure 3 As shown in the figure, the agent provides reasonable table of contents titles and symbol descriptions. In the main text, the agent proposes three sampling schemes: single sampling, double sampling, and triple sampling. It also uses the binomial distribution and the central limit theorem to optimize inspection efficiency. Experiments are conducted at different confidence levels and defect rates, and the average sample size (ASN) of the three sampling schemes is compared to determine which one to choose.

[0044] In terms of result presentation, Figure 3 As shown, the agent compares the ASNs of single, double, and triple sampling schemes at a 95% confidence level and a defect rate of 0.10. The results are shown in Table 1.

[0045] Table 1 Comparison of ASN of three sampling schemes

[0046]

[0047] In summary, through the present invention, we can see that intelligent agents can propose creative solutions to problems related to mathematical modeling, and write experimental codes that meet the requirements of the questions and mathematical modeling papers with strong logic.

Claims

1. A mathematical modeling paper generation method based on a large language model, which automates the entire process from solution conception generation, experimental design and execution, to paper writing and automatic review. It is characterized by: The steps include: Step (1), idea generation: LLM is used to generate preset problem-solving ideas and initial code templates, where the preset problem-solving ideas are converted into multiple problem-solving ideas through LLM, and the multiple problem-solving ideas are encoded to obtain corresponding multiple semantic vectors represents the set of real numbers, d represents the dimension; Step (2), experimental design. For the selected problem-solving ideas, LLM will generate a set of experimental lists and improve the initial code template of the experiment based on the experimental list; at the same time, LLM will automatically run the improved experiment to obtain the experimental results. The experimental results Experimental results with the initial code template i Use the mean square error formula for comparison to get the loss L exp ; Step (3), paper text generation: LLM generates the text based on the problem-solving ideas and the designed experimental results, referring to the preset paper template, and the generation probability of each word in the text is calculated using softmax; Step (4) The final generated paper content is passed through the LLM review criteria to generate a review score S review And feedback the generated paper through evaluation loss to get the feedback score L review ; Step (5): Encode the saved problem-solving ideas, experimental logs, and paper review comments to obtain the semantic vector X new The data is integrated and stored in the internal knowledge base; at the same time, the internal knowledge base is updated using a mechanism that gradually integrates new data and historical records.

2. The method for generating mathematical modeling papers based on a large language model according to claim 1, characterized in that: Step (1) requires novelty assessment of the generated problem-solving ideas, which is specifically implemented as follows: Using the average vector K of existing ideas in the internal knowledge base, the novelty of multiple problem-solving ideas is determined by calculating the cosine similarity, and the novelty score S is defined. novel for: When S novel When >θ1, the problem-solving idea is considered to be novel enough, and the novelty score S is calculated from multiple novelty scores. novel The solution with the highest score is selected and saved in a json file; where θ1 represents the novelty threshold.

3. The method for generating mathematical modeling papers based on a large language model according to claim 1, characterized in that: The existing ideas in the internal knowledge base described in step (1) are derived from the ideas of excellent papers on the mathematical modeling website and the ideas in previously run papers.

4. The method for generating a mathematical modeling paper based on a large language model according to claim 2, characterized in that: The loss L in step (2) exp The solution is as follows: Where N represents the total number of experiments, i represents the i-th experiment, Represents the output result of the experiment after the i-th improvement; when L exp When the error is greater than θ2, the experiment is considered to have a large difference from the expected experimental effect, and the LLM will perform iterative optimization until the error does not exceed the threshold θ2. The final improved experimental run results will be combined with the experimental list as input to the LLM to generate an experimental log and save it in a json file.

5. The method for generating mathematical modeling papers based on a large language model according to claim 4, characterized in that: Step (3) is specifically implemented as follows: Each time a text is generated, LLM will automatically review the text. During the automatic review, the coherence and logic evaluation of the text is evaluated using a hybrid loss function L paper : L paper =λ1L syntax +λ2L logic +λ3L data Among them, λ1, λ2 and λ3 represent weights, L syntax Used to measure grammatical correctness, L logic Used to measure the logical cohesion of the text, L data Used to ensure that the experimental data description in the paper matches the actual data; where L syntax , L logic and L data They are all generated by pre-trained LLM; when L paper When <θ3, the text is considered not to meet the standards and the LLM will be asked to rewrite it until the review score reaches the expected level; where θ3 represents the text review threshold.

6. The method for generating mathematical modeling papers based on a large language model according to claim 5, characterized in that: The feedback score L in step (4) review The solution is as follows: L review =(S target -S review ) 2 Among them, S target is the expected review score, S review For review scores.

7. The method for generating mathematical modeling papers based on a large language model according to claim 6, characterized in that: Review score S review The solution is as follows: The winning papers, paper scores, and evaluation criteria of the corresponding competition are used as input to train the LLM and obtain the trained LLM for evaluation. The final generated paper content is then input into the trained LLM to obtain the output evaluation score S. review ; LLM will also generate a paper review opinion based on the review criteria and save it in a json file.

8. The method for generating mathematical modeling papers based on a large language model according to claim 7, characterized in that: Step (5) Update the internal knowledge base and convert the new round of output semantic vector X new Combined with the existing internal knowledge base state vector, the update formula is: K new =(1-γ)·K old +γ·X new , Among them, γ is the preset update rate; K new Represents the updated state vector of the internal knowledge base; LLM will be connected with the internal knowledge base during pre-training to form a closed-loop self-learning optimization process.

Citation Information

Cited By

  • Method and system for constructing thinking chain data from academic papers

    CN121684079A

  • A method and system for constructing thinking chain data from a dissertation

    CN121684079B