Automatic modeling method for integer programming based on large language model
Through an integer programming automatic modeling method based on a large language model, data augmentation and dynamic complexity balancing are used to generate multimodal datasets. Combined with model architecture search and reinforcement learning, the flexibility and efficiency issues of integer programming automatic modeling in existing technologies are solved, and efficient and logically consistent integer programming model generation is achieved.
Patent Information
- Application Number
- CN202411817102.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Existing integer programming automatic modeling methods rely on manually defined rules, lack flexibility and generalization, require a lot of computing resources, have low data quality, high model complexity, are difficult to apply in resource-limited environments, and lack logical consistency when dealing with complex constraints.
An integer programming automatic modeling method based on a large language model is adopted to generate a balanced dataset with multimodal representation through data augmentation and dynamic complexity balancing. Combined with model architecture search, dynamic sparsification training, hierarchical reinforcement learning and multi-objective Pareto frontier exploration, adaptive adversarial testing is used to generate an integer programming model with enhanced logical consistency.
It improves the training efficiency and generalization ability of the model, enhances the system's modeling ability and optimization effect, ensures the logical consistency and reliability of the generated model, and improves the modeling efficiency, accuracy and adaptability of integer programming problems.
Smart Images

Figure CN119721249B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence, and in particular to an automatic integer programming modeling method based on a large language model. Background Art
[0002] Integer Programming (IP) is a mathematical optimization method widely used in logistics, finance, production planning and other fields. Currently, researchers have proposed a variety of automatic modeling methods for integer programming. Rule-based automatic modeling systems collect knowledge and rules, convert them into a computer-understandable form, and ultimately generate the target modeling form. However, manually defined rules may be difficult to cover all scenarios and lack flexibility and generalization. Automatic modeling methods based on machine learning learn the constraint coefficients and objective function coefficients of the planning problem from data, and then integrate them into a 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 datasets, 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 datasets is low, which may lead to poor model effects; large language models are highly 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 for integer programming based on a large language model, which includes the following steps:
[0006] S1. Obtain an integer programming problem dataset, process it using data augmentation and dynamic complexity balancing methods, and obtain a balanced dataset with multimodal representation;
[0007] S2, based on the balanced data set represented by multimodal representation, the model architecture search and combinatorial optimization methods are used to process it and obtain the optimized neural network model structure;
[0008] S3, based on the optimized neural network model structure and the balanced data set of multimodal representation, dynamic sparse training and adaptive difficulty curriculum learning method are used to obtain the model after the first stage training;
[0009] S4. Based on the model trained in the first stage and the balanced dataset with multimodal representation, hierarchical reinforcement learning and multi-objective Pareto frontier exploration method are used to obtain the final model trained in the second stage;
[0010] S5. Based on the final model trained in the second stage and the balanced dataset with multimodal representation, a dynamic neural symbolic reasoning method is used to process it and obtain an integer programming model with enhanced logical consistency;
[0011] S6. Based on the integer programming model with enhanced logical consistency and the balanced dataset with multimodal representation, an adaptive adversarial test generation method is used to obtain comprehensive evaluation results.
[0012] 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
[0013] Figure 1 Flowchart of the present invention.
[0014] Figure 2 This is a flow chart of step S1 of the present invention.
[0015] Figure 3 This is a flow chart of step S2 of the present invention.
[0016] Figure 4 This is a flow chart of step S3 of the present invention.
[0017] Figure 5 This is a flow chart of step S4 of the present invention.
[0018] Figure 6 This is a flow chart of step S5 of the present invention.
[0019] Figure 7 This is a flow chart of step S6 of the present invention. DETAILED DESCRIPTION
[0020] The following describes the present application in more detail with reference to specific embodiments. Figure 1 As shown, this application proposes an automatic modeling method for integer programming based on a large language model, comprising the following steps:
[0021] S1. Obtain an integer programming problem dataset, process it using data augmentation and dynamic complexity balancing methods, and obtain a balanced dataset with multimodal representation;
[0022] S2, based on the balanced data set represented by multimodal representation, the model architecture search and combinatorial optimization methods are used to process it and obtain the optimized neural network model structure;
[0023] S3, based on the optimized neural network model structure and the balanced data set of multimodal representation, dynamic sparse training and adaptive difficulty curriculum learning method are used to obtain the model after the first stage training;
[0024] S4. Based on the model trained in the first stage and the balanced dataset with multimodal representation, hierarchical reinforcement learning and multi-objective Pareto frontier exploration method are used to obtain the final model trained in the second stage;
[0025] S5. Based on the final model trained in the second stage and the balanced dataset with multimodal representation, a dynamic neural symbolic reasoning method is used to process it and obtain an integer programming model with enhanced logical consistency;
[0026] S6. Based on the integer programming model with enhanced logical consistency and the balanced dataset with multimodal representation, an adaptive adversarial test generation method is used to obtain comprehensive evaluation results.
[0027] like Figure 2 As shown, according to one aspect of the present application, step S1 is further:
[0028] S11, receiving an integer programming problem dataset 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 dataset to form an expanded dataset;
[0029] S12. Using a preset complexity evaluation function to perform a complexity score on each integer programming problem in the expanded data set, obtaining a score result; based on the score result, calculating the complexity distribution of the data set; comparing the complexity distribution with a preset target distribution to obtain a complexity difference value; based on the complexity difference value, dynamically adjusting the parameters of the data generator to obtain an enhanced data set with balanced complexity;
[0030] S13. Based on the enhanced dataset with balanced complexity, 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.
[0031] In one embodiment of the present application, an initial integer programming problem dataset input by a user is received and stored in a preset data memory. The initial integer programming problem dataset is read from the data memory, and a new integer programming problem having a similar structure to the initial dataset but different numerical values is generated using a pre-defined rule template. The newly generated integer programming problem is merged with the initial dataset to form an expanded dataset, which is then stored in the data memory.
[0032] The augmented dataset is read from the data storage and a complexity score is assigned to each integer programming problem in the augmented dataset using a pre-set complexity evaluation function. Based on the scoring results, the complexity distribution of the dataset is calculated. A target complexity distribution is set, and the current complexity distribution is compared with the target distribution to obtain a complexity difference value. Based on this complexity difference value, the parameters of the data generator are dynamically adjusted. The data generation process is repeated until the complexity difference value falls below a pre-set threshold, resulting in an augmented dataset with balanced complexity.
[0033] A complexity-balanced augmented dataset is read from a data store. For each integer programming problem, it is first converted into a textual representation and stored in a preset textual data matrix. The textual representation is then converted into a graph-structured representation, where the decision variables, objective function, and constraints are represented as nodes of the graph, and the relationships between them are represented as edges. The resulting graph-structured data is stored in a preset graph data storage structure. Next, the integer programming problem is converted into a symbolic representation, where the variables, constraints, and objective function are represented using a predefined mathematical symbol system. The symbolic representation data is stored in a preset symbolic data array. Finally, the integer programming problem is converted into a matrix representation, where the constraint coefficients form a constraint matrix and the objective function coefficients form a target vector. The matrix representation data is stored in a preset matrix data structure. The data in the four representations, textual, graphical, symbolic, and matrix, are merged to form a balanced dataset with a multimodal representation, which is stored in the data store.
[0034] According to one aspect of the present application, step S12 is further as follows:
[0035] S121. Input each integer programming problem in the expanded data set into a preconfigured complexity evaluation network to obtain a multidimensional complexity vector for each problem;
[0036] S122. Based on the multidimensional complexity vectors of all problems, use the kernel density estimation method to calculate the distribution of the current data set in the multidimensional complexity space to obtain the current distribution;
[0037] S123. Calculate the difference between the current distribution and the preset target distribution using the Wasserstein distance to obtain distribution difference data; generate a new integer programming problem based on the distribution difference data using an adaptive importance sampling algorithm; and add the new integer programming problem to the expanded data set.
[0038] S124 , repeating steps S121 to S123 until the distribution difference data is less than a preset threshold or the maximum number of iterations is reached, and outputting an enhanced data set with balanced complexity.
[0039] This embodiment improves the quality and diversity of integer programming problem datasets by introducing a dynamic complexity adaptive sampling algorithm and a multimodal problem representation method. 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 achieve a balanced distribution in the complexity space through kernel density estimation. This not only ensures extensive coverage of the training data across problem complexities, but also dynamically adjusts the sampling strategy, effectively avoiding the data bias that can be caused by traditional random sampling. The multimodal problem representation method enriches the problem representation by introducing four representation formats: text, graph, symbol, and matrix. This multimodal representation enables the model to understand the structure and semantics of integer programming problems from different perspectives, improving the accuracy and robustness of subsequent modeling processes. Especially when dealing with complex industrial-level integer programming problems, such as supply chain optimization or large-scale resource scheduling, the multimodal representation can more comprehensively capture all aspects of the problem, including the relationships between variables, the logical structure of constraints, and the mathematical properties of the objective function. Furthermore, by using the Wasserstein distance to measure the difference between the generated data distribution and the target distribution, combined with an 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 for integer programming problems more intelligent and automated, improving the starting point of the entire automatic modeling system and laying the foundation for high performance in subsequent steps.
[0040] like Figure 3 As shown, according to one aspect of the present application, step S2 is further:
[0041] S21. Based on the balanced dataset 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;
[0042] S22. Based on the initial neural network model architecture and pre-stored search space information, using a Bayesian optimization algorithm, generate candidate model architectures within the search space; for each candidate model architecture, construct a corresponding neural network model; input a balanced dataset represented by multimodal data into the neural network model, perform training and verification, and obtain verified model performance data; based on the verified model performance data, use a model performance evaluation function to calculate a performance score for each candidate model;
[0043] S23. Based on the performance scores of all candidate models, use a multi-objective optimization algorithm to calculate the Pareto optimal solution set and obtain a balanced model architecture; based on the balanced model architecture, select the model architecture with the best overall performance as the final optimized neural network model structure.
[0044] In one embodiment of the present application, a balanced dataset 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 per layer, and the type of activation function, and the search space information is stored in a parameter search data structure.
[0045] Read the current model architecture information from the model architecture database and obtain the search space information from the parameter search data structure. Use optimization algorithms such as Bayesian to generate candidate model architectures within the defined search space. For each candidate architecture, construct a corresponding neural network model. Read a subset of the balanced dataset with multimodal representation from the data storage and input it into the candidate model for training and validation. Use the performance evaluation function to calculate the performance score of each candidate model. Store the candidate model architecture information and corresponding performance score in the performance evaluation data table.
[0046] 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 model accuracy, computational efficiency, and complexity. Calculate the Pareto-optimal solution set and obtain a series of model architectures that balance different objectives. Store the model architectures 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.
[0047] Based on the final optimized neural network model structure, a complete neural network model is constructed. A balanced dataset with multimodal representation is read from the data storage and divided into a training set, a validation set, and a test set. The constructed neural network model is initially trained using the training set to obtain the model's initial parameters. 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 resulting optimized neural network model, including its structural information and parameter values, is stored in the model storage.
[0048] This embodiment introduces the Neural Architecture Search (NAS) and Differentiable Architecture Search (DARTS) methods to automatically optimize the architecture of an integer programming automatic modeling system, improving model performance and adaptability. Specifically, the NAS controller, based on a recurrent neural network structure with a reinforcement learning strategy, intelligently explores the vast architecture space and automatically discovers the network architecture that best suits the characteristics of the integer programming problem. This overcomes the limitations of traditional manual architecture design, demonstrating superior modeling capabilities, particularly when dealing with integer programming problems with complex constraints and nonlinear objective functions. The introduction of the DARTS method transforms the discrete architecture selection into a continuous optimization problem, enabling efficient search of the architecture space by constructing a hypernetwork encompassing all possible operations. This not only accelerates the architecture search but also simultaneously optimizes both architecture parameters and model weights during the search process, thereby finding a more optimal local optimum. Furthermore, the application of knowledge distillation effectively transfers knowledge from the hypernetwork to the final fixed-structure network, further improving model performance. This combined strategy is particularly well-suited to 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 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 based on the specific problem, it can better capture the inherent structure and characteristics of integer programming problems, thereby maintaining high performance on problems of different scales and complexities. Through automated architecture search and optimization, this embodiment improves the adaptability and performance ceiling of the integer programming automatic modeling system, laying a solid structural foundation for subsequent model training and application.
[0049] 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:
[0050] 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, initialize a neural architecture search controller to obtain controller parameters;
[0051] S222. Generate actions based on the controller parameters, including the number of layers of the candidate neural network structure, the operation type and connection method of each layer, and obtain candidate architecture description data;
[0052] S223. Based on the candidate architecture description data, use a differentiable architecture search method to transform the discrete architecture selection into a continuous optimization problem; based on the optimization problem, construct a hypernetwork;
[0053] S224, reading a training data subset from a data storage device, performing forward propagation and backward propagation on the hypernetwork, and simultaneously updating architecture parameters and model weights to obtain updated hypernetwork parameters;
[0054] S225. Repeat step S224 until a preset number of rounds is reached, outputting final hypernetwork parameters; and selecting a candidate model architecture based on the final hypernetwork parameters.
[0055] S226. Use knowledge distillation technology to transfer the knowledge in the hypernetwork to the candidate model architecture to obtain the final candidate model architecture.
[0056] 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.
[0057] A subset of the balanced dataset with multimodal representations is read from the data store. For each candidate architecture, the corresponding subnetwork is extracted from the hypernetwork. The data subset is fed into each subnetwork for forward propagation. The loss function value for each subnetwork is calculated and stored in a temporary model performance table. Based on the calculated loss function value, the architecture parameters and model weights are simultaneously updated using gradient descent. A second-order optimization method (such as Newton's method) is used for the architecture parameters to accelerate convergence. The updated parameters are stored back in the hypernetwork parameter database. The above steps are repeated, and the final network architecture is selected based on the values of the architecture parameters. Simultaneously, a performance evaluation function is used to calculate the overall performance score of the selected architecture. The selected architecture information and performance score are stored in the performance evaluation data table. The performance score is read from the performance evaluation data table. A multi-armed bandit algorithm is used to dynamically adjust the exploration strategy of the NAS controller based on the performance score. The updated controller parameters are stored back in the NAS controller parameter database. This process is repeated until the preset number of search rounds is reached or performance convergence is achieved. The model architecture with the best overall performance is selected from the performance evaluation data table. Knowledge distillation techniques are used to transfer knowledge from the hypernetwork to the fixed-architecture network. The final model architecture information and parameters are stored in the final model parameter database.
[0058] like Figure 4 As shown, according to one aspect of the present application, step S3 is further:
[0059] 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 result, sort the sample subset from low to high difficulty to form a data sequence of the current training batch, thereby obtaining training batch data;
[0060] 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 calculations, and obtain the output results of the model; calculate the loss value between the output results of the model and the true label to obtain a loss record array; based on the loss record array, execute the backpropagation algorithm to calculate the gradient of the model parameters;
[0061] S33. Determine a parameter subset that needs to be updated based on the absolute value of the gradient of the model parameters and a preset sparsity threshold; apply gradient descent update to the parameter subset to obtain updated model parameters; and dynamically adjust the sparsity threshold based on the updated model parameters and the loss record array to obtain a new sparsity threshold.
[0062] 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 training times 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, decrease 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 the balanced data set represented by the 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; where N is a preset constant;
[0063] S35. Obtain a validation subset from the balanced dataset of multimodal representation, evaluate the model performance 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.
[0064] 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 dataset with a multimodal representation is obtained from a data memory. Dynamic sparsification parameters, including an initial sparsity threshold and a sparsity adjustment step size, are initialized and stored in a sparsification control data structure. A difficulty estimator is initialized, with an initial difficulty level and a difficulty adjustment step size set, and these parameters are stored in a difficulty control data structure.
[0065] Based on the initialized difficulty evaluator parameters, a subset of samples with the current difficulty level is selected from the balanced dataset of the multimodal representation. The selected sample subset is scored using the difficulty evaluation function, and the scoring results are stored in the difficulty score data table. Based on the difficulty score, the sample subset is sorted from low to high difficulty to form the data sequence of the current training batch, which is stored in the training batch data cache.
[0066] Read training samples for the current difficulty level from the training batch data cache. Feed these samples into the read neural network model and perform forward propagation to obtain the model output. Calculate the loss between the model output and the true labels, storing the loss in the loss record array. Based on the calculated loss, perform the backpropagation algorithm to calculate the gradient of the model parameters and store the gradient in the gradient cache.
[0067] 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 subset of parameters that need to be updated based on the absolute value of its gradient and the current sparsity threshold. Apply gradient descent only to the selected parameter subset, leaving all other parameters unchanged. Store the updated model parameters back into the model memory. Dynamically adjust the sparsity threshold based on the change in the loss value of this training session, and update the new threshold to the sparsification control data structure.
[0068] Read the current difficulty level and difficulty adjustment step size from the difficulty control data structure. Read the average loss value of the last N training runs (N is a preset constant) from the loss record array. If the average loss value is below a preset threshold, increase the difficulty level; if it is above another preset threshold, decrease the difficulty level. Store the updated difficulty level back into the difficulty control data structure. Based on the new difficulty level, select the next training batch of samples from the balanced multimodal dataset 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 final trained model parameters from the model memory. Evaluate the model performance using the validation subset of the balanced multimodal dataset. Calculate model metrics such as accuracy and F1 score on the validation set and store these performance metrics in the model performance data table. Save the model trained in the first phase, including its structural information, parameter values, and performance metrics, in the model memory for use in subsequent reinforcement learning phases.
[0069] According to one aspect of the present application, step S33 is further as follows:
[0070] S331. Read the current sparsity threshold from the sparsification control data structure. Initialize a dynamic threshold adjustment network, which receives the performance metrics and sparsity distribution of the current model as input and outputs the sparsity threshold adjustment for each layer. Store the network parameters in a threshold adjustment network parameter database.
[0071] S332. Read the gradient value from the gradient cache. Use the Momentum-based Sparse Adam optimizer, combining the gradient value and historical momentum information, to calculate the update direction and magnitude of each parameter. Store the calculation results in the parameter update data table.
[0072] S333. Read update information from the parameter update data table. For each network layer, use a Top-k sparsification 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 sparsified update information in the sparse update data table.
[0073] S334: Read the updated information after sparseness from the sparse update data table and apply it to the current model parameters. Calculate the performance indicators of the updated model and the sparsity distribution of each layer, and store the results in the model state data table.
[0074] S335. Read the performance indicators and sparsity distribution from the model state data table and load parameters from the threshold adjustment network parameter database. Input these data into the dynamic threshold adjustment network to obtain the sparsity threshold adjustment for each layer. Update the adjusted threshold into the sparsification control data structure.
[0075] S336: Repeat steps S332 to S335 until a preset number of training rounds is reached or the performance converges. Finally, the trained sparse model parameters and the final sparsity distribution are stored in a sparse model database.
[0076] 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 curriculum learning strategy. Specifically, the dynamic sparsification training algorithm achieves intelligent control of model parameter sparsity through a dynamic threshold adjustment network. This not only reduces the number of model parameters and computational complexity, but also adaptively allocates appropriate parameter resources to integer programming problem characteristics at 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 model overfitting and improve generalization capabilities. The use of the Momentum-based SparseAdam optimizer further improves the efficiency and stability of parameter updates, making it particularly suitable for handling sparse gradients, a common problem in integer programming. The adaptive difficulty curriculum learning strategy achieves 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 with simple linear programming problems and gradually transition to mixed integer programming problems with complex constraints and nonlinear objective functions, enabling the model to gradually master modeling techniques 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 computational 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.
[0077] like Figure 5 As shown, according to one aspect of the present application, step S4 is further:
[0078] S41. Based on the model trained in the first phase and the balanced dataset represented by multimodal data, initialize the hierarchical reinforcement learning architecture and multi-objective optimization parameters to obtain reinforcement learning model data and multi-objective optimization control data; the hierarchical reinforcement learning architecture includes a variable definition policy network, a constraint generation policy network, an objective function construction policy network, and a meta-controller network; the multi-objective optimization parameters include accuracy, efficiency, and interpretability;
[0079] 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 the problem into the meta-controller network, outputting an action sequence, and obtaining a task sequence cache; sequentially reading subtasks from the task sequence cache, and loading corresponding subtask policy 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;
[0080] S43. For the variable definition subtask, read 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 a variable definition result; for the constraint generation subtask, input the variable definition result and relevant information into the constraint generation strategy network, and obtain a constraint generation result; for the objective function construction subtask, input the variable definition result, constraint generation result, and relevant information into the objective function construction strategy network, and obtain a objective function construction result;
[0081] 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; and simultaneously recording the calculation time of the planning model generation process to obtain an efficiency score; using a predefined interpretability evaluation function, calculating the interpretability score of the planning model; and generating multi-objective scoring data based on the accuracy score, efficiency score, and interpretability score.
[0082] S45. Calculate a weighted total score based on the multi-objective optimization parameters and the multi-objective scoring data; use the weighted total score as a reward signal for reinforcement learning; update the parameters of the reinforcement learning model data based on the reward signal, and repeat steps S42 to S45 until a preset number of training rounds is reached;
[0083] S46. After completing the preset number of training rounds, all historical scoring records are read from the multi-objective scoring data; based on the historical scoring records, the NSGA-II algorithm is used to calculate the Pareto optimal solution set for accuracy, efficiency, and interpretability to form a Pareto solution set database; a balanced solution is selected from the Pareto solution set database as the final model parameter configuration to obtain the final model after the second stage of training.
[0084] 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 metrics. A balanced dataset 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: variable definition, constraint generation, and objective function construction, as well as a meta-controller network. These network structures and initial parameters are stored in a reinforcement learning model database. Multi-objective optimization parameters are initialized, including weights for the three objectives of accuracy, efficiency, and interpretability, and these parameters are stored in a multi-objective optimization control data structure.
[0085] The meta-controller network is read from the reinforcement learning model database. An integer programming problem is randomly selected from the balanced dataset represented by the multimodal representation as the current environment state and input into the meta-controller network. The meta-controller network outputs an action sequence that specifies the execution order of the subtasks. This action sequence is stored in the task sequence cache. Subtasks are sequentially read from the task sequence cache, and the corresponding subtask policy network is loaded from the reinforcement learning model database. For the variable definition subtask, relevant information about the current integer programming problem is read from the balanced dataset represented by the multimodal representation. This information is input into the variable definition policy network to obtain the variable definition result. The variable definition result is stored in the intermediate result cache. For the constraint generation subtask, the variable definition result is read from the intermediate result cache, combined with the information about the current integer programming problem, and input into the constraint generation policy network to obtain the constraint generation result. The constraint generation result is then appended to the intermediate result cache. For the objective function construction subtask, the variable definition and constraint generation results are read from the intermediate result cache, combined with the information about the current integer programming problem, and input into the objective function construction policy network to obtain the objective function construction result.
[0086] 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. Simultaneously, record the computational time of the model generation process and calculate the efficiency score. Furthermore, use the predefined interpretability evaluation function to calculate the model's interpretability score. Store these three scores in the multi-objective scoring data table. Read the objective weight parameters from the multi-objective optimization control data structure and, combined with the multi-objective scores, calculate the weighted total score. This score serves as the reward signal for reinforcement learning and is stored in the reward signal cache. Read the reward value from the reward signal cache and use it to update the parameters of the meta-controller network and each subtask policy network in the reinforcement learning model database. Repeat the above steps until the preset number of training rounds is reached.
[0087] After completing the preset number of training rounds, all historical scoring records are read from the multi-objective scoring data table. Using the NSGA-II (Non-Dominated Sorting Genetic Algorithm II) algorithm, the Pareto-optimal solution set for the three objectives of accuracy, efficiency, and interpretability is calculated. The Pareto-optimal solution set is stored in the Pareto solution database. A balanced solution is selected from the Pareto solution database as the parameter configuration for the final model. Based on the selected final parameter configuration, the corresponding meta-controller network and subtask 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 a test subset of the balanced dataset with multimodal representation. The model's accuracy, F1 score, average solution time, and interpretability metrics are calculated on the test set and stored in the final model performance data table. The final model, which has undergone the second phase of training, including its structural information, parameter values, and performance metrics, is saved in the model memory as the final output of the entire training process.
[0088] According to one aspect of the present application, step S43 is further as follows:
[0089] S431. Load the variable definitions, constraint generation, and objective function from the reinforcement learning model database to construct the initial policy network parameters for the three subtasks. Initialize a graph attention network (GAT) to capture the relationships between variables, constraints, and objectives in the integer programming problem. Store the GAT parameters in the graph attention network parameter database.
[0090] S432. Read information about the current integer programming problem from the balanced dataset represented by the multimodal representation. Process the problem information using the GAT to generate a graph representation of the problem. Store the graph representation in the problem graph representation data table.
[0091] 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 policy network. This network uses graph convolutional layers and a self-attention mechanism to output a probability distribution for variable definitions. Specific variable definition results are sampled and stored in the intermediate result cache.
[0092] S434. Read the variable definition results from the intermediate result cache and combine them with the problem graph representation. The combined data is input into the constraint generation strategy network. This network uses a pointer-based sequence generation model to gradually generate constraints. The generated constraints are stored in the intermediate result cache.
[0093] S435. Read the variable definition and constraint generation results from the intermediate result cache and combine them with the problem graph representation. This combined data is input into the objective function construction strategy network. This network uses neural arithmetic logic units (NALUs) to generate the coefficients and structure of the objective function. The generated objective function is stored in the intermediate result cache.
[0094] S436. Read the variable definition, constraint generation, and objective function construction results from the intermediate result cache. A combined network, employing residual connections and layer normalization, is used to integrate the results of each subtask. A final objective function construction result is generated, taking into account the outputs of all previous subtasks. The integrated objective function construction result is stored in the task output database.
[0095] According to one aspect of the present application, step S45 is further as follows:
[0096] S451. Read objective weight parameters from the multi-objective optimization control data structure. Initialize a meta-learning network for dynamically adjusting the weights of each objective. Store the parameters of the meta-learning network in a meta-learning network parameter database.
[0097] S452. Read the model's accuracy, efficiency, and interpretability scores from the multi-objective scoring data table. Using these scores as input, load parameters from the meta-learning network parameter database, and calculate the optimal weights for each objective in the current situation using the meta-learning network. Store the calculated weights in the dynamic weight data table.
[0098] S453. Read the latest objective weights from the dynamic weight data table. Combine the multi-objective scores to calculate a weighted total score. Simultaneously, calculate the structural similarity between the integer programming 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.
[0099] S454. Read the similarity score from the solution similarity data table. Using the Soft Actor-Critic (SAC) algorithm framework, combine the weighted total score and the similarity score into a composite reward signal. Specifically, a small neural network is used to map these two scores to a final reward value. The calculated reward value is stored in the reward signal buffer.
[0100] S455. Read the reward value from the reward signal buffer. Use Prioritized Experience Replay (PER) technology to prioritize the experiences based on the reward value. Store the prioritized experiences in the priority experience replay buffer.
[0101] 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. Simultaneously, use the reward distribution of this batch of experiences to update the meta-learning network and store the updated parameters back in the meta-learning network parameter database.
[0102] This embodiment improves the modeling capabilities and optimization results 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 integer programming modeling process into three subtasks: variable definition, constraint generation, and objective function construction. Each subtask is handled by a dedicated policy network. This divide-and-conquer approach enables the model to more finely learn the various components of the integer programming problem, making it particularly suitable for industrial-grade integer programming problems with complex structures, such as multi-stage supply chain optimization or multi-objective resource allocation. The introduction of the Graph Attention Network (GAT) enables the model to effectively capture the complex relationships between variables, constraints, and objectives in integer programming problems, which is particularly important for understanding and modeling highly interdependent systems. The application of a pointer-based sequence generation model in the constraint generation task enables the model to generate well-structured and logically consistent constraints, which excels in solving 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 objective function construction enables the model to generate more complex and accurate objective functions, including for 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 encountered in practical applications, such as project scheduling problems that balance cost, time and quality. The combination of the Soft Actor-Critic (SAC) algorithm and the 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, large-scale integer programming problems, thereby expanding the application scope and effectiveness of the system.
[0103] like Figure 6 As shown, according to one aspect of the present application, step S5 is further:
[0104] S51. Based on the final model trained in the second stage and the balanced dataset of multimodal representation, initialize the symbolic reasoning system, including the predefined integer programming problem logic rule set and the reasoning engine, and obtain symbolic reasoning data;
[0105] S52. Reading an integer programming problem sample from the balanced data set represented by the multimodal representation; inputting the integer programming problem sample into the final model trained in the second stage to generate an initial integer programming model;
[0106] S53. Based on the symbolic reasoning data, perform a logical consistency check on the initial integer programming model, identify potential logical conflicts or inconsistencies, and obtain a consistency check result;
[0107] S54. Based on the consistency check result, generate a correction suggestion; combine the correction suggestion 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 corrected integer programming model;
[0108] S55 , repeatedly executing step S53 and step S54 until the revised 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.
[0109] In one embodiment of the present application, a final model trained in the second phase is read from a model memory, including its structural information, parameter values, and performance indicators. A balanced data set represented in a multimodal manner is read from a 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 in the multimodal manner. The sample is input into the final model to generate an initial integer programming model, including variable definitions, constraints, and an objective function. The generated initial model is stored in an intermediate model cache.
[0110] 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 logically enhanced model database.
[0111] According to one aspect of the present application, step S54 is further as follows:
[0112] S541. Read the check results from the consistency check result table. Initialize a neural theorem prover network based on a variational autoencoder (VAE) structure to generate logic correction suggestions. Store the network parameters in the theorem prover parameter database.
[0113] S542. Encode the logical conflict information in the check result into a vector. Load 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. These correction operations are stored in the correction operation data table.
[0114] S543. Read the generated correction actions from the correction action data table. Use the Monte Carlo Tree Search (MCTS) algorithm to search the correction action space and evaluate the potential effect of each correction action sequence. Store the search results in the correction strategy data table.
[0115] S544. Select the optimal sequence of correction operations from the correction strategy data table. Apply this sequence to the original integer programming model to generate a corrected model. Use symbolic execution techniques 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.
[0116] 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 reinforcement learning to adjust the parameters of the neural theorem prover network based on the failure, and store the updated parameters back in the theorem prover parameter database.
[0117] S546: Repeat steps S542 to S545 until the generated model passes consistency verification or reaches a 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.
[0118] This embodiment improves the logical consistency and reliability of the models generated by the integer programming automatic modeling system by introducing a dynamic neural symbolic reasoning method. Specifically, a neural theorem prover network based on a 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, ensuring 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 require considering multiple interacting factors, such as multi-stage production planning optimization. The introduction of symbolic execution technology further enhances the model's reliability verification capabilities. By simulating model behavior under different inputs, it ensures that the generated integer programming model maintains logical consistency under various possible scenarios. This is particularly suitable for application scenarios requiring high reliability, such as resource allocation for critical infrastructure or risk management of financial portfolios. The application of reinforcement learning methods in the parameter adjustment of the neural theorem prover network 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 models generated by the integer programming automatic modeling system by combining the flexibility of neural networks with the rigor of symbolic reasoning. It can not only handle complex logical relationships that traditional methods have difficulty dealing with, but also ensure that the generated model is strictly mathematically correct, which is crucial for industrial-level integer programming problem solving.
[0119] like Figure 7 As shown, according to one aspect of the present application, step S6 is further:
[0120] 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.
[0121] S62. Randomly select a subset from the balanced data set represented by the multimodal representation as an initial test set; input the initial test set into the integer programming model with enhanced logical consistency to obtain a model output result; based on the model output result, calculate the performance of the model on the initial test set using a predefined performance evaluation indicator to obtain performance evaluation data;
[0122] S63, read the test case generation network from the adversarial test generator data; send the performance evaluation data and the initial test set as input to the test case generation network, and output a new test case;
[0123] S64. Input the new test case into the integer programming model with enhanced logical consistency to obtain a new model output result; based on the new model output result, use the performance evaluation index to calculate the performance of the model on the new test case to obtain new performance evaluation data;
[0124] S65. Based on the performance evaluation data and the new performance evaluation data, identify the test cases where the model performance degrades most significantly, and generate high-quality test data. Repeat steps S63 to S65 to continuously generate new adversarial test cases and update the high-quality test data until a preset number of iterations is reached or the model performance stabilizes, and output the final high-quality test data.
[0125] S66. Based on the final high-quality test data, conduct a final evaluation of the integer programming model with enhanced logical consistency, calculate comprehensive performance indicators, and obtain comprehensive evaluation results.
[0126] In one embodiment of the present application, a logical consistency-enhanced integer programming model is read from a logic-enhanced model database. A balanced dataset represented by a multimodal representation is read from a data storage device. An adversarial test generator is initialized, including a test case generation network and a difficulty assessment function, and these components are stored in the adversarial test generator database. A subset of the balanced dataset represented by the multimodal representation is randomly selected as an initial test set. This initial test set is input into the integer programming model to obtain the model's output. The performance of the model on the initial test set is calculated using a predefined performance evaluation metric, and the performance data is stored in a performance evaluation data table.
[0127] Read the test case generation network from the adversarial test generator database. Feed the model performance data and the initial test set into the test case generation network. The generation network outputs a new set of test cases designed to expose potential weaknesses in 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 model's output. Calculate the model's performance on the new test cases using the same performance evaluation metrics and append the new performance data to the performance evaluation data table. Read the model's performance data on the new and old test cases from the performance evaluation data table. Compare these performance data to identify test cases where model performance degrades most significantly. Add these challenging test cases to a curated test set, which is then stored in the high-quality test database. Repeat the above steps, continuously generating new adversarial test cases and updating the curated test set, until the preset number of iterations is reached or the model performance stabilizes. Finally, perform a final evaluation of the integer programming model using the curated test set from the high-quality test database to calculate the comprehensive performance metric. Store the final evaluation results in the model evaluation result database.
[0128] According to one aspect of the present application, step S63 is further as follows:
[0129] S631. Read test case generation network parameters from the adversarial test generator database. Initialize a generator and discriminator network based on a Wasserstein GAN with Gradient Penalty (WGAN-GP). Store the initialized network parameters in the GAN parameter database.
[0130] S632. Read the model's performance data 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.
[0131] S633. Load the generator and discriminator parameters from the GAN parameter database. Use the generator network to generate a batch of new test cases, conditional on the cases in the initial test set. Pass the generated cases through the discriminator network, and calculate the "difficulty score" for each generated case. Store the generated cases and their difficulty scores in the generated case data table.
[0132] S634. Read the generated use cases and their difficulty scores from the generated use case data table. Use an importance sampling method based on the difficulty scores to select a subset of high-difficulty use cases. Simultaneously, use a 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.
[0133] 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 model output. Calculate the model's performance on these new use cases and append the performance data to the performance evaluation data table. Simultaneously, calculate the structural differences between these new use cases and the original use cases, and quantify the degree of difference using the graph kernel method. Store the difference data in the use case difference data table.
[0134] 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 a subset of the most representative and challenging use cases, taking into account their difficulty, diversity, and structural novelty. Add the selected subset of use cases to the high-quality test database.
[0135] S637. Based on the newly added high-quality test cases, use the policy gradient method to update the parameters of the generator network to generate more challenging use cases. Simultaneously, use adversarial training to update the discriminator network to improve its ability to identify difficult use cases. Store the updated GAN parameters back into the GAN parameter database.
[0136] S638: Repeat steps S633 through S637 to continuously generate and optimize new adversarial test cases until the preset number of iterations is reached or the quality of the generated cases no longer significantly improves. Finally, a final, curated test set is derived from the high-quality test database to serve as the basis for a comprehensive model evaluation.
[0137] This embodiment improves the robustness and generalization capabilities of the integer programming automatic modeling system by introducing a Wasserstein generative adversarial network with gradient penalty (WGAN-GP). Specifically, the use of the WGAN-GP framework enables the system to generate high-quality and diverse adversarial test cases that effectively expose potential weaknesses in the model. When dealing with industrial-grade integer programming problems, such as large-scale production scheduling or complex logistics network optimization, it can simulate various extreme and edge cases, ensuring the model's performance in various complex scenarios. The combination of importance sampling methods based on difficulty scores and genetic algorithms further improves the quality and diversity of generated test cases. It is particularly suitable for testing the performance of models in problems with highly nonlinear constraints or multi-objective optimization, such as supply chain optimization problems considering multiple conflicting objectives. The application of the graph kernel method to quantify the structural differences between the newly generated cases and the original cases ensures the novelty and representativeness of the test set, effectively avoiding the risk of overfitting to specific types of problems. The application of the NSGA-III multi-objective optimization algorithm to select the most representative and challenging test cases enables the system to achieve an optimal balance between the difficulty, diversity, and structural novelty of the cases. This is crucial for comprehensively evaluating the model's performance 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 generator network parameters 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 continuously evolving testing mechanism is particularly suitable for evaluating the stability and adaptability of integer programming automatic modeling systems during long-term operation, especially when facing ever-changing business environments and optimization goals. This embodiment, through adversarial test case generation technology, not only provides a comprehensive and rigorous model evaluation method, but also provides a mechanism for continuous improvement of the integer programming automatic modeling system. 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 actual industrial environments.
[0138] According to one aspect of the present application, it further includes:
[0139] S7. Obtain the model evaluation results and the integer programming model with enhanced logical consistency, process them using an automatic report generation method, and obtain the final model performance report and optimization suggestions. This specifically includes the following sub-steps:
[0140] S71. Read the final evaluation result from the model evaluation result database. Read the integer programming model with enhanced logical consistency from the logical enhancement 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.
[0141] S72. Read the data analysis component from the report generator database. Use this component to conduct an in-depth analysis of the evaluation results, including calculating statistical data for various performance indicators, identifying the strengths and weaknesses of the model, and analyzing the differences in the model's performance on different types of problems. The analysis results are stored in the data analysis result cache.
[0142] S73. Read the analysis results from the data analysis result cache. Read the natural language generation component from the report generator database. Use the natural language generation component to convert the data analysis results into an easily understandable text description. The generated text description includes an overview of the model performance, a detailed explanation of the evaluation results, and an analysis of the model's strengths and limitations. The generated text description is stored in the report text cache.
[0143] S74. Based on the text description and data analysis results, use the natural language generation component to generate a series of specific optimization suggestions. These suggestions may include model structure adjustments, training strategy improvements, data augmentation methods, etc. The generated optimization suggestions are stored in the optimization suggestion cache.
[0144] S75. Read the generated text description from the report text cache and the optimization suggestions from the optimization suggestion cache. Combine these contents into a complete model performance report. Use a predefined report template to organically combine the text description, data charts, and optimization suggestions to form a structured report document. Store the generated report document in the final report database.
[0145] S76. Read the generated report document from the final report database. Perform final formatting and proofreading on the report to ensure accuracy and readability. Export the final report to a deliverable file format (such as PDF or HTML) and store it in the system's output folder as the final output of the entire process.
[0146] In a further embodiment, the integer programming problem dataset specifically includes: production resource data: a list of machine equipment, including each equipment's ID, type, capacity, product types that can be produced, and equipment status (normal operation, maintenance, etc.); a list of human resources, including worker IDs, skill levels, types of equipment that can be operated, and work shift information; a list of raw materials, including raw material types, current inventory levels, unit costs, supplier information, and minimum order quantities; product information: a list of products, including product IDs, names, and specifications; a production recipe, including the type and quantity of raw materials required for each product; a production process, including the production steps for each product, the equipment type required for each step, and the processing time; order data: an order list, including order IDs, customer information, ordered product types and quantities, delivery dates, and priorities; historical order data, used for demand forecasting and capacity planning; time constraints: a planning period, including the optimization timeframe (e.g., one week, one month); a work schedule, including normal working hours, overtime, and statutory holidays; capacity constraints: equipment capacity, including the maximum output of each piece of equipment per unit time; human capacity, including the productivity of each worker on different pieces of equipment; and equipment switching time, including the preparation time required to switch 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; Qualification rate data: Qualification rate statistics for each product in historical production. Cost data: Production costs: Includes raw material costs, labor costs, and energy costs; Inventory holding costs: Unit inventory costs for raw materials and finished products; Equipment operating costs: Includes normal operation costs and maintenance costs; Late delivery costs: Penalty costs for not completing orders on time. Energy consumption data: Equipment energy consumption: Energy consumption of each piece of equipment under different operating conditions; Energy prices: Energy prices at different times of day (e.g., peak and valley electricity prices). Maintenance plan: Preventive maintenance schedule: Planned equipment maintenance times; Equipment reliability data: Mean time between failures (MTBF) of each piece of equipment. Environmental constraints: Emission limits: Maximum allowable emissions from the production process; Waste disposal capacity: The factory's waste disposal ceiling. Transportation and logistics data: Transportation capacity: Available transportation vehicles and load capacities; Transportation costs: The cost structure of different transportation methods; Transportation time: Estimated transportation time to different customers. Supply Chain Information: Supplier List: This includes supplier information, lead times, and minimum order quantities; Raw Material Delivery Time: The estimated arrival time for different raw materials. Seasonal Factors: Demand Fluctuations: Seasonal demand patterns; Production Efficiency Variations: The impact of seasonal factors on production efficiency (e.g., high temperatures). Emergency Response Capabilities: Backup Resources: Additional equipment or human resources that can be deployed in emergencies; Contingency Plans: Response strategies for equipment failures, raw material shortages, and other situations.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; customer satisfaction metrics: such as on-time delivery rate and product quality; sustainable development goals: such as carbon emission reduction targets and energy efficiency improvement targets.
[0147] This application can also be used in the following scenarios: supply chain network optimization; logistics distribution route planning; power system scheduling; medical resource allocation; financial portfolio optimization; employee scheduling management; airline flight scheduling; communication network design; urban transportation planning; and agricultural planting planning. The following data is generally required as input: Decision variable data: List of decision objects: such as products, routes, assets, and personnel; Decision object attributes: such as capacity, cost, efficiency, and availability; Decision scope: such as timeframe and geographic scope; Constraint data: Resource constraints: such as budget, production capacity, manpower, and timeframe; Technical constraints: such as equipment compatibility and process requirements; Regulatory constraints: such as working hours and emission standards; Physical constraints: such as storage capacity and transportation capacity; Objective function data: Cost data: such as production costs, transportation costs, and holding costs; Revenue data: such as sales revenue and service fees; Performance indicators: such as efficiency, quality, and satisfaction; Risk indicators: such as volatility and reliability; Time dimension data: Planning period: the optimization time span; Time granularity: the minimum time unit for decision making; Time series data: such as demand forecasts and price fluctuations. 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: relationship between factors: such as substitution or complementary relationship between products; system coupling: such as mutual influence between equipment; synergy effect: such as scale effect of mass production. Dynamic change data: time-varying parameters: such as seasonal demand, dynamic price, 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 strategies, etc.; logistics: vehicle information, delivery windows, etc.; electricity: generation type, load profile, etc.; healthcare: patient information, treatment plans, etc.; finance: asset categories, risk appetite, etc.; scheduling: employee skills, preferences, etc.; aviation: aircraft types, airport capacity, etc.; communications: network topology, traffic patterns, 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 formats with other systems; API specifications and data flow definitions. User preference and policy data: decision maker risk preferences; corporate strategic orientation; special business rules or practices.
[0148] In another embodiment of the present application, an automatic integer programming modeling method based on a large language model utilizes a pipelined large language model enhancement method (PLUME), featuring lightweight and pipelined features. The PLUME algorithm divides training into multiple stages, employing different methods in each stage to address stage-specific issues in model training and achieving precise tuning by timely adjusting the training direction. The PLUME method designs the model training method into a pipelined framework. This pipelined training framework decomposes the training process and objectives, with each training stage corresponding to a training objective. The next training stage trains and optimizes based on the previous stage. This approach allows for timely identification of training problems and timely adjustment of the training direction, avoiding repeated training and error accumulation. This allows for efficient training in situations with limited data resources. The goal of integer linear programming modeling is broken down into a first stage: obtaining a model that outputs text in a valid modeling format; a second stage: obtaining a model that outputs correctly modeled numerical text based on the correct modeling format.
[0149] 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:
[0150] The first stage involves supervised coarse tuning based on the LoRA concept. The basic process involves inputting a query (i.e., "modeling format requirements + specific question description") into the large model. A forward pass yields the model output, which includes the probabilities of different tokens generated at each time. A softmax function is then used to obtain the token with the highest probability of generation, which is used as the output token, and its corresponding logarithmic generation probability is recorded. The cross-entropy loss between the model output tokens and the answer tokens is calculated, and gradient backpropagation is performed based on this loss to update the AB matrix parameters. 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 cue, after an appropriate number of training rounds, the model can generate answers containing the correct modeling format for the input combination of "modeling format cue + questions of varying complexity."
[0151] The second phase involves precise one-step reinforcement tuning, using graph similarity based on the fused Gromov-Wasserstein distance as a reward. Testing revealed that the optimal model trained in the first phase, when faced with more complex problems, correctly formatted the output text, but the specific values were incorrect. Therefore, the modeling values were precisely tuned in the second phase. First, the model trained in the first phase was used to initialize the policy network parameters. The responses generated by the large language model using the greedy policy served as the empirical action 1 for each epoch; the corresponding standard modeled answers served as the empirical action 2 for each epoch, achieving data augmentation. The logarithmic generation probability of each token was accumulated to form the logarithmic generation probability of the entire answer (i.e., action 1 or action 2). Action rewards were calculated based on graph similarity. Since the model trained in the first phase outputs text with the correct modeling format, the second phase only required ensuring the accuracy of the modeling data.
[0152] 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 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 - hand - side 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 modeled 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 modeled text is 1.0.
[0153] The Fused Gromov - Wasserstein distance is a method for measuring the similarity between two graphs, which combines 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:
[0154] 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 ;
[0155] 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 weight for matching sample point i (1≤i≤n) in a dataset with sample point j (1≤j≤m) in another dataset. The matching matrix π has marginal constraints, meaning that the row and column sums of the matching matrix must satisfy the marginal distributions of the two datasets. The total row and column sums are both 1. λ is a balancing parameter used to balance the importance of geometry and features. By varying the value of π, the minimum calculated distance achieved is the Fused Gromov-Wasserstein distance (gw) between the two graphs. A larger Fused Gromov-Wasserstein distance indicates a lower similarity between the two graphs; a smaller Fused Gromov-Wasserstein distance indicates a higher similarity between the two graphs.
[0156] Compared to other graph similarity calculation methods, the Fused Gromov-Wasserstein distance more comprehensively measures the similarity between node features and graph structure. Traditional similarity calculations are generally based on distance metrics such as cosine similarity of node embedding representations, which only consider feature similarity and ignore structural proximity. Graph embedding representations based on random walks can mine structural information, but they rely primarily on general graph training and cannot effectively mine the feature information of bipartite graphs for combinatorial optimization problems. The Fused Gromov-Wasserstein distance, on the other hand, explicitly considers both feature and structural similarity. Furthermore, based on optimal transport theory, the Fused Gromov-Wasserstein distance can maximize the correspondence between nodes in two graphs.
[0157] Compared to 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.
[0158] 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). Where θ_(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 given state S_t.
[0159] It's worth noting that, unlike some approaches 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. Instead of treating the generation of each token as a single step, the generation of the entire answer is considered a single step. Therefore, each initial state (i.e., model input) generates an action (i.e., model output) before the round ends. In contrast to multi-step reinforcement learning (RL) algorithms, which assign the similarity score between the entire generated answer and the standard answer to the final step, while intermediate steps only use the KL divergence score between the current large model and the initial large model, multi-step approaches can result in ineffective parameter updates during the intermediate stages, leading to training failure. The one-step RL algorithm avoids this issue by directly using the graph similarity between the total output and the standard answer as a reward, making the model training process more stable.
[0160] The PLUME algorithm was 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 adds a certain number of learnable prefixes to the embedding layer of a pre-trained large language model for supervised training; and the LoRA-SL algorithm uses the LoRA principle to perform supervised learning on a large language model. Using the same training data for training and testing on a test set containing 35 data sets, the PLUME method achieved the best modeling accuracy of 0.896 after 25 training rounds, surpassing the DG, P-tuning, and LoRA-SL algorithms.
[0161] This invention implements a highly intelligent and automated integer programming automatic modeling system, improving 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, laying a solid foundation for subsequent model training. It is particularly suitable for integer programming problems of various complexities, enabling full representation and learning of problems ranging from simple linear programs to complex mixed-integer nonlinear programs. Second, neural architecture search and differentiable architecture search enable automatic optimization of model structures, enabling the system to adaptively select the most appropriate network structure for different types of integer programming problems. This improves the model's flexibility and performance ceiling, enabling it to effectively handle problems ranging from small-scale optimization to large-scale industrial-scale optimization. Dynamic sparsification training and adaptive difficulty curriculum learning enhance the model's training efficiency and generalization, enabling the system to quickly adapt to and efficiently solve integer programming problems of various complexities. This is particularly important in dynamic business environments that require frequent adjustments and optimization. Hierarchical reinforcement learning and multi-objective Pareto front exploration further enhance the system's modeling capabilities and optimization results, enabling it to handle advanced integer programming problems with complex constraints and multiple conflicting objectives. This demonstrates excellent performance when addressing 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 critical decision-making systems. Finally, adversarial test case generation based on WGAN-GP improves the system's robustness and long-term stability, ensuring the model's reliability under various extreme and abnormal conditions. This invention combines machine learning techniques with algorithms specifically tailored to the characteristics of integer programming problems to create a comprehensive, efficient, and reliable automatic integer programming modeling system. This not only improves modeling efficiency and reduces manual intervention, but also enhances model quality and applicability. It can address integer programming problems at all levels, from simple resource allocation to complex multi-objective optimization, providing a powerful tool 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, this invention lowers the barrier to entry for integer programming modeling, enabling even non-experts to quickly and accurately build high-quality integer programming models. This not only accelerates the application of integer programming technology across various industries but also opens up new possibilities for solving larger-scale and more complex real-world optimization problems.
[0162] 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 fall within the scope of protection of the present invention.
Claims
1. An automatic integer programming modeling method based on a large language model, characterized in that: The steps include: S1. Obtain an integer programming problem dataset, process it using data augmentation 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 it and obtain the optimized neural network model structure; S3, based on the optimized neural network model structure and the balanced data set of multimodal representation, dynamic sparse training and adaptive difficulty curriculum learning method are used to obtain the model after the first stage training; S4. Based on the model trained in the first stage and the balanced dataset with 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 dataset with multimodal representation, a dynamic neural symbolic reasoning method is used to process it and obtain an integer programming model with enhanced logical consistency; S6, based on the integer programming model with enhanced logical consistency and a balanced dataset with multimodal representation, is processed using an adaptive adversarial test generation method to obtain comprehensive evaluation results; S7. Obtain the model evaluation results and the integer programming model with enhanced logical consistency, process them using an automatic report generation method, and obtain a final model performance report and optimization suggestions. Step S7 specifically includes: S71. Read the final evaluation result from the model evaluation result database, read the integer programming model with enhanced logic consistency from the logic enhancement 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; S72. Read the data analysis component from the report generator database, use the component to perform in-depth analysis on the evaluation results, including calculating statistical data for various performance indicators, identifying strengths and weaknesses of the model, and analyzing performance differences of the model on different types of problems, and store the analysis results in the data analysis result cache. S73. Read the analysis results from the data analysis result cache, read the natural language generation component from the report generator database, use the natural language generation component to convert the data analysis results into an easy-to-understand text description, the generated text description including a model performance overview, a detailed evaluation result explanation, and an analysis of the model's strengths and limitations, and store the generated text description in the report text cache; S74. Based on the text description and data analysis results, use the natural language generation component to generate a series of specific optimization suggestions, including model structure adjustments, training strategy improvements, and data enhancement methods, and store the generated optimization suggestions in the optimization suggestion cache. S75. Read the generated text description from the report text cache, read the optimization suggestions from the optimization suggestion cache, integrate these contents into a complete model performance report, use a predefined report template to organically combine the text description, data charts, and optimization suggestions to form a structured report document, and store the generated report document in a final report database; S76. Read the generated report document from the final report database, perform final formatting and proofreading on the report, export the final revised report into a deliverable file format, and store it in the system's output folder.
2. The large language model-based integer programming automatic modeling method according to claim 1, characterized in that: Step S1 is further as follows: S11, receiving an integer programming problem dataset 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 dataset to form an expanded dataset; 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, the complexity distribution of the data set is calculated; the complexity distribution is compared 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 dataset 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; data in textual representation, graph structure representation, symbolic representation and matrix representation are merged to form a balanced dataset with multimodal representation.
3. The large language model-based integer programming automatic modeling method according to claim 2, characterized in that: Step S2 is further as follows: S21. Based on the balanced dataset 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 pre-stored search space information, using a Bayesian optimization algorithm, generate candidate model architectures within the search space; for each candidate model architecture, construct a corresponding neural network model; input a balanced dataset represented by multimodal data into the neural network model, perform training and verification, and obtain verified model performance data; based on the verified model performance data, use a model performance evaluation function to calculate a performance score for 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 large language model-based integer programming automatic modeling method 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 calculations, and obtain the output results of the model; calculate the loss value between the output results of the model and the true label to obtain a loss record array; based on the loss record array, execute the backpropagation algorithm to calculate the gradient of the model parameters; S33. Determine a parameter subset that needs to be updated based on the absolute value of the gradient of the model parameters and a preset sparsity threshold; apply gradient descent update to the parameter subset to obtain updated model parameters; and dynamically adjust the sparsity threshold based on the updated model parameters and the loss record array 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 last N training times from the loss record array; if the average loss value is lower than the preset low threshold, increase the difficulty level; If it is higher than the preset high threshold, the difficulty level is lowered, and the updated difficulty level is output to obtain difficulty control data; based on the difficulty control data, 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 repeated until a preset number of training rounds is reached or the model performance converges, and the final training model parameters are obtained; where N is a preset constant; S35. Obtain a validation subset from the balanced dataset represented by the multimodal representation, perform performance evaluation on the model based on the validation subset and the final trained 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, the model trained in the first stage is output.
5. The large language model-based integer programming automatic modeling method 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 the multimodal representation, the hierarchical reinforcement learning architecture and multi-objective optimization parameters are initialized to obtain the reinforcement learning model data and the multi-objective optimization control data; The hierarchical reinforcement learning architecture includes a variable definition policy network, a constraint generation policy network, an objective function construction policy network, and a meta-controller network; the multi-objective optimization parameters include accuracy, efficiency, and interpretability; S42. Read the meta-controller network from the reinforcement learning model data; randomly select an integer programming problem from the balanced data set represented by the multimodal representation as the current environment state, input it into the meta-controller network, output an action sequence, and obtain a task sequence cache; Read subtasks sequentially from the task sequence cache 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 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 a variable definition result; for the constraint generation subtask, input the variable definition result and relevant information into the constraint generation strategy network, and obtain a 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, the constraint generation results, and the 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 performed until a preset number of training rounds is reached; S46. After completing the preset number of training rounds, all historical scoring records are read from the multi-objective scoring data; based on the historical scoring records, the NSGA-II algorithm is used to calculate the Pareto optimal solution set for accuracy, efficiency, and interpretability to form a Pareto solution set database; a balanced solution is selected 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 large language model-based integer programming automatic modeling method 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 dataset of multimodal representation, initialize the symbolic reasoning system, including the predefined integer programming problem logic rule set and the reasoning engine, and obtain symbolic reasoning data; S52. Reading an integer programming problem sample from the balanced data set represented by the multimodal representation; inputting the integer programming problem sample into the final model trained in the second stage to generate an initial integer programming model; S53. Based on the symbolic reasoning data, perform a logical consistency check on the initial integer programming model, identify potential logical conflicts or inconsistencies, and obtain a consistency check result; S54. Generate correction suggestions based on the consistency check results; Combine 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 revised 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 large language model-based integer programming automatic modeling method 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 of multimodal representation as the initial test set; Inputting the initial test set into the integer programming model with enhanced logical consistency to obtain the model output result; based on the model output result, using the predefined performance evaluation index 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; 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. Input the new test case into the integer programming model with enhanced logical 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 degrades 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 the preset number of iterations is reached or the model performance stabilizes, and output the final high-quality test data; S66. Based on the final high-quality test data, conduct a final evaluation of the integer programming model with enhanced logical consistency, calculate comprehensive performance indicators, and obtain comprehensive evaluation results.
8. The large language model-based integer programming automatic modeling method according to claim 7, characterized in that: Step S12 is further as follows: S121. Input each integer programming problem in the expanded data set into a preconfigured complexity evaluation network to obtain a multidimensional complexity vector for each problem; S122. Based on the multidimensional complexity vectors of all problems, use the kernel density estimation method to calculate the distribution of the current data set in the multidimensional complexity space to obtain the current distribution; S123. Calculate the difference between the current distribution and the preset target distribution using the Wasserstein distance to obtain distribution difference data; Based on the distribution difference data, an adaptive importance sampling algorithm is used to generate a new integer programming problem; the new integer programming problem is added to the augmented dataset; S124 , repeating steps S121 to S123 until the distribution difference data is less than a preset threshold or the maximum number of iterations is reached, and outputting an enhanced data set with balanced complexity.
9. The large language model-based integer programming automatic modeling method 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, initialize a neural architecture search controller to obtain controller parameters; S222. Generate actions based on the controller parameters, including the number of layers of the candidate neural network structure, the operation type and connection method of each layer, and obtain 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 simultaneously updating architecture parameters and model weights to obtain updated hypernetwork parameters; S225, repeat step S224 until the preset round is reached, and output the final super network parameters; Based on the final hypernetwork parameters, a candidate model architecture is selected; 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