Re-centering Frozen Audio Encoders the Way Neurons Adapt

Audio models pretrained on one kind of sound do badly on others. A speech model such as HuBERT scores 42.9% on a musical pitch task where a speech-plus-pitch ensemble reaches 88.5%. Models trained on environmental sound transfer poorly to speech. The usual explanation is that the model never learned the right features. Sensory neuroscience suggests a second explanation that is cheaper to fix. A neuron can be described as a fixed linear filter followed by a nonlinearity that turns the filter output into a firing rate; this description is called a linear-nonlinear (LN) cascade. When input statistics change, real neurons keep the filter and shift the threshold and slope of the nonlinearity. They do this so reliably that they lose almost no information. A neuron that fails to adapt loses about half of it.

We propose to test whether frozen audio encoders fail across domains partly because their internal nonlinearities sit at the wrong operating point for the new sounds. In that case unit outputs saturate or rectify to zero, and information present in the filter outputs is destroyed before it reaches the embedding. The fix we test changes no weights. Each unit's input to its activation function is re-centered and re-scaled using a running, within-clip estimate of its own recent statistics, which maps the unit back to the operating point it had during pretraining. Alongside the fix, we build a diagnostic that says in advance, per task and per layer, whether the fix can help: it asks whether a target property is recoverable from a unit's pre-activation but lost after the activation.

Core Claim

Our hypothesis is that a meaningful share of the cross-domain gap in frozen audio encoders comes from mismatched operating points, not from missing features. If so, per-unit, per-clip, causally running gain control applied just before each activation should recover out-of-domain performance without retraining. Two conditions are necessary. The gain must track time within a clip, not batches or datasets. It must also be applied inside the network, not only at the input or on the final embedding.

The hypothesis predicts where gains should appear. They should grow with the mismatch between pretraining and target domain: large for HuBERT on music and PANNs on speech, small for a multi-domain encoder like OpenBEATs. They should also appear only where the diagnostic shows information surviving to the pre-activation. Where the diagnostic says the filters themselves discard a property, the fix should do nothing, and we will report that as a localized negative result.

Relation to Prior Work

Several papers motivate this, one supplies the mechanism, and others constrain the design. On the neuroscience side, Shifts in Coding Properties and Maintenance of Information Transmission during Adaptation in Barrel Cortex used spike-triggered covariance on whisker-driven cortical neurons. It found that filters stay fixed while the nonlinearity rescales with input variance over 280 ± 180 ms, holding information per spike at a ratio of 1.05 ± 0.06, versus 0.53 for a neuron that did not adapt. We borrow that decomposition as the mechanism. We apply it to artificial units whose filters are exactly known, rather than to white-noise-driven biological neurons.

Incorporating Midbrain Adaptation to Mean Sound Level Improves Models of Auditory Cortical Processing is the closest bridge. It predicts ferret auditory cortex responses with a nonlinear-linear-nonlinear cascade (a nonlinearity, a linear filter, then another nonlinearity). Its first stage subtracts a running average of sound level per frequency channel, with time constants of 27 to 217 ms. This improved synthetic-to-natural transfer by a median 22%. That result motivates adaptation as a transfer mechanism. The proposal differs from it in three ways: adaptation acts at every internal unit, it rescales variance as well as subtracting the mean, and the target is machine-listening benchmarks, not spike prediction. Willmore's input-only version becomes one of our baselines.

Convergence Properties of Some Spike-Triggered Analysis Techniques warns that reverse-correlation estimates are biased under non-Gaussian natural inputs. For that reason our main diagnostic relies on exactly known pre-activations, not on filters estimated by reverse correlation.

On the audio side, The Efficacy of Self-Supervised Speech Models for Audio Representations documented the pitch blind spot in speech models and patched it by concatenating HuBERT, wav2vec 2.0 and the pitch tracker CREPE. We ask whether part of that blind spot can be repaired inside a single model.

Towards Learning Universal Audio Representations is a constraint. It showed that batch normalization hurts cross-domain transfer and that removing normalizers helps (Slowfast NFNet-F0, HARES average 74.6 versus 71.7). Our gain control must therefore not reintroduce statistics shared across examples, and it does not: it uses only the current clip's own history.

The review Do We Know What the Early Visual System Does? motivates studying history dependence in the first place. It stresses that memoryless LN models miss history effects spanning hundreds of milliseconds.

Mechanism

Consider unit $i$ at layer $\ell$ of a frozen encoder, with pre-activation $u_t$ at frame $t$ and activation function $\phi$ (GELU or ReLU). From pretraining data we store the unit's typical mean $\mu_0$ and standard deviation $\sigma_0$. At inference we track a causal running mean $m_t = (1-\alpha) m_{t-1} + \alpha u_t$ and a running variance $v_t$, updated the same way on $(u_t - m_t)^2$, where $\alpha = \Delta t/\tau$, $\Delta t$ is the frame hop and $\tau$ is the adaptation time constant. We then replace $\phi(u_t)$ with

$$ \phi\!\left(\mu_0 + \sigma_0 \,\frac{u_t - m_t}{\sqrt{v_t} + \epsilon}\right), $$

where $\epsilon$ is a small constant for stability. The unit's weights, and therefore its filter, are untouched. Only the point at which the nonlinearity bites moves, as in the barrel-cortex result. We initialize the running statistics at $\mu_0$ and $\sigma_0$ and sweep $\tau$ from 10 ms to the whole clip, centered on the biological range of 27 to 280 ms.

This is distinct from the LayerNorm already present in transformers. LayerNorm standardizes each frame across channels, so it removes overall level per frame. It leaves each channel's drift over time intact, which is exactly the drift our mechanism corrects.

Research Program

The first stage is a diagnostic, run before any intervention. We use four frozen encoders chosen to span pretraining mismatch: HuBERT and wav2vec 2.0 (pretrained on speech), PANNs CNN14 (pretrained on AudioSet environmental sound, PANNs), and OpenBEATs (OpenBEATs), which is multi-domain and serves as the low-mismatch control.

For each layer and target task, we fit identical linear probes on time-pooled pre-activations and on post-activations. The target labels are pitch class for NSynth, keyword for Speech Commands, and class for ESC-50. The quantity of interest is the accuracy lost across the nonlinearity. We compute it separately on in-domain and out-of-domain audio and relate it to two measures of operating-point mismatch. The first is the fraction of frames where each unit sits in the flat region of $\phi$. The second is the divergence between the unit's source-domain and target-domain pre-activation distributions.

The hypothesis predicts that out-of-domain loss across the nonlinearity exceeds in-domain loss and grows with mismatch. As a secondary check, we fit first-layer spectrotemporal receptive fields (the frequency-by-time patterns a unit responds to) separately on speech and music inputs. This tests whether the "fixed filter, shifted nonlinearity" picture holds for artificial units as it does for barrel-cortex neurons. Given Paninski's warning about biased estimates under natural inputs, we interpret this check cautiously.

The second stage is the intervention. We retrofit the running gain control into all activations, and then into single layers, and evaluate the resulting embedding function on the benchmarks under their standard frozen-embedding protocols. The single-layer ablation, together with the diagnostic, tells us where the recoverable information sits.

The third stage is smaller and conditional on stage two succeeding. We pretrain a modest encoder with the gain control built in from the start, to see whether the benefit survives when the model can co-adapt to it.

Baselines

The do-nothing reference is each frozen encoder evaluated as released. The file's anchor is HuBERT at 42.9% on NSynth Pitch 50h, from The Efficacy of Self-Supervised Speech Models for Audio Representations. We will reproduce every no-adaptation number ourselves under our exact probing code before comparing.

The strongest existing competitor on the pitch question is the fusion_cat_xwc ensemble from the same paper. It concatenates layer-averaged HuBERT and wav2vec 2.0 features with CREPE, reaches 88.5% on NSynth Pitch 50h, and took the top score on 8 of 18 HEAR tasks. It is the strongest because it adds a dedicated pitch model. We do not expect a weight-free retrofit to match it on pitch. Beating it means matching its average across the whole HEAR subset at roughly one third of its inference cost, or improving it further when our retrofit is applied to its speech components.

On HARES, the strongest reported single model is Slowfast NFNet-F0 at an average of 74.6, from Towards Learning Universal Audio Representations. Beating it means that a retrofitted PANNs or OpenBEATs encoder exceeds 74.6 under the identical linear-probe protocol. Failing that, the fallback criterion is that the retrofit closes a statistically clear fraction of each encoder's own gap to 74.6.

Three ablations isolate the key ingredient. The first applies the Willmore-style input-only stage: running mean-level subtraction per frequency channel with 27 to 217 ms time constants and rectification, before the encoder. It tests whether adapting internal units matters beyond the input. The second sets $\tau$ to the whole clip, giving per-clip static standardization of pre-activations. It tests whether tracking time matters. The third uses dataset-level recalibration of each unit's statistics on the target training set, in the style of adaptive batch normalization. It tests whether per-clip adaptation matters.

All variants share frozen weights and the same probe architecture, receive the same hyperparameter search budget (for $\tau$ and probe learning rate) chosen on validation splits, and use the same seeds. We report the mean over five probe seeds with confidence intervals.

Why not just…?

Why not just standardize the final embedding per clip or per dataset? Standard probe pipelines already standardize embedding dimensions. That standardization cannot restore information that an internal activation has already flattened. The stage-one diagnostic measures this directly, as the gap between pre-activation and post-activation decodability. If that gap is near zero out of domain, this alternative is as good as ours and the hypothesis is wrong. The static whole-clip ablation also brackets this alternative from inside the network.

Why not just put an adaptive front end at the input, like the midbrain stage or a learnable per-channel energy normalization? This is the most serious threat, because input-level adaptation is cheap and already has support: Willmore's midbrain stage gave a 22% transfer improvement. Per-channel energy normalization is a standard audio front end, but the file has no reported result for it on HEAR or HARES. The mismatch we target, however, arises at deep units whose inputs are combinations of many channels, and input-level mean subtraction cannot re-center those. The input-only ablation settles the question. If it recovers most of the gain, we will report that the simpler input stage suffices.

Why not just recalibrate normalization statistics or run test-time adaptation on the target set? Dataset-level recalibration assumes a single operating point per target domain. Mixed audio such as speech over music, or a scene with transient events, changes statistics within a clip, which is the regime where the barrel-cortex neurons adapt over hundreds of milliseconds. Test-time adaptation also tends to share statistics across examples, the property Wang et al. found harmful for transfer. The dataset-level ablation tests this. We expect the per-clip version to win on nonstationary tasks such as DCASE 2016, Beehive and LibriCount, and not necessarily on stationary ones.

Why not just ensemble with CREPE or fine-tune? The ensemble works but triples compute. Fine-tuning confounds representation quality with the capacity of adapting on the target task, and it overfits tasks as small as Gunshot, with 88 samples. Neither answers whether the frozen features already contain the information. We report the ensemble as the ceiling, and we test whether our retrofit composes with it.

Proposed Experiments

We evaluate on HARES with linear probes over all 12 tasks. Because full shallow-MLP evaluation on HEAR can take more than 24 A100-hours per task (HEAR), we use a HEAR subset that stresses each direction of mismatch: NSynth Pitch 50h, Beijing Opera Percussion and Mridangam Stroke for music; Speech Commands, CREMA-D and LibriCount for speech; ESC-50, DCASE 2016, Gunshot Triangulation and Beehive for environmental sound. Metrics follow each benchmark's protocol: accuracy, mAP, or event-onset F-measure for DCASE.

Three checks decide the outcome. First, the gain from the retrofit, measured per model and domain pair, should correlate positively with the stage-one loss across the nonlinearity and with the operating-point mismatch. Near-zero gains for OpenBEATs alongside positive gains for HuBERT on music and for PANNs on speech would support the claim; uniform gains would suggest generic regularization instead. Second, the best $\tau$ should be finite. Specifically, it should beat both the whole-clip and the dataset-level ablations on nonstationary tasks, which is what separates running adaptation from ordinary normalization. Third, on NSynth Pitch, the diagnostic should predict the result. If pitch is decodable from HuBERT pre-activations but not from post-activations, the retrofit should move the 42.9% measurably toward 88.5%. If pitch is absent even from pre-activations, the retrofit should not help, which would show that the blind spot lies in the filters and that only new features, such as CREPE's, can fill it.

A clean negative result on all three checks would also be informative. It would show that cross-domain failure in these encoders is a failure of the features themselves, which argues for multi-domain pretraining over architectural patches.