Organizations: School of Computer Science and Engineering, Nanjing University of Science and Technology · School of Intelligence Science and Technology, Nanjing University · Institute of Automation, Chinese Academy of Sciences
Automating optimization modeling with LLMs is a promising path toward scalable decision intelligence, but existing approaches either rely on agentic pipelines built on closed-source LLMs with high inference latency, or fine-tune smaller LLMs using costly process supervision that often overfits to a single solver API. Inspired by reinforcement learning with verifiable rewards, we propose Execution-Verified Optimization Modeling (EVOM), an execution-verified learning framework that treats a mathematical programming solver as a deterministic, interactive verifier. Given a natural-language problem and a target solver, EVOM generates solver-specific code, executes it in a sandboxed harness, and converts execution outcomes into scalar rewards, optimized with GRPO and DAPO in a closed-loop generate-execute-feedback-update process. This outcome-only formulation removes the need for process-level supervision, and enables cross-solver generalization by switching the verification environment rather than reconstructing solver-specific datasets. Experiments on NL4OPT, MAMO, IndustryOR, and OptiBench across Gurobi, OR-Tools, and COPT show that EVOM matches or outperforms process-supervised SFT, supports zero-shot solver transfer, and achieves effective low-cost solver adaptation by continuing training under the target solver backend.
Figures & tables
Figure 1: Comparison of Execution-Verified Optimization Modeling with previous methods.
Model
OptiBench
NL4OPT
MAMO-E
MAMO-C
IndustryOR
Avg.
Prompting-based Models
DeepSeek-R1-0528
76.21
86.12
79.45
74.88
54.00
73.73
OpenAI o1
71.40
87.10
87.60
72.10
40.00
71.64
GPT-4o (Standard)
42.30
70.30
84.30
58.80
27.00
56.54
GPT-4o (CoT)
42.00
71.60
84.80
59.90
29.00
57.46
GPT-4o (CoE)
43.20
76.40
85.70
64.00
34.00
60.66
Table 1: Performance comparison on optimization modeling benchmarks using Gurobi .
Figure 2: Impact of explicit reasoning on EVOM performance across different benchmarks.
Model
Supervision
OptiBench
NL4OPT
MAMO-E
MAMO-C
IndusOR
Base (Qwen2.5-7B)
—
40.86
59.18
53.83
18.48
20.00
ORLM (SFT)
Process
3.49
4.89
0.00
1.42
6.00
EVOM (GRPO)
Answer
54.31
77.55
84.81
22.27
24.00
Difference ( Δ )
+50.82
+72.66
+84.81
+20.85
+18.00
Table 2: Zero-Shot Solver Transfer to OR-Tools . Accuracy of models evaluated on the target solver ( stgt : OR-Tools ) after being trained on the source solver ( ssrc : Gurobi ). Unlike process-supervised SFT (ORLM), which overfits to source-specific syntax and leads to performance collapse, EVOM (GRPO) maintains robust transferability.
Solver
OptiBench
NL4OPT
MAMO-E
MAMO-C
IndustryOR
Gurobi
Qwen2.5-7B
41.19
55.10
65.95
28.43
21.00
After EVOM (GRPO)
62.95
84.08
88.19
34.28
31.00
Absolute Gain ( Δ )
+21.76
+28.98
+22.24
+5.85
+10.00
OR-Tools
Qwen2.5-7B
40.86
59.18
53.83
18.48
20.00
Table 3: Adaptive specialization across diverse solver environments. EVOM drives significant performance gains by aligning the policy with the designated solver’s feedback loop.
Figure 3: GRPO vs. DAPO under identical training setup. Accuracy curves across benchmarks are nearly identical, indicating low sensitivity to the optimizer choice in execution-verified training.
Figure 4: Training dynamics of execution-verified learning.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Solver-conditioned prompt template with a fixed two-block output format for parsing and execution.
Model
Constraints
Objective Function
Reasoning
Code
Reasoning
Code
Qwen2.5-7B
24.6
58.3
74.2
81.4
ORLM (SFT)
23.4
78.7
65.4
78.7
GRPO
26.4
59.7
77.1
87.8
Appendix
Table 4: Human evaluation accuracy on reasoning quality and code implementation.
Solver
OptiBench
NL4OPT
MAMO EasyLP
MAMO ComplexLP
IndustryOR
Gurobi (before RL)
34.05
48.97
82.82
13.27
22.00
Gurobi (after RL)
58.30
76.32
87.42
29.85
23.00
Δ (after – before)
+24.25
+27.35
+4.60
+16.58
+1.00
OR-Tools (before RL)
24.25
37.14
44.93
4.26
17.00
OR-Tools (after RL)
31.56
44.48
72.08
2.36
26.00
Δ (after – before)
+7.31
+7.34
+27.15
-1.90
+9.00
Appendix
Table 5: Training with different solvers ( ϵ=10−4 ).
Model
OptiBench
NL4OPT
MAMO EasyLP
MAMO ComplexLP
IndustryOR
Base models (Qwen2.5)
Qwen2.5-0.5B
0.00
0.00
0.00
0.00
0.00
Qwen2.5-1.5B
35.44
48.57
43.35
4.73
9.00
Qwen2.5-3B
28.40
26.12
77.14
8.53
7.00
GRPO-trained models
GRPO-0.5B
0.00
0.00
0.00
0.00
0.00
Appendix
Table 6: Performance of small-scale models ( ϵ=0.05 , %). Higher is better.
Model
OptiBench
NL4OPT
MAMO EasyLP
MAMO ComplexLP
IndustryOR
Base models (Qwen2.5)
Qwen2.5-0.5B
0.00
0.00
0.00
0.00
0.00
Qwen2.5-1.5B
22.46
31.02
38.34
0.47
7.00
Qwen2.5-3B
20.59
20.00
74.69
2.36
6.00
GRPO-trained models
GRPO-0.5B
0.00
0.00
0.00
0.00
0.00
Appendix
Table 7: Performance of small-scale models ( ϵ=10−4 , %). Higher is better.
Figure 6: Cold-start experiment on COPT solver comparing Base, SFT cold start, and RL with SFT cold start across different benchmarks.
Figure 7: Accuracy as a function of cold-start SFT data size on Gurobi. Curves compare SFT-only and SFT+RL training with varying data scales from 60 to 3000 samples.
Evaluation Suite
Training Stage
OptiBench
NL4OPT
MAMO-E
MAMO-C
IndusOR
On Gurobi
0. Base Model
41.19
55.10
65.95
28.43
21.00
1. After Stage 1 (Gurobi)
59.96
80.81
85.58
36.01
31.00
2. After Stage 2 (OR-Tools)
60.46
81.22
87.57
30.80
23.00
Overall Gain ( Δ )
+19.27
+26.12
+21.62
+2.37
+2.00
On OR-Tools
0. Base Model
40.86
59.18
53.83
18.48
20.00
1. After Stage 1 (Gurobi)
54.15
78.77
81.59
27.48
24.00
Appendix
Table 8: Appendix: Detailed Sequential Transfer Learning Dynamics. We evaluate model stability on the source solver (Gurobi) and transferability to the target solver (OR-Tools) throughout the training stages. Results show that Sequential GRPO progressively improves performance without sacrificing the original solver’s capabilities.
Solver
OptiBench
NL4OPT
MAMO EasyLP
MAMO ComplexLP
IndustryOR
Gurobi (before RL)
41.19
55.10
65.95
28.43
21.00
Gurobi (after RL)
61.79
82.04
84.96
32.70
31.00
Δ (after – before)
+20.60
+26.94
+19.01
+4.27
+10.00
OR-Tools (before RL)
40.86
59.18
53.83
18.48
20.00
OR-Tools (after RL)
52.99
78.36
82.51
20.38
27.00
Δ (after – before)
+12.13
+19.18
+28.68
+1.90
+7.00
Appendix
Table 9: Multi-solver generalization with joint training ( ϵeval=0.05 ).
Solver
OptiBench
NL4OPT
MAMO EasyLP
MAMO ComplexLP
IndustryOR
Gurobi (before RL)
34.05
48.97
82.82
13.27
22.00
Gurobi (after RL)
57.14
78.77
84.20
30.33
23.00
Δ (after – before)
+23.09
+29.80
+1.38
+17.06
+1.00
OR-Tools (before RL)
24.25
37.14
44.93
4.26
17.00
OR-Tools (after RL)
32.55
45.71
71.62
6.16
20.00
Δ (after – before)
+8.30
+8.57
+26.69
+1.90
+3.00
Appendix
Table 10: Multi-solver generalization with joint training ( ϵ=10−4 ).
Figure 8: Error type distribution before and after RL training on 500 sampled instances from OptiBench.
Error Type
Before RL
After RL
Diff
Implement Error
10.85%
7.17%
-3.68%
Objective Error
12.98%
12.60%
-0.39%
Constraint Error
18.02%
16.09%
-1.94%
Variable Error
6.59%
0.78%
-5.81%
Fully Correct
51.55%
63.37%
+11.82%
Appendix
Table 11: Fine-grained error analysis on 500 sampled instances from OptiBench. Error types are categorized by human annotators before and after RL training.