SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.16249 · NeurIPS · 2025

Linear Attention for Efficient Bidirectional Sequence Modeling

Volkan Cevher, Yongtao Wu, Elias Rocamora, Francesco Tonin, Arshia Afzal, Mahsa Shoaran, Leyla Candogan, Pol Puigdemont

arXiv · PDF · Open in the Atlas

Code that ran

14 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 10 failures of our instrument; 0 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/2502.16249.json · badge: /api/ran/2502.16249.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
lions-epfl/lion canonical (classifier label)
classifier basis: classifier_2025
14 ran · 0 no recorded run
FunctionStatusWhere it lives
Casual_Mask_Decay_Partial Ran
ran; our contract draft was wrong, not the code
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("173c2a794682a779")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

Casual_Mask_Selective_Partial Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("74d6e1e65a29b46c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

Causal_Mask_Decay Ran
ran; our contract draft was wrong, not the code
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("b7d6d1185456f649")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

Causal_Mask_Selective Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("ff5e874a04ef822f")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

Lion_Attention Ran
ran on a synthesized input · constructed an object; no result was computed
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("0fd20524afba58d9")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

compute_curve_order Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("96ac937123b116ca")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

coords_to_index Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("4ef8a90a9ec9a0f6")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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_matrix_from_tensor Ran
ran, honoured the contract we drafted
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("233f32ffc1bfedb1")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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_matrix_from_tensor_backward Ran
ran; our contract draft was wrong, not the code
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("2c6f64b164f56782")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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_matrix_from_tensor_forward Ran
ran; our contract draft was wrong, not the code
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("663e12d457f7ff82")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

elu_shifted Ran
ran, honoured the contract we drafted
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("90399293d39e23ac")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

index_to_coords_indexes Ran
ran; our contract draft was wrong, not the code
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("882f6b4910fe627d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

s_curve Ran
ran, honoured the contract we drafted
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("5745d11adac3446b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

silu_shifted Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lions-epfl/lion/img_classification/lion/models_lion.py
pointer only (licence: NOASSERTION) · get_code("19c5151cad5ba8a1")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, lions-epfl/lion (NOASSERTION). 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.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 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 14 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

Linear Transformers and State Space Models have emerged as efficient alternatives to softmax Transformers for causal sequence modeling, enabling parallel training via matrix multiplication and efficient RNN-style inference. However, despite their success in causal tasks, no unified framework exists for applying Linear Transformers to bidirectional sequence modeling. We introduce LION, the first framework to systematically extend Linear Transformers to the bidirectional setting. LION generalizes three core representations commonly used in the causal case-full Linear Attention , bidirectional RNN, and chunkwise parallel form-to the bidirectional setting. These forms are theoretically equivalent and enable models to exploit the strengths of each during training and inference. We prove that a broad class of Linear Transformers can be extended using LION and validate our framework via three core examples based on the choice of decay type: LION-LIT, the bidirectional extension of [25]; based on [44]; and LION-S, a variant using selective decay [34,13]. Across standard bidirectional tasks, LION enables models to match or exceed the performance of softmax Transformers, while offering significantly faster training and more efficient inference than existing State Space Models.

For agents

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

get_harvested_code_for_paper("2502.16249")
get_code_for_paper("2502.16249")
have("2502.16249")

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

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

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

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

Connect an agent — have() is free.