[Paper Review] Attend and Decode: 4D fMRI Task State Decoding Using Attention Models
This paper proposes Brain Attend and Decode (BAnD), a novel 4D attention-based deep learning model for fMRI task state decoding that combines 3D residual convolutional networks for spatial feature extraction with multi-head self-attention for temporal modeling. BAnD achieves 93.6% accuracy on the HCP-YA 7-task benchmark and demonstrates strong transfer learning performance, reaching 94.1% accuracy after fine-tuning on unseen motor tasks, outperforming models trained from scratch in less time.
Functional magnetic resonance imaging (fMRI) is a neuroimaging modality that captures the blood oxygen level in a subject's brain while the subject either rests or performs a variety of functional tasks under different conditions. Given fMRI data, the problem of inferring the task, known as task state decoding, is challenging due to the high dimensionality (hundreds of million sampling points per datum) and complex spatio-temporal blood flow patterns inherent in the data. In this work, we propose to tackle the fMRI task state decoding problem by casting it as a 4D spatio-temporal classification problem. We present a novel architecture called Brain Attend and Decode (BAnD), that uses residual convolutional neural networks for spatial feature extraction and self-attention mechanisms for temporal modeling. We achieve significant performance gain compared to previous works on a 7-task benchmark from the large-scale Human Connectome Project-Young Adult (HCP-YA) dataset. We also investigate the transferability of BAnD's extracted features on unseen HCP tasks, either by freezing the spatial feature extraction layers and retraining the temporal model, or finetuning the entire model. The pre-trained features from BAnD are useful on similar tasks while finetuning them yields competitive results on unseen tasks/conditions.
Motivation & Objective
- To address the challenge of high-dimensional, complex spatio-temporal fMRI data in task state decoding.
- To develop a deep learning model that effectively captures both spatial and temporal dynamics in 4D fMRI sequences without relying on parcellation.
- To evaluate the transferability of learned features across different fMRI tasks and conditions.
- To provide interpretability through attention and activation maps to identify brain regions and time points critical for classification.
- To enable scalable, end-to-end fMRI decoding using raw volumetric data.
Proposed method
- The model uses a 3D ResNet-18 backbone to extract spatial features from each 3D fMRI frame.
- It applies multi-head self-attention over the sequence of embedded 3D frames to model temporal dependencies.
- The architecture is trained end-to-end using cross-entropy loss for 7-class task classification on the HCP-YA dataset.
- For interpretability, Grad-CAM is applied to generate spatial activation maps highlighting important voxels per task.
- Temporal attention weights are visualized using a distilled BAnD++ model with a single attention head to identify key time frames.
- Transfer learning is evaluated by freezing spatial features and retraining the temporal head, or fine-tuning the full model on unseen tasks.
Experimental results
Research questions
- RQ1Can a self-attention mechanism effectively model the temporal dynamics of 4D fMRI data for task state decoding?
- RQ2How well do the spatial features learned by BAnD generalize to unseen fMRI tasks?
- RQ3What temporal and spatial patterns does the model attend to during classification, and are they neurobiologically plausible?
- RQ4Does fine-tuning the entire model yield better performance than training from scratch on new tasks?
- RQ5Can the model achieve high accuracy without parcellation or handcrafted feature engineering?
Key findings
- BAnD achieved 93.6% classification accuracy on the HCP-YA 7-task benchmark, significantly outperforming prior methods.
- When transferring to unseen motor tasks, freezing the spatial features and retraining the temporal head yielded 51.1% accuracy, which improved to 94.1% after fine-tuning the full model.
- Fine-tuned BAnD reached 94.1% accuracy on motor tasks, comparable to a model trained from scratch (93.4%) but with significantly reduced training time.
- The 7th frame in each fMRI sequence was consistently assigned the highest attention weight across all tasks, likely due to the delayed BOLD response.
- Spatial activation maps generated via Grad-CAM highlighted task-specific brain regions, such as motor cortex for hand movement tasks and striatum for gambling tasks.
- The model’s learned features demonstrated strong transferability, especially when fine-tuned, indicating robust and generalizable representations of fMRI dynamics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.