In machine learning, kernel random forests (KeRF) establish the connection between random forests and
kernel methods. By slightly modifying their definition, random forests can be rewritten as
kernel methods, which are more interpretable and easier to analyze.
History Leo Breiman was the first person to notice the link between random forest and
kernel methods. He pointed out that random forests trained using
i.i.d. random vectors in the tree construction are equivalent to a kernel acting on the true margin. Lin and Jeon established the connection between random forests and adaptive nearest neighbor, implying that random forests can be seen as adaptive kernel estimates. Davies and Ghahramani proposed Kernel Random Forest (KeRF) and showed that it can empirically outperform state-of-art kernel methods. Scornet and uniform random forest, two simplified models of random forest. He named these two KeRFs Centered KeRF and Uniform KeRF, and proved upper bounds on their rates of consistency.
Notations and definitions Preliminaries: Centered forests Centered forest is a simplified model for Breiman's original random forest, which uniformly selects an attribute among all attributes and performs splits at the center of the cell along the pre-chosen attribute. The algorithm stops when a fully binary tree of level k is built, where k \in\mathbb{N} is a parameter of the algorithm.
Uniform forest Uniform forest is another simplified model for Breiman's original random forest, which uniformly selects a feature among all features and performs splits at a point uniformly drawn on the side of the cell, along the preselected feature.
From random forest to KeRF Given a training sample \mathcal{D}_n =\{(\mathbf{X}_i, Y_i)\}_{i=1}^n of [0,1]^p\times\mathbb{R}-valued independent random variables distributed as the independent prototype pair (\mathbf{X}, Y), where \operatorname{E}[Y^2]. We aim at predicting the response Y, associated with the random variable \mathbf{X}, by estimating the regression function m(\mathbf{x})=\operatorname{E}[Y \mid \mathbf{X} = \mathbf{x}]. A random regression forest is an ensemble of M randomized regression trees. Denote m_n(\mathbf{x},\mathbf{\Theta}_j) the predicted value at point \mathbf{x} by the j-th tree, where \mathbf{\Theta}_1,\ldots,\mathbf{\Theta}_M are independent random variables, distributed as a generic random variable \mathbf{\Theta}, independent of the sample \mathcal{D}_n. This random variable can be used to describe the randomness induced by node splitting and the sampling procedure for tree construction. The trees are combined to form the finite forest estimate m_{M, n}(\mathbf{x},\Theta_1,\ldots,\Theta_M) = \frac{1}{M}\sum_{j=1}^M m_n(\mathbf{x},\Theta_j). For regression trees, we have m_n = \sum_{i=1}^n\frac{Y_i\mathbf{1}_{\mathbf{X}_i\in A_n(\mathbf{x},\Theta_j)}}{N_n(\mathbf{x}, \Theta_j)}, where A_n(\mathbf{x},\Theta_j) is the cell containing \mathbf{x}, designed with randomness \Theta_j and dataset \mathcal{D}_n, and N_n(\mathbf{x}, \Theta_j) = \sum_{i=1}^n \mathbf{1}_{\mathbf{X}_i\in A_n(\mathbf{x}, \Theta_j)}. Thus random forest estimates satisfy, for all \mathbf{x}\in[0,1]^d, m_{M,n}(\mathbf{x}, \Theta_1,\ldots,\Theta_M) =\frac{1}{M}\sum_{j=1}^M \left(\sum_{i=1}^n\frac{Y_i\mathbf{1}_{\mathbf{X}_i\in A_n(\mathbf{x},\Theta_j)}}{N_n(\mathbf{x}, \Theta_j)}\right). Random regression forest has two levels of averaging, first over the samples in the target cell of a tree, then over all trees. Thus the contributions of observations that are in cells with a high density of data points are smaller than that of observations which belong to less populated cells. In order to improve the random forest methods and compensate the misestimation, Scornet defined KeRF by \tilde{m}_{M,n}(\mathbf{x}, \Theta_1,\ldots,\Theta_M) = \frac{1}{\sum_{j=1}^M N_n(\mathbf{x}, \Theta_j)}\sum_{j=1}^M\sum_{i=1}^n Y_i\mathbf{1}_{\mathbf{X}_i\in A_n(\mathbf{x}, \Theta_j)}, which is equal to the mean of the Y_i's falling in the cells containing \mathbf{x} in the forest. If we define the connection function of the M finite forest as K_{M,n}(\mathbf{x}, \mathbf{z}) = \frac{1}{M} \sum_{j=1}^M \mathbf{1}_{\mathbf{z} \in A_n (\mathbf{x}, \Theta_j)}, i.e. the proportion of cells shared between \mathbf{x} and \mathbf{z}, then almost surely we have \tilde{m}_{M,n}(\mathbf{x}, \Theta_1,\ldots,\Theta_M) = \frac{\sum_{i=1}^n Y_i K_{M,n}(\mathbf{x}, \mathbf{x}_i)}{\sum_{\ell=1}^n K_{M,n}(\mathbf{x}, \mathbf{x}_{\ell})}, which defines the KeRF.
Centered KeRF The construction of Centered KeRF of level k is the same as for centered forest, except that predictions are made by \tilde{m}_{M,n}(\mathbf{x}, \Theta_1,\ldots,\Theta_M) , the corresponding kernel function, or connection function is K_k^{cc}(\mathbf{x},\mathbf{z}) = \sum_{k_1,\ldots,k_d, \sum_{j=1}^d k_j=k} \frac{k!}{k_1!\cdots k_d!} \left(\frac 1 d \right)^k \prod_{j=1}^d\mathbf{1}_{\lceil2^{k_j}x_j\rceil=\lceil2^{k_j}z_j\rceil}, \qquad \text{ for all } \mathbf{x},\mathbf{z}\in[0,1]^d.
Uniform KeRF Uniform KeRF is built in the same way as uniform forest, except that predictions are made by \tilde{m}_{M,n}(\mathbf{x}, \Theta_1,\ldots,\Theta_M) , the corresponding kernel function, or connection function is K_k^{uf}(\mathbf{0},\mathbf{x}) = \sum_{k_1,\ldots,k_d, \sum_{j=1}^d k_j=k} \frac{k!}{k_1!\ldots k_d!}\left(\frac{1}{d}\right)^k \prod_{m=1}^d\left(1-|x_m|\sum_{j=0}^{k_m-1}\frac{\left(-\ln|x_m|\right)^j}{j!}\right) \text{ for all } \mathbf{x}\in[0,1]^d.
Properties Relation between KeRF and random forest Predictions given by KeRF and random forests are close if the number of points in each cell is controlled: Assume that there exist sequences (a_n),(b_n) such that, almost surely, a_n\leq N_n(\mathbf{x},\Theta)\leq b_n \text{ and } a_n\leq \frac 1 M \sum_{m=1}^M N_n {\mathbf{x},\Theta_m}\leq b_n. Then almost surely, |m_{M,n}(\mathbf{x}) - \tilde{m}_{M,n}(\mathbf{x})| \le\frac{b_n-a_n}{a_n} \tilde{m}_{M,n}(\mathbf{x}).
Relation between infinite KeRF and infinite random forest When the number of trees M goes to infinity, then we have infinite random forest and infinite KeRF. Their estimates are close if the number of observations in each cell is bounded: Assume that there exist sequences (\varepsilon_n), (a_n),(b_n) such that, almost surely • \operatorname{E}[N_n(\mathbf{x},\Theta)] \ge 1, • \operatorname{P}[a_n\le N_n(\mathbf{x},\Theta) \le b_n\mid \mathcal{D}_n] \ge 1-\varepsilon_n/2, • \operatorname{P}[a_n\le \operatorname{E}_\Theta [N_n(\mathbf{x},\Theta)] \le b_n\mid \mathcal{D}_n] \ge 1-\varepsilon_n/2, Then almost surely, |m_{\infty,n}(\mathbf{x})-\tilde{m}_{\infty,n}(\mathbf{x})| \le \frac{b_n-a_n}{a_n}\tilde{m}_{\infty,n}(\mathbf{x}) + n \varepsilon_n \left( \max_{1\le i\le n} Y_i \right).
Consistency results Assume that Y = m(\mathbf{X}) + \varepsilon, where \varepsilon is a centered Gaussian noise, independent of \mathbf{X}, with finite variance \sigma^2. Moreover, \mathbf{X} is uniformly distributed on [0,1]^d and m is
Lipschitz. Scornet proved upper bounds on the rates of consistency for centered KeRF and uniform KeRF.
Consistency of centered KeRF Providing k\rightarrow\infty and n/2^k\rightarrow\infty, there exists a constant C_1>0 such that, for all n, \mathbb{E}[\tilde{m}_n^{cc}(\mathbf{X}) - m(\mathbf{X})]^2 \le C_1 n^{-1/(3+d\log 2)}(\log n)^2.
Consistency of uniform KeRF Providing k\rightarrow\infty and n/2^k\rightarrow\infty, there exists a constant C>0 such that, \mathbb{E}[\tilde{m}_n^{uf}(\mathbf{X})-m(\mathbf{X})]^2\le Cn^{-2/(6+3d\log2)}(\log n)^2. == Disadvantages ==