English

Enhancing Transformer-based Routing by Encoding Distance via Relative Positional Encoding

Artificial Intelligence 2026-07-21 v1

Abstract

This paper explores Relative Positional Encoding (RPE) as an additive bias in Transformer architectures to solve the Team Orienteering Problem. By embedding in the attention mechanism pairwise spatial relationships among nodes of the graph that represents the routing problem, the transformer encoder can compute a richer spatial-aware graph embedding that allows the decoder to estimate better routes. Experimental results involving instances up to 100 nodes demonstrate consistent improvements in collected rewards and optimality gaps over vanilla Transformer architectures used by other state-of-the-art works. These findings highlight that explicit relational modeling significantly enhances scalability and generalization for complex combinatorial optimization.

Cite

@article{arxiv.2607.18909,
  title  = {Enhancing Transformer-based Routing by Encoding Distance via Relative Positional Encoding},
  author = {Leyre Encío and Daniel Fuertes and Carlos R. del-Blanco and Fernando Jaureguizar},
  journal= {arXiv preprint arXiv:2607.18909},
  year   = {2026}
}

Comments

This work was accepted to be presented at the Graph Signal Processing Workshop 2026