Interpreting Neural Combinatorial Optimization via Evolving Programmatic Bottlenecks

Haocheng Duan, Yuxin Guo, Jieyi Bi, Anqi Xie, Sirui Li, Yining Ma, Cathy Wu

TL;DR

This paper introduces Evolving Programmatic Bottlenecks (EPB), a novel framework that opens the black box of Neural Combinatorial Optimization (NCO) by distilling complex models into portfolios of human-readable Python programs. By combining a neural routing network with a Large Language Model (LLM) evolutionary loop, EPB explains NCO decisions step-by-step with negligible loss in solution quality. Remarkably, this programmatic bottleneck acts as a regularizer, allowing the distilled model to significantly outperform its black-box teacher on larger, unseen problem sizes.

What Problem Does This Paper Address?

Neural Combinatorial Optimization (NCO) uses deep learning to solve complex routing and scheduling problems, like the Traveling Salesman Problem (TSP) or the Vehicle Routing Problem (VRP). While these models achieve near-optimal performance matching classical heuristics, they operate as complete black boxes. We don't know why an NCO model picks a specific node next, or how its strategy changes as a route progresses.

Standard interpretability frameworks, such as Concept Bottleneck Models (CBMs), fail here. CBMs map inputs to static, atomic concepts (e.g., identifying "wings" or "beaks" in bird classification). NCO decisions, however, are highly dynamic, sequential, and state-dependent. There is no predefined vocabulary of "concepts" for optimization; the strategy space is combinatorial and algorithmic. This paper bridges the gap by redefining "concepts" as executable, human-readable code snippets.

Methods

The authors propose Evolving Programmatic Bottlenecks (EPB), which distills a black-box NCO "teacher" model into an interpretable "student" model. The student policy consists of two core components:

  1. The Heuristic Bank ($\mathcal{B}$): A collection of $M$ entries, where each entry contains an executable Python program (the code strategy) and a short natural-language description of its logic.
  2. Output-Conditioned Dynamic Routing (OCDR): A lightweight neural network that acts as a router. At each step of the optimization process, the router looks at the current state and dynamically assigns weights to the programs in the bank, mixing their action distributions to make the final decision.
Figure 1: Overview of our Evolving Programmatic Bottlenecks framework.

To train this system, the authors implement a nested, Two-Block Optimization loop:

  • Block I (Fixed-Capacity Hybrid Gradient Descent): While keeping the bank size fixed, the framework jointly optimizes the continuous neural router weights using standard Stochastic Gradient Descent (SGD) and refines the symbolic code/text descriptions using TextGrad. TextGrad treats LLM outputs as differentiable objects, turning loss-driven feedback into natural-language critiques to rewrite the code.
  • Block II (Dynamic Capacity Management): When training plateaus, EPB autonomously adjusts the bank size. It uses a Fault-Targeted Add mechanism to prompt the LLM to spawn new "specialist" heuristics for persistent failure modes, and a Redundancy-Targeted Drop mechanism to prune heuristics that overlap too much with others.

Datasets

The framework was evaluated on two classic combinatorial optimization problems:

  • Traveling Salesman Problem (TSP): Trained and tested on instances with 50 and 100 nodes (TSP-50, TSP-100).
  • Capacitated Vehicle Routing Problem (CVRP): Trained and tested on instances with 50 and 100 nodes (CVRP-50, CVRP-100).
  • Out-of-Distribution (OOD) Generalization: The models were evaluated zero-shot on much larger scales, specifically TSP-500 and CVRP-500, to test how well the distilled programs transfer to larger problem sizes.

Key Insights and Ideas

  • Algorithmic Archetypes Revealed: EPB successfully uncovers distinct operational strategies between different NCO architectures. For instance, it revealed that the POMO model relies heavily on phase-adaptive logic (shifting strategies based on tour progress), whereas the LEHD model relies more on local geometric corrections (distance structures and angles).
  • Stage-Wise Strategy Shifts: In CVRP, the distilled bank clearly maps out a logical progression: the model starts with sector-structured exploration, shifts mid-route to capacity-aware packing, and finishes with greedy depot-return closures.
  • Interpretability as an Inductive Bias: Forcing the student model to route through explicit, symbolic programs filters out the overfitted neural noise present in the teacher model. This constraint acts as a powerful regularizer for out-of-distribution tasks.

Key Results

The distilled programmatic student models closely replicate the performance of their black-box teachers, incurring only a minor performance gap under greedy decoding (1% to 4%) which shrinks to nearly zero (0.03% to 2.16%) when search techniques are enabled.

Table 1: Teacher vs. Student on TSP and CVRP (mean tour cost; lower is better).

The most striking result comes from the Out-of-Distribution (OOD) evaluation on 500-node instances. On POMO-TSP-500, the distilled student substantially outperformed its own teacher, achieving a -15.01% gap in tour cost under greedy decoding. A similar trend was observed for CVRP-500, where the student led by -13.57%. This demonstrates that the distilled programmatic bottleneck captures robust, transferable optimization principles that the original black-box model failed to generalize.

Limitations and Future Work

While EPB makes the decision-making process highly interpretable via programmatic bottlenecks, the router model itself remains a black-box neural network. A fully transparent model would require replacing this neural router with a simpler, symbolic routing rule, though the authors note this would likely come at a cost to performance. Additionally, while EPB provides an excellent approximation, it cannot guarantee a perfect, mathematically exact proxy of the teacher policy. The authors suggest extending EPB to more complex, highly constrained optimization settings in future work.

Summary updated

BibTeX
@inproceedings{duan2026interpreting,
  author = {Haocheng Duan and Yuxin Guo and Jieyi Bi and Anqi Xie and Sirui Li and Yining Ma and Cathy Wu},
  title = {{Interpreting Neural Combinatorial Optimization via Evolving Programmatic Bottlenecks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=8fI7m5Dxno},
}
Figure