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 ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 28 code samples harvested from 2 repositories linked to this paper: 17 ran (of which 11 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 6 where Syntology's instrument failed) · 11 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 3 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 27 samples from 1 repository, 16 ran (10 with no instrument failure; 6 where Syntology's instrument failed); community (archive-listed): 1 sample from 1 repository, 1 ran (1 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 17 samples that ran has no recorded date.

mrkshllr/bixt officialmentioned in papermentioned on GitHubpytorchSyntology: 27 samples, 16 ran (6 instrument-failed) · 11 unverified report
axrwl/bidirectional-cross-attention jaxSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified 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 (of which 11 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 6 where Syntology's instrument failed) · 11 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran · our draft was wrong
3ran; the contract check could not run
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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 3 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

mrkshllr/bixt official repository 27 samples, 16 ran (6 instrument-failed) · 11 unverified
CrossAttention in 85 papers timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · 406496ff28d67b77 · report fixture: returned CrossAttention · level recorded 2026-09-22
CrossAttentionOneSided timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · 25760af757f9bb12 · report fixture: returned CrossAttentionOneSided · level recorded 2026-09-22
DropPath in 75 papers
census: 17 implementations from 17 papers, 8 distinct outputs across 3 buckets, one shared input per bucket
timm/models/bixt.py ran · metamorphic tier: deterministic fingerprinted licence not identified · pointer only · 59f48e4236839efb · report fixture: returned DropPath · level recorded 2026-09-22
Mlp in 102 papers timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · fa167a84fdd9edea · report fixture: returned Mlp · level recorded 2026-09-22
PatchEmbed in 123 papers
census: 9 implementations from 9 papers, 6 distinct outputs on one shared input
timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · 20509c2dd02760b3 · report fixture: returned PatchEmbed · level recorded 2026-09-22
PatchEmbedHalfStride timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · d5590e86670ba51d · report fixture: returned PatchEmbedHalfStride · level recorded 2026-09-22
PatchEmbedQuarterStride timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · 8b845e4a681b8a0a · report fixture: returned PatchEmbedQuarterStride · level recorded 2026-09-22
PositionalEncodingFourierAdpt timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · 5a318973aa4ca2b4 · report fixture: returned PositionalEncodingFourierAdpt · level recorded 2026-09-22
PositionalEncodingFourierXCiTEff timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · 24c1740f65afedc7 · report fixture: returned PositionalEncodingFourierXCiTEff · level recorded 2026-09-22
SelfAttention in 66 papers timm/models/bixt.py ran · metamorphic tier: deterministic licence not identified · pointer only · 82dbf42759abac64 · report fixture: returned SelfAttention · level recorded 2026-09-22
_ntuple in 17 papers timm/models/bixt.py ran · our draft was wrong licence not identified · pointer only · 65b709c708e72249 · report fixture: signature n:int/0/int · returned function · level recorded 2026-09-22
_trunc_normal_ timm/models/bixt.py ran; the contract check could not run (RAISES) licence not identified · pointer only · 119ce2c5455542b0 · report fixture: signature tensor:Tensor/2/float, mean:float/0/float, std:float/0/float, a:float/0/float, b:float/0/float · returned Tensor · level recorded 2026-09-22
named_apply in 32 papers timm/models/bixt.py ran · our draft was wrong licence not identified · pointer only · 5cb5ef5a1ebc83fa · report fixture: signature fn:callable/0/?, module:callable/0/?, name:str/0/str, depth_first:bool/0/bool, include_root:bool/0/bool · returned SimpleModel · level recorded 2026-09-22
pop_posenc_pos_ft384 timm/models/bixt.py ran · our draft was wrong licence not identified · pointer only · 214d4d32ef0c69b0 · report fixture: signature state_dict:dict/0/?, model:callable/0/? · returned dict · level recorded, date not recorded
trunc_normal_ in 154 papers
census: 37 implementations from 54 papers, 4 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32
timm/models/bixt.py ran; the contract check could not run (RAISES) licence not identified · pointer only · c92dcfe50ad922d8 · report fixture: signature tensor:Tensor/2/float, mean:float/0/float, std:float/0/float, a:float/0/float, b:float/0/float · returned Tensor · level recorded 2026-09-22
trunc_normal_tf_ timm/models/bixt.py ran; the contract check could not run (RAISES) licence not identified · pointer only · 12a0192165e48bca · report fixture: signature tensor:Tensor/2/float, mean:float/0/float, std:float/0/float, a:float/0/float, b:float/0/float · returned Tensor · level recorded 2026-09-22
BiXT timm/models/bixt.py unverified licence not identified · pointer only · f09b3147fa564d80 · report
BiXTBlock timm/models/bixt.py unverified licence not identified · pointer only · 7ff9d17c8bb3e756 · report
CABlock timm/models/bixt.py unverified licence not identified · pointer only · a787a84303d152b5 · report
CAOneSidedBlock timm/models/bixt.py unverified licence not identified · pointer only · ace5c250f412796c · report
SABlock timm/models/bixt.py unverified licence not identified · pointer only · cdadaea5ce13ec84 · report
get_init_weights_bixt timm/models/bixt.py unverified licence not identified · pointer only · de9516aa3ff5eb1d · report
init_weights_bixt_jax timm/models/bixt.py unverified licence not identified · pointer only · dcff31ee17975b70 · report
init_weights_bixt_moco timm/models/bixt.py unverified licence not identified · pointer only · e5f05db1be8f79d9 · report
init_weights_bixt_timm timm/models/bixt.py unverified licence not identified · pointer only · d30ca1920d7a4d23 · report
lecun_normal_ in 7 papers timm/models/bixt.py unverified licence not identified · pointer only · 9e505b05709a5466 · report
variance_scaling_ in 5 papers timm/models/bixt.py unverified licence not identified · pointer only · 8c3be2a32f59fc2a · report
axrwl/bidirectional-cross-attention community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
BidirectionalCrossAttention bidirectional_cross_attention_jax.py ran MIT (permissive) · 3809092d302a14aa · report fixture: returned BidirectionalCrossAttention · level recorded 2026-09-22

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

2 assemblies on this paper: 2 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

2 sibling assemblies for BiXT (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for BiXT (graph method: BiXT). 28 bricks; individually on a fixture: 17 ran (of which 11 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 6 where Syntology's instrument failed) · 11 unverified. The assembly has not been run end-to-end.

one of 2 siblings

  1. BiXT entry · level 0 · unverified · f09b3147fa564d80
  2. BiXTBlock model · level 0 · unverified · 7ff9d17c8bb3e756
  3. PatchEmbed helper · level 1 · ran · 20509c2dd02760b3
  4. PatchEmbedHalfStride helper · level 1 · ran · d5590e86670ba51d
  5. PatchEmbedQuarterStride helper · level 1 · ran · 8b845e4a681b8a0a
  6. PositionalEncodingFourierAdpt helper · level 1 · ran · 5a318973aa4ca2b4
  7. PositionalEncodingFourierXCiTEff helper · level 1 · ran · 24c1740f65afedc7
  8. get_init_weights_bixt helper · level 0 · unverified · de9516aa3ff5eb1d
  9. init_weights_bixt_timm helper · level 0 · unverified · d30ca1920d7a4d23
  10. named_apply helper · level 1 · ran · our draft was wrong · 5cb5ef5a1ebc83fa
  11. trunc_normal_ helper · level 1 · ran; the contract check could not run (RAISES) · c92dcfe50ad922d8
  12. CABlock model · level 0 · unverified · a787a84303d152b5
  13. CAOneSidedBlock model · level 0 · unverified · ace5c250f412796c
  14. SABlock model · level 0 · unverified · cdadaea5ce13ec84
  15. init_weights_bixt_jax helper · level 0 · unverified · dcff31ee17975b70
  16. init_weights_bixt_moco helper · level 0 · unverified · e5f05db1be8f79d9
  17. _trunc_normal_ helper · level 1 · ran; the contract check could not run (RAISES) · 119ce2c5455542b0
  18. CrossAttention model · level 1 · ran · 406496ff28d67b77
  19. DropPath helper · level 1 · ran · 59f48e4236839efb
  20. LayerScale model · level 1 · ran · 53f7f1cd1032ac80
  21. Mlp helper · level 1 · ran · fa167a84fdd9edea
  22. drop_path helper · level 1 · ran; the contract check could not run · 87577b3ff9d32712
  23. CrossAttentionOneSided model · level 1 · ran · 25760af757f9bb12
  24. SelfAttention model · level 1 · ran · 82dbf42759abac64
  25. lecun_normal_ helper · level 0 · unverified · 9e505b05709a5466
  26. variance_scaling_ helper · level 0 · unverified · 8c3be2a32f59fc2a
  27. trunc_normal_tf_ helper · level 1 · ran; the contract check could not run (RAISES) · 12a0192165e48bca
  28. _ntuple helper · level 1 · ran · our draft was wrong · 65b709c708e72249

harvested Assembly for BiXT (graph method: BiXT). 1 brick; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.

one of 2 siblings

  1. BidirectionalCrossAttention entry · level 1 · ran · 3809092d302a14aa

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2402.12138") returns these assemblies with each brick's role and wiring (how to connect).

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