Source-linked AI summary
A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localization
Qiyu Chen, Huiyuan Luo, Chengkan Lv, Zhengtao Zhang
TL;DR
Weak defects can resemble normal regions, while existing anomaly-synthesis strategies have limits in coverage and controllability. GLASS combines feature-level GAS and image-level LAS, and the paper reports state-of-the-art performance across industrial anomaly-detection datasets, including superior weak-defect detection.
Problem
Existing anomaly-synthesis strategies have limited coverage and controllability, particularly for weak defects that can lie close to normal regions.
Source: §1 · pp. 1–2Method
GLASS combines feature-level GAS, which uses Gaussian noise guided by gradient ascent and truncated projection, with image-level LAS.
Source: §1 · pp. 2–3Results
GLASS achieves state-of-the-art results on four anomaly-detection datasets in varied industrial settings, with faster detection speed and superior weak-defect performance.
Source: §1 · p. 3, §5 · p. 14Takeaways & Limitations
The authors conclude that cooperative GAS and LAS broaden controllable anomaly coverage while supporting weak-defect detection.
Source: §5 · p. 14GAS assumes normal feature points conform to either a manifold or a hypersphere distribution.
Source: §3.2 · p. 6
Abstract
from arXiv · showhide
Anomaly synthesis strategies can effectively enhance unsupervised anomaly detection. However, existing strategies have limitations in the coverage and controllability of anomaly synthesis, particularly for weak defects that are very similar to normal regions. In this paper, we propose Global and Local Anomaly co-Synthesis Strategy (GLASS), a novel unified framework designed to synthesize a broader coverage of anomalies under the manifold and hypersphere distribution constraints of Global Anomaly Synthesis (GAS) at the feature level and Local Anomaly Synthesis (LAS) at the image level. Our method synthesizes near-in-distribution anomalies in a controllable way using Gaussian noise guided by gradient ascent and truncated projection. GLASS achieves state-of-the-art results on the MVTec AD (detection AUROC of 99.9\%), VisA, and MPDD datasets and excels in weak defect detection. The effectiveness and efficiency have been further validated in industrial applications for woven fabric defect detection. The code and dataset are available at: \url{https://github.com/cqylunlun/GLASS}.
1 Introduction
GLASS addresses limitations in anomaly synthesis by combining controllable feature-level and image-level synthesis. The paper reports that it outperforms state-of-the-art methods in industrial anomaly detection and localization.
1 Introduction
- Weak defects may occupy small areas or have low contrast, placing some abnormal regions close to normal regions.Source: §1 · p. 1
- Image-level synthesis provides detailed textures but lacks diversity, while feature-level synthesis is efficient but lacks directional control, especially for near-in-distribution anomalies.Figure 1 visualizes the image-level, feature-level, and GLASS strategies.Source: §1 · p. 2, Figure 1 · p. 2
- GLASS unifies feature-level GAS and image-level LAS to synthesize a broader range of anomalies controllably.The framework applies manifold and hypersphere distribution constraints to GAS and LAS.Source: §1 · pp. 2–3
- GAS uses Gaussian noise guided by gradient ascent and truncated projection to synthesize controllable near-in-distribution anomalies for weak-defect detection.LAS complements GAS by providing more diverse image-level anomalies.Source: §1 · p. 2
- GLASS outperforms state-of-the-art methods in industrial anomaly detection and localization tasks.The introduction describes extensive experiments supporting this comparison.Source: §1 · p. 3
2 Related Work
Related work spans reconstruction- and embedding-based detection as well as image- and feature-level anomaly synthesis. The proposed GLASS schematic organizes training into normal, GAS, and LAS branches.
2 Related Work
- Reconstruction-based methods analyze reconstruction residuals, while embedding-based approaches include memory banks, one-class classification, normalizing flows, and knowledge distillation.These feature-embedding methods are trained on original normal samples and lack anomaly-sample representation.Source: §2 · p. 3
- Fig. 2 shows GLASS training with a normal branch, gradient-guided GAS feature synthesis, and texture-overlay LAS image synthesis.Source: Figure 2 · p. 4
- Image-level synthesis creates detailed anomaly textures but lacks diversity, whereas feature-level synthesis is more efficient but less controllable in its anomaly direction.Examples include CutPaste, NSA, and DRAEM at the image level, and DSR, SimpleNet, and UniAD in feature space.Source: §2 · pp. 3–4
3 Proposed Method
GLASS trains a shared feature-processing and discriminator framework with normal, global-anomaly, and local-anomaly branches. It combines feature-level GAS with image-level LAS during training, then uses the normal branch for inference.
3 Proposed Method
- Training jointly feeds normal, GAS, and LAS features to a segmentation discriminator, while inference uses only the normal branch.The branches share a feature extractor, feature adaptor, and discriminator.Source: §3 · p. 4
3.1 Feature Extractor and Feature Adaptor
- A frozen backbone and trainable feature adaptor aggregate locally aware features across levels before anomaly synthesis and discrimination.The adaptor is a single-layer perceptron with matching input and output node counts.Source: §3.1 · p. 5
3.2 Feature-level Global Anomaly Synthesis Strategy
- GAS adds Gaussian noise to normal features, guides their direction with gradient ascent, and uses truncated projection to constrain anomaly distance.Under the hypersphere hypothesis, the lower radius is updated to cover 75% of normal samples; the upper bound is typically four times that radius.Source: §3.2 · pp. 5–7
3.3 Image-level Local Anomaly Synthesis Strategy
- LAS creates image-level anomalies by combining Perlin-noise masks, augmented DTD textures, and transparency-controlled overlay fusion.The foreground mask restricts the anomalous region to the sample surface, and mask construction uses intersections or unions of two Perlin masks.Source: §3.3 · p. 8
3.4 Discriminator and Training Objectives
- A discriminator assigns anomaly confidence to features from all three branches, trained with normal-feature BCE, GAS BCE, and LAS focal loss with OHEM.OHEM is applied to the LAS loss to filter crucial samples such as weak defects.Source: §3.4 · p. 9
3.5 Inference and Anomaly Scoring
- At inference, the discriminator's feature-map output is resized and smoothed for pixel-level localization, while its maximum value gives the image-level anomaly score.Only the normal branch processes test images.Source: §3.5 · p. 9
4 Experiments
GLASS is evaluated on public, self-built, and weak-defect datasets, with comparisons and ablations examining its performance, speed, and synthesis components. The experiments report strong results across datasets and especially on weak defects.
4.1 Datasets
- The experiments use MVTec AD, VisA, MPDD, and the self-built WFDD dataset, plus MAD-man and MAD-sys test sets for weak-defect evaluation.WFDD includes 3,860 normal and 241 anomaly samples; MAD-man gathers selected weak defects, while MAD-sys varies defect weakness using four transparency coefficients.Source: §4.1 · p. 10
4.2 Implementation Detail
- The implementation uses WideResNet50 level-2 and level-3 features by default, and evaluates image- and pixel-level AUROC plus pixel-level PRO.GLASS-j selects between manifold-based GLASS-m and hypersphere-based GLASS-h using image-level spectrogram analysis; the experiments use a Tesla A800 GPU.Source: §4.2 · pp. 10–11
4.3 Comparative Experiments on Different Datasets
- All three GLASS variants outperform other state-of-the-art methods across four datasets and run faster; GLASS-j exceeds SimpleNet by 1.2% image-level AUROC, 0.9% pixel-level AUROC, and 3.9% pixel-level PRO.Table 2 reports the four-dataset comparison and throughput.Source: Table 2 · p. 11, §4.3 · pp. 12–13
- 99.9% image-level AUROC and 99.3% pixel-level AUROC are reported for GLASS-j on MVTec AD; it reaches 100% image-level AUROC on 9 of 15 categories.GLASS-m performs well on complex nonlinear categories, while GLASS-h favors concentrated intraclass distributions; Fig. 5 shows little score overlap, and Fig. 6 shows discriminative results.Source: Figure 5 · p. 11, §4.3 · p. 12, Figure 6 · p. 12
- GLASS surpasses other methods on MAD-man and MAD-sys, improving over SimpleNet by 5.6%, 4.5%, and 12.9% across the three reported metrics.These weak-defect improvements exceed the improvements reported on MVTec AD.Source: Table 3 · p. 12, §4.3 · p. 13
4.4 Ablation Study
- Cooperative LAS and GAS training improves anomaly synthesis coverage; LAS performs better on weaker MAD-sys defects, while GAS without gradient ascent and projection performs better on MVTec AD.Adding Gaussian noise, gradient ascent, and truncated projection successively improves the three metrics, with the latter two especially effective on weak-defect sets.Source: §4.4 · p. 13, Table 4 · p. 13
- Merging WideResNet50 levels 2 and 3 gives the best backbone result; removing the feature adapter reduces pixel-level AUROC by 0.1% and PRO by 0.5%.The optimal manifold-distance range is [0.5, 1], and the default is r_1=1.Source: §4.4 · p. 14, Table 5 · p. 14, Figure 8 · p. 14
5 Conclusion
GLASS jointly trains GAS and LAS to synthesize broader-coverage anomalies controllably, and the paper reports strong results across four industrial anomaly-detection datasets. Its experiments focus on structural anomalies; logical anomalies remain for future investigation.
5 Conclusion
- GLASS cooperatively trains GAS and LAS for controllable, broader-coverage anomaly synthesis, and reports state-of-the-art results with faster detection on four industrial datasets.GAS uses gradient ascent and truncated projection for quantitative weak-defect synthesis; LAS provides more diverse synthesis.Source: §5 · p. 14
- The paper focuses on localizing structural anomalies and has not extensively explored logical anomaly detection.The authors identify logical anomaly detection as future work and also plan synthesis without auxiliary texture datasets.Source: §5 · p. 14
A.1. Public Datasets
- The experiments use three public and three self-built datasets; MVTec AD, VisA, and MPDD are the public datasets described here.The paper identifies MVTec AD as 15 categories and 5,354 images, VisA as 10,821 images across 12 categories, and MPDD as 1,346 images across 6 categories.Source: A. Dataset Details · p. 18, §A.1 · p. 18, Table S1 · p. 18
A.2. Self-built Datasets
The self-built datasets cover woven-fabric defects and weak defects drawn or synthesized from MVTec AD. The appendix also notes that GAS under the hypersphere hypothesis uses a different truncated-projection process.
A.2. Self-built Datasets
- WFDD contains 4,101 woven-fabric images across four categories, with normal training samples and anomalous test samples annotated at pixel level.Three regularly textured categories come from industrial production sites, and one irregular-pattern category comes from the Cloth Flaw Dataset.Source: §A.2 · p. 18, Figure S1 · p. 18
- MAD-man comprises five subsets of weak defects selected independently by five people from all 15 MVTec AD categories.Each category in each subset contains two normal and six anomaly samples; Fig. S2 marks selected anomaly locations.Source: §A.2 · p. 18, Figure S2 · p. 18
- MAD-sys uses five MVTec AD texture categories and four subsets with different weakness levels, set by transparency coefficients β = {0.1, 0.3, 0.5, 0.7}.Each anomaly image combines a normal training background with an anomalous foreground augmented from another training image; Fig. S3 illustrates the coefficient variation.Source: §A.2 · p. 18, Figure S3 · p. 19
B.1. GAS under Hypersphere Hypothesis
- Under the hypersphere hypothesis, GAS uses a truncated-projection process different from the manifold-hypothesis version.The appendix provides the hypersphere version as Algorithm S1.Source: §B.1 · p. 19
B.2. Image-level Spectrogram Analysis
Image-level spectrogram compactness guides category-level selection between manifold- and hypersphere-based hypotheses. The section also reports choices for neighborhood size and noise scale, and compares LAS synthesis components.
B.2. Image-level Spectrogram Analysis
- Image-level spectrogram compactness guides the choice of distribution hypothesis: lower values tend toward manifold and higher values toward hypersphere, and most inferred hypotheses outperform the opposite choice.Compactness is the proportion of positive pixels within the bounded area of the binarized, centrally shifted spectrogram.Source: §B.2 · p. 19, Figure S5 · p. 20
C.1. Neighborhood Size
- The performance difference among p = 3, p = 4, and p = 5 is minor, and p = 3 yields the highest pixel-level AUROC.Here, p is the patch size used for feature aggregation in the feature extractor.Source: §C.1 · p. 19, Figure S4 · p. 19
C.2. Scale of Noise
- Performance differences across Gaussian-noise standard deviations are negligible, and σg = 0.015 yields the highest pixel-level AUROC.The passage attributes the broad range of suitable noise scales to gradient-ascent and truncated-projection constraints.Source: §C.2 · p. 20, Figure S6 · p. 20
C.3. Components in LAS
- 0.5%, 0.6%, and 3.2%: GLASS (GAS + LAS) improves average I-AUROC, P-AUROC, and P-PRO over GAS + CutPaste; gains over GAS + NSA are 0.2%, 0.4%, and 3.2%, respectively.Using interaction, union, and single operations yields the greatest diversity in anomalous regions; omitting the foreground mask or using constant β slightly reduces performance.Source: §C.3 · p. 20, Table S2 · p. 20
C.4. Training Objectives
The training-objective experiments compare loss choices for the LAS branch, while the detailed comparative experiments name five state-of-the-art methods and their approaches.
C.4. Training Objectives
- 1.4%: using Focal loss for LAS increases pixel-level PRO, and OHEM filtering crucial samples increases it by a further 1.1%.The Normal and GAS branches use BCE loss; the LAS discriminator uses Focal loss because local anomaly detection is treated as segmentation with positive-negative sample imbalance.Source: §C.4 · p. 20
D. Detailed Comparative Experiments
- The five comparison methods are DSR, PatchCore, BGADw/o, RD++, and SimpleNet, spanning reconstruction, memory-bank, normalizing-flow, knowledge-distillation, and one-class-classification approaches.DSR and SimpleNet use feature-level anomaly synthesis, while BGAD and RD++ use image-level synthesis.Source: D. Detailed Comparative Experiments · p. 22
D.1. Anomaly Detection on Public Datasets
GLASS-j reports strong results on MVTec AD, VisA, and MPDD. The section also tests robustness to complex industrial backgrounds and scattered objects.
D.1. Anomaly Detection on Public Datasets
- 99.9% image-level AUROC and 99.3% pixel-level AUROC: GLASS-j achieves these average results on MVTec AD.GLASS shows less overlap and more concentrated anomaly scores than DSR, indicating better discrimination between normal and anomalous samples.Source: §D.1 · p. 22, Figure S7 · p. 22
- 98.8% image-level AUROC and 98.8% pixel-level AUROC: GLASS-j establishes state-of-the-art average performance on VisA and is superior on 8 of 12 categories.All three GLASS variants outperform the other state-of-the-art methods; GLASS-m performs slightly better than GLASS-h on this dataset.Source: §D.1 · p. 22
- 99.6% image-level AUROC and 99.4% pixel-level AUROC: GLASS-j achieves state-of-the-art average performance on MPDD and is superior on all categories.All categories are judged to have manifold distribution, so GLASS-j equals GLASS-m on MPDD; GLASS-m significantly outperforms GLASS-h on Bracket brown and Bracket white.Source: §D.1 · p. 22
- On dirty backgrounds, GLASS's I-AUROC decreases 0.7%, compared with a 6.2% decrease for SimpleNet.The test simulates dirty backgrounds on Capsules using color jittering and Gaussian noise while keeping the foreground unchanged.Source: §D.1 · p. 22, Figure S8 · p. 22
D.2. Anomaly Detection on Self-built Datasets
On the self-built WFDD and weak-defect datasets, GLASS reports strong detection performance. The qualitative results visualize GLASS variants and comparison methods across datasets using consistently scaled anomaly maps.
D.2. Anomaly Detection on Self-built Datasets
- GLASS-j achieves average 100% image-level AUROC and 98.9% pixel-level AUROC on WFDD, with superior performance on all categories.GLASS-j equals GLASS-m on WFDD; GLASS-m performs significantly better than GLASS-h in texture categories.Source: §D.2 · p. 22
- GLASS outperforms other methods across all three metrics on each MAD-man subset and achieves superior performance on MAD-sys's synthetic weak defects.On MAD-sys, GLASS's advantage over other state-of-the-art methods grows as β increases and defects become less distinguishable, despite declining performance.Source: §D.2 · p. 22
E. Qualitative Results
- Anomaly maps for all samples in each category use unified scales, enabling relative confidence outputs to be compared across the visualizations.The figures show GLASS and its variants alongside state-of-the-art methods on MVTec AD, VisA, MPDD, WFDD, and selected MAD-man weak-defect tests.Source: Figure S9 · p. 23, Figure S10 · p. 24, Figure S11 · p. 25
E.1. Visualizations on Public Datasets
Across MVTec AD, VisA, and MPDD visualizations, GLASS localizes anomalies while limiting over-detection and handling small or complex cases. The supplied MAD-sys figures compare GLASS-m with other methods on Carpet and synthetic weak defects.
MVTec AD
- On MVTec AD, GLASS lowers anomaly scores in normal areas and localizes anomalous regions with higher confidence, with less over- and missed detection and stronger global-anomaly detection.The cited examples include Carpet, Pill, Metal nut, and Transistor.Source: §E.1 · p. 27
VisA
- On VisA, GLASS performs better on relatively small anomalies and precisely localizes them even when multiple same-type objects appear in an image.The examples are Capsules and Macaroni1.Source: §E.1 · p. 27
MPDD
- On MPDD, GLASS produces clearer edges, more complete structures, and better consistency; GLASS-m localizes better than GLASS-h for dispersed intraclass distributions.GLASS-j aligns with either GLASS-m or GLASS-h based on its distribution-hypothesis judgment.Source: §E.1 · p. 27
MAD-sys figures
- Figures S14 and S15 compare GLASS-m with other SOTA methods on MAD-sys Carpet under different β and on the synthetic weak-defect test set, respectively.Source: Figure S14 · p. 27, Figure S15 · p. 27
E.2. Visualizations on Self-built Datasets
On self-built and synthetic weak-defect visualizations, GLASS detects subtle anomalies across varied conditions. On MAD-sys, its performance declines noticeably only at β = 0.7, while it surpasses other methods across five categories at β = 0.5.
WFDD
- On WFDD, GLASS detects continuous line defects, remains effective on complex patterned backgrounds, and distinguishes anomalous regions smaller than 10 × 10 pixels.The examples include Pink flower and Yellow cloth.Source: §E.2 · p. 27
MAD-man
- On MAD-man weak defects from all 15 MVTec AD categories, GLASS keeps normal areas low-confidence and anomalies high-confidence, attending to varying anomaly degrees within a sample.The Bottle example contrasts with methods that focus more on obvious anomalies.Source: §E.2 · p. 27
MAD-sys
- At β = 0.5, GLASS significantly surpasses all other methods across five MAD-sys categories, though its precision is lower than MAD-man; a noticeable decline appears only at β = 0.7.The synthetic defects are described as harder for humans to discover than the selected MVTec AD test-set weak defects.Source: §E.2 · p. 27