SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.12138 · NeurIPS · 2024

Perceiving Longer Sequences With Bi-Directional Cross-Attention Transformers

Tom Drummond, Markus Hiller, Krista Ehinger

arXiv · PDF · Open in the Atlas

Code that ran

17 of 28 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (11 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 11 have no contract verdict; 6 failures of our instrument; 11 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/2402.12138.json · badge: /api/ran/2402.12138.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
mrkshllr/bixt canonical (classifier label)
classifier basis: classifier_2025
16 ran · 11 no recorded run
axrwl/bidirectional-cross-attention community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
BidirectionalCrossAttention Ran
ran on a synthesized input · constructed an object; no result was computed
axrwl/bidirectional-cross-attention/bidirectional_cross_attention_jax.py
code served (permissive licence) · get_code("3809092d302a14aa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, BidirectionalCrossAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type 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 jax
import jax.numpy as jnp
from flax import linen as nn

# Set seed for reproducibility
key = jax.random.PRNGKey(0)

# Define small test tensors
batch_size = 2
seq_len_x = 4
seq_len_context = 3
dim = 8
context_dim = 10
heads = 2
dim_head = 4

# Create input tensors
x = jnp.ones((batch_size, seq_len_x, dim))
context = jnp.ones((batch_size, seq_len_context, context_dim))

# Create optional masks
mask = jnp.ones((batch_size, seq_len_x), dtype=jnp.bool_)
context_mask = jnp.ones((batch_size, seq_len_context), dtype=jnp.bool_)

# Create relative position bias (optional)
rel_pos_bias = jnp.zeros((batch_size, heads, seq_len_x, seq_len_context))

# Build the arguments dict
ARGS = {
    "dim": dim,
    "heads": heads,
    "dim_head": dim_head,
    "context_dim": context_dim,
    "dropout": 0.1,
    "talking_heads": False,
    "prenorm": False,
}

# Additional arguments for __call__
CALL_ARGS = {
    "x": x,
    "context": context,
    "mask": mask,
    "context_mask": context_mask,
    "return_attn": False,
    "rel_pos_bias": rel_pos_bias,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, flax, jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type BidirectionalCrossAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a BidirectionalCrossAttention output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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: none by the harness; any seed is in the setup block
CrossAttention Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("406496ff28d67b77")
How it ran

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

CrossAttentionOneSided Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("25760af757f9bb12")
How it ran

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

DropPath Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("59f48e4236839efb")
How it ran

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

Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("fa167a84fdd9edea")
How it ran

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

PatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("20509c2dd02760b3")
How it ran

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

PatchEmbedHalfStride Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("d5590e86670ba51d")
How it ran

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

PatchEmbedQuarterStride Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("8b845e4a681b8a0a")
How it ran

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

PositionalEncodingFourierAdpt Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("5a318973aa4ca2b4")
How it ran

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

PositionalEncodingFourierXCiTEff Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("24c1740f65afedc7")
How it ran

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

SelfAttention Ran
ran on a synthesized input · constructed an object; no result was computed
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("82dbf42759abac64")
How it ran

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

_ntuple Ran
ran; our contract draft was wrong, not the code
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("65b709c708e72249")
How it ran

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

_trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("119ce2c5455542b0")
How it ran

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

named_apply Ran
ran; our contract draft was wrong, not the code
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("5cb5ef5a1ebc83fa")
How it ran

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

pop_posenc_pos_ft384 Ran
ran; our contract draft was wrong, not the code
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("214d4d32ef0c69b0")
How it ran

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

trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("c92dcfe50ad922d8")
How it ran

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

trunc_normal_tf_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("12a0192165e48bca")
How it ran

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

BiXT Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("f09b3147fa564d80")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

BiXTBlock Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("7ff9d17c8bb3e756")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

CABlock Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("a787a84303d152b5")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

CAOneSidedBlock Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("ace5c250f412796c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

SABlock Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("cdadaea5ce13ec84")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

get_init_weights_bixt Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("de9516aa3ff5eb1d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

init_weights_bixt_jax Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("dcff31ee17975b70")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

init_weights_bixt_moco Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("e5f05db1be8f79d9")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

init_weights_bixt_timm Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("d30ca1920d7a4d23")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

lecun_normal_ Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("9e505b05709a5466")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

variance_scaling_ Not yet run
unverified (harvested, no recorded run)
mrkshllr/bixt/timm/models/bixt.py
pointer only (licence: NOASSERTION) · get_code("8c3be2a32f59fc2a")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mrkshllr/bixt (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. No invocation recorded.

Also present in other papers' code

Of 28 samples lifted from this paper's linked repositories, 28 carry a function identity and 0 do not. Of the 28 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 3 later) and 23 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
DropPath
brick of this paper's assembly: helper
8 other papers
6 dated earlier, 2 later · 2 only as an assembly brick
2011.10566 (2020-11)
Exploring Simple Siamese Representation Learning
2103.03230 (2021-03)
Barlow Twins: Self-Supervised Learning via Redundancy Reduction
2210.10716 (2022-10)
CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion
and 5 more not named here
trunc_normal_
brick of this paper's assembly: helper
6 other papers
4 dated earlier, 1 later, 1 undated
2204.12484 (2022-04)
ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation
2308.01045 (2023-08)
Dynamic Token Pruning in Plain Vision Transformers for Semantic Segmentation
2311.02326 (2023-11)
FragXsiteDTI: Revealing Responsible Segments in Drug-Target Interaction with Transformer-Driven Interpretation
and 3 more not named here
lecun_normal_
brick of this paper's assembly: helper
4 other papers
4 dated earlier
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
and 1 more not named here
named_apply
brick of this paper's assembly: helper
3 other papers
3 later
2407.19985 (2024-07)
Mixture of Nested Experts: Adaptive Processing of Visual Tokens
2410.23623 (2024-10)
On Learning Multi-Modal Forgery Representation for Diffusion Generated Video Detection
2412.10569 (2024-12)
Learning to Merge Tokens via Decoupled Embedding for Efficient Vision Transformers
_trunc_normal_
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2204.12484 (2022-04)
ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation

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

We present a novel bi-directional Transformer architecture (BiXT) which scales linearly with input size in terms of computational cost and memory consumption, but does not suffer the drop in performance or limitation to only one input modality seen with other efficient Transformer-based approaches. BiXT is inspired by the Perceiver architectures but replaces iterative attention with an efficient bidirectional cross-attention module in which input tokens and latent variables attend to each other simultaneously, leveraging a naturally emerging attention-symmetry between the two. This approach unlocks a key bottleneck experienced by Perceiverlike architectures and enables the processing and interpretation of both semantics ('what') and location ('where') to develop alongside each other over multiple layers -allowing its direct application to dense and instance-based tasks alike. By combining efficiency with the generality and performance of a full Transformer architecture, BiXT can process longer sequences like point clouds, text or images at higher feature resolutions and achieves competitive performance across a range of tasks like point cloud part segmentation, semantic image segmentation, image classification, hierarchical sequence modeling and document retrieval. Our experiments demonstrate that BiXT models outperform larger competitors by leveraging longer sequences more efficiently on vision tasks like classification and segmentation, and perform on par with full Transformer variants on sequence modeling and document retrieval -but require 28% fewer FLOPs and are up to 8.4× faster. 1

For agents

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

get_harvested_code_for_paper("2402.12138")
get_code_for_paper("2402.12138")
have("2402.12138")

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

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

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

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

Connect an agent — have() is free.