Finite Sample Bounds for Learning with Score Matching

Devin Smedira, Abhijith Jayakumar, Sidhant Misra, Marc Vuffray, Andrey Y. LokhovarXiv 2026

TL;DR

Score matching is a popular, computationally efficient alternative to Maximum Likelihood Estimation (MLE) for learning continuous probability distributions because it completely bypasses the intractable normalizing partition function. This paper provides the first non-asymptotic (finite sample) guarantees for structure learning with score matching, proving that the required number of samples scales polynomially with the model's dimension.

What Problem Does This Paper Address?

Learning continuous probability distributions—specifically exponential families—is a core task in machine learning and high-dimensional statistics. While Maximum Likelihood Estimation is statistically efficient, it suffers from a massive computational bottleneck: it requires computing a normalizing constant called the partition function ($Z_\theta$), which is generally intractable for complex, high-dimensional distributions.

Score matching avoids this bottleneck by minimizing the distance between the score (the gradient of the log-density with respect to the data) of the true distribution and a parameterized model. Because the derivative is taken with respect to the data, the partition function vanishes, making optimization highly tractable. However, despite its widespread practical use (including in modern diffusion models), our theoretical understanding of score matching has lagged behind. Prior works only provided asymptotic bounds, meaning they describe what happens as the number of samples approaches infinity. This paper addresses this gap by providing the first non-asymptotic sample complexity bounds, telling us exactly how many samples are needed to guarantee accurate learning under finite data regimes.

Methods

The authors restrict their focus to exponential families where the energy functions are parameterized by polynomials of a maximum degree $d$.

To derive finite sample bounds, the authors depart from traditional proof techniques. Standard analyses typically rely on bounding the restricted Poincaré constant to relate score matching back to MLE. Instead, this paper directly analyzes the curvature of the score-matching loss function.

The core of their approach involves:

  1. Local-to-Global Curvature Analysis: Showing that a difference in score-matching loss implies a minimal Euclidean distance between parameter vectors.
  2. Grid Conditioning: Bounding the expected curvature from below by conditioning the distribution on a localized bounded domain ("grid points") where the density behaves predictably.
  3. Iterative Pruning (Algorithm 1): Introducing an algorithm that uses local score-matching estimators to sequentially identify and remove incorrect structural cliques, eventually isolating the exact graphical model structure.

Datasets

Not discussed in the paper. This is a purely theoretical work focused on proving mathematical guarantees and sample complexity bounds; it does not include empirical experiments or datasets.

Key Insights and Ideas

  • Direct Curvature Analysis is Key: By analyzing the loss landscape's curvature directly rather than routing the proof through MLE properties via Poincaré inequalities, the authors bypassed the mathematical roadblocks that previously prevented non-asymptotic bounds.
  • Polynomial Scaling Confirmed: The sample complexity bounds scale polynomially with the dimension $n$. This provides a solid theoretical justification for using score matching in high-dimensional problems.
  • Family vs. Model Structure: The authors distinguish between learning the family structure (the maximal possible interactions allowed by the polynomial class) and the model structure (the actual interactions present in the specific distribution). They show that while a single optimization step learns the family structure, an iterative approach is required to prune away inactive parameters and recover the true model graph.

Key Results

  • Family Structure Learning (Theorem 1): For a polynomial exponential family, the score-matching estimator recovers the maximal factors within an error of $\epsilon$ with high probability using a sample size $M$ that scales as: $$M \ge \rho \frac{n^{d+1}M^*}{\epsilon^2}$$ where $n$ is the dimension and $d$ is the polynomial degree.

  • Total Parameter Recovery (Theorem 2): For multi-linear exponential models (where variables appear at most linearly in any monomial), the entire parameter vector can be recovered within $\epsilon$ error with a sample complexity scaling as $O(n^{2d+1}/\epsilon^2)$.

  • Exact Structure Recovery (Theorem 4): Given a mild lower bound on the strength of the true parameters, the proposed iterative algorithm perfectly reconstructs the underlying graphical model structure with high probability using a polynomial number of samples.

Limitations and Future Work

  • Polynomial Restriction: The current proofs are strictly tailored to polynomial energy functions with unbounded support. Extending these non-asymptotic bounds to more general continuous energy-based models remains an open challenge.
  • Optimization Dynamics: The main theorems assume that the exact minimizer of the score-matching loss can be found (or a near-optimal solution, as explored in Appendix D). The authors note that a valuable next step would be combining this sample complexity analysis with the actual convergence analysis of practical optimization methods like gradient descent.
  • Information-Theoretic Lower Bounds: While this work establishes a polynomial upper bound on sample complexity, the fundamental information-theoretic lower bounds (the absolute minimum number of samples required by any algorithm) for continuous exponential families are still unknown.

Summary updated

BibTeX
@misc{smedira2026finite,
  author = {Devin Smedira and Abhijith Jayakumar and Sidhant Misra and Marc Vuffray and Andrey Y. Lokhov},
  title = {{Finite Sample Bounds for Learning with Score Matching}},
  year = {2026},
  eprint = {2605.14168},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.14168},
}
Figure