State-Dependent Stimulation for Seizure Termination in a Morris-Lecar Network: A Reinforcement Learning Approach
The efficacy of neurostimulation for seizure termination depends not only on the stimulus itself but also on the dynamical state of the epileptic network. Here, we develop a dynamical-systems-informed reinforcement-learning framework that learns when to deliver a predefined pulse to terminate seizure-like activity. We simulate a sparsely connected network of 100 extended three-dimensional Morris-Lecar neurons. Bifurcation analysis of the single-neuron model identifies bistable regimes and provides a mechanistic basis for considering transitions between resting and oscillatory activity. The learning agent uses semi-gradient Q-learning with tile coding and receives a two-dimensional time-delay embedding of either the population-averaged membrane potential or a derivative-based proxy for extracellular potential. It learns a state-dependent policy that selects between stimulation and no stimulation, without modifying the pulse waveform. Across 30 independently generated test networks, both learned policies markedly reduced median seizure duration compared with trigger-only and state-independent stimulation controls. The two learned policies performed comparably, indicating that the estimated extracellular potential proxy retained sufficient dynamical information for control in this model. These results provide a proof of concept that combining dynamical-systems-based state reconstruction with online reinforcement learning can identify effective stimulation timing for terminating seizure-like activity.