Abstract
For the purpose of monitoring the behavior of complex infrastructures (e.g., aircraft, transport, or energy networks), high-rate sensors are deployed to capture multivariate data, generally in the form of continuous trajectories or curves. This paper introduces the Functional Isolation Forest (FIF), an extension of the popular Isolation Forest algorithm designed to handle functional data without the need for preliminary dimensionality reduction. By projecting curves onto a diverse dictionary of functions and utilizing a Sobolev-like scalar product, FIF effectively identifies complex anomalies in shape, magnitude, and frequency that traditional methods often overlook.
Introduction
Anomaly detection is a cornerstone of modern machine learning, particularly in industrial monitoring. However, most classical algorithms, including the original Isolation Forest, are optimized for "tabular" data—points residing in a finite-dimensional space. In contrast, real-world sensor data from aircraft engines, energy grids, or medical monitors are inherently functional, consisting of continuous curves over time.
The standard approach to processing such data involves dimensionality reduction (e.g., PCA) to transform curves into a manageable set of scalars. This "filtering" step is often a gamble; if the reduction process smooths over a subtle wiggle or a localized spike that indicates a failing component, the anomaly detector becomes blind to the threat. Furthermore, functional anomalies are diverse, ranging from simple magnitude shifts to complex shape deformations. Existing methods typically specialize in one type, failing to provide a comprehensive solution.
Methodology: The Functional Isolation Forest (FIF)
FIF generalizes the tree-based partitioning logic of Isolation Forests to the Hilbert space of functions. The core innovation lies in how the algorithm splits data at each node of the tree.
1. The Dictionary Approach
Unlike standard Isolation Forests that split based on a single coordinate (e.g., "is Temperature > 70?"), FIF selects a random function $d$ from a pre-defined dictionary $\mathcal{D}$. This dictionary can include various basis functions such as wavelets, cosines, or even Brownian motion paths. The choice of dictionary acts as a lens through which the data is viewed.
2. Projection and Splitting
The algorithm calculates the scalar product between the data curve $x$ and the selected dictionary function $d$. This projection yields a single scalar value. FIF then selects a random threshold within the range of these projections to split the data, recursively isolating trajectories until they reach a leaf node. The fewer splits required to isolate a curve, the higher its anomaly score.
3. Flexible Scalar Products
To capture both "shift" anomalies (where the entire curve is offset) and "shape" anomalies (where the curve’s slope or frequency is abnormal), the authors utilize a Sobolev-like scalar product. This allows the algorithm to simultaneously evaluate the values of the curve and its derivatives, providing a more holistic view of the functional behavior.
Experimental Evaluation
The performance of FIF was evaluated using a combination of synthetic benchmarks and real-world datasets:
- Simulated Data: The authors tested the model against Brownian motion and smooth paths with five specific injected anomaly types: jumps, magnitude shifts, noise, and frequency changes. FIF successfully detected all five types simultaneously, a task where traditional functional depth methods often struggle.
- UCR Time Series Archive: 13 real-world datasets (e.g., ECG200, SonyRobotAI, Coffee) were repurposed for anomaly detection by treating minority classes as outliers.
- MNIST: The model was extended to multivariate functional data by treating the strokes of handwritten digits as 2D curves, demonstrating its versatility beyond simple 1D time series.
Key Insights and Results
FIF demonstrated superior performance against established baselines, including the standard Isolation Forest (applied after PCA), Local Outlier Factor (LOF), and One-Class SVM.
- Benchmark Accuracy: In the UCR benchmarks, FIF achieved the highest Area Under the Curve (AUC) on 10 out of 13 datasets and the second-highest on the remaining three.
- Functional Statistical Depth: A significant theoretical contribution is the demonstration that the FIF score can define a "depth" function. This allows for the ranking of how "central" or "typical" a curve is, which has immediate applications in supervised classification via the "DD-plot" approach.
- Stability: Empirical tests showed strong convergence; as the number of trees and sample size increased, the anomaly scores became increasingly stable and accurate.
Limitations and Future Directions
While FIF represents a significant advancement, it is not without challenges. The performance remains somewhat dependent on the choice of dictionary; selecting the optimal dictionary for a specific industrial application currently requires domain expertise. Additionally, while the empirical evidence is robust, formal theoretical consistency proofs for isolation forests in infinite-dimensional spaces remain an open challenge in the field. Finally, the computational cost of projecting curves onto dictionary elements is higher than the axis-parallel splits used in tabular forests, though it remains efficient enough for high-rate sensor applications.
Conclusion
Functional Isolation Forest provides a powerful, flexible framework for detecting anomalies in complex, high-frequency data. By avoiding the "filtering trap" and operating directly in functional space, it offers a more reliable tool for monitoring the health and behavior of critical infrastructure.
Summary updated