Corrected Mean Depths and Pairwise Score Fluctuations in Isolation Trees

The paper corrects the asymptotic constant of mean depth in isolation trees and derives an m/N-order pattern for pairwise score fluctuations.
This paper studies the mean depth and pairwise score fluctuations of one-dimensional fully grown isolation trees. Under a positive Lipschitz density on a compact interval, interior query points have mean depth with an additive constant 2γ−1/2, while endpoints or outside points have γ, correcting Zheng et al.'s asymptotics; inserting an interior query point asymptotically adds half a cut. For two separated intervals, the gap contributes a finite term. Pairwise depth-difference variance is on the order of m/N, with the leading constant from adding one point to a local Poisson process. Normalized depth suppresses absolute fluctuations but preserves pairwise ordering. These results suggest recalibrating depth-based anomaly scores and inform subsampling parameter selection.
Introduction
Isolation Trees are an important tool in the field of anomaly detection. Their core idea is to isolate samples through random cuts — the shallower the depth of a sample, the more likely it is to be an anomaly. However, the theoretical properties of isolation trees, especially the mean depth and score fluctuations, still contain many unresolved questions. A recent paper, Corrected mean depths and pairwise score fluctuations in isolation trees, explores these issues in depth, corrects previously reported asymptotic results, and reveals the patterns of pairwise score fluctuations.

An Isolation Tree is the basic building block of the Isolation Forest algorithm. Isolation Forest is an ensemble model composed of multiple random isolation trees. During training, each tree randomly subsamples the data and then recursively selects a random feature and a split value to partition the data until each sample is isolated individually or a depth limit is reached. The anomaly score of a sample is determined by its average path depth across this set of trees: the shallower the depth, the easier the sample is to "isolate," and thus the more likely it is to be an anomaly.
This "random cutting" idea does not require density estimation or distance computation, has low computational complexity, and is friendly to high-dimensional data, so it is widely adopted in practical anomaly detection tasks. But precisely because the cutting process is highly random, the depth of a single tree fluctuates considerably, and theoretical analysis requires probabilistic limit tools (such as Poisson process approximations) to characterize the mean depth and variance. The "asymptotic results" discussed in the paper refer to the analytical expressions for mean depth under limit conditions such as the sample size tending to infinity and the number of cuts tending to infinity.
Correction of the Mean Depth
The paper studies one-dimensional fully grown isolation trees, with training data drawn from a positive Lipschitz density on a compact interval. For held-out query points, the mean depth has an additive constant $2\gamma-1/2$ in the interior of the interval, while at the endpoints or outside the interval it is $\gamma$. This result corrects the asymptotics given by Zheng et al. Simply put, the mean depth of interior query points is one constant higher than previously thought, which affects depth-based anomaly scoring.
Furthermore, when an interior query point is inserted, its mean depth asymptotically increases by half a cut. This means that the position of the query point has a significant effect on depth, especially near the interval boundaries.
The "positive Lipschitz density" mentioned in the paper refers to a probability density function $f(x)$ for which there exists a constant $L>0$ such that for any $x,y$, $|f(x)-f(y)|\le L|x-y|$. This condition limits the rate of change of the density function and rules out infinitely steep peaks or discontinuities in the density, thereby ensuring that when a random cut point in the isolation tree falls into a certain region, the local density can be approximated by a constant, making the asymptotic analysis of mean depth feasible.
"Fully grown isolation tree" means that the tree grows until every sample is isolated individually (or equivalently, the number of cuts is sufficiently large), with no depth limit. Only in a fully grown isolation tree is the depth entirely determined by the random cut sequence, allowing exact probabilistic computation. In practical algorithms, a depth limit is often set to control computational cost, and theoretical results need corresponding corrections to adapt to the truncation effect caused by finite depth.
The Case of Two Separated Intervals
When the data is distributed over two separated intervals, the gap between the components also contributes a finite term to the depth. This shows that when isolation trees handle multimodal data, depth depends not only on local density but also on the global structure. This finding is crucial for understanding the behavior of isolation trees under complex data distributions.
Analysis of Pairwise Score Fluctuations
The paper further analyzes pairwise score fluctuations. For a reference pool of size $N$, after averaging over all subsets of size $m$ and all cuts, the variance of the depth difference between a fixed query point and two fixed distinct interior query points is on the order of $m/N$. When $m/N\to0$ and $m\to\infty$, the authors derive the leading variance constant from the effect of adding one point to the local Poisson process.
One detail: normalized depth can suppress absolute fluctuations, while the monotone isolation score preserves the same pairwise ordering. This means that in practice, using normalized depth can improve stability, but the ordering relationship remains unchanged.
The "local Poisson process" approximation is a common tool for analyzing random cut depths. When the subsample size $m$ is relatively large and the cut interval is relatively small, the number of cut points falling near the query point approximately follows a Poisson process whose intensity is determined by the data density at the query point. The depth of a query point in an isolation tree is essentially the counting problem of "how many cuts fall within its interval before the query point is isolated individually," so the mean depth can be characterized by the number of arrivals of the Poisson process, and the fluctuation magnitude of pairwise depth differences can be derived from the variance properties of the Poisson process.
Pairwise score fluctuation refers to the variance of the depth difference between two different query points (or a fixed point and an interior point) across different random subsets and cuts. A variance on the order of $m/N$ means that when the reference pool $N$ is much larger than the subsample $m$, score differences across different subsets are significantly averaged out, resulting in higher ranking stability; conversely, if $m$ is close to $N$, fluctuations increase and anomaly rankings may become unstable. This provides a theoretical basis for choosing the subsampling parameter $m$ in Isolation Forest.
Practical Significance and Implications
These theoretical results have important guiding significance for anomaly detection practice. First, the corrected mean depth constant suggests that we need to recalibrate depth-based anomaly scores, especially in the interval interior and near the boundaries. Second, the analysis of pairwise score fluctuations shows that when the reference pool size $N$ is much larger than the subsample size $m$, score fluctuations are small, which provides a basis for parameter selection. Finally, the properties of normalized depth and monotone scores help design more robust anomaly detection algorithms.
Although the paper focuses on one-dimensional fully grown isolation trees, its methods may extend to higher dimensions. Future research can explore similar corrections and fluctuation patterns in multidimensional settings.
Conclusion
Through rigorous mathematical analysis, this paper corrects the asymptotic results for the mean depth of isolation trees and reveals the patterns of pairwise score fluctuations. These findings not only deepen our understanding of isolation tree theory but also provide new perspectives for improving anomaly detection algorithms. For developers engaged in anomaly detection research or applications, these conclusions are worth attention.
One-line Summary
The paper corrects the asymptotic constant of mean depth in isolation trees and derives an m/N-order pattern for pairwise score fluctuations.
Paragraph Summary
This paper studies the mean depth and pairwise score fluctuations of one-dimensional fully grown isolation trees. Under the assumption of a positive Lipschitz density on a compact interval, the authors find that the mean depth of interior query points contains an additive constant 2γ−1/2, while at endpoints or outside the interval it is γ, correcting the asymptotic results of Zheng et al.; inserting an interior query point asymptotically increases the mean depth by half a cut. When data is distributed over two separated intervals, the interval gap also contributes a finite term to the depth. Regarding pairwise score fluctuations, the variance of the depth difference between a fixed point and two interior query points is on the order of m/N, with the leading constant determined by the effect of adding one point to the local Poisson process. Normalized depth can suppress absolute fluctuations while preserving pairwise ordering. These results suggest the need to recalibrate depth-based anomaly scores and provide a basis for choosing the subsampling parameter.
Related articles

Stanford CS336 Explained: The Five Pillars and Efficiency Laws of Building an LLM from Scratch
A deep dive into Stanford CS336 'Building an LLM from Scratch': the five-pillar curriculum, the efficiency equation, the memory wall and five types of parallelism, Chinchilla scaling laws, data refinement, and BPE tokenizer failure cases—revealing how small-scale training transfers to frontier scale.

World of Warcraft Infinite Open Beta Review: How Does Slow-Paced Design Satisfy Millions of Players?
World of Warcraft Infinite's open beta drew a million players. We analyze its slow-paced design philosophy, the new Skywing race's leveling advantages, and class changes.

Pstack: An Open-Source Skill Library That Makes AI Coding More Rigorous
Pstack is an MIT-licensed open-source agent skill library with 5,000+ GitHub stars, offering test-driven development, TypeScript best practices, and potato mode for more rigorous AI coding.