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 will be made publicly available.
翻译:尽管未经监督的异常点探测工作进展迅速,但现有方法要求为不同对象分别培训模型。在这项工作中,我们向UIAD展示一个统一的框架,在多个类中实现异常点检测。在这样一个富有挑战的环境下,大众重建网络可能陷入“相同的捷径”,正常和异常的样本都可以很好地恢复,从而无法发现异常点。为了克服这一障碍,我们做了三项改进。首先,我们重新审视完全连接层、富集层和关注层的配方,并确认查询嵌入(即注意层内)在防止网络学习捷径方面的重要作用。因此,在这样一个富有挑战性的环境中,大众重建网络可能会陷入“相同的捷径 ”, 普通和异常点样板的样本可以很好地恢复, 从而进一步避免输入功能泄漏信息。 第三,我们提出一个功能抖动战略,敦促模型恢复正确信息,即使输入了噪音。 我们用MVTec-AD和CIFAR-10数据设置的算法, 防止网络学习捷尔- 10 数据设置的重要功能解码, 我们用一个跨度的层解码解码解码模型, 15, 样级的解码的模型将比正差差差1 。