Federated Spike Inference with Private, Physics-Shaped Sensor Kernels

Calcium imaging records neural activity as a fluorescence trace. Each spike produces a pulse that rises and then decays, and the pulse shape depends on the fluorescent indicator, the tissue, and how fast the microscope scans. Recovering spike times from these traces is a textbook case of finite-rate-of-innovation (FRI) sampling. That theory says a signal made of a few sharp events can be recovered exactly from far fewer samples than its bandwidth would suggest, provided you know the blurring function that the acquisition applies. We call this blurring function the sampling kernel. Learning-based FRI decoders now survive noise levels that break the classical algebra. Two things still hold the field back. Real ground-truth data (fluorescence recorded together with electrophysiology) is scarce and scattered across labs. And each lab's kernel is different, so a model trained in one place fails in another.

We propose to train one spike-location network across labs with federated learning, where each site trains on its own data and shares only model updates, never raw traces. The architectural choice is to split the model along the physics. The part that maps a trace to spike times and amplitudes is shared across sites. Each site's sampling kernel is a handful of physically meaningful numbers: rise time, decay time, and sampling period. These stay private and are re-fit locally each round from the site's own traces. Because the decoder regenerates the trace from the estimated spikes and the local kernel, every site can train on its unlabeled recordings, not only its few labeled neurons. The claim is that sharing the part that is common (what spikes look like after the kernel is accounted for) while keeping the part that differs private and low-dimensional (the kernel) closes most of the gap between isolated per-lab training and pooling all data centrally. It should also let a new lab join with zero ground-truth labels.

Core Claim and What Is New

The closest existing work is Learning-Based Reconstruction of FRI Signals. It introduces FRIED-Net, an encoder that maps noisy samples to continuous spike locations and amplitudes, and a decoder that resynthesizes the signal through a kernel that can be learned by backpropagation. It was validated on the cai-1 GCaMP6f data. FRIED-Net learns a single kernel and is trained centrally. Our proposal differs on three points. The kernel becomes a per-site private quantity. It is constrained to a parametric pulse family rather than a free filter. And the decoder's reconstruction loss is used as the self-supervised signal that makes federation work when labels are scarce.

The second closest is Federated Reconstruction: Partially Local Federated Learning. It splits a model into global and never-shared local parameters and re-fits the local ones with a few gradient steps each round. It found that one reconstruction step often suffices, and it reports a MovieLens RMSE of 0.907 against 0.923 for centralized training. Its local parameters are generic embeddings. It also notes that re-fits become noisy when a client has only one or two observations. We reuse its stateless re-fitting, but our local parameters are physically constrained kernel shapes. We expect this constraint to be exactly what keeps small-site re-fits stable.

FedHealth personalizes by fine-tuning a network's top layers per user on Nyquist-sampled wearable data. We instead personalize the input physics, the part that actually differs between microscopes.

The model at site $s$ is a forward model for the trace $y_n$:

$$y_n = \sum_{k} a_k\, \varphi_{\psi_s}(nT_s - t_k) + \varepsilon_n,$$

Here $t_k$ and $a_k$ are the times and amplitudes of spikes, $\varphi_{\psi_s}$ is a pulse with rise and decay constants $\psi_s$ (for example a difference of exponentials), $T_s$ is the site's sampling period, and $\varepsilon_n$ is noise. The shared encoder $f_\theta$ outputs the spike times and amplitudes. The two terms of the site objective are a reconstruction error and a supervised error:

$$L_s(\theta,\psi_s) = \big\|y - D_{\psi_s}(f_\theta(y))\big\|^2 + \lambda\, \ell_{\text{spike}}\big(f_\theta(y), t^{\text{true}}\big).$$

The reconstruction error covers all local traces and runs the encoder's output through the local kernel decoder $D_{\psi_s}$. The supervised error applies only to traces with electrophysiology and compares the encoder's output to the true spike times $t^{\text{true}}$, weighted by $\lambda$. Only $\theta$ is averaged by the server.

Two pieces of prior work support treating an arbitrary site kernel this way. Approximate Strang-Fix shows FRI recovery with kernels that do not meet exact algebraic conditions. An Extension of the FRI Framework for Calcium Transient Detection shows that the slow rise of GCaMP6s must be modeled explicitly, or classical FRI detection degrades.

Research Program

We will first build the model with a FRIED-Net-style encoder whose decoder is replaced by the parametric per-site pulse. This includes the sampling period, so traces do not need to be resampled to a common rate.

We will then define the federation by partitioning the multi-lab benchmark of Supervised learning sets benchmark for robust spike detection from calcium imaging signals. That benchmark contains 75 recordings from 67 neurons, about 89,000 spikes, V1 and retina tissue, OGB-1 and GCaMP6s indicators, and AOD (~320 Hz), line-scan (~12 Hz) and resonant (~59 Hz) acquisition. We will split it into sites along the natural axes of indicator × tissue × scanning mode. This gives realistic kernel heterogeneity with real ground truth. The GENIE GCaMP6s data and cai-1 GCaMP6f data will serve as additional sites, or as held-out "new lab" sites.

Each round, a site will re-fit $\psi_s$ with a few steps of reconstruction loss while holding $\theta$ fixed. It will then update $\theta$ and send the change to the server. The site ships nothing about its kernel, its traces, or its labels.

Our analysis will test whether the kernel parametrization is what makes this work. We will compare a free local filter against the parametric pulse, and measure how re-fit error scales with the amount of local data. We will also test whether federated averaging of the encoder reduces the low-SNR failures ("subspace swap" breakdowns) documented by Leung and Huang, or instead introduces ghost spikes when sites differ in firing rate.

Baselines

The naive reference point is local-only training. Each site trains the same architecture, including its parametric kernel, on its own data alone, with the same number of epochs and optimizer settings as a federated client. Beating it shows that sharing helps at all. The goal is a clear gain on small sites.

The classical model-based reference is the extended FRI algorithm of An Extension of the FRI Framework for Calcium Transient Detection. It is run per site with hand-fit kernels and needs no learning. On GENIE it reports detecting 90% of electrophysiologically validated spikes within 2 sample widths (0.034 s), over 3 traces containing 532 spikes. On GENIE we will use its exact tolerance and traces. Beating it means exceeding 90% detection at matched false-positive rate.

The strongest learned competitor is the Factored Spike-Triggered Mixture model of Theis et al. It is a supervised model trained on pooled data. It reports a median correlation improvement of 32–33% over the next-best methods and 7–10% more explained entropy, and it trains effectively from 5–10 neurons. We will run it centrally, on pooled data, on our site partition. This is the pooled-data ceiling a federated method would hope to approach. Matching its correlation within the confidence interval of leave-one-neuron-out evaluation, without pooling, counts as success.

For FRIED-Net itself on cai-1 we found no reported result on Lacuna, because the file gives no numeric TPR/FPR values. We will therefore rerun it ourselves in two forms: centrally pooled with a single learned kernel, and with standard federated averaging and a single shared kernel.

Two ablations isolate the key ingredient. The first keeps federation but makes the local kernel an unconstrained finite filter. The second keeps the parametric kernel but drops the unlabeled reconstruction term. All methods get the same data splits, the same encoder size, and an equal hyperparameter search budget per method, tuned on held-out neurons within training sites.

Why not just…?

Why not just resample every trace to 100 Hz and train one pooled or federated network, as Theis et al. did? Resampling equalizes the sampling rate but not indicator kinetics. OGB-1, GCaMP6s and GCaMP6f have very different rise and decay times. A single shared kernel must average them, which is exactly the mismatch our partition is built to expose. The federated single-kernel FRIED-Net baseline tests this directly. If it matches our method on held-out sites, the per-site kernel is unnecessary and we will report that.

Why not just fine-tune the whole network locally at each site, FedHealth-style? With 5–10 labeled neurons per site, fine-tuning thousands of weights risks overfitting. FedRecon itself reports degraded local re-fits with very little data. The constrained kernel has two or three parameters and can be fit from unlabeled traces. The "unconstrained local filter" ablation and a "fine-tune top layers" variant will show whether the physical constraint matters. We consider this a real threat on large sites, where fine-tuning may catch up.

Why not just pre-train on simulated traces with randomized kernels and skip federation? Theis et al. document a simulation gap, with methods near-perfect on synthetic data failing in vivo. That suggests randomization alone will not capture biological noise. It is still a cheap and serious competitor, so we include it both as a baseline and as an initialization for our method. If simulation-pretrained FRIED-Net with per-site kernel fitting at test time matches federated training, the case for federation reduces to its value for the shared encoder, and the experiment will say so.

Proposed Experiments

The main experiment trains all methods on the Theis-benchmark site partition. It evaluates correlation with ground-truth spike rate (the benchmark's metric) and spike detection rate within a tolerance at fixed false-positive rate, broken down by site size and indicator.

The first decisive check is leave-one-site-out. A new lab, such as GENIE GCaMP6s or cai-1 GCaMP6f, joins with zero labels. It fits only its kernel from unlabeled traces and uses the frozen shared encoder. We compare it with the same lab trained locally on all its labels. If label-free joining comes within a few correlation points of local supervised training, the core claim holds. If it does not, the kernel is not absorbing the site differences.

The second decisive check sweeps noise level on held-out traces with added noise, measuring the SNR at which detection collapses. This asks whether federation moves the breakdown point relative to local-only and central training.

We also report uplink communication as encoder parameters per round, to confirm the method sends no more than standard federated averaging. We will state plainly that privacy here means raw traces, labels and kernel parameters stay on-site; we make no formal privacy guarantee.