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:
- Forest Training: A standard Random Forest is trained on the data.
- Proximity Extraction: A proximity matrix is generated by calculating how frequently pairs of observations co-occur in the same leaf nodes across the forest.
- Kernel Transformation: An unbiased kernel transformation is applied to this matrix to ensure the resulting test statistic is consistent.
- 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$.
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.
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