Table of Contents
Fetching ...

Towards Explaining Hypercomplex Neural Networks

Eleonora Lopez, Eleonora Grassucci, Debora Capriotti, Danilo Comminiello

TL;DR

The paper addresses the explainability gap in hypercomplex neural networks by introducing the PHB-cos transform, an inherently interpretable mechanism defined in the parameterized hypercomplex domain. This transform aligns weights with input patterns and collapses the network into a single linear form, enabling direct interpretation without post-hoc methods, and extends to quaternion-like architectures. Empirical results on Imagenette and Kvasir show that PHBNNs with PHB-cos maintain competitive performance while delivering sharper, more faithful explanations than post-hoc baselines, with qualitative and quantitative analyses highlighting the networks’ focus on object shapes and surrounding context. The work advances practical interpretability for hypercomplex models and suggests avenues for analyzing global/local relational learning and multi-view extensions.

Abstract

Hypercomplex neural networks are gaining increasing interest in the deep learning community. The attention directed towards hypercomplex models originates from several aspects, spanning from purely theoretical and mathematical characteristics to the practical advantage of lightweight models over conventional networks, and their unique properties to capture both global and local relations. In particular, a branch of these architectures, parameterized hypercomplex neural networks (PHNNs), has also gained popularity due to their versatility across a multitude of application domains. Nonetheless, only few attempts have been made to explain or interpret their intricacies. In this paper, we propose inherently interpretable PHNNs and quaternion-like networks, thus without the need for any post-hoc method. To achieve this, we define a type of cosine-similarity transform within the parameterized hypercomplex domain. This PHB-cos transform induces weight alignment with relevant input features and allows to reduce the model into a single linear transform, rendering it directly interpretable. In this work, we start to draw insights into how this unique branch of neural models operates. We observe that hypercomplex networks exhibit a tendency to concentrate on the shape around the main object of interest, in addition to the shape of the object itself. We provide a thorough analysis, studying single neurons of different layers and comparing them against how real-valued networks learn. The code of the paper is available at https://github.com/ispamm/HxAI.

Towards Explaining Hypercomplex Neural Networks

TL;DR

The paper addresses the explainability gap in hypercomplex neural networks by introducing the PHB-cos transform, an inherently interpretable mechanism defined in the parameterized hypercomplex domain. This transform aligns weights with input patterns and collapses the network into a single linear form, enabling direct interpretation without post-hoc methods, and extends to quaternion-like architectures. Empirical results on Imagenette and Kvasir show that PHBNNs with PHB-cos maintain competitive performance while delivering sharper, more faithful explanations than post-hoc baselines, with qualitative and quantitative analyses highlighting the networks’ focus on object shapes and surrounding context. The work advances practical interpretability for hypercomplex models and suggests avenues for analyzing global/local relational learning and multi-view extensions.

Abstract

Hypercomplex neural networks are gaining increasing interest in the deep learning community. The attention directed towards hypercomplex models originates from several aspects, spanning from purely theoretical and mathematical characteristics to the practical advantage of lightweight models over conventional networks, and their unique properties to capture both global and local relations. In particular, a branch of these architectures, parameterized hypercomplex neural networks (PHNNs), has also gained popularity due to their versatility across a multitude of application domains. Nonetheless, only few attempts have been made to explain or interpret their intricacies. In this paper, we propose inherently interpretable PHNNs and quaternion-like networks, thus without the need for any post-hoc method. To achieve this, we define a type of cosine-similarity transform within the parameterized hypercomplex domain. This PHB-cos transform induces weight alignment with relevant input features and allows to reduce the model into a single linear transform, rendering it directly interpretable. In this work, we start to draw insights into how this unique branch of neural models operates. We observe that hypercomplex networks exhibit a tendency to concentrate on the shape around the main object of interest, in addition to the shape of the object itself. We provide a thorough analysis, studying single neurons of different layers and comparing them against how real-valued networks learn. The code of the paper is available at https://github.com/ispamm/HxAI.
Paper Structure (16 sections, 11 equations, 5 figures, 1 table)

This paper contains 16 sections, 11 equations, 5 figures, 1 table.

Figures (5)

  • Figure 1: Explanations of standard B-cos networks and PHB-cos networks with $n=6$, with the original sample displayed on top of the maps. The explanations are for the class corresponding to the input image following \ref{['eq:collapsed']}.
  • Figure 2: Explanations of single neurons from different layers, displaying a variety of encoded concepts. In detail, for each neuron, we display three images among those contributing to the highest activations. For every image, in correspondence to the highest activating portion, the associated explanation is depicted.
  • Figure 3: Input images of Kvasir dataset corresponding to different categories (top row) and corresponding class explanations given by the different tested architectures (other rows). Bounding boxes indicate the ROI.
  • Figure 4: Original input images of Imagenette (top row) and explanations given by the PHB-cos inherent method as well as post-hoc methods applied on PHB-cos with $n=6$, except for CRP which is applied on a PHResNet50 with $n=3$ and a ResNet50 (real) trained on ImageNet.
  • Figure 5: Localization accuracy computed with the grid pointing game for inherent explanations given by PHB-cos with $n=6$ as well as post-hoc methods LIME and GradCam.