NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Provable benefits of score matching

Chirag Pabbaraju, Dhruv Rohatgi, Anish Sevekari, Holden Lee, Ankur Moitra, Andrej Risteski

Abstract

This paper provides the first rigorous proof that for certain natural probability distributions—specifically, exponentials of polynomials—Score Matching (SM) is exponentially faster to compute than Maximum Likelihood Estimation (MLE) while remaining nearly as statistically accurate. While MLE is shown to be NP-hard to optimize in this setting, Score Matching offers a computationally efficient alternative that maintains polynomial sample complexity.

Introduction: The Partition Function Problem

In machine learning, Energy-Based Models (EBMs) are frequently used to fit models to complex data. These models define a probability distribution $p_\theta(x) \propto \exp(-E_\theta(x))$. The primary challenge with EBMs is the proportionality constant, known as the partition function ($Z_\theta$). To ensure the probabilities sum to one, the energy function must be integrated over the entire space, a task that is typically mathematically intractable or computationally prohibitive in high dimensions.

Historically, the gold standard for estimation has been Maximum Likelihood Estimation (MLE). While MLE is statistically optimal—using data as efficiently as possible—it requires calculating $Z_\theta$ or its gradient. In high-dimensional spaces, this often necessitates Markov Chain Monte Carlo (MCMC) sampling, which can take an exponential amount of time to converge.

Score Matching (SM) is a popular alternative that sidesteps the partition function entirely. It focuses on the "score"—the gradient of the log-density with respect to the input $x$. Because the derivative of a constant (like $\log Z_\theta$) is zero, the partition function vanishes from the objective. However, until this work, there was a lack of clear theoretical understanding regarding whether this computational shortcut incurs a severe statistical penalty, or if there are specific cases where SM is provably superior to MLE.

Theoretical Framework and Methodology

The authors focus on a specific, natural class of distributions: exponential families where the energy is a polynomial of fixed degree $d$. Because the paper is fundamentally theoretical, it relies on mathematical proofs and reductions from theoretical computer science rather than empirical datasets.

To rigorously compare the two methods, the authors employ three main technical pillars:

  1. Complexity Theory (Hardness): By utilizing a reduction from the 3-SAT problem (a classic NP-complete problem), the authors demonstrate that for polynomials of degree 7, even approximating the MLE objective or its gradient is NP-hard.
  2. Fisher Information Analysis: The authors lower-bound the smallest eigenvalue of the Fisher Information matrix. This establishes that the parameters of the model are "identifiable" from data using a reasonable number of samples, relying on the fact that low-degree polynomials exhibit anti-concentration (they do not "clump up" too much).
  3. Restricted Poincaré Inequalities: To analyze Score Matching, the authors use a framework that relates the statistical efficiency of SM to that of MLE. By bounding the "restricted Poincaré constant"—which measures how well the score captures the variance of the sufficient statistics—they prove that Score Matching does not require significantly more samples than MLE.

Key Findings and Insights

The paper establishes a clear, provable separation between the computational and statistical properties of MLE and Score Matching:

  • MLE is Computationally Hard: Designing a zeroth-order (value) or first-order (gradient) oracle for MLE is NP-hard for degree $d=7$ polynomials.
  • MLE is Statistically Efficient: Despite its computational intractability, MLE only requires a polynomial number of samples relative to the dimension and parameter radius to achieve low error.
  • Score Matching is the Optimal Path: Minimizing the Score Matching loss is both computationally and statistically efficient. Its complexity is polynomial in the ambient dimension, making it a viable algorithm exactly where MLE fails.
  • No Exponential Statistical Tax: A common concern is that by ignoring the partition function, Score Matching might be "blind" to certain global features of the distribution, requiring exponentially more samples to reach the same accuracy as MLE. This paper proves that for polynomial energy functions, the statistical penalty paid by Score Matching is strictly polynomial.

This work serves as a continuous analogue to recent breakthroughs in discrete models (such as Ising models), where pseudolikelihood methods were found to be more efficient than MLE, bringing similar rigorous intuition into the continuous domain.

Limitations and Future Directions

While this paper provides a strong theoretical foundation, it has a few notable limitations. First, the results are largely asymptotic. Although the complexity is proven to be "polynomial," the actual exponents and the constants hidden in the Big-O notation could be large, potentially impacting practical, finite-sample applications.

Second, the proofs are specifically tailored to exponentials of polynomials. While this is a broad and expressive class, it does not directly cover modern deep energy-based models parameterized by neural networks, even if it provides a theoretical justification for why score-based methods succeed in those domains. Future work could focus on optimizing the specific polynomial dependencies to determine exactly how much more data Score Matching requires compared to the theoretical MLE limit, and extending these guarantees to broader model architectures.

Summary updated

BibTeX
@inproceedings{pabbaraju2023provable,
  author = {Chirag Pabbaraju and Dhruv Rohatgi and Anish Sevekari and Holden Lee and Ankur Moitra and Andrej Risteski},
  title = {{Provable benefits of score matching}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=waXoG35kbb},
}
Figure