Table of Contents
Fetching ...

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.

SEAFormer: A Spatial Proximity and Edge-Aware Transformer for Real-World Vehicle Routing Problems

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 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 to 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.
Paper Structure (56 sections, 49 equations, 7 figures, 16 tables)

This paper contains 56 sections, 49 equations, 7 figures, 16 tables.

Figures (7)

  • Figure 1: A VRP solution. Nodes within the same route can exhibit: (1) similar angles but different distances, (2) similar distances but different angles, or (3) a close proximity in both.
  • Figure 2: SEAFormer Architecture. The dual-module encoder embeds nodes through CPA and edges through a lightweight residual module. The dual-path decoder combines edge-aware guidance (heatmap) with sequential node selection (attention), unified through logit fusion. This design enables scalable training on large number of nodes while handling diverse RWVRP constraints.
  • Figure 3: Training curves on 100-customer VRP (NoCPA/NoEAM = Without CPA/EAM).
  • Figure 4: (a) Performance gap of SEAFormer with different CPA configurations. (b) Training memory consumption for a 1,000-node VRP with batch size 32 and pomo size of 100 under different CPA configurations.
  • Figure 5: Logarithmic training memory consumption of CPA encoder on a 1,000-node VRP with batch size 32 and pomo size 100 under different configurations.
  • ...and 2 more figures