SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.10322 · ICML · 2025

LieRE: Lie Rotational Positional Encodings

Brian Axelrod, Curtis Langlotz, Akshay Chaudhari, Maya Varma, Sophie Ostmeier, Michael Moseley

arXiv · PDF · Open in the Atlas

Code that ran

1 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2406.10322.json · badge: /api/ran/2406.10322.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
stanford-aimi/liere marked official in Papers with Code
Papers with Code archive
1 ran · 2 no recorded run
FunctionStatusWhere it lives
PositionEncoderBase Ran
ran on a synthesized input
stanford-aimi/liere/models/rope_vit.py
code served (permissive licence) · get_code("ff5d8d9cd945f2e0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from collections.abc import Iterable

INIT_ARGS = {
    'image_size': 16,
    'patch_size': 4,
    'input_dimensionality': 2,
    'position_sequencing_type': 'sequential'
}

ARGS = {
    'image_sizes': torch.tensor([[16, 16]], dtype=torch.long)
}

if __name__ == '__main__':
    from collections.abc import Iterable
    import math
    
    class PositionEncoderBase(nn.Module):

        def __init__(self, image_size, patch_size, input_dimensionality, position_sequencing_type):
            super().__init__()
            self.patch_size = patch_size
            self.image_size = image_size
            if not isinstance(self.patch_size, Iterable):
                self.patch_size = [self.patch_size] * input_dimensionality
            if not isinstance(self.image_size, Iterable):
                self.image_size = [self.image_size] * input_dimensionality
            self.expected_steps_per_axis = tuple((image_dim_size // patch_dim_size for image_dim_size, patch_dim_size in zip(self.image_size, self.patch_size)))
            self.position_sequencing_type = position_sequencing_type

        def forward(self, image_sizes: torch.Tensor):
            assert image_sizes.shape[0] == 1
            image_size = image_sizes.tolist()[0]
            steps_per_axis = tuple((math.ceil(dim_size / patch_dim) for dim_size, patch_dim in zip(image_size, self.patch_size)))
            max_values_per_dim = tuple((step_per_axis / expected_step_per_axis for step_per_axis, expected_step_per_axis in zip(steps_per_axis, self.expected_steps_per_axis)))
            assert self.position_sequencing_type == 'sequential', 'Only sequential encoding is supported for now.'
            scale_0_to_1 = False
            if scale_0_to_1:
                normalized_positions = torch.cartesian_prod(*(torch.linspace(0, 1, steps, device=image_sizes.device) for steps in steps_per_axis))
            else:
                normalized_positions = torch.cartesian_prod(*(torch.linspace(0, scale, steps, device=image_sizes.device) for scale, steps in zip(max_values_per_dim, steps_per_axis)))
            return normalized_positions.unsqueeze(0)

    encoder = PositionEncoderBase(**INIT_ARGS)
    output = encoder(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output:\n{output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
ExponentiationMethod Not yet run
unverified (harvested, no recorded run)
stanford-aimi/liere/models/rope_vit.py
code served (permissive licence) · get_code("cf79539a466e67e0")
How it ran

no invocation recorded.

LierePositionEncoder Not yet run
unverified (harvested, no recorded run)
stanford-aimi/liere/models/rope_vit.py
code served (permissive licence) · get_code("ab297ea8908d95e1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Transformer architectures rely on position encodings to model the spatial structure of input data. Rotary Position Encoding (RoPE) is a widely used method in language models that encodes relative positions through fixed, block-diagonal, rotation matrices applied to key-query interactions. We hypothesize that this inductive bias limits their RoPE's effectiveness for modalities with high dimensional structure. Lie Relative Encodings (LieRE) introduce a principled generalization of RoPE, aimed at increasing the representational capacity of positional encodings in transformers. Instead of fixed 2D rotations, LieRE learns dense skew-symmetric matrices (Lie algebra elements), which are then differentiable mapped to form high-dimensional rotation matrices (Lie group elements). This results in richer, learnable, and continuous, encodings of both relative and absolute positional information. We demonstrate the effectiveness of LieRE on 2D and 3D vision tasks, showing that it generalizes well to higher input resolutions while maintaining computational efficiency. The code and checkpoints are publicly available at https://github.com/ StanfordMIMI/LieRE.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.10322")
get_code_for_paper("2406.10322")
have("2406.10322")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2406.10322.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2406.10322.svg)](https://syntology.ai/paper/2406.10322)

Connect an agent — have() is free.