Skip to main content
QUICK REVIEW

[Paper Review] COMET: Codebook-based Online-adaptive Multi-scale Embedding for Time-series Anomaly Detection

Jinwoo Park, Hyeongwon Kang|arXiv (Cornell University)|Feb 2, 2026
Anomaly Detection Techniques and ApplicationsComputer Science0 citations
TL;DR

COMET learns multi-scale patch embeddings and a codebook-based normal-pattern coreset, with online codebook adaptation at test time to detect time-series anomalies under distribution shifts.

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.

Motivation & Objective

  • Motivate the need to capture temporal dependencies and multivariate correlations across multiple time scales in unsupervised time-series anomaly detection.
  • Propose a codebook-based framework that learns representative normal patterns and detects anomalies via dual scoring (memory distance and quantization error).
  • Address distribution shifts at inference with online codebook adaptation using pseudo-labeling and contrastive learning.
  • Demonstrate effectiveness across diverse datasets and show robustness to non-stationarity and context-dependent anomalies.

Proposed method

  • Introduce Multi-scale Patch Encoding to jointly model temporal dependencies and inter-variable correlations across scales.
  • Use a Vector-Quantized Coreset to quantize embeddings into codebook entries learned from normal data.
  • Compute anomaly scores from a memory-based distance to the coreset with local scaling and a reconstruction-based quantization error.
  • Employ Online Codebook Adaptation with activation-based pseudo-labeling and supervised contrastive learning to adapt at inference without contaminating the codebook.
  • Aggregate two normalized scores (memory and quantization) with a dynamic weighting and exponential moving average normalization to produce final anomaly scores.
Figure 1 : Overall architecture of COMET. (Left) During training, input time series are processed via Multi-scale Patch Encoding to capture temporal contexts at different resolutions. The resulting embeddings are mapped to a Vector-Quantized Coreset , where activated codebook entries are stored in t
Figure 1 : Overall architecture of COMET. (Left) During training, input time series are processed via Multi-scale Patch Encoding to capture temporal contexts at different resolutions. The resulting embeddings are mapped to a Vector-Quantized Coreset , where activated codebook entries are stored in t

Experimental results

Research questions

  • RQ1Can multi-scale patch encoding effectively capture temporal and cross-variable patterns for unsupervised anomaly detection?
  • RQ2Does vector quantization of normal patterns enable reliable anomaly scoring via memory distance and reconstruction quantization error?
  • RQ3Can online, activation-based codebook adaptation mitigate distribution shifts at test time without threshold-based contamination?
  • RQ4Do local-density aware distance metrics improve memory-based anomaly scoring across varying data densities?
  • RQ5How does COMET perform relative to state-of-the-art baselines across multiple benchmark datasets and metrics?

Key findings

  • COMET achieves state-of-the-art performance on 39 of 45 metrics without test-time adaptation and improves further with TTA across five benchmarks.
  • Multi-scale patch encoding improves representation by capturing patterns at different resolutions and scale-aware correlations.
  • The vector-quantized coreset learns representative normal patterns, enabling effective anomaly scoring via memory distance and quantization error.
  • Online codebook adaptation with pseudo-labeling and contrastive learning reduces contamination and improves robustness to distribution shifts.
  • COMET is parameter-efficient (567K parameters) and achieves strong performance with faster training times compared to some larger baselines.
Figure 2 : Comparison between global distance and local scaling distance. (Top) Global distance fails to identify normal queries in sparse regions as it relies solely on absolute distance without considering local density. (Bottom) Local scaling distance accounts for local density, leading to more c
Figure 2 : Comparison between global distance and local scaling distance. (Top) Global distance fails to identify normal queries in sparse regions as it relies solely on absolute distance without considering local density. (Bottom) Local scaling distance accounts for local density, leading to more c

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.