The Signal in the Noise: OOD Detection Through Goodness-of-Fit Testing in Factorised Latent Spaces

Philipp Bomatter, Jack Geary, Henry GoukarXiv 2026

TL;DR

Deep generative models should be ideal for out-of-distribution (OOD) detection, but their likelihood scores are notoriously unreliable and heavily biased by image complexity. This paper introduces Signal in the Noise (SITN), a method that shifts the focus from data-space likelihoods to the latent noise space of Continuous Normalizing Flows. By performing single-sample goodness-of-fit testing against a standard Gaussian prior, SITN achieves state-of-the-art OOD detection with strict false-positive control and zero requirement for OOD training data.

What Problem Does This Paper Address?

When machine learning models encounter out-of-distribution (OOD) data—like a medical diagnostic tool seeing an artifact it wasn't trained on—they often fail catastrophically while maintaining high confidence. Deep generative models like Continuous Normalizing Flows (CNFs) explicitly model data distributions, making them a natural candidate to flag these anomalies via exact likelihood computation.

However, in high dimensions, likelihood-based OOD detection fails spectacularly. Models trained on complex datasets (like CIFAR-10) consistently assign higher likelihoods to simpler, completely unrelated datasets (like MNIST or SVHN). This happens because likelihood is dominated by low-level features and "complexity bias"—simpler images inherently reside in regions of higher probability density. Existing fixes either require access to auxiliary OOD datasets, introduce massive computational overhead, or fail to fully escape this complexity bias.

Methods

SITN abandons data-space likelihoods entirely. Instead, it leverages a core property of CNFs: they are deterministic, invertible, and mass-preserving mappings that transform complex data into a completely factorized Gaussian noise prior, $\mathcal{N}(0, I)$.

If an image is truly in-distribution (ID), mapping it backward through the flow yields typical Gaussian noise. If the image is OOD, it maps to an atypical noise vector.

Figure 1: Illustration of OOD detection in the noise space. CNF models are trained to map noise samples from a standard normal distribution to the target distribution (ID). Since the resulting flow is a probability mass-conserving diffeomorphism, OOD samples with low probability mass under the target distribution will not correspond to typical Gaussian noise samples in noise space (crossed dotted lines), such that OOD detection can be cast as a goodness of fit test in the noise space.

Because the Gaussian prior factorizes completely, every single dimension of a high-dimensional latent vector $Z$ should act as an independent and identically distributed (i.i.d.) sample from a univariate standard normal distribution. SITN evaluates this at the single-sample level using two complementary statistical tests:

  1. Marginal Normality: Uses the Anderson-Darling (AD) statistic to check if the distribution of elements in the latent vector matches a standard normal distribution (detecting anomalous means, variances, or shapes).
  2. Dimensional Independence: Uses the Coefficient of Variation (CV) of the empirical power spectrum to check for spatial structure or autocorrelation, ensuring the dimensions are truly independent.

SITN combines these two metrics using a max-quantile strategy calibrated on an ID validation set. This allows practitioners to set a threshold that guarantees strict control over the false positive rate (Type I error).

Datasets

The authors evaluated their method using standard computer vision datasets downsampled to $32 \times 32$ pixels for consistency:

  • CIFAR-10: Complex natural images across 10 categories (used as ID).
  • SVHN (Street View House Numbers) & CelebA: Used as OOD targets against CIFAR-10, and vice versa.
  • CIFAR-10-C: A benchmark containing 19 different synthetic corruptions (e.g., blur, gasussian noise, JPEG compression, weather effects) across multiple severity levels to test robustness against environmental perturbations.

Key Insights and Ideas

  • The Latent Space Doesn't Lie: While the vector field's divergence can artificially inflate data-space likelihoods, the mass-preserving nature of CNFs guarantees that OOD data manifests as structural anomalies in the noise space.
  • High Dimensionality is a Feature, Not a Bug: Usually, the "curse of dimensionality" breaks OOD detection. SITN turns this into a blessing: because image data is high-dimensional, a single latent vector contains thousands of elements—plenty of data points to run robust statistical goodness-of-fit tests on a single sample.
  • Complete Decoupling from Complexity: By analyzing the statistical properties of the noise rather than the density of the data space, SITN is completely immune to the complexity bias that plagues traditional likelihood methods.

Key Results

  • Cross-Dataset Benchmarks: As shown in the paper's primary evaluations, when a model is trained on CIFAR-10 and tested on SVHN, standard log-likelihood gets a dismal AUROC of 0.105 (worse than guessing). SITN achieves an AUROC of 0.946.
  • Robustness to Corruptions: On the CIFAR-10-C benchmark, SITN achieves the highest macro average AUROC (0.85) compared to Log-likelihood (0.59), Typicality (0.69), and DoSE (0.78), showing remarkable stability across diverse image corruptions.
  • Qualitative Validation: Inspecting the images with the highest OOD scores reveals that while baseline methods mistakenly flag simple in-distribution images as OOD due to complexity bias, SITN successfully isolates actual OOD samples.
Figure 3: Images with the highest and lowest OOD scores for each method in the CIFAR-10→SVHN setup, i.e. trained on CIFAR-10 and evaluated on the test split of CIFAR-10 as ID and the test split of SVHN as OOD. ID images from CIFAR-10 are marked with a blue border and OOD images from SVHN with an orange border. All baseline methods falsely flag in-distribution samples as most OOD, and both Typicality and DoSE inherit failure cases from the complexity-biased likelihood scores.

Limitations and Future Work

The authors highlighted one notable architectural edge case: when using a standard UNet architecture in the CNF, the model struggles to map large, flat, constant background patches into pure Gaussian noise. This causes the Anderson-Darling component to occasionally flag images with flat backgrounds as OOD, even if they are technically in-distribution.

Future work will focus on mitigating these architectural artifacts, exploring alternative goodness-of-fit statistics to capture more intricate multi-dimensional dependencies, and optimizing the co-design of generative architectures specifically for noise-space OOD testing.

Summary updated

BibTeX
@misc{bomatter2026signal,
  author = {Philipp Bomatter and Jack Geary and Henry Gouk},
  title = {{The Signal in the Noise: OOD Detection Through Goodness-of-Fit Testing in Factorised Latent Spaces}},
  year = {2026},
  eprint = {2605.22496},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.22496},
}
Figure