Table of Contents
Fetching ...

GEPC: Group-Equivariant Posterior Consistency for Out-of-Distribution Detection in Diffusion Models

Yadang Alexis Rouzoumka, Jean Pinsolle, Eugénie Terreaux, Christèle Morisseau, Jean-Philippe Ovarlez, Chengfang Ren

TL;DR

The paper tackles out-of-distribution detection for diffusion models by exploiting symmetry properties of the learned score field. It introduces GEPC, a training-free probe that measures how consistently the score transforms under a finite group $\mathcal{G}$ by transporting inputs and re-mapping scores across timesteps, then pooling and calibrating the residuals using ID data. Theoretical results relate the ideal GEPC residual to an equivariance-breaking functional and provide ID upper and OOD lower bounds, clarifying when posterior consistency should hold. Empirically, GEPC with ID-only calibration achieves competitive AUROC against diffusion-based baselines on CIFAR-scale tasks and yields strong detection and interpretable equivariance-breaking maps in cross-domain radar SAR imagery, all without Jacobian computations or backpropagation. The approach is lightweight, training-free, and provides interpretable localization maps, with potential extensions to continuous groups and multi-modal diffusion models.

Abstract

Diffusion models learn a time-indexed score field $\mathbf{s}_θ(\mathbf{x}_t,t)$ that often inherits approximate equivariances (flips, rotations, circular shifts) from in-distribution (ID) data and convolutional backbones. Most diffusion-based out-of-distribution (OOD) detectors exploit score magnitude or local geometry (energies, curvature, covariance spectra) and largely ignore equivariances. We introduce Group-Equivariant Posterior Consistency (GEPC), a training-free probe that measures how consistently the learned score transforms under a finite group $\mathcal{G}$, detecting equivariance breaking even when score magnitude remains unchanged. At the population level, we propose the ideal GEPC residual, which averages an equivariance-residual functional over $\mathcal{G}$, and we derive ID upper bounds and OOD lower bounds under mild assumptions. GEPC requires only score evaluations and produces interpretable equivariance-breaking maps. On OOD image benchmark datasets, we show that GEPC achieves competitive or improved AUROC compared to recent diffusion-based baselines while remaining computationally lightweight. On high-resolution synthetic aperture radar imagery where OOD corresponds to targets or anomalies in clutter, GEPC yields strong target-background separation and visually interpretable equivariance-breaking maps. Code is available at https://github.com/RouzAY/gepc-diffusion/.

GEPC: Group-Equivariant Posterior Consistency for Out-of-Distribution Detection in Diffusion Models

TL;DR

The paper tackles out-of-distribution detection for diffusion models by exploiting symmetry properties of the learned score field. It introduces GEPC, a training-free probe that measures how consistently the score transforms under a finite group by transporting inputs and re-mapping scores across timesteps, then pooling and calibrating the residuals using ID data. Theoretical results relate the ideal GEPC residual to an equivariance-breaking functional and provide ID upper and OOD lower bounds, clarifying when posterior consistency should hold. Empirically, GEPC with ID-only calibration achieves competitive AUROC against diffusion-based baselines on CIFAR-scale tasks and yields strong detection and interpretable equivariance-breaking maps in cross-domain radar SAR imagery, all without Jacobian computations or backpropagation. The approach is lightweight, training-free, and provides interpretable localization maps, with potential extensions to continuous groups and multi-modal diffusion models.

Abstract

Diffusion models learn a time-indexed score field that often inherits approximate equivariances (flips, rotations, circular shifts) from in-distribution (ID) data and convolutional backbones. Most diffusion-based out-of-distribution (OOD) detectors exploit score magnitude or local geometry (energies, curvature, covariance spectra) and largely ignore equivariances. We introduce Group-Equivariant Posterior Consistency (GEPC), a training-free probe that measures how consistently the learned score transforms under a finite group , detecting equivariance breaking even when score magnitude remains unchanged. At the population level, we propose the ideal GEPC residual, which averages an equivariance-residual functional over , and we derive ID upper bounds and OOD lower bounds under mild assumptions. GEPC requires only score evaluations and produces interpretable equivariance-breaking maps. On OOD image benchmark datasets, we show that GEPC achieves competitive or improved AUROC compared to recent diffusion-based baselines while remaining computationally lightweight. On high-resolution synthetic aperture radar imagery where OOD corresponds to targets or anomalies in clutter, GEPC yields strong target-background separation and visually interpretable equivariance-breaking maps. Code is available at https://github.com/RouzAY/gepc-diffusion/.
Paper Structure (86 sections, 10 theorems, 92 equations, 5 figures, 9 tables, 1 algorithm)

This paper contains 86 sections, 10 theorems, 92 equations, 5 figures, 9 tables, 1 algorithm.

Key Result

Proposition 4.2

For any marginal $p_t$, define With the shorthand $\mathbb E_{p_t,g}[\cdot]\coloneqq \mathbb E_{\mathbf{x}\sim p_t,\;g\sim\nu_\mathcal{G}}[\cdot]$, we have

Figures (5)

  • Figure 1: GEPC. We probe group-consistency of a pretrained diffusion score field by transporting $\mathbf{x}_t$ under $g\in\mathcal{G}$, transporting scores back, and measuring $\mathbf r_t$. Residual energies are pooled, aggregated over selected timesteps, and calibrated with ID-only statistics, yielding an OOD score and equivariance-breaking maps.
  • Figure 2: GEPC on HRSID SAR imagery (LSUN-$256$ backbone, no SAR fine-tuning). We visualise the pre-pooling residual magnitude map using a global normalisation (shared scale) to enable direct comparison between ID and OOD (Appendix \ref{['app:radar-details']}, Figure \ref{['fig:sar_qual_appendix']}).
  • Figure 3: Representative ablations for GEPC (CIFAR10 as ID, SVHN as OOD). (a) Single-feature variants under the same ID-only protocol. (b) Per-transform AUROC computed from the raw transported-gap component (no calibration); the dashed line averages the same component over $g\in\mathcal{G}$. (c) Single-timestep AUROC computed from the raw transported-gap component; the dashed line averages the same component over the retained timesteps.
  • Figure 4: Score distributions (ID vs OOD) for a representative pair (SVHN as ID, CIFAR-100 as OOD). Left: score magnitude $E_t(\mathbf{x}_t)$ (a baseline diagnostic, not GEPC). Middle: single-step equivariance residual energy $R_t(\mathbf{x}_t,g)$. Right: time-averaged GEPC score $\mathrm{GEPC}(\mathbf{x}_0)$ aggregating $R_t$ over $t\in\mathcal{T}$ with weights $w_t$ and uniform $g\sim\nu_{\mathcal{G}}$.
  • Figure 5: Qualitative GEPC localisation on SAR patches (LSUN-$256$, no SAR fine-tuning). Residual maps are globally normalised by a shared $v_{\mathrm{global}}$ (computed on an ID pool) to enable comparison across ID/OOD and across datasets.

Theorems & Definitions (18)

  • Definition 4.1: GEPC
  • Proposition 4.2: Expected GEPC residual bounds
  • Proposition 4.3: Cross-backbone pointwise bounds
  • Lemma 1.1: Conditional-noise / score identity
  • proof
  • Lemma 1.2: Tweedie (additive form)
  • proof
  • Lemma 1.3: Tweedie for DDPM
  • Lemma 1.4: Posterior covariance identity
  • proof
  • ...and 8 more