[Paper Review] LafitE: Latent Diffusion Model with Feature Editing for Unsupervised Multi-class Anomaly Detection
LafitE uses a latent diffusion model with a memory-based feature editing strategy to perform unsupervised multi-class anomaly detection and localization, improving reconstruction quality and reducing identity shortcuts. It also introduces pseudo anomaly validation for hyperparameter tuning.
In the context of flexible manufacturing systems that are required to produce different types and quantities of products with minimal reconfiguration, this paper addresses the problem of unsupervised multi-class anomaly detection: develop a unified model to detect anomalies from objects belonging to multiple classes when only normal data is accessible. We first explore the generative-based approach and investigate latent diffusion models for reconstruction to mitigate the notorious ``identity shortcut'' issue in auto-encoder based methods. We then introduce a feature editing strategy that modifies the input feature space of the diffusion model to further alleviate ``identity shortcuts'' and meanwhile improve the reconstruction quality of normal regions, leading to fewer false positive predictions. Moreover, we are the first who pose the problem of hyperparameter selection in unsupervised anomaly detection, and propose a solution of synthesizing anomaly data for a pseudo validation set to address this problem. Extensive experiments on benchmark datasets MVTec-AD and MPDD show that the proposed LafitE, \ie, Latent Diffusion Model with Feature Editing, outperforms state-of-art methods by a significant margin in terms of average AUROC. The hyperparamters selected via our pseudo validation set are well-matched to the real test set.
Motivation & Objective
- Address unsupervised multi-class anomaly detection where only normal data is available across multiple classes in flexible manufacturing contexts.
- Leverage a latent diffusion model to learn the normal data distribution and reconstruct anomalies through denoising in latent space.
- Introduce a memory bank-based feature editing strategy to pull anomalous inputs toward the normal data manifold and mitigate identity shortcuts.
- Propose synthetic anomaly data generation to create a pseudo validation set for hyperparameter tuning.
- Demonstrate robustness and state-of-the-art performance on benchmark datasets (MVTec-AD and MPDD).
Proposed method
- Map input images to a latent feature space via hierarchical multi-scale feature extraction from a pre-trained network.
- Model normal feature distribution with a latent diffusion model (DDIM) trained on normal data in latent space.
- Apply a feature editing step using a memory bank of normal patch features to replace query patches with weighted nearest normals before reconstruction.
- Perform diffusion-based reconstruction starting from a partially corrupted state to denoise and obtain a reconstructed feature map.
- Compute pixel/patch-level anomaly scores from reconstruction error between the original and reconstructed features, followed by image-level aggregation for localization.
- Synthesize anomalous data from normal samples to form a pseudo validation set for hyperparameter selection (τ and K).
Experimental results
Research questions
- RQ1Can a latent diffusion model better discriminate normal vs. anomalous regions across multiple classes in an unsupervised setting?
- RQ2Does incorporating feature editing with a memory bank improve reconstruction quality and reduce identity shortcuts in diffusion-based anomaly detection?
- RQ3Can a pseudo validation set derived from synthetic anomalies guide hyperparameter selection effectively in unsupervised AD?
- RQ4How does LafitE perform for both detection and localization across diverse datasets (MVTec-AD and MPDD) compared to state-of-the-art methods?
Key findings
- LafitE achieves state-of-the-art average AUROC for multi-class anomaly detection and localization on MVTec-AD and MPDD compared to several baselines.
- Feature editing with a memory bank consistently improves performance over a diffusion-only baseline (LafitE w/o F.E.).
- The diffusion model in latent feature space helps mitigate identity shortcuts and enables better reconstruction of normal regions, reducing false positives.
- Synthetic anomaly data for pseudo validation aligns hyperparameter choices with real-test performance, supporting effective unsupervised tuning.
- Ablation studies show LafitE outperforms UniAD and other baselines across datasets, with improved consistency across categories.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.