Fast Unsupervised Deep Outlier Model Selection with Hypernetworks

Xueying Ding, Yue Zhao, Leman Akoglu · DOI

Deep Outlier Detection (DOD) models, such as Deep Autoencoders, have become essential tools for identifying anomalies in complex datasets. However, their effectiveness is highly sensitive to hyperparameter (HP) configurations, including both regularization settings and network architecture. In a supervised setting, selecting the best model is straightforward via validation on labeled data. In the unsupervised context of outlier detection, where labels are typically unavailable, practitioners face a "chicken-and-egg" dilemma: how to select an optimal model without ground truth to evaluate performance.

Presented at KDD 2024, HyPer is a novel framework designed to overcome this challenge. By leveraging hypernetworks and meta-learning, HyPer enables rapid, unsupervised model selection that is both more accurate and significantly faster than existing state-of-the-art methods.

The Challenge: The Validation Gap and Scalability

Unsupervised model selection for DOD faces two primary hurdles:

  1. The Validation Gap: Without labels, it is difficult to distinguish whether a model is identifying true outliers or simply overfitting to noise. Traditional "internal consensus" methods—which pick models that agree with the majority—often fail to provide a robust signal.
  2. The Scalability Wall: Deep models are computationally expensive to train. Exhaustively searching through hundreds of potential architectures (varying depths and widths) is often prohibitive for real-world applications.

The HyPer Framework

HyPer addresses these issues through a two-phase approach involving offline meta-training and online iterative selection.

Overview of the HyPer framework, illustrating the offline meta-training phase and the online model selection process.

1. Hypernetworks with Architecture Masking

Instead of training multiple models from scratch, HyPer utilizes a Hypernetwork (HN). This meta-model takes a set of hyperparameters as input and generates (or "hallucinates") the optimal weights for the target detection model.

A key innovation in HyPer is Architecture Masking. While previous hypernetworks were limited to tuning regularization HPs, HyPer uses zero-masking and "No-op" layers to allow a single HN to generate weights for models of varying depths and widths. This allows the framework to explore a vast architectural space almost instantaneously.

The architecture masking mechanism allows a single hypernetwork to generate weights for models of varying depths and widths using zero-masking and no-op layers.

2. The Proxy Validator ($f_{val}$)

To bridge the validation gap, HyPer employs meta-learning. During an offline phase, a Proxy Validator is trained on a library of historical datasets where labels are available. It learns to map dataset characteristics and the distribution of outlier scores produced by a model to its actual performance (e.g., AUROC). When a new, unlabeled dataset arrives, the Proxy Validator predicts which generated model configuration is likely to perform best based on these learned patterns.

3. Iterative Online Selection

Upon receiving a new dataset, HyPer performs an iterative refinement. It starts with the best-predicted configurations and then explores the local "neighborhood" of hyperparameters, balancing the search for new configurations with the refinement of the current best-performing model weights.

Experimental Results

The authors evaluated HyPer against 8 baselines across a massive testbed of 34 tabular datasets and multiple image datasets (MNIST, FashionMNIST).

  • Superior Accuracy: HyPer achieved the best average ROC Rank across the 35 benchmark datasets. Notably, it provided a 2x improvement in average ROC Rank compared to using the default hyperparameters found in the popular PyOD library.
  • Efficiency: By generating weights rather than training from scratch, HyPer is 4x faster than the previous state-of-the-art method, ELECT, during the online selection phase.
  • Architecture Impact: The study found that tuning network architecture (depth and width) provided a significantly larger performance boost than tuning standard regularization HPs like dropout or weight decay.

Conclusion and Future Directions

HyPer represents a significant step forward in making deep outlier detection practical for unsupervised real-world scenarios. By "hallucinating" model weights and meta-learning from historical performance, it bypasses the need for expensive retraining and manual validation.

Future work aims to extend the architecture masking technique beyond Multi-Layer Perceptrons to more complex structures like Transformers and Graph Neural Networks. Additionally, researchers are looking into ways to improve performance when a test dataset is significantly different from the historical meta-training corpus, addressing the "cold start" challenge in niche domains.

Summary updated

BibTeX
@inproceedings{ding2024fast,
  author = {Xueying Ding and Yue Zhao and Leman Akoglu},
  title = {{Fast Unsupervised Deep Outlier Model Selection with Hypernetworks}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2024},
  doi = {10.1145/3637528.3672003},
}
Figure