Intrusion and anomaly detection, malware analysis, threat intelligence, phishing, security logs and incident response: defensive experiments that really compute in your browser on synthetic data, with algorithms, datasets, projects and quizzes.
- Home
- AI Intrusion Detection
- Cyber Anomaly Detection
- Malware Analysis
- Cyber Threat Intelligence
- AI Network Security
- AI Phishing Detection
- AI Security Log Analytics
- AI Incident Response
- Algorithm Library
- Datasets Repository
- Learning Roadmap
- Projects
- Quizzes and Challenges
- Experiment Workbench
- Research and Metrics
- My experiments
- Scientific references
- Glossary and FAQ
Isolation Forest
Algorithm Library · Algorithm Unsupervised Learning Runs in the browser
The idea
Isolates points with random splits; anomalies are isolated with fewer splits, so shortness of the average path length measures anomaly.
The problem it addresses
Unsupervised anomaly detection without labels.
Data it needs
Numeric tabular data.
Equations
s(x,n)=2^{-E[h(x)]/c(n)},\quad c(n)=2H(n-1)-\tfrac{2(n-1)}{n}Steps
- Build isolation trees on sub-samples
- Route each point and record path length
- Turn the average into an anomaly score
Pseudocode
for t in trees: depth[t][x] = path_length(t, x)
score = 2 ** (-mean(depth, axis=0) / c(psi))Strengths
- Near-linear time
- No labels needed
- Handles moderate dimensions
Limitations
- The contamination threshold is a manual choice
- Weak against dense clusters of anomalies
Uses in cybersecurity
- Network-traffic anomalies
- Suspicious sessions
Common pitfalls
- "Anomalous" is not "malicious": rare legitimate states will be flagged too.
Computational complexity
The original paper reports roughly linear time in the sub-sample size.
Suggested datasets
Related experiments
See also
References
- Liu, Ting, Zhou (2008). Isolation Forest. IEEE ICDM 2008, pp. 413-422. doi:10.1109/icdm.2008.17
- Chandola, Banerjee, Kumar (2009). Anomaly detection: A survey. ACM Computing Surveys 41(3), pp. 1-58. doi:10.1145/1541880.1541882
