Abstract
Training biophysically realistic neural networks has long been a challenge because standard backpropagation (BP) fails when faced with the "stiff," explosive dynamics of biological spikes. This paper demonstrates that Evolutionary Strategies (ES)—a gradient-estimation technique that treats the network as a black box—can successfully train these complex models where backprop diverges. ES offers a memory-efficient and robust alternative for computational neuroscience and Neural ODEs, bypassing the issues of gradient explosions and numerical irreversibility.
Introduction
In modern machine learning, backpropagation is the ubiquitous engine of optimization. However, in computational neuroscience, the goal is often to simulate "biophysical" neurons—models like Hodgkin-Huxley that use differential equations to mimic real ion channels and electrical spikes. These models are notoriously "stiff" and nonlinear, presenting three primary obstacles for gradient-based training:
- Gradient Explosions: The rapid "jump" of a neural spike creates near-infinite derivatives, causing gradients to blow up.
- Numerical Irreversibility: Efficient BP methods for ODEs often require "reversing" time to calculate gradients. For biological models, small numerical errors in reverse-time simulation grow exponentially, rendering the calculated gradients useless.
- Memory Bloat: Standard Backpropagation Through Time (BPTT) requires storing every intermediate state. For simulations lasting thousands of timesteps, this quickly exceeds GPU memory limits.
Methods: Evolutionary Strategies
To address these challenges, we propose using Evolutionary Strategies (ES), specifically a score function estimator approach. Unlike BP, which calculates an exact gradient by differentiating through every operation, ES treats the model as a black box.
The ES process involves three main steps:
- Perturbing: The current model parameters are perturbed with random noise to create a population of "noisy" network versions.
- Evaluating: A forward pass is executed for all versions to evaluate their performance.
- Estimating: Using the "log-trick" (a Monte Carlo gradient estimation), the algorithm identifies the direction in parameter space that improves the "smoothed" average loss.
Because ES only requires the forward pass, it never needs to differentiate through a spike or reverse an ODE. This naturally "smooths" a jagged, noisy loss landscape into a navigable surface.
Experimental Setup
The approach was evaluated on four distinct benchmarks:
- Single-Neuron "Turn-Off" Task: A Morris–Lecar neuron must learn to stop spiking by adjusting its input current.
- Discrete Evidence Integration: A recurrent network of Morris–Lecar neurons accumulates noisy inputs to make a decision, mimicking classic working memory tasks.
- Cubic Oscillator: A non-stiff Neural ODE benchmark used to test scaling in over-parameterized regimes.
- ROBER Problem: A classic "stiff" chemical reaction ODE that is notoriously difficult for standard gradient methods.
Key Results
The experiments revealed several advantages of ES over traditional BP:
- Robustness to Explosive Dynamics: In the evidence integration task, BP failed to converge when neuron parameters produced sharp spikes. In contrast, ES maintained stable convergence, reaching over 95% accuracy.
- Memory Efficiency: For a 1-second simulation, BP required over 25 GB of RAM. ES operated with a tiny, constant memory footprint regardless of simulation length.
- Superior Scaling: On the cubic oscillator task, ES outperformed BP as the number of parameters increased, suggesting better global exploration in high-dimensional spaces.
- Solving Stiff ODEs: ES successfully trained networks to approximate the ROBER stiff ODE, where direct BP often becomes unstable due to massive disparities in timescales.
Discussion and Limitations
The primary drawback of ES is sample efficiency. While BP provides a precise gradient from a single pass, ES requires many "noisy" trials (typically $S=100$) to obtain a reliable estimate. This makes the method highly parallelizable but computationally intensive without significant hardware resources.
Future work includes combining ES with biologically plausible local learning rules and testing on heterogeneous networks with diverse neuron types. Furthermore, because ES is agnostic to the underlying code, it could be used to train models within specialized simulators like NEURON or Brian2 that lack native autodiff support.
Summary updated