Scaling Graph Reasoning in Language Models with Learnable Graph Positional Encodings

Javier Porras-Valenzuela, Arush Arora, Alejandro Ribeiro
10/20/2026
cs.LGcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Solving reasoning tasks supported on graphs typically requires providing a Language Reasoning Model (LRM) with a serialized description of the graph. This approach results in the input length growing with the number of edges, which limits the size of the problems that can be solved. Furthermore, even when graphs fit in context, performance sharply decays as the graphs grow. We propose to address this by augmenting LRMs with scalable and permutation equivariant graph positional encodings that modulate attention logits. An additional post-fusion-style module incorporates structural information into hidden states. We compute these positional encodings using a GNN followed by a Graph Transformer. This eliminates the need for serialized adjacencies, reducing the context burden to $O(N)$. We jointly fine-tune the positional encoder and the LRM LoRA adapters using optimal solutions generated by graph-theoretic solvers, resulting in a computationally efficient method. Trained on small graphs, the model exhibits improved size-generalization across graph-theoretic tasks on graphs with up to 1,000 nodes, and produces fewer tokens than a conventional LRM. Additionally, we observe that our model remains robust to node relabelings. Evaluations on graph-theoretic benchmarks also show that performance on small graphs is preserved.

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. 1 weaker match is hidden by default — 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{porrasvalenzuela2026scaling,
  title  = {Scaling Graph Reasoning in Language Models with Learnable Graph Positional Encodings},
  author = {Javier Porras-Valenzuela and Arush Arora and Alejandro Ribeiro},
  year   = {2026},
  eprint = {2610.27439},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.27439v1}
}

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/2610.27439.svg)](https://codeofpaper.com/paper/2610.27439)

Discussion