# thuml/Anomaly-Transformer

About Code release for "Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy" (ICLR 2022 Spotlight), https://openreview.net/forum?id=LzQQ89U1qm_

Repository: https://github.com/thuml/Anomaly-Transformer
Canonical: https://ross.abutalabs.com/products/anomaly-transformer
Language: Python
License: MIT
License Family: permissive
Topics: anomaly-detection, deep-learning, time-series
Last push: 2023-12-29T11:36:58+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1595, "days_push": 978, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1038, forks 272 (observed 2026-08-28T04:03:19.705514+00:00)

## What it is
Official PyTorch implementation of the Anomaly Transformer model from the ICLR 2022 Spotlight paper on unsupervised time series anomaly detection. It uses an Anomaly-Attention mechanism and an association discrepancy criterion with a minimax training strategy.

## Use cases
- detect anomalies in time series data
- reproduce ICLR 2022 anomaly detection benchmark results
- run unsupervised anomaly detection on SMD, MSL, SMAP, or PSM datasets
- compare against baseline time series anomaly detection models
- experiment with transformer-based anomaly detection architectures

## When to choose
- you need unsupervised anomaly point detection in time series
- you want to reproduce or build on the Anomaly Transformer paper
- you need a strong transformer baseline for time series anomaly research

## When to avoid
- you need production-ready, actively maintained anomaly detection tooling
- you want streaming or real-time anomaly detection out of the box
- your data is not time series

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, time-series, artificial-intelligence
- platform: python
- tags: anomaly-detection, time-series, transformer, research-code, iclr-2022

## Member repositories
- thuml/Anomaly-Transformer (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:19.705514+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:04:19.343882+00:00, confidence not recorded.
  - readme: https://github.com/thuml/Anomaly-Transformer (fetched 2026-08-28T04:03:19.705514+00:00, sha 280d5495fd06)
- Data as of 2026-08-30T08:39:29.467469+00:00.
