OptiLoop: Coordination-in-the-Loop Verification and Repair for LLM-Generated Optimization Agents
Yujia Xu, Zhiheng Wang, Thi Dinh · 2026
Read OptiLoop: Coordination-in-the-Loop Verification and Repair for LLM-Generated Optimization Agents by Yujia Xu, Zhiheng Wang, Thi Dinh (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-27630.txt.
Introduction
Yujia Xu, Zhiheng Wang, and Thi Dinh verify language-model optimization agents inside the coordination loop itself. Their OptiLoop pipeline generates local agents from text, checks them in brief capped coordination trials against a fixed reference partner, and repairs failures from structured behavioral evidence. On 40 held-out scenarios, objective match rises from about 66 percent to about 93 percent, and mean objective gap falls from about 15 percent to about 4 percent.
Catalog record
| CREATOR | Yujia Xu, Zhiheng Wang, Thi Dinh |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 66099 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.27630
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
OptiLoop: Coordination-in-the-Loop Verification and Repair for LLM-Generated Optimization Agents Yujia Xu, Zhiheng Wang, Thi Dinh Abstract Many decentralized decision problems require multiple parties to coordinate on shared decisions while keeping objectives, constraints, and data private. Large language models (LLMs) offer a promising way to lower the barrier to participation by generating local optimization agents from natural-language specifications. In coordination settings, however, executability is not enough: a generated agent may compile, solve, and pass local checks while still being semantically wrong, for example by misrepresenting costs, mis-scoping constraints, or responding incorrectly to incentives. Such errors often surface only during coordination, as systematic behavioral failures rather than infeasibility. We propose coordination-in-the-loop verification and repair for LLM-generated optimization agents. We instantiate this idea with an Alternating Direction Method of Multipliers (ADMM)-style consensus protocol and introduce OptiLoop, a pipeline that generates local optimization agents from text, verifies them through short, bounded coordination runs against a fixed reference counterparty, extracts structured behavioral and static evidence, and applies evidence-driven repair. When failures are structural rather than implementational, OptiLoop escalates from localized code fixes to corrected-formulation repair, and it can additionally reuse episodic lessons from prior instances. On 40 held-out test scenarios, OptiLoop-Full improves objective match from 66.0% to 93.0% and social match from 68.5% to 89.0% relative to a strong local-validation baseline, while reducing mean objective gap from 15.3% to 3.5% and mean social gap from 7.6% to 2.0%. These results show that, for generated optimization agents deployed inside decentralized decision loops, correctness should be validated in the loop itself rather than through isolated execution alone. 1 Introduction Figure 1 : OptiLoop coordination-in-the-loop verification and repair workflow. Many decision problems of practical interest are decentralized: multiple stakeholders hold private objectives, constraints, and data, yet must still coordinate on shared decisions. This setting arises in supply planning, resource allocation, and scheduling, where privacy requirements, organizational boundaries, and stakeholder autonomy make a single monolithic optimization model undesirable or infeasible. A common alternative is to use iterative coordination methods, such as Alternating Direction Method of Multipliers (ADMM)-style consensus protocols, which repeatedly solve local subproblems while updating shared decisions through structured feedback signals such as dual prices, penalty terms, and residual-based diagnostics ( 8 ; 3 ) . These protocols can scale well while respecting decentralized control, but they rely on a central assumption: each participant implements a correct local optimization agent that faithfully represents its intended private objective and constraints. In practice, this assumption is often the primary bottleneck. Implementing a local optimization agent requires operations-research expertise to formalize business logic as variables, constraints, and objectives, and engineering expertise to implement solver code that correctly responds to protocol feedback. Large language models (LLMs) offer a potential way to reduce this burden by translating natural-language specifications into mathematical formulations and executable optimization code. Prior work has shown that LLMs can often generate executable optimization models from text ( 12 ; 1 ; 5 ) . In decentralized coordination settings, however, executability alone is insufficient. A generated optimization agent may compile, solve, and pass local checks while still being semantically wrong. It may omit a cost term, attach a variable cost to fixed data, or mis-scope a constraint while still returning feasible, well-formed outputs. Such failures often do not manifest as infeasibility; instead, they alter how the agent responds to coordination incentives. As a result, errors that remain invisible under isolated execution may appear only inside the coordination loop, as wrong-sign price response, degenerate proposals, slow or unstable convergence, or persistent disagreement with a trusted counterparty. Thus, isolated execution can verify that an agent runs, but not that it behaves coherently under coordination. This paper proposes coordination-in-the-loop verification and repair for LLM-generated optimization agents. The central idea is to validate a candidate agent using the structured feedback signals produced by the coordination protocol itself, treating coordination trajectories as semantics-aware verification evidence. We instantiate this principle with an ADMM-style consensus protocol and introduce OptiLoop , a pipeline for generating, verifying, and repairing optimization agents from natural language. As shown in Figure 1 , OptiLoop first generates and locally validates a candidate agent, then runs a short coordination episode against a fixed trusted counterparty to extract behavioral and static evidence, and finally uses that evidence to select among acceptance, localized code repair, and corrected-formulation repair. The key difference from execution-driven validation is that coordination is used not merely to confirm that an agent runs, but to determine whether it behaves correctly under incentives and to drive the choice of repair. We study this problem in a stack-relative setting, where the coordinator and trusted counterparty are fixed deployment infrastructure and the generated agent must be verified for correct behavior within that specific environment. Contributions. First, we formalize coordination-in-the-loop verification as a validation principle for LLM-generated local optimization agents in decentralized coordination settings, emphasizing deployment-time feedback signals rather than isolated execution checks. Second, we introduce OptiLoop, which operationalizes this principle in an ADMM-style consensus protocol via diagnostic coordination episodes, structured evidence extraction, and escalation from localized code repair to corrected-formulation repair for structural failures. Third, we provide a benchmark and ablation study showing that coordination-in-the-loop verification exposes semantic failures missed by local validation and materially improves correctness on held-out decentralized scenarios. 2 Related Work OptiLoop sits at the intersection of three lines of work: iterative coordination for decentralized optimization, LLM-based optimization modeling from natural language, and verification and repair for generated programs. Our contribution is to connect these strands through coordination-in-the-loop verification: instead of validating a generated optimization agent only in isolation, we evaluate and repair it using the structured feedback signals produced by the coordination protocol itself. Iterative coordination and decomposition. Large-scale and decentralized optimization problems are often solved by decomposing them into local subproblems and coordinating shared decisions through structured feedback. Distributed optimization methods use message passing to align local objectives ( 8 ) . Consensus and penalty-based methods such as ADMM coordinate local copies through dual variables and proximal penalties, with convergence monitored through residuals ( 3 ) . Dual and Lagrangian decomposition similarly update multiplier-like prices in response to constraint violations ( 4 ) , while master–subproblem methods such as Benders decomposition refine a master problem using cuts returned by subproblems ( 11 ; 15 ) . Across these methods, a common pattern is iterative interaction through feedback signals. OptiLoop builds on this structure by treating coordination trajectories as a source of verification evidence. LLMs for optimization modeling and code generation. A growing literature studies how to translate natural-language problem descriptions into optimization models and implementations. NL4Opt frames this problem as a benchmark for extracting variables, constraints, and objectives from text ( 12 ) . OptiMUS proposes a modular workflow that formulates optimization models, generates solver code, executes it, and iteratively debugs failures ( 1 ) . ORLM studies automated optimization modeling using synthetic instruction data and benchmark suites ( 5 ) . Related work also explores multi-agent LLM reasoning for operations research tasks ( 14 ; 10 ) and structure-guided modeling procedures ( 9 ) . Together, these systems show that LLMs can often generate executable optimization models, especially when paired with modular prompting, decomposition, or iterative refinement. Verification and repair. Most LLM-based optimization-modeling systems still validate candidates primarily through