Towards LLM-Driven Automation of Lagrangian Relaxation Design for Mixed-Integer Linear Programs

Yoonju Sim, Jimin Nam, Jungwon Ahn, Changhyun KwonarXiv 2026

TL;DR

Large-scale optimization problems often choke standard solvers unless a human expert painstakingly breaks them apart using techniques like Lagrangian relaxation. AutoLR automates this dark art using LLM agents that read algebraic math formulations, choose which constraints to relax, and write custom code to repair broken solutions. Best of all, the LLMs do all their thinking offline—meaning once the custom algorithm is designed, you can solve new problem instances at scale with zero runtime API costs.

What Problem Does This Paper Address?

Mixed-Integer Linear Programs (MILPs) are the mathematical backbone of scheduling, logistics, and resource allocation. When MILPs get too big for off-the-shelf solvers like Gurobi, operations researchers turn to Lagrangian relaxation (LR). The trick is to take the "complicating" constraints that tangle everything together and move them into the objective function with penalty weights (multipliers). Solving the simplified subproblems gives you a solid mathematical bound on the best possible answer (a dual bound), though the resulting solutions usually violate the relaxed rules and need a custom primal heuristic to fix them.

Figure 1: Workflow of a Lagrangian relaxation algorithm and its core design components.

Historically, designing an LR algorithm required PhD-level intuition and weeks of trial-and-error. Existing automated tools try to bypass human experts by looking purely at the geometry of the constraint matrix—slicing it into neat, disconnected blocks (using graph partitioners like hMETIS). Because they are blind to what the algebra actually means, these geometric slices often create unbounded subproblems or terrible bounds. Meanwhile, generic repair heuristics ignore problem structure and frequently fail to find valid solutions under tight time limits.

Figure 2: Constraint–variable incidence structures of two relaxations on benchmark P05 (Tang et al., 2011). The inset in (b) magnifies the diagonal subproblem blocks. Bound gap is 100(U − b)/|U| within 120 s, where b is the best LR lower bound and U is the Gurobi incumbent.

Methods

The authors built AutoLR, a modular computational laboratory powered by two specialized LLM agents operating over a standard solver engine (Gurobi + proximal bundle method) in three offline phases:

  1. Relaxation Design Agent (Phases 1 & 2): The agent reads the raw algebraic objective, indexed constraint families, and row counts, then proposes binary masks deciding which constraint families to dualize. Rather than judging a relaxation solely by its final bound, AutoLR introduces Dual AUC—the time-integrated area under the normalized dual-bound curve over a fixed budget ($T = 120\text{s}$). This rewards relaxations that get good bounds fast. After proposing an initial pool of 3 candidates, the agent iteratively refines its choices using structural previews (block counts, border area) and Dual AUC feedback, before consolidating the best relaxation across training instances.
  2. Primal Heuristic Agent (Phase 3): Armed with the winning relaxation, a second agent writes standalone, solver-free Julia code split into two functions: an initial repair step to make subproblem solutions feasible, and a local improvement step (like simulated annealing) to polish the objective. A strict verifier ensures the code doesn't cheat by calling external solvers and confirms it actually uses Lagrangian dual state information.
The Primal Heuristic Agent plans, writes, and refines solver-free repair and improvement code.

Datasets

The authors introduce and release a 20-benchmark MILP suite spanning seven application domains, with three medium instances (for offline design) and three unseen hard instances (for testing scale transfer) per benchmark:

  • Validation Set (P01–P10): 10 MILPs reconstructed from published LR papers, complete with human-expert relaxations as baselines.
  • Held-out Set (T01–T10): 10 complex MILPs without any published LR designs, testing whether LLMs are genuinely reasoning about algebra rather than reciting memorized literature.

Key Insights and Ideas

  • Algebraic reading beats iterative black-box search: Almost all the magic in relaxation design happens at initialization, before running a single solver test. By reading the algebra, LLMs propose initial 3-candidate pools that dramatically outperform random pools and matrix partitioners. Subsequent iterative search—whether guided by an LLM or classical Tanimoto Bayesian Optimization (BO)—mostly just improves run-to-run consistency.
  • LLMs are hypothesis generators, not oracles: Roughly 17% to 33% of individual LLM relaxation proposals score zero (creating unbounded or intractable subproblems). Evaluating a tiny pool of 3 proposals absorbs these duds—and at $k=3$, even a compact open-weight model (Qwen3.8-27B) rivals frontier reasoning models.
  • Formulation-aware code crushes generic heuristics, even without dual info: An "LR-blind" ablation (where the coding agent writes heuristics from the math formulation alone, ignoring Lagrangian multipliers) split wins evenly with the LR-aware agent overall. Writing problem-specific repair logic is the main driver of feasibility, while Lagrangian dual prices offer selective boosts on specific problems.

Key Results

  • Relaxation Quality: Within just 3 initial proposals, Claude Opus 5.5 achieved a mean Dual AUC of 0.808 on validation (beating published expert relaxations at 0.675 and hMETIS at 0.540) and 0.512 on held-out benchmarks (vs. 0.379 for hMETIS). With iterative LLM search, validation Dual AUC reached 0.840, hitting the best observed relaxation in 84.4% of runs.
  • Primal Feasibility: Across all 17 benchmarks with viable hard-scale relaxations, AutoLR’s generated Julia heuristics restored 100% feasibility on every call within 30 seconds, landing within 2% of Gurobi’s 120-second incumbent on 14 of them (mean gap 1.27% on validation, 3.89% on held-out). Generic MILP heuristics (Feasibility Jump, RINS, RENS) failed completely on the majority of benchmarks.
  • Scale Transfer: Designs discovered on medium instances transferred cleanly to unseen hard instances on 8/10 validation and 6/10 held-out benchmarks, struggling only when retained coupled blocks scaled poorly in solve time.

Limitations and Future Work

AutoLR operates within a fixed algebraic formulation—it can choose which constraint families to relax, but it cannot reformulate a model (for example, splitting shared variables across blocks or tightening big-$M$ bounds, which stymied benchmarks like T03 and T09). Furthermore, it holds the generic Gurobi subproblem solver fixed rather than writing custom dynamic-programming or combinatorial subproblem solvers, and it doesn't feed primal heuristic performance back into relaxation selection. Future work aims to tackle automatic model reformulation, custom subproblem solver synthesis, and related frameworks like column generation and Benders decomposition.

Summary updated

BibTeX
@misc{sim2026towards,
  author = {Yoonju Sim and Jimin Nam and Jungwon Ahn and Changhyun Kwon},
  title = {{Towards LLM-Driven Automation of Lagrangian Relaxation Design for Mixed-Integer Linear Programs}},
  year = {2026},
  eprint = {2611.37386},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.37386},
}
Figure