Abstract
RFOD is a novel outlier detection framework for mixed-type tabular data that reframes anomaly detection as a feature-wise conditional reconstruction problem using Random Forests. By predicting each feature based on the others and scoring deviations with an uncertainty-aware distance metric, it achieves state-of-the-art accuracy while providing highly interpretable, cell-level anomaly localization.
Introduction
Outlier detection in tabular data is critical for high-stakes applications like financial fraud, cybersecurity, and healthcare diagnostics. However, tabular data is notoriously complex, typically consisting of mixed data types (numerical and categorical) with skewed distributions and multivariate dependencies.
Existing methods generally fall into two categories:
- Traditional Data Mining (e.g., Isolation Forest, LOF): These are fast but often treat features independently, missing subtle contextual anomalies where a value is only anomalous relative to other features.
- Deep Learning (e.g., Deep SVDD, DevNet): These capture complex interactions but struggle with categorical data and act as "black boxes," failing to explain which specific cell is responsible for an anomaly.
The authors introduce RFOD (Random Forest-based Outlier Detection) to bridge this gap, offering a method that natively handles mixed data types, captures complex feature interactions, and provides granular interpretability.
Methodology
Instead of modeling a complex global joint distribution, RFOD breaks the problem down into a feature-wise conditional reconstruction task. The framework consists of four main modules:
- Feature-Specific Random Forests: RFOD uses a leave-one-feature-out strategy. For a dataset with $d$ features, it trains $d$ separate Random Forests. Each forest learns to predict one target feature using the remaining $d-1$ features as inputs.
- Forest Pruning: RFOD uses Out-Of-Bag (OOB) validation to rank and retain only the most informative trees in each forest, discarding noisy or redundant ones to boost both speed and generalization.
- Adjusted Gower’s Distance (AGD): To measure how far a predicted feature value deviates from the actual value, the authors introduced AGD. It uses $\alpha$-quantile scaling for numerical distributions and incorporates prediction probabilities for categorical features, generating a cell-level anomaly score.
- Uncertainty-Weighted Averaging (UWA): To aggregate cell-level scores into a single row-level score, RFOD calculates the variance of predictions across the trees. High variance indicates high uncertainty, so those feature scores are down-weighted, preventing noisy predictions from diluting the true anomaly signal.
Experimental Evaluation
The authors evaluated RFOD on 15 public real-world tabular datasets spanning cybersecurity (Backdoor, DoS, KDD, Spambase), finance (Bank, Ethereum, Fraud, Online Fraud), and healthcare (Arrhythmia, Cardiotocography, Pima, Thyroid). These datasets represent a comprehensive suite with varying anomaly ratios (0.14% to 45.8%).
Key Results
RFOD demonstrates superior performance across multiple metrics, outperforming both traditional and deep learning baselines.
- Accuracy: RFOD consistently ranked #1 or #2 across all 15 datasets. It achieved an average AUC-PR gain of 46.7% over traditional data mining methods and a 24.8% AUC-ROC gain over deep learning approaches.
- Efficiency: RFOD achieved an average 91.2% reduction in test-time latency compared to leading deep learning alternatives. Because the feature-specific forests are independent, the architecture is highly parallelizable.
- Data Efficiency: In scalability tests on the massive KDD dataset, RFOD maintained high detection performance even when trained on just 1% of the available data.
- Ablation Study: Removing AGD caused the steepest performance drops (e.g., AUC-ROC on the DoS dataset plunged from 0.96 to 0.41), proving that robust distance scaling is critical for mixed-type data.
Discussion and Insights
- Conditional Reconstruction vs. Joint Modeling: By predicting one feature at a time, RFOD naturally captures multivariate dependencies without falling victim to the curse of dimensionality.
- The Power of Pruning: Dynamically pruning trees based on OOB performance prevents overfitting, particularly in high-dimensional datasets with small sample sizes.
- Uncertainty-Aware Aggregation: Treating all feature reconstructions equally is a mistake in heterogeneous data. Weighting cell-level scores by model confidence makes the final anomaly score significantly more robust to noise.
- Cell-Level Interpretability: Because RFOD predicts features individually, it generates a heatmap showing exactly which feature values violate expected patterns, providing actionable root-cause analysis.
Limitations and Future Work
The paper assumes the training set consists primarily of normal data, which is standard but can be restrictive. Additionally, the framework introduces hyperparameters—specifically the retaining ratio $\beta$ for pruning and the quantile parameter $\alpha$ for AGD—that require tuning. Future work may involve adapting the framework for streaming tabular data or extending it to fully unsupervised environments with high contamination.
Summary updated