<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>NESTED LEARNING FOR MULTI-LEVEL CLASSIFICATION</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>05/10/2021</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10292496</idno>
					<idno type="doi"></idno>
					<title level='j'>IEEE ICASSP 2021</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>J.Matias Di Raphael Achddou</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Deep neural networks models are generally designed and trained for a specific type and quality of data. In this work, we address this problem in the context of nested learning. For many applications, both the input data, at training and testing, and the prediction can be conceived at multiple nested quality/resolutions. We show that by leveraging this multiscale information, the problem of poor generalization and prediction overconfidence, as well as the exploitation of multiple training data quality, can be efficiently addressed. We evaluate the proposed ideas in six public datasets: MNIST, Fashion-MNIST, CIFAR10, CIFAR100, Plantvillage, and DBPEDIA. We observe that coarsely annotated data can help to solve fine predictions and reduce overconfidence significantly. We also show that hierarchical learning produces models intrinsically more robust to adversarial attacks and data perturbations.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">INTRODUCTION</head><p>Deep Neural Networks (DNNs) tend to be overconfident about their predictions and limited to the task and data they have been trained on <ref type="bibr">[1,</ref><ref type="bibr">2,</ref><ref type="bibr">3]</ref>. In this paper, we argue that this happens, among other reasons, because models are designed to learn a specific task in an end to end fashion <ref type="bibr">[4]</ref>. Humans, in contrast, learn in a nested and hierarchical way. For example, learning to identify people before recognizing individuals, vehicles before appreciating different car brands, and so forth. In the present paper, we discuss a set of crucial ideas to transform end to end DNNs into a model that can be trained with data of different quality, and that provides prediction at multiple resolutions (with their associated calibrated confidence). Some of the main aspects we address are: how to train a nested model effectively, how to design nested architectures (framing the discussion with information theory), and how to combine nested outputs.</p><p>Recently, <ref type="bibr">Bilal et al.</ref> showed that convolutional neural networks (CNNs) naturally tend to learn high-level hierarchical features that discriminate groups of classes in the first layers, while the deeper layers develop more specialized feature detectors <ref type="bibr">[5]</ref>. We design a neural network framework that explicitly enforces this behavior by creating a sequence of low dimensional feature embeddings for each level in the labels' taxonomy, thanks to a series of information bottlenecks (see Fig. <ref type="figure">1</ref>) <ref type="bibr">[6,</ref><ref type="bibr">7]</ref>. We show that skipped connections allow finer embeddings to access information (if available) and empirically evaluate both the information flow and the impact in the model's performance. The code and experiments associated with this work are open source. 1   </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">NESTED LEARNING</head><p>Preliminaries and notations. An input sample x is represented as a realization of a random variable X. We represent as X the alphabet of X. Associated with each input x, we consider a ground truth label y, also modeled as the realization of the random variable Y . Of course, Y and X are not independent; the problem of classification can be stated as inferring y from an observed sample x, i.e., Y &#8594; X &#8594; &#374; . &#374; denotes a new random variable (estimated from X) which approximates Y . Subscripts will be used to indicate the granularity of each label, i.e., Y i-1 is the closest coarse level of Y i (e.g., y 1 = vehicle, y 2 = car, and y 3 = sport car). </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Nested network</head><p>Nested information bottlenecks. Assume the input X has information about a sequence of strictly nested labels Y i . Exploiting this, we will sequentially compress the information on X using standard DNN layers (convolutional, pooling, normalization, and activation) as we schematically illustrate in Fig. <ref type="figure">1</ref>. We begin by guiding the network to find a low dimensional feature representation f 1 such that H(f 1 (X)) H(X) while, I(f 1 (X), Y 1 ) is close to I(X, Y 1 ). I(U, V ) stands for the standard mutual information between discrete random variable U and V . DNNs are remarkably efficient at compressing and extracting the mutual information between high dimensional inputs and target labels <ref type="bibr">[6]</ref>.</p><p>The second step consists of learning complementary information that, combined with the representation f 1 , allows Fig. <ref type="figure">1</ref>. Example of an architecture template for the proposed nested models. The first block extracts unrefined nested predictions. The calibration block presented in Section 2.2 reduces the overconfidence and allows a quantitatively meaningful combination of predictions, which further improves robustness and accuracy.</p><p>to achieve a second representation f 2 from which the second hierarchical label Y 2 can be inferred. To this end, skipped connections play a critical role, as we will discuss next. Using the definition of mutual information and the property that the sequence {Y i } is a set of strictly nested labels, we have</p><p>On the other hand, we want each feature embedding f i to compress the information of X while I(f i (X), Y i ) &#8776; I(X, Y i ). If we do not consider skipped connections, X &#8594; f i (X) &#8594; f i+1 (X) forms a Markov chain where I(X, f i+1 (X)) &#8804; I(X, f i (X)) (data-processing inequality) contradicting <ref type="bibr">(1)</ref>. While in most DNNs architectures skipped connections are included to encourage the model compactness and to mitigate vanishing gradients, in the present work they are included to circumvent the data-processing inequality (see Section 3 for empirical validation). Output combination layer. Since nested predictions are related to each other, we implement a non-trainable layer that combines nested outputs to refine finer predictions, i.e., { &#374;1 , ..., &#374;i } &#8594; &#7928;i .</p><p>As described by Hein et al. <ref type="bibr">[2]</ref>, DNN models tend to produce over-confident predictions, and it is indeed frequent that the output confidence is significantly larger than the prediction accuracy. This phenomenon is known as the problem of uncalibrated prediction. This mismatch can be addressed by calibrating the score outputs, which consists of mapping output scores to estimate the actual class probability. Calibration is well defined and thoroughly explained in <ref type="bibr">[8]</ref>.</p><p>Let us denote P &#374;i (q) the calibrated output of the network that approximates P (Y i = q). Then, we can use the estimated probability associated to a fine label P &#374;i to compute the conditional probability P (Y i = y i |Y i-1 = k). This is achieved by re-normalizing the finer labels associated to the same coarse label, i.e.,</p><p>where</p><p>denotes the set of labels at granularity level i that share with q the same coarser label k q . Finally, the estimated conditional probability is combined with the prior of the coarser prediction to recompute the fine prediction P &#374;i (q) = P &#374;i| &#374;i-1 (q)P &#374;i-1 (k q ), which is then refined recursively until we reach the coarser level: P &#374;i (q) = P &#374;i| &#374;i-1 P &#374;i-1| &#374;i-2 ... P &#374;0 . This is a generalization of the combination method for two nested levels <ref type="bibr">[9]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Nested training and calibration</head><p>Training. Let G &#952;,&#951; (x) = (f i (x, (&#952; j ) j=1,..,i ), g i (f i , &#951; i )) i=1,..,m be the function coded by our network, where m denotes the number of granularity levels and as before x represents an input sample. Each sub-function g i corresponds to the output of granularity i (computed from the feature bottleneck f i ). G depends on parameters (&#952; j ) j=1,..,i which are common to the sub-functions of coarser granularities, and some granularity-specific parameters &#951; i . The architecture is composed of a trunk of convolutional layers with parameters &#952; and fully connected layers for each intermediate outputs with parameters &#951; (Fig. <ref type="figure">1</ref>).</p><p>Training this type of model with a disparity of samples per granularity is challenging, and naively sampling random batches of training data leads to a noisy gradient computation <ref type="bibr">[10]</ref>. To overcome this, we organize the training samples and train the network in a cascaded manner. First, the dataset D is organized in subsets of samples labeled up to granularity i for i = 1, .., m (since we are focusing on strictly nested problems, knowing a fine label implies knowing all the coarser labels, the reciprocal is false). D = (x, y) with x the set of inputs and y the set of labels. We consider that x = (x i ) i=1,..,m and y = (y i ) i=1,..,m , where D i = (x i , y i ) represents the subset of data for which the label is known up to the granularity level i.</p><p>We train the model to solve a sequence of optimization problems using (x i , y i ) as the training examples at each step. The training sequence can be expressed as (P i ) : min (&#952;j ,&#951;j )j=1,..,i i j=1 &#945; j L nj ( &#374;j , Y j ), where L n is the ncategorical cross-entropy and &#945; are the weights for the loss associated to each prediction level. Training starts on the coarser level, proceeding with the consecutive finer level iteratively. We empirically compared the proposed training methodology with other schemes. Calibration. To mitigate prediction overconfidence, we implement a two-step calibration method. First, we add a "rejection" class for each level of granularity. Synthetic samples associated with this class are generated from a uniform distribution. This is a simple and effective idea to mitigate Fig. <ref type="figure">2</ref>. Four levels of the 'turbulence-like" image distortion inspired by <ref type="bibr">[14]</ref>.</p><p>out-of-distribution overconfidence. Still, a naive implementation would be untractable, since a dense coverage on the input space requires a number of synthetic samples that grows exponentially with the number of dimensions, leading to very time consuming and memory intensive training. Our architecture design is suitable for a practical solution to this problem by injecting the samples associated with the rejection class at the low-dimensional bottleneck representation (so overconfidence is tackled at the multiple resolutions).</p><p>A second calibration step aims to reduce the prediction overconfidence in the input space regions, where the probability of multiple classes overlap. We adopt temperature scaling introduced by Guo et al. <ref type="bibr">[1]</ref>. In short, this technique consists of scaling the output of the fully-connected layer before the softmax activation by an optimal temperature parameter. Table <ref type="table">1</ref>. Accuracy of the end to end and nested models for: Dbpedia <ref type="bibr">[11]</ref>,</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">EXPERIMENTS AND DISCUSSION</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Method</head><p>Plantvillage <ref type="bibr">[12]</ref> and Cifar100 <ref type="bibr">[13]</ref>. C, M and F stands for Coarse, Middle, and Fine, respectively. In the first row we report the amount of coarse, middle, and fine data that was used for the nested training. The amount of data used for the end to end training corresponds to the amount of fine data. We consider six publicly available datasets for experimental evaluation: the handwritten digits from MNIST <ref type="bibr">[15]</ref>, the small clothes images from Fashion-MNIST <ref type="bibr">[16]</ref>, CIFAR10 <ref type="bibr">[17]</ref>, CIFAR100 <ref type="bibr">[13]</ref>, the Plantvillage dataset <ref type="bibr">[12]</ref>, and DB-PEDIA <ref type="bibr">[11]</ref>(Wikipedia's articles). We created visually based taxonomies for the first three datasets (Table <ref type="table">2</ref>), and used the nested categories provided for the remaining ones.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">Nested learning vs. end to end learning</head><p>For a fair comparison, we compare two identical architectures, one trained on an end to end fashion (only optimizing for the finer prediction), and the second one following nested learning steps described in Section 2. We refer to these as "end to end" and "nested", respectively. Can we improve our knowledge of the fine task by looking at the coarse ones? To understand how coarse annotations impact the performance on a finer task, we compared end to end models trained exclusively with fine data D A &#8801; D 3 and nested models trained with the same amount of fine data plus coarse data D B &#8801; D 3 &#8746; D 2 &#8746; D 1 . Naturally, training with additional coarse and middle data improves the accuracy of the coarse and intermediate prediction, as we can see in Table <ref type="table">1</ref>. More interestingly, we also observe that additional coarse annotations lead to better fine models. More precisely, on MNIST, Fashion MNIST, and Cifar10 datasets, classification robustness improved when test samples drifted from the train examples (see Fig. <ref type="figure">2</ref>) with an average accuracy gain of 2%, and a 7% reduction in the prediction overconfidence (gap between the predicted confidence and the actual accuracy).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>With a fixed training budget, what is the better trade-off?</head><p>We studied for a specific budget (this is, getting coarse annotations comes at the expense of less fine annotations), which are the level of annotations that contribute the most to improve the learning process? We tested models with more fine annotations, or more coarse and middle annotations. Again, we observed (on MNIST, Fashion-MNIST, and CIFAR-10) that the models trained with additional coarse and middle samples tend to be more robust to distortions (average 2.1 % gap in fine accuracy across the datasets) and less overconfident (7.5% decrease), even compared with models trained with 1.5 times more fine annotations. Robustness to adversarial attacks. In previous experiments, the noise and distortions applied to the test data is agnostic to the classification task. Complementing previous experiments, we tested models' performance to active (adversarial) perturbations. To this end, most popular state-of-the-art gradientbased attacks such as the fast gradient sign method (FGSM) <ref type="bibr">[18]</ref>, Deepfool <ref type="bibr">[19]</ref> and Saliency based attacks <ref type="bibr">[20]</ref> were implemented.</p><p>We empirically observed that to reach a given error rate for FGSM, the attacker needs to add more than twice as much adversarial noise to the network trained in a nested fashion compared with its standard counterpart (additional details and numerical results are provided as supplementary material). In addition, when we fit an attack on the fine output, the coarse and intermediate predictions are significantly less affected for models learned with nested learning, as reported in Table <ref type="table">3</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">Ablation studies</head><p>Skipped connections. As discussed in previous sections, skipped connections (SC) are included to allow information  <ref type="table">3</ref>. Accuracy for the middle and coarse prediction when the fine prediction is adversarially attacked. In this experiment we increased for each test sample the magnitude of the attack until its fine prediction becomes incorrect. Then, we compute the middle and coarse prediction for the end to end and nested models. The nested model explicitly provides middle and coarse outputs, while for the end to end model the nested and coarse labels are computed from the fine prediction.</p><p>to flow from the input to the finer feature representation. To test how the ideas outlined in Section 2.1 affect deep models in practice, we compared equivalent models with and without SC for the MNIST model, and we empirically measured both models performance and the flow of information. To estimate the mutual information between 2 high dimensional random variables, we implemented the MINE algorithm <ref type="bibr">[21]</ref>.</p><p>We observed that the model with SC performs slightly better on images from the original distribution, and much better on distorted data, with a 10% average gap for the fine task. We also see that the performance gap on the coarse prediction is relatively small (2%), while, as expected, the gap increases for the middle (7.5%) and fine predictions (10%). In addition, the difference in the mutual information between coarse and fine feature embeddings is doubled when SC are removed. Cascaded Training. We experimentally compared the pro-Fig. <ref type="figure">3</ref>. End to end versus nested training. We compare the accuracy of the same model trained with a cascaded and a traditional training scheme. Blue, evolution of the accuracy of the coarse prediction; red, accuracy of the intermediate prediction; and green, the fine prediction posed cascaded methodology with the standard methodology (i.e., selecting batches of random samples out of the training set). We observed that cascaded training achieves substantially better performances than the traditional approach, with a 4% increase on the fine task, a 3% increase on the intermediate task, and a 2% on the coarse task. Additionally, we studied the behavior of the network during training, e.g., see the results presented in Fig. <ref type="figure">3</ref>. The proposed protocol is more suitable for the multi-level problem leading to faster convergence and better models; also, prediction accuracy becomes more stable. These findings provide further evidence that cascaded training mitigates the noises of the stochastic gradient estimation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">RELATED WORKS</head><p>The development of hierarchical and nested solutions has received significant attention recently. A central example is the work of Kim et al. <ref type="bibr">[22]</ref>, who proposed a nested sparse architecture with the emphasis on having a resource-aware and versatile implementation. In contrast with our work, they do not study how to combine these nested outputs into a refined single prediction, nor engineer a reliable confidence measure associated with them. From an architectural perspective, the main difference with our work is that their model predictions are obtained at the bottom of the network (similarly to an end to end approached), whereas we enforce sequential information bottlenecks with nested and intermediate predictions.</p><p>Another relevant example is the work proposed by Yan et al. <ref type="bibr">[9]</ref>. They introduced hierarchical deep CNNs (HD-CNNs), embedding CNNs into a two-level category hierarchy. Similarly to our work, they propose to distinguish a coarse class using an initial classifier and then to refine the classification into a second level for each coarse category. In contrast to ours, their components are designed specifically for a twolevel hierarchy; in that sense, our work generalizes their ideas to multiple levels. In addition, while Yan et al. main goal is to propose a practical solution and solve many fundamental implementation challenges, we also focus on framing and contextualizing nested learning into a theoretical framework. Other relevant and similar works are <ref type="bibr">[23]</ref>  <ref type="bibr">[24]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">CONCLUSION</head><p>We proposed a practical solution and framed in the theory of information the problem of nested learning. In several diverse datasets, we showed that it is possible to leverage heterogeneously annotated data, meaning labeled with a different level of precision, to obtain more robust models. One of the main advantages is that the proposed models provide predictions at different resolutions (e.g., this is a picture of a vehicle, particularly a car, and specifically a car model). We demonstrated that when the input data shifts from the training distributions, even if the fine prediction becomes unreliable, coarser predictions can still be made. In contrast, end to end approaches tend to be "all or nothing." Nested learning leads to solutions more robust to adversarial attacks, even though there is no specific effort nor particular adaptations to tackle them. We theoretically argued and empirically demonstrated that measuring the flow of mutual information can provide meaningful input to define the architecture profile of optimal implementations.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>Authorized licensed use limited to: Apple. Downloaded on September 01,2021 at 11:47:10 UTC from Xplore. Restrictions apply.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_1"><p>Authorized licensed use limited to: Apple. Downloaded on September 01,2021 at 11:47:10 UTC from IEEE Xplore. Restrictions apply.</p></note>
		</body>
		</text>
</TEI>
