CausalDiff: Causality-Inspired Disentanglement via Diffusion Model for Adversarial Defense

Mingkun Zhang, Keping Bi, Wei Chen, Quanrun Chen, Jiafeng Guo +1 more
2/3/2026

No official code found. Best implementation: TMLResearchGroup-CAS/CausalDiff (10 stars, MIT, last commit 2025-02-11). 1 more below.

Abstract

Despite ongoing efforts to defend neural classifiers from adversarial attacks, they remain vulnerable, especially to unseen attacks. In contrast, humans are difficult to be cheated by subtle manipulations, since we make judgments only based on essential factors. Inspired by this observation, we attempt to model label generation with essential label-causative factors and incorporate label-non-causative factors to assist data generation. For an adversarial example, we aim to discriminate the perturbations as non-causative factors and make predictions only based on the label-causative factors. Concretely, we propose a casual diffusion model (CausalDiff) that adapts diffusion models for conditional data generation and disentangles the two types of casual factors by learning towards a novel casual information bottleneck objective. Empirically, CausalDiff has significantly outperformed state-of-the-art defense methods on various unseen attacks, achieving an average robustness of 86.39% (+4.01%) on CIFAR-10, 56.25% (+3.13%) on CIFAR-100, and 82.62% (+4.93%) on GTSRB (German Traffic Sign Recognition Benchmark). The code is available at https://github.com/CAS-AISafetyBasicResearchGroup/CausalDiff.

View on arXivView PDF

Code Implementations(2)

MIT

Implementation code for paper "CausalDiff: Causality-Inspired Disentanglement via Diffusion Model for Adversarial Defense", forked from @ZhangMingKun1

100Shell, PythonNov 14, 20241 years agoMIT
MIT

Implementation code for paper "CausalDiff: Causality-Inspired Disentanglement via Diffusion Model for Adversarial Defense"

102Shell, PythonMar 28, 20241 years agoMIT

Similar Papers

Cite this paper

@article{zhang2026causaldiff,
  title  = {CausalDiff: Causality-Inspired Disentanglement via Diffusion Model for Adversarial Defense},
  author = {Mingkun Zhang and Keping Bi and Wei Chen and Quanrun Chen and Jiafeng Guo and Xueqi Cheng},
  year   = {2026},
  eprint = {2410.23091},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2410.23091},
  url    = {https://arxiv.org/abs/2410.23091},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.23091.svg)](https://codeofpaper.com/paper/2410.23091)

Discussion