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

Here is a blog-style summary of the paper "Sum-of-Parts: Self-Attributing Neural Networks with End-to-End Learning of Feature Groups".

TL;DR

The paper introduces Sum-of-Parts (SOP), a model-agnostic framework that transforms any differentiable neural network into an inherently interpretable "Self-Attributing Neural Network" (SANN). By formally proving that traditional per-feature interpretability methods fail exponentially in high dimensions, the authors show that learning groups of features end-to-end allows SOP to achieve state-of-the-art performance without sacrificing accuracy for explainability.

What Problem Does This Paper Address?

Deep learning models are notoriously opaque, creating a major hurdle for high-stakes fields like medicine and cosmology where trust and validation are paramount. Self-Attributing Neural Networks (SANNs) attempt to solve this by making predictions via a linear combination of input features, offering "faithful-by-construction" explanations.

However, existing SANNs face a harsh trade-off: they usually suffer from poor predictive performance. The authors diagnose the root cause of this issue. They formally prove that per-feature SANNs (which look at individual pixels or tokens) face a theoretical error lower bound that grows exponentially with the number of feature dimensions when data features are highly correlated.

Figure 2. Errors for per-feature SANNs grow fast unavoidably. The minimum (a) total insertion error of monomials of size d and (b) total deletion errors of binomials of size d are the minima over all possible per-feature self-explaining models. The dots are the lower bounds computed by the solver, while the line is a best-fit exponential function.

To bypass this mathematical barrier, models must look at groups of features rather than individual ones. Yet, prior group-based methods relied on rigid, predefined structures (like fixed image patches) that fail to capture the true underlying correlations of complex data.

Methods

The authors propose Sum-of-Parts (SOP), a flexible framework that can wrap around any pre-trained, differentiable backbone model and convert it into a group-based SANN.

As shown in Figure 1, the SOP architecture consists of three core components:

  1. Group Generator ($\Gamma$): Uses a multi-headed self-attention mechanism to dynamically generate $m$ binary feature group masks ($g_1, ..., g_m$) from the input. It groups correlated features together (e.g., segmenting an object out of an image) without needing explicit group labels.
  2. Backbone Predictor ($h$): A frozen, high-performing pre-trained model (like a ViT or BERT) that evaluates each masked feature group independently.
  3. Group Selector ($\theta$): Uses a sparse cross-attention mechanism (specifically the sparsemax operator) to assign an importance score ($c_i$) to each group.

The final prediction is a simple linear aggregation of the weighted group predictions: $$f(x) = \sum_{i=1}^{m} c_i \cdot h(g_i \odot x)$$

To train this end-to-end despite the non-differentiable nature of binary masks, the authors introduce a clever gradient-passing scaling factor based on continuous attention weights.

Figure 1. Sum-of-Parts (SOP) linearly aggregates outputs from multiple feature groups. This maintains performance while en- suring interpretability. SOP first generates groups using a group generator Γ, predicts with a pre-trained backbone h, and aggre- gates the group predictions with a group selector θ.

Datasets

SOP was evaluated across diverse vision and language tasks using the following benchmarks:

  • ImageNet-S: Used for image classification and semantic interpretability validation, utilizing a Vision Transformer (ViT) backbone.
  • CosmoGrid: A cosmological image regression dataset used to predict parameters related to the universe's initial state ($\Omega_m$ and $\sigma_8$) using a CNN backbone.
  • MultiRC: A reading comprehension dataset from the ERASER benchmark, adapted for text classification using a BERT backbone.

Key Insights and Ideas

  • The Power of Groups: The authors prove that while per-feature models fail on correlated data, a group-based SANN requires at most $m$ groups (where $m$ is the number of terms in a polynomial) to achieve zero insertion and deletion error. Alignment between feature groups and data correlations is the secret to high performance.
  • No Information Leakage: A common failure mode in interpretable architectures is that the mask generator itself encodes the label, rendering the rest of the network's logic meaningless. The authors used probing models to show that SOP's group masks yield near-random accuracy on their own, proving that the explanation mechanism remains uncompromised.
Figure 4. (ImageNet Group Probing Accuracy) The powerful group generator in SOP is not doing all the work and not com- promising SOP’s interpretability. A CNN model trained on group masks from SOP is unable to obtain accuracies more than random (0.1% accuracy), while MFABA-F, AMPE-F, IG-F etc. do. RISE and Archipelago is omitted for the significant computational cost. Results for linear and ViT probing models are in Appendix C.4.5.

Key Results

  • State-of-the-Art Performance: SOP consistently achieved the lowest error rates and highest semantic coherence (measured via IoU and purity metrics) compared to 14 baseline methods across all three datasets. For instance, on ImageNet-S, SOP achieved an error rate of 0.267 and an IoU of 0.630, vastly outperforming other self-attributing baselines.
  • Robustness to Sparsity: Sparser explanations are easier for humans to digest. SOP maintains low error rates even when forced to use highly sparse feature groups at inference time.
Figure 3. (ImageNet Sparsity vs. Error ↓) We report how error increases when sparsity increases (fewer input features are included in each group), where SOP’s slowest increase is the most desired.
  • Real-World Utility: In cosmological applications, SOP successfully identified meaningful physical structures—specifically "voids" (under-dense regions) and "clusters" (high-density regions)—and revealed that the model relies significantly more on voids when predicting the matter density parameter ($\Omega_m$).

Limitations and Future Work

While SOP marks a significant advancement, the authors note a few areas for future exploration:

  1. Real-world Data Noise: Evaluating how SOP handles realistic cosmological data that includes noise and measurement artifacts.
  2. Complex Structures: Exploring the role of "super-clusters" (structures containing multiple clusters) in model predictions.
  3. Spatial Imbalances: Accounting for the fact that voids naturally occupy much larger areas of the sky than clusters, which might inherently bias the model's focus.

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