Back to all papers

PyDecNef: An open-source framework for fMRI-based decoded neurofeedback

November 20, 2025biorxiv logopreprint

Authors

Margolles, P.,Abdennour, N.,Mei, N.,Elosegi, P.,Soto, D.

Affiliations (1)

  • Basque Center on Cognition, Brain and Language

Abstract

Real time fMRI research has suffered from inaccessible analysis pipelines, hindering collaboration and reproducibility. Here we present PyDecNef, a Python-based platform designed to advance real-time fMRI analysis and fuel exploration of close-loop neuroimaging for cognitive neuroscience studies. Creating a real-time fMRI analysis pipeline from scratch poses formidable technical challenges, involving data transfer, experimental software, and machine learning classifier preparation. Existing tools like FRIEND, Brain-Voyant, and OpenNFT demand expensive licenses or rely on proprietary software, impeding accessibility and customizability. PyDecNef offers a solution: a transparent, versatile, and open workflow for real-time fMRI decoding protocols. This open-source platform simplifies decoder construction, real-time preprocessing, decoding, and feedback signal generation. It empowers researchers to launch DecNef experiments efficiently, saving time and resources. Moreover, its openness promotes collaboration, enhancing research quality, replicability, and impact. With PyDecNef, the path to advancing DecNef studies becomes more accessible and collaborative. PyDecNef resources for real-time fMRI analysis can be found at https://pedromargolles.github.io/pyDecNef/. Here we also provide experimental data illustrating that PyDecNef provides more fine-grained and less binomial/overconfident neurofeedback signals compared to previous DecNef approaches that have relied on sparse multinomial logistic regression classifiers, and hence, potentially helping participants to learn better how to self-regulate their brain activity.

Topics

neuroscience

Ready to Sharpen Your Edge?

Join hundreds of your peers who rely on RadAI Slice. Get the essential weekly briefing that empowers you to navigate the future of radiology.

We respect your privacy. Unsubscribe at any time.