  Reconstruction-based anomaly detection models achieve their purpose by
suppressing the generalization ability for anomaly. However, diverse normal
patterns are consequently not well reconstructed as well. Although some efforts
have been made to alleviate this problem by modeling sample diversity, they
suffer from shortcut learning due to undesired transmission of abnormal
information. In this paper, to better handle the tradeoff problem, we propose
Diversity-Measurable Anomaly Detection (DMAD) framework to enhance
reconstruction diversity while avoid the undesired generalization on anomalies.
To this end, we design Pyramid Deformation Module (PDM), which models diverse
normals and measures the severity of anomaly by estimating multi-scale
deformation fields from reconstructed reference to original input. Integrated
with an information compression module, PDM essentially decouples deformation
from prototypical embedding and makes the final anomaly score more reliable.
Experimental results on both surveillance videos and industrial images
demonstrate the effectiveness of our method. In addition, DMAD works equally
well in front of contaminated data and anomaly-like normal samples.
