Online MicroStimulation Optimization (OMiSO)
- Online MicroStimulation Optimization (OMiSO) is a brain stimulation framework that leverages pre-stimulation states and adaptive refinement to guide neural activity toward target latent states.
- It employs a state-dependent forward model and an inverse policy trained via behavioral cloning to optimally select electrode patterns in real time.
- Experimental results show that OMiSO achieves lower latent-state error compared to static methods, advancing precision in closed-loop neuromodulation.
Online MicroStimulation Optimization (OMiSO) is a brain stimulation framework designed to use pre-stimulation neural population activity and ongoing response observations to select stimulation parameters that drive neural population activity toward specified latent target states. It was introduced for intracortical electrical microstimulation in a monkey and is formulated around two linked advances: it leverages the pre-stimulation brain state to choose optimal stimulation parameters, and it adaptively refines those parameters by considering newly observed stimulation responses (Minai et al., 10 Jul 2025). In the reported experiments, OMiSO achieved greater accuracy in steering latent population activity than competing methods that do not incorporate these advances, positioning it within the broader class of closed-loop neuromodulation methods that use online measurements to guide stimulation (Minai et al., 10 Jul 2025).
1. Formal problem definition
OMiSO is posed in terms of latent neural population dynamics. Let denote the number of recorded electrodes and the dimensionality of the latent manifold. On each trial , pre-stimulation spike counts are collected over consecutive time bins, with the summary giving the example bins of each. A factor-analysis model projects these counts into an -dimensional latent vector according to
with 0, 1, and diagonal 2 (Minai et al., 10 Jul 2025).
The stimulation parameters on trial 3 are represented by choosing 4 electrodes from a set of 5 candidates, where 6 for a full 7 array. This choice is encoded either as a binary vector 8 or equivalently as a grid 9. After stimulation, the post-stimulation latent state 0 is measured 1 after stimulation offset and projected into the same latent space:
2
The experimenter specifies a target latent state 3 with 4, and the goal is to choose 5 so that the evoked post-stimulation state on the 6 target dimensions matches 7 (Minai et al., 10 Jul 2025).
The formulation uses truncated pre- and post-states on the target dimensions, denoted 8 and 9. The optimization objective is to find 0 that minimizes a deviation 1. In the online reinforcement step, the per-trial “advantage” is defined with an 2 norm:
3
This choice makes target-state error the explicit scalar quantity driving policy refinement (Minai et al., 10 Jul 2025).
A plausible implication is that OMiSO treats microstimulation design as a state-conditioned control problem in a learned latent manifold rather than as a fixed mapping from stimulation pattern to response.
2. Latent-state construction and state dependence
A central component of OMiSO is the construction of a common latent space across sessions. Factor analysis identifies session-specific 4, 5, and 6 on no-stimulation trials. These session-specific loadings are then aligned to a reference loading matrix 7 by Procrustes alignment through orthogonal matrices 8 minimizing 9. The result is a common latent space in which both 0 and 1 are represented (Minai et al., 10 Jul 2025).
Within that aligned latent space, OMiSO defines a stimulation-response forward model 2. The inputs are the truncated pre-stimulation state 3 and the stimulation pattern 4; the output is a predicted post-stimulation latent state 5. The forward model is implemented as a convolutional network over 6 plus an MLP or LSTM over 7, as described in Supplementary Figure S3. Training minimizes the mean-squared error
8
using AdamW with learning rate 9, weight decay 0, 20 epochs, and 5-fold cross-validation (Minai et al., 10 Jul 2025).
The experimental evidence summarized for Figure 2B indicates that adding pre-stimulation state to the forward model reduced MSE significantly relative to a “pattern only” model, using a one-tailed 1-test with 2 (Minai et al., 10 Jul 2025). This establishes state dependence as an empirical property of the measured stimulation responses, rather than merely an architectural assumption.
The reported hyperparameter summary further specifies 3 factor-analysis dimensions, chosen by cross-validated likelihood, and 4 target dimensions, with 5 (Minai et al., 10 Jul 2025). These values define the low-dimensional control space in which OMiSO evaluates success.
3. Inverse mapping through behavioral cloning
OMiSO does not select stimulation patterns by directly solving an online combinatorial inverse problem from scratch on every trial. Instead, it trains an inverse policy 6 that maps 7 to continuous suitabilities 8. The role of 9 is to propose which candidate electrodes are most suitable for stimulation, conditional on the observed pre-stimulation latent activity and the desired target state (Minai et al., 10 Jul 2025).
The inverse policy is trained using Behavioral Cloning (BC). Expert data
0
are generated by sampling a pre-state and a random stimulation vector 1, then computing 2 through the forward model. The policy 3 is implemented as an MLP and optimized with binary cross-entropy loss:
4
The reported BC hyperparameters are batch size 5, maximum epochs 6, and early stopping on 20 validation failures every 100 epochs (Minai et al., 10 Jul 2025).
The inversion analysis reported for Figure 3B states that BC inversion error, measured as 7 error in the 2-D latent target space, saturated near 8, while trial-to-trial variability was approximately 9 (Minai et al., 10 Jul 2025). This indicates that the inverse model’s residual error was small relative to observed response variability. A plausible implication is that most of the remaining online difficulty lies in stochasticity or nonstationarity of neural responses, not in amortized inversion alone.
The framework therefore separates two estimation problems: first, learning a state-dependent forward map from stimulation to latent response; second, amortizing its inversion into a policy that can be queried in real time.
4. Online trial selection and adaptive refinement
On each trial, OMiSO combines the inverse policy with an 0-greedy exploration scheme. Given observed 1 and target 2, the algorithm first computes 3. It then converts these suitabilities into softmax probabilities
4
With probability 5, OMiSO picks the top 6 electrodes by 7; with probability 8, it samples 9 electrodes according to the softmax probabilities. The exploration parameter decays according to
0
with 1, 2, and 3–4 (Minai et al., 10 Jul 2025).
After stimulation, the framework observes 5 and stores the tuple 6. Every 7 trials, it updates the policy parameters 8 using Proximal Policy Optimization (PPO). The PPO objective is written as
9
0
The clip parameter is chosen from 1, the baseline 2 from 3, the PPO learning rate from 4, and weight decay is 5 (Minai et al., 10 Jul 2025).
The online algorithm can therefore be summarized as a sequence of policy inference, stochastic action selection, stimulation delivery, latent-state observation, and periodic PPO updates. The summary’s narrative workflow states the sequence explicitly: pool no-stim trials across sessions, perform factor analysis and latent alignment, collect random microstimulation trials to train 6, generate expert data and train 7 by BC, then run the closed-loop experiment with 8-greedy selection and PPO updates every 5 trials until session end (Minai et al., 10 Jul 2025).
This suggests that OMiSO is neither purely model-based nor purely model-free. Its initial policy is learned by supervised inversion of a forward model, while its online refinement uses reinforcement learning against actual stimulation outcomes.
5. Experimental configuration and reported performance
The reported experimental configuration used 9 candidate electrodes, selected 00 for stimulation on each trial, and therefore operated over a total of 01 possible patterns. The stimulation amplitude was 02, frequency 03, and duration 04 (Minai et al., 10 Jul 2025). These values define the discrete action space and fixed pulse parameters under which electrode subset selection was optimized.
Several benchmark comparisons were reported. In Figure 3D, a static method with pre-stimulation information slightly outperformed a static method without pre-stimulation information, but the difference was not significant under a Wilcoxon test with 05 (Minai et al., 10 Jul 2025). This result is consistent with the broader claim that state information is useful, while also indicating that state dependence alone was not sufficient to yield a significant advantage in that specific static comparison.
The principal comparison is reported in Figure 4E. Across 14 test sessions, OMiSO’s mean 06 error to 07 in 2-D latent space was significantly smaller than both Static with pre-stim (08) and MiSO (09), using Wilcoxon signed-rank tests (Minai et al., 10 Jul 2025). The paper summary therefore attributes OMiSO’s performance gain to the combination of state-dependent parameter selection and adaptive online refinement, rather than to either component in isolation.
The same summary concludes that OMiSO provides greater accuracy in achieving specified activity states and thereby advances neuromodulation technologies for understanding the brain and for treating brain disorders (Minai et al., 10 Jul 2025). Within the experimental scope reported, the documented evidence is specifically accuracy improvement in latent-state steering under intracortical electrical microstimulation in a monkey.
| Component | Reported setting | Purpose |
|---|---|---|
| FA latent dimensionality | 10 | Latent manifold |
| Target dimensionality | 11 | Controlled target subspace |
| Candidate electrodes | 12 | Discrete stimulation pool |
| Stimulated electrodes | 13 | Per-trial pattern size |
| Total patterns | 14 | Action-space size |
| Amplitude | 15 | Stimulation intensity |
| Frequency | 16 | Pulse train frequency |
| Duration | 17 | Stimulation duration |
| PPO update interval | Every 5 trials | Online adaptation |
6. Relation to neighboring closed-loop stimulation paradigms
OMiSO belongs to a broader methodological landscape in which stimulation is selected on the basis of ongoing measurements and updated online. Closed-loop brain stimulation has been described as a process that captures neurophysiological measures, quickly identifies neural events of interest, and produces auditory, magnetic, or electrical stimulation so as to interact with brain processes precisely (Valenchon et al., 2021). In that general sense, OMiSO instantiates a closed-loop architecture centered on latent neural population state rather than event detection.
Several neighboring research programs illuminate the design space around OMiSO. Real-time systems such as the Portiloop emphasize embedded detection, timing, and hardware constraints for stimulation targeting of specific oscillations (Valenchon et al., 2021). Bayesian-optimization approaches in auditory BCIs and real-time fMRI-guided tACS frame stimulation tuning as optimization of a noisy black-box objective under limited evaluation budgets, with Gaussian-process surrogates and exploration-exploitation control (Sosulski et al., 2021, Lorenz et al., 2016). Human-in-the-loop optimization for visual prostheses combines a learned forward model, deep inverse encoding, and preference-based Bayesian optimization to personalize stimulus encoders under binary feedback (Granley et al., 2023). Active learning in two-photon holographic optogenetics focuses on choosing perturbations that most efficiently identify neural population dynamics and reports up to a two-fold reduction in required data in some settings (Wagenmaker et al., 2024).
These neighboring frameworks differ in modality, objective, and optimization formalism, but they share structural themes with OMiSO: online adaptation, explicit treatment of uncertainty or variability, and the use of reduced representations to make high-dimensional stimulation control tractable. A plausible implication is that OMiSO can be situated at the intersection of latent-state control, inverse modeling, and adaptive experimental design.
7. Interpretation, scope, and common points of confusion
A common misunderstanding would be to regard OMiSO as a generic optimization method over stimulation parameters without regard to neural state. The defining feature of the framework is precisely that pre-stimulation activity is part of the decision variable through 18 and the state-dependent forward model 19 (Minai et al., 10 Jul 2025). Another possible misunderstanding is to treat OMiSO as a purely reinforcement-learning method. In fact, the policy initialization relies on Behavioral Cloning from synthetic expert data generated by the learned forward model, and PPO enters as a periodic adaptive refinement step rather than as the sole learning mechanism (Minai et al., 10 Jul 2025).
It is also important not to overstate the empirical evidence. The reported results establish significant reductions in target-state error relative to Static with pre-stim and MiSO across 14 test sessions, but the summary does not report broader clinical outcomes, long-term stability, or transfer across species, tasks, or stimulation modalities (Minai et al., 10 Jul 2025). Similarly, although the abstract notes scientific and clinical potential for manipulating coordinated neural population activity, the demonstrated experiment is specifically intracortical electrical microstimulation in a monkey (Minai et al., 10 Jul 2025).
The framework’s conceptual significance lies in the explicit claim that the state of the brain affects how neural populations respond to incoming sensory stimuli, and therefore taking into account pre-stimulation neural population activity may be crucial to achieve a desired causal manipulation using stimulation (Minai et al., 10 Jul 2025). OMiSO operationalizes that claim in a concrete workflow: aligned latent-state estimation, state-dependent forward prediction, inverse policy learning, stochastic online trial selection, and continual policy improvement. Within the evidence summarized for the paper, this combination is what distinguishes OMiSO from methods that ignore state dependence or remain static (Minai et al., 10 Jul 2025).