[Paper Review] B-cos Alignment for Inherently Interpretable CNNs and Vision Transformers
This paper introduces the B-cos transformation, a drop-in replacement for linear layers in CNNs and Vision Transformers that promotes weight-input alignment during training, resulting in inherently interpretable models. The method enables faithful, human-interpretable explanations via a single linear transformation summarizing the entire network, achieving state-of-the-art explanation quality while maintaining ImageNet top-1 accuracy above 80%.
We present a new direction for increasing the interpretability of deep neural networks (DNNs) by promoting weight-input alignment during training. For this, we propose to replace the linear transformations in DNNs by our novel B-cos transformation. As we show, a sequence (network) of such transformations induces a single linear transformation that faithfully summarises the full model computations. Moreover, the B-cos transformation is designed such that the weights align with relevant signals during optimisation. As a result, those induced linear transformations become highly interpretable and highlight task-relevant features. Importantly, the B-cos transformation is designed to be compatible with existing architectures and we show that it can easily be integrated into virtually all of the latest state of the art models for computer vision - e.g. ResNets, DenseNets, ConvNext models, as well as Vision Transformers - by combining the B-cos-based explanations with normalisation and attention layers, all whilst maintaining similar accuracy on ImageNet. Finally, we show that the resulting explanations are of high visual quality and perform well under quantitative interpretability metrics.
Motivation & Objective
- To address the challenge of making deep neural networks inherently interpretable without relying on post-hoc explanation methods.
- To design a neural network layer that promotes alignment between network weights and task-relevant input signals during training.
- To ensure that the resulting model explanations are both faithful summaries of internal computations and visually interpretable to humans.
- To maintain high model accuracy while significantly improving the interpretability of both convolutional and attention-based architectures.
Proposed method
- Proposes the B-cos transformation as a novel alternative to standard linear transformations, designed to induce input-dependent, weight-input alignment during optimization.
- The B-cos transformation ensures that any sequence of such layers can be summarized by a single linear transformation that faithfully reflects the model’s internal computation for a given input.
- The method explicitly avoids explicit bias terms (b(x) = 0) to prevent spurious edge or corner artifacts in explanations, improving interpretability.
- Integrates B-cos layers with batch normalization and attention mechanisms by modifying the optimization objective to preserve interpretability while maintaining training stability.
- Employs a modified cross-entropy loss with reparameterized target encoding to encourage models to use object features for positive class scores, reducing reliance on negative bias corrections.
- Uses mean-corrected logits and explanations to evaluate and improve the specificity and human interpretability of the model outputs.
Experimental results
Research questions
- RQ1Can a modified linear transformation be designed to inherently produce interpretable, faithful explanations without post-hoc methods?
- RQ2How can weight-input alignment be promoted during training to make model representations more interpretable?
- RQ3To what extent can the B-cos transformation be integrated into modern architectures like ResNets, DenseNets, ConvNeXt, and Vision Transformers while preserving accuracy?
- RQ4Does the use of B-cos layers improve both qualitative and quantitative interpretability metrics compared to standard models and existing explanation methods?
- RQ5Can the optimization objective be restructured to prevent models from relying on spurious features (e.g., image edges) for bias computation, thus improving explanation clarity?
Key findings
- B-cos networks achieve over 80% top-1 accuracy on ImageNet across multiple architectures, including ResNets, DenseNets, ConvNeXt, and Vision Transformers, with only minor performance drops compared to standard models.
- The B-cos explanations are qualitatively superior, clearly highlighting task-relevant features such as object parts, and outperform existing explanation methods in visual quality and interpretability metrics.
- Mean-corrected explanations (E’) reveal that models trained with standard BCE loss often use image edges for positive bias across all classes, which is mitigated by redefining the optimization target to focus on positive evidence.
- The proposed optimization modification—redefining target encoding—results in explanations that are sharply focused on the object of interest, confirming that model design and optimization jointly shape interpretability.
- The B-cos framework is compatible with normalization layers and attention mechanisms, enabling its use in state-of-the-art models without sacrificing interpretability or performance.
- Even a B-cos-only CNN without non-linearities, normalization, or regularization achieves competitive performance on CIFAR-10, demonstrating the modeling capacity of the B-cos transformation alone.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.