Reinforcement Learning via Brain Feedback for real-time fMRI-based adaptive stimulus generation
Giuseppe GallittoiD, Robert EnglertiD, Bálint KincsesiD, Raviteja KotikalapudiiD, Jialin LiiD, Kevin HoffschlagiD, Sulin AliiD, Ulrike BingeliD, Tamás SpisákiD
Abstract
Traditional fMRI studies rely on predefined task paradigms, where fixed stimulus designs limit the flexibility with which brain-stimulus relationships can be explored. Here, we introduce Reinforcement Learning via Brain Feedback (RLBF), a framework and open-source software package for adaptive stimulus optimization using real-time fMRI. RLBF reverses the conventional direction of inference by using neural responses to guide the exploration of stimulus spaces through reinforcement learning, enabling optimization of predefined brain targets such as regional activity or multivariate neural signatures. The accompanying Python-based software provides a modular framework integrating real-time fMRI data processing, reinforcement learning agents, adaptive stimulus generation, simulation-based testing, and experiment monitoring. Its flexible architecture allows researchers to customize preprocessing pipelines, reward functions, stimulus spaces, and RL strategies for diverse closed-loop neuroimaging applications. We validate the framework in a proof-of-concept study (N=10), demonstrating real-time optimization of a simple visual stimulus space by adapting checkerboard contrast and frequency to maximize primary visual cortex (V1) responses within a single 10-minute fMRI session. RLBF provides an extensible foundation for brain-guided stimulus optimization and enables new approaches for investigating neural specificity, individualized brain-stimulus relationships, and adaptive experimental design.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 0
- Organism
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- AutoNeuro: An Open-Source fMRI Toolbox for Real-Time Neuroadaptive Task Design
Oliver Sherwood, David Haydock, … Robert Leech·bioRxiv·Apr 23, 2026
- Adaptive Bayesian Optimization for State-Dependent Brain Stimulation
Sina Dabiri, Eric R. Cole, Robert E. Gross·International IEEE/EMBS Conference on Neural EngineeringPeer-reviewed·Apr 24, 2023
- Refining Brain Stimulation Therapies: An Active Learning Approach to Personalization
Mohammad S.E. Sendi, Eric R. Cole, … Vince D. Calhoun·bioRxiv·Sep 2, 2024
- CLEAR-FORCE: A reservoir computing framework for closed-loop brain stimulation
Athena Moreno-Gris, Camille Godin, Jean‐Philippe Thivierge·bioRxiv·Oct 12, 2026
- Simultaneous fMRI and eye gaze recordings during prolonged natural stimulation -- a studyforrest extension
Michael Hanke, Nico Adelhöfer, … Jörg Stadler·bioRxiv·Mar 31, 2016
- Identifying the neural representation of fast and slow states in force field adaptation via fMRI
A. J. Farrens, F. Sergi·bioRxiv·Mar 20, 2019