Visual Disentangled Diffusion Autoencoders: Scalable Counterfactual Generation for Foundation Models
Sidney Bender, Marco Morik
TL;DR
The paper addresses the vulnerability of foundation models to spurious correlations by introducing Visual Disentangled Diffusion Autoencoders (DiDAE), a gradient-free framework that decomposes frozen model embeddings into interpretable semantic directions via a disentangled dictionary and decodes edits with a diffusion autoencoder. It enables scalable, disentangled counterfactual generation and, when combined with Counterfactual Knowledge Distillation (CFKD), achieves state-of-the-art mitigation of shortcut learning on synthetic and real-world benchmarks. Through two gradient-free analysis methods and two correction strategies (Projection and CFKD), DiDAE delivers fast counterfactuals (up to 64 per second) and substantial downstream gains, outperforming gradient-based baselines and several explainer approaches. The approach generalizes across domains and offers potential extensions to discrete modalities and more powerful generative backbones like latent diffusion models.
Abstract
Foundation models, despite their robust zero-shot capabilities, remain vulnerable to spurious correlations and 'Clever Hans' strategies. Existing mitigation methods often rely on unavailable group labels or computationally expensive gradient-based adversarial optimization. To address these limitations, we propose Visual Disentangled Diffusion Autoencoders (DiDAE), a novel framework integrating frozen foundation models with disentangled dictionary learning for efficient, gradient-free counterfactual generation directly for the foundation model. DiDAE first edits foundation model embeddings in interpretable disentangled directions of the disentangled dictionary and then decodes them via a diffusion autoencoder. This allows the generation of multiple diverse, disentangled counterfactuals for each factual, much faster than existing baselines, which generate single entangled counterfactuals. When paired with Counterfactual Knowledge Distillation, DiDAE-CFKD achieves state-of-the-art performance in mitigating shortcut learning, improving downstream performance on unbalanced datasets.
