Provable benefits of score matching

Score matching is an alternative to maximum likelihood (ML) for estimating a probability distribution parametrized up to a constant of proportionality. By fitting the ''score'' of the distribution, it sidesteps the need to compute this constant of proportionality (which is often intractable). While score matching and variants thereof are popular in practice, precise theoretical understanding of the benefits and tradeoffs with maximum likelihood -- both computational and statistical -- are not well understood. In this work, we give the first example of a natural exponential family of distributions such that the score matching loss is computationally efficient to optimize, and has a comparable statistical efficiency to ML, while the ML loss is intractable to optimize using a gradient-based method. The family consists of exponentials of polynomials of fixed degree, and our result can be viewed as a continuous analogue of recent developments in the discrete setting. Precisely, we show: (1) Designing a zeroth-order or first-order oracle for optimizing the maximum likelihood loss is NP-hard. (2) Maximum likelihood has a statistical efficiency polynomial in the ambient dimension and the radius of the parameters of the family. (3) Minimizing the score matching loss is both computationally and statistically efficient, with complexity polynomial in the ambient dimension.

Paper

Similar papers

Peer review

Reviewer BCHk7/10 · confidence 4/52023-06-20

Summary

The authors describe an exponential family where the sufficient statistic $T(x)$ contains all non-constant monomials of degree $\leq d$, the background density is $h(x) = \exp(-\sum_{i=1}^n x_i^{d+1})$, and the parameter $\theta$ is constrained to have infinity norm bounded by $B$. Using a reduction from $3\mathsf{SAT}$, they show that under this exponential family, finding the MLE is NP hard, and thus unless $\mathsf{NP} = \mathsf{RP}$, that it would take time exponential in the random vector dimension $n$ to compute the MLE. They also show that the MLE has asymptotic sample efficiency $(nB)^{O(d^3)}$. They show that score matching also has asymptotic sample efficiency $(nB)^{O(d^3)}$. Unlike the MLE, score matching can be solved in time polynomial in the dimension of $\theta$, which if $d$ is considered constant, is polynomial in $n$. This is because the objective corresponding to score matching is convex in $\theta$. This is a concrete example of a situation where score matching has a provable advantage over the MLE (same asymptotic sample efficiency, but one needs exponential time unless $\mathsf{NP} = \mathsf{RP}$ and the other is polynomial time).

Strengths

- clear contribution - relevant related work is discussed - this is a significant result (rigorous justification for potential benefit of score matching over MLE)

Weaknesses

No glaring weaknesses, but the paper was a bit difficult to follow; I found it hard to connect the math-heavy theorem/lemma statements together. For example, I did not understand how Lemmas 4.2 and 4.3 built toward Lemma 4.4 on my initial read. Typos spotted: - Equation under line 172, $\|\theta\|_2^2$ should be $\|\theta^*\|_2^2$? - Line 482, $f''(x) = 56\gamma x^6 - 2\beta + 6\beta x^2$ should be $f''(x) = 56\gamma x^6 - 4\beta + 12\beta x^2$ I think, but this doesn't affect anything - Lemma A.6, the $(2/e)^n$ should be replaced with $(e/2)^n$ - Math at the bottom of page 16, second line, you want to minimize the exponent so instead of $-BM(BM)^{-d}$ it should be $-BM(BM)^{-1}$ right? I don't think this affects anything though since you bound it by $-1$ regardless - Math under line 519, I'm not sure that $(n+\ell)\log(2L) + 2 + n\log(BM) \leq \frac14 L^{d+1}$, unless some lower bound on $d$ is assumed? Like I'm not sure if that holds for $d=1$? - Lemma B.3, bound on Laplacian in the Lemma statement doesn't seem to match the derivation (exponent of 2d vs 4d) - Line 564 - this appears to be claiming that $\sum_{j=0}^k \binom{k}{j}^2 = 2^k$, which is false? I think you could bound it by $2^{2k}$ though by Cauchy-Schwarz, so it probably doesn't matter, just changes some constants down the line. - Line 573 - $B_\iota \to W_\iota$ - Line 583 - $\alpha_i \to d_i$

Questions

- Why is a nonzero constant not allowed for the polynomial defined by the sufficient statistic of the exponential family? It wasn't clear to me, also why that was a requirement for Lemma 4.4 to hold. Does that cause a problem? - This does not appear necessary to have in this work to me, but how close are we to obtaining finite sample bounds for score matching, analogous to the ones (I assume there are?) for MLE?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

N/A

Reviewer xxrR7/10 · confidence 3/52023-07-06

Summary

This paper provides an example of fitting exponential family models for which score matching and MLE are both statistically efficient, but MLE is computationally hard to optimize.

Strengths

The strength is in the construction of an example to showcase the benefit of score matching over MLE.

Weaknesses

Several aspects could be improved. 1. First, for the computational lower bound, the points to evaluation loss and gradient is worst case. When one has samples from such distribution, is solving MLE still computationally hard? 2. Although the aim of this paper is to provide examples to advocate for score matching, but for the distribution family proposed in the paper, are there simple (or simpler) estimators that are both computationally and statistically efficient? 3. In the paper, the analysis of the statistical performance is quite crude, which makes it hard to see what's the statistical cost one needs to pay when computation is the restriction. Is there proper computation-statistic tradeoff for the model considered in the paper?

Questions

1. Why constant is removed from the construction of the sufficient statistics?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

N/A

Reviewer bZrt6/10 · confidence 3/52023-07-06

Summary

In this paper, the authors present a mathematical setting where Score Matching (SM) method has more statistical benefits than Maximum Likelihood (ML) technique, when estimating a parameterized probability distribution $p_\theta \in P(\mathbb{R}^n)$ known up to a normalizing constant $Z_\theta$. In particular, they describe an explicit exponential family of distributions $F$ for which SM loss $L_{SM}$ is efficient to compute, with same statistical efficiency as ML loss $L_{ML}$ (Theorem 2 and 3), while $L_{ML}$ is shown to be intractable in polynomial time depending on the parameters of this family (Theorem 1). Given an odd integer $d$ and $B>0$, any distribution $p_\theta \in F$ is notably defined by (i) its vector of sufficient statistics, which consists of all monomials in $x^1,..., x_n$ of at least degree $1$ and at most degree $d$, and (ii) its parameter $\theta$, which lies in the $\ell_\infty$-ball with radius $B$. This work is the first one to put in perspective the statistical efficiency of SM and ML for a large family of continuous probability distributions. Three main theoretical results are stated here. In Theorem 1, the authors prove that, for any $p_\theta \in F$ (with $d=7$) and any set of $N$ independent samples from $p_\theta$, it is NP-hard (in $n$ and $N$) to provide an accurate approximation of $L_{ML}(\theta)$ and $\nabla L_{ML}(\theta)$. This result comes from the difficulty to approximate $Z_\theta$, which is necessary to compute $L_{ML}(\theta)$, while it does not appear in $L_{SM}(\theta)$. In Theorem 2, they derive an upper bound of the $\ell_2$-error between $\theta$ and its ML estimator obtained via $N$ samples, in the limit where $N\to \infty$, for any $p_\theta \in F$. Their proof relies on the asymptotic result given by [1] and consists of lower bounding the smallest eigenvalue of the Fisher information matrix of $p_\theta$. In Theorem 3, they derive the same upper bound in the case of the SM estimator for any $p_\theta \in F$, by invoking the asymptotic result from [2] and bounding the Poincaré constant of $p_\theta$. Combined together, Theorems 2 and 3 show that ML and SM techniques roundly have the same statistical efficiency. [1] Asymptotic statistics, Van der Vaart, 2000. [2] Statistical Efficiency of Score Matching: The View from Isoperimetry, Koehler et al., 2022.

Strengths

- This work provides a fair comparison between statistical efficiency for SM and ML technique, which is of primary interest for the community of machine learning. - Although Theorems 2 and 3 rely on important theoretical results, their results are not straightforward to obtain, and their proofs are original and clear to understand.

Weaknesses

Although the theoretical results presented here are interesting in their own, they should be combined with numerical experiments, which should illustrate the trade-off between these two methods in practice, depending on the parameters of the exponential family.

Questions

Why do the authors do not keep the whole dependence in $d$ in the bound for Theorems 2 and 3 ? Does it change something between SM and ML ?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

4 excellent

Presentation

3 good

Contribution

2 fair

Limitations

In this work, the asymptotic theory is elaborated on the fact that the MLE and SM estimators can be computed exactly from a collection of samples. However, to compare these two techniques for practical purpose, one should include approximation error on the estimator.

Reviewer fYcf7/10 · confidence 3/52023-07-06

Summary

The paper attempts to elucidate the theoretical reasoning for the benefits seen in score matching. The author proposes a family of exponential distributions that can efficiently compute the score matching loss while having a comparable statistical efficiency to that of maximum likelihood.

Strengths

- The paper is well written/organized and easy to follow. The author does a good job introducing related theoretical information. - Equations are extensively described with a thorough description.

Weaknesses

- There are no experimental results. It would be nice if there were some machine learning models that were optimized with score matching and ML and compared with each other.

Questions

- What is the benefit of using this score matching method than taking the denoising score matching approach? - Is this approach more computational efficient than denoising score matching? How well those this score matching approach scale for high dimensional data?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

4 excellent

Presentation

3 good

Contribution

3 good

Limitations

The author has adequately addressed limitations.

Reviewer bZrt2023-08-14

Thank you for your response. Although I find the theoretical result really interesting and non-trivial, I think that there should be numerical experiments that support the theory. That is why I keep my score unchanged.

Reviewer xxrR2023-08-15

Thanks for the response to address my questions.

Reviewer BCHk2023-08-16

Thank you for taking the time to address my comments!

Reviewer fYcf2023-08-21

Thank you for your response. I will keep my score the same.

Program Chairsdecision2023-09-21

Decision

Accept (spotlight)

© 2026 NYSGPT2525 LLC