OptDiff: Formulating Optimization Problems with Masked Diffusion Language Models
Abstract
Turning a natural language description into a solver-ready optimization model demands faithful interpretation of entities, quantities, and relations, as well as generation fast enough for practical use. Existing approaches generate and revise such formulations with autoregressive language models, whose sequential decoding makes long formulations and iterative correction increasingly costly. We observe that an optimization formulation involves three tightly coupled kinds of decisions: variable semantics, relation structure, and numerical grounding. To make these decisions explicit, we design an intermediate representation (IR) that separates them while preserving their dependencies through shared semantic declarations. On this IR, masked diffusion can reconstruct multiple decisions in parallel and revise selected regions through remasking. Building on it, we present OptDiff, which fixes variable semantics in a shared node, reconstructs objective and constraint structures in parallel with confidence-guided denoising, binds numerical values in a separate stage, and repairs flagged statements through localized remasking. Across four optimization modeling benchmarks, OptDiff achieves competitive modeling accuracy with the lowest generation time among the compared methods. Compared with a matched autoregressive baseline, it improves objective-value accuracy by 5.3 percentage points on average and reduces generation time by roughly , reaching nearly on complex formulations. These results indicate that optimization formulations become well suited to diffusion once their semantic, structural, and numerical decisions are made explicit.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.