Reinforcement Learning via Brain Feedback for real-time fMRI-based adaptive stimulus generation

Read the full article See related articles

Listed in

This article is not in any list yet, why not save it to one of your lists.
Log in to save this article

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.

Article activity feed