Tuning for Trustworthiness - Balancing Performance and Explanation Consistency in Neural Network Optimization

Alexander Hinterleitner, Thomas Bartz-BeielsteinarXiv 2025 · DOI

Abstract

In high-stakes artificial intelligence applications, predictive accuracy alone is insufficient; models must also provide reliable and interpretable explanations. However, a significant challenge exists where different Explainable AI (XAI) methods often yield conflicting feature importance rankings for the same model. This paper introduces the concept of XAI consistency as a primary objective in hyperparameter tuning. By employing multi-objective optimization via the Sequential Parameter Optimization Toolbox (SPOT), we demonstrate that integrating explanation stability into the optimization loop allows for the discovery of models that balance high performance with near-perfect explanation agreement. Our results on the California Housing dataset show that while a performance-consistency trade-off exists, models can be tuned to achieve significantly higher trustworthiness with minimal loss in accuracy.

Introduction

As AI systems are increasingly deployed in sensitive sectors like healthcare and finance, the "black box" nature of neural networks becomes a liability. While XAI techniques such as SHAP, Integrated Gradients, and DeepLIFT are used to provide transparency, they frequently suffer from a lack of consensus. Traditionally, interpretability is treated as a post-hoc evaluation metric. This paper argues that this approach is flawed: if a model's explanations are inconsistent across different methods, the model likely lacks a robust representation of the underlying data. We propose shifting XAI consistency from an afterthought to a core optimization objective during the model development phase.

Methodology

Quantifying XAI Consistency

To integrate interpretability into the optimization process, we define three metrics to measure agreement between XAI methods:

  • Sum of Maximum Absolute Differences: Identifies the peak disagreement for any individual feature.
  • Sum of Variances: Captures the aggregate disagreement across the entire feature set.
  • Mean Spearman Rank Correlation: Measures the alignment of feature importance rankings. This served as the primary metric for our experiments.

The Optimization Framework

We utilize the Sequential Parameter Optimization Toolbox (SPOT), a Python-based framework designed for surrogate-model-based optimization. This iterative process allows for efficient searching of the hyperparameter space by building and refining models of the objective function.

The surrogate-model-based optimization loop used to iteratively refine hyperparameters based on both performance and consistency objectives.

Multi-Objective Strategies

To navigate the trade-off between predictive error (Mean Squared Error) and XAI consistency, we compared two strategies:

  1. Weighted Aggregation: A linear combination of loss and consistency scores.
  2. Desirability Functions: A sophisticated mapping of disparate objectives onto a normalized 0–1 scale, providing granular control over the optimization priorities.

Experimental Results

The Interpretability-Performance Trade-off

Our analysis revealed three distinct regions in the hyperparameter search space:

  1. The Underperformer Zone: Characterized by both poor accuracy and low consistency.
  2. The Black Box Zone: High-accuracy models that exhibit extremely low XAI consistency, suggesting reliance on spurious correlations.
  3. The Trade-off Zone: A "sweet spot" where models maintain competitive accuracy while achieving high explanation stability.

Quantitative Improvements

By transitioning from standard loss-only tuning to multi-objective tuning, we observed a dramatic increase in XAI consistency on validation data, rising from 0.524 to 0.984. This near-perfect agreement indicates that the optimization successfully guided the model toward learning more stable representations. This gain in trust came with a manageable performance cost: the Mean Squared Error (MSE) on the test set increased from 0.266 (loss-only) to 0.346 (desirability-tuned).

Discussion and Future Work

While these results are promising, they are currently limited to regression tasks on the California Housing dataset. A key limitation is the "Ground Truth" problem: consistency between XAI methods does not inherently guarantee that the explanations are factually correct relative to the real world, only that the methods agree on the model's internal logic.

Future research will focus on testing this framework across more complex architectures (e.g., CNNs, Transformers) and diverse datasets. Furthermore, we hypothesize that models with high XAI consistency may exhibit superior generalization on out-of-distribution (OOD) data, as consistency may serve as a proxy for capturing true underlying data patterns rather than noise.

Conclusion

Tuning for trustworthiness represents a paradigm shift in neural network optimization. By treating XAI consistency as a first-class citizen in the hyperparameter search, we can move beyond "accuracy at all costs" toward AI systems that are both effective and reliably interpretable.

Summary updated

BibTeX
@misc{hinterleitner2025tuning,
  author = {Alexander Hinterleitner and Thomas Bartz-Beielstein},
  title = {{Tuning for Trustworthiness - Balancing Performance and Explanation Consistency in Neural Network Optimization}},
  year = {2025},
  eprint = {2505.07910},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.07910},
}
Figure