A protein's function is often not fixed by its sequence. The same enzyme does different jobs depending on its genomic neighbours, its tissue, or the question being asked about it. In microbiome studies, this context dependence is one reason knowing which microbes are present predicts poorly what they are doing. Machine learning models that annotate protein function handle this by conditioning. A common choice is feature-wise linear modulation (FiLM): a small network reads the context and outputs a per-channel scale and shift that are applied to the model's hidden features. Separately, spiking neural networks are networks of binary, event-driven neurons that run cheaply on neuromorphic chips. They are usually built by converting a trained ordinary network, and the main open problem in conversion is making the spiking copy accurate in only 2 to 8 time steps. Context-conditioned models have never been converted, and they create a specific problem. Conversion calibrates each neuron's firing threshold to one fixed distribution of activations, but conditioning moves that distribution whenever the context changes.
This note proposes that the conditioning itself can be moved into the spiking neuron. A FiLM scale and shift applied before a rectifier is mathematically the same as dividing the neuron's firing threshold by the scale and adding a constant offset to its membrane potential. Context then becomes a reprogramming of per-channel thresholds and offsets, with the weights left untouched. Two things follow. Every context gets its own correctly sized quantization grid, so the low-latency regime should stop breaking under context shift. And switching context, or interpolating to an unseen continuous context, costs a closed-form update of the threshold values instead of any recalibration. We test this on query-conditioned protein function retrieval and on context-dependent metagenomic gene function.
Core Claim
Take a channel with pre-activation $x$ and context $c$. The FiLM network outputs a scale $\gamma_c > 0$ and a shift $\beta_c$, so the conditioned activation is $\mathrm{ReLU}(\gamma_c x + \beta_c)$. An integrate-and-fire neuron with threshold $\theta$ approximates $\mathrm{ReLU}(u)$ as $\theta$ times its spike count over $T$ steps, given input current $u$. Because a rectifier commutes with positive scaling,
$$ \mathrm{ReLU}(\gamma_c x + \beta_c) = \gamma_c\,\mathrm{ReLU}\!\left(x + \beta_c/\gamma_c\right), $$
the conditioned neuron can be realised in two ways. One is to integrate $\gamma_c x + \beta_c$ against a threshold $\theta$. The other is to integrate the raw $x$ against a context threshold $\theta/\gamma_c$, with a constant membrane offset $\beta_c/\gamma_c$ and the same outgoing spike weight $\theta$. The spike counts are identical. The difference lies in how calibration interacts with them.
Activation-aware redistribution, introduced by Towards Training-Free and Accurate ANN-to-SNN Conversion via Activation-Aware Redistribution, fits a per-channel offset and threshold to the pooled activation distribution. That paper shows conversion error comes from spike range wasted on mismatched channel statistics. A conditioned network makes this mismatch depend on the context. A channel whose activations are small for catalytic-activity queries but large for localization queries gets one threshold that suits neither, and at $T=2$ or $T=4$ only a handful of spike levels are available to absorb the mismatch.
The claim is that folding the conditioning into thresholds closes this context-induced error. We expect two observable signatures. First, the accuracy gap between folded and pooled-calibrated conversion should widen as $T$ shrinks. Second, the gap should scale with how widely the learned scales $\gamma_c$ are spread across contexts. If neither holds, the idea is wrong.
The closest existing work is ProtQueSt, which shows that FiLM conditioning on the query type is what makes frozen ESM-2 embeddings useful for multi-aspect function retrieval. It runs entirely in ordinary dense arithmetic. The conversion literature, including the redistribution work above and Adaptive Fission, calibrates static networks on images and generic text. It has never treated a neuron's threshold as a context-dependent quantity.
Research Program
The three directions play different roles here. Low-latency conversion is the core mechanism. Context-dependent protein function is the model class that breaks existing conversion. The taxonomic-functional gap is the application regime: annotating what microbial genes do as a function of context, the motivating use case for low-power annotation close to the sequencing data.
The first component is the conditioned source networks. The primary testbed follows ProtQueSt: a FiLM-conditioned retrieval tower on top of frozen ESM-2 embeddings, conditioned on the query type (catalytic activity, domain or motif, general function, protein function), evaluated on Prot-Inst-OOD. During training we constrain $\gamma_c$ to be positive with a softplus, so the folding identity holds exactly. Negative scales would need paired excitatory and inhibitory channels, which we leave out.
The second testbed is metagenomic. Following FGBERT, we encode genes as ESM-2 protein embeddings. The context is a continuous vector summarising neighbouring genes on the contig, which FGBERT shows resolves the case where one sequence has several functions. We evaluate on the Gene Operon (E-K12) and NCycDB tasks.
The third testbed tests continuous rather than categorical context. We condition on tissue embeddings using GTEx-Benchmark data in the style of CDBridge. CDBridge itself conditions through cross-attention, so here we train a FiLM-conditioned regression head on its frozen representations. We do not claim to convert CDBridge's decoder.
The second component is conversion. We convert the conditioned towers, and in a stretch setting the final blocks of the smallest available ESM-2 backbone. Converting the full backbone at low $T$ is not credible yet: training-free conversion of ViT-L still needed 64 steps in the redistribution paper. We compare three treatments of the conditioning. Pooled calibration fits the redistribution method's offsets and thresholds once over all contexts. Per-context recalibration reruns its grid search separately for each discrete context, as an oracle. Folding derives each context's thresholds and offsets in closed form from a single context-free calibration of $x$.
The third component is analysis. We record three quantities per channel and per $T$: the conversion error, the spread of $\gamma_c$, and the fraction of spike levels actually used under each context. We also test generalisation to held-out continuous context values. Only folding needs no calibration data for a context it has never seen, which addresses the categorical-context limitation noted for CDBridge.
Error Amplification Limits ANN-to-SNN Conversion in Continuous Control constrains the design. It shows that representation errors compound in continuous outputs. We therefore expect the GTEx regression setting to be hardest, and we report it separately rather than averaging it into the retrieval results.
Baselines
The naive reference point is the conditioned network converted by plain rate coding with one layer-wide threshold. Adaptive Fission reports that such a network falls to about 20% accuracy on CIFAR-100 with ResNet20 at $T=4$, against about 73% with fission. We expect a similar collapse, and it marks the floor. The analog conditioned network is the ceiling. For Prot-Inst-OOD, ProtQueSt reports an Entity-BLEU of 48.79 for its full generation pipeline and a 107% relative Recall@10 gain for the catalytic channel. No absolute Recall@10 value was reported in the material we have, so we measure our own analog Recall@10 as the ceiling. On Gene Operon (E-K12), FGBERT reports a Macro F1 of 61.8, against 51.7 for DNABERT2.
The strongest existing competitor is activation-aware redistribution with pooled calibration. It is the best training-free method for normalisation-heavy and attention models, losing only 82.9% to 82.7% average GLUE accuracy on BERT. It is also the method most directly undermined by context shift, since it tunes exactly the offsets and thresholds we make context-dependent. We run it on the same converted towers, with the same calibration set size and the same grid-search budget. Folding beats it if, at $T \le 4$, it recovers a statistically significant share of the analog-to-SNN gap on per-query-type Recall@10 and on Operon Macro F1, measured over seeds. We expect the gain to concentrate in the query types or contexts with extreme $\gamma_c$.
Two further strong competitors are Adaptive Fission and ANN-guided hybrid distillation from Efficient ANN-Guided Distillation. Adaptive Fission adds parallel neurons to sensitive channels while keeping binary spikes. Hybrid distillation reports 81.44% on CIFAR-100 at $T=2$ with ResNet-19. Fission is orthogonal to folding, so we run it with and without folding, matching the total neuron count.
The ablation that isolates the key ingredient is per-context recalibration. If it matches folding wherever contexts are discrete, folding's distinct value reduces to closed-form generalisation to unseen continuous contexts, and we will say so.
Why not just…?
Why not just run the analog model on a GPU? For server-side annotation that is the sensible choice, and this proposal does not argue otherwise. The question here is a conversion question that matters whenever a conditioned model must run on binary-event hardware. Conditioned models are common in biology and absent from conversion benchmarks. Whether the energy savings Adaptive Fission reports on the Lynxi HP201 (up to 80% in latency and power) carry over is an empirical hardware question. We address it only if the chip allows per-channel thresholds to be set at runtime, which we have not confirmed.
Why not just calibrate once on data pooled across contexts? This is the redistribution baseline, and it is the main hypothesis test. It is a real threat if the learned $\gamma_c$ turn out nearly constant across contexts, in which case pooled calibration loses nothing. We measure the spread of $\gamma_c$ directly. Folding must win in proportion to that spread, not merely on average.
Why not just train the conditioned network with low-bit activation quantization and convert? Li et al. show that quantization-aligned training removes conversion mismatch at low $T$. A conditioned network trained this way could learn context-robust activation ranges on its own. This is the most serious threat. We run it with the same training budget, both alone and combined with folding. If it matches folding on discrete contexts, the remaining claim is narrower: folding requires no retraining, and its closed-form threshold update generalises to unseen continuous contexts, where a quantized grid fixed during training cannot adapt. The held-out-context experiment settles that question.
Why not just feed the context in as extra input features instead of FiLM? This avoids folding entirely, but the context then acts through the weights. Activation distributions still shift per context, and nothing can correct them at the neuron. ProtQueSt's gains come specifically from feature-wise modulation. We include an input-concatenation variant, converted with pooled redistribution, at matched parameter count.
Proposed Experiments
The decisive experiment sweeps $T \in \{2, 4, 8, 16\}$ on Prot-Inst-OOD retrieval and on Gene Operon (E-K12). It compares pooled redistribution, per-context recalibration, folding, quantization-aligned training, and fission with and without folding, all against the analog ceiling, over several seeds. The idea survives if three things hold together: folding closes most of the gap left by pooled calibration at $T \le 4$, the per-channel error reduction correlates with the spread of $\gamma_c$, and the advantage disappears at large $T$, as a range-mismatch explanation predicts.
The second check holds out context values. These are held-out neighbourhood-embedding clusters for the metagenomic task and held-out tissues for the GTEx regression head. The idea predicts that folding degrades no more than the analog model, while per-context recalibration cannot be applied and quantization-aligned training degrades more.
The third check repeats the comparison on NCycDB and on GTEx regression $R^2$, reported against the analog head's own score rather than CDBridge's reported 0.387, which comes from a different architecture. This tests whether the regression-error amplification that the continuous-control paper warns about overwhelms the gains.
If threshold reprogramming at runtime is supported on the Lynxi HP201, the final check measures the cost of a context switch on hardware against reloading weights.
References
- Towards Training-Free and Accurate ANN-to-SNN Conversion via Activation-Aware Redistribution
- ProtQueSt: Query-Conditioned Retrieval-Augmented Generation for Protein Function Annotation
- Adaptive Fission: Post-training Encoding for Low-latency Spike Neural Networks
- FGBERT: Function-Driven Pre-trained Gene Language Model for Metagenomics
- CDBridge: A Cross-omics Post-training Bridge Strategy for Context-aware Biological Modeling
- Error Amplification Limits ANN-to-SNN Conversion in Continuous Control
- Efficient ANN-Guided Distillation: Aligning Rate-based Features of Spiking Neural Networks through Hybrid Block-wise Replacement
- Quantization Framework for Fast Spiking Neural Networks