Papers › Perceiving Longer Sequences With Bi-Directional Cross-Attention Transformers

Perceiving Longer Sequences With Bi-Directional Cross-Attention Transformers

19 Feb 2024arXiv:2402.12138archive 2025-07-28

Markus Hiller, Krista A. Ehinger, Tom Drummond

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 bi-directional 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 Perceiver-like 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.

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="2402.12138")

Code

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

By repository: official repository: 27 samples from 1 repository, 16 ran; community (archive-listed): 1 sample from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mrkshllr/bixt officialmentioned in papermentioned on GitHubpytorch 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

28 samples harvested; 17 ran; 0 honoured the contract we drafted; 11 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.

3ran · our draft was wrong
3ran · fixture could not drive it
11ran
11unverified

Licence: 27 of the 28 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.

CrossAttention mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · 406496ff28d67b77 · report
CrossAttentionOneSided mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · 25760af757f9bb12 · report
DropPath mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic fingerprinted licence not identified · pointer only · 59f48e4236839efb · report
Mlp mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · fa167a84fdd9edea · report
PatchEmbed mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · 20509c2dd02760b3 · report
PatchEmbedHalfStride mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · d5590e86670ba51d · report
PatchEmbedQuarterStride mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · 8b845e4a681b8a0a · report
PositionalEncodingFourierAdpt mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · 5a318973aa4ca2b4 · report
PositionalEncodingFourierXCiTEff mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · 24c1740f65afedc7 · report
SelfAttention mrkshllr/bixt/timm/models/bixt.py official repository ran · metamorphic tier: deterministic licence not identified · pointer only · 82dbf42759abac64 · report
_ntuple mrkshllr/bixt/timm/models/bixt.py official repository ran · our draft was wrong licence not identified · pointer only · 65b709c708e72249 · report
_trunc_normal_ mrkshllr/bixt/timm/models/bixt.py official repository ran · fixture could not drive it licence not identified · pointer only · 119ce2c5455542b0 · report
named_apply mrkshllr/bixt/timm/models/bixt.py official repository ran · our draft was wrong licence not identified · pointer only · 5cb5ef5a1ebc83fa · report
pop_posenc_pos_ft384 mrkshllr/bixt/timm/models/bixt.py official repository ran · our draft was wrong licence not identified · pointer only · 214d4d32ef0c69b0 · report
trunc_normal_ mrkshllr/bixt/timm/models/bixt.py official repository ran · fixture could not drive it licence not identified · pointer only · c92dcfe50ad922d8 · report
trunc_normal_tf_ mrkshllr/bixt/timm/models/bixt.py official repository ran · fixture could not drive it licence not identified · pointer only · 12a0192165e48bca · report
BiXT mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · f09b3147fa564d80 · report
BiXTBlock mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · 7ff9d17c8bb3e756 · report
CABlock mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · a787a84303d152b5 · report
CAOneSidedBlock mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · ace5c250f412796c · report
SABlock mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · cdadaea5ce13ec84 · report
get_init_weights_bixt mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · de9516aa3ff5eb1d · report
init_weights_bixt_jax mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · dcff31ee17975b70 · report
init_weights_bixt_moco mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · e5f05db1be8f79d9 · report
init_weights_bixt_timm mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · d30ca1920d7a4d23 · report
lecun_normal_ mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · 9e505b05709a5466 · report
variance_scaling_ mrkshllr/bixt/timm/models/bixt.py official repository unverified licence not identified · pointer only · 8c3be2a32f59fc2a · report
BidirectionalCrossAttention axrwl/bidirectional-cross-attention/bidirectional_cross_attention_jax.py community (archive-listed) ran MIT (permissive) · 3809092d302a14aa · report

Tasks

Image ClassificationImage SegmentationRetrievalSegmentationSemantic Segmentationimage-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEConcatenated Skip ConnectionDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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