TL;DR
When we ask an AI why it classified an image a certain way, the answer depends surprisingly heavily on what we compare that image against—a blank canvas, a blurry smudge, or static noise. This paper resolves this "path ambiguity" by separating how we divide up credit from which counterfactual path we take. By using Optimal Transport and generative Rectified Flows to find the "least-action" path from noise to data, the authors create a mathematically grounded, highly stable way to explain neural network predictions.
What Problem Does This Paper Address?
Suppose a neural network identifies a bird in a photo, and you want to know which pixels drove that decision. Standard "feature attribution" methods answer this by comparing the bird image to a baseline where information is absent (like a completely black image) and tracking how the model's score changes as you transition from absence to presence.
Here is the catch: neural networks are deeply nonlinear. Walking in a straight line in pixel space from a black square to a bird passes through bizarre, unnatural ghost-images where the model behaves erratically. If you instead transition from a blurred image or random noise, you take a different path and get a completely different explanation! Because these choices are usually hand-designed heuristics, feature attribution hides a massive modeling ambiguity: which counterfactual path should you actually trust?
Methods
The authors untangle what is usually a messy knot by splitting attribution into two distinct problems:
- Credit Allocation (Standard Math, Newly Proven Unique): Once a smooth path is chosen, how do you divide the prediction score among pixels? Under basic fairness axioms (like efficiency and linearity) and a condition called coordinate-trace separability, the authors prove there is only one valid formula: the Aumann–Shapley line integral (accumulating gradients along the curve, just as Integrated Gradients does on a straight line).
- Path Selection (The Novel Twist): Instead of hand-crafting a baseline or relying on the classifier's own geometry, the authors let the data distribution dictate the path via Dynamic Optimal Transport. Imagine pouring a cloud of simple Gaussian noise so that it morphs into the distribution of real images using the minimum possible "kinetic energy" (least action). In probability space, this shortest route is a Wasserstein-2 geodesic.
Because exact optimal transport is intractable for high-res images, the authors approximate this ideal flow using Rectified Flow—a generative ODE model trained to move noise to data along straight, low-action trajectories (and refined via a retraining step called Reflow). To explain an image $x_1$, they run the learned ODE backward to find its natural noise partner $\hat{x}_0$, then step forward along that trajectory while summing up the classifier's gradients.
Datasets
The authors evaluate their framework on three standard vision datasets (no new datasets are introduced, though new path-consistency diagnostics are used):
- CUB-200-2011 ($32 \times 32$ bird images): Used to verify numerical completeness as integration steps increase.
- CIFAR-10 ($32 \times 32$ natural images) & CelebA-HQ ($256 \times 256$ faces): Used for benchmarking explanation stability, spatial coherence, and deletion faithfulness with ResNet-18 classifiers.
Key Insights and Ideas
- Stop tweaking the attribution formula: The fixed-path uniqueness theorem tells us that once a trajectory is set, the Aumann–Shapley integral is mathematically forced. Future creativity belongs in choosing the path, not inventing ad-hoc gradient weighting rules.
- Decoupling the path from the predictor: Unlike recent geometric methods that bend paths based on the classifier's own sensitivity, Optimal Transport chooses the path purely based on how data relates to noise—independent of the model being explained.
- Ideal OT secretly unifies with Integrated Gradients: Under ideal quadratic optimal transport, individual particle trajectories are actually straight lines! Thus, the theoretical ideal of this framework is equivalent to standard Integrated Gradients, provided you pick the exact, optimally-coupled noise reference for your specific input rather than an arbitrary black baseline.
- Better generative flows guarantee better explanations: The authors prove a theoretical stability bound showing attribution error scales linearly ($O(\varepsilon)$) with the approximation error of the learned velocity field.
Key Results
- Completeness: As the number of discrete integration steps $K$ rises from 10 to 200, the relative accounting error drops cleanly from 19.30% to 1.34% ($K=50$ hits a practical sweet spot at 5.34%).
- Reflow boosts stability: Straightening the generative trajectories with one round of Reflow (2-RF vs. 1-RF) lowers path kinetic action and dramatically improves cross-seed attribution stability—pushing map similarity (SSIM) from 0.716 to 0.911 and feature rank correlation from 0.662 to 0.882.
- Error tracking: Across training checkpoints, the empirical correlation between vector-field mismatch and attribution discrepancy exceeds 0.95, validating their theoretical stability bound.
- Image benchmarks: On CIFAR-10 and CelebA-HQ, Transport Flow avoids the high-frequency static/noise artifacts of straight-line Integrated Gradients. On CIFAR-10, it achieves the best spatial coherence (lowest Structure-Aware Total Variation at 0.062 vs. IG's 0.643) and lowest blur-deletion score (1.311) among path-based methods, while performing neck-and-neck with DDIM diffusion paths on zero-deletion faithfulness.
Limitations and Future Work
- Approximation gaps: High-dimensional Rectified Flow and standard Reflow are practical approximations; they are not guaranteed to recover the exact mathematical Wasserstein-2 optimal transport coupling.
- No single "best" path: Least-action transport is a principled choice, not a universal law—its results still depend on the chosen prior distribution and quadratic ground cost.
- Beyond Vision: Experiments are restricted to images. Extending the framework to continuous tabular data is straightforward, whereas discrete modalities like categorical tabular features or NLP tokens will require constrained flows, continuous relaxations, or operating in embedding spaces.
Summary updated