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 allows us to link distribution shift to the input sensitivity of the model. We show that the resulting operator admits a clear geometric interpretation as a projection of distribution shift onto the sensitivity field of the model, yielding theoretical guarantees. Beyond detecting the presence of a shift, the same 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 perturbed benchmarks demonstrate that the proposed method aligns closely with task degradation while outperforming established baselines.
翻译:分布外检测方法通常分为两类:以数据为中心的方法(检测训练输入分布的偏差而不考虑其对训练模型的影响)或以模型为中心的方法(依赖分类器输出而不显式参考数据几何)。我们提出TASTE(任务感知Stein算子):一种基于所谓Stein算子的任务感知框架,该框架允许我们将分布偏移与模型的输入敏感性相关联。我们证明所得算子具有清晰的几何解释——即分布偏移在模型敏感性场上的投影,从而获得理论保证。除了检测偏移的存在,相同的构造还能通过坐标分解实现偏移定位,并为图像数据提供可解释的逐像素诊断。在受控高斯偏移、几何扰动下的MNIST数据集以及扰动基准CIFAR-10上的实验表明,所提方法在紧密跟踪任务性能退化的同时,显著优于现有基线方法。