Sum-of-Parts: Self-Attributing Neural Networks with End-to-End Learning of Feature Groups

Weiqiu You, Helen Qu, Marco Gatti, Bhuvnesh Jain, Eric Wong · DOI

TL;DR

This paper introduces Sum-of-Parts (SOP), a novel framework that makes neural networks interpretable by learning to group features end-to-end. SOP achieves state-of-the-art performance on various tasks while providing human-understandable explanations, and demonstrates its utility in debugging models and aiding scientific discovery in cosmology.

What Problem Does This Paper Address?

Interpretable machine learning (ML) models are crucial in high-stakes domains like medicine and science, where trust in model decisions is paramount. Self-Attributing Neural Networks (SANNs) offer a path to interpretability by decomposing predictions into contributions from feature subsets. However, existing SANNs often face a performance trade-off, especially when dealing with correlated features in high-dimensional data. This paper addresses this limitation by proposing a new framework that learns feature groups automatically, overcoming the theoretical barriers that hinder previous SANN approaches.

Methods

The core contribution is the Sum-of-Parts (SOP) framework, which transforms any differentiable model into a group-based SANN. SOP consists of three main components:

  1. Group Generator ($\Gamma$): This learned module identifies feature groups for each input. It uses a multi-headed self-attention mechanism to assign scores to features and then binarizes these scores to form groups. This allows for dynamic, input-dependent group creation, unlike fixed groups (e.g., image patches).
  2. Backbone Predictor ($h$): This is a standard, potentially pre-trained, model that makes predictions using each identified feature group. The authors emphasize that SOP is model-agnostic, allowing the use of arbitrary backbones.
  3. Group Selector ($\Theta$): This module assigns weights (scores) to each learned group, indicating its contribution to the final prediction. It uses a sparse cross-attention mechanism to ensure that only a small, interpretable number of groups are selected.

The entire SOP framework is trained end-to-end using only the final prediction labels, without requiring explicit supervision for the feature groups themselves.

Datasets

The authors evaluate SOP on a variety of datasets:

  • ImageNet-S: For image classification, using ground-truth object segmentations for purity evaluation.
  • CosmoGrid: For cosmological image regression, predicting parameters related to the universe's initial state.
  • MultiRC: For text classification (reading comprehension), framed as a binary classification task.

Key Insights and Ideas

  • Theoretical Barrier for Per-Feature SANNs: The paper formally proves a lower bound on the error of SANNs that use individual features as interpretable atoms, especially when features are correlated. This highlights a fundamental limitation of such approaches.
  • Group-Based SANNs as a Solution: Conversely, the authors show that group-based SANNs can achieve zero error, provided the groups are well-chosen. This motivates the need for learning these groups.
  • End-to-End Learned Groups: SOP's key innovation is learning feature groups end-to-end without supervision. This allows the model to discover meaningful groupings that align with underlying data correlations, overcoming the limitations of fixed or pre-defined groups.
  • Model Agnosticism: SOP's ability to work with any differentiable backbone is a significant advantage, allowing it to leverage powerful pre-trained models.
  • Interpretability Beyond Performance: SOP not only achieves state-of-the-art performance but also provides interpretable explanations that are validated through quantitative metrics, semantic coherence, and even scientific discovery in cosmology.

Key Results

  • State-of-the-Art Performance: SOP achieves state-of-the-art performance among SANNs on vision and language tasks, outperforming 14 baselines on metrics like error, MSE, and IOU.
  • Faithfulness: SOP exhibits built-in faithfulness and performs strongly on classic faithfulness metrics like insertion and deletion.
  • Semantic Coherence: SOP learns semantically coherent groups, often more so than other SANNs, as demonstrated by visual examples and quantitative metrics.
  • Model Debugging: SOP explanations help identify undesirable model behaviors, such as over-reliance on background features.
  • Scientific Discovery: SOP was used in collaboration with cosmologists to uncover new insights about the relationship between cosmological structures (voids and clusters) and parameters like $\Omega_m$ and $\sigma_8$ from weak lensing maps.

Limitations and Future Work

  • Computational Cost: While SOP is efficient, some baselines require more computation. The paper notes that Archipelago-F, for instance, requires pairwise comparison.
  • Out-of-Distribution Data: The use of binary groups might create out-of-distribution data, though modern Transformers are noted to be less affected by this.
  • Cosmology Exploration: The authors suggest further exploration into how noise and measurement artifacts affect results in cosmology, and how to account for the fact that voids occupy larger areas than clusters.
  • Human Evaluation: While SOP performs well in human distinction tasks, there's no single absolute winner, and further human evaluation is suggested.

Summary updated

BibTeX
@inproceedings{you2025sum,
  author = {Weiqiu You and Helen Qu and Marco Gatti and Bhuvnesh Jain and Eric Wong},
  title = {{Sum-of-Parts: Self-Attributing Neural Networks with End-to-End Learning of Feature Groups}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=r6y9TEdLMh},
}
Figure