TASTE: Task-Aware Out-of-Distribution Detection via Stein Operators
Organizations: Department of Statistics, University of Oxford, United Kingdom.
Abstract
Out-of-distribution detection methods are often either data-centric, detecting deviations from the training input distribution irrespective of their effect on a trained model, or model-centric, relying on classifier outputs without explicit reference to data geometry. We propose TASTE (Task-Aware STEin operators): a task-aware framework based on so-called Stein operators, which links distribution shift to the input sensitivity of the model. The resulting operators admit a geometric interpretation as a projection of distribution shift onto the sensitivity field of the model, with theoretical guarantees. Beyond detecting a shift, the construction enables its localisation through a coordinate-wise decomposition, and - for image data - provides interpretable per-pixel diagnostics. Experiments on controlled Gaussian shifts, MNIST under geometric perturbations, and CIFAR-10/ImageNet-1K perturbed benchmarks demonstrate that TASTE aligns closely with task degradation while showing competitive performance compared to established baselines, with gains that depend on the shift regime.
Figures & tables
| Adversarial | CIFAR-10-C | CIFAR-10-P | OOD-benchmarks | Overall | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 |
| MSP | 0.3575 | 0.9656 | 0.6124 | 0.9109 | 0.5978 | 0.9210 | 0.8032 | 0.7878 | 0.5751 0.0080 | 0.8521 0.0161 |
| ODIN | 0.4895 | 0.9436 | 0.5499 | 0.9013 | 0.5478 | 0.9222 | 0.7644 | 0.7756 | 0.5776 0.0084 | 0.9486 0.0070 |
| Mahalanobis | 0.5819 | 0.8388 | 0.5880 | 0.9181 | 0.5620 | 0.9435 | 0.8188 | 0.7195 | 0.6060 0.0084 | 0.8664 0.0116 |
| Energy | 0.3550 | 0.9681 | 0.6256 | 0.8900 | 0.6110 | 0.9113 | 0.8520 | 0.6683 | 0.5871 0.0081 | 0.8421 0.0125 |
| kNN+ | 0.4645 | 0.9591 | 0.6151 | 0.8977 | 0.5956 | 0.9223 | 0.8288 | 0.7023 | 0.6007 0.0083 | 0.8526 0.0123 |
| Adversarial | OOD-benchmarks | Overall | Runtime | ||||
|---|---|---|---|---|---|---|---|
| Method | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | ms/sample |
| MSP | 0.2543 | 0.9551 | 0.8661 | 0.4546 | 0.4582 0.0019 | 0.7883 0.0039 | 5.95 |
| ODIN | 0.6475 | 0.8212 | 0.8356 | 0.4893 | 0.7102 0.0026 | 0.7106 0.0050 | 19.78 |
| Mahalanobis | 0.6785 | 0.7452 | 0.9264 | 0.1749 | 0.7611 0.0024 | 0.5551 0.0048 | 137.69 |
| Energy | 0.2242 | 0.9607 | 0.8971 | 0.3634 | 0.4485 0.0018 | 0.7616 0.0043 | 6.04 |
| kNN+ | 0.6099 | 0.8089 | 0.9175 | 0.2501 | 0.7125 0.0025 | 0.6226 0.0044 | 95.73 |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Experiment | Level | per_input | Score used | Further aggregation | Reported |
|---|---|---|---|---|---|
| Gaussian shifts | Dataset | False | per shifted dataset | Shift-response plots | |
| MNIST rotations and translations | Dataset | False | per transformation and magnitude | Shift-response plots | |
| CIFAR-10 detection | Datapoint | False | None | AUROC, FPR95 | |
| ImageNet-1K: predicted class | Datapoint | False | None | AUROC, FPR95 | |
| ImageNet-1K: TASTE ext | Datapoint | – | Classwise | : largest and smallest per input | AUROC, FPR95 |
| MVTec AD localisation | Coordinate | True | Sum RGB-channel contributions per pixel | Pixel AUROC, AUPRO; maps thresholded at |
| OOD Dataset | metric | MSP | Energy | ODIN | Mahalanobis | kNN+ | TASTE |
|---|---|---|---|---|---|---|---|
| adversarial_autoattack_linf_2_255 | AUROC | 0.5019 | 0.4896 | 0.5393 | 0.5445 | 0.5276 | 0.4786 |
| FPR95 | 0.9611 | 0.9643 | 0.93 | 0.9371 | 0.9513 | 0.9571 | |
| adversarial_autoattack_linf_4_255 | AUROC | 0.2841 | 0.289 | 0.4851 | 0.505 | 0.3839 | 0.6543 |
| FPR95 | 0.9681 | 0.9711 | 0.9532 | 0.9213 | 0.9711 | 0.893 | |
| adversarial_autoattack_linf_8_255 | AUROC | 0.1557 | 0.1675 | 0.3319 | 0.7207 | 0.4341 | 0.8609 |
| FPR95 | 0.9688 | 0.9713 | 0.9718 | 0.513 | 0.9688 | 0.602 |
| OOD Dataset | metric | MSP | Energy | ODIN | Mahalanobis | kNN+ | TASTE |
|---|---|---|---|---|---|---|---|
| cifar10c_brightness | AUROC | 0.5321 | 0.5389 | 0.4928 | 0.5356 | 0.543 | 0.5373 |
| FPR95 | 0.9454 | 0.9354 | 0.9562 | 0.9452 | 0.939 | 0.9335 | |
| cifar10c_contrast | AUROC | 0.6945 | 0.7206 | 0.802 | 0.5841 | 0.6653 | 0.6846 |
| FPR95 | 0.86 | 0.781 | 0.5962 | 0.929 | 0.8666 | 0.7849 | |
| cifar10c_defocus_blur | AUROC | 0.5801 | 0.5763 | 0.5864 | 0.5667 | 0.5847 | 0.5842 |
| FPR95 | 0.9308 | 0.9212 | 0.8546 | 0.9318 | 0.9186 | 0.8969 |
| OOD Dataset | metric | MSP | Energy | ODIN | Mahalanobis | kNN+ | TASTE |
|---|---|---|---|---|---|---|---|
| cifar10p_brightness | AUROC | 0.5497 | 0.5549 | 0.499 | 0.5488 | 0.5583 | 0.5557 |
| FPR95 | 0.9395 | 0.9357 | 0.9585 | 0.9415 | 0.934 | 0.9205 | |
| cifar10p_gaussian_noise | AUROC | 0.5069 | 0.5107 | 0.4618 | 0.4965 | 0.5076 | 0.5107 |
| FPR95 | 0.9473 | 0.9454 | 0.9629 | 0.9559 | 0.9505 | 0.9456 | |
| cifar10p_motion_blur | AUROC | 0.6294 | 0.6368 | 0.6134 | 0.6183 | 0.6446 | 0.6342 |
| FPR95 | 0.9197 | 0.9203 | 0.8495 | 0.9152 | 0.9095 | 0.8123 |
| OOD Dataset | metric | MSP | Energy | ODIN | Mahalanobis | kNN+ | TASTE |
|---|---|---|---|---|---|---|---|
| iSUN | AUROC | 0.7926 | 0.8561 | 0.682 | 0.8379 | 0.8203 | 0.7408 |
| FPR95 | 0.7848 | 0.6455 | 0.9396 | 0.6829 | 0.6995 | 0.5901 | |
| LSUN | AUROC | 0.8208 | 0.8999 | 0.7047 | 0.88 | 0.8677 | 0.7666 |
| FPR95 | 0.7391 | 0.5161 | 0.9421 | 0.5912 | 0.5945 | 0.5364 | |
| Places365 | AUROC | 0.8005 | 0.854 | 0.7206 | 0.7943 | 0.8335 | 0.7746 |
| FPR95 | 0.7878 | 0.6461 | 0.86 | 0.7714 | 0.6894 | 0.5609 |
| iSUN | LSUN | Places365 | SVHN | Textures | Average | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 |
| TASTE | 0.7603 | 0.9720 | 0.7820 | 0.9380 | 0.5927 | 0.9410 | 0.9477 | 0.1200 | 0.6396 | 0.8890 | 0.7445 | 0.7720 |
| TASTE (low res) | 0.7120 | 0.9460 | 0.7044 | 0.9480 | 0.5330 | 0.9510 | 0.9206 | 0.2050 | 0.5806 | 0.9490 | 0.6901 | 0.8190 |
| Adversarial | CIFAR-10-C | CIFAR-10-P | OOD-benchmarks | Overall | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 | AUROC | FPR95 |
| TASTE | 0.6144 | 0.865 | 0.6193 | 0.8691 | 0.5954 | 0.8611 | 0.7647 | 0.5677 | 0.6301 | 0.8207 |
| TASTE-no-Laplacian | 0.6264 | 0.8711 | 0.6098 | 0.8708 | 0.5902 | 0.8657 | 0.7597 | 0.5751 | 0.6253 | 0.8367 |
| Score-only | 0.5337 | 0.9437 | 0.6364 | 0.787 | 0.5789 | 0.8756 | 0.4452 | 0.8623 | 0.5783 | 0.8518 |
Distribution Shift Detection
Distribution shift detection identifies when data or model behavior changes between reference and deployment settings.
See all 62 papers