COMET: Codebook-based Online-adaptive Multi-scale Embedding for Time-series Anomaly Detection
Jinwoo Park, Hyeongwon Kang, Seung Hun Han, Pilsung Kang
TL;DR
COMET tackles time-series anomaly detection under distribution drift by integrating multi-scale patch encoding, a vector-quantized coreset of normal patterns, and online codebook adaptation. It introduces a density-aware memory-distance score and a reconstruction-based quantization score, augmented by deviation-based variable selection and EMA normalization, then fuses them for robust detection. Empirically, COMET achieves state-of-the-art performance on 39/45 metrics across five benchmarks and remains parameter-efficient, with additional gains from test-time adaptation via activation-based pseudo-labeling and contrastive learning. The work offers a practical, scalable solution for real-world monitoring where non-stationarity and limited labeling are common challenges.
Abstract
Time series anomaly detection is a critical task across various industrial domains. However, capturing temporal dependencies and multivariate correlations within patch-level representation learning remains underexplored, and reliance on single-scale patterns limits the detection of anomalies across different temporal ranges. Furthermore, focusing on normal data representations makes models vulnerable to distribution shifts at inference time. To address these limitations, we propose Codebook-based Online-adaptive Multi-scale Embedding for Time-series anomaly detection (COMET), which consists of three key components: (1) Multi-scale Patch Encoding captures temporal dependencies and inter-variable correlations across multiple patch scales. (2) Vector-Quantized Coreset learns representative normal patterns via codebook and detects anomalies with a dual-score combining quantization error and memory distance. (3) Online Codebook Adaptation generates pseudo-labels based on codebook entries and dynamically adapts the model at inference through contrastive learning. Experiments on five benchmark datasets demonstrate that COMET achieves the best performance in 36 out of 45 evaluation metrics, validating its effectiveness across diverse environments.
