cs.LGFeb 7, 2026

TASTE: Task-Aware Out-of-Distribution Detection via Stein Operators

Authors: Michał Kozyra, Gesine Reinert

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

Appendix figures & tables16 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

May 14, 2026

TAPIOCA: Why Task- Aware Pruning Improves OOD model Capability

Recent work has promoted task-aware layer pruning as a way to improve model performance on particular tasks, as shown by TALE. In this paper, we investigate when such improvements occur and why. We show first that, across controlled polynomial regression tasks and large language models, such pruning yields no benefit on in-distribution (ID) data but consistently improves out-of-distribution (OOD) accuracy. We further show empirically that OOD inputs induce layerwise norm and pairwise-distance profiles that deviate from the corresponding ID profiles. This leads to a geometric explanation of task-aware pruning: each task induces a task-adapted geometry, characterized empirically by the representation profiles observed on ID inputs. OOD inputs can introduce a distorted version of the task-adapted geometry. Task-aware pruning identifies layers that create or amplify this distortion; by removing them, it shifts OOD representational norms and pairwise distances toward those observed on the adapted distribution. This realigns OOD inputs with the model's task-adapted geometry and improves performance. We provide causal evidence through controlled distribution shifts and residual-scaling interventions, and demonstrate consistent behavior across model scales.
Sep 26, 2026

STAMP: Predicting Out-of-Distribution Generalization without Target Data

Predicting whether a trained model will generalize under distribution shift remains difficult, especially when target-domain data are unavailable. We introduce STAMP (Semantic Temporal Augmented Model Prediction), a source-only, target-label-free criterion that estimates out-of-distribution (OOD) performance from paired source-domain images. STAMP computes the output-space correlation ratio η2=SB/STη^2=S_B/S_T by contrasting semantically stable pairs with random pairs: higher η2η^2 indicates that model outputs vary with semantic identity rather than nuisance variation. On 44 chest X-ray models spanning CNNs, ViTs, MetaFormers, foundation models, and SSL/VLM probes, temporal STAMP attains Spearman correlations of 0.8440.844--0.8550.855 with macro AUROC on VinDr-CXR, CheXpert, and MIMIC-CXR; a class-matched variant improves single-class RSNA from 0.3110.311 to 0.6630.663. STAMP attains the best average source-only medical ranking and outperforms the target-domain ATC and AoTL estimators without any target data. On 27 ImageNet models, temperature-scaled STAMPTS attains ρ=0.984ρ{=}0.984 on ObjectNet and ρ≥0.905ρ\geq0.905 on four additional distribution shifts, with partial correlations of 0.6620.662--0.9490.949 after controlling for ImageNet accuracy. Requiring approximately 12s per model on one GPU, STAMP is a practical pre-deployment model-selection and auditing tool.
May 28, 2026

TASER: Task-Aware Stein Regularisation for Geometry-Driven Smoothness

Deep neural networks remain sensitive to distribution shifts, motivating regularisation informed by data geometry. We introduce TASER (Task-Aware Stein Regularisation), a compact training-time framework that couples model derivatives to density scores by penalising the Langevin Stein operator. We establish a weighted Sobolev interpretation and a hierarchy of stability bounds under progressively stronger distributional assumptions. Moreover we introduce TASERLight, which is based on a first-order Stein operator. TASER and TASERLight require neither explicit tangent-space estimation nor an inner perturbation search. Controlled synthetic examples illustrate their effects on extrapolation and directional sensitivity. Experiments on spectroscopy, skeleton motion, ECG, MNIST, and CIFAR-10 demonstrate gains under distribution shift and complementary benefits when combined with isotropic regularisation.