Source-linked AI summary
Conditional Flow Matching for Single-Neuron Electrophysiology: Capturing Multimodal Responses Across Stimuli
Cameron Schofield, Luca Ghafourpour, Philip H. Wong, Costas A. Anastassiou, Richard E. Turner
TL;DR
Repeated stimuli can elicit different voltage responses, while detailed-model ensembles are costly and many machine-learning surrogates produce a single response per stimulus. This paper learns a conditional flow-matching model of voltage given current. On two human interneuron types, it reproduces response statistics and captures multimodal responses near threshold and depolarization block.
Problem
Repeated inputs can produce different spike timing, firing rates, and burstiness, while hall-of-fame ensembles are costly and deterministic surrogates produce a single voltage response per stimulus.
Source: §1 · p. 1Method
The model uses flow matching with a velocity field conditioned on the time-aligned input current to learn p(V|I) directly.
Source: Contributions · p. 2, §1 · p. 2Results
Generated responses reproduce electrophysiological feature distributions, spike-time structure, and F-I relationships, while recovering both coexisting response modes near firing threshold and low- and high-firing modes near depolarization block.
Source: Contributions · p. 2, §4.3 · p. 8Takeaways & Limitations
Conditional generative surrogates are a promising route toward large-scale circuit modeling where biophysically detailed simulations become prohibitively expensive.
Source: §5 · p. 10
Abstract
from arXiv · showhide
Neurons of the brain exhibit a rich repertoire of electrophysiology dynamics with the same repeated stimulus eliciting very different voltage responses from the same cell. One common approach in biophysically detailed models is to capture this variability through ensembles of deterministic parametrizations, at a cost of hundreds of thousands of CPU hours. Existing machine learning surrogates inherit the same limitation, where a stimulus is mapped to a single voltage response. We address this challenge by learning a conditional generative model for single-neuron electrophysiology, using flow matching with a velocity field conditioned on the input current. On biophysically detailed models of two human cortical interneuron types, the generated responses closely reproduce the electrophysiological feature distributions, spike-time structure, and excitability profiles, even matching the experimental recordings from the corresponding human cortical neurons. Near the firing threshold, firing and non-firing responses coexist at the same stimulus amplitude, and at high amplitudes, ensembles may split into low- and high-firing modes near depolarization block. We show that our model recovers both modes in each case, while a neural operator baseline suppresses spiking near threshold and blurs the gap between modes at depolarization block.
1. Introduction
Single-neuron responses vary across repeated trials, but detailed-model ensembles are costly and deterministic surrogates return one response per stimulus. The paper learns a conditional generative model and evaluates its ability to capture response variability across human interneuron types and stimulus protocols.
1. Introduction
- The same input can produce different spike timing, firing rates, and burstiness, making faithful variability important for bio-realistic circuit modeling.Human cell types also differ in transcriptomic, morphological, and electrophysiological identity.Source: §1 · p. 1
- Hall-of-fame ensembles capture variability through deterministic parametrizations, require hundreds of thousands of CPU hours, and do not represent genuine trial-to-trial variability.Stochastic mechanistic models instead require assumptions about noise and repeated numerical integration.Source: §1 · p. 1
Contributions
- The model learns p(V|I) directly using flow matching conditioned on the time-aligned current, targeting response variability rather than an intermediate model representation.Different source-noise samples produce different voltage trajectories for the same stimulus.Source: Contributions · p. 2, §1 · p. 2
- Near firing threshold, the model reproduces coexisting firing and non-firing responses, while NOBLE suppresses spiking and shifts the apparent threshold toward higher currents.Figure 1 compares generated traces, PDE simulations, spike-triggered voltage averages, and F-I curves; its summaries include experimental recordings.Source: Contributions · p. 2, Figure 1 · p. 3
- Across two human interneuron types, generated responses reproduce feature distributions, spike-time structure, and F-I relationships, with qualitatively matching statistics from corresponding human cortex recordings.The evaluations report consistent performance across dynamical regimes.Source: Contributions · p. 2
- Conditioning on the full input waveform lets a model trained on complex time-varying stimuli generalize to new families of input stimuli.Source: Contributions · p. 2
2. Bio-Realistic Neuron Modeling
The study uses biophysically detailed PDE models built from human cortical neuron morphologies and optimized to capture electrophysiological properties. It evaluates one PVALB and one VIP interneuron, which have distinct firing regimes.
2. Bio-Realistic Neuron Modeling
- The PDE models use high-resolution human cortical neuron reconstructions, instantiated in NEURON through BioNet, with active ion channels distributed across somatic and dendritic compartments.The models use an “all-active” configuration.Source: §2 · p. 3
- Two-stage evolutionary optimization first fits passive subthreshold properties, then tunes active conductances for spiking dynamics and the frequency-current curve.Candidate models are ranked by mean z-score error across electrophysiological features, and the best-performing parameter sets across 250 generations form the HoF ensemble.Source: §2 · p. 3
- Evaluation focuses on one human middle temporal gyrus PVALB neuron and one VIP neuron, whose distinct firing regimes test generalization across electrophysiological phenotypes.PVALB neurons are described as fast-spiking, while VIP neurons operate on a slower timescale.Source: §2 · p. 3
3. Method
The method treats HoF simulation responses as samples from a conditional voltage distribution and generates full traces from noise, conditioned on the applied current. It trains a conditional flow-matching model and reports faster sampling than the numerical solver.
3.1. Problem Formulation
- The model approximates p(V|I) from discretized current-voltage trace pairs, treating HoF responses as samples and using source noise to represent ensemble variability.It conditions on the full current waveform and generates the complete voltage response jointly, allowing temporal dependencies across the trace.Source: §3.1 · p. 4
3.2. Conditional Flow Matching
- Conditional flow matching trains a time-dependent velocity field to transform a tractable prior into the target distribution through a probability path.Figure 2 depicts a Gaussian-noise draw, intermediate flow states, and the generated trace.Source: §3.2 · p. 4, Figure 2 · p. 4
- The model uses a linear conditional path with a time-aligned current input to the velocity network, whose CFM objective targets the marginal velocity field generating p(V|I).The network is a five-resolution one-dimensional U-Net; sampling uses 20 midpoint steps.Source: §3.2 · pp. 4–5, §3.3 · p. 5
3.3. Training Details
- 10,000 samples took 6,600 seconds for approximately 5.5× speedup one-at-a-time, and approximately 865 seconds for approximately 42× speedup at batch size 1000.Each sample requires 40 network evaluations; fewer evaluations or distillation can reduce inference cost at a fixed fidelity cost.Source: §3.3 · p. 5
4. Results
At unseen currents, the generative model reproduces response and feature distributions, spike timing, and multimodal firing behavior across the tested neuron types and regimes. Training on time-varying stimuli preserves DC-step performance and captures dynamics on unseen time-varying inputs.
4.1. Recovering Response Distributions at Unseen Currents
- At unseen currents, generated PVALB and VIP ensembles match HoF response dynamics and variability, feature distributions, and experimental ranges, while capturing threshold firing and non-firing responses that NOBLE misses.The generated spike-triggered averages and F-I curves closely track HoF distributions; experimental curves lie within the same range.Source: §4.1 · p. 5, Figure 3 · p. 6
- Explained variance exceeds 95% for several features across amplitudes, but inverse-ISI agreement is lower and generated ISIs are under-dispersed at 0.10nA.The largest discrepancy is in dispersion; normalized mean bias stays within about 0.25σ for every feature and amplitude.Source: §4.1 · p. 6
4.2. Capturing Spike-Timing Variability
- The generative model closely follows HoF spike-time densities across regimes, while NOBLE shows larger discrepancies and misses spikes at threshold amplitudes.Figure 4 compares smoothed spike-time densities at representative PVALB and VIP current amplitudes.Source: §4.2 · pp. 7–8, Figure 4 · p. 7
4.3. Capturing Multimodal Dynamics
- At 0.28nA, the VIP HoF spike-count distribution separates into low- and high-firing modes; the generative model recovers both modes and approximate probability mass, while NOBLE resolves neither.NOBLE spreads probability mass across the range, a distinction obscured by the mean response alone.Source: §4.3 · p. 8, Figure 5 · p. 8
4.4. Generalization to Time-Varying Stimulation Protocols
- With time-varying-stimulus training, agreement remains comparable across threshold, low-firing, and high-firing regimes, with no new regime-specific failure or substantial degradation on DC steps.Table 2 evaluates Wasserstein-2 distances across square-pulse current regimes; its high-firing range is capped at 0.18nA.Source: §4.4 · p. 8, Table 2 · p. 9
- On unseen time-varying stimuli, the DC-trained model places spikes in correct regions but yields blurred ensembles and poor ISI consistency, especially above 40 Hz; time-varying training captures voltage dynamics across stimulus families without architectural change.The DC-trained model stitches locally step-like predictions, compromising global consistency.Source: §4.4 · pp. 8–9, Figure 6 · p. 9
5. Conclusion
The paper presents a conditional flow-matching model that learns the voltage-response distribution directly, representing variability without an intermediate latent-feature distribution. Trained on PVALB and VIP simulations, it captures unseen-current responses and multimodal dynamics, while population modeling and faster generation remain future directions.
5. Conclusion
- The model learns p(V|I) directly, representing response variability without an ad hoc distribution over latent feature embeddings.It uses a flow-matching velocity field conditioned on input current.Source: §5 · p. 10
- Trained on PVALB and VIP PDE-simulation ensembles, it captures response distributions at unseen currents, temporal dependencies, multimodal dynamics, and transfers across stimulus families.The authors describe conditional generative surrogates as promising for large-scale circuit modeling where detailed simulations become prohibitively expensive.Source: §5 · p. 10
- Extending the framework to interacting populations and using distillation or few-step generation to approach deterministic-surrogate speed are identified as future directions.The comparison target named is NOBLE.Source: §5 · p. 10
A.1. Electrophysiological Features
The appendix describes electrophysiological features used for response comparisons, including a default spike-detection threshold and pooling of vector-valued features. The listed measures cover after-hyperpolarization, action-potential, interspike-interval, firing-rate, and spike-count properties.
A.1. Electrophysiological Features
- Feature extraction uses the default spike-detection threshold of -20 mV and pools vector-valued features when comparing distributions.The cited feature library is eFEL.Source: §A.1 · p. 15
- Listed vector-valued features include AHP_depth, AP_width, and inv_ISI_values, describing after-hyperpolarization voltage, spike widths, and reciprocals of interspike intervals.AP denotes action potential and AHP denotes after-hyperpolarization.Source: §A.1 · p. 15
- Other listed features are mean_AP_amplitude, mean_frequency, and spikecount, with spikecount including spikes outside the stimulus interval.Source: §A.1 · p. 15
A.2. Model Architecture and Training Details
The design-choice evaluation used a small dataset of responses from one PVALB neuron. The dataset comprised HoF responses across fixed current amplitudes.
A.2. Model Architecture and Training Details
- The design choices were evaluated on a small dataset for a single PVALB neuron.Source: §A.2 · p. 15
- The evaluation scope was a small response dataset rather than a broader collection of neurons.The supplied passage identifies the dataset as small and specifies one PVALB neuron.Source: §A.2 · p. 15
- The dataset contained all 60 HoF responses at 119 fixed current amplitudes spanning the range.Source: §A.2 · p. 15
A.2.1. Velocity Architecture
The selected velocity model is a one-dimensional U-Net with multiresolution residual blocks, skip connections, and conditioning on current and flow time. It was preferred to Diff Wave for global trace consistency and was three times faster per network evaluation at approximately matched parameter counts.
A.2.1. Velocity Architecture
- At approximately matched parameter counts, the U-Net was three times faster per network evaluation and better preserved global consistency than Diff Wave.The reported parameter counts were 4,973,569 for U-Net and 5,225,569 for Diff Wave; Diff Wave struggled to generate consistent ISIs.Source: §A.2.1 · p. 15, Table A.1 · p. 15
- The selected model is a one-dimensional U-Net with residual blocks at five resolutions, stride-two downsampling, and skip concatenations to a mirrored decoder.Dilated convolutions at the bottleneck provide a full-trace receptive field at linear computational cost.Source: §A.2.1 · p. 15
- Flow time and input current condition every residual block, while the encoder halves resolution and the decoder restores it with interpolation and skip connections.The figure describes the velocity prediction inputs as interpolated voltage state, flow time, and input current.Source: Figure A.1 · p. 16, §A.2.1 · p. 16
A.2.2. Training Objective
The L2 objective recovers the marginal velocity field needed to transport probability mass, whereas L1 can yield a biased field for multimodal distributions. Empirically, L2 better preserves the firing distribution, so it is used for training.
A.2.2. Training Objective
- L2 minimizes the conditional mean needed for the marginal velocity field, while L1 minimizes the conditional median and can bias transport for multimodal distributions.For multimodal paths, the L1 minimizer is pulled toward the mode carrying more mass rather than averaging across divergent paths.Source: §A.2.2 · p. 16
- L2 better preserves the firing distribution, while L1 more often collapses modes; the models are therefore trained with L2.The comparison evaluates Wasserstein-2 distances across feature distributions and high-frequency residuals in non-spiking traces.Source: §A.2.2 · p. 17, Table A.2 · p. 17
- L1 reduces subthreshold noise and improves spike-amplitude accuracy, despite its greater tendency toward mode collapse.The reported table compares the losses using feature-distribution distances and subthreshold residuals.Source: §A.2.2 · p. 17, Table A.2 · p. 17
A.2.3. Sampling Method
The appendix describes sampling, model training, and dataset construction, then catalogs trace and feature-distribution evaluations across PVALB and VIP neurons. The supplied figure captions specify evaluation scopes, while the reported sampling comparison favors midpoint integration at 20 steps.
A.2.3. Sampling Method
- All three solvers converge to a common limit by 200 NFE, set by learned velocity-field error; midpoint reaches that limit in 10 to 20 NFE.Sampling uses 20 midpoint steps (40 NFE) so reported results are not confounded by integration error.Source: §A.2.3 · p. 17
A.2.4. Hyperparameters
- The U-Net uses width 32, channel multipliers (1, 2, 4, 4, 4), three residual blocks per resolution level, kernel size 5, and dropout 0.03.Its bottleneck dilations are (1, 2, 4, 8, 16, 32, 64), and flow-time embeddings use dimension 64 with hidden dimension 128.Source: §A.2.4 · p. 17
- Training uses AdamW for 200 epochs with batch size 32, a five-epoch warmup followed by cosine annealing, and the lowest-validation-loss checkpoint.The base learning rate is 5 × 10^-4; models are trained on NVIDIA A100 GPUs.Source: §A.2.4 · pp. 17–18
A.3. Dataset Generation
- The datasets pair 1,680 stimuli with each of 60 HoF parametrizations, with 50 models used for training and 84,000 training-model traces split into training and validation sets.The simulations use a 0.02 ms timestep, then filter and decimate traces to 9,334 samples at Δt = 0.06 ms.Source: §A.3 · p. 18
A.3.1. Current Amplitude Sampling
- DC-step amplitudes follow a truncated skew-normal distribution on [−0.11, 0.28] nA, with its mode in the peri-threshold window and positive skew covering sustained spiking.The amplitude distribution matches NOBLE’s training data, and Figure A.3 shows the empirical distribution.Source: §A.3.1 · p. 18, Figure A.3 · p. 18
A.3.2. Time-Varying Stimulus Construction
- Time-varying stimuli sum randomly parameterized sine, step, ramp, and chirp components; every waveform includes a ramp, so step-current evaluation tests transfer.The waveforms are smoothly compressed to remain within amplitude bounds; Table A.3 describes component construction.Source: §A.3.2 · p. 18, Table A.3 · p. 19
A.4.1. Voltage Trace Ensembles; A.4.2. Electrophysiological Feature Distribution Alignment; A.4.3. Frequency Sensitivity Comparison; A.4.4. Generalization to Complex Time-Varying Protocols
- PVALB figures show square-pulse trace ensembles, feature-distribution variance and bias, frequency-dependent inverse-ISI distances, and responses to unseen time-varying protocols.The frequency comparison describes a DC-step-trained model and a time-varying-trained model; the caption text does not report their relative outcomes.Source: Figure A.4 · p. 20, Figure A.5 · p. 21, Figure A.6 · p. 21
A.5.1. Voltage Trace Ensembles; A.5.2. Performance Across Dynamical Regimes; A.5.3. Electrophysiological Feature Distributions; A.5.4. Electrophysiological Feature Distributions Alignment
- VIP figures cover square-pulse ensembles, regime-specific Wasserstein-2 distances, feature distributions and explained variance, firing probability, and feature variance and bias.The feature-distribution figure compares experimental recordings, PDE simulations, NOBLE, and the model across three amplitudes.Source: Figure A.8 · p. 23, Table A.4 · p. 24, Figure A.9 · p. 24
Related papers
This paper cites
- U-Net: Convolutional Networks for Biomedical Image Segmentation2015
- Score-Based Generative Modeling through Stochastic Differential Equations2020
- SGDR: Stochastic Gradient Descent with Warm Restarts2016
- Neural Ordinary Differential Equations2018
- DiffWave: A Versatile Diffusion Model for Audio Synthesis2020
- Building Normalizing Flows with Stochastic Interpolants2022