DRL: Decomposed Representation Learning for Tabular Anomaly Detection

Hangting Ye, He Zhao, Wei Fan, Mingyuan Zhou, Dan dan Guo, Yi Chang

Introduction

Anomaly detection (AD) is a critical machine learning task used for fraud detection, network security, and medical diagnosis. While deep learning has revolutionized AD for images and text, Tabular Anomaly Detection (TAD) remains stubbornly difficult. Unlike images or text, which possess clear spatial or sequential structures, tabular data consists of heterogeneous features with no obvious structural priors.

Most modern deep learning approaches to TAD rely on reconstruction. They train an autoencoder-like model on normal data, assuming it will successfully reconstruct normal samples but fail on anomalies. However, because tabular features are often noisy and irregular, normal and anomalous samples frequently overlap in the raw observation space—a phenomenon known as data entanglement. Because of this entanglement, simply measuring reconstruction error in the original data space is often insufficient to reliably flag anomalies.

To address this, researchers have introduced Decomposed Representation Learning (DRL), a novel method that maps tabular data into a constrained latent space where normal and anomalous patterns are forced apart, achieving state-of-the-art results.

Methodology: Bypassing Data Entanglement

To bypass the entanglement in the raw data space, DRL maps the data into a tailor-designed, constrained latent space rather than just attempting to reconstruct the input directly. The architecture relies on four key components:

  1. Random Orthogonal Basis Vectors: DRL generates a set of orthogonal basis vectors in the latent space. Surprisingly, these vectors are randomly generated and remain fixed during training (they are data-free and training-free). They act as a dictionary of "normal" concepts.
  2. Weight Learner: A neural network maps the input tabular data to a set of sample-specific weights. The model attempts to reconstruct the sample's latent representation strictly as a linear combination of the fixed basis vectors using these weights.
  3. Representation Separation Constraint: During training (which only uses normal data), DRL actively pushes the weight vectors of normal samples away from each other. Counterintuitively, forcing normal samples to be diverse and spread out in this subspace mathematically amplifies the discrepancy between normal and anomalous patterns during inference.
  4. Alignment Loss: To ensure the latent space doesn't lose the intrinsic feature correlations of the original data, a standard reconstruction path maps the latent representation back to the original observation space.

During inference, the anomaly score is calculated as the decomposition loss—how much the sample's latent representation deviates from what can be built using the normal basis vectors.

Key Insights and Visual Evidence

  • Random bases are enough: Complex optimization isn't strictly necessary to learn a "dictionary" of normal behaviors. Randomly initialized, fixed orthogonal vectors work perfectly well as a foundation, provided the network learns how to map the normal data onto them effectively.
  • Latent reconstruction beats observation reconstruction: Calculating the anomaly score based on how well a representation can be decomposed in the latent space avoids the pitfalls of raw data entanglement that plague standard autoencoders.
  • Pushing normal samples apart helps detect anomalies: By increasing the variance (spread) of the normal samples' weights, the model strictly increases the expected distance between normal weights and anomalous weights.
t-SNE visualizations comparing the original data space, predictions, and latent representations of the MCM baseline versus DRL (ours). DRL achieves significantly better separation of normal (blue) and anomalous (orange) samples.

As seen in the visualizations above, standard representation methods (like MCM) often fail to untangle the normal and anomalous data points. In contrast, DRL's unique separation constraint successfully isolates the anomalies in the latent space.

Datasets and Results

The authors conducted massive-scale experiments using 40 tabular anomaly detection datasets sourced from the widely used ODDS (Outlier Detection DataSets) library and ADBench (Anomaly Detection Benchmark). These datasets span highly diverse domains, including healthcare, natural science, and cybersecurity, varying significantly in scale (80 to nearly 300,000 samples) and dimensionality (5 to 768 features).

DRL was evaluated against 16 baseline models, ranging from classical algorithms (Isolation Forest, OCSVM, LOF) to recent deep learning SOTA (MCM, NPT-AD, DAGMM).

  • State-of-the-Art Performance: DRL achieved the highest average performance and the lowest average ranking across all 40 datasets.
  • Massive PR Gain: DRL obtained an absolute average AUC-PR gain of at least 9.8% compared to the next best competing methods.
  • Robustness: DRL consistently improved performance regardless of the dataset's dimensionality or sample size. It also proved highly robust to training set contamination (when up to 5% of the training data secretly contains anomalies).

Limitations and Future Work

The primary limitation of DRL is that its current architecture—specifically the weight learner and alignment learner—is tailor-made for tabular data. It cannot be natively dropped into image or text pipelines. Future work will likely explore how to adapt this representation decomposition framework to other data types, which would require redesigning the feature extractors to incorporate the specific structural priors (like convolutions for images) of those modalities.

Summary updated

BibTeX
@inproceedings{ye2025drl,
  author = {Hangting Ye and He Zhao and Wei Fan and Mingyuan Zhou and Dan dan Guo and Yi Chang},
  title = {{DRL: Decomposed Representation Learning for Tabular Anomaly Detection}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=CJnceDksRd},
}
Figure