Abstract
This paper introduces the Neural Transcoding Vision Transformer (NT-ViT), a generative model designed to estimate high-resolution functional Magnetic Resonance Imaging (fMRI) samples from simultaneous Electroencephalography (EEG) data. A key feature of NT-ViT is its Domain Matching (DM) sub-module which effectively aligns the latent EEG representations with those of fMRI volumes, enhancing the model's accuracy and reliability. Unlike previous methods that tend to struggle with fidelity and reproducibility of images, NT-ViT addresses these challenges by ensuring methodological integrity and higher-quality reconstructions which we showcase through extensive evaluation on two benchmark datasets; NT-ViT outperforms the current state-of-the-art by a significant margin in both cases, e.g. achieving a $10\times$ reduction in RMSE and a $3.14\times$ increase in SSIM on the Oddball dataset. An ablation study also provides insights into the contribution of each component to the model's overall effectiveness. This development is critical in offering a new approach to lessen the time and financial constraints typically linked with high-resolution brain imaging, thereby aiding in the swift and precise diagnosis of neurological disorders.
Introduction
In neuroscience, researchers often face a trade-off between temporal and spatial resolution. Electroencephalography (EEG) offers high temporal resolution and is cost-effective and portable, yet it lacks spatial precision. Conversely, functional Magnetic Resonance Imaging (fMRI) provides detailed spatial maps but is expensive, slow, and requires stationary equipment.
The field of Neural Transcoding (NT) attempts to bridge this gap by "translating" fast EEG signals into the detailed spatial volumes of an fMRI. However, previous attempts using Convolutional Neural Networks (CNNs) and GANs have struggled with image fidelity and capturing the complex, long-range dependencies of brain activity across different regions.
Methodology
The Neural Transcoding Vision Transformer (NT-ViT) leverages the attention mechanisms of Transformers to capture global context, treating brain signals as sequences rather than static images.
The architecture consists of several key components:
- Spectrogram Preprocessing: EEG waveforms are first converted into Mel spectrograms. This treats the brain's electrical signals similarly to audio, encapsulating frequency information vital for reconstruction.
- The Generator: An encoder-decoder structure that takes the EEG spectrogram and attempts to "decode" it into a 3D fMRI volume.
- Domain Matching (DM) Module: This is the model's "secret sauce." During training, a separate module encodes actual fMRI volumes into a latent space. The model is penalized if the latent representation of the EEG doesn't match that of the fMRI, forcing the EEG encoder to learn physically meaningful features.
- Hybrid Loss Function: The model optimizes for voxel-wise accuracy ($L_{rec}$), spatial activation patterns ($L_{reg}$), and latent space alignment ($L_{latent}$).
Experimental Setup
NT-ViT was evaluated on two primary benchmark datasets:
- NODDI: Simultaneous EEG-fMRI recordings from 15 subjects during a resting state (4,500 paired samples).
- Oddball (Auditory and Visual): A more complex dataset where 17 participants responded to specific stimuli (17,340 paired samples).
To ensure generalizability, the authors used a Leave-One-Subject-Out (LOSO) cross-validation scheme, testing the model on subjects it had never seen during training.
Results and Discussion
Quantitative improvements over previous state-of-the-art (SOTA) methods are substantial. On the Oddball dataset, NT-ViT achieved a $10\times$ reduction in Root Mean Square Error (RMSE) and a $3.14\times$ increase in Structural Similarity Index (SSIM). On the NODDI dataset, it achieved a $5\times$ reduction in RMSE and a $1.23\times$ increase in SSIM.
Key insights from the study include:
- Transformer Advantage: The shift to a Transformer architecture allowed the model to better handle long-range dependencies—understanding how activity in one area relates to distant regions.
- Latent Alignment: Ablation studies showed that the Domain Matching module was a primary driver of performance, as aligning the "internal language" of the EEG and fMRI encoders makes translation more accurate.
- EEG as "Audio": Using Mel filters (standard in speech processing) on EEG data proved highly effective, suggesting frequency distribution carries critical information for spatial mapping.
- Stability: The use of SELU activation functions outperformed standard ReLU, helping maintain stable signal variance across deep Transformer layers.
Qualitatively, the model successfully identified regions of active brain activity and even showed a nascent ability to discern the contours of the brain and skull, despite never being explicitly trained on anatomy.
Conclusion
NT-ViT represents a pivotal step toward making high-quality neuroimaging more accessible. While synthesized fMRI is not yet a replacement for real scans, it offers a powerful tool for clinical diagnosis and neuroscience research. Future directions include exploring bidirectional transcoding (fMRI-to-EEG), cross-modality adaptation (e.g., CT-to-fMRI), and pre-training on massive unsupervised EEG datasets.
Code Availability: https://github.com/rom42pla/ntvit
Summary updated