Zero-Shot Anomaly Detection (ZSAD) aims to detect anomalies in unseen domains without target-domain adaptation. Recent CLIP-based methods have shown promising performance by leveraging prompt learning and visual-text alignment. However, most existing approaches rely on a single adaptation pathway, which may be insufficient for heterogeneous anomaly patterns across domains. In practice, anomalies exhibit vastly different characteristics, ranging from salient, localized structural disruptions to subtle, diffuse, and irregular variations. To address this challenge, we propose EntroAD, a structural entropy-guided zero-shot anomaly detection framework. Unlike previous methods, EntroAD introduces a dynamic routing mechanism to process different types of anomalies with specialized adaptation strategies. Specifically, we estimate patch-level structural entropy from self-attention-induced patch relations and use it as a proxy for relational uncertainty to guide anomaly-aware token routing. Based on this routing signal, we construct anomaly-aware routed tokens to better capture anomaly cues with different structural characteristics. We further introduce a confidence-aware dual-branch prompt adaptation module to stabilize visual-text alignment while preserving CLIP's transferable prior. Extensive experiments on 10 industrial and medical benchmarks show that EntroAD achieves state-of-the-art performance in challenging cross-dataset ZSAD settings.
翻译:零样本异常检测旨在无需目标域适配的情况下,检测未见领域中的异常。近期基于CLIP的方法通过利用提示学习与视觉-文本对齐展现了优异性能。然而,现有方法大多依赖单一适配路径,这难以应对跨领域异质性异常模式。实际场景中,异常呈现出显著差异化的特征:从显著的局部结构断裂到细微弥散的不规则变化。为解决该挑战,我们提出EntroAD——一种结构熵引导的零样本异常检测框架。与先前方法不同,EntroAD引入动态路由机制,通过专门适配策略处理不同类型异常。具体而言,我们从自注意力诱导的块间关系估计块级结构熵,将其作为关系不确定性的代理指标,并用于引导异常感知令牌路由。基于该路由信号,我们构建异常感知路由令牌,以更有效地捕获具有不同结构特征的异常线索。进一步引入置信度感知双分支提示适配模块,在保留CLIP可迁移先验的同时稳定视觉-文本对齐。在10个工业与医学基准数据集上的广泛实验表明,EntroAD在具有挑战性的跨数据集零样本异常检测设定中达到了前沿性能。