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, learnt 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: The Problem of Noisy Saliency Maps
In the field of Explainable AI (XAI), Saliency Maps—which highlight the pixels most important to a model's decision—are notoriously unreliable. In standard deep learning models, these maps are often "noisy" or highlight seemingly irrelevant background pixels. This occurs because standard networks are highly sensitive to small input changes (high Lipschitz constants), leading to adversarial vulnerabilities. Usually, robustness and explainability are treated as separate problems; however, this research argues they are two sides of the same coin when viewed through the lens of Optimal Transport.
The OTNN Framework
The authors utilize Optimal Transport Neural Networks (OTNNs) to bridge this gap. The approach relies on two key components:
- 1-Lipschitz Constraint: The network is constrained so that the output cannot change faster than the input. This is achieved using the
DEEL.LIPlibrary, employing techniques like Björck orthogonalization for linear and convolutional layers. - hKR Loss: Instead of standard Cross-Entropy, the models are trained using the hinge-Kantorovich-Rubinstein (hKR) loss. This loss is the mathematical "dual" of an optimal transport problem, forcing the network to learn a function representing the "cost" of transporting data from one class distribution to another.
From Adversarial Attacks to Counterfactuals
Because of the OT framework, the authors prove mathematically that the model's gradient ($\nabla_x f(x)$) points in the direction of the optimal transportation plan. In a standard model, an adversarial attack is often just noise. In an OTNN, following the gradient "down" to the decision boundary creates a counterfactual explanation. For example, if the model sees a "0" and you follow the gradient toward the "5" class, the image actually begins to take on the visual characteristics of a "5."
Experimental Results and Human Alignment
The authors evaluated their approach across datasets of varying complexity, including FashionMNIST, CelebA, and ImageNet. Key findings include:
- State-of-the-Art XAI Metrics: OTNNs significantly outperformed unconstrained networks on the $\mu$Fidelity metric (measuring if highlighted pixels drive predictions) and Stability (ensuring similar images have similar explanations).
- Human Alignment: On the ClickMe benchmark, OTNNs showed an unprecedented level of alignment with human feature importance, surpassing the "Pareto front" of over 100 other deep learning models. They don't require post-processing tricks like SmoothGrad because the 1-Lipschitz constraint makes the gradient inherently smooth and focused on relevant shapes.
- Certifiable Robustness: By design, these models provide a guaranteed margin of safety against adversarial noise, as they are 1-Lipschitz by construction.
Conclusion and Future Work
While OTNNs offer superior interpretability and robustness, they currently require roughly 3 to 6 times longer to train than standard networks due to the mathematical constraints of maintaining the 1-Lipschitz property. Furthermore, while saliency maps on ImageNet are highly aligned with humans, the full "counterfactual" image transformations are less compelling than on simpler datasets due to the complexity of transporting between 1,000 categories. Future research will focus on improving the scalability of 1-Lipschitz layers to reduce training overhead while preserving these beneficial explainability properties.
Summary updated