NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

AlphaOPT: Formulating Optimization Programs with Self-Improving LLM Experience Library

Minwei Kong, Ao Qu, Xiaotong Guo, Wenbin Ouyang, Chonghe Jiang, Han Zheng, Yining Ma, Dingyi Zhuang, Yuhan Tang, Junyi Li, Hai Wang, Cathy Wu, Jinhua Zhao · DOI

Introduction

Translating natural language business requirements into precise mathematical optimization code is a critical yet challenging task in industries such as logistics and finance. While Large Language Models (LLMs) show promise in this domain, they often exhibit "brittleness," where minor linguistic variations lead to significant modeling errors. Current approaches typically rely on static prompt engineering or data-intensive fine-tuning. AlphaOPT introduces a middle ground: a self-improving framework that enables LLMs to systematically acquire, refine, and reuse modeling principles through a structured "experience library."

Methodology

AlphaOPT operates through a continuous two-phase cycle designed to mimic human expert learning, anchored by objective solver feedback.

Overview of the AlphaOPT two-phase framework: Library Learning and Library Evolution.

Phase 1: Library Learning

When a model fails a task, it enters a self-exploration phase. It iteratively attempts different formulations until an optimization solver (e.g., Gurobi) verifies the solution's correctness. Upon success, the model extracts a structured "insight" consisting of a four-part tuple:

  • Taxonomy: Categorization within a hierarchical structure (Domain Modeling, General Formulation, or Code Implementation).
  • Condition: Explicit criteria for when the insight should be applied.
  • Explanation: The underlying mathematical or logical rationale.
  • Example: Concrete code snippets demonstrating the principle.

Phase 2: Library Evolution

To ensure the accuracy and relevance of stored insights, AlphaOPT employs a diagnostic step. The system evaluates insight performance across multiple tasks. If an insight leads to errors, its "Condition" is narrowed; if it is missed in applicable scenarios, the condition is broadened. This solver-guided verification ensures that the library evolves based on objective truth rather than LLM intuition.

Experimental Evaluation

The framework was evaluated using 452 problem instances from benchmarks including NLP4LP, NL4OPT, IndustryOR, and MAMO (ComplexLP). To assess generalization, the authors utilized Out-of-Distribution (OOD) datasets: LogiOR and OptiBench.

Key Findings

AlphaOPT demonstrated significant improvements in modeling accuracy and robustness compared to traditional baselines.

  • Generalization and Robustness: AlphaOPT outperformed strong baselines by approximately 8-9% on OOD datasets. Unlike fine-tuned models, which often suffer from performance degradation on unfamiliar data (e.g., dropping to 19.6% on LogiOR), AlphaOPT maintained a much higher accuracy (56.0%), indicating that learning general principles is more effective than pattern memorization.
  • Learning Efficiency: Accuracy on OOD tasks improved from 65% to 72% as the training set grew from 100 to 300 items, achieving these gains without parameter updates.
  • Library Stabilization: A key characteristic of the framework is its bounded growth. As the model masters recurring patterns, the library size eventually stabilizes, preventing the confusion often associated with indefinitely expanding memory systems.
The library size curve showing stabilization over iterations as the model masters recurring patterns.

Conclusion and Future Work

AlphaOPT provides a robust framework for improving LLM performance in optimization modeling through structured experience. By leveraging solver feedback and explicit applicability conditions, it overcomes the limitations of static prompting and brittle fine-tuning. Future research will focus on extending the framework to handle multi-level spatiotemporal logic and expanding support for additional solvers and modeling languages beyond Gurobi and Python.

Summary updated

BibTeX
@inproceedings{kong2025alphaopt,
  author = {Minwei Kong and Ao Qu and Xiaotong Guo and Wenbin Ouyang and Chonghe Jiang and Han Zheng and Yining Ma and Dingyi Zhuang and Yuhan Tang and Junyi Li and Hai Wang and Cathy Wu and Jinhua Zhao},
  title = {{AlphaOPT: Formulating Optimization Programs with Self-Improving LLM Experience Library}},
  booktitle = {ScaleOPT @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=xEdavqGjRu},
}
Figure