Decision Forests Induce Characteristic Kernels

Cencheng Shen, Joshua T. Vogelstein

Abstract

Determining statistical dependency in high-dimensional data remains a significant challenge. While modern kernel methods offer power against non-linear relationships, they often suffer from the "curse of dimensionality" and lack interpretability. This paper introduces KMERF (Kernel Mean Embedding Random Forest), a framework that leverages the proximity matrices of Decision Forests to construct "characteristic kernels." We prove that these induced kernels are theoretically guaranteed to detect any type of statistical dependency. Empirical results demonstrate that KMERF outperforms state-of-the-art methods in high-dimensional settings while providing inherent interpretability through feature importance.

Introduction

At the heart of statistical inference lie two fundamental tasks: independence testing (determining if two variables are related) and k-sample testing (determining if multiple datasets originate from the same distribution). Classical methods, such as Pearson’s correlation, are computationally efficient and interpretable but limited to detecting linear dependencies. Conversely, modern "kernel" methods like the Hilbert-Schmidt Independence Criterion (HSIC) or Distance Correlation (Dcorr) can capture complex, non-linear patterns. However, these methods often struggle in high-dimensional spaces where selecting an appropriate kernel function becomes difficult, and they typically function as "black boxes," offering little insight into which features drive the detected dependency.

The KMERF Framework

The authors propose bridging this gap by utilizing Random Forests (RF) to learn the data's geometry dynamically. The resulting framework, KMERF, follows a streamlined process:

  1. Forest Training: A standard Random Forest is trained on the data.
  2. Proximity Extraction: A proximity matrix is generated by calculating how frequently pairs of observations co-occur in the same leaf nodes across the forest.
  3. Kernel Transformation: An unbiased kernel transformation is applied to this matrix to ensure the resulting test statistic is consistent.
  4. Hypothesis Testing: A chi-square test is employed to derive p-values efficiently.

The theoretical cornerstone of this work is the proof that as the number of trees and samples increases, the Random Forest proximity matrix converges to a characteristic kernel. In kernel theory, a characteristic kernel is the "gold standard," ensuring that the test will eventually detect any form of dependency given sufficient data.

Experimental Evaluation

KMERF was evaluated against a suite of 20 simulated scenarios, ranging from simple linear relationships to complex geometric structures like spirals, W-shapes, and multimodal distributions. These tests were conducted across increasing dimensions, reaching up to $p=1000$.

Statistical power of KMERF compared to state-of-the-art independence tests across 20 simulated high-dimensional scenarios.

As shown in Figure 2, KMERF (red line) consistently maintains high statistical power in high-dimensional settings where traditional methods like MGC, Dcorr, and HSIC often falter. This robustness is particularly evident in exponential, cubic, and fourth-root relationships. While most kernel tests rely on fixed functions (e.g., Gaussian or Euclidean), KMERF learns the relevant geometry through the forest's splitting process, making it uniquely adaptive to high-dimensional structures.

Statistical power of KMERF in k-sample testing scenarios, demonstrating robustness in high dimensions compared to traditional kernel methods.

The framework's efficacy extends to k-sample testing (Figure 3), where it outperforms established benchmarks like Energy statistics and Maximum Mean Discrepancy (MMD) in various high-dimensional configurations.

Interpretability and Real-World Application

A primary advantage of KMERF is its inherent interpretability. Unlike traditional kernel methods, KMERF allows researchers to leverage Random Forest "Feature Importance" scores. This enables scientists to identify exactly which features are responsible for a rejected null hypothesis.

In a real-world application using proteomics data from 95 individuals, KMERF was tasked with distinguishing healthy controls from cancer patients. KMERF successfully identified neurogranin as a highly specific biomarker for pancreatic cancer. While other tests also flagged this protein, they often produced a high number of false positives by flagging numerous other proteins. KMERF’s surgical precision in biomarker discovery highlights its utility in high-stakes scientific domains.

Conclusion and Future Directions

KMERF challenges the conventional wisdom that one must choose between a powerful model and an interpretable one. By proving that Decision Forests induce characteristic kernels, this work provides a theoretically grounded and practically superior tool for high-dimensional hypothesis testing.

While KMERF excels in most scenarios, it is not a "one size fits all" solution; it can be slightly less powerful than specialized kernels for specific geometric shapes like circles or ellipses. Future research may explore the use of Oblique or Manifold Forests to further enhance the kernel's power and adaptability.

Summary updated

Abstract

Decision forests are widely used for classification and regression tasks. A lesser known property of tree-based methods is that one can construct a proximity matrix from the tree(s), and these proximity matrices are induced kernels. While there has been extensive research on the applications and properties of kernels, there is relatively little research on kernels induced by decision forests. We construct Kernel Mean Embedding Random Forests (KMERF), which induce kernels from random trees and/or forests using leaf-node proximity. We introduce the notion of an asymptotically characteristic kernel, and prove that KMERF kernels are asymptotically characteristic for both discrete and continuous data. Because KMERF is data-adaptive, we suspected it would outperform kernels selected a priori on finite sample data. We illustrate that KMERF nearly dominates current state-of-the-art kernel-based tests across a diverse range of high-dimensional two-sample and independence testing settings. Furthermore, our forest-based approach is interpretable, and provides feature importance metrics that readily distinguish important dimensions, unlike other high-dimensional non-parametric testing procedures. Hence, this work demonstrates the decision forest-based kernel can be more powerful and more interpretable than existing methods, flying in the face of conventional wisdom of the trade-off between the two.
BibTeX
@misc{shen2018decision,
  author = {Cencheng Shen and Joshua T. Vogelstein},
  title = {{Decision Forests Induce Characteristic Kernels}},
  year = {2018},
  eprint = {1812.00029},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.00029},
}
Figure