A New Random Forest Method for One-Class Classification

Simon Bernard, Chesner Désir, Simon Bernard 0001, Caroline Petitjean, Laurent Heutte

Abstract

One-Class Classification (OCC) is a critical task in anomaly detection and health monitoring, where only a single "target" class is available for training. Traditional discriminative methods often struggle with the "curse of dimensionality" when generating artificial outliers to define decision boundaries. This paper presents the One-Class Random Forest (OCRF), an ensemble approach that utilizes sparsity-aware outlier generation within random subspaces. By focusing outlier creation on areas where target data is sparse and reducing dimensionality per tree, OCRF achieves superior stability and performance in high-dimensional spaces compared to standard density-based and discriminative models.

Introduction

One-Class Classification (OCC) addresses scenarios where counter-examples are unavailable or difficult to obtain. Common applications include fraud prevention and medical diagnosis. Historically, researchers have relied on density-based methods (like Parzen windows) or discriminative methods (like One-Class SVMs). However, density methods often fail as feature counts increase, and discriminative methods require an exponential number of artificial outliers to effectively map high-dimensional "empty" space. This computational bottleneck often leads to slow training and inaccurate boundaries. The OCRF method aims to bridge this gap by combining the robustness of ensemble learning with a targeted outlier generation strategy.

Methodology

The core innovation of OCRF is its "Sparsity-Aware" induction process. Unlike traditional methods that scatter outliers uniformly, OCRF identifies where the target data is least likely to exist and places artificial outliers there.

The OCRF training architecture, illustrating the sparsity information extraction and the induction of trees using random subspaces and targeted outlier generation.

The Sparsity-Aware Process

  1. Prior Information Extraction: The model analyzes the target data to create a normalized histogram ($H_{target}$). It then derives a "complementary histogram" ($H_{outlier} = 1 - H_{target}$), which serves as a map of the feature space's empty regions.
  2. Forest Induction: For each tree in the ensemble, the algorithm performs:
  3. Bagging: A bootstrap sample is taken from the training set.
  4. Random Subspace Method (RSM): The data is projected into a small, randomly selected subset of features (typically 10). This drastically simplifies the outlier generation task.
  5. Targeted Outlier Generation: Artificial outliers are generated within this subspace according to the complementary histogram.
  6. Tree Training: A standard decision tree is trained to discriminate between the real target data and the generated outliers.

By generating outliers in low-dimensional subspaces rather than the full feature space, OCRF avoids the exponential complexity usually associated with artificial outlier methods.

Experimental Setup

The researchers evaluated OCRF across 41 one-class classification tasks derived from 14 public UCI datasets. These included biological data (Iris, Diabetes), signal data (Sonar, Ionosphere), and image data (OptDigits, PenDigits, Mfeat-factors). Multi-class datasets were converted to OCC tasks by treating one class as the target and others as outliers during the testing phase.

Results and Discussion

OCRF was compared against four standard models: One-Class SVM (OCSVM), Gaussian density models, Parzen estimators, and Mixture of Gaussians (MoG). Performance was primarily measured using the Matthews Correlation Coefficient (MCC).

Comparative performance of OCRF against OCSVM, Gauss, Parzen, and MoG across 41 datasets. Bold values indicate the best performance.

Key Findings

  • Superior Stability: OCRF demonstrated remarkable robustness, never producing a negative MCC score. In contrast, OCSVM and Parzen estimators failed to produce meaningful correlations in 33 and 27 cases, respectively.
  • High-Dimensional Performance: On the mfeat-factors dataset, which features 216 attributes, OCRF consistently outperformed other methods. The use of RSM allowed the model to maintain accuracy where density-based models typically collapse.
  • Geometric Limitations: OCRF struggled on the OptDigits dataset, where Gaussian models were more effective. This suggests that when target data follows a simple, well-defined geometric distribution (like a bell curve), specialized density models may still hold an advantage.

Conclusion

The One-Class Random Forest provides a stable and scalable solution for high-dimensional anomaly detection. By integrating sparsity information and random subspace projections, it overcomes the traditional computational hurdles of outlier-based discriminative models. Future work will focus on dynamically defining the outlier domain and optimizing the ratio of generated outliers to target samples to further refine the decision boundaries.

Summary updated

Abstract

International audience
BibTeX
@inproceedings{bernard2012new,
  author = {Simon Bernard and Chesner Désir and Simon Bernard and Caroline Petitjean and Laurent Heutte},
  title = {{A New Random Forest Method for One-Class Classification}},
  booktitle = {Sspr/spr},
  year = {2012},
  doi = {10.1007/978-3-642-34166-3\_31},
}
Figure