NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$\texttt{STRCMP}$: Integrating Graph Structural Priors with Language Models for Combinatorial Optimization

Xijun Li, Jiexiang Yang, Jinghao Wang, Bo Peng, Jianguo Yao, Haibing Guan

Abstract

Combinatorial Optimization (CO) is fundamental to fields such as logistics, scheduling, and robotics, yet many of its core problems remain NP-hard. While Large Language Models (LLMs) have recently been applied to generate algorithmic solutions for CO, they often struggle with the underlying topological structures of mathematical problems, treating them merely as text sequences. This paper introduces STRCMP (STRucture-aware CoMPosite model), a novel framework that integrates structural priors extracted via Graph Neural Networks (GNNs) into the LLM decision-making process. By combining topological awareness with an evolutionary refinement loop, STRCMP discovers high-performing, solver-specific algorithms that significantly outperform existing neural and LLM-based methods across Mixed Integer Linear Programming (MILP) and Boolean Satisfiability (SAT) tasks.

Introduction

Combinatorial Optimization involves finding the best solution from a finite set of possibilities. Despite its importance, the computational complexity of these problems often necessitates the use of heuristics or specialized solvers. Recent advancements have explored using LLMs to either solve these problems directly or to write code for traditional solvers like SCIP or EasySAT. However, a significant limitation persists: LLMs typically lack "structural awareness." They fail to perceive the complex web of relationships between variables and constraints—the problem's topology—that human experts leverage to design efficient algorithms. This results in generic code and a reliance on expensive, iterative trial-and-error.

STRCMP addresses this "blind spot" by feeding LLMs "structural DNA" extracted from problem instances. By grounding the generative process in the actual geometry of the problem, the framework enables the discovery of more specialized and efficient algorithmic strategies.

Methodology

The STRCMP framework operates through a three-stage pipeline designed to bridge the gap between graph-based structural analysis and text-based code generation.

1. Combinatorial Structure Extraction

To capture the underlying topology, CO instances (such as systems of equations or logical constraints) are represented as bipartite graphs. In these graphs, nodes represent variables and constraints, with edges defining their interactions. A Graph Neural Network (GNN) processes these representations to extract "structural embeddings"—latent vectors that encapsulate critical features like symmetry, sparsity, and constraint density.

2. Structure-Aware Code Generation

These structural embeddings serve as an inductive bias for the LLM. Rather than relying solely on text prompts, STRCMP prepends these GNN-derived embeddings to the LLM's input. The authors utilized Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) to train the core model (specifically Qwen2.5-Coder). This training teaches the LLM how to interpret graph features to generate optimized, solver-specific code snippets.

3. Evolutionary Code Refinement

The composite model is embedded within an evolutionary loop. The system generates candidate algorithm components, evaluates their performance using real-world solvers, and uses the resulting feedback to iteratively evolve the code. Through selection, crossover, and mutation, the framework refines the generated algorithms to maximize efficiency and success rates.

Experimental Evaluation

STRCMP was evaluated across two major domains using nine benchmark datasets, ranging from standard competition problems to complex real-world applications.

  • Boolean Satisfiability (SAT): Evaluated on SAT Competition problems (PRP, CNP) and generated instances (CoinsGrid, Zamkeller).
  • Mixed Integer Linear Programming (MILP): Categorized by difficulty levels, including Set Covering and Maximum Independent Set (Easy), MIK and CORLAT (Medium), and Load Balancing (Hard).

Key Results

STRCMP demonstrated superior performance compared to five major baselines, including specialized neural solvers (L2B, HEM) and state-of-the-art LLM frameworks (AutoSAT, LLM4Solver):

  • Efficiency and Speed: In the SAT domain, specifically on the Zamkeller dataset, STRCMP reduced the number of timeouts by 77.8% (from 18 down to 4). Total solving time was slashed from approximately 20,772 seconds to 6,929 seconds.
  • Competitive Parity: In the MILP domain, STRCMP maintained parity with or exceeded specialized Neural Combinatorial Optimization (NCO) methods. This suggests that a structure-grounded general-purpose LLM can compete with niche, hand-crafted neural architectures.
  • Convergence Stability: Unlike standard LLM-based optimizers that often suffer from performance oscillations, STRCMP exhibited stable and rapid convergence during the evolutionary process.

Theoretical and Practical Insights

The authors provide a theoretical justification for STRCMP using information theory, proving that the addition of structural priors cannot lower the performance upper bound of the generative model. When the prior is performance-enhancing—as demonstrated by the GNN embeddings—it strictly raises the ceiling of the model's potential.

Furthermore, the research highlights that structural embeddings act as a powerful shortcut. By "seeing" the graph, the LLM can bypass the initial trial-and-error phase of identifying problem topology and move directly to implementing specialized algorithmic strategies.

Limitations and Future Work

While STRCMP represents a significant step forward, several areas for improvement remain:

  • Joint Training: Currently, the GNN and LLM are trained in two stages. Future work could explore end-to-end joint training to further align the structural extraction and code generation phases.
  • Data Distribution Conflicts: Ablation studies indicated that SFT+DPO did not always outperform SFT-only versions on every dataset, suggesting potential conflicts in post-training data distributions that require further study.
  • Multimodal Priors: Beyond graph structures, future iterations could incorporate other priors, such as runtime complexity profiles or specific constraint violation patterns, to further refine the algorithm discovery process.

Summary updated

BibTeX
@inproceedings{li2025texttt,
  author = {Xijun Li and Jiexiang Yang and Jinghao Wang and Bo Peng and Jianguo Yao and Haibing Guan},
  title = {{$\textbackslash\{\}texttt\{STRCMP\}$: Integrating Graph Structural Priors with Language Models for Combinatorial Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=VhGUS8kyaC},
}
Figure