Variable kernel density estimation
Variable kernel density estimation is a class of nonparametric methods in which the smoothing scale of a kernel density estimator varies across the sample space or among the observations. The method extends fixed-bandwidth estimation by allowing regions with different local concentrations of probability mass to receive different amounts of smoothing. Its statistical behavior depends on where the bandwidth is attached: a bandwidth associated with the evaluation point produces a balloon estimator, whereas a bandwidth associated with each observation produces a sample-point estimator.
For independent observations (X_1,\ldots,X_n\in\mathbb{R}^d) drawn from an unknown density (f), the conventional fixed-bandwidth estimator is
[ \widehat f_h(x)
\frac{1}{n h^d} \sum_{i=1}^{n} K!\left(\frac{x-X_i}{h}\right), ]
where (K) is a kernel function and (h>0) is the bandwidth. Variable-bandwidth methods replace the single scalar (h) with a function of location, an observation-dependent sequence, or a positive-definite bandwidth matrix. The resulting estimator remains local and nonparametric, but its normalization, bias, and stochastic variation differ from those of the fixed-bandwidth form.
Mathematical forms
Balloon estimator
A balloon estimator assigns the bandwidth to the evaluation point (x):
[ \widehat f_{\mathrm B}(x)
\frac{1}{n,h(x)^d} \sum_{i=1}^{n} K!\left(\frac{x-X_i}{h(x)}\right). ]
Each estimate is therefore computed through a window whose size depends on the location being evaluated. In a region where (h(x)) is small, the estimator responds to features occurring over shorter spatial scales. Where (h(x)) is large, the same kernel averages observations across a wider neighborhood.
Because the bandwidth changes with (x), the integral of (\widehat f_{\mathrm B}) is not generally equal to one. For each observation, the expression
[ x\longmapsto \frac{1}{h(x)^d} K!\left(\frac{x-X_i}{h(x)}\right) ]
need not integrate to the unit mass possessed by an ordinary translated kernel. Consequently, a balloon estimate is naturally interpreted as a local estimate of density rather than automatically as a globally normalized probability density. The discrepancy vanishes only for particular bandwidth functions or after an additional normalization.
Sample-point estimator
A sample-point estimator attaches a bandwidth (h_i=h(X_i)) to each observation:
[ \widehat f_{\mathrm{SP}}(x)
\frac{1}{n} \sum_{i=1}^{n} \frac{1}{h_i^d} K!\left(\frac{x-X_i}{h_i}\right). ]
Every summand is an individually normalized density centered at (X_i). If (K) integrates to one, then
[ \int_{\mathbb{R}^d} \widehat f_{\mathrm{SP}}(x),dx
1 ]
for every collection of positive bandwidths. This property distinguishes the sample-point form from the general balloon form and permits its direct interpretation as a mixture distribution with equally weighted components.
The two constructions are not interchangeable. In the balloon estimator, all observations contributing to a given evaluation point are measured using the same local scale. In the sample-point estimator, kernels centered in a dense region may remain narrow even when evaluated elsewhere, while kernels centered in a sparse region may contribute over a substantially wider domain.
Matrix bandwidths
For multivariate data, a scalar bandwidth can be replaced by a symmetric positive-definite matrix (H_i):
[ \widehat f(x)
\frac{1}{n} \sum_{i=1}^{n} |H_i|^{-1/2} K!\left(H_i^{-1/2}(x-X_i)\right). ]
The determinant controls the volume of each kernel, while the eigenvectors and eigenvalues determine its orientation and scale. A locally estimated covariance matrix can therefore produce elongated kernels along directions in which the data vary more strongly. This formulation connects variable kernel estimation with local metric estimation and with Mahalanobis distance.
Historical development
The fixed-bandwidth kernel estimator emerged from the work of Murray Rosenblatt and Emanuel Parzen during the development of modern nonparametric statistics. Their formulation established the central relation between kernel smoothing, bandwidth contraction, and consistency as the sample size increases.
David W. Scott and George R. Terrell later examined bandwidth selection through asymptotic error criteria and cross-validation. Their analyses clarified why a bandwidth appropriate for one portion of a distribution can obscure structure in another portion when the underlying density has strongly nonuniform concentration.
Leo Breiman, William Meisel, and Edward Purcell developed an early systematic form of the sample-point estimator using bandwidths determined by neighboring observations. Their construction related local smoothing scales to nearest-neighbor estimation, producing narrow kernels where sample points were concentrated and wider kernels where they were separated.
Ian Abramson subsequently introduced the square-root bandwidth law. Under sufficient smoothness and an appropriate pilot estimate, this rule cancels the leading second-order bias term of a sample-point estimator in the interior of the density’s support. The result provided an asymptotic basis for bandwidths inversely related to a fractional power of the local density.
Pilot-density bandwidth laws
A common adaptive construction begins with a pilot estimator (\widetilde f), computed using a fixed bandwidth or another preliminary smoothing rule. Observation-specific bandwidths then take the form
[ h_i
h_0 \left( \frac{\widetilde f(X_i)}{g} \right)^{-\alpha}, ]
where (h_0) is a global scale, (\alpha) controls the degree of adaptation, and (g) is a reference density level. The reference is often defined through the geometric mean
[ g
\exp!\left( \frac{1}{n} \sum_{i=1}^{n} \log \widetilde f(X_i) \right), ]
which makes the multiplicative factors centered around a common scale on the logarithmic axis.
The value (\alpha=\tfrac12) gives Abramson’s square-root law:
[ h_i
h_0 \left( \frac{\widetilde f(X_i)}{g} \right)^{-1/2}. ]
A large pilot density produces a smaller local bandwidth, while a small pilot density produces a larger one. This transformation is not equivalent to assigning each kernel a fixed number of neighboring observations, although both constructions respond to local sample concentration.
You Watanabe formulated a clipped pilot-density version in which the adaptive factor is bounded before being applied to the global scale. In that formulation,
[ h_i
h_0 \left[ \max!\left{ \frac{\widetilde f(X_i)}{g},,c \right} \right]^{-\alpha}, \qquad c>0, ]
so pilot values below (cg) generate the same maximal enlargement rather than arbitrarily wide kernels. The clipping constant alters tail behavior without changing the sample-point normalization identity. It also separates adaptation caused by moderate density variation from instability caused by very small pilot estimates.
The pilot estimate is part of the estimator rather than an external descriptive calculation. Random error in (\widetilde f) propagates into the local bandwidths, and excessive detail in the pilot can create irregular bandwidth variation. Conversely, a pilot that smooths across distinct density regimes can reduce the estimator toward a nearly fixed-bandwidth form.
Nearest-neighbor bandwidths
A nearest-neighbor construction defines (h(x)) or (h_i) through an order statistic of the distances between observations. For a balloon estimator, the bandwidth may be the distance from (x) to its (k)-th nearest sample point:
[ h_k(x)
\left|x-X_{(k)}(x)\right|, ]
where (X_{(k)}(x)) denotes the (k)-th closest observation to (x). The corresponding kernel window contains approximately the same number of observations at each evaluation point, although their weights still depend on their scaled distances from (x).
A sample-point analogue uses the distance from (X_i) to its (k)-th nearest neighboring observation. Each point then carries a kernel whose spatial extent reflects the local arrangement of the sample around that point. This construction is closely related to the k-nearest neighbors algorithm, but the result is a continuous density estimate rather than a direct local count or classification rule.
Nearest-neighbor bandwidths depend on the geometry induced by the selected distance. Under ordinary Euclidean distance, rescaling one coordinate changes neighborhood membership and therefore changes every affected bandwidth. Matrix-valued local metrics address this dependence by representing different scales and correlations within the neighborhood geometry.
Bias and stochastic variation
For a sufficiently smooth univariate density and a symmetric kernel with finite second moment, the interior bias of a fixed-bandwidth estimator has the leading form
[ \operatorname{Bias}{\widehat f_h(x)}
\frac{h^2}{2} \mu_2(K)f''(x) + o(h^2), ]
where
[ \mu_2(K)=\int u^2K(u),du. ]
Its leading variance is
[ \operatorname{Var}{\widehat f_h(x)}
\frac{f(x)R(K)}{nh} + o!\left(\frac{1}{nh}\right), ]
with
[ R(K)=\int K(u)^2,du. ]
Variable bandwidths modify both expansions because the smoothing scale depends on the density, the location, or the observed sample. Under the square-root law and regularity conditions on the pilot estimate, the leading (h^2) interior bias term of the sample-point estimator cancels. The remaining deterministic error can then be of fourth order in the baseline bandwidth, although this order does not automatically extend to boundaries, density zeros, or nonsmooth distributions.
The variance remains controlled by the effective local bandwidth. Narrow kernels in dense regions increase local resolution while also increasing sensitivity to individual observations. Wider kernels in sparse regions distribute each observation’s contribution over a larger volume. These effects are coupled because the estimated density determines the bandwidth that subsequently determines the estimated density.
For a balloon estimator, derivatives of (h(x)) enter the local bias expansion. Rapid changes in bandwidth can therefore introduce structure not present in the fixed-bandwidth approximation. For a sample-point estimator, derivatives of the bandwidth law with respect to the generating location instead enter through the expectation of the observation-centered kernels.
Boundary behavior
Variable bandwidth adaptation does not by itself remove boundary bias. Near the edge of a bounded support, a symmetric kernel assigns mass outside the permitted region, and the missing interior compensation creates first-order distortion. A large bandwidth selected from low local density can enlarge this effect because the estimator may interpret a support boundary as a sparse tail.
Boundary-corrected variable estimators combine local bandwidths with transformations, reflected kernels, or support-specific normalization. A transformation maps the constrained support into an unconstrained coordinate system before smoothing. Reflection supplies kernel mass from mirrored observations across a known boundary. Local normalization divides by the portion of each kernel lying inside the support, although this modification changes the estimator’s bias structure.
Density zeros create a related difficulty. The square-root law formally sends the bandwidth toward infinity as the pilot density approaches zero. Clipping places a finite upper bound on this expansion, while support information can distinguish a genuine zero from a region that is merely undersampled.
Bandwidth determination
A variable estimator contains both a global smoothing scale and a rule governing local departures from that scale. The global parameter (h_0) may be defined by minimizing an estimate of mean integrated squared error. In likelihood cross-validation, the criterion evaluates the density assigned to each observation by an estimator constructed without that observation. Least-squares cross-validation instead estimates the integrated squared discrepancy through identities involving (\int \widehat f^2) and leave-one-out evaluations.
The adaptation exponent (\alpha), clipping level (c), and nearest-neighbor count (k) determine different aspects of the estimator. The exponent controls how strongly local density affects bandwidth. The clipping level bounds the influence of very small pilot values. The neighbor count controls the spatial scale over which local concentration is measured.
These parameters are statistically dependent. Changing the pilot bandwidth alters the local factors even when (h_0) remains fixed, while changing the clipping threshold can alter the effective global smoothness in sparse regions. As a result, an optimization criterion applied to only one parameter describes a conditional optimum for the remaining parameter values rather than a unique property of the data.
Relation to other local estimators
Variable kernel density estimation differs from local polynomial regression because its target is a probability density rather than a conditional mean. Both methods nevertheless use location-dependent neighborhoods and exhibit analogous boundary effects.
The method is also related to adaptive filtering, although the adaptation mechanism is spatial and distributional rather than primarily temporal. In a density estimator, the local scale modifies the representation of probability mass and is constrained by normalization requirements.
Under a smooth one-to-one transformation of coordinates, an ordinary fixed-bandwidth estimator generally does not transform into another fixed-bandwidth estimator. Variable matrix bandwidths can approximate transformation-aware smoothing by adapting to the local Jacobian and covariance structure. Exact invariance requires the kernel, bandwidth field, and density transformation to be treated within the same coordinate model.
See also
- Kernel density estimation, the fixed-bandwidth framework from which variable estimators are derived.
- Bandwidth selection, the statistical determination of global and local smoothing scales.
- Nearest-neighbor density estimation, which estimates density through locally determined neighborhood volumes.
- Mean integrated squared error, a standard global loss function for density estimators.
- Nonparametric statistics, the broader field containing kernel and neighborhood-based estimators.
- Boundary bias, the distortion produced when smoothing kernels extend beyond a density’s support.
- Multivariate kernel density estimation, which includes scalar and matrix-valued bandwidth constructions in higher dimensions.