Integer programming automatic modeling method based on large language model
By adopting large language models and multiple optimization technologies in automatic modeling of integer programming, the problems of insufficient flexibility in rule definition and high computing resources in the existing methods are solved, and automatic modeling of integer programming with efficient and strong generalization capabilities are achieved.
Patent Information
- Application Number
- CN202411817102.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The existing automatic modeling method for integer programming relies on manually defined rules, lacks flexibility and generalization, and training and optimization of large language models requires a large amount of computing resources, which is expensive and difficult to apply in resource-limited environments.
The automatic modeling method of integer programming based on large language models is adopted, and data augmentation and complexity balance is performed by obtaining the data set of integer programming problems. The neural network model structure is optimized using model architecture search and combination optimization methods, and combined with dynamic sparse training, adaptive difficulty course learning, hierarchical reinforcement learning and multi-objective Pareto frontier exploration and other methods to improve the training efficiency and generalization ability of the model.
High-quality and diverse training data are realized, the model structure is automatically optimized, the model training efficiency and generalization ability of the model are improved, the system modeling ability and optimization effect are enhanced, and the logical consistency and reliability of the generated model are ensured.
Smart Images

Figure CN119721249A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of artificial intelligence, and in particular to an automatic modeling method of integer programming based on a large language model. Background Art
[0002] Integer Programming (IP) is a mathematical optimization method that is widely used in logistics, finance, production planning and other fields. At present, researchers have proposed a variety of automatic modeling methods for integer programming. The rule-based automatic modeling system collects knowledge and rules, converts them into a computer-understandable form, and finally generates the target modeling form. However, manually defined rules may be difficult to cover all scenarios and lack flexibility and generalization. The automatic modeling method based on machine learning learns the constraint coefficients and objective function coefficients of the planning problem from the data, and then integrates them into the combinatorial optimization framework to generate answers in the form of mathematical modeling. Training and optimizing machine learning models requires a lot of computing resources and is costly.
[0003] Existing integer programming automatic modeling methods have the following specific technical problems: they rely on manually defined rules, which may be difficult to cover all modeling scenarios and lack flexibility and generalization; they rely on large-scale data sets, which may involve data privacy issues, especially when dealing with sensitive data; they have limited generalization capabilities when dealing with different types of integer programming problems; training and optimizing large language models requires a lot of computing resources, which is costly and difficult to apply in resource-limited environments; the quality of data sets is low, which may lead to poor model effects; large language models are more complex, and the computational overhead during training and inference is large, affecting the efficiency of practical applications; existing methods still need to be improved in enhancing the logical consistency of models, especially when dealing with complex constraints. Summary of the invention
[0004] The purpose of the invention is to provide an automatic modeling method for integer programming based on a large language model to solve the above-mentioned problems existing in the prior art.
[0005] The technical solution is an automatic modeling method of integer programming based on a large language model, comprising the following steps: S1. Obtain an integer programming problem dataset, process it using data enhancement and dynamic complexity balancing methods, and obtain a balanced dataset with multimodal representation; S2, based on the balanced data set represented by multimodal representation, the model architecture search and combinatorial optimization methods are used to process and obtain the optimized neural network model structure; S3, based on the optimized neural network model structure and the balanced data set represented by multimodal representation, dynamic sparse training and adaptive difficulty curriculum learning methods are used to obtain the model trained in the first stage; S4, based on the model trained in the first stage and the balanced data set represented by multimodal representation, hierarchical reinforcement learning and multi-objective Pareto frontier exploration method are used to obtain the final model trained in the second stage; S5. Based on the final model trained in the second stage and the balanced data set represented by multimodal representation, the dynamic neural symbolic reasoning method is used to process and obtain the integer programming model with enhanced logical consistency; S6. Based on the integer programming model with enhanced logical consistency and balanced data sets with multimodal representation, an adaptive adversarial test generation method is used to obtain comprehensive evaluation results.
[0006] Beneficial effects: The present invention provides the system with high-quality and diversified training data, realizes automatic optimization of the model structure, improves the training efficiency and generalization ability of the model, enhances the modeling ability and optimization effect of the system; ensures the logical consistency and reliability of the generated model, improves the robustness and long-term stability of the system, and improves the modeling efficiency, accuracy and adaptability of integer programming problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 It is a flow chart of the present invention.
[0008] Figure 2 This is a flow chart of step S1 of the present invention.
[0009] Figure 3 This is a flow chart of step S2 of the present invention.
[0010] Figure 4 This is a flow chart of step S3 of the present invention.
[0011] Figure 5 This is a flow chart of step S4 of the present invention.
[0012] Figure 6 This is a flow chart of step S5 of the present invention.
[0013] Figure 7 This is a flow chart of step S6 of the present invention. DETAILED DESCRIPTION
[0014] like Figure 1 As shown, the present application proposes an automatic modeling method for integer programming based on a large language model, comprising the following steps: S1. Obtain an integer programming problem dataset, process it using data enhancement and dynamic complexity balancing methods, and obtain a balanced dataset with multimodal representation; S2, based on the balanced data set represented by multimodal representation, the model architecture search and combinatorial optimization methods are used to process and obtain the optimized neural network model structure; S3, based on the optimized neural network model structure and the balanced data set represented by multimodal representation, dynamic sparse training and adaptive difficulty curriculum learning methods are used to obtain the model trained in the first stage; S4, based on the model trained in the first stage and the balanced data set represented by multimodal representation, hierarchical reinforcement learning and multi-objective Pareto frontier exploration method are used to obtain the final model trained in the second stage; S5. Based on the final model trained in the second stage and the balanced data set represented by multimodal representation, the dynamic neural symbolic reasoning method is used to process and obtain the integer programming model with enhanced logical consistency; S6. Based on the integer programming model with enhanced logical consistency and balanced data sets with multimodal representation, an adaptive adversarial test generation method is used to obtain comprehensive evaluation results.
[0015] like Figure 2 As shown, according to one aspect of the present application, step S1 is further: S11, receiving an integer programming problem data set input by a user, and using a pre-set rule template to generate a new integer programming problem; merging the new integer programming problem with the integer programming problem data set to form an expanded data set; S12. Use a preset complexity evaluation function to perform complexity scoring on each integer programming problem in the expanded data set to obtain a scoring result; based on the scoring result, calculate the complexity distribution of the data set; compare the complexity distribution with the preset target distribution to obtain a complexity difference value; based on the complexity difference value, dynamically adjust the parameters of the data generator to obtain an enhanced data set with balanced complexity; S13. Based on the enhanced dataset with complexity balance, each integer programming problem is converted into a textual representation, and the textual representation is converted into a graph structure representation; each integer programming problem is converted into a symbolic representation; each integer programming problem is converted into a matrix representation; the data in the textual representation, graph structure representation, symbolic representation and matrix representation are merged to form a balanced dataset with multimodal representation.
[0016] In one embodiment of the present application, an initial integer programming problem data set input by a user is received and stored in a preset data storage device. The initial integer programming problem data set is read from the data storage device, and a new integer programming problem having a similar structure to the initial data set but different values is generated using a preset rule template. The newly generated integer programming problem is merged with the initial data set to form an expanded data set, and the expanded data set is stored in the data storage device.
[0017] The augmented data set is read from the data storage device, and the complexity of each integer programming problem in the augmented data set is scored using the preset complexity evaluation function. Based on the scoring results, the complexity distribution of the data set is calculated. The target complexity distribution parameters are set, and the current complexity distribution is compared with the target distribution to obtain the complexity difference value. Based on the complexity difference value, the parameters of the data generator are dynamically adjusted, and the data generation process is repeated until the complexity difference value is less than the preset threshold, and an augmented data set with balanced complexity is obtained.
[0018] The complexity-balanced enhanced dataset is read from the data storage. For each integer programming problem, it is first converted into a textual representation and stored in a preset textual data matrix. Then, the textual representation is converted into a graph structure representation, in which the decision variables, objective functions and constraints are respectively used as nodes of the graph, and the relationship between them is used as edges, and the obtained graph structure data is stored in a preset graph data storage structure. Next, the integer programming problem is converted into a symbolic representation, and the variables, constraints and objective functions are represented using a predefined mathematical symbol system, and the symbolic representation data is stored in a preset symbolic data array. Finally, the integer programming problem is converted into a matrix representation, and the constraint coefficients form a constraint matrix, and the objective function coefficients form a target vector, and the matrix representation data is stored in a preset matrix data structure. The data in the four representation forms of text, graph, symbol and matrix are merged to form a balanced dataset of multimodal representation, which is stored in the data storage.
[0019] According to one aspect of the present application, step S12 is further: S121, inputting each integer programming problem in the expanded data set into a preconfigured complexity evaluation network to obtain a multidimensional complexity vector of each problem; S122. Based on the multidimensional complexity vectors of all problems, using the kernel density estimation method, calculate the distribution of the current data set in the multidimensional complexity space to obtain the current distribution; S123, using Wasserstein distance to calculate the difference between the current distribution and the preset target distribution, to obtain distribution difference data; based on the distribution difference data, using an adaptive importance sampling algorithm to generate a new integer programming problem; adding the new integer programming problem to the expanded data set; S124. Repeat steps S121 to S123 until the distribution difference data is less than a preset threshold or the maximum number of iterations is reached, and output an enhanced data set with balanced complexity.
[0020] This embodiment improves the quality and diversity of integer programming problem data sets by introducing dynamic complexity adaptive sampling algorithms and multimodal problem representation methods. Specifically, the dynamic complexity adaptive sampling algorithm uses an attention mechanism and a recurrent neural network structure to accurately capture the complexity characteristics of integer programming problems, and achieves a balanced distribution of the complexity space through a kernel density estimation method. It not only ensures that the training data covers a wide range of problem complexity, but also dynamically adjusts the sampling strategy, effectively avoiding the data bias problem that may be caused by traditional random sampling. The multimodal problem representation method enriches the expression of the problem by introducing four representation forms: text, graph, symbol, and matrix. This multimodal representation enables the model to understand the structure and semantics of integer programming problems from different angles, improving the accuracy and robustness of the subsequent modeling process. Especially when dealing with complex industrial-level integer programming problems, such as supply chain optimization or large-scale resource scheduling problems, multimodal representation can more comprehensively capture all aspects of the problem, including the relationship between variables, the logical structure of constraints, and the mathematical properties of the objective function. In addition, by using the Wasserstein distance to measure the difference between the generated data distribution and the target distribution, and combining the adaptive importance sampling algorithm, high-quality integer programming problem samples can be efficiently generated. This not only improves the efficiency of data generation, but also ensures the authenticity and representativeness of the generated data, providing a solid data foundation for subsequent model training. This embodiment makes the data preparation process of integer programming problems more intelligent and automated, improves the starting point of the entire automatic modeling system, and lays the foundation for high performance in subsequent steps.
[0021] like Figure 3 As shown, according to one aspect of the present application, step S2 is further: S21. Based on the balanced data set represented by multimodal representation, construct an initial neural network model architecture; based on the initial neural network model architecture, construct a model performance evaluation function; S22. Based on the initial neural network model architecture and the pre-stored search space information, a Bayesian optimization algorithm is used to generate a candidate model architecture in the search space; for each candidate model architecture, a corresponding neural network model is constructed; a balanced data set represented by multimodal is input into the neural network model for training and verification to obtain verified model performance data; based on the verified model performance data, a model performance evaluation function is used to calculate the performance score of each candidate model; S23. Based on the performance scores of all candidate models, a multi-objective optimization algorithm is used to calculate the Pareto optimal solution set to obtain a balanced model architecture; based on the balanced model architecture, the model architecture with the best overall performance is selected as the final optimized neural network model structure.
[0022] In one embodiment of the present application, a balanced data set of multimodal representation is read from a data storage device. An initial neural network model architecture is set, including the structure and parameters of the input layer, hidden layer, and output layer. The initial model architecture information is stored in a preset model structure database. A model performance evaluation function is defined, including indicators such as accuracy, computational efficiency, and model complexity. An architecture search space is set, including adjustable parameters such as the number of layers, the number of neurons in each layer, and the type of activation function, and the search space information is stored in a parameter search data structure.
[0023] Read the current model architecture information from the model structure database and obtain the search space information from the parameter search data structure. Generate candidate model architectures within the defined search space using optimization algorithms such as Bayes. For each candidate architecture, build a corresponding neural network model. Read a subset of the balanced data set represented by multimodal from the data storage and input it into the candidate model for training and verification. Use the performance evaluation function to calculate the performance score of each candidate model. Store the architecture information and corresponding performance score of the candidate model in the performance evaluation data table.
[0024] Read the performance scores of all candidate models from the performance evaluation data table. Use a multi-objective optimization algorithm, such as NSGA-II (Non-dominated Sorting Genetic Algorithm II), while considering the accuracy, computational efficiency, and complexity of the model. Calculate the Pareto optimal solution set to obtain a series of model architectures that balance different objectives. Store the model architecture information in the Pareto optimal solution set in the optimized architecture database. Select the model architecture with the best overall performance from the optimized architecture database and set it as the final optimized neural network model structure.
[0025] Based on the final optimized neural network model structure, a complete neural network model is constructed. A balanced data set of multimodal representation is read from the data storage device and divided into a training set, a validation set, and a test set. The constructed neural network model is preliminarily trained using the training set to obtain the initial parameters of the model. The model performance is evaluated using the validation set, and the model structure and parameters are fine-tuned based on the validation results. The training and validation process is repeated until the model performance converges on the validation set or the preset number of iterations is reached. The final optimized neural network model, including its structural information and parameter values, is stored in the model storage device.
[0026] This embodiment realizes the automatic optimization of the integer programming automatic modeling system architecture by introducing the neural architecture search (NAS) and differentiable architecture search (DARTS) methods, and improves the performance and adaptability of the model. Specifically, the NAS controller with a recurrent neural network structure based on a reinforcement learning strategy can intelligently explore the architecture space of vast and automatically discover the network structure that best suits the characteristics of integer programming problems. It breaks through the limitations of traditional manual design architectures, especially when dealing with integer programming problems with complex constraints and nonlinear objective functions, and shows excellent modeling capabilities. The introduction of the DARTS method transforms discrete architecture selection into a continuous optimization problem, and realizes efficient search of the architecture space by constructing a hypernetwork containing all possible operations. It not only speeds up the speed of architecture search, but also optimizes the architecture parameters and model weights simultaneously during the search process, thereby finding a better local optimal solution. In addition, the application of knowledge distillation technology effectively transfers the knowledge in the hypernetwork to the fixed structure network finally selected, further improving the performance of the model. This combination strategy is particularly suitable for the characteristics of integer programming problems because it can automatically adapt to different types of constraints and objective functions, such as linear, quadratic and even higher-order nonlinear relationships. For common mixed integer programming problems in the industry, such as production planning optimization or portfolio management, this automated architecture search and optimization method can quickly find the most suitable model structure, reducing the time and cost of manual trial and error. At the same time, because the model structure is automatically optimized according to the specific problem, it can better capture the inherent structure and characteristics of the integer programming problem, thereby maintaining high performance on problems of different scales and complexities. This embodiment improves the adaptability and performance ceiling of the integer programming automatic modeling system through automated architecture search and optimization, laying a solid structural foundation for subsequent model training and application.
[0027] According to one aspect of the present application, in step S22, based on the initial neural network model architecture and the pre-stored search space information, a Bayesian optimization algorithm is used to generate a candidate model architecture in the search space, further comprising: S221, based on the initial neural network model architecture and pre-stored search space information, using a recurrent neural network structure of a reinforcement learning strategy, initializing a neural architecture search controller to obtain controller parameters; S222, based on the controller parameters, generating actions, including the number of layers of the candidate neural network structure, the operation type and connection method of each layer, and obtaining candidate architecture description data; S223. Based on the candidate architecture description data, use a differentiable architecture search method to transform discrete architecture selection into a continuous optimization problem; based on the optimization problem, construct a hypernetwork; S224, reading a training data subset from a data storage device, performing forward propagation and backward propagation on the hypernetwork, and updating architecture parameters and model weights at the same time to obtain updated hypernetwork parameters; S225, repeating step S224 until a preset round is reached, outputting final hypernetwork parameters; based on the final hypernetwork parameters, selecting a candidate model architecture; S226. Use knowledge distillation technology to transfer the knowledge in the hypernetwork to the candidate model architecture to obtain the final candidate model architecture.
[0028] In one embodiment of the present application, the current model architecture information is read from the model structure database, and the search space information is obtained from the parameter search data structure. The neural architecture search (NAS) controller is initialized, and a recurrent neural network structure with a reinforcement learning strategy is adopted. The initialized controller parameters are stored in the NAS controller parameter database. The controller parameters are loaded from the NAS controller parameter database. The controller generates a series of actions that define the structure of the candidate neural network, including the number of layers, the type of operation of each layer (such as convolution, pooling, self-attention, etc.) and the connection method. The generated architecture description is stored in the candidate architecture description data table. The architecture description is read from the candidate architecture description data table. The discrete architecture selection is converted into a continuous optimization problem using the differentiable architecture search (DARTS) method. A hypernetwork is constructed, containing all possible operations, and weights are assigned to each operation. The initial parameters of the hypernetwork are stored in the hypernetwork parameter database.
[0029] A subset of the balanced dataset with multimodal representation is read from the data storage. For each candidate architecture, the corresponding subnetwork is extracted from the hypernetwork. The data subset is input into each subnetwork for forward propagation calculation. The loss function value of each subnetwork is calculated and stored in the model performance temporary table. Based on the calculated loss function value, the architecture parameters and model weights are updated simultaneously using the gradient descent method. For the architecture parameters, a second-order optimization method (such as Newton's method) is used to accelerate convergence. The updated parameters are stored back in the hypernetwork parameter database. The above steps are repeated, and then, based on the values of the architecture parameters, the final network structure is selected. At the same time, the comprehensive performance score of the selected structure is calculated using the performance evaluation function. The selected structure information and performance score are stored in the performance evaluation data table. The performance score is read from the performance evaluation data table. The exploration strategy of the NAS controller is dynamically adjusted based on the performance score using the multi-armed bandit algorithm. The updated controller parameters are stored back in the NAS controller parameter database. Repeat until the preset number of search rounds is reached or the performance converges. The model architecture with the best comprehensive performance is selected from the performance evaluation data table. The knowledge distillation technique is used to transfer the knowledge in the hypernetwork to this fixed structure network. The final model architecture information and parameters are stored in the final model parameter database.
[0030] like Figure 4 As shown, according to one aspect of the present application, step S3 is further: S31. Based on preset difficulty evaluator parameters, select a sample subset of the current difficulty level from the balanced data set represented by multimodal representation; score the sample subset using the difficulty evaluation function to obtain a scoring result; based on the scoring result, sort the sample subset from low to high in terms of difficulty to form a data sequence of the current training batch, and obtain training batch data; S32, read the training samples of the current difficulty level from the training batch data, input the training samples into the optimized neural network model structure, perform forward propagation calculation, and obtain the output result of the model; calculate the loss value between the output result of the model and the true label to obtain a loss record array; based on the loss record array, execute the back propagation algorithm to calculate the gradient of the model parameters; S33, based on the absolute value of the gradient of the model parameters and the preset sparsity threshold, determine the parameter subset that needs to be updated; apply gradient descent update to the parameter subset to obtain updated model parameters; based on the updated model parameters and the loss record array, dynamically adjust the sparsity threshold to obtain a new sparsity threshold; S34, based on the difficulty evaluator parameters, read the current difficulty level and difficulty adjustment step; read the average loss value of the most recent N trainings from the loss record array; if the average loss value is lower than a preset low threshold, increase the difficulty level; if it is higher than a preset high threshold, reduce the difficulty level, output the updated difficulty level, and obtain difficulty control data; based on the difficulty control data, select samples of the next training batch from a balanced data set represented by multimodal representation; based on the samples of the next training batch and the new sparsity threshold, repeat steps S31 to S34 until a preset number of training rounds is reached or the model performance converges, and obtain the final training model parameters; wherein N is a preset constant; S35. Obtain a validation subset from the balanced data set represented by multimodal data, evaluate the performance of the model based on the validation subset and the final training model parameters, calculate the accuracy and F1 score of the model on the validation set, and form model performance data; based on the final training model parameters and model performance data, output the model trained in the first stage.
[0031] In one embodiment of the present application, an optimized neural network model including its structural information and initial parameter values is read from a model memory. A balanced data set represented by multimodality is obtained from a data memory. Dynamic sparsification parameters are initialized including an initial sparsity threshold and a sparsity adjustment step size, and these parameters are stored in a sparsification control data structure. A difficulty evaluator is initialized, an initial difficulty level and a difficulty adjustment step size are set, and these parameters are stored in a difficulty control data structure.
[0032] According to the initialized difficulty evaluator parameters, select a sample subset of the current difficulty level from the balanced dataset represented by multimodal representation. Use the difficulty evaluation function to score the selected sample subset and store the score results in the difficulty score data table. According to the difficulty score, sort the sample subset from low to high difficulty to form the data sequence of the current training batch, and store this sequence in the training batch data cache.
[0033] Read the training samples of the current difficulty level from the training batch data cache. Input these samples into the read neural network model, perform forward propagation calculations, and obtain the output results of the model. Calculate the loss value between the model output and the true label, and store the loss value in the loss record array. Based on the calculated loss value, execute the backpropagation algorithm, calculate the gradient of the model parameters, and store the gradient value in the gradient cache.
[0034] Read the current sparsity threshold from the sparsification control data structure. Read the calculated gradient value from the gradient cache. For each layer of network parameters, determine the parameter subset that needs to be updated based on the absolute value of its gradient and the current sparsity threshold. Apply gradient descent update only to the selected parameter subset, and keep other parameters unchanged. Store the updated model parameters back to the model memory. Dynamically adjust the sparsity threshold according to the change of the loss value of this training, and update the new threshold to the sparsification control data structure.
[0035] Read the current difficulty level and difficulty adjustment step from the difficulty control data structure. Read the average loss value of the most recent N trainings (N is a preset constant) from the loss record array. If the average loss value is lower than the preset threshold, increase the difficulty level; if it is higher than another preset threshold, decrease the difficulty level. Store the updated difficulty level back into the difficulty control data structure. According to the new difficulty level, select the next training batch of samples from the balanced dataset represented by multimodal, and repeat the above steps until the preset number of training rounds is reached or the model performance converges. After completing the preset number of training rounds, read the model parameters obtained by the final training from the model memory. Use the validation subset in the balanced dataset represented by multimodal to evaluate the performance of the model. Calculate the accuracy, F1 score and other indicators of the model on the validation set, and store these performance indicators in the model performance data table. Save the model trained in the first stage, including its structural information, parameter values and performance indicators, in the model memory for use in the subsequent reinforcement learning stage.
[0036] According to one aspect of the present application, step S33 is further: S331, read the current sparsity threshold from the sparsification control data structure, initialize a dynamic threshold adjustment network, the network receives the performance index and sparsity distribution of the current model as input, outputs the sparsity threshold adjustment amount of each layer, and stores the network parameters in a threshold adjustment network parameter database.
[0037] S332. Read the gradient value from the gradient cache. Use the Momentum-based Sparse Adam optimizer to combine the gradient value and historical momentum information to calculate the update direction and amplitude of each parameter. Store the calculation results in the parameter update data table.
[0038] S333, read the update information from the parameter update data table. For each layer of the network, use the Top-k sparse strategy to retain only the k updates with the largest absolute values, where k is dynamically determined based on the sparsity threshold of the current layer. Store the sparse update information in the sparse update data table.
[0039] S334, read the sparse update information from the sparse update data table, apply it to the current model parameters, calculate the performance index of the updated model and the sparsity distribution of each layer, and store the results in the model state data table.
[0040] S335, read the performance index and sparsity distribution from the model state data table, and load the parameters from the threshold adjustment network parameter database. Input these data into the dynamic threshold adjustment network to obtain the sparsity threshold adjustment amount of each layer. Update the adjusted threshold into the sparsification control data structure.
[0041] S336, repeating steps S332 to S335 until a preset number of training rounds is reached or the performance converges. Finally, the sparse model parameters obtained through training and the final sparsity distribution are stored in a sparse model database.
[0042] This embodiment improves the training efficiency and model performance of the integer programming automatic modeling system by introducing a dynamic sparsification training algorithm and an adaptive difficulty course learning strategy. Specifically, the dynamic sparsification training algorithm realizes intelligent control of the sparsity of model parameters through a dynamic threshold adjustment network. It not only reduces the number of model parameters and reduces the computational complexity, but also adaptively allocates appropriate parameter resources for integer programming problem features of different levels and types. Especially when dealing with large-scale integer programming problems, such as nationwide logistics network optimization or complex production scheduling problems, dynamic sparsification can effectively reduce the risk of overfitting of the model and improve generalization ability. The use of the Momentum-based SparseAdam optimizer further improves the efficiency and stability of parameter updates, and is particularly suitable for dealing with sparse gradient situations common in integer programming problems. The adaptive difficulty course learning strategy realizes progressive optimization of the model learning process by dynamically adjusting the complexity of the training samples. This strategy is particularly suitable for integer programming problems because it can start from simple linear programming problems and gradually transition to mixed integer programming problems containing complex constraints and nonlinear objective functions, so that the model can gradually master modeling skills from basic to advanced. This not only speeds up the convergence of the model, but also improves the model's ability to understand and handle complex problems. In addition, the application of the Top-k sparsification strategy ensures that the model has good computing efficiency and storage efficiency while maintaining high performance. This is of great significance for integer programming application scenarios that require real-time response, such as online resource scheduling or real-time pricing systems. The introduction of the dynamic threshold adjustment network enables the model to automatically adjust the sparsification strategy according to different types of integer programming problems, further improving the adaptability and robustness of the model. This embodiment not only improves the training efficiency and final performance of the model, but also enables the model to have the ability to handle integer programming problems of various complexities and scales, laying a solid foundation for the practical application of integer programming automatic modeling systems.
[0043] like Figure 5 As shown, according to one aspect of the present application, step S4 is further: S41. Based on the model trained in the first stage and the balanced data set represented by multimodal representation, the hierarchical reinforcement learning architecture and multi-objective optimization parameters are initialized to obtain reinforcement learning model data and multi-objective optimization control data; wherein the hierarchical reinforcement learning architecture includes a variable definition strategy network, a constraint generation strategy network, an objective function construction strategy network and a meta-controller network; the multi-objective optimization parameters include accuracy, efficiency and interpretability; S42, reading a meta-controller network from the reinforcement learning model data; randomly selecting an integer programming problem from the balanced data set represented by the multimodal representation as the current environment state, inputting it into the meta-controller network, outputting an action sequence, and obtaining a task sequence cache; reading subtasks from the task sequence cache in sequence, and loading corresponding subtask strategy networks from the reinforcement learning model data; wherein the subtasks include a variable definition subtask, a constraint generation subtask, and an objective function construction subtask; S43, for the variable definition subtask, read the relevant information of the current integer programming problem from the balanced data set represented by the multimodal representation, input the relevant information into the variable definition strategy network, and obtain the variable definition result; for the constraint generation subtask, input the variable definition result and the relevant information into the constraint generation strategy network, and obtain the constraint generation result; for the objective function construction subtask, input the variable definition result, the constraint generation result and the relevant information into the objective function construction strategy network, and obtain the objective function construction result; S44, combining the variable definition results, constraint generation results and objective function construction results to form a planning model; using the model performance evaluation function in step S21, calculating the accuracy score of the planning model; at the same time, recording the calculation time of the planning model generation process to obtain the efficiency score; using a predefined interpretability evaluation function, calculating the interpretability score of the planning model; based on the accuracy score, efficiency score and interpretability score, forming multi-objective scoring data; S45, based on the multi-objective optimization parameters and the multi-objective scoring data, calculating the weighted total score; using the weighted total score as a reward signal for reinforcement learning; based on the reward signal, updating the parameters of the reinforcement learning model data, and repeatedly executing steps S42 to S45 until a preset number of training rounds is reached; S46. After completing the preset number of training rounds, read all historical scoring records from the multi-objective scoring data; based on the historical scoring records, use the NSGA-II algorithm to calculate the Pareto optimal solution set of accuracy, efficiency and interpretability to form a Pareto solution set database; select a balanced solution from the Pareto solution set database as the final model parameter configuration to obtain the final model after the second stage of training.
[0044] In one embodiment of the present application, a model trained in the first phase is read from a model memory, including its structural information, parameter values, and performance indicators. A balanced data set represented by a multimodal representation is read from a data memory. A hierarchical reinforcement learning architecture is initialized, including a policy network for three subtasks of variable definition, constraint generation, and objective function construction, as well as a meta-controller network, and these network structures and initial parameters are stored in a reinforcement learning model database. Multi-objective optimization parameters are initialized, including weights of the three objectives of accuracy, efficiency, and interpretability, and these parameters are stored in a multi-objective optimization control data structure.
[0045] Read the meta-controller network from the reinforcement learning model database. Randomly select an integer programming problem from the balanced data set represented by multimodal representation as the current environment state and input it into the meta-controller network. The meta-controller network outputs an action sequence that specifies the execution order of the subtasks and stores this action sequence in the task sequence cache. Read the subtasks from the task sequence cache in sequence and load the corresponding subtask policy network from the reinforcement learning model database. For the variable definition subtask, read the relevant information of the current integer programming problem from the balanced data set represented by multimodal representation. Input this information into the variable definition policy network to obtain the variable definition result. Store the variable definition result in the intermediate result cache. For the constraint generation subtask, read the variable definition result from the intermediate result cache, combine it with the information of the current integer programming problem, input it into the constraint generation policy network, and obtain the constraint generation result. Append the constraint generation result and store it in the intermediate result cache. For the objective function construction subtask, read the variable definition and constraint generation results from the intermediate result cache, combine it with the information of the current integer programming problem, input it into the objective function construction policy network, and obtain the objective function construction result.
[0046] Read the results of all subtasks from the intermediate result cache and combine them to form a complete integer programming model. Use the saved model performance evaluation function to calculate the accuracy score of the model. At the same time, record the calculation time of the model generation process and calculate the efficiency score. In addition, use the predefined interpretability evaluation function to calculate the interpretability score of the model. Store these three scores in the multi-objective scoring data table. Read the target weight parameters from the multi-objective optimization control data structure and calculate the weighted total score in combination with the multi-objective score. Use this score as the reward signal for reinforcement learning and store it in the reward signal cache. Read the reward value from the reward signal cache to update the parameters of the meta-controller network and each sub-task policy network in the reinforcement learning model database. Repeat the above steps until the preset number of training rounds is reached.
[0047] After completing the preset number of training rounds, all historical scoring records are read from the multi-objective scoring data table. The Pareto optimal solution set for the three objectives of accuracy, efficiency, and interpretability is calculated using the NSGA-II (Non-dominated Sorting Genetic Algorithm II) algorithm. The Pareto optimal solution set is stored in the Pareto solution set database. A balanced solution is selected from the Pareto solution set database as the parameter configuration of the final model. According to the selected final parameter configuration, the corresponding meta-controller network and sub-task policy network parameters are extracted from the reinforcement learning model database. These parameters are integrated into the neural network model to form the final integer programming automatic modeling system. The final model is fully evaluated using the test subset of the balanced dataset represented by multimodal representation. The accuracy, F1 score, average solution time, and interpretability index of the model on the test set are calculated, and these performance indicators are stored in the final model performance data table. The final model trained in the second stage, including its structural information, parameter values, and performance indicators, is saved in the model memory as the final output result of the entire training process.
[0048] According to one aspect of the present application, step S43 is further: S431. Load the initial policy network parameters of the three subtasks of variable definition, constraint generation and objective function construction from the reinforcement learning model database. Initialize a graph attention network (GAT) to capture the relationship between variables, constraints and objectives in the integer programming problem. Store the parameters of the GAT in the graph attention network parameter database.
[0049] S432. Read information of the current integer programming problem from the balanced data set represented by the multimodal representation. Use GAT to process the problem information and generate a graph representation of the problem. Store the graph representation in a problem graph representation data table.
[0050] S433. Read the graph representation from the problem graph representation data table. For the variable definition subtask, input the graph representation into the variable definition strategy network. The network uses a graph convolution layer and a self-attention mechanism to output the probability distribution of the variable definition. Sample the specific variable definition result and store it in the intermediate result cache.
[0051] S434, read the variable definition result from the intermediate result cache, and combine it with the problem graph representation. Input the combined data into the constraint generation strategy network. The network uses a pointer-based sequence generation model to gradually generate constraint conditions. The generated constraint conditions are stored in the intermediate result cache.
[0052] S435. Read the variable definition and constraint generation results from the intermediate result cache and combine them with the problem graph representation. Input the combined data into the objective function construction strategy network. The network uses a neural arithmetic logic unit (NALU) to generate coefficients and structures of the objective function. Store the generated objective function in the intermediate result cache.
[0053] S436, read the variable definition, constraint generation and objective function construction results from the intermediate result cache. Use a combined network that uses residual connections and layer normalization to integrate the results of each subtask. Generate a final objective function construction result, taking into account the outputs of all previous subtasks. Store the integrated objective function construction result in the task output database.
[0054] According to one aspect of the present application, step S45 is further: S451, read the target weight parameters from the multi-objective optimization control data structure, initialize a meta-learning network for dynamically adjusting the weights of each target, and store the parameters of the meta-learning network in a meta-learning network parameter database.
[0055] S452. Read the accuracy, efficiency, and interpretability scores of the model from the multi-objective scoring data table. Use these scores as input, load parameters from the meta-learning network parameter database, and calculate the optimal weights of each objective in the current situation through the meta-learning network. Store the calculated weights in the dynamic weight data table.
[0056] S453. Read the latest target weight from the dynamic weight data table. Combine the multi-target scores to calculate the weighted total score. At the same time, calculate the structural similarity between the integer programming problem solution generated by the model and the true optimal solution, using the graph edit distance algorithm. Store the similarity score in the solution similarity data table.
[0057] S454, read the similarity score from the solution similarity data table. Use the framework of the Soft Actor-Critic (SAC) algorithm to combine the weighted total score and the similarity score into a composite reward signal. Specifically, use a small neural network to map the two scores to the final reward value. Store the calculated reward value in the reward signal cache.
[0058] S455, read the reward value from the reward signal buffer. Use Prioritized Experience Replay (PER) technology to prioritize the experiences according to the size of the reward value. Store the sorted experiences in the priority experience replay buffer.
[0059] S456. Sample a batch of experiences from the priority experience replay buffer. Use this batch of experiences to update the policy network and value network in the reinforcement learning model database. At the same time, use the reward distribution of this batch of experiences to update the meta-learning network, and store the updated parameters back into the meta-learning network parameter database.
[0060] This embodiment improves the modeling capability and optimization effect of the integer programming automatic modeling system by introducing a hierarchical reinforcement learning architecture and a multi-objective Pareto front exploration algorithm. Specifically, the hierarchical reinforcement learning architecture decomposes the modeling process of the integer programming problem into three subtasks: variable definition, constraint generation, and objective function construction, each of which is handled by a dedicated policy network. This divide-and-conquer approach enables the model to learn the various components of the integer programming problem more finely, and is particularly suitable for dealing with industrial-level integer programming problems with complex structures, such as multi-stage supply chain optimization or multi-objective resource allocation problems. The introduction of the graph attention network (GAT) enables the model to effectively capture the complex relationship between variables, constraints, and objectives in integer programming problems, which is particularly important for understanding and modeling systems with high interdependencies. The application of the pointer-based sequence generation model in the constraint generation task enables the model to generate constraints with reasonable structure and logical consistency, which performs well when dealing with problems with complex constraint relationships, such as vehicle path planning or factory production line optimization. The use of the neural arithmetic logic unit (NALU) in the construction of the objective function enables the model to generate more complex and accurate objective functions, including nonlinear and multi-objective optimization problems. The introduction of the multi-objective Pareto front exploration algorithm enables the model to find the best balance between multiple objectives such as accuracy, efficiency and interpretability. This is of great significance for multi-objective integer programming problems commonly seen in practical applications, such as project scheduling problems that balance cost, time and quality. The combination of the Soft Actor-Critic (SAC) algorithm and Prioritized Experience Replay (PER) technology improves the sample efficiency and stability of reinforcement learning, enabling the model to learn effective modeling strategies faster and more reliably. The introduction of the meta-learning network enables the model to dynamically adjust the weights of different objectives to adapt to the characteristics and requirements of different types of integer programming problems. Through reinforcement learning technology and multi-objective optimization methods, this embodiment enables the integer programming automatic modeling system to have the ability to handle highly complex, multi-objective, and large-scale integer programming problems, expanding the scope of application and effectiveness of the system.
[0061] like Figure 6 As shown, according to one aspect of the present application, step S5 is further: S51, based on the final model trained in the second stage and the balanced data set represented by multimodal representation, initialize the symbolic reasoning system, including the predefined integer programming problem logic rule set and the reasoning engine, and obtain the symbolic reasoning data; S52, reading integer programming problem samples from the balanced data set represented by multimodal representation; inputting the integer programming problem samples into the final model trained in the second stage to generate an initial integer programming model; S53, based on the symbolic reasoning data, performing a logic consistency check on the initial integer programming model, identifying potential logic conflicts or inconsistencies, and obtaining a consistency check result; S54, based on the consistency check result, generating correction suggestions; combining the correction suggestions with the integer programming problem sample to form a new input; re-inputting the new input into the final model trained in the second stage to generate a corrected integer programming model; S55, repeatedly executing step S53 and step S54 until the modified integer programming model passes the logic consistency check or reaches a preset maximum number of iterations, and outputting an integer programming model with enhanced logic consistency.
[0062] In one embodiment of the present application, the final model trained in the second stage is read from the model memory, including its structural information, parameter values and performance indicators. A balanced data set represented by multimodality is read from the data memory. A symbolic reasoning system is initialized, including a predefined integer programming problem logic rule set and a reasoning engine, and these components are stored in a symbolic reasoning database. A sample of an integer programming problem is selected from the balanced data set represented by multimodality. The sample is input into the final model to generate an initial integer programming model, including variable definitions, constraints and objective functions. The generated initial model is stored in an intermediate model cache.
[0063] Read the logical rule set and reasoning engine from the symbolic reasoning database. Read the initial model from the intermediate model cache. Use the reasoning engine to perform a logical consistency check on the initial model to identify potential logical conflicts or inconsistencies. Store the check results in the consistency check result table. Read the check results from the consistency check result table. If there are logical conflicts or inconsistencies, generate correction suggestions and store them in the correction suggestion cache. Read the suggestions from the correction suggestion cache and combine them with the original integer programming problem sample to form a new input. Re-input this new input into the final model to generate a corrected integer programming model. Update the corrected model to the intermediate model cache. Repeat the above steps until the model in the intermediate model cache passes the logical consistency check or the preset maximum number of iterations is reached. Extract the final integer programming model with enhanced logical consistency from the intermediate model cache and store it in the logical enhancement model database.
[0064] According to one aspect of the present application, step S54 is further: S541, read the check result from the consistency check result table. Initialize a neural theorem prover network based on a variational autoencoder (VAE) structure for generating logic correction suggestions. Store the network parameters in a theorem prover parameter database.
[0065] S542. Encode the logical conflict information in the check result into a vector. Load the parameters from the theorem prover parameter database and input the encoded vector into the neural theorem prover network. The network generates a series of possible correction operations, each of which is a transformation in the logical space. Store these correction operations in the correction operation data table.
[0066] S543, read the generated correction operation from the correction operation data table. Use the Monte Carlo Tree Search (MCTS) algorithm to search in the correction operation space and evaluate the potential effect of each correction operation sequence. Store the search results in the correction strategy data table.
[0067] S544. Select the optimal correction operation sequence from the correction strategy data table. Apply this sequence to the original integer programming model to generate a corrected model. Use symbolic execution technology to simulate the behavior of the corrected model under different inputs to verify its logical consistency. Store the verification results in the consistency verification data table.
[0068] S545, read the verification result from the consistency verification data table. If the verification passes, update the modified model to the intermediate model cache. If the verification fails, use the reinforcement learning method to adjust the parameters of the neural theorem prover network according to the failure situation, and store the updated parameters back in the theorem prover parameter database.
[0069] S546, repeating steps S542 to S545 until the generated model passes the consistency verification or reaches the preset maximum number of iterations. Finally, the final integer programming model with enhanced logic consistency is extracted from the intermediate model cache and stored in the logic enhanced model database.
[0070] This embodiment improves the logical consistency and reliability of the model generated by the integer programming automatic modeling system by introducing a dynamic neural symbolic reasoning method. Specifically, the neural theorem prover network based on the variational autoencoder (VAE) structure can automatically generate logical correction suggestions, which is particularly important when dealing with complex integer programming problems. For example, when dealing with supply chain optimization problems or complex resource scheduling problems with a large number of interrelated constraints, the network can identify and correct potential logical contradictions to ensure that the generated model is mathematically self-consistent. The application of the Monte Carlo Tree Search (MCTS) algorithm in the correction operation space enables the system to efficiently explore and evaluate various possible correction strategies to find the optimal logical correction solution. This is of great significance for integer programming problems that need to consider multiple mutually influencing factors, such as multi-stage production plan optimization. The introduction of symbolic execution technology further enhances the reliability verification capability of the model, and ensures that the generated integer programming model can maintain logical consistency in various possible scenarios by simulating the model behavior under different inputs. It is particularly suitable for application scenarios that require high reliability, such as resource allocation of critical infrastructure or risk management of financial portfolios. The application of reinforcement learning methods in the adjustment of neural theorem prover network parameters enables the system to learn from failed verification cases and continuously improve its ability to generate logically consistent models. This self-improvement mechanism enables the system to demonstrate strong adaptability and learning capabilities when faced with new or extremely complex integer programming problems. This embodiment improves the quality and reliability of the model generated by the integer programming automatic modeling system by combining the flexibility of neural networks and the rigor of symbolic reasoning. It can not only handle complex logical relationships that are difficult to deal with with traditional methods, but also ensure that the generated model is strictly mathematically correct, which is crucial for industrial-level integer programming problem solving.
[0071] like Figure 7 As shown, according to one aspect of the present application, step S6 is further: S61. Initialize an adversarial test generator based on a logical consistency enhanced integer programming model and a balanced data set represented by multimodal representation, and obtain adversarial test generator data; S62. Randomly select a subset from the balanced data set represented by multimodal representation as an initial test set; input the initial test set into the integer programming model with enhanced logic consistency to obtain a model output result; based on the model output result, use a predefined performance evaluation indicator to calculate the performance of the model on the initial test set to obtain performance evaluation data; S63, reading a test case generation network from adversarial test generator data; taking the performance evaluation data and the initial test set as input, feeding them into the test case generation network, and outputting a new test case; S64, inputting the new test case into the integer programming model with enhanced logic consistency to obtain a new model output result; based on the new model output result, using the performance evaluation index to calculate the performance of the model on the new test case to obtain new performance evaluation data; S65, based on the performance evaluation data and the new performance evaluation data, identify the test cases where the model performance has degraded most significantly, and form high-quality test data; repeat steps S63 to S65, continuously generate new adversarial test cases and update high-quality test data, until a preset number of iterations is reached or the model performance tends to be stable, and output the final high-quality test data; S66. Based on the final high-quality test data, the integer programming model with enhanced logical consistency is finally evaluated, the comprehensive performance indicators are calculated, and a comprehensive evaluation result is obtained.
[0072] In one embodiment of the present application, a logic consistency enhanced integer programming model is read from a logic enhancement model database. A balanced data set represented by multimodality is read from a data storage device. An adversarial test generator is initialized, including a test case generation network and a difficulty evaluation function, and these components are stored in an adversarial test generator database. A subset is randomly selected from the balanced data set represented by multimodality as an initial test set. This initial test set is input into the integer programming model to obtain the output result of the model. The performance of the model on the initial test set is calculated using a predefined performance evaluation indicator, and the performance data is stored in a performance evaluation data table.
[0073] Read the test case generation network from the adversarial test generator database. Feed the model performance data and the initial test set as input to the test case generation network. The generation network outputs a set of new test cases that are designed to expose potential weaknesses of the model. Store the newly generated test cases in the adversarial test case cache. Read the newly generated test cases from the adversarial test case cache. Input these test cases into the integer programming model to obtain the output results of the model. Calculate the performance of the model on the new test cases using the same performance evaluation metric and append the new performance data to the performance evaluation data table. Read the performance data of the model on the new and old test cases from the performance evaluation data table. Compare these performance data to identify the test cases where the model performance has degraded most significantly. Add these challenging test cases to a selected test set and store the selected test set in the high-quality test database. Repeat the above steps to continuously generate new adversarial test cases and update the selected test set until the preset number of iterations is reached or the model performance tends to stabilize. Finally, use the selected test set in the high-quality test database to perform a final evaluation on the integer programming model and calculate the comprehensive performance metric. Store the final evaluation results in the model evaluation result database.
[0074] According to one aspect of the present application, step S63 is further: S631. Read test case generation network parameters from the adversarial test generator database. Initialize a generator and discriminator network based on Wasserstein GAN with Gradient Penalty (WGAN-GP). Store the initialized network parameters in the GAN parameter database.
[0075] S632. Read the performance data of the model on the initial test set from the performance evaluation data table. Use this data to train the discriminator network so that it can distinguish between "easy" and "difficult" test cases. Update the trained discriminator parameters into the GAN parameter database.
[0076] S633. Load the generator and discriminator parameters from the GAN parameter database. Use the generator network to generate a batch of new test cases based on the cases in the initial test set. Pass the generated cases through the discriminator network and calculate the "difficulty score" of each generated case. Store the generated cases and their difficulty scores in the generated case data table.
[0077] S634. Read the generated use cases and their difficulty scores from the generated use case data table. Use the importance sampling method based on the difficulty score to select a portion of high-difficulty use cases. At the same time, use the genetic algorithm to further optimize these high-difficulty use cases to increase their diversity. Store the optimized use cases in the optimized use case data table.
[0078] S635. Read the optimized use cases from the optimized use case data table. Input these use cases into the integer programming model to obtain the output results of the model. Calculate the performance of the model on these new use cases, and append the performance data to the performance evaluation data table. At the same time, calculate the structural differences between these new use cases and the original use cases, and use the graph kernel method to quantify the degree of difference. Store the degree of difference data in the use case difference data table.
[0079] S636. Read the latest data from the performance evaluation data table and the use case difference data table. Use a multi-objective optimization algorithm, such as NSGA-III, to select the most representative and challenging subset of use cases while considering the difficulty, diversity, and structural novelty of the use cases. Add the selected subset of use cases to the high-quality test database.
[0080] S637. Based on the newly added high-quality test cases, the policy gradient method is used to update the parameters of the generator network to generate more challenging use cases. At the same time, the adversarial training method is used to update the discriminator network to improve its ability to identify difficult use cases. The updated GAN parameters are stored back in the GAN parameter database.
[0081] S638, repeat steps S633 to S637, continuously generate and optimize new adversarial test cases, until the preset number of iterations is reached or the quality of the generated cases is no longer significantly improved. Finally, the final selected test set is exported from the high-quality test database as the basis for comprehensive model evaluation.
[0082] This embodiment improves the robustness and generalization ability of the integer programming automatic modeling system by introducing a Wasserstein generative adversarial network (WGAN-GP) based on gradient penalty. Specifically, the use of the WGAN-GP framework enables the system to generate high-quality and diverse adversarial test cases that can effectively expose the potential weaknesses of the model. When dealing with industrial-level integer programming problems, such as large-scale production scheduling or complex logistics network optimization, it is possible to simulate various extreme and edge cases to ensure the performance of the model in various complex scenarios. The combination of the importance sampling method based on difficulty score and the genetic algorithm further improves the quality and diversity of the generated test cases. It is particularly suitable for testing the performance of the model when dealing with highly nonlinear constraints or multi-objective optimization problems, such as supply chain optimization problems considering multiple conflicting objectives. The application of the graph kernel method in quantifying the structural differences between the newly generated use cases and the original use cases ensures the novelty and representativeness of the test set and effectively avoids the risk of overfitting a specific type of problem. The application of the NSGA-III multi-objective optimization algorithm in selecting the most representative and challenging test cases enables the system to achieve the best balance between the difficulty, diversity and structural novelty of the use cases. This is crucial for comprehensively evaluating the performance of the model on various complex integer programming problems, especially when dealing with problems with multiple constraints and objectives, such as multi-factory collaborative production planning or cross-regional resource scheduling optimization. The application of the policy gradient method in updating the parameters of the generator network enables the system to continuously generate more challenging test cases. This self-evolution mechanism ensures the dynamic and continuous effectiveness of the testing process. The use of the adversarial training method in updating the discriminator network further improves the system's ability to identify and generate high-quality, high-difficulty test cases. This evolving testing mechanism is particularly suitable for evaluating the stability and adaptability of integer programming automatic modeling systems during long-term operation, especially in the face of changing business environments and optimization goals. This embodiment not only provides a comprehensive and rigorous model evaluation method through adversarial test case generation technology, but also provides a mechanism for continuous improvement of integer programming automatic modeling systems. It can simulate various complex and abnormal situations in the real world, ensuring that the generated integer programming model has a high degree of robustness and generalization ability, which is crucial for the reliable deployment and long-term stable operation of the system in an actual industrial environment.
[0083] According to one aspect of the present application, it also includes: S7. Obtain the model evaluation results and the integer programming model with enhanced logical consistency, and process them using the automatic report generation method to obtain the final model performance report and optimization suggestions. Specifically, it includes the following sub-steps: S71, read the final evaluation result from the model evaluation result database. Read the integer programming model with enhanced logic consistency from the logic enhanced model database. Initialize the report generation module, including the data analysis component and the natural language generation component, and store these components in the report generator database.
[0084] S72. Read the data analysis component from the report generator database. Use the component to conduct in-depth analysis of the evaluation results, including calculating the statistical data of various performance indicators, identifying the advantages and disadvantages of the model, analyzing the performance differences of the model on different types of problems, etc. Store the analysis results in the data analysis result cache.
[0085] S73, reading the analysis results from the data analysis result cache. Reading the natural language generation component from the report generator database. Using the natural language generation component, converting the data analysis results into an easy-to-understand text description. The generated text description includes a model performance overview, a detailed evaluation result explanation, and an analysis of the model's advantages and limitations. The generated text description is stored in the report text cache.
[0086] S74. Based on the text description and data analysis results, a series of specific optimization suggestions are generated using a natural language generation component. These suggestions may include model structure adjustment, training strategy improvement, data enhancement method, etc. The generated optimization suggestions are stored in an optimization suggestion cache.
[0087] S75. Read the generated text description from the report text cache, and read the optimization suggestions from the optimization suggestion cache. Integrate these contents into a complete model performance report. Use the predefined report template to organically combine the text description, data charts, and optimization suggestions to form a structured report document. Store the final generated report document in the final report database.
[0088] S76. Read the generated report document from the final report database. Perform final formatting and proofreading of the report to ensure the accuracy and readability of the content. Export the final revised report into a deliverable file format (such as PDF or HTML) and store it in the system's output folder as the final output result of the entire process.
[0089] In a further embodiment, the integer programming problem data set is specifically: production resource data: machine equipment list: including the ID, type, capacity, product type that can be produced, and equipment status (normal operation, maintenance, etc.) of each device; human resource list: including worker ID, skill level, operable equipment type, and work shift information; raw material list: including raw material type, current inventory, unit cost, supplier information, and minimum order quantity. Product information: product list: including product ID, name, and specifications; production formula: the type and quantity of raw materials required for each product; production process route: the production steps of each product, the type of equipment required for each step, and the processing time. Order data: order list: including order ID, customer information, ordered product type and quantity, delivery date, and priority; historical order data: used for demand forecasting and capacity planning. Time constraints: planning cycle: the optimized time range (such as one week, one month); work schedule: including normal working hours, overtime hours, and statutory holidays. Capacity constraints: equipment capacity: the maximum output of each device per unit time; human capacity: the production efficiency of each worker on different equipment; equipment switching time: the preparation time required to switch production between different products. Inventory constraints: raw material inventory capacity; finished product inventory capacity; safety stock level: minimum inventory requirements for raw materials and finished products. Quality control data: quality inspection requirements: quality inspection standards and required time for each product; pass rate data: pass rate statistics for each product in historical production. Cost data: production cost: including raw material cost, labor cost, energy cost, etc.; inventory holding cost: unit time inventory cost of raw materials and finished products; equipment operation cost: including normal operation cost and maintenance cost; delayed delivery cost: penalty cost for not completing orders on time. Energy consumption data: equipment energy consumption: energy consumption of each equipment under different operating conditions; energy price: energy price in different time periods (such as peak and valley difference of electricity price). Maintenance plan: preventive maintenance schedule: planned equipment maintenance time; equipment reliability data: mean time between failures (MTBF) of each equipment. Environmental constraints: emission limit: maximum allowable emission in the production process; waste treatment capacity: upper limit of waste treatment of the factory. Transportation and logistics data: transportation capacity: available transportation tools and load capacity; transportation cost: cost structure of different transportation modes; transportation time: expected transportation time to different customers. Supply chain information: Supplier list: including supplier information, supply cycle, minimum order quantity; Raw material delivery time: expected arrival time of different raw materials. Seasonal factors: Demand fluctuations: seasonal demand change pattern; Production efficiency changes: the impact of seasonal factors on production efficiency (such as hot weather). Emergency handling capabilities: Backup resources: additional equipment or human resources that can be called upon in an emergency; Emergency plans: response strategies for equipment failures, raw material shortages, etc.Historical production data: past production plans and actual execution; historical production efficiency and cost data. Business objectives and constraints: profit target: the minimum profit margin expected to be achieved; customer satisfaction indicators: such as on-time delivery rate, product quality, etc.; sustainable development goals: such as carbon emission reduction goals, energy efficiency improvement goals, etc.
[0090] This application can also be used in the following scenarios: supply chain network optimization; logistics distribution path planning; power system scheduling; medical resource allocation; financial portfolio optimization; employee scheduling management; airline flight scheduling; communication network design; urban transportation planning; agricultural planting planning. Generally, the following data needs to be input: decision variable related data: decision object list: such as products, routes, assets, personnel, etc.; decision object attributes: such as capacity, cost, efficiency, availability, etc.; decision scope: such as time range, geographical range, etc. Constraint related data: resource constraints: such as budget, production capacity, manpower, time, etc.; technical constraints: such as equipment compatibility, process requirements, etc.; regulatory restrictions: such as working hours, emission standards, etc.; physical constraints: such as storage capacity, transportation capacity, etc. Objective function related data: cost data: such as production cost, transportation cost, holding cost, etc.; income data: such as sales revenue, service fees, etc.; performance indicators: such as efficiency, quality, satisfaction, etc.; risk indicators: such as volatility, reliability, etc. Time dimension data: planning cycle: optimization time span; time granularity: the minimum time unit for decision; time series data: such as demand forecast, price changes, etc. Spatial dimension data: Geographic location information: such as facility location, customer distribution, etc.; distance matrix: distance or time between points; regional division: such as sales area, service scope, etc. Uncertainty data: Historical fluctuation data: such as demand changes, price fluctuations, etc.; risk assessment data: such as failure rate, delay probability, etc.; forecast data: such as market trends, technological development, etc. Correlation data: Relationships between factors: such as substitution or complementary relationships between products; system coupling: such as mutual influence between equipment; synergy: such as scale effect of mass production. Dynamic change data: Time-varying parameters: such as seasonal demand, dynamic prices, etc.; gradual changes: such as equipment aging, skill improvement, etc.; emergencies: such as equipment failure, emergency orders, etc. Multi-objective weight data: Target priority: the relative importance of different targets; trade-off coefficient: the compromise ratio between targets. Scenario-specific data: Supply chain: supplier information, inventory strategy, etc.; Logistics: vehicle information, delivery window, etc.; Electricity: power generation type, load curve, etc.; Medical: patient information, treatment plan, etc.; Finance: asset category, risk preference, etc.; Scheduling: employee skills, preferences, etc.; Aviation: aircraft type, airport capacity, etc.; Communications: network topology, traffic pattern, etc.; Transportation: road network structure, traffic data, etc.; Agriculture: crop characteristics, climate data, etc. Historical data and benchmark information: past decision results and their effects; industry standards or best practices data; competitor or market average data. System interface data: data exchange format with other systems; API specifications and data flow definitions. User preference and policy data: decision maker risk preference; corporate strategic orientation; special business rules or practices.
[0091] In another embodiment of the present application, an automatic modeling method for integer programming based on a large language model adopts a pipelined large language model optimization method (Pipelined Large Language Model Enhancement Method, PLUME), which has lightweight and pipeline characteristics. The PLUME algorithm divides the training into multiple stages, solves the stage problems of model training by adopting different methods in each stage, and achieves precise tuning by timely adjusting the training direction. The PLUME method designs the model training method into a pipeline framework. The pipeline training framework decomposes the training process and goals, each training stage corresponds to a training goal, and the next training stage is trained and optimized on the basis of the previous stage. The advantage of this is that problems in the training process can be discovered in time, the training direction can be adjusted in time, and repeated training and error accumulation can be avoided. For situations with few data resources, the purpose of efficient training can be achieved. The goal of modeling the integer linear programming problem is decomposed into a model that can output a text with a certain modeling format in the first stage and a model that can output a correct modeling numerical text based on the correct modeling format in the second stage.
[0092] The PLUME method selects adjustable parameters based on the LoRA idea. The deployment environment and research conditions of most users are limited and have the characteristics of low resources. Therefore, a suitable pre-trained large language model is selected, and fine-tuning for downstream tasks is completed under limited computing resources. In order to adapt to low-resource scenarios, the ChatGLM2-6B model can be selected as the pre-trained model, and a small number of adjustable parameters can be selected for fine-tuning using the efficient parameter fine-tuning method. According to empirical comparisons, based on the idea of the LoRA method, the dimension increase matrix A and the dimension reduction matrix B can be connected in parallel in the query_key_value layer, dense_h_to_4h layer, dense_4h_to_h layer, and dense layer of the pre-trained large language model. The AB parameter matrix is used as an adjustable parameter in the fine-tuning process. Specifically: The first stage is supervised coarse tuning based on the LoRA idea. The basic process is to input the query (i.e. "modeling format requirements + specific problem description") into the large model, and obtain the model output through forward propagation, which includes the probabilities of different tokens generated each time; obtain the token with the maximum generation probability each time as the output token through the softmax function, and record its corresponding logarithmic generation probability; calculate the cross entropy loss between the model output tokens and the answer tokens, and perform gradient back propagation to update the AB matrix parameters accordingly. In the first stage, 100 simple data pairs are used for training. Since the input query in each data pair contains the same modeling format prompt words, after a suitable number of training rounds, the model can generate answers containing the correct modeling format for the input of "modeling format prompt words + questions of different complexity".
[0093] The second stage is the one-step reinforcement precision tuning based on the graph similarity of the fused Gromov-Wasserstein distance as the reward. The test found that the optimal model trained in the first stage has the correct modeling format of the output text when facing more complex problems, but the specific values will be wrong. Therefore, the modeling values are precisely tuned in the second stage. First, the model trained in the first stage is used as the initialization policy network parameters. The response generated by the large language model through the greedy strategy is used as the empirical action1 of each round (epoch); the corresponding standard modeling answer is used as the empirical action2 of each epoch to achieve the effect of data enhancement. The logarithmic generation probability of each token is accumulated as the logarithmic generation probability of the entire answer (i.e., action1 or action2). The reward of the action is calculated based on the graph similarity. Since the model trained in the first stage can output text with the correct modeling format, the second stage only needs to ensure that the modeling data is correct.
[0094] Extract the constraint coefficients, constraint right-hand sides, and objective constraints according to the modeling format. Construct the corresponding graph G. Model the decision variables, objectives, number of constraints, and right-hand sides as graph nodes respectively, with the node features being "variables", "maximize", "minimize", ">=", "<=", or "rightvalue". Take the constraint coefficients as the edges between the decision variable nodes and the constraint nodes, the objective coefficients as the edges between the decision variable nodes and the objective nodes, and the constraint right-hand sides as the edges between the constraint nodes and the right-value nodes. Calculate the fused Gromov-Wasserstein distance, gw, between the generated graph corresponding to the generated text and the standard graph corresponding to the standard modeling answer. Fix the value range in [0, 1] as the similarity between the two graphs and use it as the reward. The transformation formula is: reward = 1 / (2*gw) when gw > 1; reward = 1 - gw / 2 when 0 < gw ≤ 1; the reward for the standard modeling text is 1.0.
[0095] The Fused Gromov-Wasserstein distance is a method for measuring the similarity between two graphs, combining the classical Gromov distance and Wasserstein distance. The distance matrices C1 and C2 required in the calculation refer to the shortest distance matrices between graph nodes; the feature matrices X1 and X2 refer to the sets of feature vectors of graph nodes, and the node features can be transformed into vectors through one-hot encoding. The calculation method of the FGW distance is as follows: FGW(C1, C2, X1, X2, λ) = min π (1 - λ) · ∑ i,j,k,l ∣C1[i, j] - C2[k, l]∣ 2 ·π ik ·π jl + λ∑ i,j d(X1[i], X2[k]) ·π ik ; where π is a matching matrix that describes the correspondence between samples of two data sets. π is a non-negative matrix of dimension n×m, and its element π ijRepresents the corresponding weight of the sample point i (1≤i≤n) of the dataset and the sample point j (1≤j≤m) of another dataset. The matching matrix π has an edge constraint, that is, the row sum and column sum of the matching matrix should satisfy the marginal distribution of the two datasets. The total row sum and the total column sum are both 1. λ is a balance parameter used to weigh the importance between geometric structure and features. By changing the value of π, the minimum calculated distance that can be obtained is the Fused Gromov-Wasserstein distance of the two graphs, gw. The larger the Fused Gromov-Wasserstein distance, the lower the similarity of the two graphs; the smaller the Fused Gromov-Wasserstein distance, the higher the similarity of the two graphs.
[0096] Compared with other graph similarity calculation methods, the Fused Gromov-Wasserstein distance more comprehensively measures the similarity between node features and graph structures. Traditional similarity calculations are generally based on distance metrics such as cosine similarity represented by node embeddings, which only considers the similarity in features but not the similarity in structures. Graph embedding representations with Random Walk as the main method can mine structural information, but they mainly rely on general graph training and cannot effectively mine the feature information of bipartite graphs for combinatorial optimization problems. The Fused Gromov-Wasserstein distance explicitly considers feature similarity and structural similarity as a common consideration; in addition, the Fused Gromov-Wasserstein distance is based on the optimal transmission theory and can establish the correspondence between the nodes of its two graphs to the greatest extent.
[0097] Compared with the method of comparing each token in the generated text with each token in the standard answer one by one, this embodiment uses graph similarity as a reward. The former focuses mainly on literal matching rather than semantic matching, and is prone to incorrect assessment of the correctness of the text due to token misalignment; the latter can avoid the above problem by extracting key tokens through rules for comparison. The modeling values extracted from the modeling text are converted into a graph representation, and the similarity of the two graph representations is calculated to measure the similarity between the model-generated modeling text and the standard modeling text. This is used as a reward for the model-generated modeling text, which can solve the evaluation error problem caused by inconsistent modeling order, thereby achieving the purpose of improving the accuracy of text evaluation.
[0098] Parameters are updated according to the parameter update formula of the reinforcement learning (REINFORCE) algorithm: θ_(t+1)=θ_t+αG_t ▽ln π(A_t |S_t). Among them, θ_(t+1) is the updated parameter, θ_t is the parameter at time step t, α is the learning rate, G_t is the reward at time step t, and ▽ln π(A_t |S_t) represents the gradient of the logarithmic probability of action A_t under a given state S_t.
[0099] It is worth noting that, compared with some methods that model language model fine-tuning as a multi-step reinforcement learning problem, this embodiment models model fine-tuning as a one-step reinforcement learning problem. The generation of each token is no longer regarded as a step, but the generation of the entire answer is regarded as a step. Therefore, after each initial state (i.e., model input) generates an action (i.e., model output), the round ends. Compared with the multi-step reinforcement learning (RL) algorithm, the similarity score between the entire generated answer and the standard answer is assigned to the last step, and the intermediate step only has the KL divergence score between the large model of the current stage and the initial large model. Multi-step may cause the problem that the parameters cannot be effectively updated in the intermediate process, resulting in training failure. The 1-step RL algorithm avoids this problem and directly uses the graph similarity between the total output and the standard answer as a reward, making the model training process more stable.
[0100] The PLUME algorithm is compared with the DG, P-tuning, and LoRA-SL algorithms. DG refers to the direct generation of a large language model (ChatGLM2-6B); the P-tuning algorithm refers to adding a certain number of learnable prefixes to the embedding layer of the pre-trained large language model for supervised training; the LoRA-SL algorithm refers to the supervised learning training of the large language model under the LoRA concept. The same training data was used for training and tested on a test set containing 35 groups of data. The PLUME method achieved the best modeling accuracy of 0.896 when the number of training rounds was 25, which exceeded the DG, P-tuning, and LoRA-SL algorithms.
[0101] The present invention realizes a highly intelligent and automated integer programming automatic modeling system, which improves the modeling efficiency, accuracy and adaptability of integer programming problems. First, dynamic complexity adaptive sampling and multimodal problem representation methods provide the system with high-quality and diverse training data, which lays a solid foundation for subsequent model training. It is particularly suitable for processing integer programming problems of various complexities, from simple linear programming to complex mixed integer nonlinear programming, which can be fully expressed and learned. Secondly, neural architecture search and differentiable architecture search realize automatic optimization of model structure, so that the system can adaptively select the most suitable network structure for different types of integer programming problems. The flexibility and performance upper limit of the model are improved, so that it can effectively handle small-scale optimization to large-scale industrial-level optimization problems. Dynamic sparse training and adaptive difficulty course learning improve the training efficiency and generalization ability of the model, so that the system can quickly adapt to and efficiently solve integer programming problems of various complexities. This is particularly important for dynamic business environments that require frequent adjustment and optimization. Hierarchical reinforcement learning and multi-objective Pareto frontier exploration further enhance the modeling ability and optimization effect of the system, so that it can handle advanced integer programming problems with complex constraints and multiple conflicting goals. This performs well in dealing with practical industrial problems such as supply chain optimization and resource scheduling. Dynamic neural symbolic reasoning ensures the logical consistency and reliability of the generated model, which is crucial for applying integer programming models in key decision-making systems. Finally, adversarial test case generation based on WGAN-GP improves the robustness and long-term stability of the system and ensures the reliability of the model under various extreme and abnormal situations. The present invention creates a comprehensive, efficient and reliable integer programming automatic modeling system by combining machine learning technology with algorithms specifically targeting the characteristics of integer programming problems. It not only improves modeling efficiency and reduces manual intervention, but also improves model quality and scope of application. It can cope with various levels of integer programming problems, from simple resource allocation to complex multi-objective optimization, and provides powerful tools for industrial optimization, operations research, decision support systems and other fields. By automating the entire modeling process, from data preparation to model generation to performance verification, the present invention lowers the threshold for integer programming modeling, allowing even non-professionals to quickly and accurately build high-quality integer programming models. This not only accelerates the application of integer programming technology in all walks of life, but also opens up new possibilities for solving larger-scale and more complex practical optimization problems.
[0102] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. An automatic modeling method for integer programming based on a large language model, characterized in that: The steps include: S1. Obtain an integer programming problem dataset, process it using data enhancement and dynamic complexity balancing methods, and obtain a balanced dataset with multimodal representation; S2, based on the balanced data set represented by multimodal representation, the model architecture search and combinatorial optimization methods are used to process and obtain the optimized neural network model structure; S3, based on the optimized neural network model structure and the balanced data set represented by multimodal representation, dynamic sparse training and adaptive difficulty curriculum learning methods are used to obtain the model trained in the first stage; S4, based on the model trained in the first stage and the balanced data set represented by multimodal representation, hierarchical reinforcement learning and multi-objective Pareto frontier exploration method are used to obtain the final model trained in the second stage; S5. Based on the final model trained in the second stage and the balanced data set represented by multimodal representation, the dynamic neural symbolic reasoning method is used to process and obtain the integer programming model with enhanced logical consistency; S6. Based on the integer programming model with enhanced logical consistency and balanced data sets with multimodal representation, an adaptive adversarial test generation method is used to obtain comprehensive evaluation results.
2. The method for automatic integer programming modeling based on a large language model according to claim 1, characterized in that: Step S1 is further as follows: S11, receiving an integer programming problem data set input by a user, and using a pre-set rule template to generate a new integer programming problem; merging the new integer programming problem with the integer programming problem data set to form an expanded data set; S12, using a preset complexity evaluation function to perform a complexity score on each integer programming problem in the expanded data set to obtain a score result; Based on the scoring results, calculate the complexity distribution of the data set; compare the complexity distribution with the preset target distribution to obtain the complexity difference value; Based on the complexity difference value, the parameters of the data generator are dynamically adjusted to obtain an enhanced data set with balanced complexity; S13, based on the enhanced dataset of complexity balance, each integer programming problem is converted into a text representation, and the text representation is converted into a graph structure representation; Convert each integer programming problem into a symbolic representation; Each integer programming problem is converted into a matrix representation; the data in textual representation, graph structure representation, symbolic representation and matrix representation are merged to form a balanced dataset with multimodal representation.
3. The method for automatic integer programming modeling based on a large language model according to claim 2, characterized in that: Step S2 is further as follows: S21. Based on the balanced data set represented by multimodal representation, construct an initial neural network model architecture; based on the initial neural network model architecture, construct a model performance evaluation function; S22. Based on the initial neural network model architecture and the pre-stored search space information, a Bayesian optimization algorithm is used to generate a candidate model architecture in the search space; for each candidate model architecture, a corresponding neural network model is constructed; a balanced data set represented by multimodal is input into the neural network model for training and verification to obtain verified model performance data; based on the verified model performance data, a model performance evaluation function is used to calculate the performance score of each candidate model; S23. Based on the performance scores of all candidate models, a multi-objective optimization algorithm is used to calculate the Pareto optimal solution set and obtain a balanced model architecture; Based on the balanced model architecture, the model architecture with the best overall performance is selected as the final optimized neural network model structure.
4. The method for automatic integer programming modeling based on a large language model according to claim 3, characterized in that: Step S3 is further as follows: S31. Based on preset difficulty evaluator parameters, select a sample subset of the current difficulty level from the balanced data set represented by the multimodal representation; score the sample subset using the difficulty evaluation function to obtain a scoring result; Based on the scoring results, the sample subsets are sorted from low to high difficulty to form the data sequence of the current training batch and obtain the training batch data; S32, read the training samples of the current difficulty level from the training batch data, input the training samples into the optimized neural network model structure, perform forward propagation calculation, and obtain the output result of the model; calculate the loss value between the output result of the model and the true label to obtain a loss record array; based on the loss record array, execute the back propagation algorithm to calculate the gradient of the model parameters; S33, based on the absolute value of the gradient of the model parameters and the preset sparsity threshold, determine the parameter subset that needs to be updated; apply gradient descent update to the parameter subset to obtain updated model parameters; based on the updated model parameters and the loss record array, dynamically adjust the sparsity threshold to obtain a new sparsity threshold; S34, based on the difficulty evaluator parameters, read the current difficulty level and difficulty adjustment step size; read the average loss value of the most recent N trainings from the loss record array; if the average loss value is lower than a preset low threshold, increase the difficulty level; If it is higher than the preset high threshold, the difficulty level is reduced, and the updated difficulty level is output to obtain difficulty control data; based on the difficulty control data, the samples of the next training batch are selected from the balanced data set represented by the multimodal representation; based on the samples of the next training batch and the new sparsity threshold, steps S31 to S34 are repeatedly performed until the preset number of training rounds is reached or the model performance converges, and the final training model parameters are obtained; wherein N is a preset constant; S35, obtaining a validation subset from the balanced data set represented by the multimodal representation, performing performance evaluation on the model based on the validation subset and the final training model parameters, calculating the accuracy and F1 score of the model on the validation set, and forming model performance data; Based on the final training model parameters and model performance data, the model trained in the first stage is output.
5. The method for automatic integer programming modeling based on a large language model according to claim 4, characterized in that: Step S4 is further as follows: S41. Based on the model trained in the first stage and the balanced data set represented by multimodal representation, the hierarchical reinforcement learning architecture and multi-objective optimization parameters are initialized to obtain reinforcement learning model data and multi-objective optimization control data; The hierarchical reinforcement learning architecture includes a variable definition strategy network, a constraint generation strategy network, an objective function construction strategy network, and a meta-controller network; the multi-objective optimization parameters include accuracy, efficiency, and interpretability; S42, reading a meta-controller network from the reinforcement learning model data; randomly selecting an integer programming problem from the balanced data set represented by the multimodal representation as the current environment state, inputting it into the meta-controller network, outputting an action sequence, and obtaining a task sequence cache; Read subtasks from the task sequence cache in sequence and load the corresponding subtask policy network from the reinforcement learning model data; The subtasks include variable definition subtask, constraint generation subtask and objective function construction subtask; S43, for the variable definition subtask, read the relevant information of the current integer programming problem from the balanced data set represented by the multimodal representation, input the relevant information into the variable definition strategy network, and obtain the variable definition result; for the constraint generation subtask, input the variable definition result and the relevant information into the constraint generation strategy network, and obtain the constraint generation result; For the objective function construction subtask, the variable definition results, constraint generation results and related information are input into the objective function construction strategy network to obtain the objective function construction result; S44, combining the variable definition results, constraint generation results and objective function construction results to form a planning model; Using the model performance evaluation function in step S21, the accuracy score of the planning model is calculated; at the same time, the calculation time of the planning model generation process is recorded to obtain the efficiency score; Calculate the interpretability score of the planning model using a predefined interpretability evaluation function; Based on the accuracy score, efficiency score and interpretability score, multi-objective scoring data is formed; S45, calculating a weighted total score based on the multi-objective optimization parameters and the multi-objective scoring data; The weighted total score is used as a reward signal for reinforcement learning; based on the reward signal, the parameters of the reinforcement learning model data are updated, and steps S42 to S45 are repeatedly executed until a preset number of training rounds is reached; S46. After completing the preset number of training rounds, read all historical scoring records from the multi-objective scoring data; based on the historical scoring records, use the NSGA-II algorithm to calculate the Pareto optimal solution set of accuracy, efficiency and interpretability to form a Pareto solution set database; select a balanced solution from the Pareto solution set database as the final model parameter configuration to obtain the final model after the second stage of training.
6. The method for automatic integer programming modeling based on a large language model according to claim 5, characterized in that: Step S5 is further as follows: S51, based on the final model trained in the second stage and the balanced data set represented by multimodal representation, initialize the symbolic reasoning system, including the predefined integer programming problem logic rule set and the reasoning engine, and obtain the symbolic reasoning data; S52, reading integer programming problem samples from the balanced data set represented by multimodal representation; inputting the integer programming problem samples into the final model trained in the second stage to generate an initial integer programming model; S53, based on the symbolic reasoning data, performing a logic consistency check on the initial integer programming model, identifying potential logic conflicts or inconsistencies, and obtaining a consistency check result; S54, generating correction suggestions based on the consistency check results; Combining the correction suggestions with the integer programming problem sample to form a new input; Re-input the new input into the final model trained in the second stage to generate a revised integer programming model; S55, repeatedly executing step S53 and step S54 until the modified integer programming model passes the logic consistency check or reaches a preset maximum number of iterations, and outputting an integer programming model with enhanced logic consistency.
7. The method for automatic integer programming modeling based on a large language model according to claim 6, characterized in that: Step S6 is further as follows: S61. Initialize an adversarial test generator based on a logical consistency enhanced integer programming model and a balanced data set represented by multimodal representation, and obtain adversarial test generator data; S62. Randomly select a subset from the balanced dataset represented by multimodal representation as the initial test set; Input the initial test set into the integer programming model with enhanced logic consistency to obtain the model output result; based on the model output result, use the predefined performance evaluation index to calculate the performance of the model on the initial test set to obtain the performance evaluation data; S63, reading a test case generation network from adversarial test generator data; The performance evaluation data and the initial test set are fed into the test case generation network as input, and a new test case is output; S64, inputting the new test case into the integer programming model with enhanced logic consistency to obtain a new model output result; Based on the output results of the new model, the performance of the model on the new test case is calculated using the performance evaluation index to obtain new performance evaluation data; S65. Based on the performance evaluation data and the new performance evaluation data, identify the test cases where the model performance has degraded most significantly, and generate high-quality test data; Repeat steps S63 to S65 to continuously generate new adversarial test cases and update high-quality test data until a preset number of iterations is reached or the model performance tends to be stable, and output the final high-quality test data; S66. Based on the final high-quality test data, the integer programming model with enhanced logical consistency is finally evaluated, the comprehensive performance indicators are calculated, and a comprehensive evaluation result is obtained.
8. The method for automatic integer programming modeling based on a large language model according to claim 7, characterized in that: Step S12 is further as follows: S121, inputting each integer programming problem in the expanded data set into a preconfigured complexity evaluation network to obtain a multidimensional complexity vector of each problem; S122. Based on the multidimensional complexity vectors of all problems, using the kernel density estimation method, calculate the distribution of the current data set in the multidimensional complexity space to obtain the current distribution; S123, using Wasserstein distance to calculate the difference between the current distribution and the preset target distribution, to obtain distribution difference data; Based on the distribution difference data, a new integer programming problem is generated using an adaptive importance sampling algorithm; the new integer programming problem is added to the augmented data set; S124. Repeat steps S121 to S123 until the distribution difference data is less than a preset threshold or the maximum number of iterations is reached, and output an enhanced data set with balanced complexity.
9. The method for automatic integer programming modeling based on a large language model according to claim 7, characterized in that: In step S22, based on the initial neural network model architecture and the pre-stored search space information, a Bayesian optimization algorithm is used to generate a candidate model architecture in the search space: S221, based on the initial neural network model architecture and pre-stored search space information, using a recurrent neural network structure of a reinforcement learning strategy, initializing a neural architecture search controller to obtain controller parameters; S222, based on the controller parameters, generating actions, including the number of layers of the candidate neural network structure, the operation type and connection method of each layer, and obtaining candidate architecture description data; S223. Based on the candidate architecture description data, a differentiable architecture search method is used to transform the discrete architecture selection into a continuous optimization problem; Based on the optimization problem, a hypernetwork is constructed; S224, reading a training data subset from a data storage device, performing forward propagation and backward propagation on the hypernetwork, and updating architecture parameters and model weights at the same time to obtain updated hypernetwork parameters; S225, repeating step S224 until a preset round is reached, and outputting the final hypernetwork parameters; Based on the final hypernetwork parameters, select candidate model architectures; S226. Use knowledge distillation technology to transfer the knowledge in the hypernetwork to the candidate model architecture to obtain the final candidate model architecture.
Citation Information
Patent Citations
Workshop scheduling method based on reinforcement learning of digital twinning and knowledge graph
CN117669984A
Artificial intelligence-driven two-stage stochastic programming problem solving method and system
CN118551940A
Smart city traffic planning method and system based on big data
CN118917025A
Virtual power plant power generation plan making and economic dispatching method based on deep reinforcement learning
CN119009968A
Machine learning model optimization explainability
US20240403658A1
Cited By
Intelligent task planning method based on large model and operation planning optimization
CN120542886A
Cross-modal knowledge distillation method and system based on dynamic structure perception
CN120598016A
Green power battery cell supply chain network design method in uncertain environment
CN120598203A
Automobile retired power battery disassembly sequence optimization method and related device
CN120724867A
A method and related device for optimizing disassembly sequence of retired power battery of an automobile
CN120724867B