TL;DR
HILAD (Human-in-the-Loop Anomaly Detection) is a bidirectional framework designed to find and fix hidden biases in time series anomaly detection models. By combining attribution-aware clustering with a smart label propagation mechanism, it allows domain experts to audit and retrain models at scale with minimal manual effort, significantly boosting both classification accuracy and model trustworthiness.
What Problem Does This Paper Address?
Supervised machine learning models are highly effective at flagging anomalies in time series data, but they often suffer from a dangerous flaw: they can be "right for the wrong reasons." A model might correctly classify a sequence as an anomaly but base its decision on completely irrelevant features or normal background noise—a phenomenon known as spurious correlation.
While Explainable AI (XAI) tools like Class Activation Mapping (CAM) can visually expose these biases by highlighting what the model is looking at, they have two major limitations:
- They don't scale: Reviewing explanations instance-by-instance across massive datasets is too labor-intensive for human experts.
- They are one-way: They show you where the model is wrong, but offer no mechanism to fix it.
HILAD bridges this gap, turning passive visual explanation into an active, scalable model-correction pipeline.
Methods
The HILAD framework operates in three distinct phases:
- Behavior Summarization: Instead of clustering data based solely on raw features, HILAD performs attribution-aware clustering. It calculates a joint distance matrix combining time-series context similarity (via Dynamic Time Warping) and model attention similarity (via Cosine Similarity of the CAM masks). It then projects this space using UMAP and clusters it with K-means to group sequences where the model behaves similarly.
- Annotation and Propagation: Through an interactive visual analytics interface, domain experts review the clusters. Instead of labeling individual sequences, they label entire clusters as having "correct" or "spurious" attention. A Label Propagation algorithm then automatically spreads these human insights to unannotated clusters, calculating a dataset-wide "Spuriousness score."
- Model Enhancement: To mitigate the identified biases, HILAD adapts Core Risk Minimization (CoRM) for time series. It injects random Gaussian noise into the time steps flagged as spurious (effectively masking them out) and retrains the model, forcing it to ignore the bad features and learn from robust, true anomaly indicators.
Datasets
The authors evaluated HILAD across three distinct time series datasets:
- Mars Science Laboratory (MSL): Real sensor and actuator data from the NASA Mars rover, filtered to focus on non-trivial anomaly sequences.
- STEVE (Simulation Testbed for Exploration Vehicle ECLSS): A dataset generated from a Simulink model simulating life-support failure modes (like valve leaks) onboard the International Space Station.
- KPI Anomaly Detection for AIOps: A massive, real-world dataset containing noisy, high-variance time series metrics from internet companies.
Key Insights and Ideas
- Clustering Behavior over Data: Traditional clustering groups similar data points. HILAD clusters model behaviors (data + attention). This allows experts to quickly spot systematic flaws—such as a model consistently looking at the wrong sensor cycle to predict a specific failure mode.
- Leveraging Human Effort Efficiently: Domain experts are a bottleneck. By using label propagation, an expert only needs to manually annotate a tiny fraction of the data (around 10 clusters) to clean up and evaluate hundreds of sequences.
- Targeted Jittering as a Correction Tool: Injecting Gaussian noise into spurious regions acts as a targeted data augmentation strategy. It effectively teaches the model what not to look at without requiring changes to the underlying neural network architecture.
Key Results
The framework was tested against fully convolutional networks (FCN) and transformer-based time series models (TST), significantly outperforming automated data augmentation and active learning baselines:
- Massive F1 Gains: On the MSL dataset, HILAD achieved an F1 score improvement of 18.485% ± 2.7% compared to the base model, whereas standard active learning baselines only yielded a 1.9% to 2.6% gain.
- Unmatched Efficiency: HILAD required the least average annotation time (8.3 ± 2.1 minutes) while achieving a label coverage of 800 sequences via propagation (compared to a fixed budget of 160 for baselines).
- Better Rationale Alignment: Across all datasets, HILAD drastically improved Relevance Accuracy—meaning the retrained models actually looked at the true, ground-truth anomalous periods to make their decisions.
Limitations and Future Work
While HILAD shows impressive results, the authors note that highly imbalanced datasets still pose a challenge, as an abundance of normal instances can occasionally cause the retrained model to misclassify anomalies as normal (affecting recall). Additionally, while the framework is modular and can support various XAI methods (like Grad-CAM or RISE), the user studies were primarily conducted using standard CAM. Future work could explore how different attribution techniques impact the quality of the behavior-based clustering.
Summary updated