Causal-Adapter: Taming Text-to-Image Diffusion for Faithful Counterfactual Generation
Lei Tong, Zhihua Liu, Chaochao Lu, Dino Oglic, Tom Diethe, Philip Teare, Sotirios A. Tsaftaris, Chen Jin
TL;DR
Causal-Adapter provides a modular approach to faithful counterfactual image generation by injecting an explicit structural causal model into a frozen diffusion backbone through a trainable adapter. It introduces Prompt Aligned Injection (PAI) and Conditioned Token Contrast (CTC) to align causal attributes with textual embeddings and disentangle attribute factors, enabling precise, identity-preserving edits across synthetic and real-world data. The method achieves state-of-the-art performance on Pendulum, CelebA, and ADNI, with substantial improvements in intervention effectiveness, realism, and minimal unintended changes, as demonstrated by comprehensive ablations. This work offers scalable, generalizable counterfactual editing that leverages abduction–action–prediction in diffusion models, enhancing applicability in critical domains such as medical imaging and biometric editing while addressing safety and reproducibility considerations.
Abstract
We present Causal-Adapter, a modular framework that adapts frozen text-to-image diffusion backbones for counterfactual image generation. Our method enables causal interventions on target attributes, consistently propagating their effects to causal dependents without altering the core identity of the image. In contrast to prior approaches that rely on prompt engineering without explicit causal structure, Causal-Adapter leverages structural causal modeling augmented with two attribute regularization strategies: prompt-aligned injection, which aligns causal attributes with textual embeddings for precise semantic control, and a conditioned token contrastive loss to disentangle attribute factors and reduce spurious correlations. Causal-Adapter achieves state-of-the-art performance on both synthetic and real-world datasets, with up to 91% MAE reduction on Pendulum for accurate attribute control and 87% FID reduction on ADNI for high-fidelity MRI image generation. These results show that our approach enables robust, generalizable counterfactual editing with faithful attribute modification and strong identity preservation.
