Adaptive early exit boosts outlier detection accuracy and speed
When Less Compute Is More: Adaptive Early Exit Improves Pretrained Outlier Detection
Machine LearningArtificial Intelligence
Summary
Detecting unusual or unexpected data points often requires complex models that analyze all data deeply, which can be slow. The authors found that letting models stop analyzing early at the best moment can not only speed up the process but also improve how well these outliers are detected. This happens because analyzing too deeply sometimes brings in confusing information from surrounding data points, which the early stop avoids. They also trained a simple add-on to decide when to stop for each dataset, improving results further.
What this means in practice
- •For data engineers: Optimize outlier detection pipelines by dynamically choosing model depth for faster inference with improved accuracy on varied tabular datasets.
- •For fraud analytics teams: Improve detection of fraudulent transactions by using adaptive model exit to reduce noise from related data and boost outlier spotting.
Authors
Tianyang Zhou, Leman Akoglu
Abstract
Pretrained tabular foundation models process every dataset at a fixed depth, with inference costs growing with dataset size. To address this, we present the first study of depth-adaptive early-exit for pretrained outlier detection models. While early-exit is typically motivated by efficiency, we uncover a surprising benefit: exiting at the optimal intermediate layer can also improve detection performance on diverse real-world benchmarks by 4.7-7.3% on average, consistent across three distinct foundation models. First, we investigate the factors driving these gains, and identify a key mechanism: context pollution, i.e., the presence of outliers among in-context samples. Our analysis reveals that nearby in-context samples exert increasing influence on query predictions at greater depths, consistent with a retrieval-based view of these models. In effect, early-exit alleviates the adverse effects of retrieving accurate-yet-polluted neighbors, with gains of 13-21% when context pollution matches the natural outlier rate. Motivated by these findings, we pretrain a plug-in router to select a dataset-specific exit layer, using query outlier labels as privileged information available only during router training. The router operates post hoc, leaving the base model parameters and prediction head unchanged. Experiments on three large real-world benchmarks show that, on clean context, the router recovers up to 45% of the oracle gain with up to 1.8x speedup across three pretrained backbones, with larger gains as context pollution increases.