Self-supervised Isolation Forest
Self-supervised Isolation Forest (SSL-augmented Anomaly Detection) · Also known as: SSL Isolation Forest, self-supervised iForest, semi-supervised isolation forest, contrastive isolation forest
Self-supervised Isolation Forest augments the classic Isolation Forest anomaly detector with a self-supervised pre-training stage. A pretext task — such as predicting rotation, masked features, or contrastive pairs — is solved without labels to learn a richer feature representation, which is then used when building the isolation trees, yielding sharper anomaly scores on complex, high-dimensional tabular data.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use Self-supervised Isolation Forest when you face anomaly detection on high-dimensional or structured tabular data where raw-feature Isolation Forest underperforms — for instance, when features are correlated, redundant, or require interaction terms to reveal outliers. It is especially valuable when labels are entirely absent but enough unlabelled normal data exist to train a meaningful pretext task. Do not use it when the dataset is small (fewer than a few hundred samples), when raw features already separate anomalies cleanly, or when a fully interpretable model with explicit feature contributions is required; in those cases, plain Isolation Forest or a one-class SVM with a well-chosen kernel is more appropriate.
Strengths & limitations
- Learns semantically richer representations without any anomaly labels, improving detection on complex high-dimensional data.
- Inherits Isolation Forest's linear time complexity and subsampling efficiency, keeping training scalable.
- Robust to irrelevant or redundant raw features because the pretext task discards uninformative variance.
- Flexible: the pretext task can be tailored to domain structure (e.g., masking domain-relevant features).
- Produces a continuous anomaly score that enables threshold-free ranking of suspicious observations.
- Adds a neural pre-training stage, increasing implementation complexity and requiring more hyperparameter decisions.
- Performance is sensitive to the choice of pretext task — a poorly designed task can hurt more than it helps.
- Requires a sufficient volume of unlabelled data for the self-supervised stage to learn meaningful representations.
- Less interpretable than plain Isolation Forest because anomaly scores are defined in the learned feature space.
Frequently asked
How does this differ from plain Isolation Forest?
Plain Isolation Forest builds trees directly in raw feature space. The self-supervised variant first trains an encoder on a pretext task to produce a better representation of the data's normal structure, then builds isolation trees in that representation space. The result is typically higher AUROC on complex datasets where raw features are correlated or noisy.
What pretext tasks are commonly used?
Popular choices for tabular data include masked-feature reconstruction (predict held-out columns), rotation or permutation prediction (identify which permutation was applied to a row), and contrastive learning (pull augmented views of the same row together, push different rows apart). The best choice depends on the feature structure of the domain.
How much data is needed?
The self-supervised pre-training stage benefits from at least a few hundred samples, ideally several thousand, to learn a useful representation. With very small datasets, the pretext task overfits and the learned features may be no better than the raw ones — in that regime, plain Isolation Forest is usually safer.
Is any labelled data required?
No labels are required for training. If a small labelled validation set is available, it can be used only to tune the contamination threshold and select the best pretext task, but the core model trains fully unsupervised.
How do I evaluate the model?
Use AUROC and AUROC-PR (precision-recall) computed on a held-out labelled test set. Because anomaly classes are rare, AUROC-PR is often more informative than AUROC-ROC. Compare against a plain Isolation Forest baseline to confirm the self-supervised stage adds value.
Sources
- Liu, F. T., Ting, K. M., & Zhou, Z.-H. (2008). Isolation Forest. In Proceedings of the 8th IEEE International Conference on Data Mining (ICDM), pp. 413–422. DOI: 10.1109/ICDM.2008.17 ↗
- Isolation Forest. Wikipedia. link ↗
How to cite this page
ScholarGate. (2026, June 3). Self-supervised Isolation Forest (SSL-augmented Anomaly Detection). ScholarGate. https://scholargate.app/en/machine-learning/self-supervised-isolation-forest
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- AutoencoderDeep learning↔ compare
- Isolation ForestMachine learning↔ compare
- Local Outlier FactorMachine learning↔ compare
- One-class SVMMachine learning↔ compare