Decoupled Classifier-Free Guidance for Counterfactual Diffusion Models
Tian Xia, Fabio De Sousa Ribeiro, Rajat R Rasal, Avinash Kori, Raghav Mehta, Ben Glocker
TL;DR
This paper tackles the problem that classifier-free guidance with a single global weight can cause unintended attribute amplification during counterfactual diffusion. It introduces Decoupled Classifier-Free Guidance (DCFG), a model-agnostic, inference-time technique that partitions semantic attributes into groups and applies distinct guidance weights per group via an attribute-split conditioning embedding. The approach reduces spurious changes outside the causal pathway while preserving the targeted intervention’s effect, demonstrated on CelebA-HQ and medical-imaging datasets (EMBED, MIMIC-CXR) with metrics for effectiveness and reversibility. The results show improved fidelity and reversibility of counterfactuals as guidance is decoupled, with flexible configurations from two-group to per-attribute control. The work suggests broad applicability of DCFG to other conditional generation tasks and timesteps scheduling strategies for further fidelity gains.
Abstract
Counterfactual generation aims to simulate realistic hypothetical outcomes under causal interventions. Diffusion models have emerged as a powerful tool for this task, combining DDIM inversion with conditional generation and classifier-free guidance (CFG). In this work, we identify a key limitation of CFG for counterfactual generation: it prescribes a global guidance scale for all attributes, leading to significant spurious changes in inferred counterfactuals. To mitigate this, we propose Decoupled Classifier-Free Guidance (DCFG), a flexible and model-agnostic guidance technique that enables attribute-wise control following a causal graph. DCFG is implemented via a simple attribute-split embedding strategy that disentangles semantic inputs, enabling selective guidance on user-defined attribute groups.
