Electrostatic Models for Score Matching
Abstract
We introduce an electrostatic formulation of score-based generative modeling in which the score function is modeled as the electric field of a static charge distribution. As the gradient of the log-density with respect to the data, the score function satisfies a number of vector calculus constraints. The advantage of electric charge models is that Maxwell’s equations guarantee curl-free, conservative electric fields by construction, and the divergence of the field is efficiently computed as the local charge density of the model. We parameterize the score as a superposition of electric fields from uniformly charged slabs, producing piecewise linear fields and piecewise quadratic potentials with a natural connection to energy-based models and product-of-experts models. Under the Fisher divergence, training reduces to a quadratic optimization problem with closed-form regularized solutions, avoiding iterative gradient descent over the score model. Experiments on synthetic data and MNIST latent score estimation show competitive performance with neural and kernel-based baselines while using fewer parameters, enabling fast closed-form training, and offering clear interpretability.