[Paper Review] Counterfactual Generative Networks
This paper presents Counterfactual Generative Networks (CGNs) that disentangle image generation into independent mechanisms for shape, texture, and background, enabling counterfactual image generation and invariant classifiers that improve out-of-domain robustness, demonstrated on MNIST variants and ImageNet.
Neural networks are prone to learning shortcuts -- they often model simple correlations, ignoring more complex ones that potentially generalize better. Prior works on image classification show that instead of learning a connection to object shape, deep classifiers tend to exploit spurious correlations with low-level texture or the background for solving the classification task. In this work, we take a step towards more robust and interpretable classifiers that explicitly expose the task's causal structure. Building on current advances in deep generative modeling, we propose to decompose the image generation process into independent causal mechanisms that we train without direct supervision. By exploiting appropriate inductive biases, these mechanisms disentangle object shape, object texture, and background; hence, they allow for generating counterfactual images. We demonstrate the ability of our model to generate such images on MNIST and ImageNet. Further, we show that the counterfactual images can improve out-of-distribution robustness with a marginal drop in performance on the original classification task, despite being synthetic. Lastly, our generative model can be trained efficiently on a single GPU, exploiting common pre-trained models as inductive biases.
Motivation & Objective
- Motivate robust, causally informed image classification that avoids reliance on spurious correlations.
- Decompose image generation into independent mechanisms to control shape, texture, and background.
- Generate counterfactual images with unseen combinations of factors to train invariant classifiers.
- Demonstrate the approach on MNIST variants and ImageNet, showing improved OOD robustness with minimal task performance loss.
- Show emergent properties like object masks and unsupervised inpainting from the generative model.
Proposed method
- Model image synthesis as a structural causal model with independent mechanisms for shape, texture, and background (IMs).
- Use a fixed composition step (alpha blending) to form images from masks, textures, and backgrounds.
- Train IMs with losses including L_shape (mask fidelity), L_text (texture), L_bg (background inpainting via saliency), and L_rec (reconstruction against pseudo ground-truth from a conditional GAN).
- Initialize image generators with pre-trained backbones (e.g., BigGAN) for large-scale datasets like ImageNet; fine-tune with dedicated inductive biases.
- Generate counterfactuals by randomizing labels across mechanisms while keeping noise fixed, producing X_CF to train invariant classifiers.
- Train an invariant classifier r on counterfactual data to predict the label associated with one specific mechanism, rendering it invariant to others.
Experimental results
Research questions
- RQ1Can independent mechanisms controlling shape, texture, and background be learned to generate high-quality counterfactual images?
- RQ2Do counterfactual images improve the training of classifiers to be invariant to spurious correlates and thus more robust to out-of-domain data?
- RQ3What inductive biases (pre-training, mechanism-specific losses) are necessary to disentangle the factors and avoid collapse?
- RQ4How well does the CGN scale from MNIST variants to ImageNet in producing meaningful counterfactuals and robust classifiers?
Key findings
- CGNs can generate high-quality counterfactual images with controllable shape, texture, and background across MNIST variants and ImageNet.
- Disentangling object shape, texture, and background enables training invariant classifiers that are more robust to spurious correlations.
- Counterfactual training improves out-of-domain robustness with only a marginal drop in in-domain classification performance on MNIST variants and at scale on ImageNet.
- Inductive biases such as pre-training on large generators and mechanism-specific losses are essential to prevent collapse and achieve disentanglement.
- The model produces useful emergent properties, including high-quality object masks and unsupervised inpainting through the imposed supervision and architecture.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.