Amortized Bandwidth Learning for Kernel Density Estimation under Logarithmic Score
Organizations: School of Mathematics, East China University of Science and Technology, 200237 Shanghai, China · Department of Mathematical Sciences; Institute of Hazard, Risk and Resilience, Durham University, DH1 3LE Durham, United Kingdom · Data Science Institute; Global School of Sustainability, The London School of Economics and Political Science, WC2A 2AE London, United Kingdom
Abstract
Kernel density estimation converts finite samples into probability densities, but its performance depends critically on bandwidth selection. Classical selectors prescribe the sample-to-bandwidth rule analytically or asymptotically, or solve a new optimization for each sample. An amortized framework is proposed that instead learns this mapping across a distribution of density-estimation tasks by optimizing the logarithmic score. A truncated-and-renormalized bounded-support formulation enables stable learning across heterogeneous tasks, while affine standardization allows a selector trained on a single reference interval to transfer across bounded intervals. Experiments under Gaussian sampling, a multi-family benchmark, and randomized Gaussian-mixture training show that the amortized selector consistently and substantially outperforms Silverman's rule, the Sheather--Jones selector, and least-squares cross-validation, with especially large gains in small and heterogeneous samples. Finite Gaussian mixtures provide a generic training mechanism supported by their approximation property. Selectors trained in this way generalize strongly across different density structures, allowing the same trained selector to be applied directly to finite samples from unknown densities without specifying or fitting a distributional family. This combination of broad applicability and strong empirical performance makes the framework attractive for a wide range of applications in which finite samples or ensembles must be converted into continuous probability densities.
Figures & tables
| Family | Density | Parameters |
|---|---|---|
| Gaussian | . | |
| Laplace | . | |
| Student- | ; . | |
| Gamma | \begin{array}[]{@{}l@{}}y=k\theta+\varepsilon(x-\mu),\\[-2.0pt] g(x)=\gamma_{k,\theta}(y)\mathbf{1}_{\{y>0\}}.\end{array} | ; equiprobably; . |
| Beta | \begin{array}[]{@{}l@{}}z=\dfrac{a}{a+b}+\dfrac{x-\mu}{s},\\[-2.0pt] g(x)=s^{-1}\beta_{a,b}(z)\mathbf{1}_{\{0<z<1\}}.\end{array} | Four equiprobable regimes: , , or ; or and are drawn, in random order, from and . . |
| Logistic | . |
| Number of detected modes | |||||||||
| Number of components | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
| 8 | 17.0% | 36.2% | 27.2% | 13.7% | 4.8% | 1.0% | 0.2% | 0.0% | 0.0% |
| 16 | 14.4% | 32.0% | 26.8% | 15.2% | 7.3% | 3.1% | 0.9% | 0.2% | 0.0% |
| 32 | 13.5% | 30.0% | 26.3% | 15.5% | 8.7% | 4.0% | 1.2% | 0.6% | 0.2% |
Density Estimation
Density estimation learns probability distributions from data to measure likelihood, detect anomalies, quantify uncertainty, and generate samples.
See all 66 papers