Skip to main content
QUICK REVIEW

[Paper Review] A Novel Approach for Auto-Formulation of Optimization Problems

Yuting Ning, Jiayu Liu|arXiv (Cornell University)|Feb 9, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper presents a novel approach for auto-formulating optimization problems from natural language, treating subtask 1 as named entity recognition (NER) and subtask 2 as formulation generation using prompt-guided generation. The method employs adversarial training, ensemble learning, and post-processing, achieving an F1-score of 0.931 in NER and accuracy of 0.867 in formulation generation, securing 4th and 3rd place in the NL4Opt 2022 competition.

ABSTRACT

In the Natural Language for Optimization (NL4Opt) NeurIPS 2022 competition, competitors focus on improving the accessibility and usability of optimization solvers, with the aim of subtask 1: recognizing the semantic entities that correspond to the components of the optimization problem; subtask 2: generating formulations for the optimization problem. In this paper, we present the solution of our team. First, we treat subtask 1 as a named entity recognition (NER) problem with the solution pipeline including pre-processing methods, adversarial training, post-processing methods and ensemble learning. Besides, we treat subtask 2 as a generation problem with the solution pipeline including specially designed prompts, adversarial training, post-processing methods and ensemble learning. Our proposed methods have achieved the F1-score of 0.931 in subtask 1 and the accuracy of 0.867 in subtask 2, which won the fourth and third places respectively in this competition. Our code is available at https://github.com/bigdata-ustc/nl4opt.

Motivation & Objective

  • To improve accessibility and usability of optimization solvers by automatically formulating linear programming problems from natural language descriptions.
  • To address the challenge of recognizing semantic entities (e.g., variables, parameters, constraints) in optimization problem descriptions.
  • To generate canonical mathematical formulations of optimization problems from natural language input and recognized entities.
  • To enhance model robustness and generalization through adversarial training and ensemble learning in both NER and generation tasks.
  • To develop a prompt-guided generation framework that leverages entity positions and types for improved formulation accuracy.

Proposed method

  • Treats subtask 1 as a named entity recognition (NER) problem using XLM-RoBERTa-based models with pre-processing, adversarial training (FGM and PGD), and post-processing rules.
  • Applies ensemble learning across multiple NER models using a category-based strategy to improve final predictions.
  • Treats subtask 2 as a sequence generation problem using specially designed prompts: entity-enhanced and position-aware prompts to guide formulation generation.
  • Employs adversarial training (FGM) during generation model fine-tuning to improve robustness and generalization.
  • Uses post-processing rules to correct incorrect operators (e.g., swapping < and >) and fix unseen numbers by matching to the closest value in the original problem.
  • Combines multiple generation models—using entity-enhanced prompts for objectives and position-aware prompts for constraints—followed by ensemble-based final output.

Experimental results

Research questions

  • RQ1How can named entity recognition be effectively applied to extract optimization components (e.g., variables, parameters, limits) from natural language problem descriptions?
  • RQ2What prompt design strategies improve the accuracy of generating canonical mathematical formulations from natural language and recognized entities?
  • RQ3How do adversarial training and ensemble learning enhance the robustness and performance of NER and formulation generation models?
  • RQ4To what extent do post-processing rules improve the correctness of generated formulations, especially for operator and numerical errors?
  • RQ5Can combining different model architectures and prompt types yield better performance than using a single model or prompt?

Key findings

  • The NER model achieved an F1-score of 0.931 on the test set, with the final ensemble model reaching 0.9453 on the validation set and 0.931 on the final leaderboard.
  • Adversarial training (PGD) and model ensemble were the primary contributors to performance gains in subtask 1, while pre-processing and post-processing provided minor improvements.
  • The prompt-guided generation framework significantly improved performance, with the best model achieving 0.856 accuracy on the dev set when using repeated constraint directions.
  • The entity-enhanced prompt performed best on objectives (93.94% accuracy) but struggled on constraints, suggesting limitations in modeling multi-constraint relationships.
  • Post-processing improved the final test accuracy from 0.856 to 0.867 by correcting operator mismatches and numerical errors.
  • The final formulation generation model achieved 0.867 accuracy on the test set, securing third place in the NL4Opt 2022 competition.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.