Contextual Learning for Anomaly Detection in Tabular Data
King, Spencer, Zhang, Zhilu, Yu, Ruofan, Coskun, Baris, Ding, Wei, Cui, Qian
–arXiv.org Artificial Intelligence
Anomaly detection is critical in domains such as cybersecurity and finance, especially when working with large-scale tabular data. Yet, unsupervised anomaly detection-where no labeled anomalies are available-remains challenging because traditional deep learning methods model a single global distribution, assuming all samples follow the same behavior. In contrast, real-world data often contain heterogeneous contexts (e.g., different users, accounts, or devices), where globally rare events may be normal within specific conditions. We introduce a contextual learning framework that explicitly models how normal behavior varies across contexts by learning conditional data distributions $P(\mathbf{Y} \mid \mathbf{C})$ rather than a global joint distribution $P(\mathbf{X})$. The framework encompasses (1) a probabilistic formulation for context-conditioned learning, (2) a principled bilevel optimization strategy for automatically selecting informative context features using early validation loss, and (3) theoretical grounding through variance decomposition and discriminative learning principles. We instantiate this framework using a novel conditional Wasserstein autoencoder as a simple yet effective model for tabular anomaly detection. Extensive experiments across eight benchmark datasets demonstrate that contextual learning consistently outperforms global approaches-even when the optimal context is not intuitively obvious-establishing a new foundation for anomaly detection in heterogeneous tabular data.
arXiv.org Artificial Intelligence
Nov-19-2025
- Country:
- Asia > Middle East
- Jordan (0.04)
- North America > United States
- Georgia > Clarke County
- Athens (0.14)
- New Jersey > Middlesex County
- Piscataway (0.04)
- New York > New York County
- New York City (0.04)
- Georgia > Clarke County
- Asia > Middle East
- Genre:
- Research Report (0.50)
- Industry:
- Information Technology > Security & Privacy (0.88)
- Technology: