Manuscript Offprint
arXiv:2609.04593GNN-Guided Graph Coarsening and Adaptive QUBO Penalties for the Capacitated Vehicle Routing Problem with Time Windows on a Quantum Annealer
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Graph coarsening reduces the large Quadratic Unconstrained Binary Optimization (QUBO) formulations that arise when vehicle-routing problems are solved by quantum annealing. Nearly customers with compatible time windows are merged into super-nodes; the reduced problem is solved and its solution is then expanded to the original graph. For the Capacitated Vehicle Routing Problem with Time Windows (CVRPTW), however, existing coarsening heuristics require separate tuning for each instance family and remain unreliable on random instances. We address these limitations on the Solomon benchmark using simulated annealing and a D-Wave Advantage2 processor. First, we introduce adaptive penalty calibration. Uniformly scaling the QUBO penalties has little effect, whereas controlling the internal coefficient range, which is dominated by capacity log-slack terms that do not bind on most small instances, substantially improves the raw samples. Removing non-binding constraints, normalising those that bind, and scaling the remaining penalties reduces the mean number of raw constraint violations from 33.0 to 0.06 at the same solver budget (paired Wilcoxon test across independent instances, , ). A variable-count-preserving control attributes the improvement to conditioning rather than problem size. Second, we replace the hand-tuned merge score with a graph neural network (GNN) that uses one configuration across all families. At , this policy attains 100% feasibility on every Solomon family, including the R-type family (100% versus 80% for the tuned heuristic). Across , its coarsened solutions are feasible more often than those of the family-tuned heuristic (83% versus 69%; better or tied on 85/90 instance-size pairs). The difference grows with and is significant at (; better or tied on 25/25 pairs), while the QUBO remains approximately smaller. Finally, the hardware experiment reproduces the conditioning effect at a fixed logical variable count: the poorly conditioned formulation yields 0.02% feasible samples on average across 13 instances, compared with 39% for its conditioned counterpart. These contributions concern QUBO conditioning, feasibility, and tractability. For end-to-end solution cost, a classical repair with local search remains a reference bound that the pipeline matches but does not surpass.
1 Introduction
The Vehicle Routing Problem (VRP) and its time-windowed variant (CVRPTW) are widely studied combinatorial-optimization problems with direct applications in transportation and logistics. Quantum annealers and their classical simulators minimise QUBO energy functions, motivating several QUBO formulations of routing problems [6, 18, 19]. Their principal limitation is size: a direct VRP encoding grows rapidly and only small instances fit on current hardware. Graph coarsening reduces this burden by repeatedly merging compatible customers into super-nodes, solving the reduced problem, and expanding the solution to the original graph [18, 19].
The method of Özyilmaz [19] extends coarsening to time windows through a spatio-temporal merge metric. Its performance depends on the instance family: clustered (C) instances remain feasible, whereas random (R) instances deteriorate unless the coarsening hyperparameters are returned for each family. Our work targets this dependence on family-specific tuning.
We make four contributions, evaluated on the Solomon benchmark with a simulated-annealing backend and on a D-Wave Advantage2 processor:
-
Adaptive penalty calibration (Section 5.2). We show that uniformly scaling all QUBO penalties leaves the sampler nearly unchanged, and identify the QUBO's internal dynamic range as the effective lever. Dropping non-binding capacity constraints, normalising those that bind, and scaling the rest cuts raw constraint violations from 33.0 to 0.06 at equal budget, and an ablation attributes the gain to the capacity handling rather than the scaling.
-
GNN-guided, tuning-free coarsening (Section 5.3). A GraphSAGE-based merge scorer replaces the hand-tuned heuristic and uses a single fixed configuration across all families, recovering 100% R-type feasibility at without per-family tuning.
-
Feasibility-preserving coarsening at scale (Sections 5.4–5.5). The learned coarsener keeps more coarsened solutions feasible than the per-family-tuned heuristic across , with the advantage growing as the heuristic's fixed tuning fails to transfer and significant at the largest sizes ( at ), while shrinking the QUBO so it stays solvable at .
-
Validation on quantum hardware (Section 6). An offline embedding study fixes the accessible regime at , and on a D-Wave Advantage2 processor the variable-count-preserving control separates 0.02% from 39% pre-repair feasibility, showing the conditioning mechanism survives finite coupler precision.
These contributions are subject to three qualifications. A strong classical repair step determines most of the post-repair feasibility; the pipeline does not improve upon the OR-Tools reference, which is itself a strong metaheuristic rather than a certified optimum; and the hardware experiments characterise the formulation, not the comparative performance of the processor. The contribution lies in QUBO formulation and preprocessing, and is therefore applicable to other annealing backends.
QUBO and quantum annealing. A QUBO minimises over . Quantum annealers natively minimise such energies [15, 16]. Constrained problems are encoded by the penalty method: constraints become squared-violation terms weighted so that any violation costs more energy than it can save [12, 17]. We use a simulator, D-Wave's SimulatedAnnealingSampler [10], which is the backend used by the previous paper [19], giving unlimited, seed-reproducible runs that isolate the algorithmic contribution from hardware noise.
OR-Tools [21] serves as a strong classical reference.
Routing on annealers. Encoding vehicle routing as a QUBO is an active line of work. Irie et al. [14] formulate a capacitated problem with time and state variables and evaluate it on a D-Wave 2000Q, and Borowski et al. [6] define the Full QUBO Solver (FQS) and Average Partitioning Solver (APS) route encodings we use (Section 3.2). A recurring conclusion is that the position encoding grows quickly and that sparse qubit connectivity makes minor embedding expensive, which is the difficulty coarsening addresses.
Coarsening. Nałecz-Charkiewicz et al. [18] introduced coarsening for CVRP-QUBO, and Özylmaz [19] extended it to time windows with the spatio-temporal merge metric we reproduce. That line of work is the direct predecessor of this paper: it supplies the coarsening procedure, the FQS/APS encoding, and the per-family hyperparameter dependence we set out to remove.
Penalty weights. Converting constrained problems to QUBO requires penalty weights large enough that violating a constraint is never profitable. Exact constructions give sufficient upper bounds, and smaller valid weights are generally preferable because an annealer's finite coefficient precision is consumed by whatever range the weights span [3, 12, 17]. Our conditioning result is a statement about that range rather than about the weights individually: we show that the ratio between the largest and smallest coefficients, and specifically the block contributed by capacity slack, is what determines raw solution quality.
Learning for combinatorial optimisation. Learned heuristics for combinatorial problems are surveyed by Bengio et al. [4] and, for graph neural networks specifically, by Cappart et al. [8]. Reported gains are not uniform; Angelini and Ricci-Tersenghi [1] find a GNN underperforming a greedy algorithm on maximum independent set. Our merge scorer is a GraphSAGE network [13] implemented in PyTorch Geometric [11], and the reward-driven training is an expert-iteration loop in the style of Anthony et al. [2], Silver et al. [22].
Hardware and embedding. A logical QUBO must be minor-embedded in the processor's fixed connectivity graph, for which we use the heuristic of Cai et al. [7]. Successive D-Wave topologies have increased qubit degree, from Chimera to Pegasus to the degree-20 Zephyr graph of Advantage2 [5], and Pelofske [20] compares the three generations on embedded optimisation problems. Higher degree yields shorter chains for the same logical problem, which is the property our embeddability study in Section 6.1 measures directly.
3 Method
Figure 1 summarises the pipeline. Our method modifies two components: a GNN replaces the heuristic coarsening scorer, and adaptive calibration replaces the static penalty scheme. OR-Tools provides the classical cost reference.
3.1 Spatio-temporal coarsening
Each node has a central time (or if ). The heuristic merge score (lower merges first) is

Figure 1: End-to-end pipeline. Red boxes are our contributions; green is the classical reference used to measure the gap to OR-Tools.
where weights spatial proximity and weights temporal separation. Coarsening proceeds in levels (Algorithm 1). After all edges are scored, a threshold selects the candidate fraction: edges are ranked by and is taken at position , so controls how permissive a level is, with larger values admitting more candidate pairs. A candidate pair is merged only when at least one service order is time-feasible. The procedure then tightens the merged time window and assigns the super-node a midpoint location, summed demand, and combined service time. Levels repeat until , where is the original number of nodes, so the coarsening depth fixes the target fraction of nodes that survive: smaller means more aggressive merging and a smaller QUBO. Inflation reverses the recorded merges to recover a solution on the original graph (Fig. 2). In the baseline, the four hyperparameters are tuned separately for each family.
Algorithm 1: One level of spatio-temporal coarsening (scorer = heuristic or GNN)
Input: graph , params -coeff while do score every edge ; sort ascending at index -coeff ; foreach edge , , do if neither nor then skip choose order by larger slack; window (skip if ); record; end if no merges recorded then break build super-nodes (Eq. (2)); reconnect; remove merged nodes end
Merging and (in the time-feasible order ) creates a super-node whose attributes are
where is the time window implied by the selected order. Including the internal leg in the service time prevents the coarse graph from counting that travel again and preserves distance consistency after inflation. Demands are summed because both customers must be served by the same vehicle. Inflation restores and in the recorded order.

Figure 2: GNN coarsening of a held-out R101 instance (N=15). Squares are super-nodes at their midpoints; thin lines link each super-node to the original customers it absorbs (one aggregates four via multi-level merges).
3.2 QUBO formulation
We use the position encoding of Borowski et al. [6], in which the binary variable if and only if vehicle visits customer at route step . A route is an ordered sequence of occupied steps, and one assignment of these variables describes the whole fleet's schedule. For an instance with customers the fleet size is and each vehicle is allotted route steps, giving position variables.
The two solvers of Borowski et al. [6] differ only in . The Full QUBO Solver (FQS) gives every vehicle steps, one more than an even share of the customers, and solves the resulting QUBO in a single pass. The Average Partitioning Solver (APS) gives steps for a radius parameter , trading problem size against the freedom to depart from an even split. At the default the two prescriptions coincide, which is the configuration used throughout this paper; we therefore write FQS/APS for the common encoding and set .
Constraints enter as weighted penalty terms, each of which vanishes when the constraint is satisfied:
- visit-uniqueness: each customer occupies exactly one (vehicle, step) slot, and no vehicle occupies two customers at the same step;
• capacity: the demand carried by a vehicle may not exceed Q, encoded as Eq. (3) below;
• self-loop: a vehicle may not remain at the same customer over two consecutive steps;
• time-window: service at customer j must begin within ;
- continuity: a vehicle may not use step k without also using step k-1, so a route is contiguous and cannot contain gaps;
• distance: the routing objective, a Clarke–Wright savings score [9]. This is the quantity being minimised rather than a constraint, and it carries the smallest weight.
The weights decrease strictly in the order visit-uniqueness > capacity, self-loop > time-window > continuity > distance, so that violating a constraint can never be offset by a gain in a weaker one. Capacity and self-loop are distinct constraints that share a weight tier. The time-window penalty has three parts: a depot-reachability check, a pairwise term between consecutive steps, and a triangle look-ahead spanning steps k to . Together these exclude orderings that cannot be served in time, without enumerating complete routes.
Following the coarsening-QUBO implementation we build on, capacity is expressed as an equality using binary log-slack. For vehicle ,
where the are auxiliary binary slack bits and indexes their powers of two, so the slack term can represent any unused capacity between 0 and . Forming the penalty squares this expression, and with it the slack coefficients, producing couplings as large as where is the capacity penalty weight. These couplings are central to Section 5.2.
3.3 Adaptive penalty calibration
The previous paper [19] uses fixed penalties regardless of the instance scale. Choosing penalty weights is itself a studied problem: weights must be large enough that no constraint violation is profitable, yet no larger, because the finite coefficient precision of an annealer is spent on whatever range the weights span [3]. We therefore set penalties relative to the instance's objective magnitude
an upper bound on the total routing objective, where is the Euclidean arc cost between nodes and , is the number of customers, and is the weight given to the distance objective. Each constraint weight is a fixed multiple of : unique = , capacity = with , and time-window = , preserving the hierarchy of Section 3.2. We additionally drop any capacity constraint that cannot bind (total demand ) and, when it does bind, size the slack to and raise in proportion to the demand pressure, the ratio of total demand to .
A binding constraint is precisely the case that survives the drop, and it carries its log-slack with it. Its largest coupling scales as with , so an unnormalised weight places the capacity block orders of magnitude above every other term: the calibration would inflate exactly the dynamic range it exists to control. We therefore normalise the binding capacity weight by that squared slack coefficient,
which returns the capacity block to the scale of the remaining penalties while preserving the hierarchy. The normalisation is inert when the constraint is dropped, so it acts only on binding instances; the fraction of instances it touches grows with (2 of 13 at , 9 of 13 at on our test set). The scaling alone changes little; the capacity handling is the lever (Section 5.2).
3.4 GNN merge scorer
The learned scorer (Fig. 3) consists of a node encoder, two GraphSAGE message-passing layers, and a symmetric edge head that assigns a merge probability to each candidate pair. The 11-dimensional node features comprise coordinates, demand, service time, , window width, degree, a supernode indicator, and distance to the depot. The eight-dimensional edge features comprise , bidirectional temporal slack, window overlap, feasibility indicators, combined demand, and . The learned probability replaces in Algorithm 1; all other steps, including the explicit feasibility check, remain unchanged.
Training labels are obtained from an instance-specific oracle: the highest-reward outcome among five heuristic coarsenings from a fixed sweep over and the current model's rollouts. Every candidate is evaluated through the complete downstream pipeline. We record each coarsening level, allowing the model to learn decisions on intermediate graphs that already contain super-nodes, as it encounters during inference. Because the oracle is selected by downstream performance rather than by family identity, its labels combine successful merge decisions across families without exposing the family label to the model.

Figure 3: The merge-scorer GNN. A message-passing trunk produces a 64-d embedding per node; a symmetric edge head takes the node embeddings and the 8-d edge features and outputs , used in place of the heuristic score .
3.5 Reward-driven expert iteration
Direct imitation of a heuristic-derived oracle cannot exceed the best behaviour in the heuristic pool. We therefore augment the labels with the GNN's own stochastic coarsening rollouts. Independent Gaussian noise with standard deviation 0.35 is added to the edge scores before ranking, causing each rollout to sample a different coarsening. Every candidate is evaluated end to end using
The four quantities are measured on the solution a candidate coarsening produces after the full pipeline has run. [feasible] is 1 when the final solution, after the classical repair of Section 3.6, satisfies every constraint, and 0 otherwise. [pre-feasible] is the same indicator applied to the decoded solution before repair, so it measures the raw quality of the sampled assignment. gap is the relative cost excess over the OR-Tools reference, , and is the number of constraint violations in the same pre-repair solution.
The highest-reward candidate for each instance is designated the oracle, the worked example the model is trained to imitate on the next round (Algorithm 2). The coefficients specify a priority order rather than a tuned optimum: post-repair feasibility precedes pre-repair feasibility, which precedes cost and then raw violations. The caps prevent one poor rollout from dominating the comparison. The weights were selected manually and are used only to rank candidates within the same instance. When a model rollout outperforms all heuristic settings, its decisions enter the next training set, allowing the policy to improve beyond imitation of the heuristic pool.
Algorithm 2: Expert-iteration labelling (one round)
Input: current model , training instances foreach instance do pool ← heuristic-setting coarsenings ∪ stochastic -rollouts foreach candidate do run pipeline; reward ← feasibility, then gap to OR-Tools, then violations oracle ← candidate with maximum reward; add its per-level merges to the labels end retrain
3.6 Decoding and repair
The lowest-energy sample is decoded to routes and passed through a classical repair (duplicate removal, greedy insertion of missing customers, per-route time-window repair, inter-route moves). This repair is strong and dominates post-repair feasibility; we therefore also report pre-repair metrics, which isolate the raw solver/coarsening quality.
4 Experimental setup
Data. The Solomon CVRPTW benchmark [23] contains 56 instances in six families. The C, R, and RC designations denote clustered, random, and mixed customer locations, respectively; each is paired with either a narrow or a wide scheduling horizon. Series 1 has narrower time windows and lower vehicle capacity, so each route typically serves fewer customers. Series 2 has wider windows and greater capacity. Capacity constraints are therefore more likely to bind in the tight-horizon families, which motivates the normalisation in Eq. (5) (Fig. 4). Following prior work, we retain the first customers for through the complete instance, thereby preserving the family structure. GNN experiments use a deterministic, family-stratified split of 43 training and 13 held-out test instances. The test set is not used for training or model selection.
Reference solver. OR-Tools runs a guided-local-search metaheuristic under a fixed time limit and does not certify optimality, so we treat its cost as a strong classical reference rather than a proven optimum. Accordingly, we report the gap to the OR-Tools reference, with the OR-Tools cost, over runs that are feasible, and avoid the term “optimality gap”. The per-family heuristic uses the previous paper’s published per-family hyperparameters, fixed in prior work and never tuned on our test instances; the GNN uses a single fixed configuration, so the comparison does not favour the GNN.
Solver and statistics. All compared conditions receive the same solver budget, including the backend, number of reads, sweeps, and seed. Each experiment uses at least three seeds; the penalty and coarsening studies use five to ten. We report bootstrap 95% confidence intervals. Runs with different seeds on the same benchmark instance are not independent problem observations. The

Figure 4: Representative Solomon instances (first 25 customers); colour encodes the window-open time , and the red star is the depot. R (random) is the hard family throughout.
primary Wilcoxon signed-rank tests therefore take the median across seeds to obtain one value per instance before forming pairs; the pooled per-seed test is included only as a secondary reference. Cost-gap comparisons include pairs for which both methods are feasible, with feasibility reported separately. Experiments run on a single workstation, and the GPU is used only to train the GNN.
5 Results
5.1 Baseline reproduction
At , we reproduce the qualitative behaviour reported previously (Fig. 5). All decoded solutions are valid. Feasibility is 100% for C-type instances, falls to 66.7% without coarsening and 72.2% with heuristic coarsening for R-type instances, and lies between these values for RC. Coarsening reduces the QUBO size by approximately , accelerates sampling by a factor of about 3.2, and lowers route distance by 16–25% relative to the uncoarsened formulation among feasible runs.


Figure 5: Baseline (, static penalties). Left: family-dependent feasibility (R-type is the weak spot). Right: coarsening reduces QUBO size.
5.2 Adaptive penalty calibration
Conditioning mechanism. Uniform scaling has almost no effect under simulated annealing because the sampler derives its temperature schedule from the coupling magnitudes. Rescaling all coefficients therefore leaves the effective sampling distribution nearly unchanged. The relevant quantity is the QUBO's internal coefficient range, which is dominated by the capacity log-slack couplings of Eq. (3). Squaring the slack term makes these of order , where indexes the slack bits and so runs up to ; for the largest such coupling is approximately . At , the capacity constraint does not bind in five of the six families, so these large couplings encode a redundant constraint. Removing it reduces the coefficient range from to 115 for C101 and from to 228 for R201 (Fig. 6c).
Effect. Under an equal solver budget (56 instances and five seeds; Table 1, Fig. 6), adaptive calibration reduces the mean number of pre-repair violations from 33.0 to 0.06, lifts pre-repair feasibility from 0.7% to 94.8%, and improves post-repair feasibility. A paired Wilcoxon test on pre-repair violations, aggregated to one value per instance, gives (n = 56; the seed-pooled value is , n = 560). With a binding-aware capacity weight and the normalisation of Eq. (5), adaptive is at least as good as static on every family group, including the binding RC1 group (100% vs. 85% post-repair). The same principle applies to other slack-encoded constraints: remove the constraint when it cannot bind, and normalise its coefficient block when it can.
Table 1: Adaptive penalty calibration (, equal budget, 56 instances 5 seeds 2 coarsening conditions). Paired Wilcoxon on pre-repair violations, aggregated to one value per instance: , (seed-pooled: , ).
| penalties | pre-repair viol. | pre-repair feas. | post-repair feas. | QUBO vars |
|---|---|---|---|---|
| static | 33.0 | 0.7% | 87.9% | 131 |
| adaptive | 0.06 | 94.8% | 97.5% | 101 |



Figure 6: Adaptive penalties. (a) Pre-repair violations by family. (b) Post-repair feasibility. (c) The internal dynamic range collapses by orders of magnitude for non-binding families (log scale); RC1 binds, so its capacity constraint is retained.
Ablation. Decoupling the levers (Fig. 7) separates the effect into three steps. Objective-scaling the weights alone (scale-only) moves pre-repair violations only from 33.0 to 29.6 (instance-level ): a marginal shift, two orders of magnitude short of the other levers, confirming that uniform magnitude is nearly inert. Dropping non-binding capacity alone (smart-cap only) does most of the work (, ). Normalising the weight of the constraints that do bind (Eq. (5)) closes the remaining gap, taking full adaptive to 0.06 violations and 94.8% pre-repair feasibility: the residual 3.4 of smart-cap is concentrated entirely on binding instances, where the slack survives and its couplings still dominate.
Dropping the constraint, however, removes its slack variables as well (131 → 101), so smart-cap conflates dynamic-range conditioning with a smaller search space. We therefore add a control, cap-crush, that keeps every capacity variable but crushes the capacity penalty so its couplings no longer dominate. At the static variable count (131), cap-crush matches full adaptive (pre-repair violations 0.06, feasibility 94.6%; instance-level , ) while using 30 more variables. Because it changes only the dynamic range and not the variable count, this isolates the mechanism: the lever is the QUBO's internal dynamic range (conditioning), not the smaller search space. The capacity-aware handling, not uniform scaling, drives it.

Figure 7: Lever ablation. Left: pre-repair violations (with feasibility annotated); right: QUBO variable count. Objective-scaling alone is nearly inert. Smart-cap collapses violations but also removes slack variables (131 → 101), and leaves a residual on binding instances that normalising the binding capacity weight removes. The cap-crush control keeps the static variable count (131) yet, by collapsing only the dynamic range, matches full adaptive, isolating conditioning from problem size.
5.3 GNN-guided, tuning-free coarsening
The GNN is trained on (Fig. 8) and attains an edge-ranking AUC of approximately 0.98 on held-out instances. Here, AUC is the probability that the model ranks an oracle merge above a non-merge candidate. With one fixed configuration across all families, the model reaches 100% feasibility at , including 100% on R-type instances compared with 80% for the tuned heuristic. It also produces the fewest raw violations and the greatest compression (Fig. 9). The following section evaluates the more informative question of whether this behaviour persists across problem sizes.
5.4 Learned coarsening is feasibility-preserving
The learned scorer is intended to preserve feasibility without family-specific tuning. To isolate the effect of the score, we compare it with heuristic-fixed, which uses the same coarsening settings as the GNN (, radiusCoeff=0.5). The merge score, either the fixed or the learned one, is therefore the only difference. Across the held-out test instances at , the GNN's coarsened solutions are feasible more often than the per-family-tuned heuristic's: 83.3% vs. 68.9% overall, better or tied on 85 of 90 instance-size pairs (strictly better on 26, worse on 5; paired Wilcoxon over those pairs ), using a single fixed configuration for all families.

Figure 8: GNN training (multi-size model). Left: BCE loss. Right: edge-ranking AUC and recall@k on train and on held-out-instance validation.

Figure 9: N=10 feasibility by family. The GNN, with no per-family tuning, matches or beats the per-family-tuned heuristic, notably on R-type.
The 90 pairs are not mutually independent because each base instance appears at seven sizes. Aggregating over size to obtain one observation for each of the 13 independent base instances preserves the direction of the effect but gives . We therefore present the statistical comparison primarily at each size, where the 13 instances are independent. At small , both methods are near the feasibility ceiling and their difference is not significant (Fig. 10). At , the GNN achieves 74.7% feasibility compared with 56.0% for the heuristic and is better or tied on all 25 available pairs ().
The difference consequently increases with . The family-specific heuristic parameters were tuned at and transfer poorly to larger instances. At , the tuned heuristic falls to 53.8–58.3% feasibility, below the untuned fixed configuration, whereas the GNN remains at 74.4–75.0%. The learned policy thus removes family-specific tuning and degrades more gradually outside the regime in which the heuristic was calibrated.
Classical repair bounds the final cost. Expert iteration reduces the gap to OR-Tools among the coarsening variants (Table 2); the model's own rollouts supply the oracle in 46% of the training cases. A purely classical baseline nevertheless outperforms every QUBO variant. Applying the same repair to an empty solution (repair-only: greedy insertion without SA, QUBO, or coarsening) produces 100% feasibility with a 16–41% cost gap. Adding the shared local search (2-opt and relocate) reduces this range to 5–19%. The same local search brings the GNN pipeline to the level of, but not below, this baseline: the mean gaps are 16.4% and 13.2%, respectively; the GNN is lower on 18 of 38 instance-size cells, with paired . Our claims therefore concern QUBO formulation and preprocessing rather than end-to-end cost. The role of coarsening is to improve tractability and tuning-free feasibility.
Table 2: Gap to the OR-Tools reference (%, mean over feasible runs; 13 held-out instances). Every quantum-pipeline variant (top) sits above the classical repair baselines (bottom); a classical greedy repair with local search is cheapest.
| method | N=10 | N=15 | N=20 |
|---|---|---|---|
| no coarsening (QUBO) | 149.7 | 184.7 | 232.5 |
| heuristic coarsening (QUBO) | 43.4 | 65.4 | 92.3 |
| GNN coarsening (QUBO, ours) | 35.8 | 52.4 | 64.9 |
| classical repair-only | 16.3 | 33.4 | 40.8 |
| classical repair-only + local search | 4.7 | 16.3 | 18.5 |
Convergence. A second expert-iteration round does not improve the policy (oracle-win rate 46%→39%), so the training converges in a single round.
5.5 Tractability and scaling to
The principal value of coarsening is tractability. The uncoarsened FQS/APS QUBO grows quickly with , from 156 variables at to 2,517 at and 15,450 at (Fig. 11). Adaptive conditioning is strong enough that simulated annealing still solves the uncoarsened problem at , but it does so on five times as many variables and at roughly three times the cost per solve (2.2s vs. 0.8s), and the resulting QUBO is far beyond what a current annealer can embed (Section 6.1). Coarsening holds the QUBO smaller (31, 534, 2,577 variables at ), keeping the reduced problem solvable through . This gain is a constant factor: the coarsened QUBO still grows with . The remaining growth motivates the learned-depth experiment
Feasibility-preserving coarsening

Figure 10: Coarsened feasibility vs. . The learned coarsener matches or beats the per-family-tuned heuristic at every size, tuning-free; the gap widens with and is significant at (, better or tied on 25/25). The heuristic's per-family parameters were tuned at and do not transfer, so at large they over-merge and it falls below even an untuned default, while the GNN, conditioning on each instance, degrades gracefully.
in Section 5.6 and limits hardware embeddability at a much smaller scale than classical solvability (Section 6.1). Because classical repair also makes the uncoarsened pipeline feasible after repair, coarsening is needed for QUBO size, solvability, and embeddability rather than for post-repair feasibility.
5.6 Learned stopping
The fixed coarsening depth contributes to the decline in feasibility at larger (Fig. 10). We test a stopping rule that terminates coarsening when the highest predicted merge probability falls below a threshold . The rule does not dominate a fixed depth; instead, it exchanges feasibility for cost (Fig. 12). At , for example, the gap decreases from 127% to 76%, while feasibility falls from 82% to 39%. Predicted merge probabilities are nearly binary, preventing one global threshold from controlling the depth finely. A context-dependent stopping head may provide a more flexible criterion.
5.7 Robustness: architecture and reward sensitivity
Two design choices could in principle account for the reported gains rather than the mechanisms we identify: the GraphSAGE trunk of the merge scorer, and the coefficients of the expert-iteration reward. We examine both, holding everything else fixed.
Message-passing architecture. We retrain the scorer with a GAT and a GCN trunk in place of GraphSAGE under identical features, labels, optimiser, epochs and validation protocol, then evaluate each by running the full pipeline on the held-out instances. A single training run cannot separate an architecture effect from initialisation noise, so each variant is trained three times and we report the spread across those runs (Table 3). No trunk is consistently superior: GraphSAGE leads by more than twice the seed-to-seed spread only at , GAT matches it at , and GCN
QUBO size vs. instance size

Figure 11: QUBO variable count vs. (log scale). The uncoarsened encoding explodes to variables at ; coarsening keeps it smaller and solvable throughout. Embeddability on current hardware is bounded far lower, at (Section 6.1).

Figure 12: Learned stopping trades feasibility for cost rather than dominating a fixed coarsening depth.
is marginally ahead at N=40 using 31% fewer parameters. Edge-ranking quality separates GAT from the other two but does not order GraphSAGE and GCN, which reinforces the observation of Section 5.4 that a merge scorer is best assessed by its effect on the pipeline rather than by its ranking accuracy. We therefore do not attribute the results to the choice of trunk.
Table 3: Message-passing trunk ablation. Coarsened feasibility (%) on the held-out test instances, mean over three training seeds with the spread across those runs; the variants are otherwise identical. No trunk is consistently better.
| GraphSAGE (ours) | GAT | GCN | |
|---|---|---|---|
| N=10 | |||
| N=20 | |||
| N=40 | |||
| validation AUC | |||
| parameters | 26,113 | 43,521 | 17,921 |
Reward coefficients. The reward of Section 3.5 ranks candidates within an instance, so its influence is confined to which candidate it selects. Caching each candidate's measured outcome once allows alternative weightings to be evaluated exactly by re-scoring, without repeating the pipeline. The selection proves almost invariant (Table 4): raising the gap weight fourfold changes the selected oracle on 3 of 129 instance-size pairs, and raising the violation weight tenfold changes none. Only the removal of both trailing terms alters it materially, changing 74 of 129 selections and reducing the rate at which the model's own rollouts win the oracle slot from 35% to 2%, which reduces the procedure to imitation of the heuristic pool.
As this is the only setting whose training data differs substantially, we evaluate it end-to-end with three training seeds per configuration. The resulting models are indistinguishable: 89.7% against 89.7% coarsened feasibility at N=10, and 82.1% against 82.1% at N=20, both differences well within the seed spread ( and respectively). The coefficients therefore encode a priority ordering to which the procedure is insensitive, and optimising them would not be expected to improve the policy. This was measured at N=10 and N=20, where both configurations lie close to the feasibility ceiling; whether a difference emerges at larger N was not tested.
Table 4: Reward sensitivity. How often an alternative weighting selects a different oracle, out of 129 instance-size pairs, computed exactly by re-scoring cached candidates; and the fraction of oracle slots won by the model's own rollouts. Only removing both trailing terms changes the selection materially, and even then the trained model is unchanged.
| weighting () | oracle changes | rollouts win oracle |
|---|---|---|
| (2, 1, 0.5, 0.02) published | — | 35% |
| (2, 1, 0.5, 0.20) violation heavy | 0/129 | 35% |
| (1, 2, 0.5, 0.02) pre-repair first | 2/129 | 34% |
| (2, 1, 2.0, 0.02) gap heavy | 3/129 | 36% |
| (1, 1, 0.5, 0.02) flat feasibility | 4/129 | 36% |
| (1, 0.5, 2.0, 0.02) cost first | 8/129 | 37% |
| (2, 1, 0, 0) no trailing terms | 74/129 | 2% |
6 Evaluation on quantum hardware
The preceding experiments use a classical annealing simulator. This separates the algorithmic effect from device noise, but does not establish whether the conditioning mechanism persists on physical hardware, where minor embedding and finite coupler precision affect the sampled problem. We first use an offline study to identify the embeddable problem sizes and then repeat the conditioning comparison on a D-Wave Advantage2 processor.
6.1 Embeddability
Before annealing, the logical QUBO must be minor-embedded in the processor's fixed, sparse connectivity graph. A logical variable is then represented by a chain of physical qubits coupled ferromagnetically. Because longer chains are more prone to breaks, the maximum chain length is often more restrictive in practice than the total number of physical qubits. We embed the adaptive QUBO with minorminer in ideal Pegasus (Advantage, 5,640 qubits) and Zephyr (Advantage2, 7,440 qubits) graphs. Each cell contains three instances and three seeds, and the study consumes no QPU time (Fig. 13).
Coarsening determines whether these problems can be embedded. At , the uncoarsened QUBO embeds with a median maximum chain length of 13 on Zephyr and 21 on Pegasus; the corresponding values are 3 for heuristic coarsening and 5 for GNN coarsening. At , no embedding of the uncoarsened formulation (653 variables) is found on either topology within the search budget, whereas both coarsened variants embed with maximum chains of length 11. No variant embeds at . These results place the practical operating regime of the pipeline at approximately –20. Zephyr also produces consistently shorter chains than Pegasus wherever both admit an embedding, motivating our use of Advantage2. This embeddability benefit is attributable to coarsening in general, rather than to the learned scorer specifically. The heuristic merges more aggressively and therefore produces slightly smaller problems; the GNN's measured advantage concerns feasibility and cost (Section 5.4), not embeddability.

Figure 13: Offline minor-embedding, no QPU time. Left: median maximum chain length on Advantage2; the uncoarsened encoding fails to embed from , and no variant embeds at . Right: Zephyr yields shorter chains than Pegasus wherever both embed. Targets are full-yield ideal graphs, so these are optimistic bounds.
6.2 Conditioning on the annealer
We evaluated the three penalty configurations from Section 5.2 on Advantage2_system1 (Zephyr topology, working graph 01138bbada) over the 13 held-out test instances at . We used GNN coarsening, 1,000 reads, three seeds per cell, a separate minor embedding for each arm, and no gauge averaging. Chain-break fractions remained small (median 0.011, maximum 0.104), indicating that broken chains were not the principal source of differences among the formulations. The complete study required less than 25 seconds of QPU access time.
The controlled comparison is between static and cap-crush. These configurations have the same logical variable count (47.8 on average) and differ in their coefficient conditioning. The static formulation produced no feasible samples in 35 of the 39 runs and never exceeded 0.2% feasibility in the remaining four (Fig. 14, Table 5). Cap-crush yielded 39.4% feasible samples and reduced the mean number of pre-repair violations from 12.6 to 1.1 per sample. This fixed-variable comparison reproduces on hardware the conditioning effect identified classically in Section 5.2. The full adaptive formulation achieved a comparable feasibility rate (42.7%) with 35% fewer variables.
Table 5: D-Wave Advantage2, 13 held-out instances 3 seeds, , GNN coarsening, 1,000 reads. Static and cap-crush share a variable count, so the difference between them is conditioning alone. The Ising rescaling factor is the factor by which the problem is compressed to fit the device h/J range.
| penalties | pre-repair feas. | pre-repair viol. | QUBO vars | Ising rescaling |
|---|---|---|---|---|
| static | 0.02% | 12.6 | 48 | |
| cap-crush (control) | 39.4% | 1.13 | 48 | |
| adaptive | 42.7% | 1.24 | 31 |

Figure 14: Conditioning on Advantage2. Left: pre-repair feasible samples per instance (mean s.d. over three seeds); static stays below 0.1% on every instance. Right: mean pre-repair violations with the logical variable count annotated. Static and cap-crush use the same 48 variables, so the gap between them isolates dynamic-range conditioning from problem size.
The hardware-relevant measure of conditioning. In Section 5.2, we use the ratio of the largest to the smallest coefficient as a conditioning proxy. On hardware, however, this ratio does not capture the relevant loss of precision. Cap-crush has a higher median ratio than static ( versus ), despite performing substantially better, because reducing the capacity weight also reduces the smallest coefficients. The physically relevant quantity is the factor required to rescale the Ising problem into the device's and ranges. This compression determines how much of the objective lies below the coupler resolution. The rescaling factor differs by five orders of magnitude between the two arms ( for static and for cap-crush) and varies monotonically with raw solution quality (Fig. 15).

Figure 15: The Ising rescaling factor, not the raw coefficient ratio, predicts raw quality on hardware: the more the problem must be compressed to fit the device ranges, the more of the objective falls below coupler resolution.
6.3 Scope of the hardware result
Two limitations delimit the hardware result. First, the annealer does not outperform the classical sampler on these instances. Simulated annealing reaches 79% pre-repair feasibility on the same coarsened QUBOs at N=10, compared with 43% on the processor, a difference consistent with the residual compression required by the hardware. The experiment shows that conditioning affects whether the processor can exploit a formulation; it does not establish an advantage over classical sampling. Second, the accessible regime remains small ( ; Section 6.1). The hardware evaluation should therefore be read as a conditioning study at presently embeddable scales, not as an end-to-end routing benchmark.
7 Beyond the position encoding
The conditioning burden identified above originates in the slack variables of the position encoding. To examine whether it persists under other formulations, we evaluate two slack-free encodings on the same instances and with the same simulated-annealing budget.
Route activation assigns one binary variable to each directed arc rather than to each route position. Degree, depot-balance, and short-cycle constraints are imposed as penalties, while arcs that violate a time window individually are excluded. The formulation is compatible with coarsening and reduces the QUBO size by a factor of 4-7 (420 → 59-75 variables at N=20). This reduction does not improve feasibility: at N=20, feasibility is 66.7% without coarsening and 55.6% with GNN coarsening. Although the encoding removes locally infeasible arcs, it does not represent cumulative travel time along a route. Consequently, a sequence of individually admissible arcs may still violate a time window. Route activation therefore provides an informative test of size reduction, but not a complete feasibility formulation for CVRPTW.
Set partitioning incorporates feasibility at an earlier stage. A classical procedure generates a pool of routes that already satisfy the capacity and time-window constraints. Each binary variable activates one route, and the QUBO selects a minimum-cost subset that covers every customer exactly once. Because feasibility is encoded in the route columns, the formulation requires neither capacity slack variables nor a one-hot position block. The raw samples improve substantially (Fig. 16): exact-cover rates are 97%, 97%, and 96% at , respectively, compared with pre-repair feasibility of 79%, 45%, and 45% for the position encoding. The corresponding route pools contain only 56–90 variables. This formulation has an important structural qualification: the route pool is generated classically, leaving the annealing backend to solve only the selection problem and placing it in direct competition with classical set-partitioning methods. Nevertheless, the comparison shows that the conditioning burden belongs to the encoding rather than inherently to the routing problem. Set partitioning is therefore a promising direction for hardware evaluation, but it is not yet an end-to-end alternative.

Figure 16: Pre-repair feasibility by encoding (GNN coarsening, identical solver budget, measured over the full sample distribution in both cases). Building feasibility into the columns removes the slack-induced conditioning burden.
8 Discussion and limitations
The most transferable finding concerns QUBO conditioning. For QUBOs with slack-encoded constraints, increasing the absolute penalty scale has little effect on the sampler, whereas controlling the range of coefficients improves the quality of raw samples. The variable-count-preserving control separates this effect from a reduction in problem size. On Advantage2, the same comparison increases raw feasibility from 0.02% to 39% without changing the number of logical variables (Section 6). The learned coarsener addresses a separate limitation of the prior method by removing its dependence on family-specific hyperparameters. Across , it preserves feasibility more reliably than the tuned heuristic, with a larger advantage at scales where the fixed heuristic parameters transfer poorly. At the same time, coarsening keeps the QUBO solvable at and embeddable at .
The study has five principal limitations. First, the hardware experiments characterise the formulation, not the relative performance of the device. On the same coarsened QUBOs, simulated annealing achieves higher pre-repair feasibility than the quantum annealer. Moreover, minor embedding confines the hardware evaluation to approximately . These experiments consequently test conditioning at the scale supported by the current device rather than benchmark an end-to-end routing solver.
Second, the claims concern QUBO formulation and preprocessing, not final solution cost. Classical repair followed by local search provides a reference bound that the pipeline reaches but does not improve upon (Table 2). Adaptive conditioning and feasibility-preserving coarsening are therefore evaluated using the quantities they are designed to affect: raw sample quality, feasibility, and tractability.
Third, coarsening reduces the problem size consistently by a factor of roughly five to six. This is a substantial multiplicative reduction, but it does not change the asymptotic growth of the underlying encoding. Choosing the coarsening depth separately for each instance may extend the practical range further.
Fourth, the learned coarsener's feasibility advantage arises from its ability to operate across families and sizes without retuning, rather than from the merge score considered in isolation. Under matched settings, its difference in pre-repair violations from a fixed-parameter heuristic is not significant ( pooled over ). Changing either the message-passing architecture or the reward coefficients also has little effect on the final outcome (Section 5.7).
Finally, FQS and APS coincide under the configuration studied here, and all primary experiments use the Solomon benchmark. Section 7 provides an initial test of formulation dependence. In particular, the set-partitioning result suggests that the observed conditioning burden is specific to the position encoding rather than intrinsic to CVRPTW.
9 Conclusion and future work
This work introduced adaptive penalty calibration and a learned coarsening policy for a QUBO formulation of CVRPTW. Both components were evaluated with simulated annealing and on a D-Wave Advantage2 processor. At a fixed sampling budget, adaptive calibration reduces the mean number of raw constraint violations from 33.0 to 0.06. A control that preserves the variable count attributes this improvement to coefficient conditioning rather than to a smaller QUBO. The hardware experiment yields the same distinction: the poorly conditioned formulation returns almost no feasible samples, whereas the conditioned formulation reaches 39% raw feasibility with the same number of logical variables.
The learned coarsener uses one configuration across the Solomon families and preserves feasibility more often than the family-tuned heuristic over , with the difference increasing at larger problem sizes. It also reduces the QUBO size by a factor of approximately five to six, allowing the formulation to remain solvable at and embeddable at . These results establish improvements in conditioning, feasibility, and tractability. They do not establish an improvement in end-to-end solution cost: after classical repair and local search, the pipeline matches but does not surpass the classical reference bound.
The results motivate three directions for further work. First, the set-partitioning encoding avoids the slack variables responsible for the conditioning burden and achieves 96-97% pre-repair feasibility. Evaluating this formulation on hardware will require integrating route-pool generation into the optimization loop. Second, reverse annealing could use the output of classical repair as an initial state, shifting the role of the annealer from direct competition with the classical procedure to local improvement. Third, a context-dependent stopping rule could replace the fixed coarsening depth and address the loss of feasibility observed at larger .
Code and data availability. All code, configurations, trained models, and result files needed to reproduce every figure and table in this paper are available at https://github.com/YoussefKamelKamel11/cvrptw-qubo-coarsening. The Solomon benchmark instances are public and are included in the repository.
References
[1] Maria Chiara Angelini and Federico Ricci-Tersenghi. Modern graph neural networks do worse than classical greedy algorithms in solving combinatorial optimization problems like maximum independent set. Nature Machine Intelligence, 2022.
[2] Thomas Anthony, Zheng Tian, and David Barber. Thinking fast and slow with deep learning and tree search. In Advances in Neural Information Processing Systems (NeurIPS), 2017.
[3] Mayowa Ayodele. Penalty weights in QUBO formulations: Permutation problems. arXiv preprint arXiv:2206.11040, 2022.
[4] Yoshua Bengio, Andrea Lodi, and Antoine Prouvost. Machine learning for combinatorial optimization: A methodological tour d'horizon. European Journal of Operational Research, 290(2):405–421, 2021.
[5] Kelly Boothby, Jack Raymond, and Andrew D. King. Zephyr topology of D-Wave quantum processors. Technical Report 14-1056A-A, D-Wave Systems, 2021.
[6] Michal Borowski, Paweł Gora, Katarzyna Karnas, et al. New hybrid quantum annealing algorithms for solving vehicle routing problem. In International Conference on Computational Science (ICCS), pages 546–561, 2020.
[7] Jun Cai, William G. Macready, and Aidan Roy. A practical heuristic for finding graph minors. arXiv preprint arXiv:1406.2741, 2014.
[8] Quentin Cappart, Didier Chételat, Elias B. Khalil, Andrea Lodi, Christopher Morris, and Petar Veličković. Combinatorial optimization and reasoning with graph neural networks. Journal of Machine Learning Research, 24, 2023.
[9] G. Clarke and J. W. Wright. Scheduling of vehicles from a central depot to a number of delivery points. Operations Research, 12(4):568–581, 1964.
[10] D-Wave Systems. dwave-samplers: Classical algorithms for solving binary quadratic models, 2024. https://github.com/dwavesystems/dwave-samplers.
[11] Matthias Fey and Jan Eric Lenssen. Fast graph representation learning with PyTorch Geometric. ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019.
[12] Fred Glover, Gary Kochenberger, and Yu Du. Quantum bridge analytics I: a tutorial on formulating and using QUBO models. 4OR, 17:335–371, 2019.
[13] William L. Hamilton, Rex Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems (NeurIPS), 2017.
[14] Hirotaka Irie, Goragot Wongpaisarnsin, Masayoshi Terabe, Akira Miki, and Shinichirou Taguchi. Quantum annealing of vehicle routing problem with time, state and capacity. arXiv preprint arXiv:1903.06322, 2019.
[15] M. W. Johnson et al. Quantum annealing with manufactured spins. Nature, 473:194–198, 2011.
[16] Tadashi Kadowaki and Hidetoshi Nishimori. Quantum annealing in the transverse Ising model. Physical Review E, 58(5):5355–5363, 1998.
[17] Andrew Lucas. Ising formulations of many NP problems. Frontiers in Physics, 2:5, 2014.
[18] K. Nałecz-Charkiewicz, A. Das, T. Chatterjee, J. Keene, Paweł Gora, and C. C. N. Kuhn. Graph coarsening approach to the vehicle routing problem: An approximation strategy. IEEE Access, 13: 22459–22472, 2025. doi: 10.1109/ACCESS.2025.3534677.
[19] Mustafa Mert Özyilmaz. Graph-coarsening approach for the capacitated vehicle routing problem with time windows. arXiv preprint arXiv:2510.22329, 2025.
[20] Elijah Pelofske. Comparing three generations of D-Wave quantum annealers for minor embedded combinatorial optimization problems. Quantum Science and Technology, 2025.
[21] Laurent Perron and Vincent Furnon. OR-Tools. Google, 2024. https://developers.google.com/optimization.
[22] David Silver et al. A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play. Science, 362(6419):1140–1144, 2018.
[23] Marius M. Solomon. Algorithms for the vehicle routing and scheduling problems with time window constraints. Operations Research, 35(2):254–265, 1987.