Cross-Domain Adaptive Multi-Scale Representation Learning for Unified Time Series Anomaly Detection

Xing Xu, Xu Wang, Yudong Zhang, Pengkun Wang, Zhengyang Zhou, Huilin Zhao, Chuan Chen, Yang WangOpenReview 2026 · Submission to ICLR 2026 · Rejected · OpenReview

TL;DR

UniAnomaly is a new framework that tackles the "one-model-per-dataset" limitation in time series anomaly detection. By using cross-domain pre-training and a multi-scale architecture that adaptively weights different temporal resolutions, it achieves state-of-the-art performance even in zero-shot scenarios across diverse industries.

What Problem Does This Paper Address?

Time series anomaly detection (TSAD) is vital for everything from monitoring power plants to tracking heart rates. However, the field faces two major hurdles:

  1. Domain Isolation: Most models are "one-trick ponies." A model trained on server logs usually fails when applied to satellite telemetry. This forces researchers to train separate models for every new domain, neglecting the potential for shared patterns.
  2. Temporal Inconsistency: Different datasets have different "heartbeats." One might sample data every millisecond (capturing sharp spikes), while another samples every hour (capturing long-term trends). Standard models often struggle to handle these varying granularities simultaneously.

The authors introduce UniAnomaly to solve these issues, creating a "foundation model" approach for anomalies that generalizes across heterogeneous data sources.

Methods

The UniAnomaly architecture is built on three core pillars designed to extract robust, transferable representations:

  • Multi-Scale Patch Embedding (MSPE): Instead of looking at individual data points, the model breaks the time series into "patches" of varying lengths (e.g., 2, 4, 8, and 16 time steps). This allows the model to "see" both fine-grained fluctuations and broader trends at the same time.
  • Multi-Scale Encoder (MSEM): The model uses independent encoders for each scale, implemented as dilated convolutional networks. Dilated convolutions are particularly effective here because they expand the receptive field without increasing computational cost, capturing long-range dependencies efficiently.
  • Scale-Wise Adaptive Projection Module (SAPM): This is the "brain" of the operation. It consists of an Adaptive Projection Pool that refines features and an Adaptive Gating Mechanism. Rather than just averaging the different scales, the gating mechanism dynamically assigns weights to each scale based on the input sequence. If a specific anomaly is only visible at a high frequency, the model learns to prioritize that scale.

The model is trained using a reconstruction-based approach: it learns to reconstruct "normal" data. During testing, any data point that the model fails to reconstruct accurately (measured by variance) is flagged as an anomaly.

Datasets

The authors utilized an impressive array of datasets to prove the model's versatility:

  • Pre-training Corpus: A massive collection of 13 diverse datasets, including ASD (application servers), ECG/MITDB (healthcare), NYC (transport), and the Monash Prediction Library.
  • Evaluation Benchmarks: To test generalization, they used five standard benchmarks: SMD (Server Machine Dataset), MSL (Mars Science Laboratory), SMAP (Soil Moisture Active Passive), SWaT (Secure Water Treatment), and PSM (Pooled Server Metrics).

Key Insights and Ideas

  • Cross-Domain Pre-training is Viable: Much like how LLMs learn the structure of language from diverse texts, UniAnomaly proves that time series models can learn "domain-agnostic" temporal features that transfer to entirely unseen industries.
  • Multi-Scale is Mandatory: The ablation studies show that single-scale models consistently miss anomalies. The "aha moment" here is that anomalies are often invisible at the wrong resolution; a "trend" anomaly looks like noise at a high-frequency scale, and a "spike" is smoothed away at a low-frequency scale.
  • Gating vs. Routing: The authors compared their Gating Mechanism to the "Routing" used in Mixture-of-Experts (MoE) models. They found that gating—which allows for a weighted blend of all scales—outperformed routing, which typically picks a single "expert" path.

Key Results

UniAnomaly sets a new bar for performance, particularly in zero-shot settings (where the model is tested on a dataset it has never seen before):

  • State-of-the-Art F1 Scores: In zero-shot tests, UniAnomaly achieved an F1 score of 84.87 on SMD and 84.68 on PSM, outperforming specialized models that were trained specifically on those datasets.
  • Finetuning Boost: When allowed to finetune on specific datasets, UniAnomaly improved its F1 scores by another 1–2%, reaching 85.01 on SMD and 85.61 on PSM.
  • Robustness: The model showed significantly higher AUC-ROC scores compared to traditional methods like OCSVM or isolation forests, indicating a much better balance between catching anomalies and avoiding false alarms.

Limitations and Future Work

While the paper demonstrates strong results, a few areas remain open for exploration:

  • Window Size Sensitivity: The analysis shows that the optimal "window size" (how much past data the model looks at) varies by dataset. While the multi-scale approach helps, the user still needs to pick a base window size that fits the domain.
  • Computational Overhead: Processing multiple scales through independent encoders increases the parameter count. Future work might look into more parameter-efficient ways to achieve multi-scale fusion.
  • Real-time Constraints: The paper focuses on accuracy and generalization; the latency requirements for high-speed industrial real-time deployment were not the primary focus of this study.

Summary updated

Abstract

Time series anomaly detection has received growing attention due to its importance in a wide range of real-world applications. However, two critical challenges remain under-explored. First, most existing methods train separate models for individual domains, which severely limits their generalization ability and neglects the potential of cross-domain anomaly detection. Second, when extending to the cross-domain setting, the inconsistency of temporal granularityacross datasets makes it difficult to learn unified representations. To address these issues, we propose UniAnomaly, a cross-domain anomaly detection framework equipped with a multi-scale encoder that effectively captures temporal dependencies at different granularity. Our approach enables robust and transferable representation learning across heterogeneous datasets. Extensive experiments on multiple real-world benchmarks demonstrate that UniAnomaly consistently achieves state-of-the-art performance, highlighting the effectiveness of cross-domain multi-scale modeling for time series anomaly detection. Our code is available at https://anonymous.4open.science/r/UniAnomaly-B923.
BibTeX
@misc{xu2026cross,
  author = {Xing Xu and Xu Wang and Yudong Zhang and Pengkun Wang and Zhengyang Zhou and Huilin ZHAO and Chuan Chen and Yang Wang},
  title = {{Cross-Domain Adaptive Multi-Scale Representation Learning for Unified Time Series Anomaly Detection}},
  year = {2026},
  url = {https://openreview.net/forum?id=IJDztMLEXw},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure