Skip to main content
QUICK REVIEW

[Paper Review] Distance approximation using Isolation Forests

David Cortés‐Polo|arXiv (Cornell University)|Oct 27, 2019
Anomaly Detection Techniques and ApplicationsComputer Science5 references7 citations
TL;DR

This paper proposes a novel distance metric based on Isolation Forests that estimates similarity between data points by measuring their average separation depth in random trees, producing a scale-invariant, non-linear distance metric robust to variable relationships and missing data. The method outperforms traditional metrics like Euclidean and Mahalanobis in capturing complex data structures and maintains high correlation with Gower distance on mixed-type data.

ABSTRACT

This work briefly explores the possibility of approximating spatial distance (alternatively, similarity) between data points using the Isolation Forest method envisioned for outlier detection. The logic is similar to that of isolation: the more similar or closer two points are, the more random splits it will take to separate them. The separation depth between two points can be standardized in the same way as the isolation depth, transforming it into a distance metric that is limited in range, centered, and in compliance with the axioms of distance. This metric presents some desirable properties such as being invariant to the scales of variables or being able to account for non-linear relationships between variables, which other metrics such as Euclidean or Mahalanobis distance do not. Extensions to the Isolation Forest method are also proposed for handling categorical variables and missing values, resulting in a more generalizable and robust metric.

Motivation & Objective

  • To develop a distance metric that captures complex, non-linear relationships between variables in high-dimensional feature spaces.
  • To create a similarity measure invariant to variable scaling and robust to non-normal distributions and missing data.
  • To extend Isolation Forests beyond outlier detection to estimate pairwise distances between data points.
  • To handle mixed data types (numeric, categorical, missing values) within a unified distance framework.
  • To produce a standardized, bounded distance metric that satisfies distance axioms and enables threshold-based similarity decisions.

Proposed method

  • Uses random binary tree splits on features to compute the average separation depth between two points across multiple trees.
  • Standardizes separation depth using expected values under uniform random splitting to create a bounded, centered distance metric.
  • Applies the same logic used in isolation depth for outlier detection but adapts it to pairwise separation instead of isolation.
  • Extends the method to handle categorical variables by treating them as discrete splits and using Gower-like logic for mixed data.
  • Incorporates missing values by treating them as a separate category in splits, preserving distance estimation without imputation.
  • Uses limited-depth trees with non-random splits (e.g., based on variance minimization) to improve stability and reduce computational cost.

Experimental results

Research questions

  • RQ1Can separation depth in random Isolation Forest trees serve as a meaningful, standardized distance metric between data points?
  • RQ2How does the proposed distance metric compare to traditional metrics like Euclidean, Mahalanobis, and Cosine in capturing true similarity under complex data distributions?
  • RQ3To what extent can the method handle missing values and categorical variables while maintaining correlation with ground-truth distances?
  • RQ4Does the extended model (with categorical and missing value handling) preserve the metric’s robustness and accuracy on real-world mixed-type datasets?
  • RQ5Can the metric consistently distinguish within-group from between-group distances in multivariate, non-i.i.d. data such as Gaussian mixtures with correlated components?

Key findings

  • The proposed isolation-based distance metric achieved a correlation of 0.96 with the ideal distance in a multivariate Gaussian distribution with independent variables.
  • In a non-i.i.d. Gaussian mixture with correlated components, the extended model (IsoExt) achieved a correlation of 0.97 with the ideal within-group distance, outperforming Euclidean (0.95) and Mahalanobis (0.89).
  • With 15% missing values, the extended model maintained a correlation of 0.87 with the original distance metric, significantly outperforming imputed Euclidean (0.78) and Mahalanobis (0.72).
  • On the hypothyroid dataset with mixed numeric, boolean, and categorical variables, the proposed metric correlated at 0.731 with Gower distance, indicating strong alignment with a widely used benchmark.
  • The method successfully preserved symmetric within-group distances in mirrored Gaussian mixtures, unlike Mahalanobis distance, which failed due to mixed covariance structures.
  • The extended model showed a notable advantage in missing data scenarios, maintaining high correlation even when other metrics deteriorated significantly.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.