Diffusion-Based Hypothesis Testing and Change-Point Detection

Sean Moushegian, Taposh Banerjee, Vahid TarokharXiv 2025 · DOI

Introduction

In statistical inference, hypothesis testing and change-point detection are fundamental tasks. The goal is to identify whether data follows a null or alternative distribution or to pinpoint when a distribution shift occurs. While the Log-Likelihood Ratio (LLR) and CUSUM algorithms are theoretically optimal, they require full knowledge of probability density functions (PDFs). In many modern deep learning contexts, we only have access to the score function—the gradient of the log-density. This paper introduces a diffusion-based framework that leverages score functions to achieve near-optimal performance without requiring normalized densities.

Methodology: Bridging the Gap with Diffusion Divergence

The core innovation is the introduction of diffusion divergence, which generalizes standard Fisher divergence. By incorporating a matrix-valued weight function $m(X)$, the framework gains the flexibility needed to mimic likelihood-based tests.

Neural Optimization

Since the optimal $m(X)$ is often analytically intractable, the authors employ a Multi-Layer Perceptron (MLP) to approximate it. They define differentiable loss functions ($L_{CPD}$ and $L_{HT}$) that allow the network to be trained to maximize detection power while maintaining strict control over false alarm rates. This approach ensures that the resulting test statistic is both powerful and statistically valid.

Experimental Results

The framework was evaluated on three synthetic datasets: Multivariate Gaussian, Gauss-Bernoulli Restricted Boltzmann Machines (GB-RBM), and Quartic Exponential distributions. These models represent varying levels of complexity where score functions are available but densities may be difficult to compute.

Comparison of Expected Detection Delay (EDD) vs. log Average Run Length (ARL) across three distribution types.

As shown in the figure above, the diffusion-based method (orange) consistently outperforms the standard score-based approach (green). In the Gaussian and GB-RBM cases, the performance of the diffusion-based test nearly matches the theoretical optimum of the LLR-based test (blue). In the Quartic Exponential case, the learned transformation $m(X)$ provides a significant boost, demonstrating the method's robustness in scenarios where standard score matching fails.

Key Insights

  • Generalization: Standard score-based methods are shown to be a special case of this framework where $m(X)$ is the identity matrix.
  • Scale Invariance: The algorithms do not require normalization constants, making them ideal for energy-based models.
  • Theoretical Soundness: The paper provides rigorous bounds for error exponents and detection delays, confirming the framework's reliability.

Conclusion and Future Work

While the diffusion-based approach cannot exceed the performance of the LLR (the theoretical ceiling), it effectively bridges the gap for complex models where the LLR is unavailable. Future research will focus on applying this framework to high-dimensional real-world data, such as sensor arrays and image manifolds, where score-matching techniques are already prevalent.

Summary updated

BibTeX
@misc{moushegian2025diffusion,
  author = {Sean Moushegian and Taposh Banerjee and Vahid Tarokh},
  title = {{Diffusion-Based Hypothesis Testing and Change-Point Detection}},
  year = {2025},
  eprint = {2506.16089},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.16089},
}
Figure