THEMIS: Unlocking Pretrained Knowledge with Foundation Model Embeddings for Anomaly Detection in Time Series
Yadav Mahesh Lorik, Kaushik Sarveswaran, Nagaraj Sundaramahalingam, Aravindakumar Venugopalan
TL;DR
THEMIS addresses the challenge of detecting anomalies in time series without labeled data by leveraging frozen embeddings from a forecasting foundation model (Chronos) and applying robust outlier detection on a Windowed Absolute Similarity Matrix. By decoupling representation learning from anomaly scoring and using modular adapters (Spectral Residual, LOF, Mean Similarity, Trimmed Top-k), it achieves state-of-the-art performance on the MSL benchmark and strong results on SMAP and SWaT in a zero-shot setting. The approach offers hyperparameter robustness and interpretability, highlighting the potential of pretrained representations for adaptable time series anomaly detection across domains. This framework paves the way for exploring additional foundation models and more sophisticated outlier detectors to improve real-world deployment.
Abstract
Time series anomaly detection forms a very crucial area in several domains but poses substantial challenges. Due to time series data possessing seasonality, trends, noise, and evolving patterns (concept drift), it becomes very difficult to set a general notion of what constitutes normal behavior. Anomalies themselves could be varied, ranging from a single outlier to contextual or collective anomalies, and are normally very rare; hence, the dataset is largely imbalanced. Additional layers of complexities arise due to the problems of increased dimensionality of modern time series, real-time detection criteria, setting up appropriate detection thresholds, and arriving at results that are interpretable. To embrace these multifaceted challenges, very strong, flexible, and interpretable approaches are required. This paper presents THEMIS, a new framework for time series anomaly detection that exploits pretrained knowledge from foundation models. THEMIS extracts embeddings from the encoder of the Chronos time series foundation model and applies outlier detection techniques like Local Outlier Factor and Spectral Decomposition on the self-similarity matrix, to spot anomalies in the data. Our experiments show that this modular method achieves SOTA results on the MSL dataset and performs quite competitively on the SMAP and SWAT$^*$ datasets. Notably, THEMIS exceeds models trained specifically for anomaly detection, presenting hyperparameter robustness and interpretability by default. This paper advocates for pretrained representations from foundation models for performing efficient and adaptable anomaly detection for time series data.
