Definition

  • Isolation Forest is an algorithm for data anomaly detection and was initially developed by Fei Tony Liu in 2008 using binary trees.
  • The algorithm has linear time complexity and a low memory requirement, so it works well with high-volume data.
  • No density or distance estimation is performed in the algorithm.
  • This algorithm is different from decision tree algorithms: only the path-length measure or approximation is begin used to generate the anomaly score, no leaf node statistics on class distribution or target value is needed.

Why fast ?

  • Isolation Forest is fast because it splits the data space randomly, using randomly selected attribute and randomly selected split point.

Algorithm

  • The premise of the iForest algorithm is that anomalous data1 points are easier to separate from the rest of the sample.
  • iForest algorithm recursively generate partitions on the sample by randomly selecting an attribute and then randomly selecting a split value between minimum and maximum values allowed for that attribute.
  • Let X=x1,...,xnX = {x_{1}, ... , x_{n}} be a set of d-dimensional points and X′⊂XX' \subset X. An Isolation Tree (iTree) is defined as a data structure with following properties:
    1. 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 child nodes (TlT_{l} or TrT_{r})
    2. a test at node TT consists of an attribute qq and a split value pp such that the test q<pq<p determines the traversal of a data point to either (TlT_{l} or TrT_{r})
  • To build an iTree, the algorithm recursively divides X′X' by randomly selecting an attribute qq and a split value pp, until either:
    1. the node has only one instance
    2. all data at the node have the same value
  • When the iTree is fully grown, each point in XX is isolated at one of the external nodes. Intuitively, the anomalous points1 have smaller path length in the tree.
  • Path length h(xi)h(x_{i}) of points xi∈Xx_{i} \in X is defined as the number of edges xix_{i} traverses from the root node to get to an external node.

Properties

Footnotes

  1. Anomalous data: data points that are easier to isolate ↩ ↩2

Built with LogoFlowershow