Zero-shot Outlier Detection via Prior-data Fitted Networks: Model Selection Bygone!

Yuchen Shen, Haomin Wen, Leman Akoglu

Introduction

Outlier detection (OD) is a critical task in domains such as fraud detection, cybersecurity, and medical diagnostics. Traditionally, OD is an unsupervised process requiring practitioners to choose from numerous algorithms and hyperparameter configurations without ground-truth labels for validation. This "choice paralysis" often leads to suboptimal model selection and significant manual effort.

FoMo-0D addresses this by introducing the first foundation model for zero-shot outlier detection on tabular data. By utilizing Prior-data Fitted Networks (PFNs), FoMo-0D is pre-trained on synthetic data to learn a universal strategy for identifying outliers, effectively eliminating the need for per-task training or tuning.

Comparison of traditional OD workflows versus the FoMo-0D zero-shot approach.

Methodology

FoMo-0D leverages In-Context Learning (ICL) within a transformer-based architecture. Instead of updating weights for each new dataset, the model remains frozen and processes the target dataset as context in a single forward pass to generate outlier scores.

Architecture and Scalability

To handle the quadratic complexity of standard transformers, the authors implemented a "router" mechanism. This architecture uses a small number of learned representatives (denoted as $M$ in the architecture) to aggregate and distribute information across the dataset, achieving linear time complexity ($O(n)$). This allows FoMo-0D to scale efficiently to large datasets while maintaining high inference speeds.

The FoMo-0D architecture, illustrating the use of Multi-Self-Attention (MSA) and learned representatives (M) for efficient in-context learning.

Synthetic Data Synthesis

The model was pre-trained on 1.6 million synthetic datasets derived from Gaussian Mixture Models (GMMs). To scale data generation, the authors utilized random linear transformations that preserve "outlierness" (Mahalanobis distance), allowing a small set of base datasets to be transformed into a massive training corpus with a 20x speedup in generation time.

Key Insights and Results

A significant finding of this work is that a model trained exclusively on synthetic Gaussians generalizes remarkably well to complex, non-Gaussian real-world data. This suggests that the fundamental geometry of what constitutes an outlier is a learnable prior.

In evaluations across 57 real-world datasets from the ADBench benchmark, FoMo-0D demonstrated:

  • Competitive Accuracy: It performed on par with top-tier tuned models like kNN without requiring any manual hyperparameter optimization.
  • High Efficiency: Inference is extremely fast, averaging 7.7 ms per sample, which is up to 7x faster than some traditional methods.
  • Zero-Shot Generalization: On datasets within its training dimensionality (up to $D=100$), it matched or exceeded the performance of most baselines with no statistically significant difference from the best-tuned models.

Conclusion

FoMo-0D represents a significant step toward foundation models for tabular data. By internalizing the model selection process through large-scale synthetic pre-training, it offers a robust, zero-shot solution for outlier detection. Future work will explore handling discrete data and contaminated training sets to further enhance its real-world applicability.

Summary updated

BibTeX
@article{shen2025zero,
  author = {Yuchen Shen and Haomin Wen and Leman Akoglu},
  title = {{Zero-shot Outlier Detection via Prior-data Fitted Networks: Model Selection Bygone!}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=XCQzwpR9jE},
}
Figure