Abstract Input gradients have a pivotal role in a variety of applications, including adversarial attack algorithms for evaluating model robustness, explainable AI techniques for generating Saliency Maps, and counterfactual explanations. However, Saliency Maps generated by traditional neural networks are often noisy and provide limited insights. In this paper, we demonstrate that, on the contrary, the Saliency Maps of 1-Lipschitz neural networks, learned with the dual loss of an optimal transportation problem, exhibit desirable XAI properties: They are highly concentrated on the essential parts of the image with low noise, significantly outperforming state-of-the-art explanation approaches across various models and metrics. We also prove that these maps align unprecedentedly well with human explanations on ImageNet. To explain the particularly beneficial properties of the Saliency Map for such models, we prove this gradient encodes both the direction of the transportation plan and the direction towards the nearest adversarial attack. Following the gradient down to the decision boundary is no longer considered an adversarial attack, but rather a counterfactual explanation that explicitly transports the input from one class to another. Thus, Learning with such a loss jointly optimizes the classification objective and the alignment of the gradient, i.e. the Saliency Map, to the transportation plan direction. These networks were previously known to be certifiably robust by design, and we demonstrate that they scale well for large problems and models, and are tailored for explainability using a fast and straightforward method.
Introduction
In the field of Explainable AI (XAI), saliency maps—which use the gradient of the output with respect to the input to highlight "important" pixels—are notoriously unreliable. In standard neural networks, these maps are often noisy, highlighting random background pixels or artifacts rather than the actual object of interest. This noise is a symptom of a deeper issue: standard networks are sensitive to tiny, imperceptible perturbations (adversarial attacks). To fix this, researchers often use "band-aid" methods like SmoothGrad or Integrated Gradients, which average multiple noisy gradients to find a clean one. However, these are computationally expensive. This paper investigates whether we can build a network that is inherently robust and produces meaningful explanations by design.
Methodology: 1-Lipschitz Networks and Optimal Transport
The authors focus on 1-Lipschitz Neural Networks, where the output cannot change faster than the input. This property provides "certifiable robustness," mathematically guaranteeing that small input changes won't flip the model's prediction. The key innovation is training these networks using the hKR loss, a variant of the Kantorovich-Rubinstein dual formulation used in Optimal Transport (OT).
Optimal Transport is the study of the most efficient way to move "mass" from one distribution (e.g., images of cats) to another (e.g., images of dogs). The authors prove that for an OTNN, the gradient at any point points exactly in the direction of the "transportation plan." To implement this, they use the DEEL.LIP library, employing Björck orthogonalization to keep layers 1-Lipschitz and the GroupSort2 activation function.
Gradients as Meaningful Explanations
In a standard model, following the gradient "down" usually leads to a noisy, nonsensical adversarial image. In an OTNN, following the gradient actually transforms the image's features in a way that aligns with human intuition. Because the gradient encodes the path to the nearest decision boundary and the transport plan, an "adversarial attack" on an OTNN is essentially a counterfactual explanation: "To make this image look more like Class B, you must change these specific pixels in this specific way."
Experimental Evaluation
The researchers validated their approach across datasets including FashionMNIST, CelebA, ImageNet, and ClickMe (human-generated feature importance maps).
Key Results
- Human Alignment: On the ClickMe dataset, OTNNs achieved an unprecedented level of alignment with human attention, outperforming over 100 other deep learning models.
- Efficiency: Because the raw gradient is already clean, OTNNs don't need expensive post-processing methods. A simple Saliency Map on an OTNN performs as well as or better than sophisticated methods like SmoothGrad on standard models.
- Quantitative Metrics: OTNNs consistently scored higher on metrics like $\mu$Fidelity (prediction drop when "important" pixels are removed) and Stability.
Conclusion and Future Work
While OTNNs offer superior explainability and robustness, they currently require 3 to 6 times longer to train than unconstrained networks. Furthermore, defining a "transport plan" between 1,000 different ImageNet classes is significantly more complex than in binary cases. Future work will focus on optimizing training speed and exploring more complex multi-class transport formulations to make OTNNs a standard tool for safety-critical AI.
Summary updated