Abstract
Evaluating the quality of image counterfactuals—queries that ask how an image would appear if a specific attribute were different—is fundamentally challenging due to the lack of ground-truth data. This paper proposes a framework to quantify the performance of deep generative models using Judea Pearl’s causal axioms: composition, reversibility, and effectiveness. By treating models as black-box counterfactual engines, this approach allows for the measurement of causal "soundness" and reveals critical trade-offs between attribute manipulation and identity preservation.
Introduction
In causal inference, a counterfactual query explores a hypothetical scenario: "What would have happened to $Y$ if $X$ had been $x'$, given that we observed $X=x$ and $Y=y$?" In the domain of computer vision, this translates to modifying specific image attributes (e.g., changing hair color or adding a smile) while keeping all other factors, such as identity and background, constant.
While deep generative models like Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs) have shown remarkable success in image manipulation, they suffer from an identifiability problem. Because the true structural causal model (SCM) of the world is unknown, multiple models can produce visually convincing results that are causally inconsistent. Furthermore, because we cannot observe the same subject in two different states simultaneously, we lack the ground-truth images necessary for standard supervised evaluation. Current evaluation methods often rely on subjective human inspection or simple classification accuracy, neither of which captures whether a model is truly "causally sound."
The Axiomatic Framework
To address the absence of ground truth, this research introduces a framework based on three fundamental axioms of counterfactuals defined by Judea Pearl. These axioms provide a mathematical basis for evaluating the internal consistency of a model's causal logic.
1. Composition
The axiom of composition states that if we intervene on a variable to set it to the value it already possesses, the outcome should remain unchanged. In the context of images, a "null intervention" should result in an image identical to the original. This is measured by calculating the $l_1$ distance between the original image and the reconstructed image after a null intervention.
2. Reversibility
Reversibility requires that if an attribute is changed and then subsequently changed back to its original state, the resulting image should match the starting image. This measures the "cycle consistency" of the model within the causal domain, ensuring that the transformation process does not lose or hallucinate information irrecoverably.
3. Effectiveness
Effectiveness dictates that an intervention must successfully change the target attribute to the commanded value. To evaluate this without ground truth, the framework employs "pseudo-oracles"—pre-trained, independent classifiers that verify whether the target attribute (e.g., "smiling") is present in the generated counterfactual image.
Methodology and Confounding
A significant challenge in training these models is confounding, where attributes are correlated in the training data (e.g., "smiling" and "wearing lipstick"). To prevent models from learning statistical shortcuts rather than true causal effects, the authors utilize simulated interventions. By resampling data to break these correlations during training, the model is forced to learn the independent influence of each attribute.
Experimental Evaluation
The framework was tested across three datasets of increasing complexity:
- Colored MNIST: A synthetic dataset where digit identity and color were intentionally confounded. The results showed that models failed to produce accurate counterfactuals unless simulated interventions were used during training.
- 3D Shapes: A procedurally generated dataset with known causal mechanisms. Here, VAEs demonstrated superior composition scores (average $l_1$ distance of ~1.62) compared to GANs (~5.11), which tended to introduce slight distortions even during null interventions.
- CelebA-HQ: A high-resolution dataset of human faces. The evaluation focused on complex attributes like "smiling" and "eyeglasses."
Discussion: The Soundness Trade-off
The experiments revealed a fundamental tension between effectiveness and composition/reversibility. In hierarchical models like the VDVAE, the depth of latent variable abduction (inference) plays a crucial role.
When the model abducts a high number of latent layers (e.g., 42 layers in CelebA-HQ), it achieves high faithfulness to the original identity (low $l_1$ distance) but suffers in effectiveness (F1-score of 0.848). Conversely, abducting fewer layers (e.g., 8 layers) makes the model more "obedient" to the intervention, increasing the F1-score to 0.933, but at the cost of significantly degrading the image's original identity and composition. This suggests that identity is often encoded in the same latent spaces required for attribute manipulation.
Conclusion and Limitations
This axiomatic framework provides a robust, black-box method for quantifying the causal reliability of generative models. However, several limitations remain. The reliability of the "Effectiveness" metric is contingent on the accuracy of the pseudo-oracle classifiers. Additionally, the reversibility axiom assumes that the underlying causal mechanisms are invertible, which may not hold for all real-world systems. Future work will focus on using these metrics to discover which latent variables in a model correspond to specific causal parents in the physical world, moving toward more interpretable and controllable AI.
Summary updated