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.
Glossary
USAD

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
| Feature | USAD | LSTM Autoencoder | Anomaly Transformer | Isolation 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 |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core algorithms and concepts that form the foundation of adversarial training frameworks like USAD, including autoencoder variants, GAN-based detection, and complementary unsupervised scoring methods.
Autoencoder
A neural network trained to copy its input to its output by compressing data through a bottleneck layer. The network learns to reconstruct only the patterns present in the training data. During inference, reconstruction error—the difference between the input and its reconstruction—serves as the anomaly score. Normal data reconstructs with low error, while anomalies produce high error because the model never learned to compress their deviant patterns. This forms the foundational building block that USAD extends into an adversarial two-autoencoder framework.
Variational Autoencoder (VAE)
A probabilistic generative model that learns a latent distribution of normal data rather than a deterministic latent vector. Instead of outputting a single reconstruction, the VAE learns the parameters of a probability distribution (typically Gaussian). The anomaly score is the reconstruction probability, which is more principled and stable than raw reconstruction error. While USAD uses deterministic autoencoders, VAEs represent the probabilistic alternative for anomaly scoring, offering better calibration of uncertainty in the latent space.
AnoGAN
A GAN-based anomaly detection framework that learns the manifold of normal data using a Deep Convolutional GAN. To detect anomalies, AnoGAN searches for a latent vector that generates a reconstruction most similar to the query input. The residual loss (visual dissimilarity) and discrimination loss (feature matching in the discriminator) combine to form the anomaly score. USAD shares the adversarial philosophy but replaces the generator-discriminator dynamic with a two-autoencoder game, avoiding GAN training instability.
Deep SVDD
A deep learning method that trains a neural network to map all normal data points into a minimal hypersphere centered at a predetermined point in the latent space. The anomaly score is the distance from the center of this hypersphere. The objective is to minimize the volume of the sphere while penalizing points that fall outside. Unlike USAD's reconstruction-based approach, Deep SVDD uses a one-class classification objective directly in the latent space, making it a compact alternative for novelty detection.
DAGMM
A Deep Autoencoding Gaussian Mixture Model that jointly trains a deep autoencoder for dimensionality reduction and a Gaussian Mixture Model (GMM) to estimate the density of the latent representation. The network receives both the reconstruction error features and the latent representation as input to the GMM. This end-to-end training avoids the suboptimal two-step process of separate dimensionality reduction and density estimation. USAD similarly pursues end-to-end training but uses adversarial pressure rather than mixture density estimation.
Reconstruction Error
The fundamental anomaly score in autoencoder-based detection, calculated as the difference between the original input and its reconstruction. Common metrics include Mean Squared Error (MSE) and Mean Absolute Error (MAE). USAD specifically amplifies this error for anomalies through its two-phase adversarial training: - Phase 1: Both autoencoders learn to reconstruct normal data - Phase 2: The adversarial autoencoder is trained to maximize the reconstruction error of the other autoencoder on anomalous inputs, creating a stronger signal for detection.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us