Marginal-Likelihood Frame Weighting for Noisy Speech

Speech systems chop audio into short slices of about 25 milliseconds, called frames, and usually treat every frame as equally trustworthy. In noisy rooms that assumption is wrong: many frames are mostly hum, babble, or silence. Decades of work down-weight such frames with hand-tuned rules, such as a sigmoid of the estimated signal-to-noise ratio, or with a separate "clean vs. noisy" classifier trained on synthetic noise. We propose a different way to choose those weights. Treat the frame-weighting module as a set of model hyperparameters, and fit it by maximizing the Bayesian marginal likelihood (the "evidence") of the downstream task model on the training data. The evidence is the probability a model assigns to the observed labels once its parameters are averaged over their prior. It automatically penalizes needless flexibility, and a model that listens to more frames is more flexible than one that listens to fewer. The evidence therefore supplies a built-in pressure to ignore frames that do not help explain the labels, without a hand-set threshold, a noise-labeled dataset, or a validation split.

The two-sentence version is this. Frame weighting is a complexity choice about how much of the signal the model is allowed to depend on, and complexity choices are exactly what the marginal likelihood is built to make. We learn soft, task-coupled frame weights for noisy speech emotion recognition by optimizing a scalable Laplace estimate of the evidence, and we test whether this beats both heuristic weighting and the same weighting module trained on ordinary loss.

Core Claim

The claim has two parts. The first part concerns validity. Classical frame weighting multiplies each frame's log-emission score by a weight. Weighting observation vectors for robust speech recognition in noisy environments does this with an SNR-driven sigmoid whose slope is fixed empirically at 1.0. The result is no longer a normalized probability, so no evidence can be computed for it. We move the weight out of the likelihood and into the function. Let $h_t$ be the frozen self-supervised feature of frame $t$ in an utterance of $T$ frames. Let $w_t(\phi)\in[0,1]$ be the output of a small weighting network with parameters $\phi$. The utterance embedding is then

$$z(\phi) = \frac{\sum_{t=1}^{T} w_t(\phi)\, h_t}{\sum_{t=1}^{T} w_t(\phi)},$$

and a prediction head with parameters $\theta$ maps $z$ to emotion labels. The label likelihood $p(y \mid z(\phi), \theta)$ stays properly normalized for any weights, so the evidence $p(\mathcal{D}\mid\phi)=\int p(\mathcal{D}\mid\theta,\phi)\,p(\theta)\,d\theta$ is well defined.

The second part concerns selection. We set

$$\phi^\star = \arg\max_\phi \; \log p(\mathcal{D}\mid\phi),$$

using the Laplace approximation over $\theta$ described in Scalable Marginal Likelihood Estimation for Model Selection in Deep Learning. That paper showed such estimates rank deep architectures in close agreement with test accuracy (a reported 97% correlation on CIFAR) and can be optimized online during training.

The analogy that motivates the approach is invariance learning. Learning Invariances using the Marginal Likelihood showed that training loss cannot choose how much invariance a model should have, because invariance only removes flexibility. The evidence can make that choice, and doing so cut Gaussian-process error on MNIST from 2.15% to 1.35%. Ignoring a frame is also an invariance: the prediction becomes insensitive to that stretch of audio. Training loss always prefers to keep every frame available. The evidence keeps a frame only if it helps explain the labels enough to pay for the added flexibility. Our hypothesis is that this yields weights that suppress noise while keeping frames that carry emotional or lexical content, which is where hard deletion is known to fail.

Relation to Prior Work

Speech-side work motivates the gap. Several methods compute weights from physical proxies, each with fixed hand-set parameters:

All of these tune the weighting separately from the task, and several of them break down below 0 dB where pitch and SNR estimates fail.

Two neural methods bring the weighting closer to the task:

Bayesian-side work supplies the method and constrains it:

The closest conceptual neighbor is Bayesian Data Selection. It uses a generalized evidence, the Stein Volume Criterion, to decide which subset of static tabular data a model explains. That method is unsupervised, has no notion of time, and selects data for a model of the inputs. We select frames inside a supervised model of labels, with a temporal weighting network.

Research Program

The system has three parts. The first is a frozen WavLM-large encoder producing $h_t$. The second is a small weighting network $\phi$ with a few thousand parameters, a two-layer temporal convolution ending in a sigmoid. Its inputs are the frame features plus cheap signal descriptors such as the a posteriori SNR, so it can learn more than the classical sigmoid while having that sigmoid inside its hypothesis space. The third is a two-layer prediction head $\theta$ regressing arousal, valence, and dominance.

Because only the head is Bayesian and it is small, we can use a full or Kronecker-factored generalized Gauss-Newton Laplace approximation, which is cheap. Following the online scheme of Scalable Marginal Likelihood Estimation for Model Selection in Deep Learning, training alternates two steps. Gradient steps on $\theta$ minimize regularized training loss. Every few epochs, gradient steps on $\phi$ and on the prior precision maximize the Laplace evidence, differentiated through the Hessian log-determinant.

We compare two objectives for $\phi$. One is the plain evidence. The other is CLML, with the conditioning split tuned only by the evidence itself. To guard against degenerate solutions, we log the entropy of the weights and the fraction of frames with weight above one half. A weighting that collapses to a single frame or to uniform weights is reported as a failure mode, not hidden.

On the analysis side, we will measure the Occam trade-off directly. We compute the effective number of parameters $\gamma$ in the sense of Bayesian Model Comparison and Backprop Nets as a function of the average frame weight, to check that listening to fewer frames really lowers model complexity in this architecture. We will also relate the learned weights to SNR and to lexical content.

Baselines

The naive reference point is uniform mean pooling of frozen WavLM-large features with the same head. It is trained with weight decay tuned on the MSP-Podcast development set. Every other method must beat this to justify itself.

The strongest existing method is KoS-FRCRN from Keep, Delete, or Substitute: Frame Selection Strategy for Noise-Robust Speech Emotion Recognition. Its authors report that at −5 dB SNR it improves arousal, dominance, and valence by 17.5%, 16.6%, and 10.6% relative to the original model on MSP-Podcast. The file does not give the absolute scores behind those relative gains, so we will re-run KoD and KoS ourselves. We will use the same noise mixtures, the same SNR grid from −5 to 20 dB, and the same frozen-versus-fine-tuned setting as our model. We will report both absolute scores and relative gains over our own uniform baseline. Beating it means matching KoS on arousal and dominance at −5 dB while exceeding it on valence. We require this without an external enhancement model and without clean/noisy frame labels.

The classical heuristic baseline is SNR-sigmoid weighting in the style of Weighting observation vectors for robust speech recognition in noisy environments, applied to pooling rather than emission scores. Its slope and offset are grid-searched on the development set with the same search budget we give every validation-tuned method. We also include a speech-versus-noise likelihood-ratio weighting in the spirit of Speaker identification under noisy environments by using harmonic structure extraction and reliable frame weighting. It uses Gaussian mixtures on WavLM features, fit to clean and noise-only training audio.

The ablation that isolates our key ingredient uses the identical weighting network $\phi$, trained jointly with $\theta$ on ordinary training loss, as in Speaker Adaptive Training for Speech Recognition Based on Attention-Over-Attention Mechanism. Its dropout, weight decay, and a weight-sparsity penalty are tuned on the development set. Our method gets no development set for $\phi$ or the prior. It gets the same wall-clock budget, which we expect to be roughly two to three times one training run given the online evidence updates. The competitor gets the same total compute spent on its grid search. If evidence-trained weights beat this ablation, the gain comes from the objective and not from the architecture.

Why not just…?

Why not just train attention pooling on the task loss and tune regularization on a validation set? This is the real threat. With enough labeled validation data and compute, a tuned sparsity penalty might find the same weights. The matched-budget ablation above settles it on MSP-Podcast. We repeat it in a low-data regime using 10% of the training set, where carving out validation data is costly and where Last Layer Marginal Likelihood for Invariance Learning found evidence-based invariance learning most valuable. If the tuned ablation matches us everywhere, we will say so. The contribution then shrinks to "equivalent weights without a validation split." That is still useful for low-resource corpora, but it is a weaker claim.

Why not just run a speech enhancement network first? Keep, Delete, or Substitute: Frame Selection Strategy for Noise-Robust Speech Emotion Recognition reports that enhancing every frame degrades emotion recognition. Selective substitution beat full-stream enhancement at −5 dB. Enhancement and weighting are also not exclusive. We include an FRCRN-enhanced-input variant of our method, to test whether evidence weighting adds to enhancement the way observation weighting added to spectral subtraction in Weighting observation vectors for robust speech recognition in noisy environments.

Why not just use a voice activity detector or SNR threshold? On Aurora-2, rVAD: An Unsupervised Segment-Based Robust Voice Activity Detection Method reports a frame error of 24.22% for Kaldi's energy detector against 11.26% for rVAD. On bursty RATS audio, Kaldi's detector exceeds 51% while rVAD stays at 10.27%. Even the good detector only separates speech from non-speech. It cannot tell a speech frame that matters for emotion from one that does not, and it is tuned by fixed thresholds. We include rVAD-masked pooling as a baseline. We also check whether our weights recover its speech/non-speech decisions on Aurora-2 as a side effect.

Proposed Experiments

The primary benchmark is MSP-Podcast. We mix in noise at −5, 0, 5, 10, and 20 dB, following the protocol of Keep, Delete, or Substitute: Frame Selection Strategy for Noise-Robust Speech Emotion Recognition. We report arousal, valence, and dominance with the concordance-style metric used in that line of work, averaged over three seeds and over held-out noise types not seen in training.

The secondary benchmark is Aurora-2, recast as utterance-level digit classification. It serves two purposes. It gives a second task. It also provides frame-level speech labels, so we can measure the frame error of thresholded learned weights against the rVAD figure of 11.26%. This is a diagnostic of whether the evidence learns to ignore non-speech, not a claim to beat voice activity detectors.

Three checks decide the question.

The first is whether the Laplace evidence of different weighting configurations ranks them in the same order as their held-out test scores across SNR levels. This is the speech analogue of the architecture-ranking result in Scalable Marginal Likelihood Estimation for Model Selection in Deep Learning. If the evidence ranks poorly while CLML ranks well, that confirms the prior-sensitivity warning of Bayesian Model Selection, the Marginal Likelihood, and Generalization in a new domain and dictates which objective to use.

The second is valence at −5 dB, the dimension where hard deletion failed. The proposal succeeds only if evidence-trained soft weights beat KoD on valence and at least match KoS, without an enhancement model.

The third is the matched-budget comparison against the identical weighting network trained on task loss, at full data and at 10% data. A win at low data with a tie at full data would be an honest, narrower result. A loss at both would falsify the central claim that the evidence's Occam pressure is the right signal for deciding which frames to hear.