SEAFormer: A Spatial Proximity and Edge-Aware Transformer for Real-World Vehicle Routing Problems
Saeed Nasehi Basharzad, Farhana Choudhury, Egemen Tanin
TL;DR
SEAFormer addresses Real-World Vehicle Routing Problems by integrating a spatially aware transformer with edge-level reasoning. The core innovations—Clustered Proximity Attention (CPA) and a lightweight edge-aware module—achieve $O(n)$ attention complexity and enable effective handling of edge-dependent constraints, enabling 1,000+ node RWVRP instances. The model demonstrates strong, scalable performance across RWVRP variants and standard VRP benchmarks, often outperforming state-of-the-art neural and classical solvers, and provides a versatile, deployment-friendly solution for real-world routing. These contributions advance practical routing by jointly reasoning about spatial proximity and edge attributes, improving feasibility, convergence, and solution quality at scale.
Abstract
Real-world Vehicle Routing Problems (RWVRPs) require solving complex, sequence-dependent challenges at scale with constraints such as delivery time window, replenishment or recharging stops, asymmetric travel cost, etc. While recent neural methods achieve strong results on large-scale classical VRP benchmarks, they struggle to address RWVRPs because their strategies overlook sequence dependencies and underutilize edge-level information, which are precisely the characteristics that define the complexity of RWVRPs. We present SEAFormer, a novel transformer that incorporates both node-level and edge-level information in decision-making through two key innovations. First, our Clustered Proximity Attention (CPA) exploits locality-aware clustering to reduce the complexity of attention from $O(n^2)$ to $O(n)$ while preserving global perspective, allowing SEAFormer to efficiently train on large instances. Second, our lightweight edge-aware module captures pairwise features through residual fusion, enabling effective incorporation of edge-based information and faster convergence. Extensive experiments across four RWVRP variants with various scales demonstrate that SEAFormer achieves superior results over state-of-the-art methods. Notably, SEAFormer is the first neural method to solve 1,000+ node RWVRPs effectively, while also achieving superior performance on classic VRPs, making it a versatile solution for both research benchmarks and real-world applications.
