Saved in:
Bibliographic Details
Main Authors: Lian, Junbo Jacob, Sun, Yujun, Chen, Huiling, Zhang, Chaoyu, Qin, Hanzhang, Teo, Chung-Piaw
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2602.15983
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913072277356544
author Lian, Junbo Jacob
Sun, Yujun
Chen, Huiling
Zhang, Chaoyu
Qin, Hanzhang
Teo, Chung-Piaw
author_facet Lian, Junbo Jacob
Sun, Yujun
Chen, Huiling
Zhang, Chaoyu
Qin, Hanzhang
Teo, Chung-Piaw
contents Large language models (LLMs) can translate natural language into optimization code, but silent failures pose a critical risk: code that executes and returns solver-feasible solutions may encode semantically incorrect formulations -- a feasibility-correctness gap reaching 90 percentage points on compositional problems. We introduce ReLoop, which addresses this gap through two complementary mechanisms. Structured generation decomposes code production into a four-stage reasoning chain (understand, formalize, synthesize, verify), preventing formulation errors at their source. Behavioral verification detects errors that survive generation by testing whether the formulation responds correctly to solver-based parameter perturbation -- an external semantic signal that bypasses LLM self-review and requires no ground truth. The two mechanisms are complementary by error structure: structured generation drives the largest gains on compositional problems (+8.5pp accuracy on RetailOpt-190 with Claude Opus 4.6), while behavioral verification dominates on localized defects (+4.4pp on MAMO-ComplexLP, its largest contribution across benchmarks). Combined with diagnostic execution recovery, ReLoop reaches 100% executable code on Claude Opus 4.6 and consistently improves accuracy on chat-tuned foundation models across three benchmarks; we further identify a known limitation of narrowly-tuned SFT models, whose learned output formats are brittle to chain-of-thought prompts -- an interaction we document and analyze. We release RetailOpt-190, 190 compositional retail optimization scenarios targeting the multi-constraint interactions where LLMs most frequently fail.
format Preprint
id arxiv_https___arxiv_org_abs_2602_15983
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle ReLoop: Structured Modeling and Behavioral Verification for Reliable LLM-Based Optimization
Lian, Junbo Jacob
Sun, Yujun
Chen, Huiling
Zhang, Chaoyu
Qin, Hanzhang
Teo, Chung-Piaw
Software Engineering
Artificial Intelligence
Machine Learning
Optimization and Control
Large language models (LLMs) can translate natural language into optimization code, but silent failures pose a critical risk: code that executes and returns solver-feasible solutions may encode semantically incorrect formulations -- a feasibility-correctness gap reaching 90 percentage points on compositional problems. We introduce ReLoop, which addresses this gap through two complementary mechanisms. Structured generation decomposes code production into a four-stage reasoning chain (understand, formalize, synthesize, verify), preventing formulation errors at their source. Behavioral verification detects errors that survive generation by testing whether the formulation responds correctly to solver-based parameter perturbation -- an external semantic signal that bypasses LLM self-review and requires no ground truth. The two mechanisms are complementary by error structure: structured generation drives the largest gains on compositional problems (+8.5pp accuracy on RetailOpt-190 with Claude Opus 4.6), while behavioral verification dominates on localized defects (+4.4pp on MAMO-ComplexLP, its largest contribution across benchmarks). Combined with diagnostic execution recovery, ReLoop reaches 100% executable code on Claude Opus 4.6 and consistently improves accuracy on chat-tuned foundation models across three benchmarks; we further identify a known limitation of narrowly-tuned SFT models, whose learned output formats are brittle to chain-of-thought prompts -- an interaction we document and analyze. We release RetailOpt-190, 190 compositional retail optimization scenarios targeting the multi-constraint interactions where LLMs most frequently fail.
title ReLoop: Structured Modeling and Behavioral Verification for Reliable LLM-Based Optimization
topic Software Engineering
Artificial Intelligence
Machine Learning
Optimization and Control
url https://arxiv.org/abs/2602.15983