arXiv

DiScoFormer: Plug-In Density and Score Estimation with Transformers

Title: DiScoFormer: A Plug-In Approach to Density and Score Estimation Using Transformers

Abstract:

The estimation of probability density functions and their corresponding scores from sample data is a fundamental challenge in kinetic theory, Bayesian inference, and generative modeling. Current methodologies are divided into two distinct categories: traditional kernel density estimators (KDE), which offer broad distributional generalization but are hindered by the curse of dimensionality, and contemporary neural score models, which deliver superior accuracy but necessitate retraining for each specific target distribution. To address these limitations, we present DiScoFormer (Density and Score Transformer), an equivariant Transformer architecture designed for a "train-once, infer-anywhere" paradigm. This model effectively maps independent and identically distributed (i.i.d.) samples to both density values and score vectors, enabling robust generalization across varying sample sizes and distributions.

From a theoretical standpoint, we demonstrate that self-attention mechanisms are capable of recovering normalized KDE, thereby positioning the Transformer as a functional extension of kernel-based methods. Empirically, we observe that individual attention heads autonomously acquire multi-scale, kernel-like properties. In practical applications, DiScoFormer outperforms KDE in density estimation by converging more rapidly and achieving greater precision. Furthermore, it serves as a high-fidelity plug-in score oracle, facilitating score-debiased KDE, the calculation of Fisher information, and the solution of Fokker-Planck-type partial differential equations.


Source: arXiv Generated at: 2026-06-04 00:00:00 UTC

Related Articles

Zurich Insurance Expands Data-Center Offering Beyond the US
Bloomberg

Zurich Insurance Expands Data-Center Offering Beyond the US

Zurich Insurance Group is expanding its data center insurance products internationally, extending coverage beyond the Un...

Emerging-Market Stocks Fall as Broadcom Miss Disrupts AI Trade
Bloomberg

Emerging-Market Stocks Fall as Broadcom Miss Disrupts AI Trade

Broadcom’s earnings miss triggered a sell-off in AI stocks, dragging down emerging-market equities. This disruption high...

Revolut Co-Founder, CTO Vlad Yatsenko to Step Down From Role
Bloomberg

Revolut Co-Founder, CTO Vlad Yatsenko to Step Down From Role

Revolut co-founder and CTO Vlad Yatsenko is stepping down from his executive role. The resignation marks a significant l...

Netflix Top Tech Exec Stone on Integrating AI
Bloomberg

Netflix Top Tech Exec Stone on Integrating AI

Netflix’s top tech exec discusses integrating AI to enhance content discovery and production efficiency.

Microsoft’s AI Chief Says Anthropic Models Are Too Expensive
Bloomberg

Microsoft’s AI Chief Says Anthropic Models Are Too Expensive

Microsoft AI CEO Mustafa Suleyman criticized Anthropic’s models as too expensive. Meanwhile, Microsoft plans to allow us...

Ramp Notches $44 Billion Valuation in New Funding Round
Bloomberg

Ramp Notches $44 Billion Valuation in New Funding Round

RAMP secured a $44 billion valuation in its latest funding round. CEO Eric Glyman attended the 2026 Reagan National Econ...