IR2Solve: Structured Intermediate Representations for Cost-Efficient Optimization Autoformulation
- Source
- arxiv.org
- Author
- Penglin Zhu, Linhai Zhang, Jungang Xu, Xinchi Wei, Xiuqi Wu
- Date

Context
IR2Solve separates understanding an optimization problem from generating executable solver input. A first writes a structured description of the quantities to choose, the objective and the constraints. Fixed software then checks that representation and compiles it into solver input. This gives the checking stage explicit components to inspect before execution. Method.
On a ten-problem cost comparison, IR2Solve used one model call per problem, versus eight and thirty-nine for the two comparison systems. The authors also report competitive correctness across six cleaned benchmarks. The approach reduces repeated model interaction by assigning verification and compilation to deterministic software. Evaluation.
- IR2Solve replaces iterative LLM repair loops with one semantic call that emits a schema-constrained ModelIR, followed by deterministic verification and IR-to-solver compilation - no search, no workflow.
- The IR writes sets, parameters, variables, objectives and constraints as restricted Python-like expressions, and expands finite per-index constraint families into individual scalar entries, cutting free-index and implicit-quantification errors.
- Cost result: 1 call per instance vs 8 for Chain-of-Experts and 39 for SAC-Opt, which burn 3.3x and 22.9x its volume - while staying competitive on objective correctness across six benchmarks.
- An ablation on 153 IndustryOR/ComplexLP instances shows sequential gains from the structured IR interface, the scalar-constraint instruction, and deterministic verification.
- LLM — A large language model — the neural network behind tools like Claude and ChatGPT, trained on huge amounts of text to predict what comes next.
- eval — A repeatable test for AI quality — a set of tasks plus scoring — used the way software teams use test suites, because model output is too variable to judge by eyeballing.
- multi-agent — Using several AI agents on one problem — splitting work in parallel, checking each other, or filling different roles like planner and reviewer.
- token — The chunk of text a model reads and writes in — roughly three-quarters of a word — and the unit AI usage is billed in.
“We present IR2Solve, an intermediate-representation-first autoformulation pipeline that uses a single semantic LLM call to produce a schema-constrained ModelIR, followed by two deterministic stages: verification and IR-to-solver compilation.”
“On a matched ten-instance cost panel, IR2Solve uses one semantic call per instance, whereas Chain-of-Experts and SAC-Opt use 8 and 39 calls per instance and consume 3.3 and 22.9 times the token volume of IR2Solve, respectively.”
articleVerified Learning for Compiler Optimization: An LLM-Guided Architecture with Formal ControlDev Pratap Singh, Rong Feng, Suman Saha
articleAre the Financial Reasoning from LLMs Credible? A Real World Test over Long-Horizon StatementsXinke Tong, Xuanming Zhang, Tianyi Tang, An Yang, Jiatu Hu, Guojie Lin, Zhenzhen Shi, Lingfeng Zeng, Boyu Yang, Bing Zhao, Hu Wei, Lin Qu, Dayiheng Liu
postWhat Happened When I Applied Karpathy's Autoresearch Idea to LLM InferenceManthan Gupta
Checking sign-in…
Loading comments…