Mitigating Spurious Negative Pairs for Robust Industrial Anomaly Detection

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Mirzaei, Hossein, Nafez, Mojtaba, Habibi, Jafar, Sabokrou, Mohammad, Rohban, Mohammad Hossein
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912205301088256
author Mirzaei, Hossein
Nafez, Mojtaba
Habibi, Jafar
Sabokrou, Mohammad
Rohban, Mohammad Hossein
author_facet Mirzaei, Hossein
Nafez, Mojtaba
Habibi, Jafar
Sabokrou, Mohammad
Rohban, Mohammad Hossein
contents Despite significant progress in Anomaly Detection (AD), the robustness of existing detection methods against adversarial attacks remains a challenge, compromising their reliability in critical real-world applications such as autonomous driving. This issue primarily arises from the AD setup, which assumes that training data is limited to a group of unlabeled normal samples, making the detectors vulnerable to adversarial anomaly samples during testing. Additionally, implementing adversarial training as a safeguard encounters difficulties, such as formulating an effective objective function without access to labels. An ideal objective function for adversarial training in AD should promote strong perturbations both within and between the normal and anomaly groups to maximize margin between normal and anomaly distribution. To address these issues, we first propose crafting a pseudo-anomaly group derived from normal group samples. Then, we demonstrate that adversarial training with contrastive loss could serve as an ideal objective function, as it creates both inter- and intra-group perturbations. However, we notice that spurious negative pairs compromise the conventional contrastive loss to achieve robust AD. Spurious negative pairs are those that should be closely mapped but are erroneously separated. These pairs introduce noise and misguide the direction of inter-group adversarial perturbations. To overcome the effect of spurious negative pairs, we define opposite pairs and adversarially pull them apart to strengthen inter-group perturbations. Experimental results demonstrate our superior performance in both clean and adversarial scenarios, with a 26.1% improvement in robust detection across various challenging benchmark datasets. The implementation of our work is available at: https://github.com/rohban-lab/COBRA.
format Preprint
id arxiv_https___arxiv_org_abs_2501_15434
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Mitigating Spurious Negative Pairs for Robust Industrial Anomaly Detection
Mirzaei, Hossein
Nafez, Mojtaba
Habibi, Jafar
Sabokrou, Mohammad
Rohban, Mohammad Hossein
Computer Vision and Pattern Recognition
Despite significant progress in Anomaly Detection (AD), the robustness of existing detection methods against adversarial attacks remains a challenge, compromising their reliability in critical real-world applications such as autonomous driving. This issue primarily arises from the AD setup, which assumes that training data is limited to a group of unlabeled normal samples, making the detectors vulnerable to adversarial anomaly samples during testing. Additionally, implementing adversarial training as a safeguard encounters difficulties, such as formulating an effective objective function without access to labels. An ideal objective function for adversarial training in AD should promote strong perturbations both within and between the normal and anomaly groups to maximize margin between normal and anomaly distribution. To address these issues, we first propose crafting a pseudo-anomaly group derived from normal group samples. Then, we demonstrate that adversarial training with contrastive loss could serve as an ideal objective function, as it creates both inter- and intra-group perturbations. However, we notice that spurious negative pairs compromise the conventional contrastive loss to achieve robust AD. Spurious negative pairs are those that should be closely mapped but are erroneously separated. These pairs introduce noise and misguide the direction of inter-group adversarial perturbations. To overcome the effect of spurious negative pairs, we define opposite pairs and adversarially pull them apart to strengthen inter-group perturbations. Experimental results demonstrate our superior performance in both clean and adversarial scenarios, with a 26.1% improvement in robust detection across various challenging benchmark datasets. The implementation of our work is available at: https://github.com/rohban-lab/COBRA.
title Mitigating Spurious Negative Pairs for Robust Industrial Anomaly Detection
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2501.15434