cs.AINov 9, 2026

COMPASS: Composable Policy-Amortized Structured Search for LLM-Based Optimization Modeling

Authors: Nguyen Le Minh Hoang, Van Duc Cuong, Bui Trong Duc, Huynh Thi Thanh Binh

Organizations: Hanoi University of Science and Technology, Hanoi, Vietnam · VinMotion, Hanoi, Vietnam

Abstract

Large language models offer a promising technique for translating natural-language optimization problems into solver code, but their reliability remains constrained by the quality of template retrieval. While recent structured methods improve over flat prompting through hierarchical taxonomy search, their traversal rules remain fixed or LLM-driven at inference time, leaving retrieval unable to improve from past successes and failures. This motivates treating template retrieval as a policy that can be learned from modeling experience, rather than as a static inference-time rule. We propose COMPASS, a policy-amortized framework for retrieving optimization templates in LLM-based solver modeling, which represents the template library as a directed acyclic graph and formulates retrieval as a sequential decision process over template nodes. A deep Q-network learns a reusable traversal policy from template-level judgments and execution feedback, reducing reliance on fixed heuristic traversal through feedback-driven graph navigation. To support extensible retrieval, COMPASS embeds problem descriptions and template nodes in a shared semantic space, allowing newly inserted templates to be scored from their text descriptions without redefining the action space. Experiments across multiple LLM backbones and optimization-modeling benchmarks demonstrate that COMPASS consistently improves over heuristic structured retrieval, with the largest gains on complex and mixed-category problems.

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Harnessing Language Models as Optimization Modeling Agents

    Oct 22, 2026Yunxiang Luo, Xin Xu, Tianhao Chen +7Large Language Model-Guided OptimizationNatural Language to Optimization Modeling

  2. Beyond Inference-Time Search: Reinforcement Learning Synthesizes Reusable Solvers

    May 18, 2026Soheyl Massoudi, Gabriel Apaza, Milad Habibi +1RL for Code GenerationLLM-Based Program Synthesis

  3. PEARL: Solver-in-the-Loop Interactive Optimization Modeling from Natural Language

    May 14, 2026Hongliang Lu, Zhong Li, Yuxuan Chen +3Natural Language to Optimization ModelingLarge Language Model-Guided Optimization