Research on fMRI Image Generation from EEG Signals Based on Diffusion Models
Abstract
1. Introduction
- (1)
- A Novel EEG-conditioned Diffusion Model (EF-Diffusion): While previous diffusion models have excelled in image generation, their application to the EEG-to-fMRI problem remains largely unexplored and faces unique challenges such as severe noise in EEG and complex cross-modal mapping. Unlike existing methods that often rely on simplistic conditioning, we propose EF-Diffusion, a framework that introduces two core innovations: (a) a dedicated EEG encoder (EPG) with a Multi-Head Recursive Spectral Attention (MHRSA) mechanism to dynamically extract noise-robust, spectrally aware neural features and (b) a Cross-modal Information Interaction Module (CIIM) integrated within the U-Net, which uses cross-attention to enable fine-grained, spatially adaptive guidance of the fMRI denoising process by EEG semantics. This design fundamentally differs from prior diffusion-based works by providing a deeply fused and dynamic conditioning pathway that is specifically tailored for the intricacies of neuroimaging data.
- (2)
- Comprehensive Validation and Novel Insight: We provide, to our knowledge, the first extensive empirical demonstration that a diffusion-based model can significantly outperform existing GAN and transformer-based methods in EEG-to-fMRI generation. Through rigorous ablation studies on two public datasets (NODDI and XP-2), we not only validate the necessity of each proposed component (EPG and CIIM) but also deliver a key finding: our model achieves superior performance on task-state data, highlighting its capability to leverage strong stimulus-evoked neural correlates, a conclusion quantitatively and qualitatively supported by state-of-the-art results in SSIM, PSNR, and RMSE.
2. Theoretical Foundations for EEG-Guided Synthesis of fMRI Data
2.1. Principles of EEG–fMRI Neuroimaging
2.1.1. Principles of EEG Neuroimaging
2.1.2. Principles of fMRI Neuroimaging
2.2. Simultaneous EEG–fMRI Dataset
2.2.1. Resting-State Simultaneous EEG–fMRI Dataset
2.2.2. Task-Based Simultaneous EEG–fMRI Dataset
2.3. Overview of Deep Learning Theory
2.3.1. Convolutional Neural Network
- (1)
- Convolutional layer
- (2)
- Pooling Layer
- (3)
- Activation Functions
2.3.2. U-Net
2.3.3. Attention-Based Neural Network
- (1)
- Self-attention mechanism
- (2)
- Multi-Head Self-Attention Mechanism: To enhance the expressive power of neural networks, the multi-head self-attention mechanism [31] is often employed, as illustrated in Figure 13. The key idea is to compute multiple independent attention heads in parallel, each operating in a distinct subspace, thereby capturing information at various positions and levels of abstraction. Specifically, the queries, keys, and values are first projected into several lower-dimensional subspaces; the attention output of each head is then computed separately, and the resulting vectors are concatenated or linearly combined to produce the final representation. The computation is summarized in Equation (11).where is the output of each attention head, is a linear transformation matrix, and h is the number of heads.
2.3.4. Principles of Diffusion Models
- (1)
- Forward diffusion process: In the forward process of the denoising diffusion probabilistic model, assume a given data distribution and a Markov chain that gradually adds Gaussian noise to the original data, generating a sequence of random variables . Here, T is the total number of steps in the diffusion process. The diffusion process is described by Equation (12):According to Equation (12), in the diffusion process, the joint distribution of the data is obtained by the product of the conditional distributions at each step. The mathematical equation for is Equation (13):where represents the noise weight added to the data at each time step, with ; T is the covariance matrix of the noise, which is an identity matrix; and represents the noisy data at step t.Through multiple iterations, the noisy data at any time step can be computed based on and , allowing us to derive , which follows a Gaussian distribution. The mathematical expression is shown in Equation (14).where is the original image without noise and ; .
- (2)
- Reverse diffusion process
2.4. Evaluation Metrics
2.5. Chapter Summary
3. Research on EEG-to-fMRI Cross-Modal Generation via Diffusion Models
3.1. Establishment of the EF-Diffusion Model
3.2. FD-UNet Network Design
3.2.1. The 3D-ResNet Module
3.2.2. The Cross-Modal Information Interaction Module
3.3. The EEG Signal Encoder
3.4. Loss Function
3.5. Experimental Results and Analysis
3.5.1. Experimental Parameter Configuration
3.5.2. Dataset Preprocessing
3.5.3. Comparative Experiment
- (1)
- Quantitative Estimation
- (2)
- Qualitative Estimation
3.5.4. Ablation Study
3.6. Chapter Summary
4. Discussion
5. Conclusions and Future Work
5.1. Conclusions
5.2. Future Work
- (1)
- Enhancing Model Efficiency for Practical Deployment: The model’s superior fidelity is attained through a complex architecture—incorporating an iterative denoising process, a volumetric 3D U-Net, and sophisticated cross-modal attention modules—which results in substantial computational costs, including training times of 48 to 72 h on an RTX 3090 GPU and slower inference compared to single-pass models. The primary scalability bottleneck is GPU memory, which constrains the batch size and output resolution. While this represents a conscious compromise favoring reconstruction quality in research settings, it limits practical deployment. Future work will, therefore, prioritize efficiency enhancements via knowledge distillation to transfer the generative capability into a compact network and the exploration of latent-space compression techniques to reduce computational dimensionality, thereby bridging the gap between laboratory-grade performance and real-time application.
- (2)
- Advancing from Static Synthesis to Spatiotemporal Modeling: This study focuses on generating a single fMRI volume from an EEG segment, capturing a static snapshot of brain activity. The logical next step is to model the complete spatiotemporal evolution of brain dynamics. Future efforts will aim to capture state-transition dynamics and spatially heterogeneous activation patterns over time. By integrating self-supervised strategies such as contrastive learning, we will build interpretable representations of dynamic functional networks, ultimately achieving sequential EEG-to-fMRI generation that mirrors the brain’s continuous temporal dynamics.
- (3)
- Improving Data Efficiency and Generalization: To enhance the model’s utility in data-scarce scenarios, such as those involving rare neurological disorders or limited clinical access, we will investigate performance gains under limited-data regimes. This will involve exploring self-supervised pre-training paradigms (e.g., masked autoencoding) and cross-subject transfer learning techniques. The objective is to improve generalization to unseen subjects and pave the way for robust, broad clinical application, ensuring the model’s adaptability across diverse populations and settings.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Li, J.; Hao, Y.; Zhang, W.; Li, X.; Hu, B. Effective Connectivity Based EEG Revealing the Inhibitory Deficits for Distracting Stimuli in Major Depression Disorders. IEEE Trans. Affect. Comput. 2023, 14, 694–705. [Google Scholar] [CrossRef]
- Plimeyer, J.; Huijbers, W.; Lamerichs, R.; Jansen, J.F.A.; Breeuwer, M.; Zinger, S. Functional MRI in Major Depressive Disorder: A Review of Findings, Limitations, and Future Prospects. J. Neuroimaging 2022, 32, 582–595. [Google Scholar] [CrossRef] [PubMed]
- Wirsich, J.; Jorge, J.; Iannotti, G.R.; Shamshiri, E.A.; Grouiller, F.; Abreu, R.; Lazeyras, F.; Giraud, A.-L.; Gruetter, R.; Sadaghiani, S.; et al. The relationship between EEG and fMRI connectomes is reproducible across simultaneous EEG-fMRI studies from 1.5T to 7T. NeuroImage 2021, 231, 117864. [Google Scholar] [CrossRef] [PubMed]
- Portnova, G.V.; Tetereva, A.; Balaev, V.; Atanov, M.; Skiteva, L.; Ushakov, V.; Ivanitsky, A.; Martynova, O. Correlation of BOLD Signal with Linear and Nonlinear Patterns of EEG in Resting State EEG-Informed fMRI. Front. Hum. Neurosci. 2018, 11, 654. [Google Scholar] [CrossRef]
- van Houdt, P.J.; de Munck, J.C.; Leijten, F.S.S.; Huiskamp, G.J.M.; Colon, A.J.; Boon, P.A.J.M.; Ossenblok, P.P.W. EEG-fMRI correlation patterns in the presurgical evaluation of focal epilepsy: A comparison with electrocorticographic data and surgical outcome measures. NeuroImage 2013, 75, 238–248. [Google Scholar] [CrossRef]
- Fellner, M.-C.; Volberg, G.; Mullinger, K.J.; Goldhacker, M.; Wimber, M.; Greenlee, M.W.; Hanslmayr, S. Spurious correlations in simultaneous EEG-fMRI driven by in-scanner movement. NeuroImage 2016, 133, 354–366. [Google Scholar] [CrossRef]
- Ostwald, D.; Porcaro, C.; Bagshaw, A.P. An information theoretic approach to EEG–fMRI integration of visually evoked responses. NeuroImage 2010, 49, 498–516. [Google Scholar] [CrossRef]
- Samadi, S.; Soltanian-Zadeh, H.; Jutten, C. Integrated Analysis of EEG and fMRI Using Sparsity of Spatial Maps. Brain Topogr. 2016, 29, 661–678. [Google Scholar] [CrossRef]
- Kavasidis, I.; Palazzo, S.; Spampinato, C.; Giordano, D.; Shah, M. Brain2Image: Converting Brain Signals into Images. In Proceedings of the 25th ACM International Conference on Multimedia, Mountain View, CA, USA, 23–27 October 2017; pp. 1809–1817. [Google Scholar]
- Fares, A.; Zhong, S.-H.; Jiang, J. EEG-based image classification via a region-level stacked bi-directional deep learning framework. BMC Med. Inform. Decis. Mak. 2019, 19, 268. [Google Scholar] [CrossRef]
- Suchetha, M.; Madhumitha, R.; Sorna Meena, M.; Sruthi, R. Sequential convolutional neural networks for classification of cognitive tasks from EEG signals. Appl. Soft Comput. 2021, 111, 107664. [Google Scholar] [CrossRef]
- Davis, K.M.; De La Torre-Ortiz, C.; Ruotsalo, T. Brain-supervised image editing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 19–24 June 2022; pp. 18480–18489. [Google Scholar]
- Mishra, R.; Sharma, K.; Jha, R.R.; Bhavsar, A. NeuroGAN: Image reconstruction from EEG signals via an attention-based GAN. Neural Comput. Appl. 2023, 35, 9181–9192. [Google Scholar] [CrossRef]
- Yang, D. Generating high-quality images from brain EEG signals. Appl. Comput. Eng. 2024, 47, 52–56. [Google Scholar] [CrossRef]
- Wang, W. Brain network features based on theta-gamma cross-frequency coupling connections in EEG for emotion recognition. Neurosci. Lett. 2021, 761, 136106. [Google Scholar] [CrossRef] [PubMed]
- Eisma, J.; Rawls, E.; Long, S.; Mach, R.; Lamm, C. Frontal midline theta differentiates separate cognitive control strategies while still generalizing the need for cognitive control. Sci. Rep. 2021, 11, 14641. [Google Scholar] [CrossRef]
- Reiser, J.E.; Wascher, E.; Rinkenauer, G.; Arnau, S. Cognitive-motor interference in the wild: Assessing the effects of movement complexity on task switching using mobile EEG. Eur. J. Neurosci. 2021, 54, 8175–8195. [Google Scholar] [CrossRef]
- Liegel, N.; Schneider, D.; Wascher, E.; Arnau, S. Task prioritization modulates alpha, theta and beta EEG dynamics reflecting proactive cognitive control. Sci. Rep. 2022, 12, 15072. [Google Scholar] [CrossRef]
- Aliakbaryhosseinabadi, S.; Lontis, R.; Farina, D.; Mrachacz-Kersting, N. Effect of motor learning with different complexities on EEG spectral distribution and performance improvement. Biomed. Signal Process. Control 2021, 66, 102447. [Google Scholar] [CrossRef]
- Drew, P.J. Vascular and neural basis of the BOLD signal. Curr. Opin. Neurobiol. 2019, 58, 61–69. [Google Scholar] [CrossRef]
- Glover, G.H. Deconvolution of impulse response in event-related BOLD fMRI. Neuroimage 1999, 9, 416–429. [Google Scholar] [CrossRef]
- Deligianni, F.; Carmichael, D.W.; Zhang, G.H.; Clark, C.A.; Clayden, J.D. NODDI and tensor-based microstructural indices as predictors of functional connectivity. PLoS ONE 2016, 11, e0153404. [Google Scholar] [CrossRef]
- Deligianni, F.; Centeno, M.; Carmichael, D.W.; Clayden, J.D. Relating resting-state fMRI and EEG whole-brain connectomes across frequency bands. Front. Neurosci. 2014, 8, 258. [Google Scholar] [CrossRef]
- Calhas, D.; Henriques, R. EEG to fMRI synthesis benefits from attentional graphs of electrode relationships. arXiv 2022, arXiv:2203.03481. [Google Scholar] [CrossRef]
- Lioi, G.; Cury, C.; Perronnet, L.; Mano, M.; Bannier, E.; Lécuyer, A.; Barillot, C. Simultaneous EEG-fMRI during a neurofeedback task, a brain imaging dataset for multimodal data integration. Sci. Data 2020, 7, 173. [Google Scholar] [CrossRef] [PubMed]
- Mercioni, M.A.; Holban, S. The most used activation functions: Classic versus current. In Proceedings of the 2020 International Conference on Development and Application Systems (DAS), Suceava, Romania, 21–23 May 2020; pp. 141–145. [Google Scholar]
- Dubey, S.R.; Singh, S.K.; Chaudhuri, B.B. Activation functions in deep learning: A comprehensive survey and benchmark. Neurocomputing 2022, 503, 92–108. [Google Scholar] [CrossRef]
- Szandala, T. Review and comparison of commonly used activation functions for deep neural networks. In Bio-Inspired Neurocomputing; Springer: Berlin/Heidelberg, Germany, 2020; pp. 203–224. [Google Scholar]
- Azad, R.; Aghdam, E.K.; Rauland, A.; Jia, Y.; Haddadi, A.A.; Bozorgpour, A.; Karimijafarbigloo, S.; Cohen, J.P.; Adeli, E.; Merhof, D. Medical image segmentation review: The success of U-Net. IEEE Trans. Pattern Anal. Mach. Intell. 2024, 1, 1–20. [Google Scholar] [CrossRef]
- Tian, Q.; Miao, W.; Zhang, L.; Yang, Z.; Yu, Y.; Zhao, Y.; Yao, L. STCA: An action recognition network with spatio-temporal convolution and attention. Int. J. Multimed. Inf. Retr. 2025, 14, 1. [Google Scholar] [CrossRef]
- Liu, Q.; Wang, J.; Dai, H.; Ning, L.; Nie, P. Bridge structural damage identification based on parallel multi-head self-attention mechanism and bidirectional long and short-term memory network. Arab. J. Sci. Eng. 2025, 50, 1803–1815. [Google Scholar] [CrossRef]
- Ho, J.; Jain, A.; Abbeel, P. Denoising diffusion probabilistic models. Adv. Neural Inf. Process. Syst. 2020, 33, 6840–6851. [Google Scholar]
- Nichol, A.Q.; Dhariwal, P. Improved denoising diffusion probabilistic models. In Proceedings of the International Conference on Machine Learning, Virtual, 18–24 July 2021; pp. 8162–8171. [Google Scholar]
- Liu, X.; Sajda, P. A convolutional neural network for transcoding simultaneously acquired EEG-fMRI data. In Proceedings of the 2019 9th International IEEE/EMBS Conference on Neural Engineering (NER), San Francisco, CA, USA, 20–23 March 2019; pp. 477–482. [Google Scholar]
- Yang, C.; Westover, M.B.; Sun, J. BIOT: Biosignal transformer for cross-data learning in the wild. Adv. Neural Inf. Process. Syst. 2023, 36, 78240–78260. [Google Scholar]
- Dorjsembe, Z.; Pao, H.-K.; Odonchimed, S.; Xiao, F. Conditional diffusion models for semantic 3D brain MRI synthesis. IEEE J. Biomed. Health Inform. 2024, 28, 4084–4093. [Google Scholar] [CrossRef]
- Roos, K.G.; Fukuda, A.; Cap, Q.H. From brainwaves to brain scans: A robust neural network for EEG-to-fMRI synthesis. arXiv 2025, arXiv:2502.08025. [Google Scholar]
























| Layer | Input Channels | Output Channels | Input Size | Output Size | CIIN Module |
|---|---|---|---|---|---|
| Conv3D | 1 | 32 | 64 × 64 × 32 | 64 × 64 × 32 | × |
| En1 | 32 | 64 | 64 × 64 × 32 | 32 × 32 × 16 | × |
| En2 | 64 | 128 | 32 × 32 × 16 | 16 × 8 × 8 | × |
| En3 | 128 | 256 | 16 × 8 × 8 | 8 × 4 × 4 | ✓ |
| En4 | 256 | 256 | 8 × 4 × 4 | 8 × 4 × 4 | ✓ |
| M | 256 | 256 | 8 × 4 × 4 | 8 × 4 × 4 | ✓ |
| De1 | 256 | 256 | 8 × 4 × 4 | 8 × 4 × 4 | ✓ |
| De2 | 256 | 128 | 8 × 4 × 4 | 16 × 8 × 8 | ✓ |
| De3 | 128 | 64 | 16 × 8 × 8 | 32 × 32 × 16 | × |
| De4 | 64 | 32 | 32 × 32 × 16 | 64 × 64 × 32 | × |
| Conv3D | 32 | 1 | 64 × 64 × 32 | 64 × 64 × 32 | × |
| Method | SSIM | RMSE | PSNR |
|---|---|---|---|
| CNN+ [34] | 0.4783 | 0.5351 | — |
| TAG [24] | 0.4355 | 0.5189 | — |
| BIOT [35] | 0.5838 | 0.1139 | 20.02 |
| CDM-3D [36] | 0.5155 | 0.1325 | — |
| E2fGAN [37] | 0.4994 | — | 18.08 |
| EF-Diffusion | 0.6018 | 0.1025 | 20.29 |
| Method | SSIM | RMSE | PSNR |
|---|---|---|---|
| CNN+ [34] | 0.4488 | 0.4594 | — |
| TAG [24] | 0.4724 | 0.4121 | — |
| BIOT [35] | 0.4247 | 0.1379 | 17.21 |
| CDM-3D [36] | 0.4380 | 0.1008 | — |
| E2fGAN [37] | 0.5760 | — | 18.53 |
| EF-Diffusion | 0.4801 | 0.1302 | 19.70 |
| Method | SSIM | RMSE | PSNR |
|---|---|---|---|
| Baseline | 0.5495 | 0.1076 | 20.22 |
| Baseline + EPG | 0.5524 | 0.1066 | 20.26 |
| Baseline + CIIM + EPG (EF-Diffusion) | 0.6018 | 0.1025 | 20.29 |
| Method | SSIM | RMSE | PSNR |
|---|---|---|---|
| Baseline | 0.3106 | 0.1466 | 19.15 |
| Baseline + EPG | 0.3342 | 0.1316 | 19.44 |
| Baseline + CIIM + EPG (EF-Diffusion) | 0.4806 | 0.1302 | 19.70 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sun, X.; Sun, Y.; Chen, J.; Su, B.; Nie, T.; Shui, K. Research on fMRI Image Generation from EEG Signals Based on Diffusion Models. Electronics 2025, 14, 4432. https://doi.org/10.3390/electronics14224432
Sun X, Sun Y, Chen J, Su B, Nie T, Shui K. Research on fMRI Image Generation from EEG Signals Based on Diffusion Models. Electronics. 2025; 14(22):4432. https://doi.org/10.3390/electronics14224432
Chicago/Turabian StyleSun, Xiaoming, Yutong Sun, Junxia Chen, Bochao Su, Tuo Nie, and Ke Shui. 2025. "Research on fMRI Image Generation from EEG Signals Based on Diffusion Models" Electronics 14, no. 22: 4432. https://doi.org/10.3390/electronics14224432
APA StyleSun, X., Sun, Y., Chen, J., Su, B., Nie, T., & Shui, K. (2025). Research on fMRI Image Generation from EEG Signals Based on Diffusion Models. Electronics, 14(22), 4432. https://doi.org/10.3390/electronics14224432

