Why Heuristic Weighting Works: A Theoretical Analysis of Denoising Score Matching

Juyan Zhang, Rhys Newbury, Xinyang Zhang, Tin Tran, Dana Kulic +1 more
8/3/2025
cs.LGstat.APstat.ML

No confident code implementation found for this paper.

Abstract

Score matching enables the estimation of the gradient of a data distribution, a key component in denoising diffusion models used to recover clean data from corrupted inputs. In prior work, a heuristic weighting function has been used for the denoising score matching loss without formal justification. In this work, we demonstrate that heteroskedasticity is an inherent property of the denoising score matching objective. This insight leads to a principled derivation of optimal weighting functions for generalized, arbitrary-order denoising score matching losses, without requiring assumptions about the noise distribution. Among these, the first-order formulation is especially relevant to diffusion models. We show that the widely used heuristical weighting function arises as a first-order Taylor approximation to the trace of the expected optimal weighting. We further provide theoretical and empirical comparisons, revealing that the heuristical weighting, despite its simplicity, can achieve lower variance than the optimal weighting with respect to parameter gradients, which can facilitate more stable and efficient training.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2025heuristic,
  title  = {Why Heuristic Weighting Works: A Theoretical Analysis of Denoising Score Matching},
  author = {Juyan Zhang and Rhys Newbury and Xinyang Zhang and Tin Tran and Dana Kulic and Michael Burke},
  year   = {2025},
  eprint = {2508.01597},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.01597v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.01597.svg)](https://codeofpaper.com/paper/2508.01597)

Discussion