SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.13770 · NeurIPS · 2024

Elliptical Attention

Tan Nguyen, Rachel Teo, Stefan Nielsen, Laziz Abdullaev

arXiv · PDF · Open in the Atlas

Code that ran

3 of 5 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 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-24; 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.13770.json · badge: /api/ran/2406.13770.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
stefvk/Elliptical-Attention canonical (classifier label)
classifier basis: census
3 ran · 1 no recorded run
stefvk/elliptical-attention canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
build_transform Ran
ran; our contract draft was wrong, not the code
stefvk/Elliptical-Attention/ImageNet/datasets.py
pointer only (licence: NONE) · get_code("3bc74137ab36aa79")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, stefvk/Elliptical-Attention when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_exp_dir Ran
ran; our contract draft was wrong, not the code
stefvk/Elliptical-Attention/ImageNet/logger.py
pointer only (licence: NONE) · get_code("1c4396c7bf90ccbb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, stefvk/Elliptical-Attention when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_logger Ran
ran; our contract draft was wrong, not the code
stefvk/Elliptical-Attention/ImageNet/logger.py
pointer only (licence: NONE) · get_code("d142e8a68b535885")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, stefvk/Elliptical-Attention when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

MahalaAttention Not yet run
unverified (harvested, no recorded run)
stefvk/elliptical-attention/ADE20K/model/deit_elliptical.py
pointer only (licence: NONE) · get_code("71210cfed12ff00a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, stefvk/elliptical-attention when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

build_dataset Not yet run
unverified (harvested, no recorded run)
stefvk/Elliptical-Attention/ImageNet/datasets.py
pointer only (licence: NONE) · get_code("9153241c4331eb1a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, stefvk/Elliptical-Attention when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 2 later) and 2 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.

FunctionAlso present inEarliest-datedOthers named
build_transform 37 other papers
33 dated earlier, 1 the same month, 2 later, 1 same year, order not determinable
2104.05707 (2021-04)
LocalViT: Analyzing Locality in Vision Transformers
2104.13840 (2021-04)
Twins: Revisiting the Design of Spatial Attention in Vision Transformers
2106.00515 (2021-06)
KVT: k-NN Attention for Boosting Vision Transformers
and 34 more not named here
build_dataset 25 other papers
21 dated earlier, 1 the same month, 3 later
2104.05707 (2021-04)
LocalViT: Analyzing Locality in Vision Transformers
2106.00515 (2021-06)
KVT: k-NN Attention for Boosting Vision Transformers
2106.01401 (2021-06)
Container: Context Aggregation Network
and 22 more not named here
get_logger 3 other papers
3 dated earlier
2004.12585 (2020-04)
A Batch Normalized Inference Network Keeps the KL Vanishing Away
2106.06295 (2021-06)
Going Beyond Linear Transformers with Recurrent Fast Weight Programmers
2304.11062 (2023-04)
Scaling Transformer to 1M tokens and beyond with RMT

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-24.

Repositories linked to this paper

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

Abstract

Pairwise dot-product self-attention is key to the success of transformers that achieve state-of-the-art performance across a variety of applications in language and vision. This dot-product self-attention computes attention weights among the input tokens using Euclidean distance, which makes the model prone to representation collapse and vulnerable to contaminated samples. In this paper, we propose using a Mahalanobis distance metric for computing the attention weights to stretch the underlying feature space in directions of high contextual relevance. In particular, we define a hyper-ellipsoidal neighborhood around each query to increase the attention weights of the tokens lying in the contextually important directions. We term this novel class of attention Elliptical Attention. Our Elliptical Attention provides two benefits: 1) reducing representation collapse, and 2) enhancing the model's robustness as Elliptical Attention pays more attention to contextually relevant information, rather than focusing on some small subset of informative features. We empirically demonstrate the advantages of Elliptical Attention over the baseline dot-product attention and state-of-the-art attention methods on various practical tasks, including object classification, image segmentation, and language modeling across different data modalities. The code is publicly available at https://github.com/stefvk/Elliptical-Attention.

For agents

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

get_harvested_code_for_paper("2406.13770")
get_code_for_paper("2406.13770")
have("2406.13770")

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

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

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

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

Connect an agent — have() is free.