Paper deep dive
SpikeSSL: A Universal Spike Inference Framework with Dynamics-Informed State-Space Layers
Chenghao Yue, Siming Xing, Shuran Liu, Angran Li, Yuanlong Zhang
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 91%
Last extracted: 10/10/2026, 1:36:50 AM
Summary
The paper introduces SpikeSSL, a universal spike inference framework for calcium imaging that utilizes bidirectional IIR state-space layers to model calcium dynamics. It employs multi-modal conditioning (indicator identity, sampling rate, signal statistics) via Adaptive Layer Normalization and includes a heteroscedastic uncertainty head. The authors also develop a biophysical simulation pipeline to generate synthetic training data, improving zero-shot generalization across diverse calcium indicators.
Entities (13)
Relation Signals (8)
Two-photon calcium imaging → usedfor → recording neural populations
confidence 95% · Two-photon calcium imaging is a standard tool for recording large neural populations in vivo
SpikeSSL → usescomponent → Bidirectional IIR state-space layers
confidence 95% · SpikeSSL... temporal backbone is a bank of bidirectional IIR state-space layers
SpikeSSL → hascomponent → Heteroscedastic variance head
confidence 92% · a heteroscedastic variance head provides calibrated per-frame uncertainty
SpikeSSL → usestechnique → Adaptive Layer Normalization
confidence 92% · modulates the backbone via Adaptive Layer Normalization
Biophysical simulation pipeline → generatesdatafor → SpikeSSL
confidence 90% · Augmenting training with these data effectively closes the cross-indicator domain gap
SpikeSSL → outperforms → CASCADE
confidence 90% · SpikeSSL achieves state-of-the-art performance... compared to CASCADE
SpikeSSL → outperforms → OASIS
confidence 90% · SpikeSSL achieves state-of-the-art performance... compared to OASIS
SpikeSSL → outperforms → MLSpike
confidence 90% · SpikeSSL achieves state-of-the-art performance... compared to MLSpike
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Two-photon calcium imaging is a standard tool for recording large neural populations in vivo, yet inferring spikes accurately across the growing diversity of calcium indicators remains an open problem. Existing supervised methods achieve reasonable in-domain accuracy but generalize poorly to unseen indicators, because different indicators induce distinct fluorescence kinetics and signal statistics while existing architectures remain relatively simple generic temporal regressors without dynamics-matched inductive bias. We propose SpikeSSL, a universal spike inference framework whose temporal backbone is a bank of bidirectional IIR state-space layers broadly motivated by calcium dynamics. A multi-modal conditioning encoder maps indicator identity, sampling rate, and trace-level signal statistics into a global conditioning vector that modulates the backbone via Adaptive Layer Normalization, while a heteroscedastic variance head provides calibrated per-frame uncertainty. On a benchmark with five fixed evaluation splits built from 33 public ground-truth datasets, SpikeSSL achieves state-of-the-art performance in both in-domain and zero-shot leave-one-indicator-out settings. We also develop a biophysical simulation pipeline capable of generating paired fluorescence-spike traces with systematically varied kinetic parameters, spike statistics, response nonlinearities, baseline drift, and noise. Using this pipeline, we synthesize approximately 11,000 simulated traces. Augmenting training with these data effectively closes the cross-indicator domain gap and improves zero-shot generalization. Code is publicly available at this https URL.
Tags
Links
- Source: https://arxiv.org/abs/2610.11456v1
- Canonical: https://arxiv.org/abs/2610.11456v1
Trouble viewing inline? Open PDF directly →
Full Text
81,056 characters extracted from source content.
Expand or collapse full text
SpikeSSL: A Universal Spike Inference Framework with Dynamics-Informed State-Space Layers Chenghao Yue Affiliation: School of Life Sciences, Tsinghua University, Beijing, China Siming Xing Affiliation: School of Life Sciences, Tsinghua University, Beijing, China Shuran Liu Affiliation: School of Life Sciences, Tsinghua University, Beijing, China Angran Li Affiliation: School of Future Information Innovation, Fudan University, Shanghai, China Yuanlong Zhang Email: yuech26,xsm25,liusr24@mails.tsinghua.edu.cnarli25@m.fudan.edu.cn; yuanlongzhang@tsinghua.edu.cn*Equal contribution. †Corresponding author. Affiliation: School of Life Sciences, Tsinghua University, Beijing, China Abstract Two-photon calcium imaging is a standard tool for recording large neural populations in vivo, yet inferring spikes accurately across the growing diversity of calcium indicators remains an open problem. Existing supervised methods achieve reasonable in-domain accuracy but generalize poorly to unseen indicators, because different indicators induce distinct fluorescence kinetics and signal statistics while existing architectures remain relatively simple generic temporal regressors without dynamics-matched inductive bias. We propose SpikeSSL, a universal spike inference framework whose temporal backbone is a bank of bidirectional IIR state-space layers broadly motivated by calcium dynamics. A multi-modal conditioning encoder maps indicator identity, sampling rate, and trace-level signal statistics into a global conditioning vector that modulates the backbone via Adaptive Layer Normalization, while a heteroscedastic variance head provides calibrated per-frame uncertainty. On a benchmark with five fixed evaluation splits built from 33 public ground-truth datasets, SpikeSSL achieves state-of-the-art performance in both in-domain and zero-shot leave-one-indicator-out settings. We also develop a biophysical simulation pipeline capable of generating paired fluorescence-spike traces with systematically varied kinetic parameters, spike statistics, response nonlinearities, baseline drift, and noise. Using this pipeline, we synthesize approximately 11,000 simulated traces. Augmenting training with these data effectively closes the cross-indicator domain gap and improves zero-shot generalization. Code is publicly available at https://github.com/detimage123/SpikeSSL. 1 Introduction Two-photon calcium imaging is a widely used tool for recording neural population activity in vivo [4, 29]. In this modality the observed fluorescence trace is a noisy, nonlinear, and temporally filtered proxy whose relation to the underlying spike train depends heavily on the calcium indicator, optical noise, and cell-type biophysics [22, 16]. Spike deconvolution, the task of recovering the latent spike train from the observed calcium fluorescence, is therefore an essential computational step. Existing spike inference methods broadly fall into two paradigms. Model-based approaches such as OASIS [5] and MLSpike [3] invert explicit generative models of calcium dynamics, but they require indicator-specific kinetic parameters whose optimal values may diverge from measured quantities. Deep learning-based methods such as CASCADE [16] and ENS2 [28] learn the inverse mapping from paired fluorescence-electrophysiology recordings and achieve stronger in-domain performance. Nevertheless, universal spike inference remains difficult, as models trained on observed indicators can degrade markedly on unseen ones. The central difficulty is that modern calcium indicators induce substantially different fluorescence dynamics. The underlying forward model relating calcium dynamics to fluorescence, parameterized by indicator-specific rise and decay time constants among other factors [24, 3, 2, 26], varies dramatically across widely used sensors. Figure 1(a,b) illustrates both the differences between different indicators and the data variation within the same indicator. Figure 1(c) further shows that the domain gap between indicator families is large in per-window feature space. At the same time, existing CNN-based supervised models treat spike inference as a generic temporal regression task without inductive bias tailored to calcium dynamics. The forward model itself motivates a structurally matched design, as the first-order linear recurrence governing calcium decay shares the mathematical form of scan operations in deep state-space layers [8, 7, 21], with the state-decay coefficient serving as a direct analogue of the indicator time constant. If the network’s temporal backbone is built from such recurrences, cross-indicator generalization becomes a more structured problem. Figure 1: Indicator diversity and coverage gaps. (a) Representative fluorescence and spike snippets show markedly different response shapes across calcium indicators and among related GCaMP variants. (b) Indicator medians separate in kinetic and signal-statistic space, while simulated traces populate sparse regions between real datasets. (c) A t-SNE projection of per-window features shows partially overlapping but systematically displaced indicator domains. Informed by this observation, we propose SpikeSSL, a universal spike inference framework built on dynamics-informed state-space layers. The temporal backbone consists of bidirectional IIR scan layers spanning a basis of decay rates from fast transient detection to slow baseline tracking. A multi-modal conditioning encoder maps indicator identity, sampling rate, and trace-level signal statistics into a global conditioning vector, which modulates the backbone via Adaptive Layer Normalization as a built-in inductive bias rather than a post-hoc adaptation. In addition, a heteroscedastic variance head provides calibrated per-frame uncertainty and yields wider confidence intervals for out-of-distribution predictions. Although this architecture substantially improves universal inference, the scarcity of paired real recordings still limits cross-indicator generalization. We therefore design a biophysical simulation pipeline that samples spike trains from stochastic point processes and neuron-model dynamics, then passes them through a calcium forward model with varied kinetics, response nonlinearities, depletion, baseline drift, and observation noise. The resulting synthetic traces augment training and successfully bridge the domain gap between real indicator datasets, as illustrated in Figure 1(c). Our main contributions are as follows. • We propose SpikeSSL, a universal spike inference framework whose bidirectional IIR state-space layers are broadly motivated by calcium indicator decay dynamics. A multi-modal conditioning encoder maps indicator identity, sampling rate, and trace-level signal statistics into a global conditioning vector to modulate the backbone, together with a heteroscedastic variance head for calibrated uncertainty estimation. • On a benchmark with five fixed evaluation splits built from 33 public ground-truth datasets, SpikeSSL achieves state-of-the-art performance in both in-domain and zero-shot LOIO settings, establishing its universal capability across diverse experimental conditions. • We develop a biophysical simulation pipeline that generates synthetic calcium traces with systematically varied kinetic parameters and firing statistics. We synthesize approximately 11,000 simulated traces covering a wide range of indicator kinetic regimes, effectively closing the cross-indicator gap in zero-shot transfer. 2 Related Work 2.1 Spike Inference from Calcium Imaging Spike inference methods divide into model-based and data-driven approaches. Model-based approaches invert explicit calcium dynamics models, including linear deconvolution [25], Bayesian approaches [24, 23, 14], the biophysical MLSpike model [3], and the OASIS active-set method [5]. These methods require indicator-dependent kinetic parameters whose optimal values often diverge from biophysically measured quantities [18]. Data-driven methods, from early SVM approaches [19] to the deep architectures advanced through the Spikefinder benchmark [1], have converged on end-to-end learned representations. CASCADE [16] provides noise-optimized training across 27 datasets and expands coverage via calibrated noise augmentation, but does not vary kinetic parameters across indicators. ENS2 [28] offers a compact 1D U-Net that achieves competitive accuracy with fewer parameters. Existing supervised methods rely on largely generic temporal backbones, and their performance degrades on unseen indicators. The Spikefinder benchmark [1] underscored this pattern, showing that improvements on one indicator rarely transferred to others, and coverage of the CASCADE database [16] remains uneven, with GCaMP8 variants and red-shifted sensors [26, 18] underrepresented relative to established GECIs, leaving models vulnerable to silent degradation on newly developed indicators. 2.2 Cross-Domain Generalization Cross-domain generalization studies how models trained on multiple source domains transfer to unseen targets without target-domain labels [12, 9, 27]. In spike inference, domains are naturally defined by calcium indicators, and the challenge is accurate inference on held-out indicators with kinetics and statistics unseen during training. This problem is exacerbated by the limited diversity of paired ground-truth recordings. Although the database assembled by Rupprecht et al. [16] broadened coverage across indicators and experimental settings, and has since been extended with recordings for newly developed indicators and additional tissue types [18, 17], important gaps remain in indicator kinetic space. Recent work shows that CASCADE trained on one domain, such as cortex or GCaMP6-dominated data, transfers suboptimally to spinal cord recordings or GCaMP8 indicators [17, 18], highlighting the need for stronger cross-indicator generalization. Simulation-based augmentation offers a complementary strategy, where a calibrated forward model can generate paired fluorescence–spike traces spanning a systematic grid of kinetic parameters, extending the training distribution into regimes where real recordings are absent. This direction has received limited exploration in spike inference despite its potential to bridge coverage gaps without additional electrophysiology experiments. 3 Methodology In this section, we present SpikeSSL, a universal spike inference framework with dynamics-informed state-space layers that integrates a bidirectional IIR backbone, multi-modal conditioning, and output heads for spike rate and uncertainty estimation. We then describe the biophysical simulation pipeline used for cross-indicator data augmentation. 3.1 Overall Architecture SpikeSSL is a dynamics-informed network for spike inference whose architecture draws broad motivation from the biophysics of calcium indicators. The model takes a univariate fluorescence trace y∈ℝTy ^T together with indicator identity and sampling rate, and produces a per-frame spike rate s^∈ℝ≥0T s _≥ 0^T along with calibrated uncertainty σ^2∈ℝ>0T σ^2 _>0^T. The trace is first projected to model dimension D via a 1×11× 1 convolution, while a conditioning encoder maps indicator identity, sampling rate, and trace-level signal statistics through dedicated branches into a global conditioning vector c∈ℝ64c ^64. The projected trace then passes through N stacked blocks, each containing a bidirectional IIR scan with AdaLN conditioning, a Temporal Mixer, and a SwiGLU feed-forward network (FFN). Figure 2: Architecture of SpikeSSL. A fluorescence trace is projected by a pointwise convolution and processed by a stack of SpikeSSL blocks. Each block contains a bidirectional IIR scan with learnable decay rates that capture the exponential decay dynamics of calcium indicators, modulated by AdaLN conditioning on indicator identity, sampling rate, and trace-level signal statistics, followed by a Temporal Mixer for local temporal mixing and a SwiGLU FFN for channel mixing. A dilated refinement module aggregates multi-scale temporal context. Three parallel output heads produce a spike rate estimate, a binary spiking gate, and a per-frame uncertainty estimate. After the stack, a dilated refinement module of three residual convolutional layers with dilation schedule 1, 2, and 4 expands the receptive field from local to medium-range context, complementing the long-range multi-scale decay basis encoded by the IIR layers. Three output heads operate on the refined features. The mean head predicts the non-negative spike rate μ^[t] μ[t] via a convolutional projection followed by ReLU. A sigmoid gate head g[t]=σ(wg⊤h[t])g[t]=σ(w_g h[t]) classifies each frame as spiking or silent, is detached from the mean head’s gradient during training, and is trained with a separate binary cross-entropy loss, preventing co-adaptation between the two heads. At inference, s^[t]=μ^[t] s[t]= μ[t] if g[t]>0.5g[t]>0.5 and s^[t]=0 s[t]=0 otherwise, eliminating low-amplitude noise in silent periods. A variance head produces per-frame uncertainty estimates σ^2[t] σ^2[t] as described in Section 3.4. 3.2 Dynamics-Informed IIR Backbone The central design principle of SpikeSSL is to ground the network’s temporal processing in the dynamics of calcium indicators. Simple first-order exponential decay is among the most common and general models of calcium dynamics, and although the underlying biophysics can be substantially more complex, this recurrence still provides a useful inductive bias. The IIR scan used in deep state-space layers [8, 7, 21, 10, 6, 15] follows a structurally similar recurrence, h[t]=α⋅h[t−1]+(1−α)⋅z[t],h[t]=α· h[t-1]+(1-α)· z[t], (1) where α=σ(αlogit)α=σ( _logit) is a per-channel decay rate parameterized via the sigmoid function, and z is the input projected from the trace embedding. The resemblance to exponential calcium decay motivates initializing and conditioning the decay rates to span the physiologically relevant range. By initializing the base logits as αlogit∼linspace(0,4) _logit (0,4), the model spans a multi-scale bank of decay rates from fast time constants of a few frames to slow trends unfolding over hundreds of frames. This range deliberately covers the full spread of indicator kinetics observed in the benchmark, providing a structured inductive bias that reflects the underlying biophysics rather than leaving the network to discover relevant temporal scales from data statistics alone. To capture both causal context from past fluorescence and anti-causal context from future decay shape, SpikeSSL employs bidirectional IIR scans. Each layer computes a forward scan hfwdh^fwd and a time-reversed backward scan hbwdh^bwd, concatenates them along the channel dimension, and projects back to the model dimension, h=Wout[hfwd∥hbwd]+bout.h=W_out\,[\,h^fwd\;\|\;h^bwd\,]+b_out. (2) 3.3 Multi-Modal Conditioning Different indicators exhibit different kinetics, and SpikeSSL must adapt its decay rates accordingly. We achieve this through a multi-modal conditioning encoder, Adaptive Layer Normalization (AdaLN) [13], and per-sample decay rate modulation. The conditioning vector c∈ℝdcc ^d_c fuses three sources of information, c=MLP(eind‖ffs‖fstats),c=MLP (\,e_ind\;\|\;f_fs\;\|\;f_stats\, ), (3) where einde_ind is a learned embedding of the discrete indicator identity, ffs=MLP(logfs)f_fs=MLP( f_s) encodes the sampling rate, and fstatsf_stats encodes trace-level signal statistics. Each source is independently projected to a shared dimension before concatenation and fusion. The signal statistics component extracts a 7-dimensional summary vector from the input trace, fstats=[σ^y,γ^y,κ^y,ρ1,ρ3,ρ5,ρ10],f_stats= [\, σ_y,\; γ_y,\; κ_y,\; _1,\; _3,\; _5,\; _10\, ], (4) comprising the standard deviation, skewness, excess kurtosis, and normalized autocorrelation at lags 1, 3, 5, and 10. These statistics are computed deterministically with no learnable parameters and serve as an implicit proxy for the indicator’s SNR and kinetic properties. Slowly decaying indicators produce high autocorrelation, while noisy or fast indicators exhibit low autocorrelation and high kurtosis. This module enables SpikeSSL to adapt its temporal dynamics even when the indicator type is not specified. The conditioning vector modulates the IIR sub-block via AdaLN with zero-initialized projection, AdaLN(x,c)=LN(x)⊙(1+γ(c))+β(c),AdaLN(x,c)=LN(x) (1+γ(c))+β(c), (5) where (γ,β)=Wcc(γ,β)=W_c\,c is a linear projection initialized to zero, so that at initialization the model reduces to standard Layer Normalization. AdaLN is applied only to the temporal IIR sub-block, while the subsequent convolution and feed-forward sub-blocks use standard normalization. This concentrates the indicator-conditioned modulation on the component that directly encodes decay dynamics. In addition to AdaLN, the conditioning vector directly shifts the IIR decay logits, αeff=σ(αlogit+Wαc), _eff=σ ( _logit+W_α\,c ), (6) where WαW_α is zero-initialized. This allows each sample’s effective decay rates to be continuously modulated by its indicator identity and signal properties, enhancing the model’s ability to adapt to diverse kinetic regimes. 3.4 Heteroscedastic Uncertainty Estimation SpikeSSL produces a per-frame variance estimate σ^2[t] σ^2[t] alongside the spike rate prediction. The variance head consists of a single convolutional projection from the shared backbone features plus a per-indicator learned bias, logσ^2[t]=wv⊤h[t]+bind, σ^2[t]=w_v \,h[t]+b_ind, (7) where bindb_ind is an indicator-specific scalar bias. Both the projection and bias are zero-initialized. A key emergent property is that the variance output serves as an automatic out-of-distribution detector, as in-domain predictions yield tight confidence intervals while zero-shot predictions on unseen indicators produce inflated variance. Figure 3: Hierarchical Workflow of the Calcium Data Simulator. 3.5 Biophysical Simulation Data Generation To populate underrepresented regimes while preserving realistic action-potential-driven fluorescence, we augment training with simulated calcium traces generated by an enhanced MLSpike-based forward model [3]. The simulator complements real paired recordings by expanding kinetic coverage rather than replacing empirical data, and samples parameters across ranges covering observed indicators and plausible unseen sensors. As illustrated in Fig. 3, the simulation pipeline contains three components: spike train synthesis, calcium transient generation, and observation noise modeling. For each trial, we sample a recording duration and target firing rate, then generate spike trains with two complementary strategies. One strategy draws spike counts and inter-spike intervals from stochastic point-process models, allowing sparse, irregular, quasi-periodic, and burst-like firing. The other integrates the Izhikevich neuron model [11] to produce spikes from continuous membrane potential dynamics. Together, these strategies provide a broad repertoire of neuronal activity regimes before the fluorescence forward model is applied. The generated spikes are then passed through a modified calcium simulator. Compared with standard MLSpike, our simulator introduces stochastic amplitude jitter, a recovery variable that captures depletion and interval dependent response scaling, and indicator specific cooperative binding kinetics. Finally, we form observable fluorescence by adding slow baseline drift and Gaussian measurement noise to the modeled calcium response, producing traces with variability in baseline stability and signal quality. These mechanisms broaden the range of firing patterns, response amplitudes, noise conditions, and indicator dynamics beyond the real training set alone, helping bridge held out kinetic regimes during zero shot transfer. More details are provided in the supplementary material. 3.6 Training Objective The total loss combines three components, namely a heteroscedastic reconstruction loss, structural penalty terms, and a gate detection loss, ℒ=ℒrecon+ℒstruct+λgℒgate.L=L_recon+L_struct+ _g\,L_gate. (8) The reconstruction loss follows the β-NLL formulation [20], which precision-weights the per-frame Huber loss by the predicted variance, ℒrecon=1σ^2⋅Huberδ(s^,s)+12logσ^2.L_recon= 1 σ^2·Huber_δ( s,s)+ 12 σ^2. (9) High-confidence frames receive amplified gradients while noisy frames are down-weighted, and the entropy term 12logσ^2 12 σ^2 prevents the degenerate solution σ^2→∞ σ^2→∞. The structural penalties impose three asymmetric constraints that are not attenuated by the variance estimate, namely an over-prediction penalty that penalizes s^[t]>s[t] s[t]>s[t] more heavily than under-prediction, a peak under-prediction penalty that pulls up missed high-amplitude spike events, and a mean bias penalty that prevents systematic offset between predicted and true mean spike rates, ℒstruct=βover⋅ℒover+βpeak⋅ℒpeak+λμ⋅ℒbias.L_struct= _over·L_over+ _peak·L_peak+ _μ·L_bias. (10) Table 1: In-domain resluts. All methods are trained and evaluated on the full ground-truth database with per-dataset train and test splits. Bold / Underline indicate the 1st / 2nd best results. Method V1-OGB V1-GCaMP6s V1-GCaMP8 Other-RCaMP SC-GCaMP6s Mean Params Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ OASIS 0.298 1.157 −-0.481 0.332 0.973 −-0.883 0.493 0.878 −-0.659 0.504 1.054 −-0.508 0.365 0.975 −-0.964 0.398 — MLSpike 0.363 4.379 −-3.244 0.224 1.017 −-0.928 0.558 0.935 −-0.887 0.354 1.369 −-0.761 0.307 1.005 −-0.919 0.361 — CASCADE [16] 0.613 1.117 −-0.250 0.361 1.718 −-0.520 0.825 3.246 −-3.108 0.675 1.060 −-0.388 0.149 1.005 −-0.639 0.524 34K ENS2 [28] 0.641 1.032 −-0.368 0.358 2.265 −-1.354 0.775 1.827 −-1.596 0.695 0.884 −-0.509 0.256 1.116 −-0.154 0.545 145K SpikeSSL 0.743 0.810 −-0.067 0.579 0.945 −-0.741 0.915 0.565 −-0.017 0.731 1.269 −-0.234 0.736 0.764 −-0.704 0.741 3.9M Table 2: Zero-shot LOIO results. Each column group holds out one of the five evaluation splits during training and evaluates on it without target-domain data. Bold / Underline indicate the 1st / 2nd best results. Method V1-OGB V1-GCaMP6s V1-GCaMP8 Other-RCaMP SC-GCaMP6s Mean Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ OASIS 0.298 1.157 −-0.481 0.332 0.973 −-0.883 0.493 0.878 −-0.659 0.504 1.054 −-0.508 0.365 0.975 −-0.964 0.398 MLSpike 0.363 4.379 −-3.244 0.224 1.017 −-0.928 0.558 0.935 −-0.887 0.354 1.369 −-0.761 0.307 1.005 −-0.919 0.361 CASCADE 0.560 1.208 −-0.144 0.304 2.571 1.614 0.757 3.723 3.602 0.551 1.086 −-0.300 0.126 1.083 −-0.442 0.460 ENS2 0.574 1.005 −-0.366 0.310 3.401 2.654 0.716 2.038 1.715 0.635 0.966 −-0.454 0.178 1.092 −-0.391 0.483 SpikeSSL 0.650 1.979 −-0.675 0.509 0.944 −-0.677 0.853 0.513 −-0.091 0.717 1.172 −-0.606 0.542 0.911 −-0.892 0.654 The gate loss trains the binary spike-or-silent classifier via cross-entropy, ℒgate=BCE(g[t], 1[s[t]>ϵ])L_gate=BCE(g[t],\,1[s[t]>ε]), with gradients detached from the mean head to prevent co-adaptation. 4 Experiments 4.1 Datasets We evaluate on the ground-truth database assembled by Rupprecht et al. [16], comprising 33 datasets with 1,960 paired neuron recordings spanning 11 calcium indicators, two species (mouse and zebrafish), multiple brain regions (V1, CA3, olfactory bulb, telencephalon) and spinal cord, with both excitatory neurons and inhibitory interneurons (PV, SST, VIP). The corpus covers chemical dyes (OGB-1, Cal-520), legacy GECIs (GCaMP5k, 6f, 6s, 7f [2]), next-generation GCaMP8 variants (8f, 8m, 8s [26]), and red-shifted indicators (R-CaMP, jRCaMP1a, jGECO1a). Recent spinal cord recordings [17] introduce a major tissue-type shift from conventional cortical preparations. We additionally augment training with biophysically simulated calcium traces stored in multiple generated batches (Section 3.5 and Appendix A.4) used exclusively during training. 4.2 Benchmark and Metrics We compare SpikeSSL against four baselines spanning the major paradigms, namely OASIS [5], MLSpike [3], CASCADE [16], and ENS2 [28]. The underlying recordings are publicly available, and we evaluate them under five fixed evaluation splits. In the in-domain setting, all splits are included during training with per-dataset train and test subsets. In the LOIO setting, five representative experimental conditions, namely V1-OGB, V1-GCaMP6s, V1-GCaMP8, Other-RCaMP, and SC-GCaMP6s, are each held out in turn and evaluated without any target-domain training data. Across this benchmark, indicator decay time constants span from ∼50 50 ms for GCaMP8f to ∼600 600 ms for GCaMP6s, creating fundamentally different inverse problems for each condition. We evaluate all methods using Pearson correlation between the predicted and ground-truth spike rate [22, 16, 28], computed per neuron and averaged across neurons within each dataset. We additionally report normalized error and mean bias (signed difference in temporal means) to assess systematic over- or under-prediction. Table 3: LOIO results with simulation augmentation (“+ Sim.”). Training is augmented with biophysically simulated calcium traces. Bold / Underline indicate the 1st / 2nd best results. Method V1-OGB V1-GCaMP6s V1-GCaMP8 Other-RCaMP SC-GCaMP6s Mean Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ Err ↓ Bias ↓ Corr ↑ CASCADE + Sim. 0.552 2.418 −-1.423 0.439 1.522 −-0.691 0.716 1.408 −-1.018 0.642 1.421 −-0.614 0.405 3.206 −-2.084 0.551 ENS2 + Sim. 0.486 1.634 −-0.592 0.447 2.146 −-1.418 0.796 1.882 −-1.487 0.588 1.764 −-0.756 0.461 2.291 −-1.054 0.556 SpikeSSL + Sim. 0.697 1.441 −-0.419 0.533 0.931 −-0.697 0.902 0.523 −-0.175 0.708 0.849 −-0.505 0.678 0.771 −-0.653 0.704 Figure 4: Qualitative LOIO comparison on GCaMP8s, GCaMP6s, and OGB-1 test neurons. Each column shows a different method, and the grey curve denotes the ground-truth smoothed spike rate. 4.3 Implementation Details SpikeSSL uses 8 stacked blocks with model dimension D=192D=192 and conditioning dimension dc=64d_c=64. We train with Adam using an initial learning rate of 10−310^-3. The model converges within 20 epochs. For the loss hyperparameters, we set the over-prediction penalty βover=3.0 _over=3.0, peak under-prediction weight βunder=0.3 _under=0.3, Huber threshold δ=0.1δ=0.1, and mean bias weight λμ=0.5 _μ=0.5. The gate loss weight λg=5.0 _g=5.0 is set deliberately large to suppress false-positive spike predictions in silent periods. 4.4 In-Domain Results Table 1 reports in-domain performance with all evaluation splits included during training. SpikeSSL achieves state-of-the-art performance, substantially outperforming all baselines. These results demonstrate that the dynamics-informed IIR backbone and multi-modal conditioning provide strong inductive bias even in the fully supervised setting where all indicator types are observed during training. The consistently lower error and bias values confirm that SpikeSSL produces well-calibrated spike rate estimates across the full diversity of indicators. 4.5 Zero-Shot LOIO Results Under the LOIO protocol defined in Section 4.2, cross-indicator generalization remains difficult for all methods, but SpikeSSL achieves the highest mean correlation across all five held-out evaluation splits in Table 2. This result indicates that the IIR backbone and indicator-aware conditioning provide a meaningful structural advantage under domain shift. When training is augmented with biophysically simulated calcium traces, zero-shot performance improves further across all held-out splits in Table 3, with particularly large gains on conditions whose kinetics are sparsely covered by the real training set. Figure 4 shows that SpikeSSL preserves sharper spike structure than the classical baselines on representative unseen indicators. Method Mean Corr (↑ ) V1 (−- AdaLN) 0.601 V2 (−- Stats) 0.623 V3 (−- Bi-IIR) 0.594 V4 (−- Var.) 0.608 V5 (−- Gate) 0.621 SpikeSSL 0.654 Table 4: Ablation study under LOIO. Mean correlation is averaged over all five held-out evaluation splits. Figure 5: Uncertainty calibration of SpikeSSL. Panel (a) shows reliability curves. Panel (b) compares variance distributions. Panel (c) plots std dev against absolute error. Method Mean Corr (↑ ) #Params CASCADE-L 0.554 0.4M CASCADE-H 0.533 4.6M ENS2-L 0.576 2.1M ENS2-H 0.564 4.2M SpikeSSL-L 0.649 7.2M SpikeSSL 0.654 3.9M Table 5: Param-matched control. Scaling fails to close the gap. Figure 6: Linearity and activity-regime analysis. First three: deviation from linearity; Last: normalized error in flat, sparse, and dense windows. 4.6 Ablation Studies We perform ablations under the LOIO protocol and report mean correlation across all five held-out splits in Table 4. V1 replaces AdaLN with a concatenation-based conditioning scheme, and V2 removes the signal-statistics branch from the conditioning vector. Together they confirm that both conditioning mechanisms contribute to cross-indicator adaptation. V3 replaces the bidirectional IIR module with a standard temporal convolutional block, supporting the value of the dynamics-informed multi-scale backbone. V4 removes the heteroscedastic variance head and β-NLL reweighting, while V5 removes the binary gate head and its cross-entropy loss, confirming that both heads improve predictive quality beyond their primary roles in uncertainty calibration and spike denoising. 4.7 Discussion Uncertainty Calibration SpikeSSL’s heteroscedastic variance head provides calibrated per-frame uncertainty in addition to point estimates. Figure 5 shows that confidence intervals remain close to empirical coverage, that predicted variance increases under LOIO shift, and that higher predicted standard deviation is associated with larger absolute error. Taken together, these observations suggest that the variance head captures meaningful epistemic uncertainty rather than acting as a generic smoothing term. At the same time, this analysis is limited to the five-split LOIO benchmark considered here, so whether calibration remains equally reliable under more extreme acquisition shifts, such as substantially different noise statistics or sampling regimes, remains an open question. Architectural Gains Beyond Parameter Scaling Table 5 is intended to test whether SpikeSSL’s gains can be explained simply by model size. We scale CASCADE and ENS2 to larger parameter budgets and also evaluate a larger SpikeSSL variant. Increasing the baseline parameter counts indeed improves their performance, but they still do not reach SpikeSSL. In contrast, further scaling SpikeSSL does not yield additional gains, suggesting that its advantage comes from the dynamics-informed IIR backbone, indicator-aware conditioning, and uncertainty-aware objective rather than from simply stacking more parameters. Linearity and Response Scale of Spike Rate Estimation A useful spike inference model should keep predicted firing rates close to a linear, correctly scaled transform of the ground truth. Figure 6(a) summarizes this property on OGB-1, GCaMP6f, and GCaMP8, where SpikeSSL shows the smallest deviation from linearity across distinct kinetic regimes. Figure 6(b) further stratifies local 1-s windows into flat, sparse, and dense activity regimes, showing lower error for SpikeSSL during both silent and active periods. These results are consistent with the multi-scale IIR backbone, whose fast and slow channels help preserve response scale across indicator kinetics. 5 Conclusion We presented SpikeSSL, a universal spike inference framework that narrows the cross-indicator generalization gap through two complementary mechanisms. A bidirectional IIR backbone with a multi-scale decay basis spanning the full range of physiologically relevant indicator time constants, combined with multi-modal conditioning, provides a structured inductive bias for the inverse problem. Simulation-augmented training further bridges gaps in the kinetic parameter space of unseen indicators. On five fixed evaluation splits built from public ground-truth datasets, SpikeSSL achieves state-of-the-art performance in both in-domain and zero-shot settings without target-domain ground truth. By providing a single model that generalizes across indicator types without retraining, SpikeSSL can reduce the experimental burden of ground-truth data collection and facilitate the adoption of new calcium indicators in neuroscience laboratories. References [1] P. Berens, J. Freeman, T. Deneux, N. Chenkov, T. McColgan, A. Speiser, J. H. Macke, S. C. Turaga, P. Mineault, P. Rupprecht, et al. (2018) Community-based benchmarking improves spike rate inference from two-photon calcium imaging data. PLoS Computational Biology 14 (5), p. e1006157. Cited by: §2.1. [2] T. Chen, T. J. Wardill, Y. Sun, S. R. Pulver, S. L. Renninger, A. Baohan, E. R. Schreiter, R. A. Kerr, M. B. Orger, V. Jayaraman, et al. (2013) Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499 (7458), p. 295–300. Cited by: §1, §4.1. [3] T. Deneux, A. Kaszas, G. Szalay, G. Katona, T. Lakner, A. Grinvald, B. Rózsa, and I. Vanzetta (2016) Accurate spike estimation from noisy calcium signals for ultrafast three-dimensional imaging of large neuronal populations in vivo. Nature Communications 7 (1), p. 12190. Cited by: §1, §1, §2.1, §3.5, §4.2. [4] W. Denk, J. H. Strickler, and W. W. Webb (1990) Two-photon laser scanning fluorescence microscopy. Science 248 (4951), p. 73–76. Cited by: §1. [5] J. Friedrich, P. Zhou, and L. Paninski (2017) Fast online deconvolution of calcium imaging data. PLoS Computational Biology 13 (3), p. e1005423. Cited by: §1, §2.1, §4.2. [6] D. Y. Fu, T. Dao, K. K. Saab, A. W. Thomas, A. Rudra, and C. Ré (2023) Hungry hungry hippos: towards language modeling with state space models. In International Conference on Learning Representations, Cited by: §3.2. [7] A. Gu and T. Dao (2024) Mamba: linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752. Cited by: §1, §3.2. [8] A. Gu, K. Goel, and C. Ré (2022) Efficiently modeling long sequences with structured state spaces. In International Conference on Learning Representations, Cited by: §1, §3.2. [9] I. Gulrajani and D. Lopez-Paz (2021) In search of lost domain generalization. In International Conference on Learning Representations, Cited by: §2.2. [10] A. Gupta, A. Gu, and J. Berant (2022) Diagonal state spaces are as effective as structured state spaces. In Advances in Neural Information Processing Systems, Vol. 35. Cited by: §3.2. [11] E. M. Izhikevich (2003) Simple model of spiking neurons. IEEE Transactions on Neural Networks 14 (6), p. 1569–1572. Cited by: §3.5. [12] K. Muandet, D. Balduzzi, and B. Schölkopf (2013) Domain generalization via invariant feature representation. In International Conference on Machine Learning, p. 10–18. Cited by: §2.2. [13] W. Peebles and S. Xie (2023) Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, p. 4195–4205. Cited by: §3.3. [14] E. A. Pnevmatikakis, J. Merel, A. Pakman, and L. Paninski (2013) Bayesian spike inference from calcium imaging data. In 2013 Asilomar Conference on Signals, Systems and Computers, p. 349–353. Cited by: §2.1. [15] M. Poli, S. Massaroli, E. Nguyen, D. Y. Fu, T. Dao, S. Baccus, Y. Bengio, S. Ermon, and C. Ré (2023) Hyena hierarchy: towards larger convolutional language models. In International Conference on Machine Learning, Cited by: §3.2. [16] P. Rupprecht, S. Carta, A. Hoffmann, M. Echizen, A. Blot, A. C. Kwan, Y. Dan, S. B. Hofer, K. Kitamura, F. Helmchen, and R. W. Friedrich (2021) A database and deep learning toolbox for noise-optimized, generalized spike inference from calcium imaging. Nature Neuroscience 24 (9), p. 1324–1337. Cited by: §1, §2.1, §2.2, Table 1, §4.1, §4.2, §4.2. [17] P. Rupprecht, W. Fan, S. J. Sullivan, F. Helmchen, and A. D. Sdrulla (2025) Spike rate inference from mouse spinal cord calcium imaging data. Journal of Neuroscience 45 (18). Cited by: §2.2, §4.1. [18] P. Rupprecht, M. Rózsa, X. Fang, K. Svoboda, and F. Helmchen (2025) Spike inference from calcium imaging data acquired with gcamp8 indicators. bioRxiv, p. 2025–03. Cited by: §2.1, §2.2. [19] T. Sasaki, N. Takahashi, N. Matsuki, and Y. Ikegaya (2008) Fast and accurate detection of action potentials from somatic calcium fluctuations. Journal of Neurophysiology 100 (3), p. 1668–1676. Cited by: §2.1. [20] M. Seitzer, A. Tavakoli, D. Antic, and G. Martius (2022) On the pitfalls of heteroscedastic uncertainty estimation with probabilistic neural networks. In International Conference on Learning Representations, Cited by: §3.6. [21] J. T.H. Smith, A. Warrington, and S. Linderman (2023) Simplified state space layers for sequence modeling. In International Conference on Learning Representations, Cited by: §1, §3.2. [22] L. Theis, P. Berens, E. Froudarakis, J. Reimer, M. R. Rosón, T. Baden, T. Euler, A. S. Tolias, and M. Bethge (2016) Benchmarking spike rate inference in population calcium imaging. Neuron 90 (3), p. 471–482. Cited by: §1, §4.2. [23] J. T. Vogelstein, A. M. Packer, T. A. Machado, T. Sippy, B. Babadi, R. Yuste, and L. Paninski (2010) Fast nonnegative deconvolution for spike train inference from population calcium imaging. Journal of Neurophysiology 104 (6), p. 3691–3704. Cited by: §2.1. [24] J. T. Vogelstein, B. O. Watson, A. M. Packer, R. Yuste, B. Jedynak, and L. Paninski (2009) Spike inference from calcium imaging using sequential monte carlo methods. Biophysical Journal 97 (2), p. 636–655. Cited by: §1, §2.1. [25] E. Yaksi and R. W. Friedrich (2006) Reconstruction of firing rate changes across neuronal populations by temporally deconvolved Ca2+^2+ imaging. Nature Methods 3 (5), p. 377–383. Cited by: §2.1. [26] Y. Zhang, M. Rózsa, Y. Liang, D. Bushey, Z. Wei, J. Zheng, D. Reep, G. J. Broussard, A. Tsang, G. Tsegaye, et al. (2023) Fast and sensitive gcamp calcium indicators for imaging neural populations. Nature 615 (7954), p. 884–891. Cited by: §1, §2.1, §4.1. [27] K. Zhou, Z. Liu, Y. Qiao, T. Xiang, and C. C. Loy (2022) Domain generalization: a survey. IEEE Transactions on Pattern Analysis and Machine Intelligence 44 (11), p. 4396–4429. Cited by: §2.2. [28] Z. Zhou, H. M. Yip, K. Tsimring, M. Sur, J. P. K. Ip, and C. Tin (2023) Effective and efficient neural networks for spike inference from in vivo calcium imaging. Cell Reports Methods 3 (5). Cited by: §1, §2.1, Table 1, §4.2, §4.2. [29] W. R. Zipfel, R. M. Williams, and W. W. Webb (2003) Nonlinear magic: multiphoton microscopy in the biosciences. Nature Biotechnology 21 (11), p. 1369–1377. Cited by: §1. Appendix A Supplementary Material This appendix consolidates the technical details and extended validation in one continuous supplement. Appendix A.1 expands the conditioning encoder, dilated refinement module, Temporal Mixer, and SwiGLU FFN. Appendix A.2 documents the recording sets and fixed evaluation splits, Appendix A.4 specifies the biophysical simulation pipeline, and Appendix A.5 details benchmark construction. The remaining subsections provide additional analyses of conditioning, domain breadth, data scaling, ablations, adaptation regimes, learned dynamics, simulation, and robustness. A.1 Supplementary architecture modules This subsection expands three modules that are named in the main text but not visualized in Figure 2, namely the conditioning encoder, the dilated refinement module, and the Temporal Mixer and SwiGLU FFN sub-blocks within each SpikeSSL block. Figure 7: Conditioning encoder architecture. Three modality-specific branches independently encode their inputs before fusing them into a common representation. The indicator embedding branch maps discrete indicator identity to a 64-dimensional learned vector, where ID 0 is reserved for unknown or unseen indicators. The sampling-rate branch encodes logfs f_s through a two-layer MLP. The signal-statistics branch encodes the 7-dimensional descriptor comprising standard deviation, skewness, excess kurtosis, and autocorrelation at lags 1, 3, 5, and 10 through a two-layer MLP. The three 64-dimensional outputs are concatenated and fused by a 192→64→64192→ 64→ 64 MLP to produce the global conditioning vector c∈ℝ64c ^64. A.1.1 Conditioning encoder internals The conditioning encoder maps three modality-specific inputs through dedicated branches into the global conditioning vector c∈ℝ64c ^64. The indicator branch uses a learned embedding table over 14 IDs, where ID 0 is reserved for unknown or unseen indicators and the remaining IDs cover named indicators including OGB-1, GCaMP6f, GCaMP6s, GCaMP8 variants, R-CaMP, jRCaMP1a, jGECO1a, and XCaMPgf, each projected to 64 dimensions by a linear layer. The sampling-rate branch maps logfs f_s through a two-layer MLP of hidden width 64, falling back to log30 30 when the frame rate is unavailable. The signal-statistics branch maps a 7-dimensional descriptor comprising standard deviation, skewness, excess kurtosis, and autocorrelation at lags 1, 3, 5, and 10 through a separate two-layer MLP of width 64. The three 64-dimensional branch outputs are concatenated and fused by a final 192→64→64192→ 64→ 64 MLP to produce c, keeping each modality isolated until the fusion stage so that indicator-specific metadata and data-driven statistics contribute through clearly separated pathways. A.1.2 Dilated refinement module After the stack of conditioned SpikeSSL blocks and a final LayerNorm, the model applies a residual dilated convolution stack. With the default setting of three refinement layers, the dilation schedule is 1, 2, and 4, where each layer consists of a 1D convolution with kernel size 3 and matching dilation-dependent padding, followed by batch normalization, GELU, dropout, and a residual addition, expanding the temporal receptive field without downsampling. Whereas the bidirectional IIR scan captures long-range indicator-specific decay, the refinement stack provides complementary short-to-medium-range local correction capacity at full temporal resolution, functioning as a lightweight post-backbone smoother and sharpener. Figure 8: (a) SpikeSSL block sub-modules. The Temporal Mixer applies a depthwise 1D convolution (kernel width 7) followed by a pointwise convolution, GELU activation, and a residual connection, providing local temporal mixing without indicator-conditioned normalization. The SwiGLU FFN projects to twice the channel width, splits into gate and value tensors, computes SiLU(gate)⊙valueSiLU(gate) , and projects back to model dimension D, followed by a residual connection. (b) Dilated refinement module comprising three residual layers with dilation factors 1, 2, and 4 that successively expand the temporal receptive field at full resolution, each containing a kernel-3 1D convolution, batch normalization, GELU, and dropout. A.1.3 Temporal Mixer and SwiGLU FFN inside each block Each SpikeSSL block contains three sequential sub-modules. The first is the AdaLN-conditioned bidirectional IIR layer described in the main text. The second and third are deliberately left unconditioned. The Temporal Mixer applies LayerNorm to the block state, followed by a depthwise 1D convolution of kernel width 7, a pointwise 1D convolution, GELU activation, dropout, and a residual addition, providing local temporal mixing without an additional indicator-conditioned normalization path. The SwiGLU FFN applies LayerNorm and projects the state to twice the expanded width, splits the projection into gate and value tensors, computes SiLU(gate)⊙valueSiLU(gate) , projects back to model dimension D, and adds the result residually. With the default configuration D=192D=192 and expansion factor 2, the intermediate width is 384. AdaLN modulation is confined to the IIR branch, where indicator-specific decay kinetics have the clearest physical interpretation, while the Temporal Mixer and SwiGLU FFN serve as standard local and channel mixers. A.2 Benchmark data composition and split definitions Table 6 provides an overview of all benchmark datasets. Specifically, Table 7 categorizes the ground-truth recording sets by indicator family. Furthermore, Table 8 lists the five fixed evaluation splits. The recording-level inventory makes the source of benchmark heterogeneity explicit: the corpus combines chemical dyes and genetically encoded indicators across species, anatomical regions, induction methods, and sampling rates rather than treating an indicator as a single acquisition setup. Frame rates span approximately 2.5–500 Hz, and the recordings cover cortical, hippocampal, olfactory, and spinal preparations collected by multiple laboratories. Consequently, the benchmark tests variation in acquisition and biological context in addition to nominal sensor identity. Recording-level separation also prevents overlapping windows from the same acquisition from being divided between training and evaluation. Table 6: Overview of all ground truth recording sets. Set Calcium indicator Induction method Animal model Anatomical region Frame rate (Hz) N Source paper 1 OGB-1 Acute injection Mouse V1 11.3 11 Theis et al., 2016 2 OGB-1 Injection + tg(tdTomato-CaMKIIα) Mouse V1 15.6 16 Kwan and Dan, 2012 3 Cal-520 Acute injection Mouse S1 500.0 8 Tada et al., 2014 4 OGB-1 Acute injection Zebrafish pDp 7.7 15 Rupprecht et al., 2021 5 Cal-520 Acute injection Zebrafish pDp 7.8 5 Rupprecht et al., 2021 6 GCaMP6f tg(NeuroD) Zebrafish aDp 30.0 8 Rupprecht et al., 2021 7 GCaMP6f tg(NeuroD) Zebrafish dD 30.0 10 Rupprecht et al., 2021 8 GCaMP6f tg(NeuroD) Zebrafish OB 30.0 9 Rupprecht et al., 2021 9 GCaMP6f AAV Mouse V1 60.1 11 Chen et al., 2013 10 GCaMP6f tg(Emx1) Mouse V1 160.1 23 Huang et al., 2019 11 GCaMP6f tg(Cux2) Mouse V1 158.3 25 Huang et al., 2019 12 GCaMP6s tg(tetOs) Mouse V1 151.6 6 Huang et al., 2019 13 GCaMP6s tg(Emx1) Mouse V1 157.5 26 Huang et al., 2019 14 GCaMP6s AAV Mouse V1 60.1 7 Chen et al., 2013 15 GCaMP6s AAV Mouse V1 59.1 9 Theis et al., 2016 16 GCaMP6s AAV Mouse V1 59.1 9 Theis et al., 2016 17 GCaMP5k AAV Mouse V1 50.0 9 Akerboom et al., 2012 18 R-CaMP1.07 tg(Grik4-cre) + AAV Mouse CA3 20.0 4 Schoenfeld et al., 2021 19 R-CaMP1.07 AAV Mouse S1 15.0 9 Bethge et al., 2017 20 jRCaMP1a AAV Mouse V1 15.0 10 Dana et al., 2016 21 jRGECO1a AAV Mouse V1 29.8 11 Dana et al., 2016 22 OGB-1 Injection + tg(GFP-GIN) Mouse V1 (SST) 15.6 5 Kwan and Dan, 2012 23 OGB-1 Injection + tg(tdTomato-PV) Mouse V1 (PV) 15.6 7 Kwan and Dan, 2012 24 GCaMP6f tg(PV-cre) + AAV Mouse (in vitro) V1 (PV) 26.6 13 Khan et al., 2018 25 GCaMP6f tg(SOM-cre) + AAV Mouse (in vitro) V1 (SST) 26.6 17 Khan et al., 2018 26 GCaMP6f tg(VIP-cre) + AAV Mouse (in vitro) V1 (VIP) 26.6 11 Khan et al., 2018 27 GCaMP6f tg(tdTomato-PV) + AAV Mouse V1 (PV) 30.0 4 Rupprecht et al., 2021 28 XCaMPgf AAV Mouse V1 122 8 Zhang et al., 2023 29 GCaMP7f AAV Mouse V1 122 22 Zhang et al., 2023 30 GCaMP8f AAV Mouse V1 122 36 Zhang et al., 2023 31 GCaMP8m AAV Mouse V1 122 42 Zhang et al., 2023 32 GCaMP8s AAV Mouse V1 122 39 Zhang et al., 2023 33 Mixed (GCaMP7f /8/ XCaMPgf) AAV Mouse V1 (Interneurons) 122 17 Zhang et al., 2023 40 GCaMP6s tg(VGlut2-Cre) Mouse Spinal cord ∼ 2.5 21 Rupprecht et al., 2025 41 GCaMP6s tg(Viaat-Cre) Mouse Spinal cord ∼ 2.5 23 Rupprecht et al., 2025 Table 7: Ground-truth recording sets used in the benchmark. Category Indicator Recording sets N Chemical dye OGB-1 DS01, DS02, DS04, DS22, DS23 64 Chemical dye Cal-520 DS03, DS05 13 Legacy GECI GCaMP5k DS17 9 Fast GCaMP6 GCaMP6f DS06–DS11, DS24–DS27 124 Slow GCaMP6 GCaMP6s DS12–DS16 57 GCaMP7 GCaMP7f DS29 22 GCaMP8 variants GCaMP8f, GCaMP8m, GCaMP8s DS30, DS31, DS32 117 Red-shifted GECI R-CaMP DS18, DS19 13 Red-shifted GECI jRCaMP1a DS20 9 Red-shifted GECI jGECO1a DS21 11 Other GECI XCaMPgf DS28 8 Interneurons GCaMP7f, GCaMP8f, GCaMP8m, GCaMP8s, XCaMPgf DS33 17 Spinal cord (excit.) GCaMP6s DS40 21 Spinal cord (inhib.) GCaMP6s DS41 23 Grouping these recordings by indicator family shows how the 33 source datasets contribute complementary kinetic regimes. The fixed splits below then isolate five representative transfer settings while preserving recording-level separation. Table 8: Fixed evaluation splits. Source-side recordings are excluded from training under LOIO; evaluation recordings are held out in all settings. Split Held-out under LOIO Eval. recordings Contrast OGB-1 DS01, DS22, DS23 DS02, DS04 Chemical-dye transfer GCaMP6s DS12, DS13, X-DS11, X-DS12 DS14, DS15, DS16 Slow-decay GECI GCaMP8 variants DS30, DS31 DS32 GCaMP8f/8m→ 8s Red-shifted DS18, DS19, DS20 DS21 Cross-indicator transfer Spinal cord DS41 DS40 Brain-to-spinal-cord A.3 Loss function ablation under +sim LOIO Table 9 compares four loss configurations on the five +sim LOIO splits. Adding each auxiliary term consistently improves mean correlation, and the full three-component setup achieves the highest score on every split. Table 9: Mean Pearson correlation under +sim LOIO for SpikeSSL trained with progressive loss additions. All runs use identical data and hyperparameters, and only the active loss terms differ. Bold: best per column. Loss configuration V1-OGB V1-GCaMP6s V1-GCaMP8 Other-RCaMP SC-GCaMP6s Mean Huber regression only 0.527 0.445 0.861 0.703 0.622 0.632 + variance head (β-NLL) 0.536 0.461 0.872 0.712 0.641 0.644 + gate BCE 0.540 0.467 0.876 0.717 0.651 0.650 Full (+ mean-rate) 0.547 0.476 0.886 0.725 0.668 0.660 A.4 Biophysical simulation pipeline specification A.4.1 Spike Time Simulation To construct realistic spike timings, we implemented two distinct strategies, namely drawing inter-spike intervals from predefined probability distributions and simulating membrane potential dynamics via the Izhikevich neuron model. In the first strategy, the total spike count for each trial is determined by a target mean firing rate λspike _spike and a randomly generated recording duration T. Three stochastic point-process models cover distinct firing regimes. For standard stochastic firing, the spike count follows a Poisson distribution N∼Poisson(λspikeT)N ( _spikeT) and inter-spike intervals (ISIs) are drawn independently. A Gamma distribution Δtk∼Γ(κ,θ) t_k (κ,θ) generalizes this to model the relative refractory period, reducing to the standard exponential when κ=1κ=1 and penalizing short ISIs when κ>1κ>1. For quasi-periodic firing, a linear interpolation introduces stochastic perturbations into a uniform spike train, Δtk=(1−r)⋅Tperiod+r⋅Trand t_k=(1-r)· T_period+r· T_rand, where Tperiod=1/λT_period=1/λ and r∈[0,1]r∈[0,1] controls the degree of randomness. For bursty firing, burst onsets follow a Poisson process with rate λburst _burst, the spike count per burst follows ni∼Poisson(μburst)n_i ( _burst), and intra-burst ISIs are generated by stochastic jitter around a sub-millisecond mean interval. In the second strategy, we numerically integrate the Izhikevich neuron model over a duration T to efficiently generate biophysically realistic spike trains. By capturing the rapid depolarization and slow recovery of the membrane potential, this model faithfully reproduces complex firing dynamics. To reflect physiological stochasticity, the driving current I(t)I(t) is formulated as a multi-scale composite synaptic drive: I(t)=Ibase+Islow(t)+Imed(t)+Ifast(t),I(t)=I_base+I_slow(t)+I_med(t)+I_fast(t), where IbaseI_base denotes the baseline current profile, while the slowslow, medmed, and fastfast terms represent the respective frequency components of the synaptic perturbations.The temporal evolution of the fast membrane potential v and the slow recovery variable u under this driving current is governed by the following system of ordinary differential equations: dvdt dvdt =0.04v2+5v+140−u+I, =0.04v^2+5v+140-u+I, dudt dudt =a(bv−u). =a(bv-u). Upon reaching the spike apex (v≥30mV)(v≥ 30mV), the state variables are instantaneously reset: v←cv← c and u←u+du← u+d. The dimensionless parameter set (a,b,c,d)(a,b,c,d) governs these intrinsic dynamics, enabling the simulation of distinct neuronal subclasses, including Regular Spiking (RS), Intrinsically Bursting (IB), Chattering (CH), and Fast Spiking (FS) neurons. A.4.2 Fluorescence Signal Simulation In the MLSpike framework, the normalized intracellular calcium concentration c(t)c(t) is modeled as a first-order linear system driven by the spike train s(t)=∑kδ(t−tk)s(t)= _kδ(t-t_k), which is a set of Dirac functions placed at spike times tkt_k. The calcium level decays exponentially with a time constant τ, governed by the differential equation: dcdt=−1τc+s(t). dcdt=- 1τc+s(t). However, the assumption of a constant unitary response deviates from actual biological processes and contradicts experimentally observed data. To address this, we define the input s(t)s(t) as a sequence of weighted discrete events, where the calcium influx elicited by the k-th spike at time tkt_k is scaled by a dynamic weight w(tk)w(t_k). Consequently, the dynamics of c(t)c(t) are modified to: dcdt=−1τc+s(t)∗w(t), dcdt=- 1τc+s(t)*w(t), where the dynamic weight is formulated as: w(t)=R(t)⋅max(0,1+ϵk).w(t)=R(t)· (0,1+ _k). Here, ϵk∼(0,σA2) _k (0, _A^2) represents the stochastic amplitude jitter drawn from a normal distribution, reflecting the natural variability of calcium influx per spike. The variable R(t)∈[0,1]R(t)∈[0,1] serves as a depletion variable representing the fraction of the available calcium response pool. When an action potential occurs at t=tkt=t_k, the available pool is instantaneously depleted by a constant proportion d (the depletion factor): R(tk+)=R(tk)⋅(1−d),R(t_k^+)=R(t_k)·(1-d), where R(tk+)R(t_k^+) denotes the instantaneous value of R(t)R(t) immediately after the spike occurs at time tkt_k. During the inter-spike intervals (t≠tkt≠ t_k), the temporal evolution is a continuous exponential recovery towards its maximum capacity of 11: dRdt=1τrec(1−R(t)), dRdt= 1 _rec(1-R(t)), where τrec _rec is the recovery time constant. Subsequent to the influx of free calcium, the observable fluorescence signal is fundamentally determined by the concentration of calcium-bound indicator molecules. The binding between calcium ions and indicator molecules [B][B] obeys mass-action kinetics, as illustrated by the reaction: [Ca]n+[B]⇌koffkon[CanB],[Ca]^n+[B] k_on k_off [Ca^nB], where konk_on and koffk_off are the association and dissociation rates, respectively, and n is the Hill coefficient representing the degree of cooperativity. This formulation can accommodate both genetically encoded calcium indicators (GECIs, e.g., GCaMP, where n>1n>1) and synthetic chemical dyes (e.g., OGB-1, where n=1n=1). According to the law of mass action, the rate of change for the bound product concentration is given by: d[CanB]dt=kon[Ca]n[B]−koff[CanB]. d [Ca^nB ]dt=k_on [Ca ]^n [B ]-k_off [Ca^nB ]. By defining the normalized bound indicator fraction p(t)p(t) as: p=1γ[CanB]−[CanB]0[B]T−[CanB]0,p= 1γ [Ca^nB ]- [Ca^nB ]_0 [B ]_T- [Ca^nB ]_0, the temporal evolution of p(t)p(t) under standard constant-rate assumptions is governed by the following parameterized differential equation: dpdt=1τon[1+γ((c0+c)n−c0n)]((c0+c)n−c0n1+γ((c0+c)n−c0n)−p), dpdt= 1 _on [1+γ((c_0+c)^n-c_0^n) ] ( (c_0+c)^n-c_0^n1+γ((c_0+c)^n-c_0^n)-p ), where τon _on is the binding time constant at baseline, c0c_0 is the normalized resting calcium level, and γ is the saturation parameter limiting the maximum bound fraction. To extend this standard formulation and mechanistically characterize the conformational locking of the indicator molecules, we relax the constant-rate assumption for koffk_off. Specifically, the dissociation rate is modeled as a dynamically decelerating variable that explicitly depends on the instantaneous occupancy fraction p(t)p(t): koff(t)=koff,0⋅max(0.1,1−α⋅p(t)),k_off(t)=k_off,0· (0.1,1-α· p(t) ), where koff,0k_off,0 is the basal dissociation rate and α determines the deceleration magnitude. Next, we apply a phenomenological polynomial mapping to the dynamically derived variable p(t)p(t). This transformation yields the nonlinearly scaled bound fraction pfinal(t)p_final(t): pfinal(t)=c3p(t)3+c2p(t)2+c1p(t),if p(t)≤11+κ⋅(p(t)−1),if p(t)>1p_final(t)= casesc_3p(t)^3+c_2p(t)^2+c_1p(t),&if p(t)≤ 1\\[6.0pt] 1+κ· (p(t)-1 ),&if p(t)>1 cases where the constraint c1=1−c2−c3c_1=1-c_2-c_3 ensures gain conservation at p=1p=1, and κ=3c3+2c2+c1κ=3c_3+2c_2+c_1 represents the tangent slope at p=1p=1, facilitating a smooth linear extrapolation that guarantees numerical stability outside the standard dynamic range. Furthermore, to account for the slow continuous baseline drifts inherent to realistic scenarios, we model the baseline fluorescence B(t)B(t) as a Wiener process: dB(t)dt=η⋅ξB(t), dB(t)dt=η· _B(t), where η scales the amplitude of the baseline drift and ξB(t) _B(t) denotes standard Gaussian white noise. Ultimately, the observed fluorescence intensity F(t)F(t) is formulated as the integrated effect of the drifting baseline, the dynamic bound indicator concentration, and the measurement noise: F(t)=B(t)(1+A⋅p(t))+σ⋅ξF(t),F(t)=B(t) (1+A· p(t) )+σ· _F(t), where A represents the maximum fluorescence transient amplitude, and σ⋅ξF(t)σ· _F(t) accounts for the additive Gaussian noise with variance σ2σ^2. A.5 Detailed benchmark construction The benchmark uses fixed recording-set partitions rather than random neuron-level resampling. In the in-domain setting, the source-side recordings listed in Table 8 are included during training and the corresponding evaluation recordings are held out for testing. In the LOIO setting, the source-side recordings from the target evaluation family are removed from training, while the evaluation recordings remain unchanged. All other real source-domain recordings remain available for training, so the only controlled difference between LOIO runs is the held-out indicator or tissue family. The five splits in Table 8 are the evaluation units behind the in-domain and LOIO benchmark tables in the main paper. The held-out evaluation recordings are fixed at the recording-set level, which prevents different methods from being compared under different neuron-level samples. Before training and testing, each fluorescence trace is windowed into 128-frame segments with 30 frames of left context, 30 frames of right context, and overlap size 2. We use raw fluorescence as the input representation, do not apply offline denoising, and do not resample traces before evaluation. When simulation augmentation is enabled, simulated traces are appended to the training pool only and are never included in any evaluation split. A.6 Additional results and analyses A.6.1 Representative transfer functions Figure 9 indicates that the dominant failure mode is not a uniform offset but an indicator-dependent distortion of gain. For OASIS and MLSpike, the predicted rate increases too slowly once the true rate enters the moderate and high regime, which is consistent with the strong saturation visible in the curves. CASCADE and ENS2 recover more dynamic range, but their mappings still bend away from the identity and exhibit broader inter-neuron variability, indicating that rate calibration remains unstable across indicators. SpikeSSL stays closer to the identity over a wider operating range and maintains a narrower spread across neurons, suggesting that its advantage comes from preserving response gain more faithfully rather than from isolated corrections at a few firing-rate values. Figure 9: Representative transfer functions for five commonly used indicators. The shaded region denotes inter-neuron variability, and the dashed diagonal indicates the identity mapping. Indicators are selected because they span distinct kinetic regimes. A.6.2 Long-trial LOIO visualizations To complement the per-window correlation scores reported in the main benchmark, we provide long-trial visualisations that span the full recording duration. We include one representative neuron from each of the six held-out calcium indicators in the LOIO evaluation, namely the chemical dye OGB-1, the early and improved fast green GECIs GCaMP5k and GCaMP7f, the slow green GECI GCaMP6s, the red-shifted GECI jGECO1a, and the next-generation fast green GECI GCaMP8f. For every neuron we display the recorded fluorescence trace together with spike-rate predictions from all six methods over the entire recording, with the smoothed ground-truth spike rate overlaid in grey for reference. The Pearson correlation coefficient r reported in each panel is computed over the full trace. These visualisations corroborate the in-domain and LOIO benchmarks in the main paper, and additionally show that SpikeSSL with simulation augmentation tracks both isolated bursts and prolonged elevated firing across indicators with markedly different kinetics, while the remaining gap that simulation augmentation closes is most pronounced for indicators whose kinetics deviate substantially from the supervised training pool, such as jGECO1a and GCaMP5k. Figure 10: LOIO spike inference on a representative OGB-1 neuron (chemical dye with slow calcium decay kinetics). The top row shows the recorded ΔF/F F/F trace. Subsequent rows display spike-rate estimates produced by OASIS, MLSpike, CASCADE, ENS2, SpikeSSL, and SpikeSSL+Sim., each overlaid with the smoothed ground-truth spike rate (grey). The Pearson correlation coefficient r is computed over the full recording duration. Figure 11: LOIO spike inference on a representative GCaMP5k neuron (an early-generation fast green GECI). Panel layout follows Figure 10. Figure 12: LOIO spike inference on a representative GCaMP7f neuron (an improved fast green GECI with enhanced sensitivity). Panel layout follows Figure 10. Figure 13: LOIO spike inference on a representative GCaMP6s neuron (a slow GECI recorded in a low-activity regime). Panel layout follows Figure 10. Figure 14: LOIO spike inference on a representative jGECO1a neuron (a red-shifted GECI with distinct spectral and kinetic properties). Panel layout follows Figure 10. Figure 15: LOIO spike inference on a representative GCaMP8f neuron (a next-generation fast GECI with high signal-to-noise ratio). Panel layout follows Figure 10. The following subsections present additional controls, robustness studies, and mechanistic analyses that complement the main results. All experiments use the fixed recording-set partitions described in Appendix A.5. Unless stated otherwise, correlation denotes Pearson correlation of predicted and ground-truth spike rates, higher is better, and error and absolute bias are lower is better. A.7 Test-Time Conditioning Uses No Target-Domain Pool The seven trace statistics are computed independently from the current input window. Thus, LOIO inference uses one unlabeled input window, no target-domain pool, no target labels, and no parameter update. Pooling statistics across multiple target windows does not improve performance (Table 10), supporting that the method is per-window conditional inference rather than few-shot adaptation. Table 10: Effect of pooling unlabeled target windows for trace statistics under LOIO. Per-window Pool 5 Pool 20 Pool all Mean correlation 0.654 0.649 0.650 0.650 LOIO uses the reserved unknown indicator code (ID=0), never a held-out dye label. Removing the discrete-ID branch changes mean LOIO correlation from 0.654 to 0.647. In contrast, in-domain performance falls from 0.741 to 0.703 without the ID branch, and shuffling the observed ID at inference gives 0.578. Therefore, the ID chiefly captures regularities of observed domains, while zero-shot transfer is supported by sampling rate, input-window statistics, and the trace itself (Table 11). Table 11: Indicator-ID intervention. The LOIO baseline uses the unknown ID=0. Setting V1-OGB V1-GCaMP6s V1-GCaMP8 Other-RCaMP SC-GCaMP6s Mean LOIO baseline (ID=0) 0.650 0.509 0.853 0.717 0.542 0.654 LOIO without ID branch 0.646 0.500 0.849 0.708 0.532 0.647 In-domain full model 0.743 0.579 0.915 0.731 0.736 0.741 In-domain shuffled ID 0.587 0.457 0.791 0.619 0.437 0.578 In-domain without ID branch 0.700 0.546 0.881 0.694 0.694 0.703 For completeness, the structural loss uses valid-frame mask wt∈0,1w_t∈\0,1\, Z=∑twtZ= _tw_t, Q=t:st≥q0.9(s)Q=\t:s_t≥ q_0.9(s)\, and Huber loss hδh_δ: Lover L_over =Z−1∑twtmax(s^t−st,0)2, =Z^-1 _tw_t ( s_t-s_t,0)^2, (11) Lpeak L_peak =|Q|−1∑t∈Qhδ(max(st−s^t,0)), =|Q|^-1 _t∈ Qh_δ\! ( (s_t- s_t,0) ), (12) Lbias L_bias =(Z−1∑twts^t−Z−1∑twtst)2, = (Z^-1 _tw_t s_t-Z^-1 _tw_ts_t )^2, (13) Lstruct L_struct =βoverLover+βpeakLpeak+λμLbias. = _overL_over+ _peakL_peak+ _μL_bias. (14) We use βover=3.0 _over=3.0, βpeak=0.3 _peak=0.3, λμ=0.5 _μ=0.5, δ=0.1δ=0.1, and q=0.9q=0.9. A.8 Breadth of the Universal Benchmark The benchmark aggregates ground-truth recordings from multiple laboratories, sensors, species, brain regions, cell types, and acquisition protocols rather than a single experimental setup (Table 6). LOIO removes every recording of the held-out family and applies no target-domain update. To characterize the resulting domain variation, we measured isolated-spike rise time, decay time, and SNR in the public recordings. Large within-family dispersion and systematic cross-family shifts are evident in Table 12. These event-level summaries are distinct from the baseline-aware exponential τ analysis in Table 19. Table 12: Isolated-spike kinetic and SNR dispersion in public recordings. Times are seconds. Indicator family n Rise μ±σμ±σ Decay μ±σμ±σ SNR μ±σμ±σ Cal-520 6 0.086± 0.085 0.253± 0.094 5.533± 2.295 GCaMP5k 36 0.079± 0.095 0.073± 0.058 3.934± 0.904 GCaMP6f 907 0.061± 0.071 0.119± 0.120 5.570± 4.358 GCaMP6s 436 0.104± 0.095 0.177± 0.173 5.713± 3.011 GCaMP6s spinal 180 0.112± 0.164 0.155± 0.199 5.210± 2.906 GCaMP7f 57 0.030± 0.025 0.070± 0.058 6.125± 4.398 GCaMP8 variants 2,967 0.018± 0.020 0.083± 0.060 6.417± 4.017 Interneurons mixed 102 0.037± 0.056 0.050± 0.044 3.886± 0.936 OGB-1 330 0.094± 0.073 0.193± 0.155 7.141± 9.075 R-CaMP 260 0.082± 0.069 0.235± 0.201 10.831± 11.666 Unknown 619 0.096± 0.122 0.138± 0.143 5.689± 4.283 XCaMPgf 37 0.028± 0.031 0.060± 0.044 4.511± 2.445 jGECO1a 96 0.066± 0.056 0.126± 0.092 6.110± 3.671 jRCaMP1a 56 0.146± 0.166 0.261± 0.198 11.627± 26.422 For example, rise-time standard deviation exceeds the corresponding mean for GCaMP6f, GCaMP8 variants, and XCaMPgf. Across families, mean decay ranges from 0.050 s to 0.261 s and mean SNR from 3.886 to 11.627. We use “universal” in this operational sense: a single model transfers across this diverse, multi-laboratory benchmark without target labels or retraining. A.9 Data Scaling and Statistical Robustness Increasing the amount of real data, synthetic data, or indicator-family coverage improves mean LOIO correlation (Table 13). These controls indicate that data quantity is the primary limitation in the present benchmark. Table 13: Data-scaling study under fixed LOIO evaluation. Factor Metric Scale Real-recording fraction Correlation 25%: 0.564 50%: 0.614 75%: 0.637 100%: 0.654 Error 25%: 1.791 50%: 1.534 75%: 1.133 100%: 1.123 Absolute bias 25%: 1.187 50%: 1.081 75%: 0.583 100%: 0.588 Synthetic-data fraction Correlation 0%: 0.654 25%: 0.667 50%: 0.679 75%: 0.692 100%: 0.704 Error 0%: 1.123 25%: 1.118 50%: 1.113 75%: 1.108 100%: 1.103 Absolute bias 0%: 0.588 25%: 0.564 50%: 0.539 75%: 0.514 100%: 0.490 Indicator families Correlation 4: 0.543 8: 0.583 13: 0.654 Error 4: 1.140 8: 1.204 13: 1.123 Absolute bias 4: 0.871 8: 0.811 13: 0.588 Across seeds 42,2719,8888,1337,2025\42,2719,8888,1337,2025\, mean LOIO correlation is 0.660±0.0160.660± 0.016, close to the seed-42 result of 0.654; in-domain correlation is 0.739±0.0040.739± 0.004, close to 0.741. Table 14 reports all per-split results. Mean absolute bias is used in the final column. Table 14: Five-seed robustness results. Values are mean ± standard deviation. LOIO In-domain Split Corr. Error Abs. bias Corr. Error Abs. bias V1-OGB 0.666± 0.030 1.096± 0.513 0.309± 0.574 0.729± 0.017 0.875± 0.062 0.131± 0.180 V1-GCaMP6s 0.507± 0.022 0.951± 0.008 0.780± 0.069 0.575± 0.009 0.948± 0.005 0.779± 0.031 V1-GCaMP8 0.864± 0.013 0.531± 0.015 0.054± 0.213 0.917± 0.005 0.487± 0.044 0.036± 0.059 Other-RCaMP 0.724± 0.013 1.141± 0.157 0.445± 0.267 0.748± 0.019 1.025± 0.137 0.149± 0.130 SC-GCaMP6s 0.539± 0.018 0.889± 0.046 0.840± 0.082 0.728± 0.009 0.825± 0.036 0.784± 0.050 Mean 0.660± 0.016 0.922± 0.116 0.486± 0.074 0.739± 0.004 0.832± 0.021 0.376± 0.069 A.10 Ablations Removal and cumulative build-up studies were repeated across the same five seeds. The bidirectional IIR backbone, multi-modal conditioning, gate head, and variance head each contribute to the full model (Table 15). Table 15: Five-seed removal and cumulative build-up ablations under LOIO. Removal variant Corr. Error Abs. bias Build-up stage Corr. Error Abs. bias −-AdaLN 0.604± 0.014 1.276± 0.103 0.456± 0.061 1D U-Net backbone 0.481± 0.022 1.173± 0.101 0.788± 0.088 −-statistics 0.626± 0.012 1.213± 0.091 0.556± 0.073 Transformer backbone 0.484± 0.020 1.197± 0.104 0.618± 0.074 −-bidirectional IIR 0.597± 0.016 1.377± 0.120 0.719± 0.086 Bidirectional IIR backbone 0.539± 0.018 1.191± 0.101 0.757± 0.083 −-variance head 0.611± 0.013 1.243± 0.112 1.005± 0.105 ++ indicator ID 0.550± 0.017 1.167± 0.096 0.696± 0.079 −-gate 0.624± 0.011 1.153± 0.084 0.402± 0.057 ++ sampling rate 0.554± 0.016 1.175± 0.098 0.672± 0.077 Full SpikeSSL 0.660± 0.016 0.922± 0.116 0.486± 0.074 ++ signal statistics 0.576± 0.015 1.145± 0.091 0.703± 0.081 ++ AdaLN 0.594± 0.014 1.153± 0.087 0.696± 0.076 ++ gate 0.612± 0.013 1.117± 0.082 0.665± 0.071 ++ variance head 0.660± 0.016 0.922± 0.116 0.486± 0.074 A.11 Universal, Specific, and Few-Shot Regimes For each of 13 indicator families, the specific-model comparison holds out one recording and trains on the remaining recordings of that indicator. Universal models pool all indicator families and use exactly the same held-out recording for evaluation. SpikeSSL benefits from pooling, unlike CASCADE (Table 16). Table 16: Per-indicator comparison of specific and universal training. Indicator CASCADE-specific SpikeSSL-specific CASCADE-universal SpikeSSL-universal OGB-1 0.663 0.760 0.583 0.728 Cal-520 0.721 0.633 0.647 0.693 GCaMP5k 0.687 0.520 0.688 0.695 GCaMP6f 0.500 0.626 0.416 0.562 GCaMP6s 0.262 0.435 0.279 0.628 GCaMP7f 0.776 0.508 0.412 0.816 GCaMP8f 0.753 0.928 0.815 0.933 GCaMP8m 0.799 0.939 0.809 0.928 GCaMP8s 0.884 0.927 0.767 0.912 R-CaMP 0.309 0.555 0.644 0.691 jRCaMP1a 0.689 0.538 0.662 0.769 jGECO1a 0.736 0.613 0.672 0.790 XCaMPgf 0.797 0.537 0.446 0.833 Mean 0.660 0.655 0.603 0.768 For few-shot adaptation, 20 target-domain neurons are set aside as a support pool and all remaining traces form the evaluation set. For k>0k>0, models are fine-tuned from the k=0k=0 universal LOIO weights using k labeled support neurons. Fine-tuning first exceeds the zero-shot value at k=5k=5 and reaches 0.719 at k=20k=20 (Table 17). Table 17: Few-shot fine-tuning from zero-shot LOIO pretrained weights. k V1-OGB V1-GCaMP6s V1-GCaMP8 Other-RCaMP SC-GCaMP6s Mean 0 0.622 0.466 0.843 0.696 0.493 0.624 1 0.488 0.324 0.766 0.649 0.606 0.567 3 0.509 0.389 0.888 0.683 0.545 0.603 5 0.521 0.412 0.895 0.718 0.648 0.639 10 0.621 0.459 0.862 0.721 0.714 0.675 20 0.707 0.548 0.892 0.725 0.722 0.719 A.12 Disentangling Indicator and Acquisition Shifts We construct mini-domain evaluations that hold an indicator fixed while varying one additional factor, excluding other shift types from each data pool. In the species split, GCaMP6f mouse V1 recordings (DS09–11 and X-DS09/10) transfer to zebrafish recordings (DS06–08). The cell-type split fixes mouse V1 and GCaMP6f while changing the labeled population. The tissue split fixes GCaMP6s while transferring from brain to spinal cord. SpikeSSL gives the best correlation in all three cases (Table 18). Table 18: Mini-domain shifts with fixed indicator. GCaMP6f species GCaMP6f cell type GCaMP6s tissue Method Corr. Error Bias Corr. Error Bias Corr. Error Bias OASIS 0.191 0.982 -0.945 0.266 0.985 -0.974 0.365 0.975 -0.964 MLSpike 0.085 1.130 -0.706 0.098 1.015 -0.897 0.307 1.005 -0.919 CASCADE 0.540 1.304 0.539 0.574 0.977 -0.144 0.226 1.083 -0.442 ENS2 0.476 1.266 0.229 0.584 0.898 -0.680 0.278 1.092 -0.391 SpikeSSL 0.636 0.952 -0.442 0.673 0.931 -0.798 0.542 0.911 -0.592 A.13 Dynamics Readouts of the Conditioned IIR Bank We compare four complementary quantities in Table 19. Reference τ is a catalogue decay time, measured τ is fitted from isolated real fluorescence responses at 30 Hz using a joint baseline and exponential fit, and ∥Wα∥F W_α _F and ACF τ are extracted from a separately trained single-indicator SpikeSSL model. WαW_α maps the condition vector to shifts of the channel-wise α bank. Its Frobenius norm measures the strength of that influence, not a time constant. The norms vary across indicators, while the three kinetically similar GCaMP8 variants have similar values. ACF τ is positively associated with measured τ (Spearman ρ=0.886ρ=0.886, p=5.6×10−5p=5.6× 10^-5), although not in fixed proportion. These complementary readouts support indicator-dependent dynamics rather than a fixed shared kernel. Table 19: Kinetic measurements and learned dynamics readouts. Indicator Ref. τ (ms) ∥Wα∥F W_α _F Measured τ (ms) ACF τ (ms) GCaMP8f 60 5.35 175 145 GCaMP8s 70 5.94 314 165 GCaMP8m 80 6.11 136 132 GCaMP7f 100 0.60 223 154 XCaMPgf 120 0.39 179 152 GCaMP6f 180 5.44 212 140 Cal-520 200 0.41 878 178 GCaMP5k 250 0.50 547 163 R-CaMP 280 0.25 535 171 jRCaMP1a 280 0.74 756 163 jGECO1a 300 0.81 572 162 GCaMP6s 600 4.64 912 192 OGB-1 750 2.59 854 191 A.14 Simulation: Benefits and Failure Modes We repeated simulation-augmented LOIO across five seeds and characterized the target gap in the exact conditioning space of SpikeSSL: log sampling rate, standard deviation, skewness, excess kurtosis, and autocorrelation at lags 1, 3, 5, and 10. After robust scaling, we compute a 512-projection sliced Wasserstein-1 distance. ΔW1 W_1 is the real-only target gap minus the equal-sampled real-plus-simulation gap, so a positive value denotes improved alignment. AC averages the four autocorrelation terms and shape averages standard deviation, skewness, and kurtosis. Table 20: Simulation gain and alignment analysis. Split No-sim corr. +Sim corr. Δ corr. Δ ΔW1 W_1 AC ΔW1 W_1 shape ΔW1 W_1 kurt. V1-OGB 0.666± 0.030 0.704± 0.012 +0.038 +0.013 -0.111 +0.008 -0.132 V1-GCaMP6s 0.507± 0.022 0.531± 0.008 +0.024 +0.065 +0.197 -0.031 +0.094 V1-GCaMP8 0.864± 0.013 0.914± 0.015 +0.050 -0.090 -0.124 -0.157 -0.260 Other-RCaMP 0.724± 0.013 0.712± 0.009 -0.012 +0.018 +0.110 -0.051 -0.180 SC-GCaMP6s 0.539± 0.018 0.677± 0.010 +0.138 +0.126 +0.187 +0.065 +0.202 Mean 0.660± 0.016 0.708± 0.011 +0.048 SC-GCaMP6s obtains the largest gain, alongside the largest overall, temporal, and shape gap reductions. Other-RCaMP is a diagnostic non-uniform case: simulation improves autocorrelation alignment but worsens shape, especially kurtosis, consistent with incomplete coverage of red-indicator nonlinear statistics. Its −0.012-0.012 change is within five-seed variability, so it does not establish harmful negative transfer. Conversely, GCaMP8 improves despite a larger marginal SWD, consistent with label-aware synthetic supervision regularizing the inverse mapping beyond a label-agnostic distributional metric. These results motivate target-relative weighting or rejection of synthetic windows when conditional dynamics are mismatched. A.15 Threshold, Artifact, and Runtime Sensitivity The inference gate threshold was swept with the trained model fixed. The default τ=0.5τ=0.5 maximizes mean correlation, the task’s primary metric; normalized error is smallest at τ=0.6τ=0.6, and absolute bias reaches its minimum at τ=0.7τ=0.7 (Table 21). Table 21: Gate-threshold sensitivity. Each entry is mean across five LOIO splits. Threshold 0.2 0.3 0.4 0.5 0.6 0.7 0.8 Correlation 0.628 0.651 0.654 0.654 0.648 0.640 0.628 Normalized error 1.454 1.322 1.214 1.123 1.046 1.256 1.392 Absolute bias 0.831 0.739 0.659 0.588 0.525 0.464 0.483 Table 22 characterizes two common non-biological perturbations. Per-window statistics do not make SpikeSSL invariant to artifacts: baseline drift is the dominant degradation, while sparse motion is milder. Standard motion correction and baseline detrending are recommended before inference. Table 22: LOIO robustness to baseline drift and sparse motion artifacts. Condition V1-OGB V1-GCaMP6s V1-GCaMP8 Other-RCaMP SC-GCaMP6s Mean Clean 0.650 0.509 0.853 0.717 0.542 0.654 Baseline drift 0.636 0.392 0.605 0.665 0.478 0.555 Sparse motion artifacts 0.618 0.466 0.835 0.702 0.500 0.624 Drift + motion 0.620 0.409 0.673 0.684 0.463 0.570 SpikeSSL is designed primarily for offline analysis because the bidirectional IIR block uses bounded future context within each window. Nevertheless, sliding-window inference avoids holding an entire recording in memory. On an A100, one forward pass is approximately 29 times faster than the arrival of a 30-Hz frame window, so overlapping-window processing can keep pace with many acquisition settings while remaining noncausal within each window.