arXiv:2610.12244cs.LGOct 2026

Manuscript Offprint

arXiv:2610.12244

RIFT: Relative Isolation From Trees For Anomaly Detection

Mark Daniel Szalai, Gabor Horvath

Abstract

Isolation Forest (IF) is a widely used baseline for unsupervised anomaly detection. Recent studies provide a closed-form expression for the infinite-forest limit for one-dimensional data. Inspired by the geometric interpretation of this formula, we introduce RIFT (Relative Isolation From Trees), a deterministic anomaly detection method that generates the minimum spanning tree and scores each point by the sum of the apparent sizes of tree edges as viewed from that point. For one-dimensional data, the RIFT score recovers the closed-form IF limit exactly. In higher dimensions, it provides a parameter-free generalization that is deterministic, robust to varying density and clustered anomalies and avoids the axis-parallel artifacts of IF. We further propose an ensemble variant for large datasets. Experiments on synthetic data and the ADBench benchmark demonstrate that the accuracy is comparable to IF, while the ensemble variant exhibits significantly lower variance across random seeds.

Keywords: anomaly detection, outlier detection, ensemble, unsupervised learning, machine learning

1 Introduction

Today, vast amounts of data are generated across various domains, including IT systems, industry, finance, and healthcare [1,2][1, 2]. Machine learning tools enable the automated detection of anomalies, or outliers, within these datasets. An anomaly is generally defined as a data point that deviates significantly from the majority, suggesting it was generated by a different underlying process [3]. Often, anomalies are identified simply to be removed, as they may result from measurement or data collection errors that could distort the analysis. In many other cases, however, the anomalies themselves hold the most valuable information: they might indicate diseases in medical diagnostics [4], cyberattacks in IT security [5], or subtle equipment malfunctions in industrial systems [6] that are difficult for human operators to detect.

A vast number of anomaly detection methods has been proposed in the literature. These include techniques designed for time-series data [7], graph-based methods [8], and algorithms tailored for textual data (such as system logs) [9]. Another major category focuses on detecting "point anomalies" within multidimensional tabular data [10], assuming no underlying sequential or temporal structure among the independent samples. In this paper, we introduce a novel algorithm that falls into this latter category.

While supervised machine learning can be used for anomaly detection, it faces two significant challenges. First, it requires large amounts of labeled training data [11][11]. Second, supervised models tend to overfit to known anomaly patterns rather than learning the boundaries of normal behavior, making them blind to novel, previously unseen types of outliers [12][12]. The method proposed in this paper is strictly unsupervised. It does not require any pre-labeled training data, which is often impractical or impossible to obtain in real-world scenarios, and separates anomalies from normal instances based solely on the intrinsic properties of the data itself.

One of the most renowned algorithms in this unsupervised domain is the Isolation Forest (IF) [13]. Based on a simple yet elegant concept, IF is robust, fast, and provides accurate results both on small and large datasets. The algorithm introduced in our paper shares conceptual similarities with the Isolation Forest but operates on entirely different mechanics. For one-dimensional data, our method yields the exact same results as an Isolation Forest containing an infinite number of trees, each grown on the full sample without a height limit. In higher dimensions, our approach utilizes an anomaly scoring metric analogous to IF, but computes it through a fundamentally different, deterministic process based on geometric distances rather than random recursive partitioning. Consequently, our algorithm is not a mere derivative of existing techniques, but a novel method that broadens the landscape of anomaly detection algorithms.

The rest of the paper is organized as follows. First, Section 2 reviews the related literature and anomaly detection methods. Following this, in Section 3, we revisit the Isolation Forest algorithm, detailing its closed-form asymptotic solution for 1D data and its geometric interpretation. The proposed algorithm is then introduced in Section 4, starting with the exact methodology, followed by a fast but highly accurate approximation, and concluding with a scalable ensemble-based variant designed for large datasets. In Section 5, we evaluate the performance of our approach on synthetic data as well as standard benchmark datasets from ADBench, comparing it against several widely used anomaly detection techniques. Finally, Section 6 provides the concluding remarks.

References (28)