ExPe: Exact Positional Encodings for Generative Transformer Models with Extrapolating Capabilities

Aleksis Datseris, Sylvia Vassileva, Ivan Koychev, Svetla Boytcheva
9/23/2025
cs.CL

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

Abstract

This paper introduces a novel approach to position embeddings in transformer models, named "Exact Positional Embeddings" (ExPE). An absolute positional embedding method that can extrapolate to sequences of lengths longer than the ones it was trained on. Traditional transformer models rely on absolute or relative position embeddings to incorporate positional information into token embeddings, which often struggle with extrapolation to sequences longer than those seen during training. Our proposed method utilizes a novel embedding strategy that encodes exact positional information by overriding specific dimensions of the embedding vectors, thereby enabling a more precise representation of token positions. The proposed approach not only maintains the integrity of the original embeddings but also enhances the model's ability to generalize to more extended sequences. In causal language modeling, our ExPE embeddings significantly reduce perplexity compared to rotary and sinusoidal embeddings, when tested on sequences longer than those used in training.

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{datseris2025expe,
  title  = {ExPe: Exact Positional Encodings for Generative Transformer Models with Extrapolating Capabilities},
  author = {Aleksis Datseris and Sylvia Vassileva and Ivan Koychev and Svetla Boytcheva},
  year   = {2025},
  eprint = {2509.19569},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.19569v1}
}

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

Discussion