Hybrid-Balance GFlowNet for Solving Vehicle Routing Problems

Ni Zhang, Zhiguang Cao · DOI

Introduction

Vehicle Routing Problems (VRPs) represent a fundamental challenge in combinatorial optimization, serving as the backbone for global logistics and supply chain management. The objective—finding the most efficient routes for a fleet of vehicles to serve a set of customers—is NP-hard, making it computationally expensive to solve as the number of nodes increases. While traditional heuristics and recent deep learning approaches have made strides, they often struggle with the balance between global optimization and local decision-making.

Generative Flow Networks (GFlowNets) have emerged as a promising alternative, learning to sample diverse, high-quality solutions. However, existing GFlowNet solvers often fall into "local optima" traps. This paper introduces the Hybrid-Balance GFlowNet (HBG), a framework designed to unify global and local learning signals to achieve superior routing performance.

The Challenge: Global vs. Local Optimization

Current GFlowNet-based solvers, such as AGFN and GFACS, primarily utilize Trajectory Balance (TB) as their training objective. TB focuses on the "global" reward of a completed route. While effective for overall path optimization, TB suffers from poor credit assignment: if a route is generally inefficient but contains a highly optimized local sequence, the global penalty may cause the model to "unlearn" that beneficial local pattern.

Conversely, Detailed Balance (DB) focuses on step-by-step transitions. While DB provides a granular signal for local moves, it often loses sight of the ultimate global objective, such as total distance or fleet capacity constraints. The HBG framework is designed to bridge this gap.

Methodology: The HBG Framework

The Hybrid-Balance GFlowNet (HBG) unifies global and local perspectives through three primary innovations:

1. The Hybrid Loss Objective

HBG integrates TB and DB into a single training objective. By combining these losses, the model ensures that it understands the global metrics (total distance) while receiving a "local signal" that rewards smart individual moves. This dual reinforcement prevents the model from discarding efficient local sub-sequences even when they appear within a suboptimal overall trajectory.

2. VRP-Specific Detailed Balance

The authors derived a closed-form expression for the "backward probability" specifically for VRPs. In problems like the Capacitated VRP (CVRP), they discovered that the solution path is largely deterministic, with the exception of the vehicle's return to the depot. This mathematical insight allows the DB component to focus its learning where it matters most.

3. Depot-Guided Inference

Building on the role of the depot as a "reset" point, the framework employs a specialized inference strategy. During route construction, the model uses probabilistic sampling at the depot to encourage the exploration of different route structures. Once a sub-trip begins, the model switches to a greedy, deterministic policy for customer nodes to ensure maximum local efficiency.

Experimental Setup and Datasets

The HBG framework was evaluated on both synthetic benchmarks and massive real-world datasets to test its scalability and generalization:

  • Synthetic CVRP & TSP: Instances ranging from 200 to 1,000 nodes. Notably, models were trained on 100-node instances to evaluate their ability to generalize to larger problems.
  • CVRPLIB-XXL: A public benchmark featuring large-scale instances with up to 16,000 nodes, representing the upper limits of modern routing challenges.

Key Results and Performance

The integration of HBG into state-of-the-art solvers like AGFN and GFACS resulted in dramatic performance improvements across the board:

  • Gap Reduction: On 1,000-node CVRP tasks, HBG-AGFN reduced the optimality gap from 11.15% to 9.34%. The improvement for GFACS was even more significant, with the gap dropping from 23.82% to 10.61%.
  • Large-Scale Success: On the CVRPLIB-XXL dataset, HBG-AGFN achieved a staggering 91.51% reduction in gap compared to the standard AGFN solver.
  • Zero-Shot Generalization: Models trained on small-scale problems (100 nodes) consistently outperformed baseline models on much larger instances, suggesting that HBG helps the model learn fundamental routing logic rather than simple pattern memorization.
  • Computational Efficiency: The inference overhead introduced by HBG is negligible, typically adding less than 0.05 seconds to processing time, making it a highly efficient upgrade for existing architectures.

Discussion and Future Work

The success of HBG highlights the importance of credit assignment in neural solvers. By rewarding smart local moves through DB, the model develops a more robust understanding of spatial relationships. However, the authors note that HBG is an enhancement framework; its ultimate performance is still tied to the quality of the underlying neural architecture (e.g., the Graph Neural Network used).

Future research directions include extending the hybrid balance principle to more complex VRP variants, such as those involving time windows, heterogeneous fleets, or dynamic real-time requests. Additionally, exploring the integration of this framework with other generative policies beyond GFlowNets could further push the boundaries of AI-driven logistics.

Summary updated

BibTeX
@inproceedings{zhang2025hybrid,
  author = {Ni Zhang and Zhiguang Cao},
  title = {{Hybrid-Balance GFlowNet for Solving Vehicle Routing Problems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=GxGrGswvND},
}
Figure