TraNCE: Transformative Nonlinear Concept Explainer for CNNs

Yongsheng Gao, Ugochukwu Ejike Akpudo, Yongsheng Gao 0001, Jun Zhou, Andrew Lewis

TL;DR

This paper introduces TraNCE, a novel framework for explaining Convolutional Neural Networks (CNNs) by automatically discovering and visualizing meaningful concepts. Unlike previous methods that assume linear relationships within CNN activations, TraNCE uses a non-linear approach to capture intricate patterns, leading to more accurate and human-understandable explanations. It also introduces a new metric, the "Faith score," to comprehensively evaluate the trustworthiness of these explanations.

What Problem Does This Paper Address?

Convolutional Neural Networks (CNNs) have revolutionized computer vision, but their "black box" nature makes it difficult to understand why they make certain predictions. While existing methods can highlight where a CNN looks (feature visualization) or what it sees (concept-based explanations), they often struggle with:

  • Linearity Assumption: Many concept-based explainers assume that image activations can be linearly reconstructed, failing to capture complex, non-linear relationships within these activations. This can lead to incomplete or inaccurate concept discovery.
  • Fidelity-Only Evaluation: Current methods often rely solely on "Fidelity" (how well a concept prediction matches the input) to evaluate explanations. This overlooks "Coherence" (how consistent explanations are across different views of the same concept), leading to a potentially misleading assessment of trustworthiness.
  • Ambiguous/Duplicate Concepts: Existing methods can sometimes produce redundant or unclear concepts, making it hard for humans to interpret the CNN's reasoning.

TraNCE aims to address these limitations by providing a more robust, non-linear approach to concept discovery and a more comprehensive evaluation metric.

Methods

TraNCE introduces a three-pronged approach:

  1. Non-linear Concept Discovery with VAEs: Instead of linear decomposition, TraNCE employs a Variational Autoencoder (VAE) to learn a non-linear representation of CNN activations. The VAE's encoder maps high-dimensional feature maps to a lower-dimensional latent space, capturing intricate relationships. The decoder then reconstructs these activations, allowing for the discovery of meaningful concepts.
  2. Bessel Function for Smooth Visualization: To visualize discovered concepts, TraNCE uses Bessel functions. This technique creates smooth transitions between highlighted image regions, revealing not only what the CNN focused on but also what it avoided, leading to more intuitive and less ambiguous concept representations. Prototypes for each concept are selected using an MMD-critic to ensure they faithfully represent the concept.
  3. Faith Score for Comprehensive Evaluation: TraNCE introduces a novel "Faith score" that combines "Coherence" (consistency of concept explanations) and "Fidelity" (agreement with input predictions). This dual metric provides a more holistic and reliable assessment of an explainer's trustworthiness, mitigating the weaknesses of relying on either metric alone.

Datasets

The paper uses publicly available datasets for training and evaluation, specifically mentioning:

  • ILSVRC2012: A large-scale image dataset commonly used for benchmarking computer vision models. The experiments utilize pre-trained CNN models (ResNet, ResNeXt, InceptionV3) trained on this dataset.

Key Insights and Ideas

  • Non-linearity is Crucial: The paper strongly argues that assuming linear reconstructability of CNN activations is insufficient. Capturing non-linear relationships is key to discovering truly meaningful concepts.
  • Coherence Matters as Much as Fidelity: Explanations can be accurate (high Fidelity) but inconsistent (low Coherence), or vice versa. The Faith score highlights that true trustworthiness lies in a balance of both.
  • Smooth Visualizations Enhance Understanding: Using Bessel functions for visualization provides a more nuanced view than simple thresholding, helping to avoid ambiguous or duplicate concepts.
  • Deeper Layers Yield Better Concepts: Features extracted from deeper layers of CNNs are more discriminative and lead to higher quality concepts.

Key Results

  • Improved Faithfulness: TraNCE consistently achieves higher Faith scores compared to existing concept-based and attribution-based explanation methods across various CNN architectures and datasets. For example, Faith scores for TraNCE often exceed 95%, with Coherence scores frequently reaching near 100%.
  • Robustness to Transformations: TraNCE demonstrates resilience to image transformations like noise, rotation, and warping, indicating its stability and reliability.
  • Human-Understandable Concepts: The visualizations produced by TraNCE are described as more intuitive and less ambiguous, aiding human comprehension of CNN decisions.
  • Efficiency: While VAEs can be computationally intensive, the paper suggests that the trained explainer can be reused for inference, making it efficient for practical applications.

Limitations and Future Work

  • Computational Cost: The use of VAEs can be computationally expensive, although the paper argues this is a worthwhile trade-off for improved explanation quality.
  • Hyperparameter Sensitivity: VAEs can be sensitive to hyperparameter choices, particularly the dimensionality of the latent space, potentially requiring expert knowledge for optimal tuning.
  • Inter-Class Similarity: For classes with high inter-class similarity (e.g., Eagle and Macaw), TraNCE might still discover duplicate or ambiguous concepts, suggesting a need for improved CNN discriminative power or contrasting concept paradigms.
  • Transformer Architectures: The suitability of TraNCE for transformer models, which process data differently than CNNs, remains an open research question.
  • Broader Applications: The authors suggest exploring TraNCE's potential for video classification and incorporating more sophisticated methods for identifying contrasting concepts.

Summary updated

BibTeX
@article{gao2025trance,
  author = {Yongsheng Gao and Ugochukwu Ejike Akpudo and Yongsheng Gao and Jun Zhou and Andrew Lewis},
  title = {{TraNCE: Transformative Nonlinear Concept Explainer for CNNs}},
  journal = {IEEE TNNLS},
  year = {2025},
  doi = {10.1109/tnnls.2025.3556019},
}
Figure