TL;DR
OptiRepair introduces a two-phase closed-loop framework that enables LLM agents to diagnose and repair faulty supply chain optimization models. By decoupling domain-agnostic mathematical debugging from domain-specific operational validation, and training specialized 8B models via reinforcement learning, the system achieves an 81.7% Rational Recovery Rate, drastically outperforming frontier models like GPT-5.2 and Gemini 2.5 Pro.
What Problem Does This Paper Address?
Building multi-echelon supply chain optimization models is notoriously error-prone. When a linear programming (LP) solver like Gurobi encounters a modeling mistake, it simply returns Infeasible. To fix it, human analysts must rely on scarce Operations Research (OR) expertise to interpret solver diagnostics—specifically the Irreducible Infeasible Subsystem (IIS)—trace root causes across complex supply chain echelons, and modify the constraints.
While large language models (LLMs) have shown promise in writing code, debugging optimization models requires a unique blend of formal mathematical reasoning and deep domain intuition. A naive fix might restore mathematical feasibility but yield an operationally absurd solution (e.g., allowing a warehouse to order ten times its physical throughput). Existing AI benchmarks focus primarily on one-shot code generation rather than this iterative, closed-loop debugging process.
Methods
OptiRepair tackles this challenge by splitting the diagnosis-and-repair process into two distinct, independently deployable phases:
- Phase I: Diagnose and Repair (Domain-Agnostic): The agent interacts directly with the solver. Given an infeasible LP, it requests the IIS, isolates the conflicting constraints, and applies targeted modifications (such as relaxing constraints or updating bounds) until the solver returns an
Optimalstatus. - Phase II: Validate (Domain-Specific): Once the model is mathematically feasible, it is passed to a Rationality Oracle. This oracle evaluates the solution against five core principles of supply chain theory: base-stock structure, bullwhip ratio, inventory allocation, cost consistency, and order smoothing. If the solution violates these checks, the agent receives natural-language feedback and loops back to modify the model.
The Training Pipeline (OptiSTaR)
Instead of relying on massive, expensive API models, the authors trained two specialized 8B-parameter models (one for each phase) using a method called OptiSTaR. This pipeline combines iterative self-taught reasoning (STaR) with Group Relative Policy Optimization (GRPO). The models learn by exploring candidate repair trajectories, receiving exact, deterministic rewards directly from the Gurobi solver and the Rationality Oracle.
Datasets
The authors introduced OptiRepair-SC, a new benchmark consisting of 976 multi-echelon supply chain problems. The dataset features a disjoint train/test split (692 train, 284 test instances) across various supply chain configurations (2–5 echelons, 12–24 planning periods).
To simulate realistic errors, a "saboteur module" programmatically injects ten distinct modeling error types (ME-1 through ME-10), ranging from simple balance violations to complex index mismatches and demand inflation.
Key Insights and Ideas
- Feasibility $\neq$ Operational Rationality: Restoring a model's mathematical feasibility is only half the battle. General-purpose LLMs frequently implement "lazy" fixes, such as deleting critical cost constraints, which satisfy the solver but break fundamental supply chain mechanics.
- The Solver Interaction Bottleneck: The primary limitation of current frontier API models isn't their understanding of supply chain theory; it's their inability to interact effectively with solvers. Commercial API models failed heavily in Phase I, averaging only a 27.6% recovery rate when trying to resolve constraint conflicts.
- Small, Specialized Models Win: Domain specialization via reinforcement learning with verifiable rewards (RLVR) scales better than raw parameter count. Explicitly codifying operational rules into a correctness oracle allowed 8B models to soundly defeat frontier models that are orders of magnitude larger.
Key Results
The final evaluation compared the fine-tuned 8B pipelines against 22 commercial API models from seven distinct families. Performance was measured using the Rational Recovery Rate (RRR)—the percentage of problems successfully repaired to both mathematical feasibility and operational rationality.
- Massive Performance Leap: The trained 8B pipeline achieved an 81.7% RRR, compared to just 42.2% for the best commercial models (GPT-5.2 and Gemini 2.5 Pro) and a dismal 21.3% average across all API models.
- High Efficiency: The specialized 8B models converged on solutions much faster, requiring 2–3× fewer interaction steps and consuming 6–19× fewer tokens than the top-performing API models.
- Architecture Generalization: The training framework proved robust across different base architectures, with Qwen3-8B reaching 81.7% RRR and Llama-3.1-8B reaching 80.3% RRR.
Limitations and Future Work
While highly effective, the authors note several limitations in the current scope of OptiRepair:
- Simplified Topologies: The benchmark currently relies on synthetic errors within serial supply chain topologies and deterministic demand patterns. Real-world networks feature complex, meshed topologies and stochastic demand.
- Linear Formulations Only: The framework is currently tailored to Linear Programs (LPs). Extending it to Mixed-Integer Programs (MIPs) and non-linear formulations will introduce much harder optimization landscapes.
- Oracle Customization: The Rationality Oracle is hardcoded to multi-echelon inventory theory. Applying OptiRepair to other domains (like electrical grids or financial portfolios) would require manual codification of new domain-specific oracles.
Summary updated