Manuscript Offprint

arXiv:2610.27936

From Comparison to Selection: Enhancing Cross-Scale Generalization of Pointer Networks Trained with Reinforcement Learning for Capacitated Drone Delivery Routing

Sofiene Lassoued, Devara Tertia, Stefan Lier, Andreas Schwung

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Unmanned aerial vehicles (UAVs) enable fast, flexible last-mile and emergency delivery, but their routing remains challenging as the number of clients varies. Classical approaches based on mixed-integer programming and heuristics can scale poorly or require problem-specific design, motivating learning-based alternatives. Reinforcement learning is particularly promising, provided a single policy can generalise across problem sizes without retraining. Although attention-based Pointer Networks are inherently size-agnostic, their solution quality degrades under both upscaling and downscaling. Using the Capacitated Vehicle Routing Problem (CVRP) as a controlled proxy, with fixed capacity reflecting drone payload constraints, we investigate this degradation and identify three contributing factors: shifts in node density, attention dispersion, and dilution of the mean-pooled graph context. We systematically compare architecture-wide, encoder-side, and decoder-side modifications to address these limitations and propose a learned, permutation-invariant graph-context aggregation mechanism, implemented as a weighted average and as Set2Set. Results reveal distinct requirements for transfer in each direction: entropy-based attention scaling reduces the CVRP20-to-CVRP100 performance gap by 1.41 percentage points, while the proposed aggregation methods achieve the largest improvement on the more challenging CVRP100-to-CVRP20 transfer, approximately 0.9 percentage points. Exploiting this complementarity, we introduce an approach selector that chooses the best model for each training–target size pair. The selector reduces cost relative to the reference model across all nine seen train–test pairs and eight of nine pairs involving unseen sizes (CVRP35, CVRP75, and CVRP200), achieving improvements of up to 3.2%.

Keywords: Drone delivery, Reinforcement learning, Pointer network, Graph-context aggregation, Capacitated vehicle routing, Size generalization, Approach selection

1. Introduction

The growth of e-commerce, on-demand services, and urban logistics pushes delivery operators to plan routes under tight constraints on capacity, distance, energy, and cost. Unmanned aerial vehicles complement ground vehicles because they bypass road congestion and fly directly between locations, which is valuable for medical, emergency, rural, and last-mile delivery, but they bring limited payload and battery range and sensitivity to weather, airspace regulation, and multi-drone coordination [1, 2]. This work investigates AI-based route planning for drone networks under such constraints. From an optimization standpoint, the task is closely related to the Capacitated Vehicle Routing Problem (CVRP): a fleet must serve customers with known demands within a capacity limit at minimal total route length [3, 4]. CVRP omits battery dynamics, charging infrastructure, and air corridors, but it isolates the capacity-constrained routing core and is a standard controlled benchmark for routing algorithms, including learning-based ones [5, 6].

Exact methods scale poorly on this NP-hard problem [7, 8], and heuristics need problem-specific, hand-tuned design [9, 10]. Neural Combinatorial Optimization (NCO) instead trains a model to construct solutions directly, using reinforcement learning (RL) so that no optimal-solution labels, which are expensive for large CVRP instances, are needed [11, 6, 12].

The central difficulty for a drone-routing policy is that the number of clients is not fixed: it varies from day to day and region to region. Training one policy per client count is not viable, so the policy must construct solutions for a variable, a priori unknown number of nodes, which is a known weakness of neural routing solvers [13]. A prominent size-agnostic approach is the Pointer Network with attention, which points to one of the input nodes at each decoding step instead of choosing from a fixed vocabulary, so the same trained policy can be applied to graphs of any size [14, 6]. Trained with RL, it has been benchmarked at scale in recent studies of neural routing solvers [15, 16], which show that it solves instances of the training size well but that generalization across problem sizes remains a clear bottleneck in both directions: performance degrades when the model is upscaled to larger graphs and when it is downscaled to smaller ones.

This paper therefore investigates which modifications of the attention-based Pointer Network, applied architecture-wide, in the encoder or in the decoder, reduce the upscaling and the

*Corresponding author: Sofiene Lassoued, email: lassoued.sofiene@fh-swf.de downscaling generalization gap for CVRP, and how their complementary strengths can be combined in one size-agnostic routing solver.

The study focuses on the encoder–decoder architecture of the attention-based Pointer Network: the encoder embeds the nodes of an instance, and the decoder uses these embeddings to point to the next node at each step. This architecture is kept as the common frame, and every approach modifies it at one of three levels: architecture-wide, acting on the attention of both encoder and decoder; encoder-side, replacing how node embeddings are computed; or decoder-side, changing how the decoder summarises the instance and builds its query. To this end, we first identify the sources of the cross-size degradation of the reference policy, then assign to each source the levers that act on it, and finally compare all levers head-to-head under an identical training and evaluation protocol, scored by how much they reduce the cross-size optimality gap of the reference in each direction.

Contributions. The reference policy, the attention-scaling factors and the two alternative encoders are taken from the literature [6, 17, 18, 19] and are re-implemented in one common framework. The contributions of this paper are:

(i) A learned, permutation-invariant graph-context aggregation for the attention-model decoder, realised as a weighted average with a scoring network and as a Set2Set summary. It replaces the mean-pooled context and gives the largest gain of all evaluated approaches on the hardest downscaling transfer while keeping same-size quality.

(ii) A diagnosis-driven, head-to-head comparison of seven levers at the architecture-wide, encoder and decoder levels of the Pointer Network, with fixed vehicle capacity so that only the number of clients changes. It shows that upscaling and downscaling respond to different levers.

(iii) An approach selector that exploits this complementarity by choosing, for a given training size and target size, the approach with the lowest estimated cost. It lowers the cost of the reference on seen and unseen problem sizes.

This paper is structured as follows: Section 2 reviews related work, and Section 3 introduces the necessary background on graph neural networks, attention and pointer decoding. Section 4 formulates the CVRP as a sequential decision problem, gives the training objective and describes the reference policy. Section 5 derives the sources of cross-size degradation and presents the evaluated approaches together with the proposed graph-context aggregation and approach selector. Section 6 details the experimental setup, Section 7 reports and discusses the results, and Section 8 concludes the paper and outlines future work.

References (43)