Abstract
Decades of research have produced robust methods for unsupervised data visualization, yet supervised visualization—where expert labels guide representations—remains underexplored. Recently, RF-PHATE, a diffusion-based manifold learning method leveraging random forests and information geometry, marked significant progress. However, its lack of an explicit mapping function limits scalability and prevents application to unseen data. We introduce Random Forest Autoencoders (RF-AE), a neural network-based framework for out-of-sample kernel extension that combines autoencoders with the supervised learning strengths of random forests and the geometry of RF-PHATE. RF-AE enables efficient out-of-sample supervised visualization and outperforms existing methods in both accuracy and interpretability.
Introduction
Data visualization tools like t-SNE, UMAP, and PHATE are staples for exploring high-dimensional data, but they are primarily unsupervised. Consequently, they may fail to capture patterns that only become apparent when incorporating "labels," such as disease status or cell types. While supervised variants like RF-PHATE exist, they suffer from a "fixed coordinate" problem: they lack a parametric mapping function. Projecting new data points typically requires re-running the algorithm on the entire dataset, which is computationally prohibitive for large-scale applications. RF-AE addresses this by providing a scalable, non-linear mapping that is robust to noise and capable of handling new data points on the fly.
The RF-AE Framework
Random Forest Autoencoders (RF-AE) bridge the gap between manifold learning and deep learning. The framework utilizes a multi-task neural network architecture designed to learn a supervised embedding space that generalizes to unseen data.
Key Methodological Innovations
- Proximity-based Inputs: Instead of raw features, RF-AE uses RF-GAP proximities. These vectors represent how often data points share leaves in a Random Forest, effectively filtering the data through a supervised lens and increasing robustness to noise.
- Dual-Loss Function: The network optimizes two objectives simultaneously. A Reconstruction Loss ($L_{recon}$) uses Jensen-Shannon Divergence (JSD) to reconstruct proximity vectors, treating them as probability distributions. A Geometric Loss ($L_{geo}$) forces the bottleneck layer to align with precomputed RF-PHATE coordinates.
- Prototype Selection: To handle large datasets, the authors use class-wise k-medoids to select "prototypes." Training on a small, representative subset (as low as 2%) significantly speeds up inference without degrading performance.
Experimental Evaluation
The model was rigorously tested across 20 diverse datasets spanning image, biomedical, and tabular modalities. To measure performance, the authors introduced Structural Importance Alignment (SIA), a metric that evaluates whether an embedding preserves the features most critical for classification.
As shown in the comparative analysis, RF-AE achieved the highest average k-NN classification accuracy (0.831) and consistently ranked in the top tier for both local and global SIA scores. This demonstrates that RF-AE successfully balances visual coherence with truthfulness to the underlying supervised task.
Conclusion
RF-AE represents a significant leap forward in supervised visualization. By combining the supervised power of Random Forests with the architectural flexibility of autoencoders, it provides an efficient solution for out-of-sample kernel extension. Future work will focus on adaptive prototype selection and extending the framework to semi-supervised learning scenarios, where it can project unlabeled data into spaces informed by sparse expert labels.
Summary updated