CounterFlow generates realistic image changes for visual explanations

CounterFlow: Target-Conditioned Flow Matching for Visual Counterfactuals

Machine LearningArtificial IntelligenceComputer Vision and Pattern Recognition

Summary

When AI makes decisions, it's helpful to see what changes would switch its answer to a different one. The authors present CounterFlow, a method that changes pictures in realistic ways to show what would make an AI pick a different category. Their approach directly edits the pixels to move an image toward a target label with less computing power than other methods. This makes it easier to understand and trust AI decisions by showing clear, believable example changes.

What this means in practice

  • For machine learning engineers: Produce clear and realistic image edits that explain AI model decisions by showing alternative classifications with lower computation cost.
  • For digital artists and designers: Create targeted, realistic image edits that shift visual features toward desired concepts to enhance creative workflows.

Authors

Paul Sevellec, Elisa Fromont, Romaric Gaudel, Laurence Roze, Paul Viallard, Laetitia Houeix

Abstract

In eXplainable AI, counterfactual explanations have gained significant traction by offering users direct, intuitive, and actionable insights into model decisions. We introduce CounterFlow, a novel framework based on Conditional Flow Matching that generates visual counterfactual explanations by directly steering a source image toward a user-specified target class. By leveraging target-conditioned vector fields, CounterFlow identifies highly realistic semantic modifications while requiring substantially lower computational overhead than traditional GAN- or diffusion-based architectures. Empirical evaluations on standard benchmarks demonstrate that CounterFlow achieves state-of-the-art performance in both visual realism and target class switching. By working directly in the raw pixel space, CounterFlow offers a more practical solution for real-world deployment.