Inferensys

Glossary

USAD

USAD (UnSupervised Anomaly Detection) is an adversarial training framework employing two autoencoders in a two-phase game to stably reconstruct normal multivariate time series data while amplifying the reconstruction error of anomalies.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
DEFINITION

What is USAD?

USAD (UnSupervised Anomaly Detection) is an adversarial training framework that uses two autoencoders in a two-phase game to amplify the reconstruction error of anomalies while stably reconstructing normal multivariate time series data.

USAD is an unsupervised anomaly detection algorithm designed for multivariate time series. Its core architecture consists of a shared encoder and two distinct decoders forming an adversarial pair. The training process is a two-phase game: the first phase trains both autoencoders to reconstruct normal input data, while the second phase pits them against each other, where one autoencoder is trained to maximize the reconstruction error of the other on anomalous inputs, effectively amplifying the anomaly signal.

This adversarial training strategy provides USAD with superior stability and sensitivity compared to standard autoencoders or GAN-based approaches. By learning to reconstruct normal data stably while simultaneously learning to destabilize the reconstruction of anomalies, the model achieves a pronounced separation in reconstruction error distributions. The final anomaly score is derived from the combined reconstruction error of both decoders, making it highly effective for detecting subtle, previously unseen fraud patterns in high-dimensional financial transaction streams.

ADVERSARIAL AUTOENCODERS

Key Features of USAD

UnSupervised Anomaly Detection (USAD) leverages a unique adversarial training framework between two autoencoders to amplify reconstruction errors for anomalies while maintaining stable reconstructions for normal data.

01

Two-Phase Adversarial Training

USAD employs a two-phase training paradigm that mimics a minimax game:

  • Phase 1 (Autoencoder Training): Both autoencoders (AE1 and AE2) are trained to reconstruct normal input data, sharing a common encoder but having distinct decoders.
  • Phase 2 (Adversarial Training): AE1 is trained to reconstruct data in a way that maximally confuses AE2, while AE2 is trained to distinguish between original data and AE1's reconstructions. This adversarial dynamic forces AE1 to amplify subtle deviations in anomalous inputs, creating a more sensitive anomaly score.
2
Training Phases
02

Amplified Reconstruction Error

The core detection mechanism relies on a weighted combination of reconstruction errors from both autoencoders:

  • The final anomaly score is computed as α * ||X - AE1(X)||₂ + β * ||AE1(X) - AE2(AE1(X))||₂.
  • The adversarial training causes AE1 to produce reconstructions that are intentionally poor for anomalies, while AE2's secondary reconstruction further amplifies this discrepancy.
  • This two-stage error amplification makes the model significantly more sensitive to subtle anomalies that a standard autoencoder might miss, reducing false negatives in complex multivariate time series.
2-Stage
Error Amplification
03

Multivariate Time Series Architecture

USAD is specifically designed for multivariate time series data, making it ideal for financial transaction streams:

  • The architecture processes sliding windows of multi-feature data, capturing both temporal dependencies and cross-feature correlations simultaneously.
  • Unlike univariate methods, it detects anomalies that manifest as abnormal combinations of features rather than just extreme individual values.
  • The shared encoder learns a compressed latent representation that encodes the normal operating state of the entire system, enabling the detection of complex, coordinated fraudulent patterns across multiple transaction attributes.
04

Unsupervised Learning Without Labels

USAD operates in a fully unsupervised manner, requiring no labeled fraud examples during training:

  • The model is trained exclusively on normal, non-anomalous data, learning to reconstruct the expected patterns of legitimate transactions.
  • This is critical for financial fraud detection where labeled fraud data is scarce, expensive to obtain, and quickly becomes outdated as fraudsters adapt.
  • The adversarial component provides a self-supervisory signal that prevents the model from simply learning an identity function, ensuring it develops a robust representation of normality rather than memorizing training samples.
0
Labels Required
05

Stable Normal Reconstruction

A key innovation of USAD is its ability to maintain stable, low-error reconstructions for normal data while amplifying errors for anomalies:

  • The dual-autoencoder architecture creates a form of consensus; both networks agree on normal patterns, producing consistent reconstructions.
  • For anomalous inputs, the adversarial tension between AE1 and AE2 causes their reconstructions to diverge significantly, creating a clear separation in the anomaly score distribution.
  • This stability prevents the high false positive rates common in other unsupervised methods, where normal but slightly unusual transactions can trigger alerts due to model instability.
06

Fast Inference for Real-Time Scoring

USAD is optimized for low-latency inference, making it suitable for real-time fraud scoring pipelines:

  • Once trained, anomaly scoring requires only two forward passes through the autoencoders, with no iterative optimization or nearest-neighbor searches.
  • The model's inference time is constant regardless of the training dataset size, enabling deployment in streaming environments where decisions must be made in milliseconds.
  • This efficiency allows USAD to be integrated directly into payment authorization flows, providing an anomaly score before a transaction is approved.
< 10ms
Inference Latency
USAD EXPLAINED

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the UnSupervised Anomaly Detection (USAD) framework for multivariate time series.

USAD, which stands for UnSupervised Anomaly Detection on multivariate time series, is an adversarial training framework that uses two autoencoders in a two-phase game to amplify the reconstruction error of anomalies while learning to reconstruct normal data stably. The architecture consists of a shared encoder and two decoders. In the first phase, both autoencoders are trained to reconstruct normal input data. In the second, adversarial phase, one autoencoder (AE1) is trained to maximize the reconstruction error of the other (AE2), while AE2 is trained to distinguish between real data and the output of AE1. This adversarial interplay forces the model to become highly sensitive to anomalous inputs, which cause a large discrepancy in reconstruction, while remaining stable on normal data. The final anomaly score is a weighted combination of the reconstruction errors from both autoencoders, providing a robust, unsupervised signal for detecting novel fraud patterns in transaction sequences.

MULTIVARIATE TIME SERIES ANOMALY DETECTION COMPARISON

USAD vs. Other Anomaly Detection Methods

Comparative analysis of USAD against alternative unsupervised and semi-supervised anomaly detection architectures for multivariate time series data, evaluating architectural design, training stability, and operational characteristics.

FeatureUSADLSTM AutoencoderAnomaly TransformerIsolation Forest

Architecture Type

Adversarial dual-autoencoder

Recurrent autoencoder

Transformer with anomaly-attention

Tree ensemble partitioning

Training Paradigm

Two-phase adversarial game

Standard reconstruction minimization

End-to-end attention-based

Random recursive partitioning

Handles Temporal Dependencies

Multivariate Capability

Adversarial Training Stability

High (two-phase decoupling)

Anomaly Score Mechanism

Amplified reconstruction error

Reconstruction error

Association discrepancy

Path length to isolation

False Positive Rate on SWaT

0.3%

1.2%

0.6%

2.8%

Training Time Sensitivity

Moderate (phase balancing required)

Low

High (attention complexity)

Very low

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.