Counterfactual Explanations on Robust Perceptual Geodesics
Eslam Zaher, Maciej Trzaskowski, Quan Nguyen, Fred Roosta
TL;DR
This work addresses the difficulty of producing semantically meaningful counterfactual explanations in high-dimensional vision by reframing counterfactual generation as geodesic traversal on a latent manifold. It introduces Perceptual Counterfactual Geodesics (PCG), which constructs a robust perceptual metric $G_R$ from multiple layers of robust vision features and pulls it back to latent space as $G_Z$, yielding geometry-aware paths that stay on-manifold and evolve semantically. The authors implement a two-phase optimization: Phase 1 learns a robust geodesic between the input and a target exemplar, and Phase 2 jointly refines the endpoint under a classification loss with re-anchoring, producing minimal, faithful counterfactuals. Across AFHQ, FFHQ, and PlantVillage, PCG outperforms baselines on geometry-aware metrics (e.g., $\mathcal{L}_{\mathcal{R}}$, SM, MAS) and reveals failure modes of traditional latent-space counterfactual methods, highlighting the importance of robust latent geometry for trustworthy explanations.
Abstract
Latent-space optimization methods for counterfactual explanations - framed as minimal semantic perturbations that change model predictions - inherit the ambiguity of Wachter et al.'s objective: the choice of distance metric dictates whether perturbations are meaningful or adversarial. Existing approaches adopt flat or misaligned geometries, leading to off-manifold artifacts, semantic drift, or adversarial collapse. We introduce Perceptual Counterfactual Geodesics (PCG), a method that constructs counterfactuals by tracing geodesics under a perceptually Riemannian metric induced from robust vision features. This geometry aligns with human perception and penalizes brittle directions, enabling smooth, on-manifold, semantically valid transitions. Experiments on three vision datasets show that PCG outperforms baselines and reveals failure modes hidden under standard metrics.
