---
title: 'Expected Error Reduction: Methods & Applications'
url: https://www.emergentmind.com/topics/expected-error-reduction
type: topic
---

# Expected Error Reduction: Methods & Applications

Expected Error Reduction (EER) denotes a class of decision criteria that evaluate a candidate intervention by the decrease it is expected to induce in a target error or loss after marginalizing over latent labels, hypotheses, paths, or noise variables. In its canonical active-learning formulation, EER selects the candidate sample that, in expectation, maximally decreases the error on an unlabeled set [2211.09283]. Closely related expectation-based error objectives also appear in sequence training through expected word error rate, in adversarial purification through expected reconstruction error, and in post-training quantization through proxies for expected squared output error [1706.02776] [2602.06269] [2407.06794].

## 1. Canonical formulation

The classical EER criterion in active learning is to evaluate each unlabeled candidate \(x_i\) by averaging the future error of a model retrained with \((x_i,y_i)\) over the unknown label \(y_i\). In simplified form,
\[
\text{EER}(x_i) = \mathbb{E}_{y_i \sim P(y_i|x_i)}\left[ \text{Error}( \text{model trained with } (x_i, y_i)) \right].
\]
Operationally, the original algorithm considers each candidate \(x_i\), retrains the model for every possible label \(y_i\), computes the resulting error on the remaining unlabeled pool, weights by the current predictive distribution \(P(y_i|x_i)\), and selects the candidate with the smallest expected future error [2211.09283].

This formulation is distinct from criteria that score points by uncertainty alone. It is directly aligned with downstream task loss, because the object being optimized is the expected post-acquisition error rather than a proxy for epistemic uncertainty. At the same time, the original procedure is computationally prohibitive for modern models, since it requires retraining from scratch for every candidate and every possible label; the paper notes that such a strategy is feasible only for extremely fast models such as Naive Bayes [2211.09283].

## 2. Bayesian reformulation for deep active learning

A computationally efficient reformulation places EER in a Bayesian setting. With labeled data \(\mathcal D\), Bayesian model parameters \(\theta \sim P(\theta|\mathcal D)\), validation labels \(Y_j\), and candidate label \(Y_i\), the score can be written as
\[
\text{Score}_i = -\mathbb{E}_{y_i \sim Y_i | \mathcal{D}} \left[ \sum_{j=1}^{n_\text{val}} \min_{a \in \mathcal{A}} \mathbb{E}_{y_j \sim Y_j | \mathcal{D}, Y_i = y_i} [\ell(y_j, a)] \right].
\]
This removes explicit retraining and replaces it with posterior updating through sampled parameter uncertainty [2211.09283].

Two concrete variants are developed. For log-loss, Minimization of Expected Log-Likelihood Loss (MELL) has score
\[
\text{Score}_i = - \sum_{j=1}^{n_\text{val}} H(Y_j | Y_i),
\]
or equivalently
\[
\text{Score}_i = n_\text{val} H(Y_i) - \sum_{j=1}^{n_\text{val}} H(Y_j, Y_i).
\]
For zero-one loss, Minimization of Expected Zero-One Loss (MEZL) is
\[
\text{Score}_i = \sum_{c \in [C]} \sum_{j=1}^{n_\text{val}} \max_{c' \in [C]} P(Y_j = c', Y_i = c ) - n_\text{val}.
\]
The required marginals and pairwise joint label probabilities are estimated from posterior parameter samples,
\[
P(Y_i = c) \approx \frac{1}{T} \sum_{t=1}^T P(Y_i = c | \theta_t),
\qquad
P(Y_j = c', Y_i = c) \approx \frac{1}{T} \sum_{t=1}^T P(Y_j = c' | \theta_t) P(Y_i = c | \theta_t),
\]
with Monte Carlo dropout used as a practical sampling mechanism, and cyclical SG-MCMC discussed as an alternative [2211.09283].

Empirically, MELL was evaluated on seven image-classification datasets with and without artificially induced or natural data shift, totaling fourteen experimental settings. It outperformed or was tied as best in twelve of the fourteen settings. Only BADGE occasionally outperformed MELL, but BADGE was reported as orders of magnitude slower and infeasible on several computationally intensive setups. MEZL typically underperformed MELL and could underperform random selection. The method was also described as model-agnostic, requiring only probabilistic predictions and a Bayesian sampler [2211.09283].

## 3. Direct optimization of expected task error in speech recognition

In automatic speech recognition, the same general principle appears as direct optimization of expected word error rate (WER). Minimum Bayes Risk training minimizes the expected loss over decoding hypotheses,
\[
\mathbb{E}[L(y, y_\text{ref})] = \sum_\pi P(\pi \mid x, \lambda) L(\overline{y}(\pi), y_\text{ref}),
\]
and expected WER specializes this to
\[
\mathbb{E}[L_\mathrm{WER}] = \sum_\pi P(\pi \mid x, \lambda) \mathrm{WER}(\overline{y}(\pi), y_\text{ref}).
\]
Here \(\pi\) is a path through a decoding lattice, \(P(\pi \mid x,\lambda)\) is its normalized probability, and \(\overline{y}(\pi)\) is the output word sequence [1706.02776].

The technical obstacle is that WER does not decompose additively over frames. By contrast, state-level minimum Bayes risk (sMBR) uses a frame-level loss that interacts well with the expectation semiring. Exact expected-WER training therefore requires lattice expansion and error marking, which increases lattice size, limits utterance length, and is poorly suited to on-the-fly lattice generation [1706.02776].

A sampling-based alternative approximates both the expected loss and its gradient by Monte Carlo sampling of paths from the training lattices. Paths are drawn by backward filtering–forward sampling, the loss is averaged,
\[
\mathbb{E}[L] \approx \frac{1}{I} \sum_{i=1}^I L_i,
\]
and the gradient is estimated with a variance-reduced baseline,
\[
\nabla \mathbb{E}[L] \approx \frac{I}{I-1} \overline{(L_i - \overline{L_i}) \nabla \log w(\pi_i, z)}.
\]
The subtraction of the sample mean loss reduces gradient variance, in the same spirit as policy-gradient variance reduction [1706.02776].

On a two-channel Google Home query-recognition task, optimizing expected WER gave a 5% relative improvement in WER over a well-tuned sMBR baseline. The reported overall WER changed from 6.6 for sMBR to 6.2 for sampled EMBR. On a one-channel Voice Search task, relative reductions of 3–6% were observed. The method was reported to have similar wall-clock time per step to sMBR and to work with arbitrary loss criteria defined on output sequences [1706.02776].

## 4. Expected reconstruction error in adversarial purification

In score-based adversarial purification, the operative objective is the expected reconstruction error (ERE). For a point \(x\) and noise level \(\sigma\),
\[
R(x; \sigma) = \mathbb{E}_{\Xi} \left[ \|\Xi + \sigma s(x + \sigma \Xi; \sigma)\|_2^2 \right], \quad \Xi \sim \mathcal{N}(0, I),
\]
where \(s(x;\sigma)=\nabla_x \log p_{Y_\sigma}(x)\) is the score of the Gaussian-smoothed data distribution. Using Tweedie’s formula, the same quantity can be written as
\[
R(x; \sigma) = \frac{1}{\sigma^2} \mathbb{E}_{\Xi} \left[ \|x - \mathbb{E}[X|Y_\sigma = x + \sigma \Xi]\|_2^2 \right].
\]
This objective measures the average squared distance from \(x\) to its denoised reconstruction under Gaussian corruption [2602.06269].

Because \(R(x;\sigma)\) is intractable in closed form, it is estimated by Monte Carlo:
\[
\widehat{R}_\theta(x; \sigma) = \frac{1}{m} \sum_{i=1}^m \| \xi_i + \sigma s_\theta(x + \sigma \xi_i; \sigma) \|_2^2.
\]
The procedure is made deterministic at test time by reusing the same random seeds, which is intended to prevent the degradation of effective robustness observed in stochastic purification approaches under white-box attacks with access to system randomness [2602.06269].

Purification is performed locally around a potentially adversarial input and is combined with input-space sharpness-aware minimization (SAM), so that the selected point has not only low ERE but also low local sharpness. The stated motivation is that approximate score models can create spurious sharp local minima, whereas flatter regions are more likely to correspond to stable high-density areas of the data distribution. The small-noise asymptotic expansion
\[
R(x; \sigma) = d + \sigma^2 \|s(x,0)\|_2^2 + 2 \sigma^2 \operatorname{tr}(\nabla_x s(x,0)) + O(\sigma^3)
\]
shows that minimizing ERE encourages stationary points of the density and favors local concavity, hence local maxima. Under local assumptions including piecewise affine score structure and strong concavity, recovery of a local maximizer is proved in the small-noise limit, with
\[
\|x'_\sigma - x^\star_\sigma\|_2 \leq \frac{C}{\sigma\mu}\exp\left(-\frac{d}{8} \left(\frac{\varrho}{\sigma} - 1\right)^2\right).
\]
This gives a formal link between ERE minimization and movement toward local maximizers of the Gaussian-smoothed density [2602.06269].

On CIFAR-10, the method was evaluated under gray-box PGD20 and adaptive BPDA attacks with up to 200 steps. It reportedly attained adversarial accuracies of up to approximately 69% under deterministic white-box adaptive attacks, compared to below 40% for the best previous methods, while maintaining clean accuracy in the range 85–91%. The stated limitations are the local strong-concavity requirement, dependence on score-model quality, sensitivity to the purification radius, and reliance on Monte Carlo ERE estimation despite deterministic deployment via fixed seeds [2602.06269].

## 5. Surrogate expected error reduction in post-training quantization

Post-training quantization of vision transformers uses a related but surrogate formulation: the target is the expected squared norm of the block output error induced by quantization. With quantization perturbation \(\delta \mathbf{W}^s = \mathbf{W}_q^s - \mathbf{W}^s\) and block input \(\bar{\mathbf{x}}^s\),
\[
\Delta \mathbf{y}^s = \delta \mathbf{W}^s \bar{\mathbf{x}}^s,
\qquad
\mathbb{E} [ \| \delta\mathbf{W}^s\bar{\mathbf{x}}^s \|_2^2 ]
\]
is the quantity of interest. Because this expectation is intractable over the true input distribution, ERQ replaces it with the proxy
\[
\delta\mathbf{W}^s (\boldsymbol{\mu}\boldsymbol{\mu}^T + \boldsymbol{\Sigma}) (\delta\mathbf{W}^s)^T,
\]
where \(\boldsymbol{\mu} = \mathbb{E}[ \bar{\mathbf{x}}^s ]\) and \(\boldsymbol{\Sigma} = \text{Cov}( \bar{\mathbf{x}}^s )\), both estimated from a calibration set [2407.06794].

ERQ is described as a two-step PTQ method that reduces activation and weight quantization errors sequentially. The method combines Reparameterization Initialization, Ridge Regression with a closed-form solution, Dual Uniform Quantization, and iterative Rounding Refinement using an empirically derived proxy. The stated objective is layer-wise representation preservation through direct reduction of quantization-induced perturbation on each block output [2407.06794].

The reported empirical effect is a reduction of layerwise expected output error and improved downstream accuracy. The summary states that ERQ achieves up to 2–3\(\times\) reduction in layerwise expected output error compared to baseline quantization, with 1–4% absolute gains in final top-1 ImageNet accuracy especially in low-bitwidth regimes, and that for W3A4 ViT-S it surpasses GPTQ by 36.81% in accuracy [2407.06794].

## 6. Methodological themes and limitations

Across these formulations, exact evaluation of future error is typically unavailable or computationally prohibitive. Active-learning EER replaces retraining with Bayesian parameter sampling; sampled EMBR replaces exact lattice expansion with Monte Carlo path sampling; adversarial purification estimates ERE with deterministic Monte Carlo; and ERQ replaces the true expectation over layer inputs with a mean-covariance proxy estimated from calibration data [2211.09283] [1706.02776] [2602.06269] [2407.06794]. This suggests a common methodological pattern: expected-error-reduction objectives are usually made practical by replacing exact post-intervention loss with a tractable estimator or surrogate.

The same works also show that direct task alignment does not remove the need for careful approximation design. In active learning, MEZL can underperform random selection and MELL depends on posterior sampling quality [2211.09283]. In speech recognition, sampled expected WER has higher variance than exact expectation and requires variance reduction through centering of sample losses [1706.02776]. In adversarial purification, the theoretical guarantees depend on local score-model assumptions and strong concavity, and the practical outcome depends on the quality of the learned score and the choice of purification radius [2602.06269]. In quantization, the expected-error objective is not optimized exactly but through a proxy whose quality depends on calibration statistics and the near-linearity of transformer blocks [2407.06794].

Within this broader landscape, EER is best understood not as a single algorithm but as a design principle: select the next query, hypothesis, reconstruction, or quantization configuration by estimating how much it will reduce the task-relevant error in expectation. The principle is shared, but the technical realization varies with the structure of the uncertainty being marginalized and with the computational constraints of the target domain.

Source: https://www.emergentmind.com/topics/expected-error-reduction