REM: Routing Entropy Minimization for Capsule Networks
Authors: Riccardo Renzulli
Enzo Tartaglione
Marco Grangetto
Venue: Submitted to ICLR 2023 (2023)
Keywords: capsule networks
deep learning
entropy
parse tree
routing

Abstract: Capsule Networks aim to build an interpretable and biologically-inspired neural network model. One of their main innovations relies on the routing mechanism which extracts a parse tree: its main purpose is to explicitly build relationships between capsules.
However, their true potential has not surfaced yet: these relationships are extremely heterogeneous and difficult to understand, as the intra-class extracted parse trees are very different from each other. A school of thoughts, giving-up on this side, propose less interpretable versions of Capsule Networks without routing.
This paper proposes REM, a technique which minimizes the entropy of the parse tree-like structure. We accomplish this by driving the model parameters distribution towards low entropy configurations, using a pruning mechanism as a proxy. 
Thanks to REM, we generate a significantly lower number of parse trees, with essentially no performance loss, showing also that Capsule Networks build stronger and more stable relationships between capsules.

Under review as a conference paper at ICLR 2023
REM: ROUTING ENTROPY MINIMIZATION FOR CAPSULE NETWORKS
Anonymous authors Paper under double-blind review
ABSTRACT
Capsule Networks are biologically-insirre. neural network models, but their in- terpretability still need to be further investigated. One of their main innovations relies on the routing mechanism which extracts a parse tree: its main purpose is to explicitly build relationships between capsules. However, their true potential has not surfaced yet: these relationships are extremely heterogeneous and difficult to understand, the intra-class extracted parse trees are very different from each other. school of thoughts, giving-up on this side, propose less interpretable ver- sions of Capsule Networks without routing. This paper proposes REM, a technique which minimizes the entropy of the parse tree-like structure. We accomplish this by driving the model parameters distribution towards low entropy configurations, using a pruning mechanism as a proxy. Thanks to REM, we generate a signifi- cantly lower number of parse trees, with essentially performance loss, showing also that Capsule Networks build stronger and more stable relationships between capsules.
INTRODUCTION
Capsule Networks (CapsNets) (Sabour et al. 2017: Hinton et al. 2018 Kosiorek et al. 2019 were recently introduced to overcome the shortcomings of Convolutional Neural Networks (CNNs). CNNs loose the spatial relationships between its parts because of max pooling layers, which progressively drop spatial information (Sabour et al., 2017). Furthermore. CNNs are also commonly known as "black-box" models: most of the techniques providing interpretation over the model are post-hoc: they produce localized maps that highlight important regions in the image for predicting objects (Selvaraju et (0l,). CapsNets attempt to preserve and leverage an image representation as a hierarchy of parts, carving-out parse tree from the networks. This possible thanks to the iterative routing mechanism (Sabour et al., 2017) which models the connections between capsules. This can be seen as parallel attention mechanism, where each active capsule can choose a capsule in the layer above to be its parent in the tree (Sabour et al. 2017). Therefore, CapsNets can produce interpretable representations encoded in the architecture itself (Sabour et al. (017)) yet can be still successfully applied to number of applicative tasks (Zhao et al. [019 Paoletti al. 2018 Afshar et al.) 2018).
However, understanding what really happens inside a CapsNet is still an open challenge. For a given input image, there too many active co-coupled capsules, making the routing algorithm connections still difficult to understand, as the coupling coefficients typically have similar values, not exploiting the routing algorithm potential (Gu & Tresp, 2020). On the other hand, we would like for a given image to activate stronger and fewer connections between capsules, so that understanding and interpreting the parts-whole relationships a more straightforward process. To encourage this, we impose sparsity and entropy constraints. Furthermore, backward and forward passes of CapsNet come at an enormous computational cost, since the number of trainable parameters is very high. For example, the CapsNet model deployed on the MNIST dataset by [Sabour et al. (2017) is composed by an encoder and a decoder part. The full architecture has 8. 2. of parameters. Do we really need such an amount of trainable parameters to achieve competitive results on such task? Recently, many pruning methods were applied to CNNs in order to reduce the complexity of the networks, enforcing sparse topologies (Tartaglione et al.; 2018 Molchanov et al.] 2017 Louizos et al.) 2018): is it possible to tailor one of these approaches with not only the purpose of lowering the parameters, but aiding the model's 's interpretability?

---

Under review as a conference paper at ICLR 2023
This work introduces REM (Routing Entropy Minimization) for CapsNets, which moves some steps towards the interpretabilityy of the routing algorithm of CapsNets. Pruming can effectively reduce the overall entropy of the connections of the parse tree-like structure encoded in CapsNet, because in low pruning regimes it removes noisy couplings which cause the entropy to increase considerably. We collect the coupling coefficients studying their frequency and cardinality, observing lower intra-class conditional entropy: the pruned version adds missing explicit prior in the routing mechanism, grounding the coupling of the unused primary capsules disallowing fluctuations under the same baseline performance on the validation/test set. This implies that the parse trees are significantly less, hence more stable for the pruned models.
The rest of the paper is organized as follows: in Section 2 we introduce some of the basic concepts of CapsNets and their related works, in Section we describe our technique called REM, in Section we investigate the effectiveness of our method by testing it many datasets and finally we discuss the conclusion of our work.
BACKGROUND AND RELATED WORK
This section first describes the fundamental aspects of CapsNets and their routing algorithm introduced by Sabour al. 2017). Then, we review the literature especially related to sparsity in CapsNets.
Capsule Networks Fundamentals. CapsNets group neurons into capsules, namely activity vectors, where each capsule accounts for an object of one of its parts. Each element of these vectors accounts for different properties of the object such as its pose and other properties like color, deformation, etc. The magnitude of capsule stands for the probability of existence of that object in the image. Typically, a CapsNet is composed by at least two capsule layers, called PrimaryCaps and DigitCaps (also called OutputCaps), with total of I and J capsules respectively. The poses of L-th capsules us called primary capsules, are built upon convolutional layers. In order to compute the poses of the capsules of the next layer L an iterative routing mechanism is performed. Each capsule u; makes a prediction Uززt thanks to transformation matrix Waj, for the pose of an upper layer capsule j
ر = W u.
Then, the total input 8j of capsule j of the DigitCaps layer is computed as the weighted average of votes u
8j Σ ci Uززز
(2)
where Gj are the coupling coefficients between primary capsule i and an output capsule j. The pose wy of an output capsule j is then defined as the normalized "squashed" s,
|
8j
V = squash(s,) = 1
(3)
|
2
||8
So the routing algorithm computes the poses of output capsules and the connections between capsules of consecutive layers. The coupling coefficients computed dynamically by the routing algorithm and they are dependent on the input. The coupling coefficients are determined by a "routing softmax"
activation function, whose initial logits bij are the log prior probabilities the i-th capsule should be coupled to the j-th one
Chij
Cz3 softmax(bry)
= Eeeba
(4)
At the first step of the routing algorithm they equals and then they are refined by measuring the agreement between the output v, of the j-th capsule and the prediction úززة for a given input. The agreement is defined the scalar product asj Uj úzbü- At each iteration, the update rule for the logits is
bij bij + 0zj-
The steps defined in equation 2 equation B equation 4 equation | are repeated for the t iterations of the routing algorithm. The cross entropy loss is replaced with the margin loss.
2

---

Under review as a conference paper at ICLR 2023
Capsule Networks Literature. Capsule Networks were first introduced by Sabour et al. (0117 and since then a lot of work has been done, both to improve the routing mechanism and to build deeper models. Regarding the routing algorithm. [Hinton et al. (2018) replace the dynamic routing with Expectation-Maxiniaaai (2018) model the routing strategy as an optimization problem. [Li al. (2018) use master and aide branches to reduce the complexity of the routing process. Peer ct al. 2018) use inverse distances instead of the dot product to compute the agreements between capsules increase their transparency and robustness against adversarial attacks. HHan et al. (2019) incorporates a self-routing method such that capsule models do not require agreements anymore. De Sousa Ribeiro et al. (2020) replace
adopting matrix capsules instead of vector capsules. Wang & Liu
the routing algorithm with variational inference of part-object connections in probabilistic capsule network, leading to a significant speedup without sacrificing performance. |Ribeiro et al. (2020)
propose a new routing algorithm derived from Variational Bayes for fitting mixture of transtorming gaussians. Edraki et al. (2020) model entities through a group of capsule subspaces, without any form of routing. Since the CapsNet model introduced by /Sabour et al. (2017) is a shallow network, several works attempted to build deep Caps Rajasegaran et (2019) propose a deep capsule network architecture which uses novel 3D convolution based dynamic routing algorithm aimed at improving the performance of CapsNets for more complex image datasets. Gugglberger et al. (2021) introduce residual connections to train deeper capsule networks.
Sparse Capsule Networks. A naive solution to reduce uncertainty within the routing algorithm is to simply run more iterations. As shown by Paik et al. (2019) and Gu & Tresp Tresp](2020), the routing algorithms tends to overly polarize the link strengths, namely simple route in which each input capsule sends its output to only one capsule and all other routes are suppressed. On the one hand, this behavior is desirable because it makes the routing algorithm more interpretable, by making it possible to extract a parse tree thanks to this coupling coefficients. On the other hand, running many iterations is only useful in the case of networks with few parameters, demonstrated by Renzulli et al. (202T), otherwise the performance will drop. Rawlinson et al. (2018) trained CapsNets in an unsupervised setting, showing that the routing algorithm does not discriminate among capsule anymore: the coupling coefficients collapse to the same value. Therefore, they sparsify latent capsule layers activities by masking output capsules according custom ranking function. Kosiorek et al. (2019) impose sparsity and entropy constraints into capsules, but they do not employ an iterative routing mechanism. [Jeong et al. (2019) introduced structured pruning layer called ladder capsule layers, which removes irrelevant capsules, namely capsules with low activities. Kakillioglu et al. (2020) solve the task of 3D object classification on point clouds with pruned Capsule Networks. Their objective was to compress robust capsule models in order to deploy them on resource-constrainee devices.
The main contribution of our work relies on the fact that we regularize and prune the parameters in a CapsNet as way to minimize the entropy of the connections computed by the routing algorithm. In fact, we show that relationships between objects and their parts in a standard CapsNets described by Sabour et al. (2017) have high entropies. We minimize these so that we can extract fewer parse trees. This allows to effectively build dictionaries upon the input datasets and understand which are the shared object parts and transformations between different entities the images.
ROUTING ENTROPY MINIMIZATION
The coupling coefficients computed by the routing mechanism model the part-whole relationships between capsules of two consecutive capsule layers. Assigning parts to objects (namely learning how each object is composed), extract a parse tree of these relationships. Given the ξ-th input of class j. an ideal parse tree for primary capsule detecting one of the parts of the entity in the input & would ideally lead to
a challenging task. One of the main goals of the routing algorithm is to
1gg,
=
where 1gs is the one-hot encoding for the target class F of the Ç-th sample. This means that the routing process is able to carve a parse tree out of the CapsNet which explains perfectly the relationships between parts and wholes. One of the problems of this routing procedure is that there is no constraint how many parse trees should be. In this section present our technique REM, first showing how to extract parse tree and then how to extract fewer parse trees. The pipeline of our method is depicted in Figure T
3

---

Under review as a conference paper at ICLR 2023
Test set (inference)
Training set
Classes
Keys
Counts
Learning stage (1 epoch)
Sy
Quantization stage
Plateau (val loss)
YES
M
Pruning stage
Dictionary
of parse
Validation
Pipeline of REM. After training is concluded, the coupling coefficients of the CapsNet are quantized, and the obtained parse trees are collected in dictionary.
Figure 1:
3.1 PARSE TREES EXTRACTION
Once we have a trained CapsNets model, in order to interpret the routing mechanism, we extract all the possible routing coupling coefficients and build parse tree. Towards this end, want define a metric which helps us deciding if the relationships captured by the routing algorithm resemble parse or not. Therefore, we organize the coupling coefficients into associative arrays that can compute the number of occurrences of each coupling sequence in order to measure the entropy of the whole dictionary. We refer to this entropy the simplicity of the parse tree. In other words, we refer to the number of keys in the dictionary as the number of unique parse trees that can be carved-out from the input dataset. In the next paragraphs, we explain how to generate these sequences by discretizing the coupling coefficients and how to create the dictionary.
Quantization. During the quantization stage, we first compute the continuous coupling coefficients cj for each 5-th input example. It should be noticed that these are the coupling coefficients obtained after the forward pass of the last routing iteration. Then, quantize them into K discrete levels through the uniform quantizer qK (+), obtaining
if 9K (c(c)))
We choose the lowest K such that the accuracy is not deteriorated. We will here on refer to CapsNet+Q trained CapsNet where the coupling coefficients quantized.
Parse tree extraction. Given the quantized coupling coefficients of a CapsNet+Q, we can extract the parse tree (and create dictionary of parse trees) for each class j. where each entry is string composed by the quantization indices of the coupling coefficients. We will extract the coupling coefficients of between the primary capsules 1 and the predicted j-th output capsule. Given a dictionary for the coupling coefficients a CapsNet+Q. we can compute the entropy for each class as
H2 = v j) loga p g o==m} =
())i is the frequency occurrences of generic string for each predicted class yf. Finally, the entropy of a dictionary for CapsNet+ on given dataset is the average of the entropies H, of each class
where P(es.; g8 j)
H プ Σ H
Σ
Intuitively, the lower equation 9 the fewer the number of parse trees carved-out from the routing algorithm. We also target to obtain the distribution of these coupling coefficients. In general, we know that with E being the cardinality of the dataset, we have E x 7 coupling coefficients for the full dataset (with potential redundancies). Given the i-th primary capsule, however, interested to et, f j. In this way, reduce the coupling coefficients space x J. We compute then the average of all the inputs belonging to an object class in order to output just x J coupling coefficients.
are only
4

---

Under review as a conference paper at ICLR 2023
3.2 UNCONSTRAINED ROUTING ENTROPY
In this subsection we are going to more-formally analyze the distribution of the coupling coefficients
ebst Eim vju, Way
(10)
Σn ci +E og Wix
where indicates the target routing iterations as we saw also in Section 3.1 we have
Let us evaluate the cūj over a non-yet trained model:
Cij R J Vi,j.
(11)
When updating the parameters, following Gu & Tresp (2020), we have
Oc
ac Ou; Soj 0s;
M
dL 0vm
Ocam
Ci
Amml
u;
(12)
i
Bo Osm
am
where we can have the gradient for Wij R potentially-high number of scenarios, despite Cij # {0, 1}. Let us analyze the simple case in which we have perfect outputs, matching the ground
truth, hence we are close to a local (or potentially the global) minimum of the loss function:
ac
x 0 Vm.
(13)
2
Looking at equation 4 we see that the right class is chosen, but given the squashing function, we have as an explicit constraint that, given the j-th class as the target one, we require
||اl||2
>>
|
Vm + j
(14)
on the W iy. which can be accomplished in many ways, including:
having sparse activation for the primary capsules uy; in this case, we have constant W (typically associated to no-routing based approaches); however, we need heavier deep neural networks as they have to force sparse signals already at the output of the primary capsules. In this case, the coupling coefficients Cjj are also constant by definition;
having sparse votes u this is combination of having both primary capsules and weights Wiy enforcing sparsity in the votes, and the typical scenario with many routing iterations.
Having sparse votes, however, does not necessarily result in having sparse coupling coefficients: according to equation[5] the coupling coefficients are multiplied with the votes, obtaining the output capsules. The distribution of the coupling coefficients requires equation [4] to be satisfied only: Wij is not sparsely distributed, we can still have sparse votes. However, this is the main reason we observe high entropy the coupling coefficient distributions: as the votes ūzJe are implicitly sparse (yet also disordered, as we are not explicitly imposing any structure in the coupling coefficients distribution), the model is still able to learn but it finds a typical solution where Gij are not sparse. However, we would like to have sparsely distributed, recurrent couplings to the same j-th output caps c-j. establishing stable relationships between the features extracted at primary capsules layer.
Minimizing explicitly the entropy term equation g is intractable problem due to the non- differentiability of the entropy term and of the quantization step (in our considered setup) and due the huge computational complexity be introduced at training time. Hence, to implicitly enforce routing entropy minimization by forcing sparse and organized structure in the coupling coefficients. Towards this end, one efficient solution to enforee sparsity in the Wa; representation by compelling vote between the i-th primary capsule and the j-th output caps to be exactly zero for any input, according to equation 10
try
Cjj Ee elu Di W.."
(15)
In this way, having a lower variability in the Cij values (and hence building more stable relationships between primary and output capsules), straightforwardly we are also explicitly minimizing the entropy of the quantized representations for the coupling coefficients. In the next subsection, we are going to tailor a sparsity technique to accomplish such goal.
for abuse of notation, in this subsection we suppress the index E
5

---

Under review as a conference paper at ICLR 2023
3.3 ENFORCING REM WITH PRUNING
CapsNets are trained via standard back-propesd propagation learning, minimizing some loss function like margin loss. Our ultimate goal is to assess to what extent a variation of the value of some parameter would affect the error on the network output. In particular, the parameters not affecting the network output can be pushed to zero a soft manner, meaning that we can apply an T.2 penalty term. num- ber of approaches have been proposed, especially in the recent years (Louizos et al. 2017 Molchanno 2019; Lee et al. 2018). One recent state-of-the-art approach, LOBSTER (Tartaglione et al.
ct al.
2022
proposes to penalize ize the parameters by their gradient-weighter L norm, leading to the update
rule
ac 000
ac 00
0 =0¹
nG
X0'ReLU
1
(16)
where G 0C1 [[ is any gradient-based optimization update (for SGD it is the plain gradient, but other optimization strategies like Adam can be plugged) and 77, À are two positive hyper-parameters. Such strategy is particularly effective on standard convolutional neural networks, and easy plug in any back propapaopngttion based learning system. Furthermore, LOBSTER is regularization strategy which can be plugged at any learning stage, as it self-tunes the penalty introduced according to the learning phase: for this non-intrusiveness in the complex and delicate routing mechanism for CapsNets, resulted in a fair choice to enforce REM.
4 EXPERIMENTS AND RESULTS
In this section we report the experiments and the results that we performed to test REM. We first show the results on the MNIST (Lecun et al. 1998) dataset, reporting also how the entropy and the accuracy values change during training. Then, test REM on more complex datasets such as Fashion-MNIST (Xiao et al. (2017). CIFARIO (Krizhevsky) 2009), SVHN (Netzer et al. 2011]) and smallNORB (LeCun al. 2004). We also performed experiments test the robustness to affine
transformations of CapsNets REM, We used the same architectures configurations and augmentations described in Sabour et 2017) We also conducted experiments applying our technique to y CapsNets (Peer et al. 2018). 8). DeepCaps (Rajasegaran et al., 2019), Efficient- Efficient-CapsNets (Mazzia et al.) 202T) order to test the efficacy of REM to some other variants of capsule models, including different architectures, routing algorithms and number of trainable parameters. We trained models with five random seeds. We report the classification accuracy (%) and entropy (averages and standard deviations), the sparsity (percentage of pruned parameters, median) and the number of keys in the dictionary (median). The experiments were run on a NVIDIA Ampere A40 equipped with 48GB RAM, and the code uses PyTorrh 1.10.
4.1 ABLATION STUDY
In order to assess our REM technique, we analyze in-depth the benefits of pruning towards REM on the MNIST dataset. Nowadays. despite its outdatedness, MNIST remains omni-present benchmark
for CapsNets (Sabour et al. 2017 Gu & Tresp 2020; Rawlinson et al. 2018 Kosiorek et al. 2019
Keller & Welling (021))
Entropy at different epochs. On a given dataset, we target a model that has high generalization but low entropy, namely low number of extracted parse trees. Figure 2 (red line) and classification accuracy (black dotted line) changes as the sparsity increases during training. We can see that at the beginning of the training stage the entropy low (1.83) because the routing algorithm has not learned yet to correctly discriminate the relationships between the capsules (97.83% of accuracy). This effect is almost the same when we train CapsNet with = 1 as Gu & Tresp (2000). where its entropy is exactly zero but capsules are uniformly coupled. However, at the end the training process we can get a model trained with REM which has higher performances (99.60%. of accuracy) and still low entropy (4.31).
shows shows how the entropy
'we have removed the decoder part of the network, see Appendix A.3.1 for more details.
'The code will be open-source released upon acceptance of the paper.

---

Under review as a conference paper at ICLR 2023
10
99.50
99.25
Entropy
-9.00
Acemin S
Low entropy with high genoralization
99.77
Low eutropy with generalization
98.50
4-
98.25
40
60
80
Pruned paramelers
(%)
Figure 2: Accuracy and entropy eurves vs pruned parameters on MNIST (test set).
CapeNet- RFM CupeNet-+
Copeliet Q
1230
ChooNee
504
507
800
0.00
110
2000
190
48P
13.
11:0
011
112
113
11.
1.5
0.6
0.7
088
0.51
1/0
0
2
Clasces
(a) Coupling coefficients distributions.
(b) CapsNets number of extracted parse trees.
Figure Coupling coefficients distributions and number of parse trees for each class on MNIST (test set).
Strength of parse trees. In Figure 3a we plot the distributions of the coupling coefficients for CapsNet+Q and a RapsNet+REM following the method described in Section 3.1 We can see that the distributions of the Rap model are sparser that the ones for the CapsNet+Q model, namely we can carve-out parse trees with stronger whote relationships, achieving high generalization.
Number of parse trees. Figure 3b shows the number of intra-class parse trees (collected in dictionary) for RaM and CapsNets+Q. namely a CapsNet where the quantization is applied without pruning the network during training. We see that the number of keys of the dictionary for CapsNets+REEN is lower than the one for CapsNets+ for each class, Also the entropy measure for ReM is lower compared CapsNets+Q. namely, REM has successfully extract a lower number of parse trees on MNIST test set.
4.2 EXPERIMENTS
In this section we propose the experiments on more datasets. Considering the broad heterogeneity of proposed architectures, and the adaptability of REM also to other architectures, have chosen to perform the experiments not only on CapsNets, but also to y-CapsNets, DeepCaps and Efficient- CapsNets.
Setup. We trained and tested CapsNets on: i) MAshi, 28 x:28 grayscale images (10 classes); úi) SVHN, 32x32 RGB images (10 classes); iii) smalINORB, 96x96 grayscale stereo images (5 classes) resized to 64x x 64 and cropped to 48x48 as Mazzia et al. (202T); iv) CIFAR1O, 32x32 RGB images (10 classes).
7

---

Under review as a conference paper at ICLR 2023
Model
Dataset
Accuracy
Sparsity 0
Entropy
CapsNet+Q
Fashion-MN MNNIS
92.46=to.oo
8.64
CapsNet+REM
Fashion-MNIST
92.62.1o.001
80.71
1.70
7-CapsNer+O
Fashion-MNISST
92.43.Lp.01
3.98.Lo.76
7 CapsNet+REM
Beshion-MNIST
93.01
87.07
1.45tt.66
DeepCaps+ DeepCaps+REM
Fashion-MNISTT
92.33.1o.or
7.15
Fashion-MNISTT
94.611 0006
83.29
6.08:11.29
Efficient -atiient-CapNNNesst
93.22
0
3, 3.88111.10
Efficient- CapssesstaP
Fashion-MNe MNIST
92.98
63.29
1.10:t..48
CapsNet+Q
SVHN
92.20
0
7.13+-1.15
CapsNet+REM
SVHN
91.71 +r0000
74.40
5.23
>-CapNee++
SVHN 87 87.42
0
7.15
7CCapNettRRRM
SVHN
88.36+0..00
73.89
5.65+t1.22
DeepCapstQ DeepCaps+REM
SVHN
93.20+to.om
0
11.06+0..88
SVHIN 93.0611..o0
80.50
3.97
Efficient- O
SVHN 93. 93.62 0000
0
0.53
Efficient- CaE
SVHN 93. 08.12:to..00
47.80
0.24
CapsNet+Q CapsNet+REM
CIFARIO 78.42.1o.02a
0
6.26.1o.61
CIFARIO 79.25.1..o0g 00s
81.17
4.15.10.62
C-CapsNetQ ?y CapsNet+REM
CIFARIO
73.08=ta.004
0
3.67
CIFARIO
74.89-to.o00 002
90.22
3. 3.22:t0.66
DeepCaps+Q DeepCaps+REM
CIFARIO
90.47-1..00
8.99:Fo.52
CIFARIO
90.355t..001
46.83
7.07
Efficient- Cappietst Efficienn-CapsNees-RRR.M
CIFARIO
81.51:0.000
0
0.25
CIFAR10
81.49-0.0004
53.79
0.005++0.02
Table 1: Accuracy (%), entropy and sparsity Fashion-MNIST. SVHN and CIFARIO (test set).
Generalization ability, As we can see in Tables CapsNet+REM has a high percentage of pruned parameters with minimal performance loss. So this confirms our hypothesis that CapsNets are over wver-parametrized. We also report the entropy of the dictionary of the last routing layer for the quantized models. We can see that for all datasets when REM is applied to all models, even with fewer parameters that CapsNets such as Efficient-CapsNetss the entropy is successfully lower.
Robustness to affine transformations. To test the robustness to affine transformations of Cap- RNMM we used expanded MNIST: dataset composed by padded and translated MNIST, in which each example is an MNIST digit placed randomly black background of 40 40 pixels. We used the afINIST dataset as test set, in which each example is an MNIST digit with a random small affine transformation. We tested under-trained CapsNet with early stopping which achieved 99.22% accuracy on the expanded MNIST test set as in [Sboour et al. (2017) Gu & Trespl (2020). We also trained these models until convergence. We can in Table 2 that the under-trained networks entropies are high. Instead, a well-trained CapsNet+REM can be robust to affine transformations and have a low entropy.
Robustness to novel viewpoints. CapsNets are well known for their generalization ability to novel viewpoints (Sabour et al. 2017 Hinton et al. 2018). We conducted further experiments on smallNORB dataset test the robustness to novel viewpoints of our technique following the experimental protocol of Hahn et al. 2019); Hinton et al. (2018) (more details can be found in the Appendix (.I..I. We employed Efficient- Craclent-CapsNetts as they are the state-of-the-as
models on this dataset with a low number of trainable parameters. We used K 11 quantization levels for Efficient- CapsNets+ and Efficient-Caps/ Capieett--aaSNeetRREMM.. Table 3 we can see that Srffiiiett-CapsNeettRRRR are indeed robust to novel viewpoints.
wht.ss//wwww.sstorrmo..omm http://tooooooootociiiiiiccnnnnn tijmen/afNNIST/
8

---

Under review as a conference paper at ICLR 2023
expanded MNIST Accuracy (%)
afNNIST Accuracy (%)
affNIST Sparsity (%)
afINIST
Model
Entropy
CapsNet+Q CapsNct+REM
99.22 99.22
77.93-to.o0m
0 71.26
8.64
81.81
8.45+1.10
C
99.36-LL.o00s
83. 83.14
0
8.45.L0.99
RaP
19.48.oo.o00
85.23.La.001
87.32
5.93.11.39
Table 2: Results afNNIST test set for under-trained and well-trained models.
Familiar
Novel Entropy
Model
Sparsity
Accuracy
Entropy
Accuracy
Officient-CapsNett0 (+)
89.79-to.0
2.03
78.25=to.01
2.38
0 55.31
EfficientCCapsNat-REEMM (6)
90. 90.20+0..11
1.11
78. 78.18:to.013
1.16
Elficient-CassNettQI (+)
89.22 29.22
1.94
79.52
1.88
0 47.91
Efficient-CpsNNe-RREM (1)
88.85
1.09::..94
78.69#0.011
1.05
Table 3: Accuracy (%) and entropy values on the smallNORB set on familiar and novel viewpoints (elevations ø and azimuths 1 seen and unseen during training respectively.
Improved interpretability with REM. Since CapsNets are typically stacked top of convolutional layers, capsules can also have a spatial connotation. Therefore, we use the coupling coefficients values visual attention built-in explanation carve-out the part-structure discovered by capsule model. We follow (Gul 2021), where the coupling coefficients of the predicted class j of a trained model for given input used as attention matrix. Unlike (Gul 2021), we also weight each coupling coefficient Cyj by the activation || of the corresponding primary capsule i. We upsampled the saliency map to the input size with the bilinear method. Figure 4 shows the saliency maps overlayed on some CIFAR10 images (for more details on how to extract the saliency map see Appendix (A..... We can see that the part-whole hierarchies extracted with REM are more succinct and human- interpeerrr......l.......... For example, in order to classify object as an airplane, the network detect the wings and tail as discriminating parts. As regards the car it detects not only the road but also the window, the door and the wheels. Finally, regards the horse, Rap correctly detects its head, main and legs.
Figure 4: Saliency maps for CIFAR10 for CapsNet+ (above) and CapsNet+REM (below).
5 CONCLUSION
This paper moved some steps towards an improved interpretability of the routing algorithm in CapsNets with REM (Routing Entropy Minimization), which drives the model parameters distribution towards low entropy configurations. We first showed how to extract the parse tree of a CapsNet by discretizing its connections and then collecting the possible parse trees in associative arrays. Standard CapsNets show high entropy in the parse trees structures, as an explicit prior on the coupling coefficients distribution is missing. Indeed, the number of intra-class generated parse trees is relatively high. We showed how pruning methods, in low pruning regimes, naturally reduce such entropy as well as the cardinality over the possible parse trees, testing such a phenomenon on several datasets. We also showed that REM can also carve-out parse trees with stronger part-whole relationships, achieving high generalization. Furthermore, we empirically observe that CapsNet+REM model remains robust to affine transformations and novel viewpoints. REM opens research pathways towards the distillation of parse trees and model interpretability. including the design of pruning technique peccifiaall--desinnee for REM.

---

Under review as a conference paper at ICLR 2023
REFERENCES
Parnian Afshar, Arash Mohammadi, and Konstantinos N Plataniotis. Brain tumor type classification via capsule networks. In 2018 25th IEEF International Conference on Image Processing (ICIP), pp. 3129-3133. IEEE, 2018.
Fabio De Sousa Ribeiro, Georgios Leontidis, and Stefanos Kollias. Introducing routing uncertainty in capsule networks. In Advances in Neural Information Processing Systems, volume 33, pp. 6490-6502. Curran Associates, Inc., 2020.
Marzieh Edraki, Nazanin Rahnavard, and Mubarak Shah. Subspace capsule network. Proceedings of the AAAI Conference Artificial Intelligence, 34007):10455-00753 2020.
Jindong Gu. Interpretable graph capsule networks for object recognition. In Thirty-Fifth AAAI Conference on Artificial Intelligence, pp. 1469-1477. AAAI Press, 2021.
Jindong Gu and Volker Tresp. Improving the robustness of capsule networks to image affine transformations. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition (CVPR), pp. 7283-7291, June 2020.
Josef Gugglberger, David Peer, and Antonio Rodríguez-Sánte -ånchez. Training deep capsule networks with residual connections. In Igor Farkaš, Paolo Masulli, Sebastian Otte, and Stefan Wermter (eds.), Artificial Neural Networks and Machine Learning ICANN 2021, pp. 541-552, Cham, 2021. Springer International Publishing. ISBN 978-3-030-88332--3
Taeyoung Hahn, Myeongjang Pyeon, and Gunhee Kim. Self-routing capsule networks. In Advances in Neural Information Processing Systems, volume 32, pp. 7658-7667. Curran Associates, Inc., 2019.
Geoffrey E Hinton, Sara Sabour, and Nicholas Frosst. Matrix capsules with EM routing. In International Conference on Learning Representations, 2018
Taewon Jeong, Youngmin Lee, and Heeyoung Kim. Ladder capsule network. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 3071-3079, PMLR, 09-15 Jun 2019.
Burak Kakillioglu, Ao Ren, Yanzhi Wang, and Senem Velipasalar. 3d capsule networks for object classification with weight pruning. IEFE Access, 1-27393-27405 2020.
Anderson Keller and Max Welling. Topographic vaes learn equivariant capsules. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, volume 34, pp. 285977. Curran Associates, Inc., 2021.
Adam Kosiorek, Sara Sabour, Yee Whye Teh, and Geoffrey E Hinton. Stacked capsule autoencoders. In Advances in Neural Information Processing Systems, volume 32, pp. 15512-1552.. Curran Associates, Inc., 2019.
Alex Krizhevsky, Learning multiple layers of features from tiny images. Technical report, Canadian Institute for Advanced Research, 2009.
Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11))2278-2324 1998.
Yann LeCun, Fu Jie Huang, and Léon Bottou. Learning methods for generic object recognition with invariance to pose and lighting. In 2004 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2004), with CD-ROM, 27 June July 2004, Washington, DC, USA, pp. 97-104. IEEE Computer Society, 2004.
Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based connection sensitivity. arXiv preprint arXiv: arXiv:1810.022: 1810.02300 2018
Hongyang Li, Xiaoyang Guo, Bo Dai, Wanli Ouyang, and Xiaogang Wang. Neural network encap- sulation. In Computer Vision - ECCV 2018, pp. 266-282, Cham, 2018. Springer International Publishing.
10

---

Under review as a conference paper at ICLR 2023
Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through 1_0 regularization. arXiv preprint arXiv:1712.01312, 2017.
Christos Louizos, Max Welling, and Diederik P. Kingma. Learning sparse neural networks through 10 regularization. In Proceedings of the 6th International Conference on Learning Representations, ICLR. OpenReview.net, 2018.
Vittorio Mazzia, Francesco Salvetti, and Marcello Chiaberge. Efficient-capsnet. capsule network with self-attention routing. Scientific reports, 11, 2021.
Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. In Proceedings of the 34th International Conference on Machine Learning, pp. 2498,2507, 2017.
Pavlo Molchanov, Arun Mallya, Stephen Tyree, luri Frosio, and Jan Kautz. Importance estimation for neural network pruning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattemn Recognition, pp. 1 11264-112 11272, 2019.
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop Deep Learning and Unsupervised Feature Learning 2011, 2011.
Inyoung Paik, Taeyeong Kwak, and Injung Kim. Capsule networks need improved routing algorithm. In Proceedings of The Eleventh Asian Conference on Machine Learning. volume 101 of Proceedings of Machine Learning Research, pp. 489-502, Nagoya, Japan, 17-19 Nov 2019.
PMLR.
Mercedes E Paoletti, Juan Mario Haut, Ruben Fermandez- Belttre, Javier Plaza, Antonio Plaza, Jun Li, and Filiberto Pla. Capsule networks for hyperspectral image classification. IEEE Transactions Geoscience and Remote Sensing, 57(4):2145-211 2018.
David Peer, Scbastian Stabinger, and Antonio Rodriguez-Sancie Sanchez. Increasing the adversarial robust- ness and explainability of capsule networks with y-capsules, 2018.
Rajasegaran, V. Jayasundara, S. Jayasekara, H. Jayasekara, S. Seneviratne, and R. Rodrigo. Deepcaps: Going deeper with capsule networks. In 2019 IEEE/CVF Conference Computer Vision and Pattern Recognition (CVPR), pp. 10717-10725, 2019.
David Rawlinson, Abdelrahman Ahmed, and Gideon Kowadlo. Sparse unsupervised capsules generalize better. CoRR, abs/1804.06009, 2018
Riccardo Renzulli, Enzo Tartaglione, Attilio Fiandrotti, and Marco Grangetto. Capsule networks with routing annealing. In Igor Farkaš, Paolo Masulli, Sebastian Otte, and Stefan Wermter (eds.), Artificial Neural Networks and Machine Learning ICANN 2021, pp. 529-540, Cham, 2021. Springer International Publishing. ISBN 978-3-030-86362-3.
Fabio De Sousa Ribeiro, Georgios Leontidis, and Stefanos D Kollias. Capsule routing via variational bayes. In AAAL, pp. 7749,3756, 2020.
Sara Sabour, Nicholas Frosst, and Geoffrey E Hinton. Dynamic routing between capsules. In Advances in Neural Information Processing Systems, volume 30, pp. 3856-3866. Curran Associates, Inc., 2017.
Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based lo- calization. In 2017 IEEE International Conference on Computer Vision (ICCV), pp. 118-226, 2017.
Enzo Tartaglione, Skjalg Lepsø y, Attilio Fiandrotti, and Gianluca Francini. Learning sparse neural networks via sensitivity -esitivvtt-driven driven regularization. In S. Bengio, H. Wallach, H. Larochelle, K. Grau- man, N. Cesa-Biani Basa-Bianchi, and R. Gamett (eds.), Advances in Neural Information Processing Systems, volume 31, pp. 3882-3892. Curran Associates, Inc., 2018

---

Under review as a conference paper at ICLR 2023
Enzo Tartaglione, Andrea Bragagnolo, Attilio Fiandrotti, and Marco Grangetto. Loss-based sensitivity regularization: Towards deep sparse neural networks. Neural Networks, 146:230-233 237, 2022. ISSN 0893-6080.
Dilin Wang and Q. Liu. An optimization view dynamic routing between capsules. In ICLR, 2018.
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist a novel image dataset for benchmarking machine learning algorithms. CoRR, abs/1708.00747, 2017.
Yongheng Zhao, Tolga Birdal, Haowen Deng, and Federico Tombari. 3d point capsule networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1018, 2019.
12

---

Under review as a conference paper at ICLR 2023
A
APPENDIX
A. EXPERIMENTS DETAILS
In this section we provide the technical details of our experiments, including the datasets setup, the optimizers, hyperparameter values and architectures configurations.
A.1.1 DATASETS SETUP
For MNIST, Fashion-MNIST and CIFARIO we used 5% the training set as validation set. To test the robustness novel azimuths on smalINORB, we train all models on 1/3 of training data with azimuths of 0, 20, 40, 300, 320, 340 degrees and test them on 2/3 of test data with remaining azimuths never seen during training.
order to test the robustness of our technique on novel elevations, we trained models on 1/3 of training data with elevations of 30, 35, 40 degrees from the horizontal, and tested on 2/3 of test data with the remaining elevations. For Tiny Imagenet we used 10% of the training set as validation set and the original validation set as test set. Finally, to test the robustness to affine transformation, we used expanded MNIST training and validation sets (40x40 padded and translated MNIST images) and the afINIST test set, in which each example is an MNIST digit with random small affine transformation.
A.1.2 MODEL ARCHITECTURES
All models employed in this work were tested using the same architectures (number of layers, capsule dimensions, number of routing iterations etc.) presented in the original papers. Therefore, for CapsNets, 7-CapssNets, DeepCaps and Ffficient-CapsNeet we used the same architectures configura- tions as in (Saoour et al. (2017); Peer et al. 2018); Rajasegaran et al. (2019); Mazzia et al. 22221) respectively.
A.1.3 TRAINING
For CapsNets+Q. y- C-CCasNett+. DeepCaps+Q and Efficient-CapsNeets-O we take the model that achieved the lowest loss on the validation set, while for CapsNets+REM, +-CapNNe+RREM, Deep- Caps+REM and Efficient-Caasseee on the validation set and we used an early-stop of 200 epochs. The models were trained on batches of size 128 using Adam optimizer with its Py Torch 1.10 default parameters, including an exponentially decaying learning rate factor of 0.99.
we take the model on the last epoch. We checked the loss
A.1.4 CHOICE OF QUANTIZATION LEVELS
The routing algorithms used in the models employed in this paper are performed between two consecutive capsule layers. As we can see in Figure [5] the choice of the number of quantization levels K for the coupling coefficients computed by routing algorithm of CapsNet affects the performance of the network. We select the value for K that achieves the best accuracy value with relatively low entropy. In this case, when K=11, CapsNet+Q achieves 99.47% accuracy and 9.32 entropy, while CapsNet+REM achieves 99.57% accuracy and 4.40 entropy. When stacking multiple capsule layers, for example using y-CapsNets and DeepCaps, of this layers and we compute the entropy values on the last layer. For each capsule layer, we chose the lowest K such that the accuracy is not deteriorated. For example, we used y-CapsNets with capsule layers as in Peer et al. (201 8). For NetspsNets+ and R-M we found K 11 for the first two capsule layers and K 6 for the last two. For DeepCaps+ and DeepCaps+REM we used K = 11 for all the capsule layers where the number of routing iterations is greater than one. For EffficientCaasseee
apply the quantization stage to each
and Efficient- Efffcient-CapsNeete REE we used K 11 on smalINORB.
As regards CapsNets+ and CapsNets+REM, on MNIST, Fashion-MNIST. CIFARIO and afINIST, we found 11 for the quantizer, while for Tiny ImageNet we found K 129 quantization levels.
A.1.5 How TO EXTRACT THE SALIENCY MAP
Figure 6 depict visualization of our method to extract saliency map from input image given CapsNet model. We build saliency map, explanation map, E$ for given input exploiting
13

---

Under review as a conference paper at ICLR 2023
10
0.8
Accuracy (%)
Entropy
6-
0.6
0.4
2-
0.2
CapsNet- CapsNet+Q
-0.0
14 15
Quantization levels
Figure 5: Entropy and accuracy values for CapsNet+Q and CapsNet+ with different quantization levels MNIST (test set).
the quantized coupling coefficients of the predicted class and the activations of the primary capsules. This allows to carve-out the part-structure of the object in the image. Note that for simplicity of notation, in the previous Sections, we omitted the spatial dimensions of primary capsules. But since primary capsules are built upon convolutional layer, refer to u indicate the pose of the primary capsule position (n, m) for given input Ç. With of mang" we refer the quantized coupling coefficient between the primary capsule in position (n,m) and the predicted class j for given imput ş. Therefore, each element of the explanation map is computed using
E mm = | Canj
(17)
Then we upsampled the saliency map to the input size with the bilinear method.
Primary Capsules
Parse Tree
Output Capsules
Conv
16
1A
[|]]]
O
[
Boutins
Visualize primary caps saliency
E
Figure 6: Extraction of the saliency map given an input image of label 0 (airplane) and CapsNet model.
A.2
ADDITIONAL AND EXTENDED RESULTS
In this section we provide additional and extended results for MNIST, Fashion-MNIST, SVHN, CI- FAR 10, SORR, afNNSST and Tiny ImageNet, including distributions of the coupling coefficients.
14

---

Under review as a conference paper at ICLR 2023
Epoch Epoch 190
Classees
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
K
Figure 7: Coupling coefficients distributions for each class of two CapsNets+ at epochs and 190 on MNIST (test set).
We also provide additional visualizations employing the dictionary built with our technique REM in order give better understanding of what is the impact of having fewer parse trees with stronger connections.
A.2.1 DISTRIBUTIONS AND TABLES
Figure 7 shows the distributions of the coupling coefficients for each class MNIST of two CapsNets+Q at epochs and 190. It can be observed that after the first epoch CapsNet is clearly far from optimality, both in term of performance (accuracy of 97.4%) and parse interpretability: indeed all coupling coefficients are almost equal to the value selected for initialization, i.e. 1/J, where J the number of output capsules. Table shows the performances on MNIST of -aapsNets. DeepCaps and Efficient- Cetsssss. We can notice that 7-CapsNec and R-C has the lowest entropy values, since t-CapsNets employ scaled- sualedddisstance-greeemee which enforces the single parent constraint. With our technique REM we can successfully lower the entropy even more. Table 5 reports the accuracy of CapsNets without the quantization stage. Table T the accuracy, sparsity and entropy values for CapsNet+ and CapsNet+REM on Tiny ImageNet. Table reppors the number of parse trees for Fashion-MNIST SVHN, CIFARIO, 10, afINIST and Tiny ImageNet (only the first ten classes). We conducted further experiments smalINORB dataset to test the robustness to novel viewpoints of our technique on CapsNets, y-CapsNets and DeepCaps. The results shown in Table TO which is extended version of Table We also show Table the performances of these networks without quantization. All the models are trained with our own implementations when the source code is available. We can see that the number of parse trees and entropies for CapsNets+REM is lower than the one for CapsNets+Q. also for these datasets.
routing algorithm
A.3 FASHION-MNIST SALIENCY MAPS
Here we show in Figure the saliency maps for Fashion-MNIST generated using the method described in Appendix A.1.5 We can notice that understanding which are the parts of an object that the model relied on to assign the predicted label is more straightforward and human-interpretaae CapsNets+REMM. For example, the network is able to recognize the sleeves and collar as distinguishing features of t-shirt or sweater, the cuffs and the cronch for trousers and the handles for the bag.
in
15

---

Under review as a conference paper at ICLR 2023
Model
Parameters
Accuracy (%)
Sparsity (%)
Entropy
CapsNer+Q
6.8M
99.56-Lo.0003
9.53.10.54
CapsNet+REM
0.9M
99.56.1..0000
85.53
4.16.1..55 1.59
7-CapsNet+
7.7M
99.50-1o.omm
1.87
CaCapNNe+RREM
0.8M
99.50=t.0000
89.71
1.34=1.00
DeepCaps+
8.4M
99.51 00.024
5.26=2.00
DeepCaps+REM
2.4M
09.61=
71.73
3.10=1.00
Efficiet-CapsNeesse
161k
99.55-to.000
4.38
1388-11.55
Caficieen--CppNNees-RRRMM
43k
99.58
73.15
2.60=1.12
Table Results for CapsNets, CaapsNets, DeepCaps Efficient-CapsNers on MNIST (test set).
Model
Dataset
Accuracy
Sparsity
CapsNet
MNIST 99.57-L..000
0
CapsNet
MNIST 99.58-Lo.000
85.53
>-CapsNet
MNIST 99.53
7. CapsNeet
MNIST 99.51
89.7 71
DeepCaps
MNIST
99.58 0000
DeepCaps
MNIST
99.63-to.0019
71.73
Seticient-CapsNerr
MNIST
99.57
Efficient-CapsNeet
MNIST
99.61+t.000 0003
73.15
CapsNet
Fashion Maahion-MNISTT
92.76=t..ce
CapsNet
Fashion Fashion-MNIST MNIST
93.09
80.71
N-CapsNet
Fashion-MNIST MNIST
92.59+to.01
7-CapsNet
Fashion-MNDI
93.47
87.07
DeepCaps
Fashion-MNIST
92.36.1o.ocr
DeepCaps
Aishion-MNIST
94.63.L..com
83.29
Setsse
Rashion-MNIST
t..31
0
Efficinn-CapsNeets
Fashion- MNIST
93.28 003
63.29
CapsNet
SVHN
93.30-Lo.uee
CapsNet
SVHN
92.81=t..um
74.40
7 >-CapsNet C-CapsNet
SVHN
89.02=to.00 001
SVHN
90.72 73.89
DeepCaps DeepCaps
SVHN
93.32
SVHN
93.16=to.ooz
80.50
Fffscient-CapSNets
SVHN
93.64+to.00m
Efficient-CapsNert
SVHN
93.1 0.0000000
47.80
CapsNet
CIFARIO
79.93=2..002
CapsNet
CIFARIO
80.3311o.00
81.17
>-CapsNet
CIFAR10
74.02
--CapsNet
CIFARIO
75.06_Lo.od
90.22
DeepCaps
CI
90.80-Lo.001
DeepCaps
CIFAR10
90.94
46,83
Efficient-CapsNets
CI
81.53-Lo.00
Efficient-CapsNets
CIFAR10
81.51 .04
53.79
CapsNet
Tiny ImageNet
60.85.to.19
0
CapsNet
Tiny ImageNet
58.96#to.11
44.27
Table 5: Accuracy and sparsity results without quantization on MNIST, Fashion-MNIST, SVHN, CIFAR10 10 and Tiny ImageNet (test set).
16

---

Under review as a conference paper at ICLR 2023
Model
Accuracy
Sparsity
Entropy
CapsNet+Q CapSNet+REM
58.50
0
5.18
54.0221o.14
44.27
3.15...81
Table 6: Accuracy entropy and sparsity results on Tiny ImageNet (test set).
Class
F-MNIST REM
afINIST
CIFAR-I0
T-ImageNet
SVHI
REM
Q
REM
Q
REM
Q
REM
#u
610
58
9640
248
345
65
28
585
74
#1
936
140
5490
66
407
125
57
22
1750
85
#2
332
35
14055
438
375
115
50
9
1985
302
#3
600
80
1446
97
200
70
12
11
1054
266
#4
316
30
9059
161
291
39
15
890
60
#5
7732
425
7
1116
#o
297
23
11957
1244
282
58
90
14
780
70
#7
915
31
3109
164
381
71
48
21
676
31
#8
812
217
15521
396
305
37
129
30
434
139
#9
978
615
3703
67
35
12
681
110
Table 7: Number parse trees for each class of CapsNet+Q and CapsNet+REM on afINIST, CIFAR-10, Tiny ImageNet and SVHN.
A.3.1 DECODER
A CapsNet is typically composed of an encoder and decoder part, where the latter is reconstruction network with 3 fully connected layers Sabour et al. (2017). In the previously-discun have removed the decoder. One limitation of work arises when computing the entropy of CapsNets trained with the decoder. Tables [ and reports the classification results and entropies values respectively when trained the encoder and the decoder part together. We observed that the entropy of a Rap is almost the same as that of a CapsNet+Q. Indeed, when the decoder used, the activity vector of output capsule encodes richer representations of the input. Sabour et al. (011)) introduced the decoder to boost the routing performance on MNIST by enforcing the pose encoding capsule. They also show that, when perturbed activity vector fed to the decoder, such perturbation affects the reconstruction. So capsules representations are approximately equivariant, meaning that even they do not come with guaranteed equivariances, transformations applied to the input can still be described by continuous changes in the output vector. In order to verify if output capsules of a trained CapsNet+REM without the decoder (so with low entropy) are still approximately equivariant, the encoder. The decoder on MNIST dataset is composed by fully connected layers of 512, 1024 and 784 neurons respectively with two RELU and final sigmoid activation functions. This network trained minimizing the euclidean distance between the image and the output of the sigmoid layer. We in Figure that RapsNets+RRM with low entropy still approximately equivariant many transformations.
experiments,
stacked on top of it the reconstruction network, without training
Model
MNIST
F-MNIST
CIFARIO
CapsNet+Q
99.58 0000
92.57
72. t0- ons
CapSNet+REM
92. 92.76-0..00
76.00
Table 8: Classification results with the decoder on MNIST, Fashion-MNIST, CIFAR10 (test set).
17

---

Under review as a conference paper at ICLR 2023
Figure Salieney maps for Fashion-MNIST for CapsNet+ (above) and CapsNet+REM (below).
Width + translation
00000
Rotation
3
3
3333
Localized skew
4
4
4
4
Localized part
77777
Figure 9: MNIST perturbation reconstructions of freezed CapsNet+REM.
Model
MNIST
F-MNIST
CIFARIO
CapsNet+Q CapsNets+REM
9.88
8.49+1.00
4.55=1.1a 3.85=t.64
9.40=
6. 6.15:22.32
Table 9: Entropies for models trained with the decoder Bushion-MNIST and CIFARIO (test set).
Familiar
Novel Entropy
Model
Sparsity
Accuracy
Entropy
Accuracy
CapsNet+ (#)
90.51+0.0002
6.25+t1.15
77.40+to.006
5.01
RapsNet+REM (6)
90.38 00.38-+o.000 0.005
3.35+11.18
76.98
2.47+t0.96
50.13
Q (1))
87.44+
5.42+
72.29
5.02+t..0r
0 60.81
CapsNet+REM (1)
86.78 003
3.07
71.89
2.75
7-CapsNet+Q (0)
89.62-Fo.00:
1.78:to.82
75.54
2.72
0 50.30
7-CapsNet+REM (+)
88.43 132
1.24
74.40
2.05
7-CapsNet+Q (1)
85.98-00.004
1.87
71.33+bo.012
2.55
0 49.61
85.26-to.024
1.52-to.42
71.12:to.025
2.17:tb.61
DeepCaps+ (0)
95.01
7.32
83.18-to.016
7.28-11.60
Dee (0)
94.62
6.75#1.41
82.49
6. 6.12
34.45
DaepCaps+Q (1)
90.16
6.53
79.36
5.14
0
DecpCaps+REM (1))
90.13
5.55
78.66#t..012
3.92
36.06
Table 10: Accuracy (%) and entropy values on the smallNORB test set on familiar and novel viewpoints (elevations & and azimuths v)) for CapsNets, 7-CapsNets and DeepCaps when quantization and REM are applied.
18

---

Under review as a conference paper at ICLR 2023
Model
Familiar
Novel
Sparsity
Caficient-CapsNer (()
90.55-
80.68+t..00
Etficient-CapsNet (6)
90.67
80.49
55.34
Elaicient-CapsNet (e)
90.16=t.0072
80.34
Clficient-CapsNet (t)
89.87-t.004
79.94=0..044
47.91
CapsNet (e)
90.62
77.51
0 50.13
CapsNet (+)
90.51+t.0004
77.03=0.000
CapsNet (1)
87.90
72.37
0 60.81
CapsNet (2))
86.81=0.0006
71.99+
7- 7-CapsNet (6)
90.15
75.89
0 50.30
7 CaCpsNeet (6)
89.92 0.009
74.96 007
7 7-CapsNet (+))
86.11=0.000
72.55=t.000
C-CasNet (1))
85.35=
71.35=
49.61
DeepCaps (Φ)
95.32:
83.13 0.009
DeepCaps (Φ)
94.48+tu.003
82, o2.4
34.45
DeepCaps (+))
91.11#t.00z
79.53#b.00 00007
0
DeepCaps (+))
90.15-to.009
78.83#0.011
36.06
familiar and novel viewpoints (elevations o and azimuths v)) for CapsNets, 7-CapsNets, DeepCaps and Elficient-CapsNets without quantization.
Table 11: Accuracy (%) the smallNORB
19


Reviews:
[{"review_id": "oIiCnthBcj-", "reviewer": "Reviewer_1ErG", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 1, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "RSM is proposed to minimize the entropy of the parse tree-like structure in Capsule Networks. Pruning is used to reduce the entropy of the model parameters distribution. These methods generate a significantly lower number of parse trees, with no performance loss. Experimental results show the effectiveness of the proposed method.\n", "summary_of_the_review": " I am not familiar with this topic. I score this paper marginally above the acceptance threshold, based on the solid contribution by minimizing the entropy of the connections and comprehensive experiments. ", "strength_and_weaknesses": "Strengths:\n1 The motivation of this paper is clearly described. \n2 Empirical results indicate that the proposed method achieves good performance.\n3 The paper is well organized.\n\nWeaknesses:\n1 Pruning and Quantization are standard methods in compression and acceleration literature. Intuitively, the paper just applies these two techniques to the capsule networks. What are the contributions of these techniques?\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "bwiy9whajxo", "reviewer": "Reviewer_Ni7P", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "I would have hoped to be clearer on how all the components proposed fit together, but in a nutshell, the authors propose a way to prune CapsNets without compromising performance, and they do so by pushing the model parameters to low entropy spaces. They achieved competitive results in some datasets they compared with, demonstrating that one can reduce entropy and cardinality in the parse trees extracted.", "summary_of_the_review": "This is a good submission which helps to provide a new dimension to capsule neural networks. There is a good experimental setup presented but I think it requires further improvements to demonstrate correspondence with other methods presented in the literature - this is the major limitation of this paper, as it is hard to put this paper in context (e.g. to compare with other methods which include number of parameters etc.)", "strength_and_weaknesses": "Strengths: a) There is some new methodology described to extract parse trees and use pruning and quantization in capsule networks b) Results are promising and it seems that the method does work competitively with respect to other solutions presented in the literature. However, I do think authors are missing two important works in the area, i.e. subspace capsules (Edraki et al.) and Capsule Routing via Variational Bayes (De Sousa Ribeiro et al.)\n\nWeaknesses: a) Table 3 and other tables (wherever relevant) needs to include other methods as well (e.g. ones I mentioned above and also ones already cited). Authors do not need to reimplement anything as all these (or most of them) methods do have results in such datasets.\n\nThe abstract starts: \"Capsule Networks ambition\" this needs to be paraphrased, as it is our ambition to make them interpretable not their ambition - or \"for Capsule Networks to be interpretable we need to.....\n\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "WAp3i_Urgk", "reviewer": "Reviewer_uZJ5", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "The paper proposes a new routing strategy, Routing Entropy Minimization (REM), for capsule networks. The core idea of REM is to minimize the entropy of capsule parse trees by pruning so that the activated connections between capsules are stronger and fewer, which will improve the interpretability of the capsule networks. Experiments on Fashion-MNIST, SVHN, smallNORB, and CIFAR10 validate that the proposed method achieves comparable performance with a significant lower number of parse trees.", "summary_of_the_review": "The paper gives a detailed analysis of how to sparsify the connections of capsules. However, the effectiveness and the interpretability of the sparsified networks have not been well discussed and explored. Thus, my recommendation is to reject it in its current form.\n", "strength_and_weaknesses": "Strength:\n1) The paper gives detailed instructions on how to extract the parse tree of capsule networks (capsule connections) and how to penalize the sparsity of the connections.\n2) The proposed method is easy to be plugged into the current capsule networks, which effectively improves the sparsity of the connections while keeping comparable performance.\n\nWeakness:\n1) Lack of novelty. The main contribution of the paper is to prune the capsule connections by penalizing the activations and votes of capsules. While the method for pruning is borrowed from other papers (LOBSTER, Tartaglione et al, 2022).\n2) In table 1, the paper combines REM with the current methods and evaluates them on different datasets to show the generalization ability, which is not convincing. To validate the generalization, there should be cross-data evaluation, where the new capsule network should be trained on one dataset and tested on another dataset. As I can see, the results in Table 3 show that the performance is reduced when applying the capsule network to novel viewpoints.\n4) The interpretability of the sparse capsules need to be further illustrated, i.e., show the sparse part-whole relations learned by the satisfied capsule networks.\n\nSome details:\n(1) Following the formatting instructions of ICLR2023, the abstract must be limited to one paragraph.\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "CQ4J84YYla", "reviewer": "Reviewer_LZej", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper presents a method (REM) to reduce the connection in the dynamic routing step of the capsule network, thereby reducing the entropy of routing. By doing so, the paper shows improved interpretability of the capsule networks. Specifically, the work proposes to simply prune connection via quantization of coupling coefficients in routing and thus get the parse trees. The paper validates its method and analyzes the routing in multiple datasets. ", "summary_of_the_review": "The paper proposes an interesting idea for training the capsule network while pruning the connection of routing. The experimental results show some improvement. But it's very marginal. And also I'm not sure about the motivation behind it. In other words, I'm not very clear about its contribution. Furthermore, I feel the experimental validation is not solid, as I detailed above. I thus tend to reject this paper. But I'm very happy if the author can provide feedback just in case I misunderstand anything. ", "strength_and_weaknesses": "## Strength\n- This work studies the interpretability of dynamic routing algorithms, which is very interesting to the community. \n- The paper reports lots of experimental analysis and reveals some interesting results  -- e.g., entropy changes curves along the training. \n\n## Weaknesses\nThe paper has several weaknesses which I'll detail below:\n\nWriting:\n- Motivation for the method is not strong. Fewer parameters are better for computation overhead but it doesn't mean that we can better interpret the capsule network. However, this paper motivates their story from the viewpoint of interpretability, which I personally don't agree. I didn't see how the routing of lower entropy can help understand the behavior of the network. I would recommend having better motivation.\n- Low clarity in the method description. I sometimes have difficulties understanding the idea/motivation behind the design choices. For example, in Eq. 16, why is the method trained with a special optimizer? Any reason behind this? I would recommend a better justification for this choice. And I'm also not very sure how you define entropy. \n\n\nMethod: \n- The paper claims the proposed method minimizes the entropy of the routing algorithm. It seems to be an over-claim from my perspective. Because I didn't see any regularizers/optimization loop inside. I don't quite get how entropy is minimized for dynamic routing. Is that just through a connection pruning step?\n\nExperimental results:\n- I didn't find any experiments that support the proposed method. By that I mean the results show the benefit/advantages of the proposed algorithm compared with other methods in terms of efficiency. The only comparison seems to be an ablation study of the proposed method. It's not solid. \n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}]

Author rebuttal:

Decision: Reject