Understanding Failure Patterns in LLM-Based Mathematical Optimization Modeling
Organizations: Hitachi America, Ltd., California, USA · Hitachi, Ltd., Tokyo, Japan
Abstract
Industrial optimization involves complex constraints, making optimization modeling difficult to automate. Large language models (LLMs) have been explored for generating optimization models from natural language, but their reliability in end-to-end settings remains limited, often producing non-executable, infeasible, or feasible but incorrect solutions. In this work, we study failure modes in LLM-based optimization modeling by decomposing the process into three components: mathematical reasoning, solver usage, and domain knowledge, and constructing datasets that target each aspect. Using these datasets, we analyze how different components relate to errors and find that they are associated with different types of failure, although these relationships are not always strong or consistent. Furthermore, while combining these components improves execution reliability, feasible but incorrect solutions remain the dominant failure mode, suggesting a remaining gap between executability and correctness. These findings highlight limitations of current dataset designs and suggest the importance of data that better capture constraint completeness and formulation accuracy to enhance reliability.
Figures & tables
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset Variant (Qwen3-1.7B) | Correct | Wrong Obj. | Infeasible | Timeout | Non-exec. |
|---|---|---|---|---|---|
| Full | 0.394 | 0.268 | 0.033 | 0.000 | 0.305 |
| W/O Math Opt. Reasoning | 0.362 | 0.310 | 0.057 | 0.001 | 0.271 |
| W/O Solver Usage | 0.376 | 0.249 | 0.032 | 0.000 | 0.343 |
| W/O Domain Knowledge | 0.357 | 0.282 | 0.037 | 0.000 | 0.325 |
| Dataset Variant (Qwen3-4B) | Correct | Wrong Obj. | Infeasible | Timeout | Non-exec. |
|---|---|---|---|---|---|
| Full | 0.503 | 0.280 | 0.044 | 0.001 | 0.173 |
| W/O Math Opt. Reasoning | 0.500 | 0.278 | 0.051 | 0.001 | 0.169 |
| W/O Solver Usage | 0.459 | 0.294 | 0.055 | 0.000 | 0.192 |
| W/O Domain Knowledge | 0.497 | 0.304 | 0.042 | 0.001 | 0.157 |
| Model | ComplexOR | IndustryOR | ComplexLP | NLP4LP | NL4OPT | Average |
|---|---|---|---|---|---|---|
| GPT-5.2 | 0.595 0.046 | 0.353 0.037 | 0.463 0.080 | 0.791 0.053 | 0.840 0.037 | 0.609 0.050 |
| o3 | 0.552 0.159 | 0.330 0.119 | 0.392 0.181 | 0.748 0.070 | 0.886 0.074 | 0.582 0.121 |
| GPT-4.1 | 0.521 0.100 | 0.308 0.082 | 0.427 0.117 | 0.700 0.068 | 0.892 0.063 | 0.570 0.086 |
| gpt-oss-120b | 0.472 0.227 | 0.270 0.113 | 0.341 0.207 | 0.590 0.190 | 0.692 0.253 | 0.473 0.198 |
| gpt-oss-20b | 0.226 0.247 | 0.125 0.142 | 0.137 0.185 | 0.374 0.313 | 0.460 0.400 | 0.264 0.257 |
| Qwen3-32B | 0.432 0.224 | 0.295 0.120 | 0.318 0.198 | 0.602 0.262 | 0.672 0.292 | 0.464 0.219 |
Natural Language to Optimization Modeling
Natural language to optimization modeling translates human requirements into formal mathematical models and solver-ready code.
See all 83 papers