Towards Disentangling Information Paths with Coded ResNeXt
Authors: Apostolos Avranas
Marios Kountouris
Venue: NeurIPS 2022 Accept (2022)
Keywords: Deep Learning
Image classification
ResNeXt
Explainability

Abstract: The conventional, widely used treatment of deep learning models as black boxes provides limited or no insights into the mechanisms that guide neural network decisions. Significant research effort has been dedicated to building interpretable models to address this issue. Most efforts either focus on the high-level features associated with the last layers, or attempt to interpret the output of a single layer. In this paper, we take a novel approach to enhance the transparency of the function of the whole network. We propose a neural network architecture for classification, in which the information that is relevant to each class flows through specific paths. These paths are designed in advance before training leveraging coding theory and without depending on the semantic similarities between classes. A key property is that each path can be used as an autonomous single-purpose model. This enables us to obtain, without any additional training and for any class, a lightweight binary classifier that has at least $60\%$ fewer parameters than the original network. Furthermore, our coding theory based approach allows the neural network to make early predictions at intermediate layers during inference, without requiring its full evaluation. Remarkably, the proposed architecture provides all the aforementioned properties while improving the overall accuracy. We demonstrate these properties on a slightly modified ResNeXt model tested on CIFAR-10/100 and ImageNet-1k.

Towards Disentangling Information Paths with Coded ResNeXt
Apostolos Avranas"
Marios Kountouris EURECOM Sophia Antipolis, France
EURECOM Sophia Antipolis, France avranas@eurecom.
kountour@eurecom.
Abstract
The conventional, widely used treatment of deep learning models as black boxes provides limited or no insights into the mechanisms that guide neural network decisions. Significant research effort has been dedicated to building interpretable models address this issue. Most efforts either focus on the high-level features associated with the last layers, or attempt to interpret the output of a single layer. In this paper, we take novel approach enhance the transparency of the whole network. We propose neural network architecture for classification, in which the information that is relevant to each class flows through specific paths. These paths are designed in advance before training leveraging coding theory and without depending on the semantic similarities between classes. A key property is that each path can be used as autonomous single-purpose model. This enables us to obtain, without any additional training and for any class, a lightweight binary classifier that has least 60% fewer parameters than the original network. Furthermore, our coding theory based approach allows the neural network to make early predictions intermediate layers during inference, without requiring its full evaluation. Remarkably, the proposed architecture provides all the aforementioned properties while improving the overall accuracy. We demonstrate these properties on a slightly modified ResNeXt model tested on CIFAR-10/100 and ImageNet- I
the function
Introduction
Most successful deep learning architectures for image classification consist of certain building block applied sequentially several times: one block follows another until linear operation finally outputs the model prediction. In deep convolutional neural networks (CNNs), the block consists of multiple convolutional operations [36, 37 applied sequentially. Nonetheless, there are numerous proposals placing the convolutional layers in parallel, forming multi-branch designs. For instance, inception use blocks with multiple branches, each applying some convolutional operations on the block's input and finally concatenating at the end the output of all branches. The multi- branch design framework can also accommodate skip connections 22 as initially done in ResNeXt networks [84), and later refined using squeezo-excitation in (25] or split- attention mechanism in 88 A first question we ask in this work is: what is the purpose of multi-branch architectures?
models 722 73
Initially, in AlexNet 33 two branches were employed to allow the distribution of the model across two GPUs, which at that time had limited memory. Nowadays, multi brancch architectures are commonly used for distributing the parameters of block into branches such that each one applies separate transformation to the input. However, rare are the cases where each branch shown to contribute in different way. One example is SKNet [40], in which each branch is associated with different receptive field size, and zooming in or out of an input image activates the appropriate branch.
*Currently working at Amadeus, Nice
36th Conference on Neural Information Processing Systems (NcurIPS 2022).

---

Nonetheless, the value of multi-branch networks is mostly justified by achieving a higher accuracy. Multi-brance blocks are also used for network architecture search, where the block/cell architecture is optimized selecting the number of branches, the operation that each performs, and how they are 93]. Still, the focus therein was on improving accuracy. 90
combined 42 55 57
In this work, we investigate how to ensure that each branch provably contributes in a different way in a multi-branch architecture. We propose a novel way organize in class-wise manner the transformations carried out by the branches. Before the training starts and without using any information on the semantic properties of the classes, we assign each branch to a specific set of classes. This set remains fixed throughout the training and the branches are trained to activate only to classes within that set. This behavior is achieved mainly by applying loss function that pushes the output of the branches to be zero for the samples that do not belong to their assigned set of classes. Thanks to this assignment, once the network is trained, for any given class there a unique path traversing the network through which the information related to that class flows. Conditioning class then, extracting only the parameters that participate in its unique path results in a model that has 60% less parameters than the original one and operates as a binary classifier for that class. To showcase the unique features and the advantages of our idea, we use the state-of-the-at multi-branch architecture ResNeXt [84, to which we perform small number of modifications.
Our main contributions can be summarized as follows:
We modify the ResNeXt architecture so that it functions in a more transparent way by forcing the information related to each class to flow through well-defined network paths.
As a proof of concept, we show that in order to form those paths, is not necessary to rely on the semantics of each class and the similarity between elasses.
Without any additional training, we can obtain single-purposs model per class operating as a binary classifier, which has 60% fewer parameters as compared to the complete network.
We demonstrate that the intermediate layers can be used both for making early predictions and for providing a confidence level for correctness of the network's 's final prediction. The proposed Coded ResNeXt significantly improves ResNeXt accuracy across all tested datasets.
2 Related Work
There have been numerous attempts understand how deep neural networks actually work. For instance, activation maximization tries to find the input that increases neuron activation [13] 53 51 85). Saliency maps [ 65
68
70
54 588 find the pixels that have the largest influence on the model
prediction. However, such approaches cannot really explain how the network operates, and they mainly serve as post hoc visualization methods [59]. In contrast, there are many interpretable by
design proposals 78 89 6 49 31; however, most of them focus on enhancing interpretability only in the last layers. In 78 the final linear layer is replaced with a differentiable decision tree, and in 1891, loss is used to make each filter of the very high-level convolutional layer represent specific object part. In [6), the model's output is compared with Iearnt prototypes, whereas in [3]] represents concepts on which humans can intervene.
Another direction for enhancing interpretabilityy is through disentanglement. While there is not yet a generally accepted definition, disentanglement aims at separating the main factors that are Still, existing approaches focus on disentangling the factors at single vector/tensor (the latent representation), which is either the input or the output of a network. This applies to (variational) autoencoders (24 5 7 30 14), generative adversarial networks 8, 46 28), normalizing flows [15
present in the data distribution 4
23 44
63 or even architectures that aim to decompose the content to the style representation of an image 19 17 In contrast, we approach disentanglement as "the way information travels through the network" (60) and look at the neural network architectures for classification as a whole. Specifically, our goal is to control the paths through which information flows by assigning each part of the network to specific subsets of classes. Related to our work is [8 where they interpret a deep neural network by identifying such information paths; one key difference is that they use a post hoc method, so the paths identified and not designed.
There are two additional lines of work related to ours. The first line proposes to dynamically control the path that a sample follows through the network by letting an extra network choose which parts to
be pruned/omitted [39 9 2 [8| 79 76 43] This brings memory and speedup gains during inference, since the samples do not pass through the entire network. Our proposal has few key

---

N-th wnbNN
0
D-ndd working for pattomollle hore track
clasor (bird) home
Coding scheme
1,1x1,
1,
c,1xi
1,
C, 1,
c,1x 1,
block 1 with 3/10
paths
VauhNNG
airplane
1001 0010.0
d.3 3,6
3,d
d,3
x
d,3 x 3,
d,3 x 3, 4
automoble
0110001000
101000000h
d x 1,0
1,1x11c
1,1x1,c
4,1 1,1
4,1x1.0
d, 1,C
Enorgy Nortaalizttin
0001010100
ResNeXt block
Compute Sade this block
dog
0010100100
frog
0000110018
Drop Sub
Norse
01000100001
0001100001
Coded ReaNeXt block
truck
1100000010
ry 1)
biuaey digits
(8)
(b)
(c)
Figure I: Building block of ResNeXt and the proposed variant. (a): ResNeXt block. A layer shown as (# in channels, kernel size, # out channels). (b): Coded ResNeXt block. With light violet color we depict the architectural addition and with beige the algorithmic ones. The energy normalization keeps the total sum of the subNNs' output energies constant. Each subNN's output can be zeroed by the dropSubNNS operation with probability Párop- Depending on the class of the sample, the loss Leode. pushes the total energy to be allocated among subNNs with specific order. (c): An example of the order we used for CIFAR-10. We name this table the coding scheme of the Coded ResNeXt block; this is defined before training and is kept fixed afterwards. To design the coding scheme we follow some general rules described in Section 3.2.1 The ratio ri = 3/ 10 means that for the (-th block Nact.1 = 3 out of N = 10 subNNs will work for each class. The Leade,1 tries to match the output energy of the subNNs to their corresponding digit, depending on the binary codeword of the class.
differences with these works. First, we do not use any extra network that has to be trained to learn good paths. Second, our paths are defined prior to training (and thus not learnt.. Most importantly, these works do no guarantee that two samples of the same class follow the same path, so is not possible to extract class-specific network portions use as single-purpose models. The second line of work concerns models that can make early predictions without evaluating the whole network (64]
we also apply loss functions to the middle layers which facilitates early predictions; however, all those works necessitate additional parameters that are trained as classifiers performing early predictions. In our case, since we force each class to have a unique activation footprint on every middle layer, the early predictions emerge naturally by just looking at the activation patterns created in the middle layers as the samples are forwarded.
Similarly to some previous works 38 66
29
92
X2
While in this work we assign classes to parts of the network arbitrarily, an interesting possibility is to exploit semantic/visual similarities for the assignment, similarly [2] This may lead to improvements in performance and interpretability, but it comes with some caveats. In particular, it is not always available or straightforward to obtain these semantic relationships. In (II), for instance, to perform classification on ImageNet, the authors had to resort to another database (WordNet [66).
3
Coded ResNeXt
3.1 The block
The typical ResNeXt block 884 is depicted in Fig. aa). It takes input x E RC (C is the number of input channels and H. W are the height and width of the input planes, respectively) and outputs of the same dimensions. It consists of N paths/branches (N is called cardinality in (44) Each branch, which is called sub-neural nenwork (subNN) here, performs transformation Tay n E (1,...NN) N} which are all aggregated together with the input x, giving the block's output y:
N
y ー
(x).
(I)
n=1
3

---

3.1.1 Energy Normalization
For the Coded Rt block depicted in Fig. lb), the sole architectural change we introduce is the Energy Normalization applied before aggregating the transformed inputs Tx(x)) E xCxHxW For convenience, let in (x). If (tn)e,h.e E R the element of tn position (c, h, w). then we define function & as:
C W E(t,) CHW ΣΣΣ
((t))
h=
which gives the mean energy of the output signal of the n-th subNN. Energy Normalization simply divides the outputs of all branches by scalar value equal to the square root of the total mean energy. i.e
to with Eang - N E 8(4),
1 E (I, ,N..
T,
/aay
Given that E(ax) = (x) for scalar E Rgo. it is easy to see that this step normalizes the total energy, since after it, the sum of the energy of all subNNs becomes E (f,,)
N.
3.1.2 Coding Loss
We present here our first algorithmic addition. After the Energy Normalization, we compute a novel loss function, coined coding loss Leode. Consider classification problem of K classes. Let be the index of the position of ResNeXt block within the network. As seen in Fig. [c). for that block, we assign to each class a binary codeword wi,k, E (1,... K) of length N, indicating which subNNs we want to activate for that class. If the n-th subNN operates for class k, then the n-th digit of wi.e is (wr,a)n = 1, and (w),))n otherwise. To ensure that each class receives the same number N Noet. of operating subNNs, all K codewords are designed with exactly Nact,1 ones. We define the ratio
N Naot,1 N
T1
(4)
which measures how much each class utilizes the block's total computational resources. We term the mapping of the classes to codewords, as in Fig. (c), the coding scheme of the block.
Given input of class k the coding loss forces the mean energies of the subNNs that inactive for class l to zero and those of the active subNNs to positive values. The coding loss for the I-th block is
N
Leode,1
Σ (riE(fn) - (wI,)))) N
1
(5)
Note that after the Energy Normalization, the total subNNs mean energy is ΣN E(G)) N, while the codeword has Nact, = r;NV ones, hence we multiply (fi) by ri.
We remark that the choice of setting the exponent is carefully made. For example, setting it to 2, the accuracy for CIFAR-I0 drops from 94.4% to 93.1%. which further drops to 87.1% the absolute value is used. An exponent of is much more demanding than the one of 4 matching precisely the output energies to the rules of the coding scheme, and therefore it seems to considerably restrict the flexibility of the function of the subNNs, degrading in turn the overall performance. This trend is exacerbated with using the absolute value. We observed as well the same behavior in CIFAR-100.
3.1.3 DropSubNNs
The second algorithmic addition a type of dropout [69, similar techniques such as SpatialDropout (5). StochasticDepth [26]. and DropPath [35]. Seeing each subNN as one more complicated neuron, we apply dropout to it, so its output is zeroed with a fixed probability Pärop. This method is coined as DropSubNNS. Our aim is to reduce the "co-adaptation" effect (69 on the subNN level, according to which subNNs collaborate in groups instead of trying to independently produce useful features. In implementation, apply the same random mask to all blocks that have the same coding scheme.

---

3.2 The Network
The complete network is constructed as a sequence of blocks. The Energy Normalization, Leade. and dropSubNNS are applied only to blocks whose subNNs we want to specialize in some subsets of classes. Thus, for blocks with ri = N/N 1, we use the conventional ResNeXt block as in Fig. 1 a). In that sense, the ResNeXt model is a Coded ResNeXt model where all blocks have 17 N/N.
3.2.1 Coding Scheme Construction
We remark that the coding scheme is constructed before training, and that the subNNs are trained to comply with this fixed, predefined, scheme. In general, the coding scheme can be arbitrary, and can possibly incorporate semantic similarities between classes. However, we aim to make proof of concept where it is possible to specialize subNNs to subsets of classes defined before training, even in the case when the classes within those subsets may not be semantically related. Specifically, we found that even when the coding schemes are designed in an agnostic way with respect to the nature of the classes, good performance is guaranteed if some general construction rules are followed.
We construct one coding scheme per ratio ri so that a coding scheme is uniquely characterized by the ratio ry and any two blocks 1, l' with r = ry. have exactly the same coding scheme. A general rule we follow is that the deeper the network block is (i.e., the larger / is), the smaller is the r7 assigned. The first blocks have ri N/N so that their subNNs produce low-level features. potentially useful for recognizing any of the classes. Deeper blocks have smaller ry so that their subNNs specialize on a subset of classes. 2 This rule not only is intuitive, but also works better in practice. For instance, in CIFAR-100, changing the proposed ratios (20/20, 8/20, 4/ 20) to (8/ /20 8/20, 8/20) drops the accuracy from 78.8% to 77.9%, and inverting the order into (4/20, 20, 8/20, 20/20) gives 76.7%.
Given a block with ratio rı, we would like the coding scheme to satisfy the following three rules:
A. The number of "I"s must be equal to Nact,1 = T; with N being the codeword length.
Moreover, we want to avoid under- or over-utilizing any subNN, in the sense of assigning too few or too many classes for to process. As a result, the second rule is:
B. Seeing the coding scheme as a binary table, as in Fig. c), the sum of each column should be approximately the same.
Finally, we aim at making the set of subNNs dedicated to work for a class, to be as different as possible from the sets assigned to the rest of the classes. This translates to:
C. The minimum Hamming distance between all pairs of codewords should be as high as possible.
Given ry and N, many coding schemes that follow the above rules may exist. For example, permuting the rows and/or the columns of the binary matrix in Fig. [c) gives new valid coding schemes. We experimentally checked (on CIFAR- 100/000 that any scheme that satisfies the above properties provides similar results. Wanting to find K binary codewords of length N that only satisfy rule C is already an NP-Hard problem and in our case there are two additional rules. For that, we resort to an heuristic algorithm, presented in Appendix [A] which finds good coding schemes according to the above rules and was used to generate the codes of all our experiments. On a high level, the algorithm first constructs the set of all binary codewords of length N with Nact ones (rule A). Second, it extracts from it subset containing only codewords whose mutual Hamming distance is always higher than a given threshold (rule C). Finally, it extracts multiple combinations of K codewords from that subset and checks which one is good coding scheme in terms of how well rule B is satisfied. Finally, we notice that the above coding scheme has some interesting connections with constant- constant-weight codes.
3.2.2 Architecture and Total Loss
We succinctly describe a Coded ResNeXt block as [Cout, d, rt). with Cout being the number of channels the block outputs and d being the bottleneck width as in ResNeXt [84]. A conventional ResNeXt block is expressed as [Cout, d, N/N]. Following [84. given the number of subNNs N,
the bottleneck width d is determined so that the blocks have about the same number of parameters
In fact. the last linear layer of the ResNeXt can be seen as K subNNs, each performing a simple linear combination, and the coding scheme has the lowest possible ratio r = 1/K (i.e., codewords are one-hot vectors).
5

---

Stage
Coded ResNeXtt22 (10x 11d)
Coded ResNeXt-29 (20x6d) for CIFAR-100
Coded ResNeXt-50 (32x4d)
for CIFAR-10
for ImageNct
conv 7x7, 64, str. 2, 3x3 max pool, str. 2
s0
cony 3x3, 64
conv 3x3, 64
81
[256, 11, x3
256., 6, 20/20] x
[256, 1, 1,32/33) x3
s2
[512, 22, 5/ 3/10|x3 x3
[512, 12, 8/20]
x
[512, 8, 32/32 x4
83
[1024, 44,3/ 3/10 x3
[1024, 24, 4/20) x 3
[1024, 16, 16/32 x6
s4
global avg. pool, 10-d fe global avg. pool, 100-d fc
[2048, 32, 8/32] x3
global avg. pool, fc
Table 1: Architecture for each dataset. A block described by [Cout, d, Nact /N with Cout being the number of channels it outputs and d being the bottleneck width. For CIFAR architectures, stages sl, s2, s3 have approximately 0.2, 0.9, 3.5 million parameters, respectively (in total 4.7M). For ImageNet, sl, s2, s3 and s4 have 0.2.M, 1.2M, 7.0M and 14.5M, respectively (in total 25.0MM..
and FLOPs as the corresponding blocks of the original ResNet bottleneck architecture 22 Table | presents the networks trained for CIFAR-10 (C10), CIFAR-100 (C100) [22,, and ImageNet-II Ik (IN)
61 classification datasets. In CIFAR- 10/100 we chose N to small yet sufficiently high to enable reducing 77 to less than 0.25 and still obtaining coding scheme with minimum Hamming distance not less than For ImageNet we used the default values of ResNeXt-50. Remarkably, even though the number of classes increases exponentially across datasets (K E {10, 100, 1000)), strong coding scheme can be found to efficiently share the subNNs between classes, so that (a) random pairs of classes are assigned to very different subsets of subNNs; and (b) only a linear increase of the number of subNNs (N E {10, 20,3) 32]) is needed.
Let Celass be the conventional cross entropy loss and Boode be the set of indices / pointing to the blocks with ratio ri 1. Let μ be a loss-balancing constant; then the total loss used to train the network is
Liot Lelass + a Σ Lende,
LEBonde
4 Experiments
In this section, we present experimental results to assess the performance of the proposed Coded ResNeXt. First, we show that our algorithm achieves subNN specialization. To demonstrate this we show that when the subNNs specialized on the class of interest are removed, the performance degrades, whereas it remains the same or even improves when the subNNs removed are not specialized for that class. To further prove the specialization, given class, we keep only the subNNs assigned to that class. That way, we retrieve a lightweight single-purpose binary classifier, accurately deciding whether the input sample belongs the class or not. Finally, we show that it is possible to get good predictions from intermediate blocks without evaluating the whole network. Those predictions can also be used to provide confidence on whether the final network's 's prediction correct.
4.1 Setup and Validation Accuracy
In order to make a fair comparison with ResNeXt, on ImageNet [6] we follow the training process proposed by timm li- brary M. The epochs are 250 (first 5 as warmup 20 and last 10 cooling down), the batch size is 1536, and the learning rate 0.6. Rand/Augment [10] of 2 layers and magnitude (varied with a standard deviation of 0.5) is used and also random erasing augmentation [9T] with probabil- ity 0.4 and 3 recounts. We diverge from
Coded ResNeXt
(p. Pdrop)
ResNeXt
CIFAR-10
(6, 0.1)
94.41 %
93.66%
CIFAR- 100
(6, 0.1)
78.76%
76.86%
ImageNet
(2, 0.1)
80.24%
79.50%
Table 2: Default hyperparameters and validation ac- curacy. For Coded ResNeXt on ImageNet 80.24% is the mean of 3 runs, which gave almost identical results (80.21% %, 80.25%, 80.26%).

---

t10 Inact.
100
100
C10-Ramoie act.
Ceeoeeerove Inact.
Accuracy (50
85
IN- IN-Remove inact.
C100-Rennive
Prectiion (Sa
IN-Remove
70
brdd
dog
cat
In Insdistrio, Negatives Our-af-distr. Negatives
70.0
72.5
75.0
27.5
00.0
60
80
100
Number of Removed SubAINs
Recall 19))
Recall 1%5
(a) Removing Nu of a block. (b) Precision-Recal CIFAR-10.
(c) Precision-Recall on ImageNet.
Figure 2: Demonstrating the specialization of subNNs to their assigned set classes. (a) Performance when removing active versus inactive subNNs from specific block. (h) -eciall from all extracted binary classifiers trained on CIFAR-10 10. Out-of-distribution negatives are the validation set of CIFAR-I00. (c) Precision- Recall from all extracted binary classifiers trained on ImageNet. The larger the marker, the more points fall into that area.
the timm's 's proposed process only on the resolution of the input training images. We reduce the resolution from 224 to 160, since the TPU-v2 of Google Colab (the platform used for periments) the training would take more than three weeks. Still, timm reports 79.77% accuracy for the ResNeXt-50, which is clearly smaller than the one of Coded ResNeXt-50, despite being trained with lower resolution. In Appendix B we provide further details, including the training procedure for CIFAR.
In Table 2 we compare the accuracy of Coded ResNeXt against the corresponding ResNeXt (i.e., when setting all ratios ry equal to 1). We observe clear improvement in accuracy across all datasets. Surprisingly, forcing the subNNs to specialize to specific set of classes yields significant gains even the assignment of classes to subNNs is done in way agnostic to the semantics of the classes. Table presents the default values used for the introduced hyperparameters (J,, Parop) and the achieved validation accuracy. In Appendix D we perform ablation study on those hyperparameters.
4.2 Specialization
A key idea of our work is to specialize each subNN to specific subset of classes; hence the first exper- iment is designed to whether our architecture succeeds in achieving specialization. Assuming subNN is assigned to activate for some class, if this subNN helps indeed on the classification process of images belonging that class, removing this active subNN should negatively impact this process. On the other hand, if that subNN is not assigned to that class, then it should remain inactive during the process, so removing it should have no impact (degradation) on the performance.
For the first experiment we pick a block / from which we randomly remove SubNN in two ways. Given the class of the input image sampled from the validation set, the first way randomly removes &< subNNs from the set of active for that class subNNs. The second way randomly removes K<N Noet, subNNs from the (complementary) set of inactive subNNs for that class. For illustration, in Fig. 2a we pick the last block of stage s2 in the architecture for CIFAR (see Table [T) and the second of stage s4 for that for ImageNet. Figures with respect other blocks are presented in Appendix
In Fig. 2a we observe the same behavior across all datasets, which confirms that the more active subNNs are removed, the more the performance degrades. Interestingly, when removing inactive ones, the accuracy tends to increase. Our interpretation is that even though the inactive subNNs trained output zero signal, this is never perfectly achieved in practice and their output always interferes with that of the active subNNs. Thus, taking out the interferers could improve accuracy. Note that this higher accuracy of the neural network not actually achievable since to remove subNN we need to know priori the class of the input so as to know the set of (in)active subNNs for that class. Finally, we remark that even if all active subNNs are removed from one block, the
'Removing subNN from block in this architecture is equivalent to zeroing all of its parameters or to zeroing its output before the Energy Normalization.
7

---

In-distribution Negatives Out-of-distrib. Neg. from C100
In-distribution Positives
In-distribution Negatives Out-of-distrib. Neg. from C10
In-distribution Positives
busti Positives in-distribution Negatives
-7.5 -5.0 -2.5
logit of Binary Classifier
0.0
2.5
5.0
7.5
-5.0 -23 0.0
logit of Binary Classifier
2.5
5.0 7.5 20.0 22.5
logit of Binary Classifier
Figure 3: Output distribution of Binary Classifier (BC) of the first class (airplanes, apples, tench) of each dataset (CIFAR-10, CIFAR-100, ImageNet, respectively).
performance does not necessarily plummet. We believe that the reason behind this is that, in that case, information can still pass from the previous block the next one through the skip connection.
4.3 Binary Classifier
Having confirmed that the subNNs specialize their assigned subset of classes, we proceed with testing this property to the extreme. For that, instead of randomly removing few subNNs from one block, given a class k., we remove from all blocks all subNNs not assigned class k. The rationale behind this is to check whether by keeping only the SubNNs specialized on one class we can obtain a binary classifier capable of recognizing that class among the others.
In Fig. 3 we pick the first class of CIFAR-I0/ 10/100 and ImageNet ("airplane", "apple", and "tench", respectively) and remove all inactive subNNs for that class. We also remove from the final linear layer everything except its first row of parameters so as to keep only the first logit corresponding to the first class. That way, retrieve sub-model whose output is one-dimensional. Figure depicts with blue the output distribution when inputting samples of the validation set belonging to the first class of the dataset (i.e., in-distribution positives), and with red when the samples belong some other class (i.e., in-distribution negatives). Clearly, the extracted sub-models do operate as binary classifiers giving high output when fed with samples of the class for which they are specialized. To further showcase the specialization, for the sub-models trained on CIFAR-10 (resp. CIFAR- 100) we input samples that belong the validation set of CIFAR- (resp. CIFAR-10), Those are considered out-of- -ffoo---iitiitttion (OOD) predictions, since the sub-model has never been trained on such samples. Nevertheless, as Fig. 3 shows, the extracted BC still perform very well. A possible justification for the the good OOD performance of the extracted BC is the functional lottery ticket hypothesis (87). which states that every full network contains subnetwork that can achieve better OOD performance.
Therefore, with a single training of large mulli-purpos neural network, we can straighfforwardly extract multiple single-purpose models that are considerably lighter (38%, 27%, and 35% of the initial parameters for CIFAR-1O, -FFRR-100, and ImageNet architectures, respectively). Given a threshold distinguishing between positive and negative predictions, each of those models becomes
BC. We set that threshold to the value maximizing the Fl-score of the BC when fed with samples from the training dataset. In Figs. 2b and 2 the performance of the BCs (on the validation set and the out-of-distribution set) is depicted in precision-recall plots. Notably, for 100 the worst performance obtained by the BC for "cats" when fed with CIFAR- 100's out-of-din -iitr----ittiuttion samples. This seems reasonable, since we request from the classifier to distinguish cats from classes like leopard, lion, and tiger, but without having "seen" any sample of them during training.
In ResNet, complete blocks can be removed without severely degrading the accuracy 77 Hence, it is reasonable to ask whether the conventional ResNeXt is also robust to the removal of subNNs and thus, good BCs can be extracted from it without the need for our proposed modifications. Interestingly, this is not the case and the answer negative. In CIFAR-10 for instance, the extracted BCs from the
"The validation set of ImageNet has 50 positives and 999+50-19995 negatives per class. In Figure 2c we consider only 9+50=450 randomly selected negatives to compute the precision and recall. We do that (1) in order to keep the same ratio of positives versus negatives as in CIFAR-10 10 and allow comparison, and (ii) because the dataset is very skewed; e.g., even a very conservative threshold that misclassifies only 1% of the negatives results into approximately 500 false positives. Since they are only 50 positives, the precision becomes 10%.
8

---

Coded ResNeXt give on average precision 93% and recall 77% (Fl-score Fi 84%). Attempting to extract likewise BCs from ResNeXt leads to precision 13% and recall 56%. Finally, given class, the complete ResNeXt architecture can be seen as BC by considering its output to be only the corresponding logit. Comparing such BCs to the extracted BCs seems unfair since the extracted BCs not only have 2.5 times fewer parameters, but also have never been trained as independent models. Nonetheless, this may serve as a baseline. For CIFAR-10 10 this baseline gives BCs with average precision 79% and recall 94% (Fi 86%). Additional details and plots are provided in Appendix F
4.3.1 Why ResNeXt?
In this subsection, we provide insights on why the subNNs achieve specialization and we highlight why ResNeXt serves the appropriate architecture upon which to build our idea. The objective of our work to construct networks which the per-class information is forced to flow through specific paths (determined here by the coding schemes). To achieve this, we employ (i) operation (energy normalization) that limits how many subNNs can be activated; and (ii) a loss function foreing which ones should be activated. Intuitively, those operations should suffice for constraining the information to flow through the active subNNs. A natural question that arises is how accurate this is. Let us assume that it is accurate. Then, keeping those operations unaltered and changing only the way the subNNs' outputs are passed to the subsequent blocks should not impact the flow of information. However, if instead of aggregating them by summation, they concatenated, the performance of the extracted BCs becomes poor (precision < 20%). It seems that the concatenation inhibits the "information" pass only through the designated paths, since the performance degrades when inactive subNNs (which in theory should not participate in those paths) are removed. Let us see why.
When concatenating the outputs of the I-th block, the information about which are the inactive subNNs is preserved, thus the (th block may depend its operation on which subNNs of the (-th block provide zero output. This allows information to "leak" from the inactive subNNs. On the contrary, the information that some subNNs provide zero output is lost when adding them to the final output of the block. For that reason, the ResNeXt architecture (which aggregates the outputs by summation) is very well suited for developing our idea controlling the information paths. Interestingly, another popular block called MBConv proposed for MobileNet- V2 [62] (and later used for EfficientNets (74) bears a resemblance to ResNeXt block and is also good candidate for incorporating our ideas. We elaborate more in Appendix E
90
5/50
3/10
CIFAR-10
CIFAR- 100
ImageNet
70
number of early decoders agreeing with final prediction
52.0%
48.7%
46.6%
60
Accuracy
67.7%
69.5%
70.5%
50
40
7, 4,20
2
77.2%
77.2%
87.3%
30
3
83.2%
87.7%
90.7%
20
decoders CITAR10
Eaaryde decoders CIFAR100
89.9%
90.7%
90.9%
10
0.
Early decaders ImageNet
1%
90.6%
91.1%
softmax
Block Casaa ResNext-29
6
98.1%
95.8%
92.6%
10
11
12
13
14 15
16 17 softmax
Block incex for Coced ResNeXt-50
Table 3: Accuracy of final prediction (%) given the number carly decoders giving the same prediction.
Figure 4: Accuracy of the early decoders.
4.4 Early Decoding
Coded ResNeXt improves accuracy over ResNeXt while enabling the extraction of multiple lighter single-purpose models with a single training and providing transparency on how information flows throughout the network. Here we show that leveraging coding theory to design when and which subNNs should be activated allows exploiting Coded ResNeXt in other ways.
Given block I with ri 1, i.e., I E Beode, the coding scheme maps each class k {1..... K} in one-to-one fashion to a codeword Wi, and then the training pushes the energies t) E Ro of the block's s subNNs output to match that codeword. This allows for each E Boode to measure the vector N find the codeword ki, k {1.... ..... K} having the minimum distance to 27, and

---

consequently predict the class of the sample, As a result, each block E coode becomes an early decoder predicting label arg min ||0| w1,al22 E {I.-.. K). with || 1111 being the L2 norm.
In Fig. 4 we depict the accuracy of every block ( E Boode when functioning as an early decoder. Interestingly, as a sample passes from one block to the next one, the probability of being correctly decoded increases. In Appendix D we show that as the coefficient μ of Loode, increases, the early decoders get improved, but past a certain point this comes at the expense of the overall accuracy.
Finally, we illustrate another possible utility of the early decoders. In Table we measure the accuracy of the network's 's final prediction given how many early decoders also provide the same prediction. It is obvious that the more decoders agree with the final prediction, the higher the probability to be correct. Therefore, early decoders provide a confidence estimation on the correctness of the network's prediction. Specifically, they can be source of extra features used to improve state-of-the-ae confidence calibration methods [2I]. We further analyze this in Appendix C
Conclusion
In this paper, we proposed network architecture in which the information related to each class flows through distinctive and clearly defined paths. We depart from the ResNeXt architecture and apply few yet crucial modifications that allow achieving higher accuracy and have several additional attractive properties. First, we specialize each part of the model on a specific and fixed subset of classes, which -given a certain class- enables to obtain binary classifier for that class by keeping only the relevant parts of the network. Second, it allows to obtain early predictions without the need for entirely evaluating the network. Third, if fully evaluated, confidence level can be produced on the correctness of the final prediction. In this work, we achieved specialization without having to rely the semantic similarities between classes. Nonetheless, we conjecture that further gains (higher accuracy, lighter binary classifiers, smaller network, etc.) can be obtained by exploiting such similarities. Finally, while in this work we have shown that our method outperforms Re in image classification, future directions may include comparing in other computer vision tasks such as detection, few-shot learning and robustness against adversarial attacks.
Acknowledgements
The authors are grateful to Angelos Katharopoulos and Marina Costantini for helpful discussions and remarks, and also thank the anonymous referees for their useful and constructive comments. The work of A. Avranas has been supported by the EURECOM SURECOM-Huawer Chair on Advanced Wireless Networks. M. Kountouris has received funding from the European Research Council (ERC) under the European Union's 's Horizon 2020 research and innovation programme (Grant agreement No. 101003431).
References
[1] timmdocs, training scripts. Stttps://time fast. wwttaaaiiigg_crrppipppeepepeeepp Accessed: 25-4-2022.
[2] Babak Ehteshami Bejnordi, Tijmen Blankevoort, and Max Welling. Batch-shaping for learning conditional channel gated networks. arXiv preprint A907: 190700677 2019.
[3] Irwan Bello, William Fedus, Xianzhi Du, Ekin D Cuhuk, Aravind Srinivas, Tsung-Yi Lin, Jonathon Shlens, and Barret Zoph. Revisiting resnets: Improved training and scaling strategies. In NeurlPS, 2021.
[4] Yoshua Bengio. Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 1588))1798-11822 2013. [5] Christopher P Burgess, Irina Higgins, Arka Pal, Loic Matthey, Nick Watters, Guillaume Desjardins, and Alexander Lerchner. Understanding disentangling in 8-vae. arXiv preprint arXiv: (CCV::/800003999, 2018
[6] Chaofan Chen, Oscar Li, Chaofan Tao, Alina Jade Barnett, Jonathan Su, and Cynthia Rudin. This looks like that: deep learning for interpretable image recognition. arXiv preprint arXiv: 1806. 10574, 2018. [7] Ricky TQ Chen, Xuechen Li, Roger B Grosse, and David K Duvenaud. Isolating sources of disentanglement in variational autoencoders. Advances in neural information processing systems, 31, 2018.
[8] Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. Advances in neural information processing systems, 29, 2016.
[9] Zhourong Chen, Yang Li. Samy Bengio, and Si Si. You look twice: Gaternet for dynamic filter selection in CNNs. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9172 9180, 2019.
10

---

[10] Ekin D Cubuk. Barret Zoph. Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with reduced search space. In CVPRW, pages 702-703, 2020.
[11] Jia Deng, Nan Ding, Yangqing Jia, Andrea Frome, Kevin Murphy, Samy Bengio, Yuan Li, Hartmut Neven, and Hartwig Adam. Large-scale object classification using label relation graphs. In European conference on computer vision, pages 48-64. Springer, 2014.
[12] Jia Deng, Sanjecv Satheesh, Alexander Berg, and Fei Li. Fast and balanced: Efficient label tree learning for large scale object recognition. Advances in Neural Information Processing Systems, 24, 2011.
[13] Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. Visualizing higher-layer features of deep network. University of Montreal, 13 (341 2009.
[14] Babak Esmaeili, Hao Wu. Sarthak Jain, Alican Bozkurt, Narayanaswamy Siddharth, Brooks Paige, Dana Brooks, Jennifer Dy, and aa--illem Meent. Structured disentangled representations. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 2525- 2534. PMLR, 2019.
[15] Patrick Esser. Robin Rombach, and Bjorn Ommer. A disentangling invertible interpretation network for explaining latent representations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Puttern Recognition, pages 9223-9232, 2020.
[16] Christiane Fellbaum et al. Wordnet: An electronic lexical datahase mit press. Cambridge, Massachusetts,
1998.
[17] Aviv Gabbay and Yedid Hoshen.
Demystifying inter-class disentanglement.
arXiv preprint
17%v 2019.
[18] Xitong Gao, Yiren Zhao, Lukasz Dudziak, Robert Mullins, and Cheng- zhong Xu. Dynamic channel pruning: Feature boosting and suppression. arXiv preprint arXiv:1810.0532 05330, 2018.
[19] Leon A Gatys, Alexander S Eeker, and Matthias Bethge. Image style transfer using convolutional neural networks. In Proceedings of the IEEE conference computer vision and pattern recognition, pages 2414 2423, 2016.
[20] Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet I hour. arXiv
preprint arXiv:1706. 02670.0227772.000 2017.
[21] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning, pages 1321-1330. PMIR, 2017.
[22] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition.
In CVPR, pages 770-778, 2016.
[23] Irina Higgins, David Amos, David Pfau, Sebastien Racaniere, Loie Matthey, Danilo Rezende, and Alexan- der Lerchner. Towards a definition of disentangled representations. arXiv preprint 1rXiv:1812.022301 2018.
[24] Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. ß-vae: Learning basic visual concepts with a constrained variational framework. 2016.
[25] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, pages 7132-7141, 2018.
[26] Gao Huang. Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In ECCVV pages 646-661. Springer, 2016.
(27] Sergey loffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Int. Conf. on Mach. Learn.. pages 448 456. PMLR, 2015.
[28] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 4401-4410 2019.
[29] Yigitcan Kaya, Sanghyun Hong, and Tudor Dumitras. Shallow-deep networks: Understanding and mitigating network overthinking. In International conference machine learning, pages 3301-3310.
PMLR, 2019.
[30] Hyunjik Kim and Andriy Mnih. Disentangling by factorising, In International Conference on Muchine Learning, pages 2649-2658. PMLR, 2018
[31] Pang Wei Koh, Thao Nguyen, Yew Siang Tang. Stephen Mussmann, Emma Pierson, Been Kim, and Percy Liang. Concept bottlencck models. In International Conference on Machine Learning, pages 5338-5348, PMLR, 2020.
[32] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
[33] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. NeurlPS, 25:1097-1105, 2012.
[34] Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In NeurlPS, pages
950-957. 1992
[35] Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Fractalnet: Ultra-deep neural networks without residuals. arXiv preprint arXiv: 1605.07648, 2016.
[36] Yann LeCun, Bernhard Boser, John Denker, Donnie Henderson, Richard Howard, Wayne Hubbard, and Lawrence Jackel. Handwritten digit recognition with back propaaropng network. NewrIPS, 2, 1989.
11

---

[37]
Yann LeCun. Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2333 2324, 1998.
[38]
Chen- Yu Lee. Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeply-supervised nets. In Artificial intelligence and statistics, pages 562-570. PMLR, 2015.
[39] Changlin Li, Guangrun Wang, Bing Wang. Xiaodan Liang, Zhihui Li, and Xiaojun Chang. Dynamic slimmable network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8607-8617, 2021.
[40] Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kereel networks. In CVPR, pages 510-519,
2019.
[41] Ji Lin. Yongming Rao, Jiwen Lu, and Jie Zhou. Runtime neural pruning. Advunces in neural information processing systems, 30, 2017.
[42] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint
1805509005.........0090005555555 2018.
[43] Lanlan Liu and Jia Deng. Dynamic deep neural networks: Optimizing accuracy-eflciency trade-off's by selective execution. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
[44] X Liu, P Sanchez, S Thermos, AQ O'Neil, and SA Tsaftaris. Learning disentangled representations in the imaging domain. arXiv preprint arXiv:2108. 12043, 2021.
[45] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint 2016.
[46] Sudipto Mukherjee, Himanshu Asnani, Eugene Lin, and Sreeram Kannan. Clustergan: Latent space clus- tering in generative adversarial networks. In Proceedings of the AAAI conference on artificial intelligence,
volume 33, pages 4610-4617, 2019.
[47] Mahdi Pakdaman Naeini, Gregory Cooper, and Milos Hauskrecht. Obtaining well calibrated probabilities using bayesian binning. In 7wenty-Ninth AAAI Conference on Artificial Intelligence, 2015.
[48] Vinod Nair and Geoffrey E Hinton. Rectified lincar units improve restricted boltzmann machines. In Int. Conf. on Mach. Learn., 2010.
[49] Mcike Nauta, Ron van Bree, and Christin Seifert. Neural prototype trees for interpretable fine-grained image recognition, In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14933-14943, 2021.
[50] Yurii E Nesterov. A method for solving the convex programming problem with convergence rate o (1/K" 2).
In Dokl. akad. nauk Ssar, volume 269, pages 543-547, 1983.
[51] Anh Nguyen, Alexey Dosovitskiy, Jason Yosinski, Thomas Brox, and Jeff Clune. Synthesizing the preferred inputs for neurons in neural networks via deep generator networks. Advances in neural information processing systems, 29:3387-3395, 2016.
[52] Alexandru Niculescu- Mizil and Rich Caruana. Predicting good probabilities with supervised lcarning. In Proceedings of the 22nd international conference on Machine learning, pages 625 632,, 2005. [53] Aaron Van Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. In Maria Florina Balcan and Kilian Q. Weinberger, editors, Proceedings of The 33rd International Conference on Machine Learning, volume 48 Proceedings of Machine Learning Research, pages 1747-1756, New York, New York, USA, 20-22 Jun 2016. PMLR.
[54] Vitali Petsiuk, Abir Das, and Kate Saenko. Rise: Randomized input sampling for explanation of black-box models. arXiv preprint arXiv:1806. 07421, 2018
[55] Hieu Pham, Melody Guan, Barret Zoph, Quoe Lc, and Jeff Dean. Efficient neural architecture search via parameters sharing. In International conference machine learning, pages 4095 4104. PMLR, 2018. [56] John Platt et al. Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Advances in large margin classifiers, 10(3):61-74, 1999.
[57] Estehan Real, Alok Aggarwal, Yanping Huang, and Quoe V Le. Regularized evolution for image classifier architecture search. Proceedings of the aaai conference on artificial intelligence, volume 33, pages
4780-4789, 2019.
[58] Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. " whhy should i trust you?" explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pages 1135 1 144, 2016.
[59] Cynthia Rudin. Stop explaining black box machine learning models for high stakes decisions and interpretable models instead. Nature Machine Intelligence, 1(5):206 215, 2019.
[60] Cynthia Rudin, Chaofan Chen, Zhi Chen, Haiyang Huang, Lesia Semenova, and Chudi Zhong. Interpretable machine learning: Fundamental principles and 10 grand challenges. arXiv preprint 1rXiv:2103.1/255 2021.
[61] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang. Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 115(3):211 252. 2015.
[62] Mark Sandler. Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang Chich Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 45200 2018.
12

---

[63]
Aadhithya Sankar, Matthias Keicher, Rami Eisawy, Abhijeet Parida, Franz Pfister, Seong Tae Kim, and Nassir Navab. Glowin: A flow-based invertible generative framework for learning disentangled feature representations in medical images. arXiv preprini arXiv:2103. 10868, 2021.
[64] Simone Scardapane, Michele Scarpiniti, Enzo Baccarelli, and Aurelio Uncini. Why should we add carly exits to neural networks? Cognitive Computation, 12(5) 2020.
[65]
Ramprasaath R Selvaraju, Michacl Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In CVPR, pages 618-626, 2017.
[66]
Robik Shrestha, Kushal Kafle, and Christopher Kanan. Occamnets: Mitigating dataset bias by favoring simpler hypotheses. arXiv preprint arXiv:2204.02426. 2022.
[67]
Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising
image classification models and saliency maps. arXiv preprint arXiv: 1et.:33326034 2013.
[68]
Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viégas, and Martin Wattenberg. Smoothgrad:
removing noise by adding noise. arXiv preprint 1oXivv/706.03882 2017.
[69]
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout:
A simple way to prevent neural networks from overfitting. Journal of Mach. Learn. Research, 15(56):1929- 1958, 2014.
[70] Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In Int. Conf. on Mach. Learn., pages
PMLR, 2017.
[71] Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In Int. Conf. Mach. Learn., pages 1139-1147. PMLR, 2013.
pages
[72] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pages
1-9, 2015.
[73] Christian Szegedy, Vincent Vanhoucke, Sergey loffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, pages 2818 221882226.2222 2016.
[74] Mingxing Tan and Quoe Le. EfficientNet: Rethinking model scaling for convolutional neural networks. In International conference on machine learning. pages 6105-61 14. PMLR, 2019.
[75] Jonathan Tompson, Ross Goroshin, Arjun Jain, Yann LeCun, and Christoph Bregler. Efficient object localization using convolutional networks. In CVPR, pages 648 188-656,222 2015.
[76] Andreas Veit and Serge Belongie. Convolutional networks with adaptive inference graphs. In Proceedings of the European Conference on Computer Vision (ECCV), pages 18, 2018.
[77] Andreas Veit, Michael Wilber, and Serge Belongie. Residual networks behave like ensembles of relatively
shallow networks. Advances in neural information processing systems, 29, 2016.
[78] Alvin Wan, Lisa Dunlap, Daniel Ho, Jihan Yin, Scott Lee, Henry Jin, Suzanne Petryk, Sarah Adel Bargal, and Joseph E Gonzalez. Nbdt: Neural-backed decision trees. arXiv preprint arXiv:2004.000 20222, 2020. [79] Xin Wang, Fisherr Yu, Zi-Yi Yi Dou, Trevor Darrell, and Joseph E Gonzalez. Skipnet: Learning dynamic routing in convolutional networks. In Proceedings of the European Conference on Computer Vision (ECCV). pages 409 424,-2442222 2018.
[80] Yulong Wang, Hang Su, Bo Zhang, and Xiaolin Hu. Interpret neural networks by identifying critical data routing paths. In Proceedings of the IEEF/CVE Conference on Computer Vision and Pottern Recognition, June 2018.
[81] Ross Wightman.
Pytorch image models.
httpp:///github.comm wwt.:////wwigiaaaa////mmmo
pytorch- image- mangge--oddssttreeee fests__ad_tpu 2019.
[82]
Maciej Wolezyk, Bartosz Wojeik, Klaudia Balazy, Igor Podolak, Jacek Tabor, Marek Smieja, and Tomasz Trzcinski. Zero time waste: Recycling predictions in early exit neural networks. Advances in Neural
Information Processing Systems, 34:2516-222 2528,, 2021.
[83] Zuxuan Wu, Tushar Nagarajan, Abhishek Kumar, Steven Rennie, Larry Davis, Kristen Grauman, and Rogerio Feris. Blockdrop: Dynamic inference paths in residual networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 881 8817-8826, 2018.
[84] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transforma- tions for deep neural networks. In CVPR, pages 1492-15000 2017.
[85] Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. arXiv preprint arXiv:1506.0000 15...06567677 06579, 2015.
[86] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07144 2016.
[87] Dinghuai Zhang, Kartik Ahuja, Yilun Xu, Yisen Wang, and Aaron Courville. Can subnetwork structure be the key to -iii-----dsttiitiinnnn generalization? In International Conference on Machine Learning, pages 12356-12367. PMLR, 2021.
[88] Hang Zhang, Chongruo Wu, Zhongyue Zhang. Yi Zhu, Haibin Lin. Zhi Zhang, Yue Sun. Tong He, Jonas Mueller, Manmatha, et al. Resnest: Split- attention networks. arXiv preprint arXiv:2004.00 08905,,0955555 2020. [89] Quanshi Zhang, Ying Nian Wu, and Song- Song-Chun Chun Zhu. Interpretable convolutional neural networks. In CVPR, pages 8827 8836, 2018.
13

---

[90] Zhao Zhong, Junjie Yan, Wei Wu, Jing Shao, and Cheng-Lin Liu. Practical block-wise neural network architecture generation. In Proceedings the IEEE conference computer vision and pattern recognition. pages 2423-2432, 2018.
[91] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In Proceedings of the AAAI conference on artificial intelligence. volume 34, pages 13001-13008, 2020.
[92] Wangchunshu Zhou, Canwen Xu, Tao Ge. Julian McAuley, Ke Xu, and Furu Wei. Bert loses patience: Fast and robust inference with early exit. Advances in Newral Information Processing Systems, 33: 18330-183441 2020.
[93] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference computer vision and puttern recognition, pages $697-8710 2018.
Checklist
1. For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper's
contributions and scope? [Yes]
(b) Did you describe the limitations of your work? [Yes]
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
(d) Have you read the ethics review guidelines and ensured that your paper conforms to
them? [Yes]
2. If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results? [N/A]
(b) Did you include complete proofs of all theoretical results? [N/A]
3. If you ran experiments..
(a) Did you include the code, data, and instructions needed to reproduce the main experi- mental results (either in the supplemental material as a URL)? [Yes] The datasets
are publicly available and the code is included in the supplementary material.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they
were chosen)? [Yes]
(c) Did you report error bars (e.g., with respect the random seed after running experi- ments multiple times)? [Yes]
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes]
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators? [Yes]
(b) Did you mention the license of the assets? [Yes]
(c) Did you include any new assets either in the supplemental material or as a URL? [Yss]
(d) Did you discuss whether and how consent was obtained from people whose data you're
using/curating? [N/A]
(c) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
5. If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, applicable? [N/A]
(c) Did you include the estimated hourly wage paid participants and the total amount spent on participant compensation? [N/A]
14


Reviews:
[{"review_id": "piP-mkXyuQ", "reviewer": "Reviewer_UvD6", "summary": "An algorithm is used to construct a coding scheme per-class over resblock subNNs, with a sparser coding scheme in later layers.  An auxiliary loss is used to encourage the activations to match the *fixed* coding scheme.  This specialization can then be used to construct binary classifier sub-networks from a trained model.  It also improves overall accuracy.  I think these results are interesting and on the whole the paper is well written, but the nature of the algorithm could be presented more clearly from the beginning (especially to give a flavor of what the coding scheme is).  \n\nNotes: \n\n  -Interested in interpretable feature.  Encourage class-specific information to flow through specific paths.  \n\n  -Each path can then be used as its own lightweight binary model.  \n\n  -Many architectures have a multi-branch design, such as inception, resnext.  This is usually justified in terms of downstream performance rather than specialization.  \n\n  -Binary codeword equal with length equal to number of branches is matched to each class, indicating branches to activate per class.  \n\n  -Possible to make half-size model which works per-class.  \n\n  -Intermediate layers can make early predictions.  \n\n  -Encourage zero energy for the de-activated blocks.  \n\n  -Fixed sparsity level over the different codes (such as 3/10).  Earlier layers have less sparsity than later layers.  ", "questions": "\n  -Scaling to very large number of classes?  \n\n  -The way that coding is induced still feels a bit ad-hoc, for example the use of 4th power in equation 5.  Does it not work to optimize something like a binary gumbel-softmax for each code and then try to encourage only a few to be active for each class?  \n\n  -I'm still a bit confused about how the coding scheme is set per class.  Is it random?  If not, is it some kind of top-k sparse softmax with learned parameters per-class?  \n", "limitations": "Limitations and ethics are well-discussed.  ", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "\nStrengths: \n\n\n  -The inactive block removal (Figure 2a) is quite nice.  \n\n\n  -The construction of the sparse binary classifier is also nice.  \n\n\nWeaknesses: \n\n\n  -After checking appendix, the coding scheme seems to be a fixed and not data driven algorithm.  While the full algorithm can be in the appendix, I feel like a high-level description of how this works should be presented much earlier in the paper.  \n\n\n  -The writing of the paper could do a lot more to explain how it works early on.  \n\n", "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": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "mkt4gXvvjdD", "reviewer": "Reviewer_fBFb", "summary": "The paper presents a novel way to guide information flow through a network allowing different paths to be followed for different predictions.  In the presented instantiation of the idea, the paper uses the ResNeXt network that follows different and disentangled paths for different output classes. The paper highlights the use of such a network for interpretability, as well as computational savings that can be obtained via this process. The results show that the network can achieve disentangled information paths without sacrificing any accuracy in the ImageNet-1K and CIFAR datasets. ", "questions": "# Comments\n\nC1: I would have loved to see a bit more analysis on how the disentanglement in the subnets translates to disentanglement (if any) in the feature space. Even a qualitative example by selecting a few distinct classes, and higher-level features that are shared/different for those classes would be a welcome addition. \n\n# Questions\n\nQ1. Could different coding schemes be used to allow networks to learn subnets based on other factors (e.g., metadata, additional information, hierarchical classes, etc. ). How difficult is this?\n\nQ2: What is the effect of a larger/smaller amount of networks shared with all classes? Can you share any insights about what this \"shared\" portion learns?\n", "limitations": "The paper adequately addresses limitations. ", "rating": 7, "confidence": 4, "soundness": 4, "presentation": 3, "contribution": 4, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "# Strengths\n\n- **[S1]: Original, Interesting Idea:** The main idea in the paper is original and very interesting. Without using semantics from any classes, the proposed work can guide the information flow for different classes through different subnetworks without sacrificing overall accuracy (Though for this POC, lots of tricks need to be applied). This is a very significant innovation.\n\n- **[S2]: Significant to a broad audience:** The paper highlights different ways where this might be useful; This reviewer agrees with all of them, and actually thinks that the significance might be broader still. A strong contender is out of distribution generalization and mitigation of spurious correlations. The paper notes that \n\n> Interestingly, when removing inactive ones [sub-networks], the accuracy tends to increase.\n\nI find this result to be highly encouraging towards better disentanglement, OOD generalization, and mitigation of spurious correlations. Similarly, the computational savings aspects of this network are also not sufficiently addressed here (not a weakness, just a note), but a combination of early exit possibility with well-learned subnetworks, can make this a powerful tool for extracting a single-purpose lightweight network out of a bigger network. Finally, as noted by the a paper, actually exploiting similarities/semantics/other information about the classes (which this work does not) can further improve this method in all fronts including better disentanglement, OOD generalization, accuracy etc. \n\n\n# Weaknesses\n\n- **[W1]: Some presentation-related woes:** There are some issues with clarity. Especially, I found the discussion coding schemes construction a bit hard to follow. The effects of r_l and different choices for it (including extreme cases, where a high r_l is used for most layers -- with the extreme case being the regular ResNeXt, and/or low r_l used throughout) are also not fully explored. Also missing is a bit more thorough analysis of specialization as a function of depth. However, all of these are \"nice to haves\" and does not really detract from the main contributions of the paper. \n\n- **[W2]: Some breadth missing in literature review:** While the idea presented is undoubtedly novel, I do think there are similarities with adjacent areas of research, especially in out-of-distribution literature. I have listed a few below:\n\n    - R1: Early exit networks: https://arxiv.org/abs/2004.12814 \n    - R2: Early exit networks used for different information processing for different samples: https://arxiv.org/abs/2204.02426\n    - R3: Subnetworks used to improve OOD detection: https://arxiv.org/abs/2106.02890\n\n\n# Overall\n\nOverall, this is a very exciting work; While the scope of experiments is a bit limited (I'd have like to see more, as noted above), this is hardly an actual weakness, just something the authors/others can expand in the future. Overall, the successful demonstration of disentangled information flow for different classes is already exciting, but the potential for this idea in other applications (noted above) is also equally exciting. I would definitely like to see this at the main conference. \n", "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": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "l7aCvywymVO", "reviewer": "Reviewer_UmeP", "summary": "The paper proposes Coded ResNext for interpretability in the classification task where each subNNs are dedicated to specific classes. Each class have distinct binary codes and subNNs are trained by the coding loss with binary codes. Each subNNs can be used as a binary classifier and early prediction is possible. In Cifar-10, 100, ImageNet, Coded ResNeXt outperforms ResNeXt.", "questions": "Please check weaknesses. \n\n1) I believe the justification of ResNeXt by the authors is not enough and an ablation study is required.\n\n2) Randomness on the binary code should be analyzed. \n", "limitations": "Yes", "rating": 6, "confidence": 2, "soundness": 2, "presentation": 2, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths**\n- Coded ResNeXt idea is very novel and interpretability in Coded ResNeXt was quite interesting. (I'm not the expert in this area. Therefore, I have to check the other reviews.)\n- SubNetworks trained in the coded ResNext can be used as a binary classifier and early prediction is possible with the intermediate layer results. \n- There are many attractive properties. \n\n**Weaknesses**  \n- The main concern is that the main architecture is restricted to ResNeXt. The alation studies on the other network should be included. Even though the justification for ResNeXt is provided in section 4.3.1, I believe other multi-branch networks which aggregate the outputs by summation can substitute ResNeXt. Sub blocks for ResNet, MobileNetV2, and Efficient Net (MBConv) might substitute subNN of ResNeXt.\n- The performance of this method seems to depend on the binary code. An ablation study for this randomness on the binary code for classes is required to support the superiority of this method.\n- In section 3.2.1, the authors state that the coding scheme is an NP-Hard problem. However, this kind of problem can be polynomial as in [1] where the sparsity of each binary code is fixed and the pairwise term which corresponds to the hamming distance sets the binary codes apart as far as possible.  Please check section 4.2.1 and section 4.3 in [1]. \n\n[1] Efficient-end-to-end learning for quantizable networks", "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": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "Sq5J5mkpfF", "reviewer": "Reviewer_hFvq", "summary": "This paper investigates multi-branch network structures from the aspect of information/feature space disentanglement, aiming to represent each class through certain path in a multi-branch network. To achieve it, the authors propose to assign classes to subNNs via a coding scheme. Output activations are calibrated by the aid of energy normalization which is regularized with a coding loss and a dropout operation. Experiments conducted on multiple datasets show the ability of the method on improving ResNeXt accuracy as well as the subNNs to the assigned class set.", "questions": "1. Inputs go through different subNNs in a soft-combined manner, i.e., no hard selection of certain path for each class is performed during inference. How is the performance if using hard manner instead? And how is the performance compared to assigning classes in semantic or visual correlation (which can be computed via other pretrained networks)?\n\n2. It would be valuable to provide activation distribution of different classes on subNNs for better understanding the behavior of the method.\n\n3. Since this method enforces the separation of features shared between classes, have the authors tested if it can improve performance on adversarial examples?", "limitations": "The insight behind the method needs to be further analyzed and empirically studied.  The method aims to improve multi-branch networks, which is not restricted to certain downstream cv tasks. It seems like no potential negative societal impact.", "rating": 4, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\n1. The motivation of disentangling feature space of multiple classes in multiple branches is interesting and novel.  Several reasonable strategies are developed to realize the purpose, i.e., energy normalization to stabilize the flow energy in the network, coding loss to surpass the inactive subNNs, as well as dropout on subNNs to reduce feature correlation.\n\n2. The overall framework is simple and easy to implement. \n\n3. The paper is well written and easy to follow.\n\n4. Some empirical analysis on the ability of subNN specialization is provided beyond classification accuracy comparison. \n\nWeaknesses:\n\n1. The method assigns classes via coding vectors while indeed apply a random assignment without consideration of either semantic correlation or visual similarity between classes, which is a bit counterintuitive. A family of related work investigate and leverage the class correlation to improve classification performance, e.g., [1] and [2]. The authors need to discuss the insight behind random assignment and analyze the relationship to these related works. \n\n2. Some important ablation studies are missing in the experiments. Please refer to the ``questions”.\n\n3. It seems contribute little to interpret representation learning in a multi-branch network. If the focus is instead the ability of pruning network to be a binary classifier, its generalization performance in downstream tasks (e.g., detection or few shot learning) is important to verify the reasonability of feature space splitting.\n\n[1] J. Deng et al., Fast and Balanced: Efficient Label Tree Learning for Large Scale Object Recognition. In NeurIPS 2011.\n[2] J. Deng et al., Large-Scale Object Classification Using Label Relation Graphs. In ECCV 2014.\n", "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": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}]

Author rebuttal:

Decision: Accept