Papers › SwiFT: Swin 4D fMRI Transformer
SwiFT: Swin 4D fMRI Transformer
Peter Yongho Kim, Junbeom Kwon, Sunghwan Joo, Sangyoon Bae, DongGyu Lee, Yoonho Jung, Shinjae Yoo, Jiook Cha, Taesup Moon
Modeling spatiotemporal brain dynamics from high-dimensional data, such as functional Magnetic Resonance Imaging (fMRI), is a formidable task in neuroscience. Existing approaches for fMRI analysis utilize hand-crafted features, but the process of feature extraction risks losing essential information in fMRI scans. To address this challenge, we present SwiFT (Swin 4D fMRI Transformer), a Swin Transformer architecture that can learn brain dynamics directly from fMRI volumes in a memory and computation-efficient manner. SwiFT achieves this by implementing a 4D window multi-head self-attention mechanism and absolute positional embeddings. We evaluate SwiFT using multiple large-scale resting-state fMRI datasets, including the Human Connectome Project (HCP), Adolescent Brain Cognitive Development (ABCD), and UK Biobank (UKB) datasets, to predict sex, age, and cognitive intelligence. Our experimental outcomes reveal that SwiFT consistently outperforms recent state-of-the-art models. Furthermore, by leveraging its end-to-end learning capability, we show that contrastive loss-based self-supervised pre-training of SwiFT can enhance performance on downstream tasks. Additionally, we employ an explainable AI method to identify the brain regions associated with sex classification. To our knowledge, SwiFT is the first Swin Transformer architecture to process dimensional spatiotemporal brain functional data in an end-to-end fashion. Our work holds substantial potential in facilitating scalable learning of functional brain imaging in neuroscience research by reducing the hurdles associated with applying Transformer models to high-dimensional fMRI.
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):
get_harvested_code_for_paper(arxiv_id="2307.05916")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="2307.05916", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="2307.05916")
Code
Syntology 42 code samples harvested from 5 repositories linked to this paper: 25 ran (of which 4 constructed an object rather than computing a result; 16 with no instrument failure: 0 honoured, 0 violated, 16 with no contract checked; 9 where Syntology's instrument failed) · 17 unverified. Where Syntology's instrument failed: 7 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: official repository: 12 samples from 1 repository, 8 ran (4 with no instrument failure; 4 where Syntology's instrument failed); found in paper text by Syntology: 30 samples from 4 repositories, 17 ran (12 with no instrument failure; 5 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.
No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:
- microsoft/Swin-Transformer, found in paper text by Syntology: Syntology's graph links these samples to Swin Transformer: Hierarchical Vision Transformer using Shifted Windows (arXiv:2103.14030; that paper's own run record: 123 ran (of which 45 constructed an object rather than computing a result; 79 with no instrument failure: 6 honoured, 3 violated, 70 with no contract checked; 44 where Syntology's instrument failed) · 84 unverified); nothing checks that they implement this paper's method.
Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 3 of the 25 samples that ran have no recorded date.
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.
A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.
Code Syntology ran Syntology
42 samples harvested: 25 ran (of which 4 constructed an object rather than computing a result; 16 with no instrument failure: 0 honoured, 0 violated, 16 with no contract checked; 9 where Syntology's instrument failed) · 17 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 16 of the 42 samples are pointer only, meaning Syntology does not serve that copy's text. For 9 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 5 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 1 sample 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.
census: 13 implementations from 17 papers, 5 distinct outputs across 3 buckets, one shared input per bucket project/module/models/swin4d_transformer_ver7.py ran · our draft was wrong Apache-2.0 (permissive) ·
e0d194741047c322 · report
fixture: signature x:Tensor/6/float, window_size:list/1/int · returned Tensor · level recorded, date not recorded census: 9 implementations from 9 papers, 6 distinct outputs on one shared input project/module/models/swin4d_transformer_ver7.py ran Apache-2.0 (permissive) ·
6c813e3ad36d54c6 · report
fixture: returned PatchEmbed · level recorded 2026-09-22 328b4af4918629c8 · report
fixture: returned PatchMergingV2 · level recorded 2026-09-22 census: 6 implementations from 6 papers, 4 distinct outputs across 3 buckets, one shared input per bucket project/module/models/swin4d_transformer_ver7.py ran Apache-2.0 (permissive) ·
68b986bf66c51ea9 · report
fixture: returned PositionalEmbedding · level recorded 2026-09-22 b560de9c9e1dc9dc · report
fixture: returned WindowAttention4D · level recorded 2026-09-22 961af72c78cb1191 · report
fixture: signature dims:tuple/1/int, window_size:tuple/1/int, shift_size:tuple/1/int, device:device/0/? · returned Tensor · level recorded 2026-09-22 34484ba7deb03520 · report
fixture: signature x_size:tuple/1/int, window_size:tuple/1/int, shift_size:tuple/1/int · returned tuple · level recorded, date not recorded 277cca9a3532b997 · report
fixture: signature windows:Tensor/6/float, window_size:list/1/int, dims:tuple/1/int · returned Tensor · level recorded, date not recorded 64670e8bbebf37ee · report
82954f2e594f9808 · report
282c605afc9a9df9 · report
32ee991678bfe389 · report
b93d89b36f5d3776 · report
fixture: signature model:callable/0/?, match_rule:NoneType/0/?, except_rule:NoneType/0/? · returned tuple · level recorded 2026-09-24 14b27b9a81d9c709 · report
fixture: signature cfg:DictConfig/0/?, final_timeseires:Tensor/3/float, final_pearson:Tensor/2/float, labels:Tensor/1/int · returned list · level recorded 2026-09-24 0b3026b607b39b17 · report
fixture: signature config:DictConfig/0/? · returned RootLogger · level recorded 2026-09-24 6d0049b1f197cbe2 · report
fixture: signature lr_configs:list/1/DictConfig, cfg:DictConfig/0/? · returned list · level recorded 2026-09-24 be45113508613473 · report
fixture: signature model:callable/0/?, optimizer_config:DictConfig/0/? · returned SGD · level recorded 2026-09-24 fd96023efb6b2b49 · report
fixture: signature model:callable/0/?, optimizer_configs:list/1/DictConfig · returned list · level recorded 2026-09-24 b16e48b96d32841d · report
fixture: signature log_file_path:PosixPath/0/? · returned RootLogger · level recorded 2026-09-24 cd853ca321de5189 · report
a179c3e7ac1bdec0 · report
7c145bb8dd7de3e8 · report
c921c50ee314871e · report
7b86cf23e6c30cc6 · report
453a114ddaa22943 · report
524f03b0d35aaa91 · report
c55cafde08716f01 · report
fixture: signature vcs:str/0/str, method:str/0/str · returned function · level recorded 2026-09-26 dbb37355631dabcf · report
fixture: signature commands:list/1/str, args:list/1/str, cwd:NoneType/0/?, verbose:bool/0/bool, hide_stderr:bool/0/bool, env:NoneType/0/? · returned tuple · level recorded 2026-09-26 census: 3 implementations from 9 papers, 2 distinct outputs across 2 buckets, one shared input per bucket monai/losses/focal_loss.py ran Apache-2.0 (permissive) ·
0a9007867090337a · report
fixture: signature input:Tensor/2/float, target:Tensor/2/float, gamma:float/0/float, alpha:Tensor/1/float · returned Tensor · level recorded 2026-09-24 edd33c56dd0421f0 · report
fixture: signature img:Tensor/4/float · returned Tensor · level recorded 2026-09-26 ebb4c26db0d1a569 · report
fixture: signature img:Tensor/4/float · returned Tensor · level recorded 2026-09-26 302a88a3b3b24caf · report
fixture: signature img:Tensor/4/float · returned Tensor · level recorded 2026-09-26 cf84889126420b19 · report
fixture: signature input:Tensor/2/float, target:Tensor/2/float, gamma:float/0/float, alpha:Tensor/1/float · returned Tensor · level recorded 2026-09-24 d7c2de9a1750ea2b · report
fixture: signature x:Tensor/4/float, dim:int/0/int · returned Tensor · level recorded 2026-09-24 5032e3b81c0fffb3 · report
fixture: signature parentdir_prefix:str/0/str, root:str/0/str, verbose:bool/0/bool · returned dict · level recorded 2026-09-26 2c09aa35ea6cf969 · report
fixture: signature x:Tensor/5/float · returned Tensor · level recorded 2026-09-22 065d6753334a893e · report
dae33da258ab777e · report
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.
3 assemblies on this paper: 3 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).
3 sibling assemblies for SwiFT (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.
harvested Assembly for SwiFT (graph method: SwiFT). 12 bricks; individually on a fixture: 8 ran (of which 4 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 4 where Syntology's instrument failed) · 4 unverified. The assembly has not been run end-to-end.
one of 3 siblings
- SwinTransformer4D entry · level 0 · unverified ·
282c605afc9a9df9 - BasicLayer model · level 0 · unverified ·
64670e8bbebf37ee - BasicLayer_FullAttention model · level 0 · unverified ·
82954f2e594f9808 - PatchEmbed helper · level 1 · ran ·
6c813e3ad36d54c6 - PositionalEmbedding model · level 1 · ran ·
68b986bf66c51ea9 - SwinTransformerBlock4D model · level 0 · unverified ·
32ee991678bfe389 - compute_mask helper · level 1 · ran · our draft was wrong ·
961af72c78cb1191 - get_window_size helper · level 1 · ran; the contract check could not run (RAISES) ·
34484ba7deb03520 - WindowAttention4D model · level 1 · ran ·
b560de9c9e1dc9dc - window_partition helper · level 2 · ran · our draft was wrong ·
e0d194741047c322 - window_reverse helper · level 1 · ran; the contract check could not run (RAISES) ·
277cca9a3532b997 - PatchMergingV2 model · level 1 · ran ·
328b4af4918629c8
harvested Assembly for SwiFT (graph method: SwiFT). 4 bricks; individually on a fixture: 1 ran (of which 0 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) · 3 unverified. The assembly has not been run end-to-end.
one of 3 siblings
- R3DNet entry · level 0 · unverified ·
8d8eac234638f60f - SpatioTemporalConv model · level 1 · ran ·
2c09aa35ea6cf969 - SpatioTemporalResBlock model · level 0 · unverified ·
065d6753334a893e - SpatioTemporalResLayer model · level 0 · unverified ·
dae33da258ab777e
harvested Assembly for SwiFT (graph method: SwiFT). 7 bricks; individually on a fixture: 0 ran · 7 unverified. The assembly has not been run end-to-end.
one of 3 siblings
- Encoder_Transformer_Decoder entry · level 0 · unverified ·
453a114ddaa22943 - BaseModel helper · level 0 · unverified ·
7c145bb8dd7de3e8 - BottleNeck_in helper · level 0 · unverified ·
0f08ae993a0c2db4 - BottleNeck_out helper · level 0 · unverified ·
fcbcaa008dd46021 - Decoder model · level 0 · unverified ·
c921c50ee314871e - Encoder model · level 0 · unverified ·
7b86cf23e6c30cc6 - Transformer_Block helper · level 0 · unverified ·
524f03b0d35aaa91
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="2307.05916") returns these assemblies with each brick's role and wiring (how to connect).
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Methods
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