Abstract
We propose a fast method with statistical guarantees for learning an exponential family density model where the natural parameter is in a reproducing kernel Hilbert space, and may be infinite-dimensional. The model is learned by fitting the derivative of the log density, the score, thus avoiding the need to compute a normalization constant. Our approach improves the computational efficiency of an earlier solution by using a low-rank, Nyström-like solution. The new solution retains the consistency and convergence rates of the full-rank solution (exactly in Fisher distance, and nearly in other distances), with guarantees on the degree of cost and storage reduction. We evaluate the method in experiments on density estimation and in the construction of an adaptive Hamiltonian Monte Carlo sampler. Compared to an existing score learning approach using a denoising autoencoder, our estimator is empirically more data-efficient when estimating the score, runs faster, and has fewer parameters (which can be tuned in a principled and interpretable way), in addition to providing statistical guarantees.
Introduction
Estimating the underlying probability density of a dataset is a fundamental task in statistics, but it is notoriously difficult when the density is complex or high-dimensional. Exponential families are a popular tool for this, but they usually require calculating a normalization constant (the partition function) to ensure the total probability sums to one. For flexible, infinite-dimensional models, calculating this constant is often mathematically impossible.
Score matching offers a clever workaround: instead of fitting the density directly, one fits the derivative of the log-density (the "score"). This eliminates the need for the normalization constant. However, previous "full-rank" kernel methods for score matching were computationally heavy, requiring $O(n^3 d^3)$ time and $O(n^2 d^2)$ memory (where $n$ is the number of samples and $d$ is the dimension). This makes them unusable for large datasets.
Methods: Nyström Kernel Score Matching
We propose a Nyström approximation for kernel score matching. Instead of using every data point to define the model's basis functions, we select a small, random subset of $m$ "basis points."
Key technical highlights include:
- Low-Rank Solution: We derive a closed-form solution for the natural parameter of the density that only depends on the $m$ basis points.
- Dimension Subsampling: To further save time, we show that subsampling the dimensions of the basis points is possible without significant loss in accuracy.
- Principled Theory: We prove that as long as $m \approx \sqrt{n}$ (or even $n^{1/3}$ for very smooth densities), the Nyström estimator converges to the true density at the same rate as the expensive full-rank version.
Experimental Results
Speed and Accuracy on the Grid Dataset
On the "Grid" dataset, the Nyström method achieved scores nearly identical to the full solution while running significantly faster. For $n=500$, the Nyström version was roughly 10x to 100x faster depending on the number of basis points $m$.
Adaptive Hamiltonian Monte Carlo
In HMC experiments, the Nyström-based sampler achieved higher acceptance rates than "lite" heuristics and Denoising Autoencoders (DAEs), demonstrating its ability to learn the "geometry" of a distribution effectively. Unlike Deep Learning approaches, this method is "principled," with interpretable hyperparameters like kernel width ($\sigma$) and regularization ($\lambda$).
Conclusion
By combining score matching with low-rank Nyström approximations, we achieve the statistical accuracy of full-rank models while slashing computational costs from cubic to linear in the number of data points. This approach provides a solid theoretical foundation for a technique that was previously handled with unproven heuristics, bridging the gap between theory and practice in kernel-based density estimation.
Summary updated