Year: 2019

Abstract:
Standard deep neural networks (DNNs) used for classification are trained in an end-to-end fashion for very specific tasks object recognition, face identification, character recognition, etc. This specificity often leads to overconfident models that generalize poorly to samples that are not from the original training distribution. Moreover, they do not allow to leverage information from heterogeneously annotated data, where for example, labels may be provided with different levels of granularity. Finally, standard DNNs do not produce results with simultaneous different levels of confidence for different levels of detail, they are most commonly an all or nothing approach. To address these challenges, we introduce the problem of nested learning: how to obtain a hierarchical representation of the input such that a coarse label can be extracted first, and sequentially refine this representation to obtain successively refined predictions, all of them with the corresponding confidence. We explicitly enforce this behaviour by creating a sequence of nested information bottlenecks. Looking at the problem of nested learning from an information theory perspective, we design a network topology with two important properties. First, a sequence of low dimensional (nested) feature embeddings are enforced. Then we show how the explicit combination of nested outputs can improve both robustness and finer predictions. Experimental results on CIFAR-10, MNIST, and FASHION-MNIST demonstrate that nested learning outperforms the same network trained in the standard end-to-end fashion. Since the network can be naturally trained with mixed data labeled at different levels of nested details, we also study what is the most efficient way of annotating data, when a fixed training budget is given and the cost of labels increases with the levels in the nested hierarchy.

heading: 1 INTRODUCTION
text: Deep learning is providing remarkable computational tools for the automatic analysis and understanding of complex high-dimensional problems [Esteva et al. (2017); Spanhol et al. (2016); Parkhi et al. (2015)]. Despite its tremendous value and versatility, methods based on Deep Neural Networks (DNNs) tend to be overconfident about their predictions and limited to the task and data they have been trained on [Hein et al. (2018); Guo et al. (2017); Nguyen et al. (2014)]. This happens, among other reasons, because the standard approach to train DNN models consists in optimizing its performance over a specific dataset and for a specific task in an end-to-end fashion Szegedy et al. (2014). Standard DNNs are not designed to be trained with data of different quality and to simultaneously provide results at multiple granularities.
Take as an example the case illustrated in Figure 1 (left); for high quality facial images, we may be able to infer the person’s age group and identity; whereas for poor resolution or occluded examples, only a sub-set of these nested predictions may be achievable. We expect the network to automatically understand what can and cannot predict, and this is obtained with the framework proposed in this paper (Figure 1, right). Moreover, nested learning allows us to leverage training information from diverse datasets, with varying granularity and quality of labels, and combine this information into a single model.
On the other hand, when heterogeneous data with different quality and granularity of annotations (as in the example illustrated in Figure 1 (left)) is provided for training, low quality samples with coarse labels can help us to understand the structure of the coarser distributions (person, under 50) while simultaneously data with finer labels can contribute to the coarse and fine tasks. This will be formalized later in the paper with tools from information theory.
Recently, Alsallakh et al. (2017) showed that convolutional neural networks (CNNs) naturally tend to learn hierarchical high-level features that discriminate groups of classes in the early layers, while the deeper layers develop more specialized feature detectors. We explicitly enforce this behaviour by creating a sequence of nested information bottlenecks. Looking at the problem of nested learning from an information theory perspective, we design a network topology with two important properties. First, a sequence of low dimensional (nested) feature embeddings are enforced for each level in the taxonomy of the labels. This encourages generalization by forcing information bottlenecks [Tishby et al. (1999), Shwartz-Ziv & Tishby (2017)]. Second, skipped connections allow finer embeddings to access information of the input that may be useful for finer classification but not informative on coarser categories Ronneberger et al. (2015). Additionally, we show how the explicit calibration and combination of nested outputs can improve the finer predictions and improve robustness. Finally, having the flexibility of merging data with different levels of granularity inspired us to study which is the most efficient way of annotating data given a fixed budget that takes into account that more detailed training data is more expensive to annotate. The source code associated to this work is open source.1
The main contributions of this paper are: (1) We introduce the concept of explicit nested learning, where a given level in the hierarchy strictly contains the previous one and strictly adds information; (2) We provide a deep learning architecture that can be trained with data from all levels of the nested structure (all levels of labels and data quality), each one affecting the corresponding component of the network; (3) We provide a model with multiple outputs, one per level of the nested hierarchy, each one with its own confidence; the user does not need to know the “quality” of the data beforehand, the output confidences provide that information.

heading: 2 RELATED WORK
text: The problem of adapting DNNs models and training protocols to encourage nested learning shares similarities with other popular problems in machine learning such as Multi-Task Learning (MTL). Though our work is related to MTL because of the similar training challenges, most of the MTL methods tackle the task in a parallel way, without imposing a task hierarchy in the architecture [Ranjan et al. (2016), Kokkinos (2017), Bilen & Vedaldi (2016)]. The idea of learning hierarchical representations to improve classification performance has been exploited prior the proliferation of DNNs, e.g., [Zweig & Weinshall (2007), Fergus et al. (2010), Zhao et al. (2011), Liu et al. (2013)]. Some of these ideas have been incorporated into deep learning methods [Alsallakh et al. (2017), Wehrmann et al. (2018), Deng et al. (2014), Srivastava & Salakhutdinov (2013)], and exploited in specific applications [Clark et al. (2017), Xuehong Mao et al. (2016), Seo & shik Shin (2019)].
1https://github.com/nestedlearning2019
Kim et al. (2018) proposed a nested sparse network architecture with the emphasis on having a resource-aware versatile architecture to meet (simultaneously) diverse resource requirements. Wehrmann et al. (2018) proposed a neural network architecture capable of simultaneously optimizing local and global loss functions to exploit local and global information while penalizing hierarchical violations. Triguero & Vens (2016) investigated different alternatives to label hierarchical multi-label problems by selecting one or multiple thresholds to map output scores to hierarchical predictions, focusing on performance measures such as the H-loss, HMC-loss and the micro-averaged F-measure. Yan et al. (2015) introduced hierarchical deep CNNs (HD-CNNs) which consists of embedding CNNs into a two-level category hierarchy. They propose to distinguish a coarse class using an initial classifier and then refine the classification into a second level for each individual coarse category.
Although the works listed above are important, relevant, and related to the work presented here, there are notable differences between them and what we propose. For example, while Kim et al. (2018) propose a nested architecture providing different (potentially nested) outputs, they do not study how to combine these outputs into a refined single prediction, nor provide a reliable confidence measure associate to them. Furthermore, the architecture they propose has key differences with ours, while they propose a nested hierarchy in a end-to-end fashion (i.e., features associated to the coarse and fine levels are shared from the top to the bottom of the network), we enforce sequential information bottleneck. As we show in the following sections this sequence of coarse to fine low dimensional representations facilitate a robust calibration and combination of nested outputs. Yan et al. (2015) study the problem of nested learning for two nested levels of granularity, and optimize for a final fine prediction. Their design is specific for a two-level category hierarchy while our work generalize to any number of nested levels, and we simultaneously can train and test up to an arbitrary level of granularity. Another important difference is that the focus of their work is on the implementation details and performance of their two-hierarchy network versus traditional end-to-end learning. As they mention in the conclusion of their work, future work should aim to extend their ideas to more than two hierarchical levels and to contextualize their empirical results into a theoretical framework. Our work takes steps in these two specific directions. This is also a fundamental difference with the works developed by Triguero & Vens (2016) and Wehrmann et al. (2018). Moreover, all these approaches suppose that every sample is annotated for all the granularity levels. In contrast with them, we can efficiently train (and predict) our model on dataset that provide only coarse labels, intermediate levels, or fine labels. Our approach is therefore more general in that regard. Also, we show that if testing conditions shift from the ones on training, we can still provide relatively confident coarser labels while avoiding overconfident (erroneous) fine predictions (see, e.g., Figure 1, right; and Figure 5 in the supplementary material). Also, the questions of neural network overconfidence and output readability are never addressed in those works, which is crucial for both results interpretation, and output combination. Finally, because our solution can leverage information from datasets with different granularity, we are able to analyze how different proportions of training coarse and fine data affects models cost, performance and robustness.

heading: 3 NESTED LEARNING
text: Let us assume we want to classify the popular hand written digits of MNIST LeCun & Cortes (2010). An input image can be represented as a realization x of the random variableX .2 We denote as X the alphabet of X . Associated to x, there is a label y that corresponds to the actual number the person writing the character wanted to represent. The label y is a realization of the random variable Y . In this illustrative case, Y can take 10 different values: Y = {0, 1, ..., 9}. Of course Y and X are not independent random variables. Generally, Y precedes X , and the problem of classification can be stated as the problem of inferring y from an observed sample x, i.e., Y → X → Ŷ . Ŷ denotes a new random variable (estimated fromX) which approximate Y . More precisely, a common practice is to find a mapping X → Ŷ such that the probability P (Ŷ 6= Y |X) is minimized. Nested classification. In this work we focus on the inherent hierarchical structure most classification problems have. For example, imagine now that we have hand written characters including numbers, lower case letters, and capital letters. It would be intuitive to first attempt to classify these characters into three categories: numbers, lower case letters, and capital letters. Then, depending on this coarse
2Capital letters will be used to denote random variables and lower case letters to denote the value of a particular realization.
classification we can perform a finer classification, i.e., classifying the numbers into 0 − 9 classes, the letters into a− z, and so forth. Of course, we could have an arbitrary number of nested random variables associated to different levels of labels granularity. Here, subscripts indicate the granularity of the label, for example, Yi−1 is the closest coarse level of Yi. Y ki represents the random variable associated to each k value in the closest coarse node, i.e., Y ki represents Yi given that yi−1 = k, k ∈ Yi−1. Definition 3.1. We define Y1, ..., Yn as a discrete sequence of nested labels if H(Yi|Yi+1) = 0 ∀i ∈ [1, n− 1]. H denotes the standard definition of entropy for discrete random variables. Definition 3.2. A discrete sequence of nested labels Y1, ..., Yn is strictly nested if H(Yi|Yi−1) < H(Yi) ∀i ∈ [2, n].
The core of this work is to formulate classification problems such that the information of the input is extracted in a hierarchical way. To this end, intermediate (coarse) predictions Ŷi are jointly learned. The two key components of the proposed approach are: (i) nested information bottlenecks and (ii) a combination of the predicted coarse and fine labels. The analysis provided in this section is agnostic to most of the implementation details (which are addressed in coming sections).
Hierarchical information bottlenecks and the role of skipped connections. We assume the random variable X contains information about the sequence of strictly nested labels Yi, i.e., H(Yi|X) < H(Yi), as illustrated in Figure 2. More precisely, H(Yi|X) > H(Yi−1|X) and H(Yi|X) < H(Yi|Yi−1, X). To exploit these properties, we use standard DNN layers (convolutional, pooling, normalization, and activation layers). As illustrated in Figure 3, we begin by guiding the network to find a low dimensional feature representation f1 such that H(f1(X)) H(X) while, I(f1(X), Y1) is close to I(X,Y1) where I(·, ·) stands for the standard mutual information. (DNNs are remarkably efficient at compressing and extracting the mutual information between high dimensional inputs and target labels [Shwartz-Ziv & Tishby (2017), Moshkovitz & Tishby (2017)].)
The second step consists in learning the complementary information such that when combined with the representation f1, allows us to achieve a second representation f2 from which the second hierarchical label Y2 can be inferred. To this end, skipped connections play a critical role as will be further detailed next. As we discussed before,
I(X,Yi) = H(X)− H(X|Yi)︸ ︷︷ ︸ >H(X|Yi+1) < I(X,Yi+1). (1)
On the other hand, we want each feature embedding fi to compress the information of X while I(fi(X), Yi) ≈ I(X,Yi). Equation 1 means that the finer the classification the more information from X we need. Notice that while in many DNNs, skipped connections have proved to help on the networks compactness and to mitigate vanishing gradients Szegedy et al. (2017), in the present work they are included for a more fundamental reason. (See the experiments presented in the supplementary material Section F.2 for complementary empirical evidence and validation.) If we do not consider skipped connections, X → fi(X) → fi+1(X) forms a Markov chain where I(X, fi+1(X)) ≤ I(X, fi(X)) (data-processing inequality) which contradicts Equation 1. Section 4 presents experiments illustrating the impact of skipped connections on nested learning, and complements the discussion started here.
Combination of nested outputs. We will present in the following sections experimental evidence showing that nested learning leads to an improvement in performance and robustness. In addition, the explicit combination of nested predictions, since the network simultaneously produces all the outputs Yi (with corresponding confidence), can improve the accuracy and robustness even further.
Our motivation is to explicitly refine the fine prediction leveraging the information of all the coarser outputs, i.e., {Ŷ1, ..., Ŷi} → Ỹi. Let us define si(q) the network output score associated to the event Yi = q. In general, if si(q) > si(w) most likely P (Yi = q) > P (Yi = w), but P (Yi = q) 6= si(q). In other words, a score value of 0.3 does not mean the sample belongs to this class with 30% probability. This can be addressed by calibrating the outputs, which consists of mapping output scores into an estimation of the class probability si(q)→ PŶi(q), as defined and thoroughly explained in Zadrozny & Elkan (2002). PŶi(q) denotes the calibrated output of the network which approximates P (Yi = q). (We will precise how calibration is performed in the following section.) Then, we can use the estimated probability associated to a fine label PŶi to compute the conditional probability P (Yi = yi|Yi−1 = k). This is achieved by re-normalizing the finer labels associated to the same coarse label, i.e.,
PŶi|Ŷi−1(q) = PŶi(q)∑
w∈Ykqi PŶi(w)
, (2)
where Ykqi denotes the set of labels at granularity level i that share with q the same coarser label kq . Finally, the estimated conditional probability is combined with the prior of the coarser prediction to recompute the fine prediction P ′
Ŷi (q) = PŶi|Ŷi−1(q)PŶi−1(kq).

heading: 3.1 IMPLEMENTATION CHALLENGES AND DETAILS
text: Training. Let Gθ,η(x) = (fi(x, (θj)j=1,..,i), gi(fi, ηi))i=1,..,m be the function coded by our network, where m denotes the number of granularity levels and as before x an input sample. Each sub-function gi corresponds to the output of granularity i (computed from the feature bottleneck fi). G depends on parameters (θj)j=1,..,i which are common to the sub-functions of coarser granularities, and some granularity-specific parameters ηi. The general framework of the architecture follows Figure 3, meaning a trunk of convolutionnal filters with parameters θ and fully connected layers for each intermediate outputs with parameters η.
Training this kind of model with a disparity of samples per granularity is hard, and naively sampling random batches of training data leads to a noisy gradient computation Kokkinos (2017). (See the supplementary material Section F.3 for complementary experimental validation and analysis.) In order to overcome this issue, we organize the training samples and train the network in a cascaded manner. The dataset D is organized in subsets of samples labeled up to granularity i for i = 1, ..,m. Formally we can write D = (x,y) with x the set of inputs and y the set of labels. We consider that x = (xi)i=1,..,m and y = (yi)i=1,..,m where Di = (xi,yi) represents the subset of data for which the label is known up to the granularity level i.
Having the dataset partitioned in this fashion naturally leads to a cascaded training of the network. We train the model to solve a sequence of optimization problems using (xi,yi) as the training examples at each step. We can write this sequence (Pi) as: (Pi) : min(θj ,ηj)j=1,..,i ∑i j=1 αjLnj (Ŷj , Yj), where Ln is the n-categorical cross-entropy and α are the weights for each individual loss. We first start to train the network on coarse labels and we gradually add finer labels and start optimizing deeper parameters in an iterative way. We support our cascaded training protocol against a more standard one with experimental results presented in the supplementary (Section F.3). (Additional details are presented as supplementary material Section B.)
Scores calibration. As shown by Hein et al. (2018), deep neural networks with ReLU activations tend to produce overconfident results for samples which are out of the training distribution. In order to mitigate this and have meaningful outputs that can be combined, we consider a two step calibration method. The first step consists in adding a “rejection” class for each level of granularity. Synthetic samples associated to this class are generated from an uniform distribution. By training the network with this supplementary class we mitigate the problem of overconfidence for sample that are far from the training distribution. However, keeping a fixed coverage on the input space would require a number of samples that grows exponentially with the dimension of the input space.
To overcome this problem, we think of the network as a sequence of encoders in the latent spaces gi(fi(x)) (defined as the penultimate layer prior each prediction), and fine-tune the last layer adding synthetic out-of-distribution samples from an uniform distribution in the latent space. The latent space has a much smaller dimension than the original input space, and therefore is tractable to synthesise samples with a uniform coverage of the latent space. (Additional details are provided in the supplementary material Section B.)
The second calibration step is a classic temperature scaling introduced in Guo et al. (2017). This technique consists in scaling the output of the fully-connected layer before the softmax activation by an optimal temperature parameter. Given x the input data and g the function coded by a neural network before the softmax activation σ, the new calibrated output is given by ḡ = σ( gT ). The temperature parameter T is tuned so that the mean confidence of the predictions matches the empirical accuracy, more precisely, we want to minimize, E [ |P (Ŷ = Y |p̂ = p)− p| ] , whereas before, Ŷ
denotes the network prediction of Y , and p̂ is the empirical confidence associated to it. The previous expression can be approximated, using a validation partition of the data, by computing the Expected Calibration Error (ECE) ECE = ∑N j=1 |Bj | n |acc(Bj)− conf(Bj)|, Naeini et al. (2015). This measure takes the weighted average between the accuracy and confidence on N bins Bj , j = 1...N . n denotes the total number of samples, and |Bj | the number of samples on the bin Bj .

heading: 4 EXPERIMENTS AND DISCUSSION
text: We consider three sets of publicly available datasets for experimental evaluation: the handwritten digits from MNIST (LeCun & Cortes (2010)), the small clothes images from Fashion-MNIST (Xiao et al. (2017)), and CIFAR10 (Krizhevsky et al.). First we study how the actual nested nature of the labels affects nested learning. Then we compare end-to-end training versus the proposed nested approach. In a third group of experiments we evaluate different combination methods to leverage all the predictions into a refined fine prediction. Then we evaluate the impact of skipped connections. Finally, we study how the ratio of coarse and fine labels affects the network’s performance. Additional experiments are presented in the supplementary material, section A, F
Hierarchical structure versus random grouping. We group the MNIST samples into two groups of nested labels: “VG” and “RG,” both with three labels of granularity. VG corresponds to a hierarchy that groups visual similarities; the coarse class groups digits into {{3, 8, 5, 0, 6}, {9, 4, 7, 1, 2}}, the intermediate class into {{3, 8, 5}, {0, 6}, {9, 4, 7}, {1, 2}}, and of course the fine class into {0} − {9}. Additional information on how we grouped the labels for the three datasets is presented in Appendix C. RG consists of a 3 level (coarse/middle/fine) grouping based on the order of N. Empirical results shows that grouping the labels based on visual similarities leads to better results in terms of accuracy, intuitively supporting the idea of nested learning. (See the results presented in Table 4 provided in the supplementary materials.)
Standard end-to-end training versus nested learning. Let us define |Di| as the number of training samples that are annotated up to the level of granularity i. To understand if adding more samples with
coarse annotation helps improving the performance on the fine task, we compared models trained exclusively with fine dataDA = D3 and models trained fine data plus coarsely annotated dataDB = D3 +D2 +D1. Table 1 shows the accuracy for the fine, middle, and coarse outputs for the standard end-to-end network versus the same architecture trained using nested learning and additional coarse and middle data. If we compare the lines for which D3 = 20%, we observe that adding coarse and middle granularity samples improves the accuracy even for the fine task. Moreover, it also improves the robustness of the model. We tested this models when test data is distorted and shifted from the conditions at training. Distortion 1 to 4 correspond to four levels (increasing the severity) of “turbulence-like” image distortion, the implementation of this distortion is inspired on the work of Meinhardt-Llopis & Micheli (2014) (details are provided in the supplementary material, Section D). Again looking at Table 1 we see that the model trained with additional coarse and middle samples is more robust and less overconfident. A similar pattern is observed for MNIST and fashion-MNIST datasets (see for example, tables 5, and 6 in the supplementary material). Complementing these results, Section F.1 in the supplementary material compared the proposed nested architecture with a Multi-Task learning approach.
The previous discussion is interesting as it shows that including additional coarse data tends to help also the discrimination of the fine task. However one may argue that the comparison is unfair, as one model sees more data than the other. That is a very interesting point and we address it in following experiments where we study how the proportion of fine and coarse granularity data affect performance (for a fixed budget and different cost models). For now, let us observe what happens if we increase the amount of fine data from D3 = 20% to 32% (which assuming a linear cost model equals the budget of training with D1 = D2 = D3 = 20%). As expected, (see Table 1) the performance on clean test data improves for the end-to-end model. However, (see columns Distortion 1-4) it generalizes less to unseen (distorted) test data and also becomes significantly more overconfident.
Output combination. Kuncheva (2004) presented many useful combination methods for both onehot encoding classifiers and continuous scores. We compare some of those combination methods (e.g., Mean, Product, and Majority Vote) to the one that we designed specifically for multiple nested outputs. (Details and numerical results are provided in the supplementary material, Section E and Table 3.) We observed that different combination methods perform similar on test data that matches the train data, while the proposed method outperforms the others when test samples are distorted.
The role of skipped connections. Skipped connections are included in order to allow information flow from the input to the finer feature bottlenecks. Table 2 shows the accuracy for two networks with the same structure, trained on the same data, one including skipped connections (SC) and the other-one not. Section F.2 in the supplementary material complements these results, and provides empirical measurements of the mutual information between different components of the model with and without skipped connections.
Working on a budget. As we discussed before, establishing a fair comparison between models trained using more fine or coarse data is not trivial. To address this problem, we investigated three cost models: linear, convex, and concave. For the linear model, we assume the cost associated to annotate one sample (x, yi) is proportional to |Yi|. Analogously, for the convex/concave cost model, we assume the cost of annotating a sample (x, yi) is proportional to g(|Yi|) with g(·) being strictly convex/concave. For each budget and cost model, we created hundreds of train sets with different amounts of coarse, middle, and fine samples. Figure 4 shows the accuracy on the MNIST test set for different budgets and cost models. It is interesting to observe that for a convex cost model, increasing the number of coarse annotations produces better results for the same budget; while as expected, the opposite is observed for a concave cost model. We present additional experiments in the Figure 10 in the supplementary material.

heading: 5 CONCLUSION
text: In this work we introduced the concept of nested learning, which improves classification accuracy and robustness. Moreover, it allows to leverage information from datasets annotated with different levels of granularity. Additionally, experiments suggest that nested models have a very desired behaviour, e.g., they gradually break as the quality of the test data deteriorates. We showed that implementing nested learning using a hierarchy of information bottlenecks provides a natural framework to also enforce calibrated outputs, where each level comes with its confidence value.
Given a fixed budget and model, we studied what is the economically most efficient strategy for labeling data. Furthermore, experimental results show that if the amount of fine training samples is constant, then adding samples with only a coarse annotation increases the performance and robustness for the fine task. To recap, the introduced nested learning framework performs as expected from our own human experience, where for good data we can provide high level inference with high confidence; and when the data is not so good, we can still provide with high confidence some level of inference on it.

heading: Supplementary Material

heading: A ADDITIONAL OUTPUT EXAMPLES
text: B IMPLEMENTATION DETAILS

heading: B.1 ARCHITECTURE
text: The architecture of our model is presented in Figure 6. We evaluate the same architecture for MNIST and Fashion-MNIST as the images have the same size and number of channels. For CIFAR10, the architecture of our model is very similar but with an increased depth of the convolutional filters. Classifying images from CIFAR10 is indeed a harder problem than classifying images from MNIST or Fashion-MNIST, and therefore, it requires a model with more parameters. The architecture we use is an adaptation of the U-Net, designed to fit our proposed framework of nested information
bottlenecks. The U-Net is indeed a good starting point, as it meets most of the criteria that we presented in Section 3. First, it consists of a convolutional network that enforces a bottleneck representation. Second, it presents skip connections that allow information of the input to flow to deeper components of the network.
We also added Batch-Normalization (BN) layers after every convolutional filters in order to achieve a faster convergence. BN is very helpful to mitigate the vanishing gradient phenomenon. Also, since it introduces randomness during training, BN acts as a regularization. Classic L1 regularization was shown to be similar to BN in Luo et al. (2018), while including BN layers also improves training speed and stability as explained by Santurkar et al. (2018).

heading: B.2 TRAINING
text: We train the models in an iterative way. First we optimize the weights for the coarse prediction with the samples that are only coarsely annotated and freeze the remaining weights. Then, we optimize the weights up to the intermediate output with the samples that are coarsely and intermediately annotated. Finally we train the whole network, with the samples that are coarsely, intermediately, and finely annotated. (In general, this process has as many steps as levels of granularity.) Each training step is performed using ADAM optimizer with different learning rates: 2 × 10−3 for the first step, 1× 10−3 for the second, and 5× 10−4 for the last. We stop the training of each step when stagnation of the validation loss is observed.

heading: B.3 CALIBRATION
text: The calibration consists of two main steps. First a “rejection” class is modeled using an uniform distribution on the latent space. This models out-of-distribution samples and mitigates overconfident predictions on portions of the feature space where no training data is observed. The second step consists of temperature scaling to convert output scores into approximations of class probabilities.
The “rejection” class. For every level of granularity i and for every sample of the training dataset, we store the normalized outputs of the global averaging layer (GAP) in a dataset Di. The samples have size si and are normalized with respect to the L2 norm, therefore, they live in Bsi(0, 1), the unitary sphere in Rsi centered in zero. We randomly sample ni new instances from an uniform distribution in Bsi(0, 1). These samples (associated to a new “rejection” class) are aggregated to Di and the fully connected layers fine tuned.3 Naturally, the larger |Di| and si, the larger ni should be. We set ni ∝ |Di|×S(si) where S(si) is the area of the hypersphere of unitary radius in the sidimensional space. Figure 7 illustrates for a one dimensional toy example, how the proposed ideas provide and efficient solution to reduce outputs overconfidence on out-of-distribution input samples.
Temperature scaling. Temperature scaling improves calibration by converting arbitrary score values into an approximation of class probabilities. As explained in Section 3.1, we minimize the empirical ECE metric over the validation set, composed of 5000 unseen samples for all the dataset we tested our method on. To find the optimal temperature T , we compute the ECE over 50 values between 1 and 3 and select the one for which the ECE is minimized. If T = 1 the model is already well calibrated. On all our experiments, the minimal ECE value was always reached for T values strictly lower than 3.
3To this end, we used ADAM optimizer with a learning rate of 10−3.

heading: C LABEL GROUPING
text: In Section 4, we showed that nested learning performs better if the taxonomy of the labels has a real nested structure (e.g., one based on visual similarity). To group fine labels into a meaningful nested structure, we first train a shallow neural network and classify images into the fine classes. Then we used the confusion matrix M associated to this auxiliary classifier to establish which classes are closer to each other.
For MNIST and Fashion-MNIST for example, we wanted to group the labels in 2 coarse categories which also contained 2 intermediate categories. To this end, we find the 10-permutation l applied to both the rows and columns of M , such that the non-diagonal 5 × 5 matrices of M had the lowest possible L1-norm. We iterate this process to find the intermediate categories. It is computationally hard to go through all the permutations, therefore, we follow the ideas proposed by Behrisch et al. (2016) to perform matrix reordering with a reduced complexity.
Figure 8 presents the groups of labels we obtained for MNIST, Fashion-MNIST, and CIFAR10. Our results show natural and intuitive taxonomies, see, e.g., how MNIST digits are grouped according to a natural shape-oriented similarity, with 3 and 8 in the same intermediate class for example.

heading: D PERTURBATIONS
text: Selecting realistic and meaningful perturbations to test DNN models is a non trivial problem. For example, adding Gaussian noise mainly affects the high frequency components of the input images and we observed that both standard (end-to-end) and nested networks were not severely affected by this type of perturbation. In this work we focus on structural deformations inspired by a model of turbulence. The pseudo-code of this perturbation is presented in Algorithm 1 and was inspired in
the work of Meinhardt-Llopis & Micheli (2014). Figure 9 illustrates the distortion of an example image from MNIST dataset for different levels of turbulence intensity.
Algorithm 1: Turbulence distortion Data: the input: I ∈ Rw,h, the parameters (S, T ) ∈ R2 Result: the distorted image I(S,T )dist Creating a vector field (u,v) for the distortion: u, v = normal noise((w, h)), normal noise((w, h)) u, v = gaussian filter(u, S), gaussian filter(v, S) u, v = u× Tstd(u) , v × T std(v) Interpolate the image with the obtained vector field: I
(S,T ) dist = bilinear interpolate(I, u, v)

heading: E COMBINATION METHODS
text: Combining multiple classifiers is a standard approach in machine learning. However, most approaches combine similar outputs and are not designed for the specific problem of nested learning. We compared some standard combination methods and our calibration-based combination strategy.
Combination methods can be classified into two categories. First those that combine or vote discrete classification results, where classifier outputs are considered as one-hot encoding vectors. For example, the Majority Vote (MA) which consists in aggregating the decision of multiple classifiers and selecting the candidate that receives more votes. The second category of methods combine classifiers continuous outputs. As we show in the following, the second class of methods are more suitable for the combination of nested outputs.
For example, suppose that given an input sample x, the classifier outputs an estimations of the probability associated to each coarse, middle, and fine label: PŶ1 , PŶ2 , and PŶ3 . In order to apply standard combination methods, we need to transform the coarse and intermediate predictions into a fine prediction and vice-versa. To transform the probability associated to a coarse label into a finer granularity, we can assume the finer classes associated to each coarse class are equally probable, i.e., the probability associated to a coarse node, is divided equally into the finer nodes associated to this label. On the other hand, to aggregate probabilities associates to a finer level into a coarser level, we can simply add those probabilities associated to the same coarse node.
Once probabilities associated to coarse levels are propagated to the fine levels and vice-versa, we can combine them using the mean or the product rule as described in Kuncheva (2004). Table 3 shows the result of combining nested outputs with standard combination methods and our strategy described in Section 3.1.
F ADDITIONAL EXPERIMENTS

heading: F.1 COMPARING WITH A COMMON MTL ARCHITECTURE
text: Classic Multi-Task Learning (MTL) DNN approaches extract common features that are on the top the architecture branched for the prediction of multiple tasks. To this end, a common MTL architecture consists of shared convolutionnal blocks followed by task-specific classification (fully connected) layers. Figure 11 illustrates an MTL architecture designed to obtain a nested classification of MNIST characters. The network enforces an information bottleneck that encodes the input in a (64,1) feature vector. Then, it is connected to the three classification branches implemented by a sequence of fully-connected layers. This MTL model and our nested model have approximately the same number of parameters and are trained in an identical way on MNIST dataset.
Table 7 shows the classification accuracy for our nested architecture presented in Section B and the multi-task learning architecture presented above. On the original distribution both architectures perform roughly equivalently, but on perturbed test data the proposed nested model is considerably superior. Nested learning outperforms its MTL counterpart with a gap of 18% for the fine task and a gap of more than 10% for the coarse task for distortion levels 3 and 4. These results provide additional evidence that having a hierarchical nested architecture promotes robustness and leads to more consistent models.

heading: F.2 SKIPPED CONNECTIONS AND THEIR IMPACT ON THE FLOW OF INFORMATION
text: Obtaining an empirical measure of the mutual information (MI) between two high dimensional random variables is a very hard numerical problem (Paninski (2003)). However, recent progresses in deep learning made a numerical approximation (MINE) tractable by exploiting the flexibility of neural networks and properties of the mutual information. Belghazi et al. (2018a) proved that a MI estimation can be seen as an optimization problem. They rely on the following characterization of the mutual information as the Kullback-Leibler (KL-) divergence,
I(X,Z) = DKL(PXZ ||PX ⊗ PZ). (3) Based on this, the authors use the Donsker-Varadhan representation of the KL divergence, which introduces a dual optimization problem,
DKL(P||Q) = sup T :Ω→R EP[T ]− log(EQ[eT ]), (4)
where the supremum is taken over all the functions T such that the two expectations are finite.
Since the parameters of a neural network can be used to encode a large space of functions, the authors propose to solve Equation equation 4 for Tθ ∈ F , where F denotes the space of functions encoded by a pre-defined network architecture with parameters θ ∈ Θ. An approximation of the MI can be obtained solving the problem
IΘ(X,Z) = sup θ∈Θ
EPXZ [Tθ]− log(EQ[eTθ ]) (5)
Equation 5 can be numerically solved using standard optimization tools of deep learning (see Belghazi et al. (2018b) for details).
In order to measure the impact of skipped-connections from an MI perspective, we measure the empirical approximation of the mutual information between different sections of the proposed nested architecture. We compared these results for the same network with and without skipped connections. Let us refer to the network with skipped connections with the subscript 1 and the network without skipped connections with the subscript 2. We define different variables of interest at particular stages of the network and estimate the mutual information between them. We will call F1(X) and F2(X) the variable corresponding to the feature map created after the 2nd Maxpooling layer (see Figure 11) with or without skipped connections. Similarly, let G1(X) and G2(X) be the feature maps obtained before the second GAP layer. We will also consider H1(X) and H2(X) the coarsest feature maps obtained before the first GAP. (Before feeding these features to MINE algorithm we performed average pooling to reduce the dimension of the input variables.)
We estimated the MI between I(Fi(X), Gi(X)) and I(Fi(X), Hi(X)), i = 1 meaning “with skipped connections” and i = 2 “without skipped connections” (the network without skipped connections is re-trained to allow the model to adapt to this new configuration). Figure 12 (left side) sketches in which sections of the model we are measuring the mutual information, and (right side) the evolution of the MI estimation (MINE algorithm) for 3k steps. After convergence of MINE algorithm we compared the mutual information between the random variables Fi, Hi and Gi with and without skipped connections (illustrated in green in the sketch of the left side of figure 12),
∆1 = I(F1(X), G1(X))− I(F1(X), H1(X)) = 0.37, (6) ∆2 = I(F2(X), G2(X))− I(F2(X), H2(X)) = 0.21 ≈ ∆1/2. (7)
As shown in Equation 6 skipped connections play an important role to allow information to flow to the feature representation of the finer classes. This provides additional numerical evidence to the discussion presented in Section 3 supporting the importance of including skipped connections and avoiding information bottleneck at the finer classification.

heading: F.3 COMPARISON OF TRAINING PROTOCOLS
text: Our training protocol is organized in a cascaded way. As explained in Section 3.1, the reason for this is two-fold. First, this would eliminate the problem of the noisy stochastic gradient computations which happens when we there is not enough samples in the mini-batch for a specific task/granularity. Second, it provides a good initialisation of the weights associated to the coarser levels, and we observed empirically that this leads to a faster convergence and better accuracy. In order to illustrate the impact of the training protocol, we compare the results obtained by training the exact same model, with the same data, but using two different training strategies. We compared the described cascade methodology with the standard methodology (i.e., selecting batches of random samples out of the training set). As samples are annotated heterogeneously (with all or some fine to coarse annotations) we defined the unified loss in each mini-batch as
Lbatch = M∑ j=1 N∑ i=1 αi × ωijLi(yij , ŷij),
M denotes the number of samples in the batch,N the number of nested level, where ωij is a masking vector which indicates if the sample j is annotated or not for the level of granularity i, αi are global weight that help to balance the loss associated to each level Li. We observed that cascaded training achieves substantially better performances than the traditional training as we can see in Table 8. The gaps are very significant also on the training distribution as we can observe in the first column. Additionally, if we studied the behaviour of the network while, e.g., see the results presented in Figure 13. As we can see, the proposed protocol is more suitable for the proposed multi-level problem leading to faster convergence and better models. After 26 epochs of coarse learning, we add the intermediate data for 30 epochs before adding the fine data for 44 more epochs. We can observe that very few epochs after the introduction of the intermediate data, the accuracy of the intermediate classifier is already superior to a standard training procedure. We observe this phenomenon again for the fine classification, see for example, the training evolution over the green area illustrated in Figure 13. In addition we can observe that the accuracy of the cascaded training classifiers oscillates far less than the accuracy of the traditionally trained classifiers. This provides additional evidence that our method helps to deal with the noisiness of the stochastic gradient estimation.

Review summaries:
The problem addressed is how to train a DNN to learn a hierarchical representation of the input that has heterogeneously annotated labels at various levels of granularity. After training the network’s goal is to emit sequentially finer grained labels with corresponding confidence. The authors use information theory to propose a network typology of information bottlenecks with skip connections to achieve this nested learning problem.