[论文解读] Towards Visually Explaining Variational Autoencoders
本文提出了首个基于梯度的视觉注意力方法,用于解释变分自编码器(VAEs),通过潜在空间梯度生成注意力图以解释模型行为。该方法在MVTec-AD数据集上实现了最先进的异常定位性能,并在Dsprites数据集上通过一种新颖的注意力解缠损失实现了更好的解缠效果,表明注意力图不仅能解释VAE,还能提升其性能。
Recent advances in Convolutional Neural Network (CNN) model interpretability have led to impressive progress in visualizing and understanding model predictions. In particular, gradient-based visual attention methods have driven much recent effort in using visual attention maps as a means for visual explanations. A key problem, however, is these methods are designed for classification and categorization tasks, and their extension to explaining generative models, e.g. variational autoencoders (VAE) is not trivial. In this work, we take a step towards bridging this crucial gap, proposing the first technique to visually explain VAEs by means of gradient-based attention. We present methods to generate visual attention from the learned latent space, and also demonstrate such attention explanations serve more than just explaining VAE predictions. We show how these attention maps can be used to localize anomalies in images, demonstrating state-of-the-art performance on the MVTec-AD dataset. We also show how they can be infused into model training, helping bootstrap the VAE into learning improved latent space disentanglement, demonstrated on the Dsprites dataset.
研究动机与目标
- 弥合生成模型(尤其是VAEs)在视觉解释方法上的空白,这些模型缺乏基于注意力的可解释性工具。
- 开发一种方法,从训练好的VAE的潜在空间生成视觉注意力图,而无需依赖分类头。
- 证明这些注意力图可用于基于重建的异常检测中的异常定位。
- 探索注意力图是否可作为可训练约束,用于改善VAE潜在空间的解缠程度。
- 评估所提出的基于注意力的解缠损失在标准基准数据集上的有效性。
提出的方法
- 使用重参数化技巧从VAE学习到的高斯后验分布中采样潜在码。
- 将梯度从潜在码的每个维度反向传播至卷积特征层,以生成空间注意力图。
- 对所有潜在维度的梯度进行聚合,为每个输入生成全面的注意力图。
- 利用异常输入会产生非高斯潜在码的事实,导致高梯度注意力图,从而精确定位异常。
- 引入一种新的损失项——注意力解缠损失($L_{\text{AD}}$)——以鼓励不同潜在维度间的空间分离注意力图。
- 将标准VAE损失与$L_{\text{AD}}$结合,训练出学习到更解缠表示的模型。
实验结果
研究问题
- RQ1是否能够有效从VAE潜在空间生成基于梯度的注意力图,而无需依赖分类头?
- RQ2这些注意力图是否能以高精度定位图像中的异常?
- RQ3注意力图是否可作为监督信号,用于改善VAE潜在空间的解缠程度?
- RQ4所提出的注意力解缠损失是否能在解缠度量上带来可测量的性能提升?
- RQ5该方法是否可泛化至其他生成模型(如GANs)?
主要发现
- 所提出的方法仅使用标准VAE(无需架构修改)在MVTec-AD数据集上实现了最先进的异常定位性能。
- 在Dsprites数据集上,AD-FactorVAE模型的解缠得分约为0.90,优于基线FactorVAE(0.82)和β-VAE(0.73),且在相近的重建误差下表现更优。
- 定性分析显示,AD-FactorVAE生成的注意力图在不同潜在维度间表现出空间分离的激活,表明解缠程度得到改善。
- 通过从潜在空间进行梯度反向传播生成的注意力图能有效突出图像中的异常区域,实现像素级异常分割。
- 注意力解缠损失($L_{\text{AD}}$)在添加至现有VAE训练目标后,成功提升了模型的解缠性能。
- 该方法可通过重复采样生成注意力图分布,表明其在构建更丰富的不确定性感知视觉解释方面具有潜力。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。