Multivariate kernel density estimation and the curse of dimensionality
This post belongs to a series of study notes I first published in 2012, during my PhD. I revised it in 2026: the mathematics was checked and corrected and the text rewritten.
Here is a short look at kernel density estimation when the data are \(d\)-dimensional, \(X_i = (X_{i1}, \ldots, X_{id})^\top\), and at what goes wrong as \(d\) grows.
The product-kernel estimator
The simplest multivariate estimator uses a one-dimensional kernel \(K\) in each coordinate, with its own bandwidth \(h_j\):
\[ \hat f_h(x) = \frac{1}{n\, h_1 \cdots h_d}\sum_{i=1}^n \prod_{j=1}^d K\!\left( \frac{x_j - X_{ij}}{h_j} \right), \qquad x = (x_1, \ldots, x_d)^\top . \]
For a second-order kernel and a twice differentiable \(f\), the asymptotic MISE is
\[ \operatorname{AMISE}(h) = \frac{\mu_2(K)^2}{4}\left[ \sum_{j=1}^d h_j^4 \int f_{jj}^2(x)\,dx + \sum_{j \ne k} h_j^2 h_k^2 \int f_{jj}(x)\, f_{kk}(x)\,dx \right] + \frac{\|K\|_2^{2d}}{n\, h_1 \cdots h_d}, \]
where \(f_{jj} = \partial^2 f/\partial x_j^2\), \(\mu_2(K) = \int u^2 K(u)\,du\) and \(\|K\|_2^2 = \int K^2(u)\,du\). The bracket is just \(\int \big(\sum_j h_j^2 f_{jj}(x)\big)^2 dx\) expanded.
The squared bias is still of order \(h^4\), but the variance is now of order \(1/(n h^d)\): a box of side \(h\) in \(d\) dimensions has volume \(h^d\), so it captures far fewer points. Balancing \(h^4\) against \(1/(nh^d)\) gives
\[ h_j \asymp n^{-1/(d+4)}, \qquad \operatorname{AMISE} \asymp n^{-4/(d+4)} . \]
For \(d = 1\) this is the familiar \(n^{-4/5}\) (the case \(\beta = 2\) of the earlier posts).
The curse of dimensionality
The rate \(n^{-4/(d+4)}\) deteriorates quickly as \(d\) grows. To reach a fixed accuracy \(\varepsilon\) we need roughly \(n \asymp \varepsilon^{-(d+4)/4}\) observations, so the required sample size grows exponentially in \(d\). This is the curse of dimensionality: in high dimensions the data are sparse, and every neighborhood small enough to keep the bias low is almost empty.
Silverman (1986, secs. 4.5.2 and Table 4.2) makes this concrete. He computes the sample size needed for a relative mean squared error below 0.1 at the origin, when the true density is standard multivariate normal, the kernel is normal and the bandwidth minimizes the mean squared error at the origin:
| Dimension | Required sample size |
|---|---|
| 1 | 4 |
| 2 | 19 |
| 3 | 67 |
| 4 | 223 |
| 5 | 768 |
| 6 | 2,790 |
| 7 | 10,700 |
| 8 | 43,700 |
| 9 | 187,000 |
| 10 | 842,000 |
Each extra dimension multiplies the required sample size by a factor of roughly 3.5 to 4.5. And this is an optimistic case: a smooth, unimodal density, estimated at its mode.
Dimension reduction
This is why reducing the dimension before smoothing matters so much. A classic approach is Sliced Inverse Regression (SIR, Li 1991). For a regression of \(Y\) on \(X \in \mathbb{R}^d\), SIR looks for a few linear combinations \(\beta_1^\top X, \ldots, \beta_K^\top X\), with \(K \ll d\), that carry all the information about \(Y\). The nonparametric estimation is then done in \(K\) dimensions instead of \(d\).
SIR relies on the conditional covariance matrix \(\operatorname{Cov}(\mathbb{E}[X \mid Y])\). My PhD work proposed an efficient estimator of conditional covariance matrices of this kind, based on a Taylor approximation (Da Veiga et al. 2017). The next post explains SIR and that estimator in more detail.
References
Further reading: Härdle et al. (2004, sec. 3.6).
Series: Density estimation · Previous: Bandwidth selection · Next: Histograms V: cross-validation