TL;DR
Turning messy, real-world business problems into precise mathematical equations usually takes a small army of Operations Research PhDs—and single LLMs tend to trip over their own shoelaces when the logic gets tricky. This paper replaces the lone-wolf LLM with an assembly line of six specialized 7B-parameter agents, teaching them how to collaborate using a clever "who broke it?" debugging loop and an on-demand playbook of math recipes. The result? A compact multi-agent team that outperforms massive frontier models like GPT-4 and DeepSeek-R1 on complex optimization tasks.
What Problem Does This Paper Address?
Every day, airlines schedule crews, factories route supplies, and power grids balance loads using Optimization Modeling (OM)—the art of translating real-world constraints and goals into mathematical formulations that commercial solvers (like Gurobi) can crunch. Automating this translation from plain English to solver code is a dream for industry, and LLMs seem like a natural fit.
While single LLMs handle textbook word problems reasonably well, they hit a wall on industrial-scale problems featuring tangled combinatorial logic and obscure decision variables. Breaking the problem down across a Multiagent System (MAS) helps, but introduces a nasty catch-22: the credit assignment problem. Existing OM datasets only tell you if the final numerical answer is right or wrong. If a six-agent relay team drops the baton and outputs infeasible code, how do you know which intermediate agent messed up so you can fine-tune them without hiring human experts to grade every step?
Methods
The authors tackle this with a three-part framework covering architecture, training, and inference:
- A Six-Agent Assembly Line: Mirroring how human experts think, the system splits modeling into a strict topological dependency graph of six specialized agents (built on
Qwen2.5-7B-Instruct): Set (identifies entities/indices), Parameter and Variable (extract data and define decision variables), Objective and Constraint (write the math logic), and Code (translates everything into Python/Gurobi). - Hierarchical Counterfactual Synthesis (HCS) (Novel): To generate step-by-step training data without human annotators, the authors work backward from failures. When a modeling trajectory fails solver verification, HCS applies a "Minimal Intervention Principle"—resampling from the end of the pipeline upstream (Code $\rightarrow$ Logical $\rightarrow$ Structural $\rightarrow$ Base layers). If resampling only the Constraint Agent fixes the final answer, bingo: the original constraint is flagged as a "hard negative" and the fixed one as a "verified positive." These pairs fuel standard Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) for each individual agent.
- Opt-Skill Library (Novel): During inference, a keyword-based router fetches reusable procedural checklists (like flow conservation rules or variable-linking patterns) from a two-level library—covering both general OR patterns and scenario-specific rules—and injects them only into the prompts of the specific agents that need them.
Datasets
- Training: Synthesized and augmented from public optimization modeling seed problems, using multiple teacher LLMs to establish solver-verified consensus labels (which are used strictly to verify outputs, not generate training text).
- Evaluation: Tested across five established Operations Research benchmarks spanning textbook problems to gnarly industrial scenarios: NL4Opt, MAMO EasyLP, MAMO ComplexLP, IndustryOR, and OptMATH. No new evaluation benchmarks are introduced.
Key Insights and Ideas
- Structure alone buys you a free lunch: Even before fine-tuning a single weight, simply splitting a zero-shot 7B model into the six-agent workflow boosts average accuracy from 31.0% to 39.1% across all five benchmarks. Giving LLMs narrow, well-defined sandboxes prevents context overload.
- Failures are goldmines for credit assignment: Instead of throwing away failed trajectories, bottom-up counterfactual resampling turns sparse binary solver feedback into surgical, component-level supervision—isolating exactly where reasoning went off the rails.
- Constraints and code are the true bottlenecks: In a "leave-one-agent-untrained" ablation study, swapping the trained Constraint or Code agent back to an untrained base model tanked accuracy by 15.3% and 12.6%, respectively. Meanwhile, swapping out the Objective or Set agent barely caused a dent (-3.4% and -4.0%). Defining the feasible region and writing bug-free solver syntax is where domain alignment matters most.
Key Results
Using a compact Qwen2.5-7B-Instruct backbone for each agent, the proposed system achieves an average accuracy of 67.6% across the five benchmarks.
- Punching above its weight class: It outperforms massive general and reasoning models, including GPT-4 (55.0%), OpenAI-o3 (57.1%), DeepSeek-R1 (64.6%), and DeepSeek-V3.1 (65.0%).
- Beating specialized peers: It surpasses single-agent fine-tuned OR models like SIRL-Qwen2.5-7B (60.6%) and LLMOpt-14B (51.1%), as well as prompt-based multi-agent systems like OptiMUS (53.7%).
- Thriving on complexity: On MAMO ComplexLP, it hits 68.5% (beating DeepSeek-R1's 67.9% and SIRL's 51.7%), and ties DeepSeek-R1 for first place on IndustryOR at 45.0%.
- Every training stage stacks up: Controlled ablations show steady climbs from MAS Prompting (39.1%) $\rightarrow$ +SFT (57.5%) $\rightarrow$ +DPO (61.5%) $\rightarrow$ +Opt-Skill (67.6%).
Limitations and Future Work
Not discussed in the paper. (Note: The provided text concludes after Section 5 without a dedicated limitations or future work section, though the results show that benchmarks like OptMATH [36.4%, vs. OpenAI-o3's 44.0%] and IndustryOR [45.0%] still leave plenty of headroom for automated industrial modeling).
Summary updated