Despite the rapid advance of unsupervised anomaly detection, existing methods require to train separate models for different objects. In this work, we present UniAD that accomplishes anomaly detection for multiple classes with a unified framework. Under such a challenging setting, popular reconstruction networks may fall into an "identical shortcut", where both normal and anomalous samples can be well recovered, and hence fail to spot outliers. To tackle this obstacle, we make three improvements. First, we revisit the formulations of fully-connected layer, convolutional layer, as well as attention layer, and confirm the important role of query embedding (i.e., within attention layer) in preventing the network from learning the shortcut. We therefore come up with a layer-wise query decoder to help model the multi-class distribution. Second, we employ a neighbor masked attention module to further avoid the information leak from the input feature to the reconstructed output feature. Third, we propose a feature jittering strategy that urges the model to recover the correct message even with noisy inputs. We evaluate our algorithm on MVTec-AD and CIFAR-10 datasets, where we surpass the state-of-the-art alternatives by a sufficiently large margin. For example, when learning a unified model for 15 categories in MVTec-AD, we surpass the second competitor on the tasks of both anomaly detection (from 88.1% to 96.5%) and anomaly localization (from 89.5% to 96.8%). Code is available at https://github.com/zhiyuanyou/UniAD.
翻译:尽管未经监督的异常点探测工作进展迅速,但现有方法要求为不同对象分别培训模型。在这项工作中,我们向UniAD展示一个统一的框架,以完成多类的异常点探测。在这样一个富有挑战的环境下,大众重建网络可能会陷入“相同的捷径”,正常和异常的样本都可以很好地恢复,从而无法发现异常点。为了克服这一障碍,我们做了三项改进。首先,我们重新审视完全连接层、富集层和关注层的配方,并确认查询嵌入(即注意层内)在防止网络学习捷径方面的重要作用。因此,在这样一个富有挑战性的环境下,大众重建网络可能会陷入“相同的捷径 ”, 普通的和异常的样本可以很好地恢复。为了进一步避免输入功能泄漏信息到重建输出特征,我们提出了一种功能抖动战略,敦促模型恢复正确的信息,即使有杂音量的投入。我们用MVTec-AD和CIFAR-10数据集的算法,我们用一个多层的解码解码解码解码解码解码解算出多的解算出多级分布点分布点分布点的模型。我们用一个模型/正位位位位数的模型,在15的模型中,我们用一个非常的解解分解分解分解的解码, 。