Conceptio › Archive › arXiv CS
arXiv CS open access

MiniOpt: Reasoning to Model and Solve General Optimization Problems with Limited Resources

2026 · arxiv_cs
arXiv CS · Papers · 2026
Open Source ↗Direct PDF ↓
deep-learningmachine-learningneural-networks
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

JOURNAL OF LATEX CLASS FILES

1

MiniOpt: Reasoning to Model and Solve General Optimization Problems with Limited Resources

arXiv:2606.25832v1 [cs.LG] 24 Jun 2026

Ke Zhao∗ , Zixiang Di∗ , Hong Qian, Xiang Shu, Yaolin Wen, Qitao Shi, Bingdong Li, Xingyu Lu, Xiangfeng Wang, Jun Zhou, Ke Tang, and Yang Yu

Abstract—Achieving strong optimization generalization across diverse optimization problems while requiring limited training resources remains a challenging problem for optimization-oriented large language models (LLMs). Existing approaches typically rely on large-scale supervised datasets, costly reasoning annotations, and expensive intermediate step verification, resulting in substantial training overhead. To address these challenges, we propose MiniOpt, a reinforcement learning framework that learns to solve optimization problems through an reasoning-to-model-andsolve paradigm. MiniOpt decomposes optimization reasoning into structured optimization modeling and executable solver generation. Building upon this paradigm, we introduce OptReward, a reward function with hierarchical score structure that jointly evaluates formulation and solution, enabling effective policy learning without expert demonstrations. We further develop an optimization-oriented policy optimization strategy that improves exploration efficiency and stabilizes reinforcement learning for compact models. Extensive experiments show that MiniOpt3B exhibits strong optimization generalization across various optimization types, problem scenarios, and task domains. For models with fewer than 10B parameters, MiniOpt series achieves the highest average solving accuracy (SA). For models with more than 10B parameters, MiniOpt still shows competitive performance. These results suggest that optimization-oriented reward design and reinforcement learning provide an effective pathway for developing compact optimization-specialized language models with strong optimization generalization capabilities. The code is available at https://github.com/Hsiang-1/MiniOpt. Index Terms—Optimization Generalization, Reasoning to Model and Solve, Limited Resources, Large Language Models for Optimization.

I. I NTRODUCTION PTIMIZATION problems are ubiquitous in real-world scenarios, profoundly affecting diverse domains, such as industrial production and transportation planning [1], [2].

O

These authors contributed equally to this work. Corresponding author: Hong Qian. Ke Zhao, Zixiang Di, Yaolin Wen, Bingdong Li, Xiangfeng Wang, and Hong Qian are with East China Normal University, Shanghai 200062, China (E-mail: kezhao@stu.ecnu.edu.cn, 51265901113@stu.ecnu.edu.cn, 51275901100@stu.ecnu.edu.cn, bdli@cs.ecnu.edu.cn, xfwang@sei.ecnu.edu.cn, hqian@cs.ecnu.edu.cn). Xiang Shu, Qitao Shi, Xingyu Lu, and Jun Zhou are with AntGroup, Hangzhou 310000, China. (E-mail: shuxiang.shu@antgroup.com, qitao.sqt@antgroup.com, sing.lxy@antgroup.com, jun.zhoujun@antgroup.com). Ke Tang is with Southern University of Science and Technology, Shenzhen 518055, China. (E-mail: tangk3@sustech.edu.cn). Yang Yu is with Nanjing University, Nanjing 210023, China. (E-mail: yuy@nju.edu.cn). This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible. © 2026 IEEE.

While traditional optimization solvers are efficient, their application heavily relies on expert knowledge, requiring the manual conversion of problems described in natural language into precise mathematical formulations and executable code. This process is both time-consuming and non-generalizable. The rise of LLMs has opened new pathways for the automated modeling and solving of optimization problems using natural language descriptions [3]–[5], making them more applicable to application scenarios. Representative work like LLMOPT [6], BPP-Search [7], and Text2Zinc [8] significantly advances this field by parsing natural language descriptions into structured formulation that provide a unified representation of optimization problems, and subsequently generating solver code efficiently. However, deploying such LLM-based approaches faces three critical bottlenecks. First, ensuring accurate text generation with a small-scale model requires Supervised Fine-Tuning (SFT) with a large amount of high-quality training data [9], [10]. However, obtaining such data is difficult, often requires considerable time and effort, and is prone to errors [11]. Second, it is challenging to verify whether the result generated meets the requirements [12], [13]. The non-verifiability of this task also exposes the limitations of the learning-based solving paradigm. Previous methods often incorporate reflection or debugging mechanisms [14], [15] during the generation process, which significantly multiply the computational overhead. Finally, considering data privacy issues, local deployment of small-scale LLMs with strong performance and reducing training costs is important, including the volume and quality of training data. These limitations pose significant barriers to deploying LLMs with strong optimization-solving capabilities in small and medium-sized enterprises and even on mobile devices. To address these challenges, we propose MiniOpt, an RLVR-based methodology designed to enhance the optimization generalization of small-scale LLMs under limited data and training resources. Following LLMOPT [6], we use optimization generalization to denote the ability of a model to formulate and solve previously unseen optimization problems across different optimization types and scenarios. We systematically design the training process, training data, and algorithms of the model, introducing the reasoning-to-model-and-solve paradigm. Specifically, we adapt the classic “model and solve” paradigm of LLMs for optimization problems into a verifiable Chain-of-Thought (CoT) for Reinforcement Learning (RL), thereby facilitating effective RLVR training. To efficiently utilize limited data, we propose a two-stage RL framework

JOURNAL OF LATEX CLASS FILES

that divides the training into progressive stages aligned with the evolution of model capabilities. Initially, we perform MidTraining on a small subset of annotated data to prevent training collapse induced by reward sparsity. Subsequently, the first RL stage employs a training set of lower difficulty to enable the policy model to master the reasoning-to-model-and-solve paradigm. The second stage then further enhances performance and optimization generalization on more challenging datasets. Addressing the scarcity of annotated CoT data and the associated verification challenges, MiniOpt employs fiveelement tuple modeling as a verifiable structural abstraction of the CoT within the RL framework. This approach mitigates verification complexity while simultaneously enhancing result accuracy and model generalization. Furthermore, we design a hierarchical structured reward function, OptReward, which facilitates robust RLVR. Specifically, it incorporates a modeling completeness verification mechanism to circumvent the need for content verification of the optimization modeling, while simultaneously constraining the RL reasoning trajectory in the vicinity of the correct modeling formulation to mitigate reward hacking. Building upon this systematic architectural design, we also introduce tailored modifications to the GPRO algorithm, thereby fully leveraging limited samples to conduct highly efficient training and achieve robust optimization generalization. Ultimately, the aforementioned synergistic design of the RLVR framework significantly reduces the reliance on annotated data, as well as the overall training and inference costs. Building upon the aforementioned methodology, this paper conducts extensive experiments with MiniOpt-3B on 8 benchmarks across different optimization types and problem scenarios. The results demonstrate its strong optimization generalization. Compared with baselines with fewer than 10B parameters, MiniOpt-3B achieves the best performance. When evaluated against baselines exceeding 10B parameters, MiniOpt-3B remains competitive compared to LLMOPT14B, and surpasses the general thinking model GPT-5 by 2.11 percentage points. MiniOpt-3B achieves a competitive average SA compared with DeepSeek-R1 while consuming only about 24.40 percentage points of the output tokens used by DeepSeek-R1 across benchmarks of varying difficulty. Notably, MiniOpt lies on the empirical Pareto frontier of both parameter scale and the SA metric. Furthermore, results from ablation studies and discussion indicate that applying RLVR within the reasoning-to-model-and-solve paradigm yields substantial performance gains. This approach enhances the model’s proficiency in solving optimization problems while preserving generalization. The subsequent sections review the related work, introduce MiniOpt, present experimental results and analysis, provide an in-depth discussion, and finally conclude the paper. II. R ELATED W ORK LLMs for Modeling and Solving Optimization Problems. For modeling and solving optimization problems with LLMs, there are already a variety of benchmarks [14], [16], [17]. Challenging benchmarks like Mamo [16] and OptiBench [18]

2

have led to numerous studies utilizing LLMs to solve optimization problems. Prompt-based approaches such as OptiMUS [14], CoE [19], OptiTree [20] and LEAN-LLM-OPT [21] utilize the powerful generation capability of LLMs to generate the solver code of the optimization problem through multistage pipeline, without performing any post-training. Learningbased methods enhance LLMs’ capabilities in modeling and solving mathematical problems. For example, LLaMoCo [22] proposes an SFT-based framework comprising a meticulously designed instruction set and a two-stage training methodology that incorporates contrastive learning warm-up followed by SFT. LLMOPT [6] and NER4OPT [8], [23] adopt a twostage training process of modeling the optimization problems first and then solving them by generating solution code. StepORLM [24] synthesizes a large volume of process data to simultaneously learn a policy model and a Process-RewardModel (PRM), employing alternating training to produce a modeling-and-solving model with reliable process consistency. Similarly, BPP-Search [7] generates process data and trains a PRM alongside a preference selection model under a Treeof-Thought search paradigm, thereby simulating reasoning processes to derive robust results. Reinforcement Learning with Verifiable Reward. While Reinforcement Learning from Human Feedback (RLHF) [25] plays a crucial role in post-training alignment, it suffers from high annotation costs and inherent human bias [11]. Reinforcement Learning with Verifiable Reward (RLVR) [26] leverages externally grounded, easily verifiable rewards (e.g., rule-based reward) to provide dense and structurally simple supervision [27]–[29]. Its practicality is especially valuable in real-world black-box systems [30]–[32], where verification is typically feasible only at the output stage, making RLVR a broadly applicable paradigm for aligning LLMs. For example, SIRL [33] and OR-R1 [34] significantly improve the model’s performance through the RLVR training paradigm. III. M ETHODOLOGY: T HE P ROPOSED M INI O PT A. Overview This paper studies how to endow small-scale LLMs with strong optimization generalization under tight data and compute budgets. We introduce MiniOpt, a reasoning-driven paradigm for modeling and solving optimization problems, whose training framework is shown in Figure 1. MiniOpt integrates a five-element tuple structure into the Chain-ofThought (CoT) and leverages a hierarchical structured OptReward to achieve RLVR training with strong optimization generalization. Through this framework, MiniOpt formulates the pipeline from natural language problems to executable solver code as a single, end-to-end verifiable task. B. Reasoning-to-Model-and-Solve Paradigm As shown in subfigure (a) in Figure 1, we introduce a reasoning-to-model-and-solve paradigm that turns a natural language optimization problem into a single verifiable objective. The paradigm is enforced by two compulsory and parsable segments <think> . . . </think> and <answer> . . . </answer>. The first segment, enclosed by <think>

JOURNAL OF LATEX CLASS FILES

3

(a) Reasoning to Model and Solve Paradigm

(c) Efficient Training for Optimization Generalization

Optimization Problem:

OptReward Make Intermediate Process Easy to Verify

A school is planning its budget for the upcoming academic year. The main expense categories are...

MiniOpt

Format Score

The integrity of the <think> tags in the response

<think> We need to formulate it as an integer linear programming problem ... **Five-Element Model**: - ## Variables: ... - ## Objective: ... - ## Constraints: ... - ## Sets: ... - ## Parameters: ... ... The best choice is ``cbc`` solver ... </think> <answer> ```python from pyomo.environ import … ``` </answer>

OptReward

Five-element Score The integrity of the five-element math model

 Reasoning Rationality  Modeling Correctness  Solving Accuracy

Accuracy Score The executability and solving accuracy of code

OptGRPO Adapting GRPO to RL Training for Optimization Problems 𝒥𝒥𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂𝑂 𝜃𝜃 = 𝔼𝔼𝑞𝑞~𝑃𝑃 𝑄𝑄 ,{𝑜𝑜 }𝐺𝐺 ~𝜋𝜋 𝑖𝑖 𝑖𝑖=1

𝑜𝑜𝑜𝑜𝑜𝑜 (�|𝑞𝑞)

𝐺𝐺 |𝑜𝑜𝑖𝑖 |

1 �� ∑𝐺𝐺𝑖𝑖=1 |𝑜𝑜𝑖𝑖 | 𝑖𝑖=1 𝑡𝑡=1

𝜋𝜋𝜃𝜃 (𝑜𝑜𝑖𝑖,𝑡𝑡 |𝑞𝑞, 𝑜𝑜𝑖𝑖,<𝑡𝑡 ) 𝜋𝜋𝜃𝜃 (𝑜𝑜𝑖𝑖,𝑡𝑡 |𝑞𝑞, 𝑜𝑜𝑖𝑖,<𝑡𝑡 ) 𝐴𝐴̂ , 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 , 1 − 𝜀𝜀𝑙𝑙𝑙𝑙𝑙𝑙 , 1 + 𝜀𝜀ℎ𝑖𝑖𝑖𝑖𝑖 𝐴𝐴̂ 𝑖𝑖,𝑡𝑡 ] min[ 𝜋𝜋𝜃𝜃𝑜𝑜𝑜𝑜𝑜𝑜 (𝑜𝑜𝑖𝑖,𝑡𝑡 |𝑞𝑞, 𝑜𝑜𝑖𝑖,<𝑡𝑡 ) 𝑖𝑖,𝑡𝑡 𝜋𝜋𝜃𝜃𝑜𝑜𝑜𝑜𝑜𝑜 (𝑜𝑜𝑖𝑖,𝑡𝑡 |𝑞𝑞, 𝑜𝑜𝑖𝑖,<𝑡𝑡 )

MiniOpt trains the small-scale LLM with high optimization generalization performance. The five-element math model is automatically generated and a solver is adaptively selected. The Pyomo code generated by the model can accurately model and solve the original problem.

Remove KL penalty to discover high-reward behaviors quickly

The asymmetric clipping Accumulate loss over tokens allows the rare but crucial to improve sample efficiency reasoning/code token to grow under limited budgets

(b) MiniOpt Training Pipeline with SFT Warm-up and Two-stage RL Mid-training SFT Warm-up

LLM-3B Endow the model with

Small-scale knowledge in the Model operational optimization

RL Stage-1

RL Stage-2

Fast-adapting

Peak-chasing

OptReward, OptGRPO

OptReward, OptGRPO

Rapidly learn the model-and-solve paradigm

Optimization generalization improvement

MiniOpt-3B

Strong Optimization Generalization & Low Inference Cost

Fig. 1: An overview of the proposed MiniOpt training paradigm. Sub-figure (a) demonstrates the reasoning-to-model-and-solve paradigm of MiniOpt, encompassing problem modeling and solver adaptation during the thinking (i.e., reasoning) process of RL, and solution code generation in the response. Sub-figure (b) illustrates the training pipeline of MiniOpt, which involves sequential execution of SFT (mid-training) as warm-up followed by two-stage RL (post-training). Sub-figure (c) presents the reward function OptReward and training algorithm OptGRPO used in MiniOpt’s RL training.

. . . </think>, contains all modeling-related contents. It analyzes the problem statement, specifies a verifiable five-element optimization formulation, and determines an appropriate opensource solver. Specifically, the optimization problem can be described as the following formulation: min

x∈X ⊆RD

f (x) , s.t. G(x) ≤ c ,

(1)

where x ∈ X ⊆ RD denotes the D-dimensional decision variable, and I = {1, 2, . . . , D} is the index set. X is the feasible region and c ∈ Rm provides the upper bounds. The constants in objective function f (x) and constraints G(x) form the parameter set, which also includes c. The five-element formulation, M =(Variables, Objective, Constraints,Sets, Parameters) maps one-to-one to the components of an optimization problem. Sets determine the dimensions and naming of decision and constraint families. Parameters supply exogenous constants such as costs, coefficients, budgets, and demands. Variables specify domains and bounds (e.g., continuous, nonnegative, integer, or binary), which jointly define the feasible region X . Domain-type restrictions such as “positive integers” may equivalently be encoded as explicit constraints, and our parser maps both styles to X . Objective gives the minimization or maximization expression, and Constraints provide

named families of linear or nonlinear equalities/inequalities composing G and the bound vector c. During the reasoning process, to enhance the capability of LLM for solving optimization problems across diverse optimization types, it analyzes the problem during the reasoning phase and selects different open-source solvers for the given problem depending on the optimization types and the characteristics of the solvers, thereby improving the match between the problem and the selected solver. Solver selection is guided by a prompt, which is introduced in the supplementary material. The second segment, enclosed by <answer> . . . </answer>, converts the five-element formulation into an executable Pyomo program that models the problem, invokes the solver, solves the instance, and prints the numerical answer. By constraining responses in this manner, we collapse the action space from free-form language to a programmable artifact whose intermediate structure and final result can be deterministically parsed and verified. The <answer> segment must implement the blueprint as a single Python code fence that contains a complete Pyomo script. Because these outputs are easy to parse and verify, OptReward in Section III-D1 can automatically score the response format, the five-element formulation and the numerical accuracy based on rules through

JOURNAL OF LATEX CLASS FILES

an automated procedure, providing low-cost supervision. The prompt used for this paradigm is provided in the supplementary material. C. Training Pipeline of MiniOpt Based on the paradigm described in Section III-B and the key techniques introduced in Section III-D, we propose a training pipeline that enables MiniOpt to learn from limited resource constraints while achieving powerful solving performance and strong optimization generalization. This pipeline begins with a lightweight SFT as mid-training followed by a two-stage RL under OptReward. The illustration of the training pipeline is shown in subfigure (b) of Figure 1. 1) Mid-Training based on SFT: LLMs acquire broad knowledge through large-scale general pretraining. However, for specialized domains, small-scale models often struggle to cultivate the necessary capabilities effectively or comprehensively. Mid-training serves as a bridge between pretraining and subsequent training stages, strengthening domain-specific skills through targeted training data [35]. In the proposed training pipeline, the mid-training phase employs a small-scale and diverse dataset from the operational optimization field to conduct SFT on the base model, thereby providing effective modeling and solving trajectories for the subsequent two-stage RL training. This SFT warm-up does not adopt the reasoning-to-modeland-solve paradigm introduced in Section III-B. Instead, it establishes a starting point upon which our two-stage RL can subsequently focus on paradigm acquisition and optimization generalization. For each instance, we prompt Qwen2.5-Coder32B-Instruct [36] using the prompt in supplementary material to rewrite the original GurobiPy program into an equivalent Pyomo implementation and to select an appropriate opensource solver according to the detected structure. Every rewritten instance is executed and only those that compile, solve, and print the correct structure are retained, the obtained dataset is referred to as OptMATH-Train-Pyomo. The remaining data serves as a candidate pool for the next stage of the twostage RL training. Based on the annotations of optimization types and problem-scenario tags assigned to each sample in this paper, the training data for mid-training are constructed from a small-scale subset of OptMATH-Train-Pyomo. Within this subset, we ensure an equal number of linear and nonlinear problems. Since nonlinear problems are scarce in OPTMATHTrain, we supplement the shortfall with MILP problems in the dataset to reach the desired equal distribution. Additionally, all samples labelled as ”unknown” are included to preserve both the difficulty and diversity of the data source during the warm-up training phase. The prompt used for data annotation is provided in supplementary material. 2) The Two-Stage RL: After the SFT phase, the models can undergo RL training more effectively. We employ a two-stage RL training under the same reward function (OptReward) for paradigm acquisition and optimization generalization, respectively. Both stages share the pipeline of parsing, executing, and scoring in Section III-B and the OptReward of Sections III-D1, they differ in training data and hyperparameter setting. Algo-

4

rithmically, both stages use the same OptGRPO (cf. paragraphs in Section III-D2). Stage-1 aims to enable the model to acquire the reasoningto-model-and-solve paradigm: the model must generate a valid <think> / <answer> pair, produce the executable Pyomo code, and make a coherent solver choice. To this end we train on 1,585 relatively easy problems, so that most signal arises from the formatting and structural components of OptReward, rapidly improving executability and the ability to solve the optimization problem of natural language description. Stage-2 focuses on optimization generalization once the paradigm is established. The training distribution shifts to the problems with diverse optimization types and problem scenarios, and the optimization emphasis moves to the accuracy score, encouraging refined modeling and solving behaviors (e.g., variable/constraint formulation and solver selection). We sample a data subset from the candidate pool mentioned in Section III-C1 subject to two constraints: (i) type-uniform coverage, with exactly 600 instances per type, and (ii) within each type, the scenario frequencies match the distribution in the full dataset. The resulting data serves as the Stage-2 RL training set. The dataset for the first stage is the union of the NL4Opt [37] and ICML Competition [38] training splits. Detailed information on the construction of the training set is provided in the supplementary material. Such a training strategy makes efficient use of limited data and reduces training costs, and ultimately allows for strong optimization generalization of LLMs with even small parameters and limited computational resources. D. Efficient Training for Optimization Generalization Building upon the reasoning-to-model-and-solve paradigm mentioned in Section III-B, we propose two key components for the RL training of MiniOpt as shown in subfigure (c) in Figure 1: An informative and easily verifiable reward function OptReward, and an improved algorithm OptGRPO builds upon GRPO [39]. 1) OptReward: Verifiable Rewards Designed for MiniOpt: Building upon the reasoning-to-model-and-solve pipeline, we propose OptReward as the core mechanism for RLVR training, serving not only as a verification tool for optimization modeling but also as a gating mechanism to control the stages of RL training. It comprises three automatically computed components: format correctness, structural completeness, and numerical accuracy. Each component is derived from the deterministic parsing or execution of the model’s output, which not only ensures the completeness of the problem modeling but also enables verification to scale with computational time, substantially reducing the overall verification cost. Format Score: The format score Sfmt validates the response format. A response must contain exactly one <think>. . . </think> and one <answer>. . . </answer> in the correct order. If all conditions hold, we assign Sfmt = +1, otherwise Sfmt = −1. If the specified format is not present in the response, we deterministically set the remaining components to their error defaults, Sfive = −1 and Sacc = −2, so that the total reward

JOURNAL OF LATEX CLASS FILES

5

immediately reaches the global minimum. This forces the model to adopt the correct response format early in training and prevents expensive evaluation of malformed samples. Five-element Score: To avoid ground-truth labeling of five-element content and the bias it may introduce, we use a presence-based rule aligned with the paradigm in Section III-B. Conditional on valid formatting, we compute the five-element score Sfive . In the <think> segment, the model response is expected to include five labelled summaries starting with “## Sets:”, “## Parameters:”, “## Variables:”, “## Objective:”, and “## Constraints:”. Each present summary contributes 0.2 points to the score; if none is present, we assign Sfive = −1. This structure shaping keeps the modeling blueprint parsable.  5 5 X X   0.2 I , if Ik ≥ 1 ,  k  k=1 k=1 Sfive = (2) 5 X     if Ik = 0 , −1, k=1

where Ik = 1 if the k-th required element ek is present in the <think> segment, and Ik = 0 otherwise. (e1 , . . . , e5 ) =(Sets, Parameters, Variables, Objective, Constraints). Accuracy Score: The accuracy score is obtained by executing the Pyomo program contained in <answer>. If the program cannot be extracted or execution fails, we assign Sacc = −2. When execution succeeds, we retrieve the optimal objective value fˆ from the model output and compare it with the ground-truth value f ⋆ ; if they are equal, we assign Sacc = 2, otherwise Sacc = −1.5.  +2,    Sacc = −1.5,    −2,

if execution succeeds and fˆ = f ⋆ ,

the model’s ability to discriminate between correct and incorrect solutions. Similarly, the standard KL divergence penalty inherently restricts the exploration capacity of the policy model. To address these limitations, we set the coefficient on the KL penalty β = 0 to remove the KL penalty to encourage greater exploration by the model, and replace symmetric clipping with an asymmetric interval [1 − εlow , 1 + εhigh ] with a higher upper clipping threshold εhigh than the lower threshold εlow , to encourage the exploration of low-probability (yet potentially optimal) patterns. This relaxes the trust region on probability increases while keeping a firm lower bound on decreases, which empirically improves executability in stage-1 RL training and supports generalization in stage-2 RL training. Specifically, we raise εhigh to 0.28 during the training. Although a higher clipping threshold may potentially introduce high variance, training stability is empirically guaranteed because the modeling format of the rollouts is already strictly constrained by the five-element tuple structure within the CoT. Furthermore, we adopt a token-level policy gradient loss computation. This design amplifies the reward signals for valid solution patterns, ensuring that high-quality reasoning trajectories are not disproportionately penalized or underestimated, thereby providing a more precise and granular reward signal for the target solving behaviors. Ultimately, through OptGRPO, the reasoning-to-model-and-solve training paradigm is executed with significantly enhanced efficiency and efficacy. The final loss of OptGRPO is as follows:

JOptGRPO (θ) = Eq∼P (Q),{oi }G i=1 ∼πθ

By OptReward, the format score enforces the strict <think> / <answer> format, the five-element score shapes a complete modeling blueprint in the think phase, and the accuracy score certifies correctness through equality of optimal objective values, enabling low-cost verifiable RL for problems in the field of optimization. 2) OptGRPO: Training Small-Scale LLMs with Limited Resources: Considering the specific requirements of the task, we build upon the reasoning-to-model-and-solve paradigm and OptReward to refine the GRPO algorithm, introducing the OptGRPO. In the second stage of RL, MiniOpt is dedicated to exploring complex problem-solving patterns. In this context, a symmetrically designed upper bound for importance weight clipping can induce premature convergence, thereby hindering

old

|oi | G X X

(·|q) PG i=1 |oi | i=1 t=1

(5) min[ρθ Âi,t , clip(ρθ , 1 − εlow , 1 + εhigh )Âi,t ] ,

if execution succeeds but fˆ ̸= f ⋆ ,

if no executable code or execution fails . (3) Combining the components with the formatting gate yields the total OptReward as follows: ( −4, if Sfmt = −1, (4) R= Sfmt + Sfive + Sacc , if Sfmt = 1.

1

ρθ =

πθ (oi,t |q, oi,<t ) . πθold (oi,t |q, oi,<t )

(6)

IV. E XPERIMENTS We evaluate MiniOpt models on diverse optimization benchmarks spanning multiple types and scenarios to assess whether small-scale parameter LLMs (3B/7B) can achieve strong optimization generalization ability. To evaluate solution correctness, we report Solving Accuracy (SA) as the primary metric, SA measures the proportion of generated code samples whose execution results match the ground-truth optimal solutions provided by the benchmarks. A solution is deemed correct if the returned optimal objective value matches the reference solution within a tolerance of 10−1 ; otherwise, it is considered unsuccessful. Comparisons cover general LLMs, general reasoning LLMs, promptingbased baselines and learning-based baselines. The experiments are designed to answer the following four research questions. (Q1) Optimization Generalization Ability at Small-Scale LLMs. To what extent can MiniOpt at 3B/7B achieve high SA and ER across types and scenarios, and how does it compare with larger reasoning LLMs and prior learning-based approaches?

JOURNAL OF LATEX CLASS FILES

(Q2) Pareto Front of Performance vs. Cost. What is the limit of the scale of model parameters for achieving strong optimization generalization? (Q3) Importance of Each Stage in the Training Pipeline of MiniOpt. How critical are the lightweight SFT warm-up and the two-stage RL to the performance of MiniOpt? (Q4) Importance of the OptReward and OptGRPO. How does the proposed OptReward and OptGRPO in MiniOpt contribute to boost SA and ER in modeling and solving optimization problems? The four questions are answered sequentially in the following sections. We first provide a detailed description of the experimental setup and then present extensive analyses of the results. The code is available at https://github.com/Hsiang1/MiniOpt. A. Experimental Setup Since widely used packages such as Gurobi and COPT are closed-source, generating code for them may entail licensing costs, and a model’s generalization ability across different modeling languages and solvers depends on the proportion of relevant data in its pretraining and post-training corpora. Therefore, we adopted the open-source, solver-agnostic Pyomo modeling language as the language for our training and inference solver code. As for the solvers employed, the key consideration lies in their ability to select the appropriate solver for a specific optimization type. Therefore, this paper selects four types of solvers to cover the solving requirements of as many optimization problem types as possible, so as to automatically adapt to the problem types when generating the solving code. The training configuration of MiniOpt is as follows: SFT is conducted for 4 epochs; the first stage of RL involves 45 training steps, while the second stage consists of 25 steps. During inference, a temperature of 0.7 is applied. For additional experimental settings, please refer to the repository mentioned in the abstract of this paper. The evaluation encompasses eight benchmarks about operational optimization: NL4Opt [37], Mamo (Easy and Complex subsets, abbreviated as Mamo.E and Mamo.C, respectively) [16], IndustryOR [40], NLP4LP [14], ComplexOR [19], OptiBench [18], and ICML Competition (ICML.C) [38]. We follow the same setting in LLMOPT [6] to ensure consistency and comparability. For the newly included dataset, OptiBench and ICML Competition, we adhere to their original data splits provided by the authors. B. Analysis of Optimization Generalization In this section, we compare MiniOpt with general LLMs (Qwen2.5, DeepSeek-V3), general thinking LLMs (Qwen3, DeepSeek-R1, Gemini-2.5-Pro, GPT5), prompt-based methods (Chain of Experts, OptiMUS, Reflexion), learning-based methods (OptMATH-7B, LLMOPT-14B, Step-OPT-7B/3B), demonstrating the optimization generalization capability of MiniOpt. Table I summarizes SA on eight benchmarks that span 7 optimization types and 22 scenarios. The information on these methods and the statistics on problem categories and scenarios of benchmarks are provided in supplementary

6

material, as well as the Executable Rate metrics for all the methods on the 8 benchmarks and its analysis. Overall Performance (Answer to Q1). Across all eight benchmarks, MiniOpt-7B achieves the strongest average performance among all baselines. Notably, MiniOpt-3B surpasses all prompt-based and general methods. For example, compared to Gemini-2.5-Pro, the state-of-the-art general thinking model, MiniOpt-3B achieved an average SA of 2.26% higher. Compared to DeepSeek-V3 and DeepSeek-R1, MiniOpt-3B scored 0.49% and 1.20% lower, respectively. Furthermore, MiniOpt-7B achieves the highest average SA of 64.76%, significantly raising the performance ceiling of MiniOpt in practical applications. Competitiveness of Small-Scale Models (Answer to Q1). MiniOpt remains competitive even at smaller scales. MiniOpt3B reaches an average SA of 59.65%, which already matches several much larger reasoning models (e.g., the average SA higher than GPT-5 at 57.54%) and clearly outperforming general-purpose 14B pre-trained models (e.g., +12.19% over Qwen2.5-14B-Instruct on average). Performance grows smoothly with scale under the same training pipeline, the average SA increase by +5.11% when the model size grows from 3B to 7B. Challenging Benchmarks (Answer to Q1). On the most demanding sets that require faithful modeling and solver usage, MiniOpt shows clear advantages. On the latest challenging benchmark Mamo.Complex, MiniOpt-3B and -7B achieve 47.39% and 51.18% SA, respectively, outperforming all the general models and general thinking models. Even on extremely high-dimensional test sets such as Indus.OR, where the smaller MiniOpt models do not achieve the highest SA because of their limited instruction-following capability, it still delivers competitive performance levels in both metrics. Breadth across Types and Scenarios (Answer to Q1). To rigorously evaluate optimization generalization, we benchmark MiniOpt-3B and MiniOpt-7B across three difficulty tiers: simple (ICML.C), medium (OptiBench), and hard (Mamo.C). The evaluation encompasses diverse application scenarios (Supply Chain, Transportation, Resource) and problem formulations (LP, IP, MILP). The results highlight a clear scaling law within our framework. While MiniOpt-3B demonstrates competent baseline performance on simpler tasks (e.g., 94% in Transportation and 93% in Resource on ICML.C), MiniOpt-7B consistently bridges the gap on complex reasoning tasks. On the ICML.C, the 7B variant elevates MILP accuracy from 31% to 50%. This scaling advantage persists under increased difficulty; on the hard-difficulty Mamo.C benchmark, MiniOpt-7B maintains a 10% to 13% absolute improvement over the 3B model in LP, IP, and MILP formulations. Furthermore, both models exhibit remarkable robustness in Resource scenarios, with the 7B model sustaining a 75% success rate even on the most complex tasks. These findings validate that MiniOpt provides a scalable and reliable foundation for LLM-based optimization modeling. C. Pareto Front of Performance vs. Cost Analysis of the Pareto Front (Answer to Q2). Figure 2 indicates that the MiniOpt family (represented by the solid red

JOURNAL OF LATEX CLASS FILES

7

TABLE I: Comparison of the SA metric across 8 benchmarks with rankings (NL4Opt, ICML Competition, Mamo Easy, Mamo Complex, NLP4LP, ComplexOR, IndustryOR, OptiBench). Bold indicates 1st, wavy underline indicates 2nd, underline indicates :::::::::::: 3rd. “Rank∗ ” represents the result of sorting methods among parameter sizes below 10B. Category

Models / Methods

Avg.

Rank Rank∗ NL4Opt ICML.C Mamo.E Mamo.C NLP4LP Com.OR Indus.OR OptiBench

General Models

Qwen2.5-3B-Instruct Qwen2.5-7B-Instruct Qwen2.5-14B-Instruct DeepSeek-V3 (671B)

11.23 33.20 47.46 60.14

18 14 10 3

9 6 -

19.13 53.48 67.39 78.26

18.78 51.71 63.17 77.56

17.18 35.58 80.21 84.82

2.37 4.27 15.64 26.54

18.60 55.37 67.36 79.34

0.00 16.67 22.22 44.44

2.00 13.00 22.00 26.00

11.74 35.54 41.65 64.13

Qwen3-4B Qwen3-8B General Models Qwen3-14B (Thinking) DeepSeek-R1 (671B) Gemini-2.5-Pro GPT-5

11.16 21.79 23.78 60.85 ::: 57.39 57.54

19 16 15 2 7 6

8 7 -

16.52 30.87 24.35 83.91 78.26 80.43

17.56 29.51 22.68 75.37 71.22 73.66

13.80 23.93 36.20 74.54 65.95 58.12

6.64 9.95 11.37 39.81 30.81 23.22

15.29 34.71 19.42 69.83 73.55 73.14

5.56 11.11 38.89 44.44 50.00 ::: 61.11

2.00 6.00 15.00 32.00 28.00 26.00

11.90 28.26 22.31 66.94 61.32 64.63 :::

Prompt-based Methods

Chain-of-Experts OptiMUS Reflexion

45.78 20.65 45.54

11 17 12

-

66.52 13.48 56.52

56.59 33.17 52.20

63.65 37.27 84.82

22.75 11.85 18.01

59.09 18.18 53.72

33.33 16.67 38.89

19.00 8.00 19.00

45.29 26.61 41.16

Learning-based Models

Step-OPT-Qwen2.5-3B Step-OPT-Qwen2.5-7B OptMATH-7B LLMOPT-14B

39.76 52.22 54.62 60.10

13 9 8 4

5 4 3 -

41.30 77.83 78.70 80.28

38.54 57.32 66.83 75.35

75.31 69.33 84.20 89.53

20.85 50.24 ::: 34.12 44.08

53.31 48.35 68.60 73.42

27.78 38.89 33.33 35.29

21.00 27.00 19.00 29.00

40.00 48.76 52.23 53.83

MiniOpt-3B MiniOpt-7B

59.65 64.76

5 1

2 1

93.04 ::: 95.22

78.05 ::: 83.41

84.36 89.57

47.39 51.18

74.38 74.79

27.78 38.89

17.00 25.00

55.21 60.00

Ours

:::

:::

:::

TABLE II: Ablation study (MiniOpt-3B) on the SA metric across 8 benchmarks. Herein, “w” denotes “with” and “w/o” denotes “without”. Category

Model / Method

MiniOpt-3B MiniOpt-3B w/o SFT Warm-up MiniOpt-3B w/o RL MiniOpt-3B w/o Two-stage RL Ablations MiniOpt-3B w/ Random Selection MiniOpt-3B w/o OptReward MiniOpt-3B w/ GRPO

Avg.

NL4Opt ICML.C Mamo.E Mamo.C NLP4LP Com.OR Indus.OR OptiBench

59.65 56.60 27.24 55.07 58.33 57.96 56.54

93.04 89.13 40.00 89.13 93.04 89.13 90.43

78.05 76.83 35.37 73.41 79.02 76.34 77.07

line) lies on the empirical Pareto frontier among the compared open-weight methods in the performance-versus-cost trade-off. Since the parameter size of GPT-5 and Gemini-2.5-Pro have not been disclosed, we do not label these two models in the figures.

As the scale of the model increases, the average SA performance of MiniOpt also grows steadily. It achieves a comprehensive performance lead while having substantially fewer parameters than top-tier general reasoning models such as DeepSeek-R1 and learning-based model LLMOPT-14B. Compared to the similar modeling and solving model Step-OPT, Step-OPT-Qwen2.5-7B achieves an average SA of 52.22% across 8 benchmarks, while the proposed MiniOpt attains an average SA of 64.76%. When the parameter scale of both models is reduced to 3B, Step-OPT-Qwen2.5-3B exhibits a performance drop of 12.46%, while MiniOpt only decreases by 5.11%. This indicates that the key advantage of MiniOpt lies in its ability to maintain superior performance even with a reduced parameter scale. From the perspective of capability density [41], MiniOpt effectively achieves lower parameter requirements and inference costs while preserving comparable performance.

84.36 84.36 50.15 79.75 82.06 83.90 80.06

47.39 28.44 3.79 33.18 48.34 38.86 45.02

74.38 72.73 41.74 74.79 73.97 72.73 73.55

27.78 27.78 11.11 22.22 16.67 33.33 16.67

17.00 19.00 7.00 16.00 17.00 16.00 14.00

55.21 54.55 28.76 52.07 56.53 53.39 55.54

D. Ablation Study We ablate core components of MiniOpt-3B and report results of the SA metric in Table II and the ER metric in Table S4 in supplementary material, where “w” denotes “with” and “w/o” denotes “without”. As evidenced in Table II, each module of the proposed reasoning-to-model-and-solve paradigm demonstrates substantial contributions to model and solve optimization problems with smaller-scale models under limited training resources. Among these, Importance of the Training Pipeline of MiniOpt (Answer to Q3). In the training pipeline of MiniOpt, each module plays a distinct role in improving SA and ER. First, the SFT warmup of mid-training phase provides a better starting point for RL training. Without it, averages for SA fall to 56.60%. The decreases are ∆SA=–3.05. Second, collapsing the two-stage RL removes the progressive training that first consolidates the paradigm (stage-1) and then targets generalization (stage-2), the average SA drop to 55.07% and the average ER of 82.73% (∆ SA=–4.58%, ∆ ER=–5.19%). Finally, reverting our OptGRPO to the original GRPO further decreases both metrics, the average SA of 56.54% and ER of 82.35%. Together these changes of OptGRPO improve sample efficiency and training stability, which is critical for eliciting strong optimization

JOURNAL OF LATEX CLASS FILES

8

TABLE III: Comparison of the SA metric between MiniOpt-1.5B and larger scale counterparts across 8 benchmarks. Avg.

Solving Accuracy (SA)

NL4Opt ICML.C Mamo.E Mamo.C NLP4LP Com.OR Indus.OR OptiBench

Number of Samples in Datasets MiniOpt-1.5B Ours MiniOpt-3B MiniOpt-7B

50.33 59.65 64.76

230

410

652

211

242

18

100

605

88.7 93.04 95.22

72.2 78.05 83.41

78.99 84.36 89.57

8.06 47.39 51.18

71.07 74.38 74.79

16.67 27.78 38.89

16 17.00 25.00

50.91 55.21 60.00

'HHS6HHN5

3.0

'HHS6HHN9

2.5

Training dynamics of reward value

0LQL2SW% //0237%

0LQL2SW%

6ROYLQJ$FFXUDF\ 



Reward

2SW0$7+% 6WHS2374ZHQ%

2.0

0.110 0.105

1.5

4ZHQ%,QVWUXFW

5HIOH[LRQ

0.115

Entropy



Training dynamics of Policy Entropy 0.120

0.100 1.0 0.095

&KDLQRI([SHUWV 

0

6WHS2374ZHQ%

4ZHQ% *HQHUDO0RGHOV *HQHUDO0RGHOV 7KLQNLQJ 3URPSWEDVHG0HWKRGV /HDUQLQJEDVHG0RGHOV 2XUV

2SWL086 4ZHQ%

 



Step

15

20

25

0

5

Acc. score: +1, -1, -1

10

Step

15

20

25

Acc. score: +2, -0, -1

Fig. 3: Comparison of training dynamics of reward values and policy entropy for MiniOpt-3B under different reward function settings during the second stage of RL training.





10

Acc. score: +2, -1.5, -2 (Miniopt-3B)

4ZHQ%,QVWUXFW

4ZHQ%

5





3DUDPHWHU6L]H %

6ROYLQJ$FFXUDF\YV3DUDPHWHU6L]H Fig. 2: Comparison of average SA against model parameter scales for various methods. MiniOpt is the Pareto optimal among methods (with open-weight models).

generalization at small parameter scales. Importance of the OptReward (Answer to Q4). RL provides the most significant improvement, highlighting the importance of the proposed paradigm. The reasoning-tomodel-and-solve paradigm and OptReward together turn freeform generation into a verifiable formulation that is easy to verify. Removing the OptReward and keeping only a finalanswer signal (w/o OptReward) drops the average to 57.96% and 85.31% (∆ SA=–1.69%, ∆ ER= –2.61%), respectively. The largest losses appear where the problems are challenging: Mamo Complex (∆ SA = –8.53%, ∆ ER = -8.52%). These patterns align with the roles of the three reward components: the format score enforces the response contains complete and properly structured <think> and <answer> sections; the five-element score shapes the intermediate blueprint, so the model learns to extract problem structure before coding; the Accuracy Score certifies numerical correctness by executing the Pyomo code and comparing the returned optimum with the reference. Although the absolute performance gain of OptReward is smaller than that of the training pipeline, OptReward is indispensable because it provides the verifiable supervision signal that enables RL training without chain-ofthought annotations.

V. D ISCUSSIONS Sensitivity Analysis of the Accuracy Reward Design. To investigate whether the effectiveness of OptReward depends on a specific reward assignment, we replace the original accuracy reward setting ((2,-1.5,-2)) with two alternative configurations, namely ((2,0,-1)) and ((1,-1,-1)). Figure 3 illustrates the training dynamics in terms of reward convergence and policy entropy, while Table IV reports the final solving accuracy (SA). First, the ((2,0,-1)) setting achieves a noticeably higher converged reward than the original design, while yielding nearly identical SA. The increase in converged reward should not be interpreted as an improvement in optimization capability. Since incorrect solutions receive a neutral reward instead of a penalty, the expected reward distribution is shifted upward. Consequently, higher reward values are partially caused by reward rescaling rather than improved policy quality. The most significant performance drop is observed under the ((1,1,-1)) setting, where SA decreases by 2.25%. These results demonstrate that the effectiveness of OptReward relies on maintaining a hierarchical reward structure that progressively differentiates execution failures, incorrect solutions, and correct solutions. Such a design provides informative intermediate supervision and enables stable policy optimization, which is crucial for achieving strong optimization generalization under limited training resources. For more detailed analysis, please refer to the supplementary materials. Ablation on OptGRPO and Training Dynamics Analysis. Empirical results (Section IV-D) demonstrate that OptGRPO consistently yields higher SA on downstream benchmarks compared to the vanilla GRPO. To better understand the reason for this improvement, we monitor the training dynamics by tracking both the reward function values and the policy entropy throughout the RL training process, as illustrated in Figure 4. While both GRPO and OptGRPO eventually converge to

JOURNAL OF LATEX CLASS FILES

9

TABLE IV: Sensitivity analysis of the accuracy reward design. ∆1 denotes the reward gap between correct and incorrect solutions, while ∆2 denotes the reward gap between incorrect solutions and execution failures. Reward Setting

∆1 (Rc − Ri )

∆2 (Ri − Rf )

Reward Convergence

Entropy Convergence

SA (%)

3.5 2.0 2.0

0.5 1.0 0.0

2.65 3.20 2.35

0.110 0.097 0.101

59.65 59.36 57.40

Original (2, −1.5, −2) Variant A (2, 0, −1) Variant B (1, −1, −1)

Training dynamics of reward value

2.75

Training dynamics of Policy Entropy

0.12

2.50 2.25

0.10

Reward

Entropy

2.00 1.75 1.50

0.08 0.06

1.25 1.00

0.04

0.75 0

5

10

Step

15

20

25 Ablation w/ GRPO

0

5

10

Step

15

20

25

MiniOpt-3B

Fig. 4: Comparison of training dynamics of reward function values and policy entropy between GRPO and OptGRPO during the second stage of RL training.

comparable reward values, their entropy trajectories diverge significantly. Standard GRPO exhibits a precipitous drop in entropy, indicative of premature policy collapse. In contrast, OptGRPO maintains a higher policy entropy throughout training, which encourages exploration of diverse reasoning trajectories. Optimization problems often possess complex, non-convex search spaces where multiple valid modeling paradigms exist. A premature drop in entropy restricts the policy to a narrow set of high-probability, yet potentially sub-optimal, reasoning trajectories. We hypothesize that maintaining higher policy entropy contributes to stronger optimization generalization by encouraging exploration of diverse reasoning trajectories. Exploration of Models with Smaller (Fewer than 3B) Parameter Scale. To further explore the performance of MiniOpt with smaller (fewer than 3B) parameter scales, thereby better balancing the trade-off between parameters and performance, we deploy MiniOpt-1.5B with the same reasoning-tomodel-and-solve paradigm (Section III-B), OptReward (Section III-D1), and training pipeline (Section III-C). The results shown in Table III and S5 in supplementary material show that when the model scale is reduced from 3B to 1.5B, MiniOpt achieves an average SA of 50.33% and an average ER of 86.44% across the 8 benchmarks, remains competitive with learning-based methods and general-purpose models with substantially larger parameter scales. Dimensionality Scalability Issue. Our experimental results show that MiniOpt-3B can successfully formulate optimization problems whose parameter dimensionality reaches 80. Although such dimensionalities are still modest from the perspective of large-scale optimization, they already pose substantial reasoning and modeling challenges for compact language models. This shows a remarkably strong performance for models of such limited scale, which highlights that MiniOpt paradigm effectively enhances the model’s optimization mod-

eling capacity and retains robust generalization even in highdimensional settings. For problems with even higher dimensionality, the descriptions of numerical parameters typically become substantially longer. Such extended input sequences inherently pose a significant challenge to the comprehension capabilities of small-scale models. Cost Savings of MiniOpt and Generality of Base Models. To validate the high efficiency of the MiniOpt model during inference, we compare the token consumption of the two reasoning-based models, MiniOpt-3B and Deepseek-R1, across benchmarks of varying difficulty levels. Based on the average solving accuracy in the Table I, we select the easydifficulty dataset ICML.C, the medium-difficulty benchmark OptiBench, and the hard-difficulty benchmark Mamo.C. On these three datasets, MiniOpt-3B achieves an average accuracy only 1.20 percentage points lower than Deepseek-R1, while reducing average token consumption by 75.61%. Furthermore, as problem difficulty increases, the token savings become more pronounced: from 1177.28 tokens saved on ICML.C, to 2059.25 on OptiBench, and to 4678.95 on Mamo.C. When the parameter scale is increased to 7B, MiniOpt achieves an average SA that is 4.15 percentage points higher than Deepseek-R1 across the three datasets, while consuming only 24.40% of the average output tokens required by DeepseekR1. General Capability Retention. To evaluate whether optimization-oriented RL training impairs other capabilities of the base model, we additionally evaluate MiniOpt-3B on six widely used benchmarks covering mathematical reasoning, knowledge understanding, reading comprehension, question answering, and code generation. The results show no degradation and an average improvement of 1.24%, indicating that optimization-oriented RL training does not compromise the model’s general capabilities. Detailed benchmark results are provided in the supplementary material. VI. C ONCLUSION This paper proposes MiniOpt, a novel reasoning-to-modeland-solve paradigm and the corresponding small-scale models MiniOpt-3B and MiniOpt-7B. The proposed models achieve competitive or even superior performance under limited computational resources. MiniOpt requires less data volume and less detailed annotation during training, resulting in significantly lower computational costs for both training and inference. We explore the optimization generalization of the model in various types of optimization, problem scenarios, and a wide range of fields. The experimental results show that MiniOpt exhibits strong generalization performance under these varying

JOURNAL OF LATEX CLASS FILES

conditions, and it can achieve higher performance with fewer tokens. Notably, this study explores the minimum parameter scale at which MiniOpt maintains competitive performance. Among the investigated model scales, MiniOpt-3B provides the best balance between optimization performance and computational efficiency. R EFERENCES [1] W. Song, X. Chen, Q. Li, and Z. Cao, “Flexible job-shop scheduling via graph neural network and deep reinforcement learning,” IEEE Transactions on Industrial Informatics, vol. 19, no. 2, pp. 1600–1610, 2023. [2] K. Li, F. Liu, Z. Wang, X. Tong, X. Han, M. Yuan, and Q. Zhang, “Ars: Automatic routing solver with large language models,” CoRR, vol. abs/2502.15359, 2025. [3] H. Deng, B. Zheng, Y. Jiang, and T. H. Tran, “CAFA: Coding as auto-formulation can boost large language models in solving linear programming problem,” in The 4th Workshop on Mathematical Reasoning and AI at NeurIPS’24, 2024. [Online]. Available: https: //openreview.net/forum?id=xC2xtBLmri [4] Y. Sun, F. Ye, X. Zhang, S. Huang, B. Zhang, K. Wei, and S. Cai, “AutoSAT: Automatically optimize SAT solvers via large language models,” CoRR, vol. abs/2402.10705, 2024. [5] J. Li, Y. Chu, Y. Sun, M. Zou, and S. Cai, “AutoPBO: LLM-powered optimization for local search PBO solvers,” CoRR, vol. abs/2509.04007, 2025. [6] C. Jiang, X. Shu, H. Qian, X. Lu, J. Zhou, A. Zhou, and Y. Yu, “LLMOPT: learning to define and solve general optimization problems from scratch,” in Advances in The Thirteenth International Conference on Learning Representations, Singapore, 2025. [7] T. Wang, W. Y. Yu, Z. He, Z. Liu, H. HaileiGong, H. Wu, X. Han, W. Shi, R. She, F. Zhu, and T. Zhong, “BPP-search: Enhancing tree of thought reasoning for mathematical modeling problem solving,” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), W. Che, J. Nabende, E. Shutova, and M. T. Pilehvar, Eds. Vienna, Austria: Association for Computational Linguistics, Jul. 2025, pp. 821–838. [Online]. Available: https://aclanthology.org/2025.acl-long.40/ [8] A. Singirikonda, S. Kadioglu, and K. Uppuluri, “Text2Zinc: A crossdomain dataset for modeling optimization and satisfaction problems in MiniZinc,” CoRR, vol. abs/2503.10642, 2025. [9] Y. Wu, Y. Zhang, Y. Wu, Y. Wang, J. Zhang, and J. Cheng, “Training LLMs for optimization modeling via iterative data synthesis and structured validation,” in Findings of the Association for Computational Linguistics: EMNLP 2025, C. Christodoulopoulos, T. Chakraborty, C. Rose, and V. Peng, Eds. Suzhou, China: Association for Computational Linguistics, Nov. 2025, pp. 12 880–12 896. [Online]. Available: https://aclanthology.org/2025.findings-emnlp.691/ [10] H. Lu, Z. Xie, Y. Wu, C. Ren, Y. Chen, and Z. Wen, “OptMATH: A scalable bidirectional data synthesis framework for optimization modeling,” in Forty-second International Conference on Machine Learning, 2025. [11] Z. Xiao, J. Xie, L. Xu, S. Guan, J. Zhu, X. Han, X. Fu, W. Yu, H. Wu, W. Shi, Q. Kang, J. Duan, T. Zhong, M. Yuan, J. Zeng, Y. Wang, G. Chen, and D. Zhang, “A survey of optimization modeling meets LLMs: Progress and future directions,” in Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25, J. Kwok, Ed. International Joint Conferences on Artificial Intelligence Organization, 8 2025, pp. 10 742–10 750, survey Track. [12] A. Zadorojniy, S. Wasserkrug, and E. Farchi, “An agent-based framework for the automatic validation of mathematical optimization models,” 2025. [Online]. Available: https://arxiv.org/abs/2511.16383 [13] H. Zhai, C. Lawless, E. Vitercik, and L. Leqi, “Equivamap: Leveraging LLMs for automatic equivalence checking of optimization formulations,” in 2nd AI for Math Workshop @ ICML 2025, 2025. [Online]. Available: https://openreview.net/forum?id=RvdjzNlksm [14] A. AhmadiTeshnizi, W. Gao, and M. Udell, “OptiMUS: Scalable optimization modeling with (MI)LP solvers and large language models,” in Advances in Forty-first International Conference on Machine Learning, Vienna, Austria, 2024. [15] X. Li, J. Chen, X. Fang, S. Ding, H. Duan, Q. Liu, and K. Chen, “OPT-BENCH: evaluating LLM agent on large-scale search spaces optimization problems,” CoRR, vol. abs/2506.10764, 2025.

10

[16] X. Huang, Q. Shen, Y. Hu, A. Gao, and B. Wang, “LLMs for mathematical modeling: Towards bridging the gap between natural and mathematical languages,” in Findings of the Association for Computational Linguistics 2025, Albuquerque, New Mexico, 2025, pp. 2678–2710. [17] Z. Yang, Y. Huang, W. Shi, L. Feng, L. Song, Y. Wang, X. Liang, and J. Tang, “Benchmarking LLMs for optimization modeling and enhancing reasoning via reverse socratic synthesis,” CoRR, vol. abs/2407.09887, 2024. [18] Z. Yang, Y. Wang, Y. Huang, Z. Guo, W. Shi, X. Han, L. Feng, L. Song, X. Liang, and J. Tang, “OptiBench meets ReSocratic: Measure and improve LLMs for optimization modeling,” in The Thirteenth International Conference on Learning Representations, Singapore, 2025. [19] Z. Xiao, D. Zhang, Y. Wu, L. Xu, Y. J. Wang, X. Han, X. Fu, T. Zhong, J. Zeng, M. Song, and G. Chen, “Chain-of-Experts: When LLMs meet complex operations research problems,” in The Twelfth International Conference on Learning Representations, Vienna, Austria, 2024. [20] H. Liu, J. Wang, Y. Cai, X. Han, Y. Kuang, and J. HAO, “Optitree: Hierarchical thoughts generation with tree search for LLM optimization modeling,” in The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025. [Online]. Available: https://openreview.net/forum?id=Ej20yjWMCj [21] K. Liang, Y. Lu, J. Mao, S. Sun, C. Yang, C. Zeng, X. Jin, H. Qin, R. Zhu, and C.-P. Teo, “Llm for large-scale optimization model auto-formulation: A lightweight few-shot learning approach,” 2025. [Online]. Available: https://dx.doi.org/10.2139/ssrn.5329027 [22] Z. Ma, H. Guo, J. Chen, G. Peng, Z. Cao, Y. Ma, and Y. Gong, “LLaMoCo: Instruction tuning of large language models for optimization code generation,” CoRR, vol. abs/2403.01131, 2024. [23] P. P. Dakle, S. Kadioglu, K. Uppuluri, R. Politi, P. Raghavan, S. Rallabandi, and R. Srinivasamurthy, “Ner4Opt: Named entity recognition for optimization modelling from natural language,” in Integration of Constraint Programming, Artificial Intelligence, and Operations Research - 20th International Conference, vol. 13884, Nice, France, 2023, pp. 299–319. [24] C. Zhou, T. Xu, J. Lin, and D. Ge, “Steporlm: A self-evolving framework with generative process supervision for operations research language models,” 2025. [Online]. Available: https://arxiv.org/abs/2509.22558 [25] L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. L. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Ray, J. Schulman, J. Hilton, F. Kelton, L. Miller, M. Simens, A. Askell, P. Welinder, P. F. Christiano, J. Leike, and R. Lowe, “Training language models to follow instructions with human feedback,” in Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, New Orleans, LA, 2022. [26] N. Lambert, J. Morrison, V. Pyatkin, S. Huang, H. Ivison, F. Brahman, L. J. V. Miranda, A. Liu, N. Dziri, S. Lyu, Y. Gu, S. Malik, V. Graf, J. D. Hwang, J. Yang, R. L. Bras, O. Tafjord, C. Wilhelm, L. Soldaini, N. A. Smith, Y. Wang, P. Dasigi, and H. Hajishirzi, “TÜLU 3: Pushing frontiers in open language model post-training,” CoRR, vol. abs/2411.15124, 2024. [27] P. Wang, L. Li, Z. Shao, R. Xu, D. Dai, Y. Li, D. Chen, Y. Wu, and Z. Sui, “Math-Shepherd: Verify and reinforce LLMs step-by-step without human annotations,” in Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Bangkok, Thailand, 2024, pp. 9426–9439. [28] T. Xie, Z. Gao, Q. Ren, H. Luo, Y. Hong, B. Dai, J. Zhou, K. Qiu, Z. Wu, and C. Luo, “Logic-RL: Unleashing LLM reasoning with rulebased reinforcement learning,” CoRR, vol. abs/2502.14768, 2025. [29] J. Gao, S. Xu, W. Ye, W. Liu, C. He, W. Fu, Z. Mei, G. Wang, and Y. Wu, “On designing effective RL reward at training time for LLM reasoning,” CoRR, vol. abs/2410.15115, 2024. [30] K. Zhang, G. Li, Y. Dong, J. Xu, J. Zhang, J. Su, Y. Liu, and Z. Jin, “CodeDPO: Aligning code models with self generated and verified source code,” in Advances in the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Vienna, Austria, 2025, pp. 15 854–15 871. [31] H. Xin, Z. Z. Ren, J. Song, Z. Shao, W. Zhao, H. Wang, B. Liu, L. Zhang, X. Lu, Q. Du, W. Gao, H. Zhang, Q. Zhu, D. Yang, Z. Gou, Z. F. Wu, F. Luo, and C. Ruan, “DeepSeek-Prover-V1.5: Harnessing proof assistant feedback for reinforcement learning and monte-carlo tree search,” in Advances in the Thirteenth International Conference on Learning Representations, Singapore, 2025. [32] J. Pan, X. Wang, G. Neubig, N. Jaitly, H. Ji, A. Suhr, and Y. Zhang, “Training software engineering agents and verifiers with SWE-gym,” in ICLR 2025 Third Workshop on Deep Learning for Code, 2025.

JOURNAL OF LATEX CLASS FILES

[33] Y. Chen, J. Xia, S. Shao, D. Ge, and Y. Ye, “Solver-Informed RL: Grounding large language models for authentic optimization modeling,” CoRR, vol. abs/2505.11792, 2025. [34] Z. Ding, Z. Tan, J. Zhang, and T. Chen, “Or-r1: Automating modeling and solving of operations research optimization problem via test-time reinforcement learning,” 2025. [Online]. Available: https://arxiv.org/abs/2511.09092 [35] C. Tu, X. Zhang, R. Weng, R. Li, C. Zhang, Y. Bai, H. Yan, J. Wang, and X. Cai, “A survey on llm mid-training,” 2025. [Online]. Available: https://arxiv.org/abs/2510.23081 [36] B. Hui, J. Yang, Z. Cui, J. Yang, D. Liu, L. Zhang, T. Liu, J. Zhang, B. Yu, K. Dang, A. Yang, R. Men, F. Huang, X. Ren, X. Ren, J. Zhou, and J. Lin, “Qwen2.5-Coder technical report,” CoRR, vol. abs/2409.12186, 2024. [37] R. Ramamonjison, T. Yu, R. Li, H. Li, G. Carenini, B. Ghaddar, S. He, M. Mostajabdaveh, A. Banitalebi-Dehkordi, Z. Zhou, and Y. Zhang, “NL4Opt competition: Formulating optimization problems based on their natural language descriptions,” in Proceedings of the NeurIPS 2022 Competitions Track, vol. 220, 2022, pp. 189–203. [38] Ai4mathICML2024, “ICML 2024 Challenges on Automated Math Reasoning - Track 3: Automated Optimization Problem-Solving with Code,” https://www.codabench.org/competitions/2438, 2024. [39] Z. Shao, P. Wang, Q. Zhu, R. Xu, J. Song, M. Zhang, Y. K. Li, Y. Wu, and D. Guo, “DeepSeekMath: Pushing the limits of mathematical reasoning in open language models,” CoRR, vol. abs/2402.03300, 2024. [40] C. Huang, Z. Tang, S. Hu, R. Jiang, X. Zheng, D. Ge, B. Wang, and Z. Wang, “ORLM: A customizable framework in training large models for automated optimization modeling,” Operations Research, May 2025. [41] C. Xiao, J. Cai, W. Zhao, B. Lin, G. Zeng, J. Zhou, Z. Zheng, X. Han, Z. Liu, and M. Sun, “Densing law of llms,” Nature Machine Intelligence, vol. 7, no. 11, pp. 1823–1833, Nov 2025. [Online]. Available: https://doi.org/10.1038/s42256-025-01137-0 [42] A. Yang, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Li, D. Liu, F. Huang, H. Wei, H. Lin, J. Yang, J. Tu, J. Zhang, J. Yang, J. Yang, J. Zhou, J. Lin, K. Dang, K. Lu, K. Bao, K. Yang, L. Yu, M. Li, M. Xue, P. Zhang, Q. Zhu, R. Men, R. Lin, T. Li, T. Xia, X. Ren, X. Ren, Y. Fan, Y. Su, Y. Zhang, Y. Wan, Y. Liu, Z. Cui, Z. Zhang, and Z. Qiu, “Qwen2.5 technical report,” CoRR, vol. abs/2412.15115, 2024. [43] DeepSeek-AI, A. Liu, B. Feng, B. Xue, B. Wang, B. Wu, C. Lu, C. Zhao, C. Deng, C. Zhang, C. Ruan, D. Dai, D. Guo, D. Yang, D. Chen, D. Ji, E. Li, F. Lin, F. Dai, F. Luo, G. Hao, G. Chen, G. Li, H. Zhang, H. Bao, H. Xu, H. Wang, H. Zhang, H. Ding, H. Xin, H. Gao, H. Li, H. Qu, J. L. Cai, J. Liang, J. Guo, J. Ni, J. Li, J. Wang, J. Chen, J. Chen, J. Yuan, J. Qiu, J. Li, J. Song, K. Dong, K. Hu, K. Gao, K. Guan, K. Huang, K. Yu, L. Wang, L. Zhang, L. Xu, L. Xia, L. Zhao, L. Wang, L. Zhang, M. Li, M. Wang, M. Zhang, M. Zhang, M. Tang, M. Li, N. Tian, P. Huang, P. Wang, P. Zhang, Q. Wang, Q. Zhu, Q. Chen, Q. Du, R. J. Chen, R. L. Jin, R. Ge, R. Zhang, R. Pan, R. Wang, R. Xu, R. Zhang, R. Chen, S. S. Li, S. Lu, S. Zhou, S. Chen, S. Wu, S. Ye, S. Ma, S. Wang, S. Zhou, S. Yu, S. Zhou, S. Pan, T. Wang, T. Yun, T. Pei, T. Sun, W. L. Xiao, and W. Zeng, “DeepSeek-V3 technical report,” CoRR, vol. abs/2412.19437, 2024. [44] A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv, C. Zheng, D. Liu, F. Zhou, F. Huang, F. Hu, H. Ge, H. Wei, H. Lin, J. Tang, J. Yang, J. Tu, J. Zhang, J. Yang, J. Yang, J. Zhou, J. Lin, K. Dang, K. Bao, K. Yang, L. Yu, L. Deng, M. Li, M. Xue, M. Li, P. Zhang, P. Wang, Q. Zhu, R. Men, R. Gao, S. Liu, S. Luo, T. Li, T. Tang, W. Yin, X. Ren, X. Wang, X. Zhang, X. Ren, Y. Fan, Y. Su, Y. Zhang, Y. Zhang, Y. Wan, Y. Liu, Z. Wang, Z. Cui, Z. Zhang, Z. Zhou, and Z. Qiu, “Qwen3 technical report,” CoRR, vol. abs/2505.09388, 2025. [45] DeepSeek-AI, D. Guo, D. Yang, H. Zhang, J. Song, R. Zhang, R. Xu, Q. Zhu, S. Ma, P. Wang, X. Bi, X. Zhang, X. Yu, Y. Wu, Z. F. Wu, Z. Gou, Z. Shao, Z. Li, Z. Gao, A. Liu, B. Xue, B. Wang, B. Wu, B. Feng, C. Lu, C. Zhao, C. Deng, C. Zhang, C. Ruan, D. Dai, D. Chen, D. Ji, E. Li, F. Lin, F. Dai, F. Luo, G. Hao, G. Chen, G. Li, H. Zhang, H. Bao, H. Xu, H. Wang, H. Ding, H. Xin, H. Gao, H. Qu, H. Li, J. Guo, J. Li, J. Wang, J. Chen, J. Yuan, J. Qiu, J. Li, J. L. Cai, J. Ni, J. Liang, J. Chen, K. Dong, K. Hu, K. Gao, K. Guan, K. Huang, K. Yu, L. Wang, L. Zhang, L. Zhao, L. Wang, L. Zhang, L. Xu, L. Xia, M. Zhang, M. Zhang, M. Tang, M. Li, M. Wang, M. Li, N. Tian, P. Huang, P. Zhang, Q. Wang, Q. Chen, Q. Du, R. Ge, R. Zhang, R. Pan, R. Wang, R. J. Chen, R. L. Jin, R. Chen, S. Lu, S. Zhou, S. Chen, S. Ye, S. Wang, S. Yu, S. Zhou, S. Pan, and S. S. Li, “DeepSeek-R1: Incentivizing reasoning capability in LLMs via reinforcement learning,” CoRR, vol. abs/2501.12948, 2025.

11

[46] G. Comanici, E. Bieber, M. Schaekermann, I. Pasupat, N. Sachdeva, I. S. Dhillon, M. Blistein, O. Ram, D. Zhang, E. Rosen, L. Marris, S. Petulla, C. Gaffney, A. Aharoni, N. Lintz, T. C. Pais, H. Jacobsson, I. Szpektor, N. Jiang, K. Haridasan, A. Omran, N. Saunshi, D. Bahri, G. Mishra, E. Chu, T. Boyd, B. Hekman, A. Parisi, C. Zhang, K. Kawintiranon, T. Bedrax-Weiss, O. Wang, Y. Xu, O. Purkiss, U. Mendlovic, I. Deutel, N. Nguyen, A. Langley, F. Korn, L. Rossazza, A. Ramé, S. Waghmare, H. Miller, N. Byrd, A. Sheshan, R. H. S. Bhardwaj, P. Janus, T. Rissa, D. Horgan, S. Silver, A. Wahid, S. Brin, Y. Raimond, K. Kloboves, C. Wang, N. B. Gundavarapu, I. Shumailov, B. Wang, M. Pajarskas, J. Heyward, M. Nikoltchev, M. Kula, H. Zhou, Z. Garrett, S. Kafle, S. Arik, A. Goel, M. Yang, J. Park, K. Kojima, P. Mahmoudieh, K. Kavukcuoglu, G. Chen, D. Fritz, A. Bulyenov, S. Roy, D. Paparas, H. Shemtov, B. Chen, R. Strudel, D. Reitter, A. Roy, A. Vlasov, C. Ryu, C. Leichner, H. Yang, Z. Mariet, D. Vnukov, T. Sohn, A. Stuart, W. Liang, M. Chen, P. Rawlani, C. Koh, J. Co-Reyes, G. Lai, P. Banzal, D. Vytiniotis, J. Mei, and M. Cai, “Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities,” CoRR, vol. abs/2507.06261, 2025. [47] OpenAI, “GPT-5 system card,” https://cdn.openai.com/ gpt-5-system-card.pdf, 2025. [48] N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao, “Reflexion: language agents with verbal reinforcement learning,” in Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, New Orleans, LA, 2023. [49] K. Cobbe, V. Kosaraju, M. Bavarian, M. Chen, H. Jun, L. Kaiser, M. Plappert, J. Tworek, J. Hilton, R. Nakano, C. Hesse, and J. Schulman, “Training verifiers to solve math word problems,” CoRR, vol. abs/2110.14168, 2021. [50] D. Hendrycks, C. Burns, S. Kadavath, A. Arora, S. Basart, E. Tang, D. Song, and J. Steinhardt, “Measuring mathematical problem solving with the MATH dataset,” in Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2), 2021. [51] D. Hendrycks, C. Burns, S. Basart, A. Zou, M. Mazeika, D. Song, and J. Steinhardt, “Measuring massive multitask language understanding,” in 9th International Conference on Learning Representations, 2021. [52] G. Lai, Q. Xie, H. Liu, Y. Yang, and E. H. Hovy, “RACE: large-scale ReAding comprehension dataset from examinations,” in Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, M. Palmer, R. Hwa, and S. Riedel, Eds., 2017. [53] M. Joshi, E. Choi, D. S. Weld, and L. Zettlemoyer, “Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension,” in Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, 2017. [54] M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, A. Ray, R. Puri, G. Krueger, M. Petrov, H. Khlaaf, G. Sastry, P. Mishkin, B. Chan, S. Gray, N. Ryder, M. Pavlov, A. Power, L. Kaiser, M. Bavarian, C. Winter, P. Tillet, F. P. Such, D. Cummings, M. Plappert, F. Chantzis, E. Barnes, A. Herbert-Voss, W. H. Guss, A. Nichol, A. Paino, N. Tezak, J. Tang, I. Babuschkin, S. Balaji, S. Jain, W. Saunders, C. Hesse, A. N. Carr, J. Leike, J. Achiam, V. Misra, E. Morikawa, A. Radford, M. Knight, M. Brundage, M. Murati, K. Mayer, P. Welinder, B. McGrew, D. Amodei, S. McCandlish, I. Sutskever, and W. Zaremba, “Evaluating large language models trained on code,” CoRR, vol. abs/2107.03374, 2021.

JOURNAL OF LATEX CLASS FILES

12

A PPENDIX A. The Introduction of Evaluation Datasets In this section, we provide an overview of the datasets used for performance evaluation in our experiments. These datasets cover a wide range of optimization types and scenarios, ensuring the robustness and generalization of our proposed method. In our practice, we use the version of the benchmark datasets above from https://github.com/antgroup/LLMOPT. TABLE V: Statistics of the optimization problem datasets Dataset Name NL4Opt ICML.C Mamo.E Mamo.C NLP4LP Com.OR Indus.OR OptiBench

Number of Samples 230 410 652 211 242 18 100 605

NL4Opt [37] dataset is curated from the NL4Opt Competition. For this benchmark, we used the test split containing 230 annotated linear programming word problems after manually removing 15 unsolvable problems from the original 245 problems. Each problem is sourced from domains such as sales, advertising, and investment, ensuring a balanced representation. Mamo [16] dataset (optimization split of the original Mamo dataset) consists of two parts: Easy LP and Complex LP. These two subsets provide 652 high-school-level and 211 undergraduate-level Linear Programming (LP) and MixedInteger Linear Programming (MILP) problems, respectively. IndustryOR [40] is the first industrial dataset specifically designed for optimization modeling. It incorporates data from 13 different industries and covers a variety of real-world scenarios. The dataset includes real operations research problems from eight different industries, covering five types of optimization problems, and divided into three difficulty levels. The test dataset contains 100 instances with optimal solutions. NLP4LP [14] dataset includes 242 feasible samples sourced from optimization textbooks and lecture notes. These problems cover areas such as facility location, network flow, scheduling, and portfolio management. Each instance in NLP4LP includes a description, sample parameter data file, and optimal value derived from textbook solutions or manual solving, offering a range of complex optimization challenges of varying difficulty levels. ComplexOR [19] dataset is developed in collaboration with three specialists in operations research. It contains 18 samples sourced from diverse references such as academic papers, textbooks, and real-world industrial scenarios. These problems encompass a broad spectrum of topics, including supply chain optimization, scheduling problems, and warehousing optimization, providing comprehensive and complex optimization challenges. OptiBench [18] is a comprehensive benchmark for evaluating large language models’ end-to-end optimization problem-

solving capabilities. The dataset contains 605 carefully curated optimization problems that span multiple optimization types and formats. OptiBench includes problems of Linear Programming (LP), Integer Programming (IP), and MixedInteger Linear Programming (MILP), encompassing a wide range of optimization complexities. ICML Competition [38] dataset comprises data from the ICML 2024 Challenges on Automated Math Reasoning - Track 3: Automated Optimization curated from the competition’s test split. Since the original ground truth is not released by the organizers, all solutions in this dataset are manually labelled. The dataset serves as a challenging benchmark for evaluating end-to-end optimization reasoning and problemsolving capabilities of language models.

B. The Distribution of Optimization Types and Problem Scenarios of Benchmarks To evaluate the generalization ability of the MiniOpt across different problem scenarios through experiments, this paper has counted the number of optimization types and scenarios in 8 benchmarks. The distribution histogram of optimization types in the eight benchmarks used in this paper is shown in Figure 5, and the distribution histogram of problem scenarios is shown in Figure 6.

C. Training Datasets for SFT Warm-up and Two-Stage RL The data volume and data sources for each stage of MiniOpt’s training process are illustrated in Table VI. TABLE VI: The number of samples in the dataset for training. Note that all data mentioned in the table comes entirely from the training split of the corresponding dataset. Training Stage

Dataset Size

Data Source

SFT Warm-up

1000

OptMATH-Train

RL-Stage 1

1585

NL4Opt (Train) & ICML.C (Train)

RL-Stage 2

3000

OptMATH-Train

D. General Models Qwen2.5-3B/7B/14B [42]. The models of the Qwen2.5 series are widely adopted as base models or baselines. The series showcases significant enhancements such as substantially improved knowledge, coding, and mathematical capabilities. Key features excel at instruction following, processing long contexts up to 128K tokens, and robustly handling structured data like JSON. DeepSeek-V3 [43]. DeepSeek-V3 introduces a sparse Mixture-of-Experts (MoE) model with 671B total parameters. It achieves training efficiency through Multi-head Latent Attention (MLA) architecture and an auxiliary-loss-free load balancing strategy. Pretrained on 14.8T tokens with an SFT and reinforcement learning (RL).

JOURNAL OF LATEX CLASS FILES

13

7\SH

&RP25

,&0/&

,QGXV25

0DPR&

0DPR(

1/2SW

1/3/3

2SW0$7 +%HQFK

2SWLEHQFK

&2



















,3



















/3

















0,/3



















023



















1/3



















62&3



















'DWD



















Fig. 5: Histogram showing the distribution of optimization types across 8 benchmarks. We categorize the problems in the benchmarks into these types: Combinatorial Optimization (CO), Integer Programming (IP), Linear Programming (LP), MixedInteger Linear Programming (MILP), Multi-Objective Optimization Problems (MOP), Nonlinear Programming (NLP), SecondOrder Cone Programming (SOCP).

E. General Reasoning Models Qwen3-4B/8B/14B [44]. Qwen3 pioneers a unified architecture (0.6B to 235B) integrating thinking mode (complex reasoning) and non-thinking mode (rapid responses) with dynamic switching. Its thinking budget mechanism enables adaptive computational allocation. The series outperforms larger MoE models in tasks such as coding, mathematics, and agent application. DeepSeek-R1 [45]. DeepSeek-R1 is an enhanced model based on DeepSeek-R1-Zero presented in this work. It’s a purely RL-driven reasoning model requiring no SFT pretraining. As the most representative model with thinking ability, DeepSeek-R1 is an important baseline for reasoning models. Gemini-2.5-Pro [46]. Gemini-2.5-Pro is a powerful multimodal agent that has excellent programming / reasoning performance and enables the processing of long video content. The Gemini-2.5 family spans the full Pareto front of capability-cost optimization. Its integration of long-context understanding, multimodality, and reasoning unlocks novel agentic applications. GPT-5 [47]. GPT-5 is the latest unified, router-mediated system that instantiates a spectrum of language-model instances ranging from a high-throughput, low-latency model (gpt-5-main) to a deliberative, compute-intensive reasoning model (gpt-5-thinking). The router selects the appropriate instantiation by conditioning on conversation type, task complexity, tool requirements, and explicit user directives, thereby optimizing both instruction adherence and inference efficiency. F. Prompt-based Methods Reflexion [48]. Reflexion is an enhanced language agent framework utilizing feedback mechanisms. It enables agents to excel at sequential decision-making tasks through task feedback analysis and memory buffering without requiring weight updates. This framework accommodates diverse feedback signals and demonstrates effectiveness across programming, math problems and language reasoning domains. OptiMUS [14]. OptiMUS is a highly modular solver that leverages the text understanding and generating capabilities of

LLMs. It constructs specialized agents for entity extraction, mathematical modeling, and code generation using concise prompts, while incorporating a reflection mechanism for iterative improvement. Chain-of-Experts [19]. Chain-of-Experts is a multi-agent framework specifically designed for operations research optimization problems. The system features a central controller that coordinates an interaction sequence among specialized agents, including a term interpreter, modeling agent, and programming expert. Thus solving optimization problems through precise coordination of multiple modules. G. Learning-based Models LLMOPT-14B [6]. LLMOPT is a novel framework for optimization problem solving that leverages LLMs. It begins by formulating a unified representation of optimization problems, thereby enhancing the model’s ability to generalize across diverse types of scenarios. Based on this unified description of five-element formulation, the framework generates the solving code. LLMOPT uses multi-instruction SFT and KTO alignment during training to enhance modeling accuracy and reduce model hallucinations. OptMATH-Qwen2.5-7B [10]. OptMATH-Qwen2.5-7B is trained end-to-end on the OptMATH-Train dataset, it generates both mathematical formulations and solver code from problem descriptions. The input consists of textual problem specifications, while the target output comprises concatenated sequences. Optimization follows the standard sequence-tosequence loss function, enabling single-stage joint optimization of formulation and code generation. Step-OPT [9]. Step-OPT is a model trained on a meticulously curated high-quality dataset. The training set is enhanced through Scope-Evolve and Complexity-Evolve techniques, which improve both the difficulty level and the coverage of application scenarios. Moreover, a multi-agent and stepwise verification mechanism is employed to enhance the quality of problems and solutions while eliminating errors present in the original dataset. Finally, supervised fine-tuning

JOURNAL OF LATEX CLASS FILES

14

2SWLEHQFK

                     

2SW0$7 +%HQFK                      







6FHQDULR

&RP25

,&0/&

,QGXV25

0DPR&

0DPR(

1/2SW

1/3/3

$JULFXOWXUH $YLDWLRQ &RQVWUXFWLRQ (GXFDWLRQ (QHUJ\ (QYLURQPHQW )LQDQFH +HDOWKFDUH /RJLVWLFV 0DQXIDFWXULQJ 0DUNHWLQJ 0LOLWDU\ 3XEOLF8WLOLWLHV 5HVRXUFHV 5HWDLO 6HUYLFHV 6SRUWV 6XSSO\&KDLQ 7HFKQRORJ\ 7HOHFRPPXQLFDWLRQV 7UDQVSRUWDWLRQ 2WKHU

                     

                     

                     

                     

                     

                     













'DWD

                     

Fig. 6: Histogram showing the distribution of optimization problem scenarios across 8 benchmarks. We categorize the problems in the benchmarks into these scenarios: Agriculture, Aviation, Construction, Education, Energy, Environment, Finance, Healthcare, Logistics, Manufacturing, Marketing, Military, Public Utilities, Resources, Retail, Services, Sports, Supply Chain, Technology, Telecommunications, Transportation, Other.

was performed on this high-quality training dataset resulting in the Step-OPT-8B model. This paper proposes OptGRPO based on the improvement of the GRPO algorithm [39]. For each query, GRPO sample G responses, compute the mean and standard deviation of their scalar rewards, and form a group-normalized advantage Âi = (ri −µ) . Specifically, GRPO optimizes the policy πθ as follows: σ JGRPO (θ) = Eq∼P (Q),{oi }G i=1 ∼πθold (·|q) " G |oi |  XX 1 min[ρθ Âi,t , clip(ρθ , 1 − ε, 1 + ε)Âi,t ] |oi | i=1 t=1 #  − βDKL [πθ (·|q)∥πref (·|q)] , (7)

ρθ =

πθ (oi,t |q, oi,<t ) . πθold (oi,t |q, oi,<t )

(8)

where q denotes queries sampled from the input dataset and o denotes the model’s outputs. ε is the clipping threshold, β is the coefficient on the KL penalty, and DKL is the KL divergence between the current policy πθ and the reference policy πref . The processing pipeline for the SFT training set is detailed in Section III. The resulting collection of this pipeline is named OptMATH-Train-Pyomo, which contains approximately 140K

samples. The prompt template used in code conversion is introduced in Appendix G, and the prompt of the solver adapter is introduced in Appendix G. To ensure that the base model can effectively learn knowledge in the operations research domain with limited data during the mid-training stage, this paper selects 1,000 samples according to a specific distribution of optimization problem types. Specifically, nonlinear programming (NLP), mixed-integer linear programming (MILP), and linear programming (LP) problems account for 50%, 35%, and 15% of the samples, respectively. This distribution is designed to ensure that the model acquires sufficient expertise on challenging problem types. In the first stage of MiniOpt’s RL training, we employ a set of relatively easy and small-scale optimization problems, for which the accuracy score is more readily maximized. This, in turn, incentivizes the model to attain higher format score and five-element score, thereby accelerating mastery of the reasoning to model and solve paradigm. Concretely, the dataset of the first stage is the union of the NL4Opt [14] and ICML Competition [38] training splits, comprising 1585 problems. Each instance is presented as a natural-language prompt paired with a reference answer and is fully compatible with our pipeline of parsing, executing, and scoring, enabling straightforward computation of the OptReward. The second stage of RL targets optimization generalization [6] under a limited training budget. The objective is to construct a training set that simultaneously covers diverse

JOURNAL OF LATEX CLASS FILES

optimization types and scenarios, while preserving the scenario proportions observed in the real distribution. Starting from the OptMATH-Train pool containing 201K problems, we label each instance with types and scenarios using the DeepSeekV3 [43], with prompt templates and data distributions provided in Appendix G. We then sample a 3000-instance stage2 training set subject to two constraints: (i) type-uniform coverage, with exactly 600 instances per type; and (ii) within each type, the scenario frequencies match the distribution in the full pool. Formally, letting p(s) denote the overall scenario distribution in the complete pool, the target number of samples for each scenario s under  P type t is allocated as nt (s) = round 600·p(s) , where s nt (s) = 600. To prevent leakage, problems used during the SFT warm-up are excluded from consideration. The resulting 3K training set is uniform across types and aligned with the scenario distribution of the data pool. Compared with random or non-selected baselines, this selection improves overall performance of MiniOpt under the same compute budget. This section we use Execution Rate (ER), the proportion of generated code samples that run successfully without errors. As shown in the Table VII, MiniOpt also exhibits superior text generation capabilities compared to baseline methods, which suggests its excellent code generation performance given the problem modeling. As shown in Table I from the main text and Table 3 in this supplementary material, we compared the SA and ER of three different sizes of MiniOpt (1.5B, 3B, and 7B) across 8 benchmarks, respectively. The results show that as the parameter scale of the base model decreases from 7B to 3B and then to 1.5B, performance transitions smoothly, which aligns with scaling laws. Compared to the baselines, MiniOpt1.5B remains competitive on benchmarks with low to moderate difficulty, such as NL4OPT and OptiBench. To investigate whether the effectiveness of OptReward depends on a specific reward assignment, we replace the original accuracy reward setting ((2,-1.5,-2)) with two alternative configurations, namely ((2,0,-1)) and ((1,-1,-1)). Figure 3 illustrates the training dynamics in terms of reward convergence and policy entropy, while Table IV from main text reports the final solving accuracy (SA). Several important observations can be made. First, the ((2,0,-1)) setting achieves a noticeably higher converged reward than the original design, while yielding nearly identical SA. This result suggests that the performance of MiniOpt is not primarily determined by the absolute reward magnitude or the final reward value. Since incorrect solutions receive a neutral reward instead of a penalty, the average training reward naturally increases. However, this increase does not translate into improved optimization generalization, indicating that reward scale alone is not the key factor behind the effectiveness of OptReward. Second, both modified reward settings exhibit lower policy entropy throughout training compared with the original configuration. This observation indicates that changing the reward assignment encourages the policy to concentrate on a narrower set of behaviors, thereby reducing exploration. Interestingly, although the ((2,0,-1)) setting exhibits the lowest entropy among all configurations, its final

15

SA remains largely unchanged. Therefore, reduced exploration alone is insufficient to explain performance degradation. The most significant performance drop is observed under the ((1,1,-1)) setting, where SA decreases by 2.25%. Unlike the other two configurations, this variant assigns identical rewards to incorrect solutions and execution failures. Consequently, the reward function can no longer distinguish partially correct trajectories from completely invalid outputs. This removes the hierarchical supervision signal provided by OptReward and weakens its gating mechanism. Overall, these results demonstrate that the effectiveness of OptReward relies on maintaining a hierarchical reward structure that progressively differentiates execution failures, incorrect solutions, and correct solutions. Such a design provides informative intermediate supervision and enables stable policy optimization, which is crucial for achieving strong optimization generalization under limited training resources. In order to investigate whether the pipeline training in this paper would impair other abilities of the LLMs, we also discussed the generalization performance of MiniOpt3B on tasks other than optimization problems. Six benchmarks across different capability dimensions are selected: GSM8K [49] and MATH [50] for general mathematical reasoning, MMLU [51] for multi-choice questions testing broad knowledge, RACE [52] (including middle- and high-difficulty subsets) for reading comprehension, TriviaQA [53] for assessing the comprehension ability through question-and-answer, and HumanEval [54] (pass@1) for programming ability. Accuracy measured by generation quality assessment is used as the metric. After evaluation, we compare the trained MiniOpt with its base model, Qwen2.5-3B-Instruct. The results indicate that there is no performance degradation on any benchmark; instead, consistent improvements are observed, as illustrated in Figure 7. An average accuracy gain of 1.24% is achieved across all benchmarks. We attribute this to two factors. First, the two-stage RL framework coupled with a verifiable OptReward constrains learning to structural modeling correctness and executable solving efficacy, mitigating overfitting to superficial linguistic style or lengthy chain-of-thought and thereby substantially reducing the risks of catastrophic forgetting and cross-task seesaw effects. Second, the foundational competencies required for optimization modeling, such as mathematical understanding, symbolic reasoning, program synthesis, and execution, which highly overlap with those assessed by general benchmarks such as MMLU, MATH, GSM8K, and HumanEval. Consequently, targeted reinforcement in this domain does not overwrite existing representations, instead, it yields small positive transfer on tasks closely aligned with modeling and solving, as exemplified by GSM8K. This section provides the system prompt for the large language model to convert GurobiPy code in OptMATH-Train into Pyomo code, where the content within [·] and {·} will be replaced with the corresponding parts.

JOURNAL OF LATEX CLASS FILES

16

TABLE VII: Comparison of the ER metric across 8 benchmarks with rankings (NL4Opt, ICML Competition, Mamo Easy, Mamo Complex, NLP4LP, ComplexOR, IndustryOR, OptiBench). Bold indicates 1st, wavy underline indicates 2nd, underline :::::::::::: indicates 3rd. “Rank∗ ” represents the result of sorting methods among parameter sizes below 10B. Category

Model / Method

Avg.

Rank Rank∗ NL4Opt ICML.C Mamo.E Mamo.C NLP4LP Com.OR Indus.OR OptiBench

General Models

Qwen2.5-3B-Instruct Qwen2.5-7B-Instruct Qwen2.5-14B-Instruct DeepSeek-V3

16.57 41.86 60.64 81.86

18 15 11 8

8 6 -

31.30 66.09 82.17 97.83

28.54 68.54 80.73 97.32

7.11 19.43 59.24 71.56

0.60 9.04 25.90 63.25

28.93 71.90 84.71 97.93

5.56 16.67 38.89 72.22

10.00 30.00 52.00 70.00

20.50 53.22 61.49 84.79

Qwen3-4B Qwen3-8B General Models Qwen3-14B (Thinking) DeepSeek-R1 Gemini-2.5-Pro GPT-5

14.02 25.43 30.04 82.24 88.87 84.73

19 17 16 7 3 : 5

9 7 -

19.57 36.96 28.70 96.09 94.35 98.08

20.00 38.29 25.12 94.15 96.10 97.32

18.48 18.01 30.81 84.83 86.26 55.92

3.61 3.61 17.47 53.01 81.32 ::: 69.88

18.18 39.26 22.73 91.32 96.28 97.52

11.11 22.22 61.11 61.11 77.78 88.89

5.00 10.00 27.00 82.00 ::: 87.00 78.00

16.20 35.04 27.44 88.92 91.90 ::: 92.07

Prompt-based Methods

Chain-of-Experts OptiMUS Reflexion

60.33 49.43 78.28

12 14 9

-

79.57 45.22 91.74

73.41 75.85 91.46

56.87 43.60 67.77

20.48 27.71 48.80

77.27 44.63 95.45

55.56 44.44 83.33

54.00 48.00 66.00

65.45 65.95 81.65

Learning-based Models

Step-OPT-Qwen2.5-3B Step-OPT-Qwen2.5-7B OptMATH-7B LLMOPT-14B

54.65 69.76 83.39 89.75

13 10 6 2

5 4 2 -

54.78 94.78 99.13 97.42

58.78 77.56 95.85 93.90

42.18 84.83 90.05 ::: 77.73

21.69 25.30 64.46 31.93

81.40 68.18 99.17 ::: 97.93

61.11 72.22 66.67 88.89

50.00 64.00 69.00 61.00

67.27 71.24 82.81 73.22

MiniOpt-3B MiniOpt-7B

87.92 91.17

6 1

3 1

100 99.57

97.56 97.56

98.16 90.05

89.57 56.02

99.59 99.17

61.11 88.39

78 81.00

79.34 74.38

Ours

:::

:::

:::

:::

TABLE VIII: Ablation study (MiniOpt-3B) on the ER metric across 8 benchmarks. Herein, “w” denotes “with” and “w/o” denotes “without”. Category

Avg.

NL4Opt ICML.C Mamo.E Mamo.C NLP4LP Com.OR Indus.OR OptiBench

87.92 89.09 48.92 82.73 84.45 85.31 82.35

100 99.57 68.7 98.70 100 100 99.13

Model / Method

MiniOpt-3B MiniOpt-3B w/o SFT Warm-up MiniOpt-3B w/o RL MiniOpt-3B w/o Two-stage RL Ablations MiniOpt-3B w/ Random Selection MiniOpt-3B w/o OptReward MiniOpt-3B w/ GRPO

97.56 98.05 63.9 95.12 97.56 97.8 96.1

98.16 96.63 64.11 92.02 94.17 96.47 90.49

89.57 87.68 27.01 78.67 86.26 81.52 81.52

99.59 99.59 67.77 99.59 99.59 99.59 99.17

61.11 66.67 11.11 55.56 50 61.11 55.56

78 83 35 68.00 71 67 60

79.34 81.49 53.72 74.21 77.02 79.01 76.86

TABLE IX: Comparison of the ER metric between MiniOpt-1.5B and larger scale counterparts across 8 benchmarks. Execution Rate (ER)

Avg.

NL4Opt ICML.C Mamo.E Mamo.C NLP4LP Com.OR Indus.OR OptiBench 230

410

652

211

242

18

100

605

86.44 87.92 91.17

99.13 100 99.57

99.02 97.56 97.56

94.33 98.16 98.77

71.09 89.57 90.05

99.59 99.59 99.17

72.22 61.11 88.89

74.00 78 81.00

82.15 79.34 74.38

Number of Samples in Datasets MiniOpt-1.5B Ours MiniOpt-3B MiniOpt-7B

50 40

84.96 85.72

74.91 77.94

Baseline MiniOpt-3B

80.09 81.88

70.73 72.56

Score

67.07 67.20

30 45.57 46.07

41.92 42.52

20 10

l ne

va

a

hu ma

iaq triv

rac e_h igh

le rac e_m idd

mm lu

th ma

gs

m8 k

0

Fig. 7: Performance variations of the MiniOpt on benchmarks from different domains.

P ROMPT T EMPLATE FOR C ODE C ONVERSION You are an expert in optimization problems.

Your task is to convert the given gurobipy code into pyomo code. **Instructions:** 1. Don’t give any explanation, just provide the converted pyomo code in the following format: ‘‘‘python [pyomo code here] ‘‘‘ 2. Please note that the following solvers are available for use: ’glpk’, ’cbc’, ’ipopt ’, ’scip’. Other solvers should not be utilized. 3. Please add ‘from pyomo.environ import *‘ at the beginning of your code. 4. Please print the optimal objective value at the end of the code. **Gurobipy code:** {gurobipy}

JOURNAL OF LATEX CLASS FILES

This section provides the system prompt to guide MiniOpt models in autonomously selecting solvers after modeling optimization problems. P ROMPT FOR S OLVER S ELECTION **Solver Selection Guide:** - ‘‘glpk‘‘: Best for small-to-medium linear problems (LP). - ‘‘cbc‘‘: Recommended for mixed-integer linear programming (MILP) and larger linear problems. Handles binary/integer variables well. - ‘‘ipopt‘‘: Use for nonlinear problems (NLP) with continuous variables. Does NOT support discrete variables. - ‘‘scip‘‘: Most versatile - handles mixedinteger nonlinear problems (MINLP), large -scale problems, and complex constraints. **Select solver based on:** 1. Variable types (continuous vs integer/ binary) 2. Linearity of objective/constraints 3. Problem scale (small: glpk/cbc, large: scip/ipopt) 4. Nonlinearity presence (use ipopt/scip)

This section provides the system prompt used by MiniOpt models during reinforcement learning (RL) training. S YSTEM P ROMPT FOR RL T RAINING You are a helpful assistant. The assistant first thinks about the reasoning process in the mind and then provides the user with the answer. The reasoning process and answer are enclosed within <think> </ think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think><answer> answer here </answer>, please make sure to answer according to the above format. Now the user asks you to solve an optimization reasoning problem, you should: 1. Detailed reasoning about the problem within <think> </think> tags. 2. Write the corresponding five-element model (derived from your analysis). 3. Determine the mathematical properties of problem and select an appropriate solver from ’glpk’, ’cbc’, ’ipopt’, ’scip’. 4. Recheck and correct if necessary at the end of the <think> </think> section. - Verify the five-element model fully captures the problem’s requirements. - Confirm no constraints/variables are missing or over-simplified. - Ensure the solver choice aligns with the problem’s mathematical properties. 5. Provide the corresponding Pyomo code based on checked five-element model within < answer> </answer> tags. In mathematics, optimization problem can be modeled as the following expression $\\ min_{{\\boldsymbol{{x}} \\in \\mathcal{{X }}}} f(\\boldsymbol{{x}}), {{\\rm s.t.}} G(\\boldsymbol{{x}}) \\leq \\boldsymbol{{ c}}$, where $\\boldsymbol{{x}} = (x_1,

17

x_2, \\ldots, x_D)ˆ\\top$ is the $D$dimensional decision variable, $\\mathcal {{X}} \\subset \\mathbb{{R}}ˆD$ is the feasible domain, $f: \\mathcal{{X}} \\ rightarrow \\mathbb{{R}}$ is the objective function and the goal is to find the minima of $f$, $G(\\boldsymbol{{ x}}) \\leq \\boldsymbol{{c}}$ are the constraints of $\\boldsymbol{{x}}$. The above definition can be mapped to a fiveelement consisting of ‘‘Variables, Objective, Constraints, Sets, Parameters ’’. Variables indicate what $\\boldsymbol {{x}}$ is, Objective describes the form of the objective function $f(\\boldsymbol {{x}})$, and Constraints indicates the constraints $G(\\boldsymbol{{x}})$ and $ \\mathcal{{X}}$. These three can abstract the optimization problem. Sets and Parameters are their specific explanations: Sets describe and explain the subscripts of the vectors or matrices in them, and Parameters supplement their specific values. You need to give a detailed reasoning process for the problem first, and then write the corresponding five-element model based on the problem description and information provided by user. Please complete the following template to model the optimization problem into fiveelement: <think> Your reasoning process here... ## Sets: [You need to fill in] ## Parameters: [You need to fill in] ## Variables: [You need to fill in] ## Objective: [You need to fill in] ## Constraints: [You need to fill in] </think> In Pyomo, all constraints must be formulated using ’<=’, ’>=’, or ’==’. If you need to use ’>’ or ’<’, you can introduce a very small value to transform the inequality. Please note that the following solvers are available for use: ’glpk’, ’cbc’, ’ ipopt’, ’scip’. Other solvers should not be utilized. **Solver Selection Guide:** - ‘‘glpk‘‘: Best for small-to-medium linear problems (LP). - ‘‘cbc‘‘: Recommended for mixed-integer linear programming (MILP) and larger linear problems. Handles binary/integer variables well. - ‘‘ipopt‘‘: Use for nonlinear problems (NLP) with continuous variables. Does NOT support discrete variables. - ‘‘scip‘‘: Most versatile - handles mixed-

JOURNAL OF LATEX CLASS FILES

integer nonlinear problems (MINLP), large -scale problems, and complex constraints. **Select solver based on:** 1. Variable types (continuous vs integer/ binary) 2. Linearity of objective/constraints 3. Problem scale (small: glpk/cbc, large: scip/ipopt) 4. Nonlinearity presence (use ipopt/scip) Please select an appropriate solver based on the type and quantity of variables, objectives, and constraints. After thinking, when you finally reach the five -element model, you should give the corresponding Pyomo code within the < answer> </answer> tags, i.e., <answer> ‘‘‘python\n code here‘‘‘ </answer>. The user will extract the complete code you provide through the regular expression r "‘‘‘python\n(.*?)‘‘‘" in the <answer> </ answer> tags. The execution result of the code should include the optimal solution and the objective value. The optimal objective value will be extracted automatically from your last printed result.

This section provides the system prompts for the large language model to label the type and scenario of problems in OptMATH-Train, where {{·}} will be replaced with the corresponding content. After labeling, the distribution of scenarios in OptMATH-Train is displayed in Figure 8, and the distribution of types in OptMATH-Train is displayed in Figure 9 S YSTEM P ROMPT FOR TYPE LABELING Please classify the following optimization problem into one of these technical types based on the mathematical formulation and decision variables, not just surfacelevel descriptions: 1. Linear Programming (LP): Problems with linear objective function and linear constraints, all continuous variables 2. Integer Programming (IP): Problems with linear or nonlinear components where ALL variables are discrete/integer 3. Mixed Integer Linear Programming (MILP): Problems with linear components containing BOTH continuous and discrete variables 4. Nonlinear Programming (NLP): Problems with nonlinear objective function and/or nonlinear constraints (variables may be continuous/discrete) 5. Combinatorial Optimization (CO): Problems focused on selecting/discrete structures (graphs, permutations, sets) with typically binary variables 6. Multi-objective Programming (MOP): Problems explicitly optimizing multiple conflicting objectives simultaneously 7. Second-Order Cone Programming (SOCP): Problems with a linear objective function , linear constraints, and second-order cone constraints (e.g., \(\|Ax + b\| \leq

18

cˆT x + d\)) # Problem: {{Question}} # Output Analyze the mathematical structure step by step and classify its type. Finally, output the type abbreviation in the following format: Type: Abbreviation of the type Note: - Focus on the fundamental mathematical formulation, not application domain - Check variable types (continuous/discrete/ binary) and objective/constraint linearity - For MOP, there must be explicit multiple objectives - For pure discrete problems with special structures (e.g. graphs), prefer CO over IP

S YSTEM P ROMPT FOR SCENARIO LABELING Please classify the following optimization problem into one of these application domains based on the core decision-making context and primary business function, not just keywords mentioned in the problem: 1. Supply Chain: Decisions about inventory management, distribution network, warehousing operations 2. Finance: Decisions about portfolio management, investments, risk management, financial planning 3. Manufacturing: Decisions about production processes, quality control, factory operations 4. Transportation: Decisions about routing, vehicle scheduling, fleet management, traffic flow, carrier selection 5. Healthcare: Decisions about medical staff scheduling, patient flow, hospital resources 6. Energy: Decisions about power generation, energy conservation, grid distribution 7. Technology: Decisions about network design , data center operations, cloud resources 8. Retail: Decisions about store operations, pricing, inventory, equipment, store layout 9. Agriculture: Decisions about farming operations, crop planning, irrigation 10. Logistics: Decisions about delivery operations, warehouse management, distribution 11. Resources: Decisions about raw materials, equipment allocation, material management 12. Marketing: Decisions about campaign planning, budget allocation, target selection 13. Education: Decisions about course scheduling, resource allocation in schools 14. Environment: Decisions about environmental protection, emissions control, conservation

JOURNAL OF LATEX CLASS FILES

15. Construction: Decisions about project planning, construction resource allocation 16. Military: Decisions about military operations, deployment, supply management 17. Sports: Decisions about game scheduling, team formation, strategy 18. Telecommunications: Decisions about network coverage, bandwidth allocation 19. Aviation: Decisions about flight scheduling, crew assignment, airport operations 20. Services: Decisions about service operations, staff scheduling, capacity management 21. Public utilities: Decisions about utility services, infrastructure management, service delivery 22. Other: Problems that don’t clearly fit into above categories # Problem: {{Question}} # Output Let’s think step by step,give the analysis of the problem and classify it into one of the above application domains.Finally, output the name of the domain in the following format: Category: Name of the Domain Note: - Focus on the fundamental business function and decision-making context - Don’t be misled by secondary keywords or background story - Consider who is making the decision and what is their primary business purpose

19

JOURNAL OF LATEX CLASS FILES



20





 

  

  



   

        



0D /RJ QX LVWL IDF FV +H WXULQ 6X DOWK J SS FD O\ UH & 6H KDLQ UYL FH 7H ( QH V OHF RP $Y UJ\ P LD 7UD XQLFD WLRQ QVS WLR RUW QV DW )LQ LRQ DQ &R 5H FH QVW WDL UXF O 0L WLRQ (G OLWDU \ $J XFDWL ULF RQ 0 XOWX (Q DUNH UH YLU WLQ RQ J PH Q 2 7H WK W FK HU QR O 3X 6 RJ\ EOL SR FX UWV WLOL WLH V



Fig. 8: Proportion of every scenario of instances in OptMATH-Train (201K).





 

&RXQW





 

,3

/3

1/ 3







62 &3



0, /3

&RXQW



Fig. 9: Proportion of every problem type of instances in OptMATH-Train (201K).

Related documents

Record · ID 307026 · SHA-256 c207ab8b05563637
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive