Abstract
Anomaly detection in unsupervised settings is often hindered by "distracting" features—irrelevant variations like lighting shifts or camera vibrations that trigger false positives. This paper introduces FOCUS (Feature Omission using Context in Unsupervised Settings), a method that learns a linear projection to filter out these distractors. By analyzing multiple sets of unlabeled, non-anomalous data across different contexts, FOCUS identifies feature dimensions that vary within contexts but do not distinguish between them. Experimental results on synthetic and image datasets demonstrate that FOCUS effectively isolates true anomalies from environmental noise, outperforming standard techniques like PCA.
The Challenge of Unsupervised Anomaly Detection
Anomaly detection is difficult because the definition of "normal" is context-dependent. For instance, a high-speed tennis serve is expected at Wimbledon but would be an anomaly in a casual backyard setting. Without explicit labels, algorithms often struggle to distinguish between meaningful anomalies and natural variations in the environment, such as shifting shadows. These irrelevant variations are known as distracting features.
Traditional unsupervised methods like Principal Component Analysis (PCA) are often ill-suited for this task. PCA prioritizes dimensions with high variance. However, in anomaly detection, a feature with zero variance (a "constant" feature) might be critical; if a normally inactive sensor suddenly triggers, it represents a significant anomaly. PCA might discard such a feature, whereas a robust system must preserve it.
The FOCUS Method
The authors propose FOCUS, a technique to learn a feature mapping invariant to distractors. The core innovation lies in using multiple training sets, each representing "normal" data from a specific context (e.g., different video feeds with varying illumination). FOCUS identifies directions in the feature space where data varies significantly within a single context but provides no information to differentiate between different contexts.
Technically, FOCUS solves a generalized eigenvalue problem: $$\max_{w} \frac{w^T C^{within} w}{w^T C^{all} w}$$ Where:
- $C^{within}$ represents the variance within individual "normal" sets (capturing the distractors).
- $C^{all}$ represents the total variance across all data.
Eigenvectors with high eigenvalues correspond to distractors. By projecting test data onto the remaining dimensions, the algorithm effectively filters out the noise, making true anomalies more prominent.
Experimental Evaluation
The method was evaluated using three primary setups:
- Synthetic 3D Dataset: Designed to contrast how FOCUS and PCA handle descriptive, distracting, and constant features.
- Modified Image Datasets: A hybrid of EMNIST (handwritten characters) and Caltech 101 Silhouettes.
- Synthetic Illumination Noise: Artificial gradients were added to image data to simulate real-world environmental distractors.
In the image experiments, standard detection algorithms initially failed by flagging lighting changes as anomalies. After applying the FOCUS projection, the algorithm successfully identified and removed 92 distracting dimensions (out of 784). The resulting transformed images showed that while illumination noise was stripped away, the underlying object shapes remained intact.
Key Insights
- Context as a Proxy for Labels: FOCUS demonstrates that explicit anomaly labels are not strictly necessary to improve detection. Multiple examples of "normal" behavior in varying environments provide enough signal to identify what should be ignored.
- Conservative Filtering: Unlike classification, which seeks to isolate a specific signal, FOCUS is designed to be conservative, only removing features proven to be distracting across the provided training sets.
- Linear Efficiency: The linear formulation allows for rapid computation, making it scalable to high-dimensional data.
Limitations and Future Work
While effective, the current FOCUS implementation is linear. Handling non-linear distractors would require "kernelizing" the function, which increases computational complexity. Additionally, the method requires a sufficient number of "normal" training sets—ideally matching or exceeding the number of feature dimensions—to preserve the integrity of the feature space. Future research may explore human-in-the-loop systems where real-time feedback on false positives helps the algorithm learn and filter new distractors dynamically.
Summary updated