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

Rindranirina Ramamonjison, Haley Li, Timothy T. Yu, Shiqi He, Vishnu Rengan, Amin Banitalebi-Dehkordi, Zirui Zhou, Yong ZhangarXiv 2022 · DOI

Introduction

Operations Research (OR) provides powerful mathematical tools for optimizing complex systems, from logistics and supply chain management to financial portfolio balancing. However, a significant bottleneck remains: the "translation" problem. Converting a natural language description of a business problem into a formal mathematical model typically requires a high level of expertise in both the domain and mathematical programming. This manual process is often slow, costly, and limits the accessibility of optimization solvers to non-experts.

In this paper, researchers from Huawei and the University of British Columbia present OptGen, an augmented intelligence system designed to bridge this gap. OptGen automates the transformation of natural language problem descriptions into formal mathematical optimization models, specifically targeting linear programming (LP) problems.

The Challenges of Automated Modeling

Automating the formulation of optimization models using Natural Language Processing (NLP) is fraught with difficulties that distinguish it from standard text-to-text tasks:

  1. Data Scarcity: Large-scale, high-quality datasets mapping word problems to mathematical formulations are rare.
  2. Document-level Complexity: Unlike short queries, optimization problems are often described in long, multi-sentence paragraphs where constraints may be distributed across several sections.
  3. Context-Free Output: Mathematical models are structured and tabular, making it difficult for standard NLP models to maintain the semantic link between textual descriptions and mathematical parameters.
  4. Domain Generalization: A robust model must be able to generalize its logic from one industry (e.g., finance) to another (e.g., wastewater management) without extensive retraining.

Methodology: The OptGen Framework

To address these challenges, the researchers moved away from traditional "direct mapping" approaches—which attempt to translate text directly into a mathematical table—in favor of a two-stage mapping process.

1. Text-to-Intermediate Representation (IR)

The first stage involves converting the natural language description into an XML-like Intermediate Representation (IR). This IR acts as a structured bridge, preserving the semantic context of the problem (such as the relationship between "profit" and the objective function) while imposing the rigid structure required for mathematical modeling.

2. IR-to-Canonical Form

In the second stage, a deterministic parser converts the structured IR into a canonical format compatible with standard optimization solvers. This separation of concerns allows the neural model to focus on semantic understanding while the parser ensures mathematical syntax.

Technical Innovations

OptGen introduces two key technical components to improve accuracy:

  • Prompt-Guided Generation: Utilizing an entity tagger based on XLM-RoBERTa, the system identifies keywords (e.g., "maximize," "at least," "budget"). These tags serve as prompts for the decoder, guiding the generation process toward specific parts of the formulation.
  • Copy Mechanism: To prevent "hallucinations"—where a model might generate incorrect numerical values—OptGen employs a copy mechanism. This allows the model to directly extract and "point" to specific parameters and variable names in the source text, ensuring that a value like "500 units" is accurately reflected in the final model.

The LPWP Dataset

The researchers introduced the Linear Programming Word Problems (LPWP) dataset to facilitate this research. Comprising 1,101 problems, the dataset was curated and verified by 20 researchers to ensure mathematical correctness. To test domain generalization, the dataset was split into training domains (Advertising, Investment, Sales) and target testing domains (Production, Science, Transportation).

Results and Performance

OptGen demonstrated significant improvements over baseline "Text-to-Table" models, particularly in its ability to generalize to unseen industries.

  • Generalization: On target domains, OptGen achieved 63% accuracy, representing an 18% improvement over the baseline.
  • Stability: While the baseline model's performance dropped from 83% in known domains to 39% in unknown ones, OptGen remained stable, maintaining performance between 60% and 63%.
  • Ablation Studies: Removing the copy mechanism resulted in a 30% drop in accuracy on target domains, confirming that the ability to precisely extract parameters is essential for mathematical modeling tasks.

Conclusion and Future Directions

OptGen represents a significant step toward making Operations Research more accessible. By framing the system as "augmented intelligence," the authors envision a workflow where the model suggests a formulation that a human expert can then validate or refine through an intuitive interface.

While the current system is limited to Linear Programming, future work aims to expand the framework to handle Mixed-Integer Programming (MIP) and non-linear constraints. Additionally, the team plans to explore "edit-based" models that can iteratively correct formulations based on user feedback, further closing the gap between human intent and mathematical precision.

Summary updated

BibTeX
@misc{ramamonjison2022augmenting,
  author = {Rindranirina Ramamonjison and Haley Li and Timothy T. 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}},
  year = {2022},
  eprint = {2209.15565},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.15565},
}
Figure