Predicting Neural Responses with the Generalized Activating Function

by IT’IS Foundation


The Computational Bottleneck

In a typical computational SCS workflow, the finite element method is used to compute electromagnetic fields in a patient-specific volume conductor model. The resulting extracellular potential is then coupled with dynamic neural models, primarily large-diameter, myelinated dorsal column and dorsal root afferents. Complex multi-compartment cable models such as the MRG model capture the relevant biophysics with high fidelity but at substantial computational cost: NEURON simulations of full recruitment maps for a single patient routinely require hours to days on capable workstations.

The classical Activating Function (AF) introduced by Rattay offers a fast alternative but ignores pulse shape, transient membrane dynamics, axial diffusion, leakage currents, and activation at fiber terminals. In clinically relevant settings, these limitations matter: AF-based threshold predictions correlate poorly with NEURON results (R² = 0.14) and can suggest suboptimal lead placements.

Sim4Life V9.6 extends the fast GAF predictor to clinically realistic MRG axons and adds automated recruitment-curve analysis, turning a patient-specific spinal cord stimulation model into an optimization-ready workflow: from image-based field simulation through fast, accurate fiber recruitment to multipolar optimization for selective stimulation.


The Generalized Activating Function

The GAF extends the classical AF by convolving the extracellular potential with a Green’s function kernel derived from the linearized cable equation. This kernel captures the spatiotemporal dynamics of subthreshold membrane polarization — including axial current spread, membrane leakage, and pulse-shape effects —  up to the point of spike initiation. The convolution is evaluated efficiently in the Fourier domain using a fast Fourier transform and, for many practically relevant pulse waveforms, can be performed analytically.

The initial GAF formulation was applicable to unmyelinated and simple myelinated fiber models. V9.6 extends the GAF to double-cable myelinated models such as the MRG model and its sensory variant, i.e., the biophysically detailed models required for clinically relevant treatment planning. Boundary condition handling for both physical fiber termination and computational domain truncation is built in, addressing known sources of artifacts in low-frequency exposure safety assessment.

The GAF preserves the linear superposition with respect to the extracellular field: membrane polarization for any multipolar stimulation configuration can be computed as a weighted sum of per-contact responses, without the need to re-simulate each new configuration. Importantly, the GAF remains firmly grounded in biophysics and does not rely on machine learning, facilitating extrapolation to novel treatment paradigms and innovative stimulation methods.

The GAF's subthreshold dynamics are linear in the applied field, so the combined response to electrodes A and B (AB) equals the sum of their individual responses (A + B); in NEURON, AB and A + B diverge once spikes fire. With the GAF, any multipolar configuration is therefore a weighted sum of precomputed per-contact responses, avoiding the need for re-simulation.


Verification: Anatomically Detailed Spine Model

GAF accuracy was verified in a patient-specific lumbosacral spine model with 700 myelinated, double-cable axons spanning a realistic range of fiber diameters and trajectories (model courtesy of Rowald et al., 2022).

The patient-specific lumbosacral model used for verification: vertebral anatomy (left), spinal cord and dorsal rootlets with the 16-contact paddle lead (center), and the resulting stimulation field (right). The rootlets are functionalized with a heterogeneous population of detailed double-cable fibers spanning a range of biologically realistic diameters and trajectories. The model derives from Rowald et al. (2022), where it was used to plan stimulation that restored walking in individuals with motor-complete paralysis.


Across all 16 paddle-lead contacts, eight pulse widths, and the full fiber population:
  • GAF-derived thresholds agreed with NEURON-derived thresholds at R² = 0.99, compared with R² = 0.14 for the classical AF,
  • Spike-initiation locations were predicted at R² = 0.98, including terminal activation cases that the classical AF systematically misses,
  • Spike-initiation timings were reproduced at R² = 0.91.


GAF versus NEURON across all fibers, contacts, and pulse widths: spike-initiation times (left), activation thresholds (center), and spike-initiation locations (right). Thresholds predicted by the “classical” AF are also shown as insets, highlighting the large improvement in accuracy achieved by the GAF.


These results establish that accurately resolved subthreshold membrane dynamics are sufficient to predict activation thresholds and the location and timing of spike initiation across clinically realistic conditions.

Validation: Reproducing a Clinical SCS Planning Pipeline

The GAF was applied to reproduce the pre-operative SCS planning workflow of Rowald et al., 2022. In the original study, patient-specific NEURON simulations, validated against intra-operative electromyography, screened six candidate lead positions for lower-limb motor function restoration.

The GAF reproduced the recruitment curves, root-level activation patterns, and the relationship between paddle craniocaudal position and functional movement selectivity. The full 16-electrode recruitment map, which took over 24 hours with NEURON, completed in under 10 minutes with the GAF while preserving the planning-relevant fidelity of the original workflow.

Validation against the Rowald et al. (2022) planning workflow: recruitment curves per lumbosacral root (left), and functional selectivity across the six candidate lead positions (right). The GAF closely tracks NEURON on recruitment and selectivity and recommends the same lead placement as the full multi-compartment model, whereas the classical AF diverges.


Extension: Multipolar and Pulse-Shape Optimization

The GAF’s combination of speed, accuracy, and linearity enables systematic exploration of parameter spaces inaccessible to multi-compartment models.

Gradient-based optimization in PyTorch, with regularization for sparsity and current balance, was used to identify multipolar configurations across all 16 paddle contacts. The procedure runs in 10–30 seconds on a consumer-grade GPU and produced a configuration that raises the functional selectivity index for right hip flexion from 52% (best single-electrode baseline) to 82% — a level close to the theoretical optimum.

A complementary multi-objective genetic-algorithm optimization was used to explore the pulse-waveform design space, parameterized as 20 consecutive 20-µs amplitude segments over a 400-µs pulse window, to identify Pareto-optimal trade-offs between recruitment efficacy and energy efficiency. The resulting Pareto front contains waveforms with substantially better activation–energy trade-offs than the typical clinical biphasic pulse, with potential implications for implantable device battery life and tissue exposure.

Large-scale parameter space search enabled by the GAF's speed. Multipolar optimization raises the functional selectivity index for right hip flexion to 82% with few active contacts (left; optimized current pattern, center), while a pulse-waveform search finds Pareto-optimal shapes that beat the standard clinical pulse on the trade-off between activation and energy consumption (right).



Study Outcome

The study establishes that fast, accurate, biophysics-grounded threshold prediction is no longer a contradiction in terms. It verifies the GAF against the multi-compartment gold standard, validates it in a published clinical workflow, and extends it to optimizations that were previously intractable. By removing the principal computational bottleneck in patient-specific neuromodulation modeling, the GAF moves model-driven optimization from a research exercise toward a practical workflow for clinically relevant treatment planning.