Table of Contents
Fetching ...

NEMO: Execution-Aware Optimization Modeling via Autonomous Coding Agents

Yang Song, Anoushka Vyas, Zirui Wei, Sina Khoshfetrat Pakazad, Henrik Ohlsson, Graham Neubig

TL;DR

NEMO addresses the challenge of turning natural-language optimization problems into reliable executable models by leveraging execution-aware Autonomous Coding Agents (ACAs) within sandboxed environments. It introduces an asymmetric simulator–optimizer validation loop, memory-augmented few-shot learning, Minimum Bayes Risk (MBR) decoding, and self-consistency to produce robust, executable optimization code without task-specific fine-tuning. The system comprises four coordinated modules—decision process extractor, simulator, solver recommender, and optimizer—plus memory, enabling end-to-end NL-to-model translation with rigorous execution-based validation. Across nine benchmarks, NEMO achieves state-of-the-art or competitive performance, often with substantial improvements, demonstrating the practical impact of execution-aware, agentic architectures for automated optimization modeling.

Abstract

In this paper, we present NEMO, a system that translates Natural-language descriptions of decision problems into formal Executable Mathematical Optimization implementations, operating collaboratively with users or autonomously. Existing approaches typically rely on specialized large language models (LLMs) or bespoke, task-specific agents. Such methods are often brittle, complex and frequently generating syntactically invalid or non-executable code. NEMO instead centers on remote interaction with autonomous coding agents (ACAs), treated as a first-class abstraction analogous to API-based interaction with LLMs. This design enables the construction of higher-level systems around ACAs that structure, consolidate, and iteratively refine task specifications. Because ACAs execute within sandboxed environments, code produced by NEMO is executable by construction, allowing automated validation and repair. Building on this, we introduce novel coordination patterns with and across ACAs, including asymmetric validation loops between independently generated optimizer and simulator implementations (serving as a high-level validation mechanism), external memory for experience reuse, and robustness enhancements via minimum Bayes risk (MBR) decoding and self-consistency. We evaluate NEMO on nine established optimization benchmarks. As depicted in Figure 1, it achieves state-of-the-art performance on the majority of tasks, with substantial margins on several datasets, demonstrating the power of execution-aware agentic architectures for automated optimization modeling.

NEMO: Execution-Aware Optimization Modeling via Autonomous Coding Agents

TL;DR

NEMO addresses the challenge of turning natural-language optimization problems into reliable executable models by leveraging execution-aware Autonomous Coding Agents (ACAs) within sandboxed environments. It introduces an asymmetric simulator–optimizer validation loop, memory-augmented few-shot learning, Minimum Bayes Risk (MBR) decoding, and self-consistency to produce robust, executable optimization code without task-specific fine-tuning. The system comprises four coordinated modules—decision process extractor, simulator, solver recommender, and optimizer—plus memory, enabling end-to-end NL-to-model translation with rigorous execution-based validation. Across nine benchmarks, NEMO achieves state-of-the-art or competitive performance, often with substantial improvements, demonstrating the practical impact of execution-aware, agentic architectures for automated optimization modeling.

Abstract

In this paper, we present NEMO, a system that translates Natural-language descriptions of decision problems into formal Executable Mathematical Optimization implementations, operating collaboratively with users or autonomously. Existing approaches typically rely on specialized large language models (LLMs) or bespoke, task-specific agents. Such methods are often brittle, complex and frequently generating syntactically invalid or non-executable code. NEMO instead centers on remote interaction with autonomous coding agents (ACAs), treated as a first-class abstraction analogous to API-based interaction with LLMs. This design enables the construction of higher-level systems around ACAs that structure, consolidate, and iteratively refine task specifications. Because ACAs execute within sandboxed environments, code produced by NEMO is executable by construction, allowing automated validation and repair. Building on this, we introduce novel coordination patterns with and across ACAs, including asymmetric validation loops between independently generated optimizer and simulator implementations (serving as a high-level validation mechanism), external memory for experience reuse, and robustness enhancements via minimum Bayes risk (MBR) decoding and self-consistency. We evaluate NEMO on nine established optimization benchmarks. As depicted in Figure 1, it achieves state-of-the-art performance on the majority of tasks, with substantial margins on several datasets, demonstrating the power of execution-aware agentic architectures for automated optimization modeling.
Paper Structure (55 sections, 10 equations, 6 figures, 12 tables)

This paper contains 55 sections, 10 equations, 6 figures, 12 tables.

Figures (6)

  • Figure 2: Overview of NEMO. Natural language descriptions are translated into formal mathematical models via component-wise MBR decoding. These models drive an asymmetric validation loop between independent optimizer and simulator agents, where the simulator detects feasibility errors and guides iterative refinement. The system leverages external memory and solver recommendations to produce validated, executable optimization code.
  • Figure 3: Distribution of top-5 similarity scores for nine evaluation benchmarks against the OptMATH training set. The distributions indicate a healthy semantic gap between the test queries and the stored training samples. The absence of high-density peaks near 1.0 confirms that no significant data leakage occurs, even when retrieving for the domain-adjacent OptMATH-Bench (center panel).
  • Figure 4: Hybrid component-wise MBR and LLM re-ranking pipeline. A fast embedding-based filter removes weak candidates early, allowing stronger reasoning models to be reserved for final top-$q$ re-ranking, where semantic similarity is replaced by logical verification to select mathematically consistent extractions.
  • Figure 5: Scatter plot of raw pairwise similarity scores comparing vanilla sampling and MBR decoding. The dashed line indicates parity.
  • Figure 6: The distribution of failure modes in NEMO's optimization pipeline on the IndustryOR benchmark. The flow transitions from the total problem set into valid models and four primary categories of failure.
  • ...and 1 more figures

Theorems & Definitions (1)

  • Remark