Spatial Attention Supervision for Defect Localization: Exploiting Ground-Truth Masks as Training Signal in Diffusion-Augmented Defect Detection
- URL: http://arxiv.org/abs/2609.06232v1
- Date: Sat, 05 Sep 2026 19:20:23 GMT
- Title: Spatial Attention Supervision for Defect Localization: Exploiting Ground-Truth Masks as Training Signal in Diffusion-Augmented Defect Detection
- Abstract summary: Ground-truth defect masks in industrial datasets are typically reserved for evaluation.<n>This paper repurposes them as spatial supervision signals during training of classification networks.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Ground-truth defect masks in industrial inspection datasets are typically reserved for evaluation. This paper repurposes them as spatial supervision signals during training of classification networks, teaching a model not just what to predict but where to look. The method adds an activation-based attention alignment loss that steers convolutional feature maps toward defect regions, in a mixed-supervision formulation that also accommodates samples without masks, such as diffusion-generated images. Combined with DDPM augmentation, synthetic images contribute quantity while masks contribute spatial precision. We evaluate 85 models (four CNN backbones under a 2x2 data/training factorial over five seeds, plus a Swin-V2-T transformer baseline) on the MVTec-AD bottle benchmark, with localization measured on held-out defect images excluded from classifier gradient updates. Main findings: (1) attention-guided training improves activation-based localization (Pixel-AUROC) by +18.0% for EfficientNetB0 with augmentation (p=0.005, Cohen's d=2.6) and +18.7% for ResNet50 (p=0.008), significant in four of eight CNN settings (uncorrected for multiple comparisons) with no significant change in classification; (2) for EfficientNetB0 a data x training-mode interaction is significant (p=0.002), consistent with a super-additive effect (+13.6% combined vs +1.6% summed individual effects); (3) architectures with weaker spatial representations benefit most, whereas ConvNeXt-T shows no effect, apparently because its depthwise-convolution activations yield spatially uninformative channel-mean maps; (4) unsupervised PatchCore remains the strongest localizer (Pixel-AUROC=0.983), contextualizing the supervised gains. These results show that existing evaluation masks can act as practical training signals that measurably and reproducibly improve where defect classifiers attend.
Related papers
- Continuity-Driven Representation Learning for Industrial Defect Detection [10.126273003671388]
Industrial defect detection differs from natural-image object detection because inspection images contain large normal-dominant regions with repetitive structures.<n>We propose a continuity-driven representation regularization framework that exploits normal-dominant regions as dense auxiliary supervision.
arXiv Detail & Related papers (2026-08-18T04:31:55Z) - Rethinking Attention Locality in Spiking Transformers [50.00501275379363]
Spiking Transformers provide a promising paradigm for efficient visual processing with spike-driven computation.<n>Their Softmax-free Spiking Self-Attention (SSA) struggles to establish spatially localized token interactions.<n>We propose Spatially Contiguous Local Attention with Boundary Continuity Pathway (SCLA-BCP)<n>Our approach improves mAP@50 by up to 9.50% on COCO on 2017 and mIoU by up to 3.42% on ADE20K.
arXiv Detail & Related papers (2026-08-09T07:36:17Z) - PLGSA-Transformer: Periocular Landmark-Guided Attention with Occlusion-Adaptive Cosine Thresholding for Cross-Modal Masked and Unmasked Face Recognition [0.0]
This paper proposes PLGSA-Transformer, a cross-modal face matching framework with three contributions.<n>PLGSA-Transformer achieves 97.22% pair verification accuracy with ROC AUC 1.0000, surpassing VGG-16-based MUFM.
arXiv Detail & Related papers (2026-07-03T19:48:17Z) - A Modelling and Evaluation Framework for EuroCrops-Driven Sentinel-2 Crop Segmentation [78.66324246922831]
This work presents a pipeline for generating semantic-segmentation-ready agricultural datasets from Sentinel-2 imagery and EuroCrops parcel-level annotations.<n>The dataset contains 67,337 patches from five European countries and uses a reduced taxonomy of ten crop classes plus background.<n>A four-level U-Net with Group Normalization was trained using 10 Sentinel-2 spectral bands and a composite loss combining class-weighted cross-entropy and Dice loss.
arXiv Detail & Related papers (2026-05-30T11:20:29Z) - HADS-Net:A Hybrid Attention-Augmented Dual-Stream Network with Physics-Informed Augmentation for Breast Ultrasound Image Classification [0.04999814847776097]
HADS-Net is a Hybrid Attention-Augmented Dual-Stream Network.<n>It exploits global texture and local boundary cues through two parallel pathways.<n>It achieves 96.58% accuracy, macro ROC-AUC of 0.9978, macro F1 of 0.9654, and per-class F1-scores of 0.970, 0.951, and 0.976 for benign, malignant, and normal.
arXiv Detail & Related papers (2026-05-19T22:16:24Z) - When Generative Augmentation Hurts: A Benchmark Study of GAN and Diffusion Models for Bias Correction in AI Classification Systems [0.6875312133832079]
Generative models are widely used to compensate for class imbalance in AI training pipelines.<n>FastGAN augmentation does not merely underperform at very low training set sizes but actively increases bias.<n> Stable Diffusion with Low-Rank Adaptation produced the best results overall.
arXiv Detail & Related papers (2026-03-17T05:37:17Z) - HyFormer-Net: A Synergistic CNN-Transformer with Interpretable Multi-Scale Fusion for Breast Lesion Segmentation and Classification in Ultrasound Images [0.0]
HyFormer-Net is a hybrid CNN-Transformer for simultaneous segmentation and classification with intrinsic interpretability.<n>On the BUSI dataset, HyFormer-Net achieves Dice Score 0.761 +/- 0.072 and accuracy 93.2%, outperforming U-Net, Attention U-Net, and TransUNet.<n>We conduct the first cross-dataset generalization study for hybrid CNN-Transformers in breast ultrasound.
arXiv Detail & Related papers (2025-11-02T17:06:12Z) - A Comprehensive Study of Image Classification Model Sensitivity to
Foregrounds, Backgrounds, and Visual Attributes [58.633364000258645]
We call this dataset RIVAL10 consisting of roughly $26k$ instances over $10$ classes.
We evaluate the sensitivity of a broad set of models to noise corruptions in foregrounds, backgrounds and attributes.
In our analysis, we consider diverse state-of-the-art architectures (ResNets, Transformers) and training procedures (CLIP, SimCLR, DeiT, Adversarial Training)
arXiv Detail & Related papers (2022-01-26T06:31:28Z) - MST: Masked Self-Supervised Transformer for Visual Representation [52.099722121603506]
Transformer has been widely used for self-supervised pre-training in Natural Language Processing (NLP)
We present a novel Masked Self-supervised Transformer approach named MST, which can explicitly capture the local context of an image.
MST achieves Top-1 accuracy of 76.9% with DeiT-S only using 300-epoch pre-training by linear evaluation.
arXiv Detail & Related papers (2021-06-10T11:05:18Z) - DAAIN: Detection of Anomalous and Adversarial Input using Normalizing
Flows [52.31831255787147]
We introduce a novel technique, DAAIN, to detect out-of-distribution (OOD) inputs and adversarial attacks (AA)
Our approach monitors the inner workings of a neural network and learns a density estimator of the activation distribution.
Our model can be trained on a single GPU making it compute efficient and deployable without requiring specialized accelerators.
arXiv Detail & Related papers (2021-05-30T22:07:13Z) - Compressing Visual-linguistic Model via Knowledge Distillation [43.73998154661652]
We study knowledge distillation to compress a transformer-based large visual-linguistic model into a small model.
We show that our proposed distillation significantly improves the performance of small VL models on image captioning and visual question answering tasks.
arXiv Detail & Related papers (2021-04-05T18:02:17Z) - Generalized Focal Loss: Learning Qualified and Distributed Bounding
Boxes for Dense Object Detection [85.53263670166304]
One-stage detector basically formulates object detection as dense classification and localization.
Recent trend for one-stage detectors is to introduce an individual prediction branch to estimate the quality of localization.
This paper delves into the representations of the above three fundamental elements: quality estimation, classification and localization.
arXiv Detail & Related papers (2020-06-08T07:24:33Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.