Isolation forest
Isolation forest is an unsupervised learning algorithm for anomaly detection that works on the principle of isolating anomalies, instead of the most common techniques of profiling normal points.[src] In statistics, an anomaly (a.k.a.[src] outlier) is an observation or event that deviates so much from other events to arouse suspicion it was generated by a different mean.[src] For example, the graph in Fig.1 represents ingress traffic to a web server, expressed as the number of requests in 3-hours intervals, for a period of one month.[src] It is quite evident by simply looking at the picture that some points (marked with a red circle) are unusually high, to the point of inducing suspect that the web server might have been under attack at that time.[src] On the other hand, the flat segment indicated by the red arrow also seems unusual and might possibly be a sign that the server was down during that time period.[src] Anomalies in a big dataset may follow very complicated patterns, which are difficult to detect "by eye" in the great majority of cases.[src] This is the reason why the field of anomaly detection is well suited for the application of machine learning techniques.[src] The most common techniques employed for anomaly detection are based on the construction of a profile of what is "normal": anomalies are reported as those instances in the dataset that do not conform to the normal profile.…[src]
Isolation forest is an unsupervised learning algorithm for anomaly detection that works on the principle of isolating anomalies, instead of the most common techniques of profiling normal points.[src] In statistics, an anomaly (a.k.a.[src] outlier) is an observation or event that deviates so much from other events to arouse suspicion it was generated by a different mean.[src] For example, the graph in Fig.1 represents ingress traffic to a web server, expressed as the number of requests in 3-hours intervals, for a period of one month.[src] It is quite evident by simply looking at the picture that some points (marked with a red circle) are unusually high, to the point of inducing suspect that the web server might have been under attack at that time.[src] On the other hand, the flat segment indicated by the red arrow also seems unusual and might possibly be a sign that the server was down during that time period.[src] Anomalies in a big dataset may follow very complicated patterns, which are difficult to detect "by eye" in the great majority of cases.[src] This is the reason why the field of anomaly detection is well suited for the application of machine learning techniques.[src] The most common techniques employed for anomaly detection are based on the construction of a profile of what is "normal": anomalies are reported as those instances in the dataset that do not conform to the normal profile.[src] Isolation Forest uses a different approach: instead of trying to build a model of normal instances, it explicitly isolates anomalous points in the dataset.[src] The main advantage of this approach is the possibility of exploiting sampling techniques to an extent that is not allowed to the profile-based methods, creating a very fast algorithm with a low memory demand.[src] More formally, let X = { x 1 , ..., x n } be a set of d-dimensional points and X' ⊂ X a subset of X.[src] An Isolation Tree (iTree) is defined as a data structure with the following properties: for each node T in the Tree, T is either an external-node with no child, or an internal-node with one "test" and exactly two daughter nodes (T l , T r ) a test at node T consists of an attribute q and a split value p such that the test q l or T r .[src] In order to build an iTree, the algorithm recursively divides X' by randomly selecting an attribute q and a split value p, until either (i) the node has only one instance or (ii) all data at the node have the same values.[src] When the iTree is fully grown, each point in X is isolated at one of the external nodes.[src] Intuitively, the anomalous points are those (easier to isolate, hence) with the smaller path length in the tree, where the path length h(x i ) of point x_i \in X is defined as the number of edges x i traverses from the root node to get to an external node.[src] A probabilistic explanation of iTree is provided in the iForest original paper.[src] c(m) = \begin{cases} 2H(m-1)-\frac{2(m-1)}{n} & \text{for }m>2 \\ 1 & \text{for }m=2 \\ 0 & \text{otherwise} \end{cases} where m is the testing data size, m is the size of the sample set and H is the harmonic number, which can be estimated by H(i)=ln(i)+\gamma , where \gamma=0.5772156649 is the Euler-Mascheroni constant.[src] The value of c(m) above represents the average of h(x) given m, so we can use it to normalise h(x) and get an estimation of the anomaly score for a given instance x: s(x,m)=2^\frac{-E(h(x))}{c(m)} where E(h(x)) is the average value of h(x) from a collection of iTrees.[src] It is interesting to note that for any given instance x: if s is close to 1 then x is very likely to be an anomaly if s is smaller than 0.5 then x is likely to be a normal value if for a given sample all instances are assigned an anomaly score of around 0.5, then it is safe to assume that the sample doesn't have any anomaly[src]
29 sentences · 29 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Isolation forest." encyclopegia.org, 2026, https://encyclopegia.org/wiki/isolation-forest. Accessed 26 November 2026.
Chicago
"Isolation forest." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/isolation-forest.
APA
encyclopegia.org. (2026). Isolation forest. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/isolation-forest
Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON