Papers › MIRAGE: Adaptive Multimodal Gating for Whole-Brain fMRI Encoding

MIRAGE: Adaptive Multimodal Gating for Whole-Brain fMRI Encoding

28 May 2026arXiv:2605.29850added by Syntology

Abdulkadir Gokce, Badr AlKhamissi, Martin Schrimpf

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Recent progress in task-optimized neural networks has established encoding models as a powerful tool for predicting brain responses to naturalistic stimuli, yet most existing approaches rely on unimodal representations. The emergence of omni-modal foundation models and rich multimodal neural datasets enables encoding models that jointly integrate visual, auditory, and linguistic information across subjects. We introduce MIRAGE, a brain encoding framework for predicting whole-brain fMRI responses to naturalistic audiovisual stimuli. MIRAGE achieves state-of-the-art performance via a native multimodal backbone and adaptive feature gating across layers. These representations are then combined with a transformer-based brain encoder and a subject-specific linear head over the cortical parcels. Controlled comparisons show that natively multimodal features consistently outperform post-hoc aggregation of independent unimodal features, across architectural levels and backbones. Beyond predictive accuracy, the learned attention weights are directly inspectable to interpret the modality-specific gating profile over the backbone, and each modality traces a distinct anatomical pattern across cortex. Together, these results propose adaptive layer-wise aggregation of natively multimodal features as a generalizable, interpretable, and accurate approach for whole-brain encoding.

PaperPDFCode 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 41 code samples harvested from 1 repository linked to this paper: 30 ran (of which 13 constructed an object rather than computing a result; 23 with no instrument failure: 2 honoured, 0 violated, 21 with no contract checked; 7 where Syntology's instrument failed) · 11 unverified. Where Syntology's instrument failed: 7 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 41 samples from 1 repository, 30 ran (23 with no instrument failure; 7 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 between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

epflneuroailab/mirage found in paper text by SyntologySyntology: 41 samples, 30 ran (7 instrument-failed) · 11 unverified report

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

41 samples harvested: 30 ran (of which 13 constructed an object rather than computing a result; 23 with no instrument failure: 2 honoured, 0 violated, 21 with no contract checked; 7 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 last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
7ran · our draft was wrong
21ran
11unverified

Licence: 0 of the 41 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 epflneuroailab/mirage. “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 4 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.

epflneuroailab/mirage found in paper text by Syntology 41 samples, 30 ran (7 instrument-failed) · 11 unverified
AdaptiveAvgTemporalReducer src/brain_enc/models/base_brain_encoder.py ran fingerprinted Apache-2.0 (permissive) · bdf34d142202b61a · report fixture: returned AdaptiveAvgTemporalReducer · level recorded 2026-09-22
CatAggregator src/brain_enc/models/base_brain_encoder.py ran · metamorphic tier: well formed Apache-2.0 (permissive) · c2594d1e4d22954e · report fixture: signature modality_features:dict/0/?, subject_id:NoneType/0/? · returned Tensor · level recorded 2026-09-22
CatLayerPooler src/brain_enc/models/base_brain_encoder.py ran fingerprinted Apache-2.0 (permissive) · 29dd6bc71fee2173 · report fixture: signature x:Tensor/4/float · returned Tensor · level recorded 2026-09-24
Conv1dTemporalReducer src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 3414d33e85582f53 · report fixture: returned Conv1dTemporalReducer · level recorded 2026-09-22
CrossAttentionInterpolationTemporalReducer src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 5d120c81ea7e2ebe · report fixture: returned CrossAttentionInterpolationTemporalReducer · level recorded 2026-09-22
GroupLinearHead src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 6c7ce4c9a7889eba · report fixture: returned GroupLinearHead · level recorded 2026-09-22
GroupResidualSubjectHead src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · d9c415ab7e9ea01a · report fixture: returned GroupResidualSubjectHead · level recorded 2026-09-22
IdentityLayerPooler src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · c23ed0b4a693062e · report fixture: signature x:Tensor/4/float · returned Tensor · level recorded 2026-09-24
IdentityTemporalReducer src/brain_enc/models/base_brain_encoder.py ran · metamorphic tier: invariant fingerprinted Apache-2.0 (permissive) · 8e4a78e884c17c97 · report fixture: signature x:Tensor/3/float, subject_id:NoneType/0/? · returned Tensor · level recorded 2026-09-22
LayerCrossAttentionPooler src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 07d7727d41635bef · report fixture: returned LayerCrossAttentionPooler · level recorded 2026-09-22
LayerSelfAttentionPooler src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 46959113073f6eaf · report fixture: returned LayerSelfAttentionPooler · level recorded 2026-09-22
MeanAggregator src/brain_enc/models/base_brain_encoder.py ran · metamorphic tier: well formed Apache-2.0 (permissive) · 589dcb72adc22bbd · report fixture: signature modality_features:dict/0/?, subject_id:NoneType/0/? · returned Tensor · level recorded 2026-09-22
MeanLayerPooler src/brain_enc/models/base_brain_encoder.py ran · metamorphic tier: invariant fingerprinted Apache-2.0 (permissive) · 0871a59c0f7e9078 · report fixture: signature x:Tensor/3/float · returned Tensor · level recorded 2026-09-22
ModalityProjector src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 8f663cc2eb003e9b · report fixture: returned ModalityProjector · level recorded 2026-09-22
ModalitySelfAttentionAggregator src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 98e4723594ac02a2 · report fixture: returned ModalitySelfAttentionAggregator · level recorded 2026-09-22
SubjectLinearHead src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · d801121550a0a6de · report fixture: returned SubjectLinearHead · level recorded 2026-09-22
SubjectQueryCrossAttentionHead src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 54fb7b4f0a85e894 · report fixture: returned SubjectQueryCrossAttentionHead · level recorded 2026-09-22
SubjectShiftedCrossAttentionInterpolationTemporalReducer src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · 48903652439efad2 · report fixture: returned SubjectShiftedCrossAttentionInterpolationTemporalReducer · level recorded 2026-09-22
SumAggregator src/brain_enc/models/base_brain_encoder.py ran · metamorphic tier: well formed Apache-2.0 (permissive) · 2de834c277ce11ad · report fixture: signature modality_features:dict/0/?, subject_id:NoneType/0/? · returned Tensor · level recorded 2026-09-22
TemporalEncoder in 6 papers src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · c487ea3382c73e4e · report fixture: signature x:Tensor/3/float, subject_id:Tensor/1/int · returned Tensor · level recorded 2026-09-24
_AttentionPoolerBase src/brain_enc/models/base_brain_encoder.py ran Apache-2.0 (permissive) · f29f6a59819301c0 · report fixture: returned _AttentionPoolerBase · level recorded 2026-09-22
_default_modality_stack src/brain_enc/models/base_brain_encoder.py ran · our draft was wrong Apache-2.0 (permissive) · fd815bbbe0638c96 · report fixture: signature fusion_kind:str/0/str, layer_pooler_kind:str/0/str · returned dict · level recorded 2026-09-22
_default_readout_config src/brain_enc/models/base_brain_encoder.py ran · our draft was wrong Apache-2.0 (permissive) · 26f82874b21db6a3 · report fixture: signature fmri_head:str/0/str, n_output_timesteps:int/0/int · returned dict · level recorded 2026-09-22
_normalize_prediction_mode src/brain_enc/models/base_brain_encoder.py ran · our draft was wrong Apache-2.0 (permissive) · a7c78a3335d0882f · report fixture: signature prediction_mode:NoneType/0/? · returned str · level recorded 2026-09-22
_normalize_readout_config src/brain_enc/models/base_brain_encoder.py ran · our draft was wrong Apache-2.0 (permissive) · ca89046d37f804f1 · report fixture: signature readout_config:dict/0/?, fmri_head:str/0/str, n_output_timesteps:int/0/int · returned dict · level recorded 2026-09-22
_pooler_defaults src/brain_enc/models/base_brain_encoder.py ran · our draft was wrong Apache-2.0 (permissive) · ff62e0d0e2158711 · report fixture: signature config:dict/0/? · returned dict · level recorded 2026-09-22
_sinusoidal_layer_positions src/brain_enc/models/base_brain_encoder.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · d695096a137fe8f8 · report fixture: signature n_layers:int/0/int, dim:int/0/int · returned Tensor · level recorded 2026-09-22
build_aggregator src/brain_enc/models/base_brain_encoder.py ran · our draft was wrong Apache-2.0 (permissive) · b8f600dd1667fb31 · report fixture: signature mode:str/0/str, embed_dim:int/0/int, heads:int/0/int, attn_dropout:float/0/float · returned ModalitySelfAttentionAggregator · level recorded 2026-09-22
build_projectors src/brain_enc/models/base_brain_encoder.py ran · our draft was wrong Apache-2.0 (permissive) · d0c13de0a2974a31 · report fixture: signature feature_dims:dict/0/?, hidden_dim:int/0/int, feature_aggregation:str/0/str, projector_kind:str/0/str · returned ModuleDict · level recorded 2026-09-22
layer_pooler_output_dim src/brain_enc/models/base_brain_encoder.py ran · honoured contract Apache-2.0 (permissive) · 438ff1b11da853b4 · report fixture: signature n_layers:int/0/int, n_dim:int/0/int, config:dict/0/? · returned int · level recorded 2026-09-22
BaseBrainEncoder src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 261520210e7da4fc · report
LowRankSubjectHead src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 984d63bcdb6a0c9a · report
ParcelMLPHead src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 71623edf16f081b4 · report
SigmoidGateAggregator src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 131ce27c65253bdb · report
SoftmaxGateAggregator src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 65cb79b3f988860a · report
SubjectConditionedGateAggregator src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 10afe4e4b801a9f1 · report
SubjectTokenConditionedGroupHead src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · fd925ab8a603ee17 · report
SubjectTokenConditionedHead src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 6acc2bc4c5925703 · report
build_head in 7 papers src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 63dea3514ef83a16 · report
build_layer_pooler src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · f63759d7f9a21827 · report
build_temporal_reducer src/brain_enc/models/base_brain_encoder.py unverified Apache-2.0 (permissive) · 50b83917247cf1ff · 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.

1 assembly on this paper: 1 harvested, 0 generated.

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

  1. BaseBrainEncoder entry · level 0 · unverified · 261520210e7da4fc
  2. TemporalEncoder helper · level 1 · ran · c487ea3382c73e4e
  3. _default_modality_stack helper · level 1 · ran · our draft was wrong · fd815bbbe0638c96
  4. _normalize_readout_config helper · level 1 · ran · our draft was wrong · ca89046d37f804f1
  5. build_aggregator model · level 1 · ran · our draft was wrong · b8f600dd1667fb31
  6. build_head helper · level 0 · unverified · 63dea3514ef83a16
  7. build_layer_pooler helper · level 0 · unverified · f63759d7f9a21827
  8. build_projectors helper · level 1 · ran · our draft was wrong · d0c13de0a2974a31
  9. build_temporal_reducer helper · level 0 · unverified · 50b83917247cf1ff
  10. layer_pooler_output_dim helper · level 1 · ran · honoured contract · 438ff1b11da853b4
  11. _default_readout_config helper · level 1 · ran · our draft was wrong · 26f82874b21db6a3
  12. CatAggregator model · level 1 · ran · c2594d1e4d22954e
  13. MeanAggregator model · level 1 · ran · 589dcb72adc22bbd
  14. ModalitySelfAttentionAggregator model · level 1 · ran · 98e4723594ac02a2
  15. SigmoidGateAggregator model · level 0 · unverified · 131ce27c65253bdb
  16. SoftmaxGateAggregator model · level 0 · unverified · 65cb79b3f988860a
  17. SubjectConditionedGateAggregator model · level 0 · unverified · 10afe4e4b801a9f1
  18. SumAggregator model · level 1 · ran · 2de834c277ce11ad
  19. GroupLinearHead helper · level 1 · ran · 6c7ce4c9a7889eba
  20. GroupResidualSubjectHead helper · level 1 · ran · d9c415ab7e9ea01a
  21. LowRankSubjectHead helper · level 0 · unverified · 984d63bcdb6a0c9a
  22. ParcelMLPHead helper · level 0 · unverified · 71623edf16f081b4
  23. SubjectLinearHead helper · level 1 · ran · d801121550a0a6de
  24. SubjectQueryCrossAttentionHead helper · level 1 · ran · 54fb7b4f0a85e894
  25. SubjectTokenConditionedGroupHead helper · level 0 · unverified · fd925ab8a603ee17
  26. SubjectTokenConditionedHead helper · level 0 · unverified · 6acc2bc4c5925703
  27. CatLayerPooler helper · level 1 · ran · 29dd6bc71fee2173
  28. IdentityLayerPooler helper · level 1 · ran · c23ed0b4a693062e
  29. LayerCrossAttentionPooler helper · level 1 · ran · 07d7727d41635bef
  30. LayerSelfAttentionPooler helper · level 1 · ran · 46959113073f6eaf
  31. MeanLayerPooler helper · level 1 · ran · 0871a59c0f7e9078
  32. _pooler_defaults helper · level 1 · ran · our draft was wrong · ff62e0d0e2158711
  33. ModalityProjector helper · level 1 · ran · 8f663cc2eb003e9b
  34. AdaptiveAvgTemporalReducer helper · level 1 · ran · bdf34d142202b61a
  35. Conv1dTemporalReducer helper · level 1 · ran · 3414d33e85582f53
  36. CrossAttentionInterpolationTemporalReducer helper · level 1 · ran · 5d120c81ea7e2ebe
  37. IdentityTemporalReducer helper · level 1 · ran · 8e4a78e884c17c97
  38. SubjectShiftedCrossAttentionInterpolationTemporalReducer helper · level 1 · ran · 48903652439efad2
  39. _normalize_prediction_mode helper · level 1 · ran · our draft was wrong · a7c78a3335d0882f
  40. _AttentionPoolerBase helper · level 1 · ran · f29f6a59819301c0
  41. _sinusoidal_layer_positions helper · level 1 · ran · honoured contract · d695096a137fe8f8

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="2605.29850") returns these assemblies with each brick's role and wiring (how to connect).

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.29850, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

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