Papers › Algebraic Positional Encodings

Algebraic Positional Encodings

26 Dec 2023arXiv:2312.16045archive 2025-07-28

Konstantinos Kogkalidis, Jean-Philippe Bernardy, Vikas Garg

We introduce a novel positional encoding strategy for Transformer-style models, addressing the shortcomings of existing, often ad hoc, approaches. Our framework provides a flexible mapping from the algebraic specification of a domain to an interpretation as orthogonal operators. This design preserves the algebraic characteristics of the source domain, ensuring that the model upholds its desired structural properties. Our scheme can accommodate various structures, ncluding sequences, grids and trees, as well as their compositions. We conduct a series of experiments to demonstrate the practical applicability of our approach. Results suggest performance on par with or surpassing the current state-of-the-art, without hyper-parameter optimizations or "task search" of any kind. Code is available at https://github.com/konstantinosKokos/ape.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2312.16045")

Code

Syntology Ran 14 of 14 code samples harvested from 2 repositories linked to this paper; 0 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 9 ran with no contract checked.

By repository: official repository: 14 samples from 2 repositories, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

konstantinoskokos/ape officialmentioned in papermentioned on GitHubpytorch report
konstantinoskokos/unitarype officialmentioned in papermentioned on GitHubpytorchCC-BY-SA-4.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 14 ran; 1 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
9ran

Licence: 14 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Branching konstantinoskokos/ape/ape/nn/position/algebraic.py official repository ran · metamorphic tier: deterministic CC-BY-SA-4.0 (copyleft) · pointer only · 82f46cf27f6b050d · report
applicative konstantinoskokos/ape/ape/nn/position/algebraic.py official repository ran · our draft was wrong CC-BY-SA-4.0 (copyleft) · pointer only · b26ded5e4759c67f · report
beam_active konstantinoskokos/unitarype/eval/models/nmt/base.py official repository ran CC-BY-SA-4.0 (copyleft) · pointer only · 84f611811acc8623 · report
beam_search konstantinoskokos/unitarype/eval/models/nmt/base.py official repository ran CC-BY-SA-4.0 (copyleft) · pointer only · 1b5b1a8a40b47b92 · report
create_paths konstantinoskokos/ape/ape/nn/position/algebraic.py official repository ran · our draft was wrong fingerprinted CC-BY-SA-4.0 (copyleft) · pointer only · 651e7c9e76c6ea73 · report
create_steps konstantinoskokos/ape/ape/nn/position/algebraic.py official repository ran · our draft was wrong fingerprinted CC-BY-SA-4.0 (copyleft) · pointer only · 8836ba7e4a50d0ba · report
drop_path konstantinoskokos/unitarype/ape/nn/drop_path.py official repository ran fingerprinted CC-BY-SA-4.0 (copyleft) · pointer only · e61c32bb0f3aa28d · report
make_cosine_schedule konstantinoskokos/unitarype/ape/nn/schedule.py official repository ran CC-BY-SA-4.0 (copyleft) · pointer only · dbd6097f38fb1a58 · report
make_decoder_mask konstantinoskokos/unitarype/eval/models/nmt/base.py official repository ran CC-BY-SA-4.0 (copyleft) · pointer only · 1c37865da38b7a15 · report
make_linear_schedule konstantinoskokos/unitarype/ape/nn/schedule.py official repository ran CC-BY-SA-4.0 (copyleft) · pointer only · c07063a31085fbe6 · report
make_mediator konstantinoskokos/unitarype/eval/models/nmt/algebraic.py official repository ran CC-BY-SA-4.0 (copyleft) · pointer only · 5bf842eb35f51278 · report
make_schedule konstantinoskokos/unitarype/ape/nn/schedule.py official repository ran CC-BY-SA-4.0 (copyleft) · pointer only · 73f5517c35fddfa8 · report
multihead_atn_fn konstantinoskokos/ape/ape/nn/position/algebraic.py official repository ran · fixture could not drive it CC-BY-SA-4.0 (copyleft) · pointer only · 35bf3adaa9416633 · report
rope_like_init konstantinoskokos/ape/ape/nn/position/algebraic.py official repository ran · honoured contract fingerprinted CC-BY-SA-4.0 (copyleft) · pointer only · bd29c10489d04283 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections