Augmenting Operations Research with Auto-Formulation of Optimization Models From Problem Descriptions

Rindra Ramamonjison, Haley Li, Timothy T. L. Yu, Shiqi He, Vishnu Rengan, Amin Banitalebi-Dehkordi, Zirui Zhou, Yong Zhang

Introduction

Operations Research (OR) is essential for optimizing complex systems, from supply chain logistics to resource allocation. However, a significant "translation gap" exists between domain experts, who describe problems in natural language, and optimization solvers, which require precise mathematical formulations. Traditionally, bridging this gap requires specialized OR expertise to manually translate word problems into code—a process that is time-consuming, costly, and inaccessible to non-experts.

The OptGen Framework

To address this, we introduce OptGen, an augmented intelligence system designed to automatically translate natural language problem descriptions into mathematical optimization models. OptGen leverages a novel two-stage mapping approach ($p \to r \to f$) to ensure both linguistic context and mathematical precision are preserved.

The OptGen pipeline: from natural language problem description to a final optimization model through automated suggestions and human-in-the-loop editing.

Two-Stage Mapping and Technical Innovations

The core of OptGen is its transition through an Intermediate Representation (IR):

  1. Text-to-IR Mapping: The system first generates an IR using XML-like tags (e.g., <VAR> trust </VAR>). This format maintains the connection between the problem's narrative context and its mathematical components.
  2. IR-to-Formulation: A deterministic parser converts the structured IR into a canonical tabular format (coefficients for variables and constraints) compatible with standard solvers.
The two-stage mapping process converting tagged problem descriptions into an Intermediate Representation (IR) and finally into a canonical mathematical format.

Several key technical innovations power this process:

  • Prompt-Guided Generation: Built on the BART architecture, the model utilizes "declaration prompts" from an initial Entity Tagger (XLM-RoBERTa). These prompts act as contextual triggers, guiding the decoder to focus on specific constraints or variables.
  • Copy Mechanism: To ensure numerical accuracy—where a single decimal error can invalidate a model—a pointer-generator-style copy mechanism extracts parameters (e.g., "15%", "$60,000") directly from the source text.
  • Human-in-the-Loop Interface: An intuitive UI allows users to review, edit, and validate suggested formulations before execution.

The LPWP Dataset

A major contribution of this work is the Linear Programming Word Problems (LPWP) dataset. Comprising 1,101 problems across diverse domains (e.g., investment, production, transportation), LPWP provides a high-quality benchmark for training and testing semantic parsing in OR. The dataset was meticulously verified by researchers to ensure mathematical correctness and linguistic diversity.

Experimental Results and Insights

OptGen was evaluated against standard BART baselines and state-of-the-art Text-to-Table (T2T) models. While T2T models often overfit to specific training domains, OptGen demonstrated superior generalization to out-of-domain tasks.

  • Target (Out-of-Domain) Accuracy: OptGen achieved 63% accuracy on new application domains, significantly outperforming the T2T model's 39%.
  • The Importance of IR: By maintaining a linguistic link between variables (e.g., "savings") and their mathematical representations ($y$), the IR prevents the loss of logic that occurs in direct math-table mapping.
  • Criticality of Copying: Ablation studies revealed that removing the copy mechanism caused a 30% drop in accuracy on new domains, highlighting its necessity for mathematical reliability.

Conclusion and Future Directions

OptGen represents a significant step toward democratizing Operations Research. By automating the formulation process, it allows non-experts to leverage powerful optimization tools. Future work will focus on expanding the system's scope beyond Linear Programming to include Mixed-Integer and non-linear constraints, as well as developing automated error-correction models to further refine the human-in-the-loop experience.

Summary updated

Abstract

We describe an augmented intelligence system for simplifying and enhancing the modeling experience for operations research. Using this system, the user receives a suggested formulation of an optimization problem based on its description. To facilitate this process, we build an intuitive user interface system that enables the users to validate and edit the suggestions. We investigate controlled generation techniques to obtain an automatic suggestion of formulation. Then, we evaluate their effectiveness with a newly created dataset of linear programming problems drawn from various application domains.
BibTeX
@inproceedings{ramamonjison2022augmenting,
  author = {Rindra Ramamonjison and Haley Li and Timothy T. L. Yu and Shiqi He and Vishnu Rengan and Amin Banitalebi-Dehkordi and Zirui Zhou and Yong Zhang},
  title = {{Augmenting Operations Research with Auto-Formulation of Optimization Models From Problem Descriptions}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-industry.4},
}
Figure