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

Leyre Encío, Daniel Fuertes, Carlos R. del-Blanco, Fernando Jaureguizar
7/21/2026
cs.AI
transformer-attention

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{enco2026enhancing,
  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},
  year   = {2026},
  eprint = {2607.18909},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.18909v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.18909.svg)](https://codeofpaper.com/paper/2607.18909)

Discussion