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.
