Abstract: Miniaturized electrical stimulation (ES) implants show great promise in practice, but their real-time control by means of biophysical mechanistic algorithms is not feasible due to computational complexity. Here, we study the feasibility of more computationally efficient machine learning methods to control ES implants. For this, we estimate the normalized twitch force of the stimulated extensor digitorum longus muscle on n = 11 Wistar rats with intra- and cross-subject calibration. After 2000 training stimulations, we reach a mean absolute error of 0.03 in an intra-subject setting and 0.2 in a cross-subject setting with a random forest regressor. To the best of our knowledge, this work is the first experiment showing the feasibility of AI to simulate complex ES mechanistic models. However, the results of cross-subject training motivate more research on error reduction methods for this setting.
Introduction
The field of neuromodulation is shifting from bulky, lead-based implants toward miniaturized, wireless "electroceuticals"—devices the size of a grain of sand designed for direct placement on target nerves. A critical requirement for these autonomous implants is closed-loop control, where the device adjusts stimulation parameters in response to physiological feedback. However, the standard biophysical mechanistic models used for such control are too computationally intensive for the ultra-low-power microchips used in miniaturized hardware. This study explores whether lightweight Machine Learning (ML) algorithms can serve as efficient surrogates for these complex models.
Methodology
The researchers performed terminal electrophysiological experiments on 11 anaesthetized Wistar rats. The common peroneal nerve (CPN) was stimulated using various pulse parameters, and the resulting isometric twitch force of the extensor digitorum longus (EDL) muscle was recorded as the feedback signal.
The study evaluated 11 input variables ($x_0$ to $x_{10}$), including pulse amplitude, phase duration, and electrode configuration, to predict the normalized twitch force ($y$). Two primary ML architectures were compared: Random Forest (RF) regressors and Multi-layer Perceptrons (MLP). These were tested under two paradigms:
- Intra-subject: Calibration using data from the specific individual.
- Cross-subject: A generalized model trained on a group and tested on a new subject.
Results and Discussion
The Random Forest model consistently outperformed the MLP in both accuracy and computational efficiency. In the intra-subject setting, the RF achieved a Mean Absolute Error (MAE) of 0.03 ± 0.01 after 2000 stimulations. In contrast, the cross-subject performance was lower (MAE 0.20 ± 0.04), indicating that while a global model provides a baseline, individual biological variability necessitates a short calibration phase.
As shown in Figure 6, the RF model converged faster than the MLP, reaching peak performance after approximately 1000 stimulations. Furthermore, the RF model's runtime was roughly 45% of the MLP's, making it a superior candidate for power-constrained implantable environments. Both models identified phase amplitude and duration as the most critical features, suggesting they successfully captured the underlying physiological principles of nerve recruitment.
Conclusion and Future Work
This study demonstrates the feasibility of using Random Forest regressors for the real-time control of miniaturized ES implants. While the results are promising, several challenges remain for clinical translation. Future research must address the use of noisier Electroneurogram (ENG) signals for feedback instead of muscle force and incorporate temporal dynamics, such as muscle fatigue or nerve sensitization, which were not accounted for in this static pulse-response model. Additionally, improving "zero-shot" or cross-subject learning will be vital for applications where extensive calibration is not medically feasible.
Summary updated