DiffAD, iccv23: Unsupervised Surface Anomaly Detection with Diffusion Probabilistic Model
Anomaly of structural changes / deformations
VAE based methods are good at repairing textural anomalies, but they are vulnerable to structural changes in the images. Example:

Top: input anomaly images Ia & GT;
Medium: The reconstructed samples Ir of VAE based methods 保持了Ia;
Bottom: DiffAD generated images;
但是合成的异常并不包括structural changes!!!
More examples:

Figure 3. (a) the anomalous inputs; the reconstruction outputs of (b) autoencoder, (c) DDPM, and (d) our DiffAD.
Anomaly are usually restored in (b),即生成不足,尊重太多; (c) 引入了无关的局部颜色的变化,pose的变化,和全局颜色的变化,总的来说:生成太多,尊重不足。

$$ \begin{equation}\mathcal{L}{LDM}=\mathbb{E}{z,\;\epsilon \sim N(0,I),\;t}\left[\left\|\epsilon - \epsilon_\theta\!\left(z_t,\, t\right)\right\|_2^2\right]\end{equation} $$
ϵ是forward diffusion 中显式引入的高斯噪声随机变量
xr = D(zr)
propose a noisy condition embedding to instruct sample generation while avoiding the model excessively relying on the condition. 即可以处理没见过的anomaly。
$$ \begin{equation}\mathcal{L}{LDM}=\mathbb{E}{x_0,\;\epsilon,\;t}\left[\left\|\epsilon - \epsilon_\theta\!\left(x_t,t, c_{noisy}\right)\right\|_2^2\right]\end{equation} $$