DiScoFormer: Plug-In Density and Score Estimation with Transformers
Vasily Ilin, Peter Sushko

TL;DR
DiScoFormer is a versatile Transformer model that estimates probability densities and scores from samples, generalizing across distributions and sample sizes, and outperforms traditional kernel methods in accuracy and convergence speed.
Contribution
It introduces a train-once, infer-anywhere Transformer that unifies density and score estimation, with theoretical and empirical evidence of its effectiveness and generalization capabilities.
Findings
Outperforms KDE in density estimation accuracy
Faster convergence compared to KDE
Provides high-fidelity score estimates for various applications
Abstract
Estimating probability density and its score from samples remains a core problem in generative modeling, Bayesian inference, and kinetic theory. Existing methods are bifurcated: classical kernel density estimators (KDE) generalize across distributions but suffer from the curse of dimensionality, while modern neural score models achieve high precision but require retraining for every target distribution. We introduce DiScoFormer (Density and Score Transformer), a ``train-once, infer-anywhere" equivariant Transformer that maps i.i.d. samples to both density values and score vectors, generalizing across distributions and sample sizes. Analytically, we prove that self-attention can recover normalized KDE, establishing it as a functional generalization of kernel methods; empirically, individual attention heads learn multi-scale, kernel-like behaviors. The model converges faster and achieves…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsGenerative Adversarial Networks and Image Synthesis · Gaussian Processes and Bayesian Inference · Machine Learning in Materials Science
