What Information Does a ResNet Compress?

1 INTRODUCTION . Deep neural networks are ubiquitous in machine learning and computer vision . Unfortunately , the popularity of neural networks for applications is unmatched by an agreed upon and clear understanding of how exactly they work , and why they generalise well . The field of deep learning will advance with more comprehensive theory and empirical studies that better characterise neural networks . Generalisation , in the context of learning , means the extraction of typical abstract properties of training data that can be successfully used for inference on unseen data . Neural networks generalise well even when they are over-parameterised . Zhang et al . ( 2017 ) highlighted the need to rethink generalisation , because conventional wisdom is not readily applicable to neural networks . A number of avenues for new generalisation bounds for neural networks ( Bartlett et al. , 2017 ; Golowich et al. , 2017 ; Neyshabur et al. , 2017 ) exemplify how inapplicable conventional methods for understanding model generalisation can be . One approach to better understanding neural networks is the Information Bottleneck ( IB , Section 2 ) interpretation of deep learning ( Tishby et al. , 2000 ; Tishby & Zaslavsky , 2015 ; Shwartz-Ziv & Tishby , 2017 ) . The IB accredits deep learning success to compression in hidden layers via the noise of parameter updates in stochastic gradient descent ( SGD ) . Information compression results in optimal representations that discard task-irrelevant data while keeping task-relevant data . The IB principle has since been actively debated ( Saxe et al. , 2018 ) , partially motivating this work . The novelty is that we apply information theoretic analyses to modern convolutional residual neural networks ( ResNets , Section 5 ) trained on realistic images ( Section 5.2 ) . These choices complicate analysis since information quantities are non-trivial to compute for high-dimensions . Our solution is to define a lower bound on the mutual information ( MI , Section 4 ) and to estimate it by training decoder models ( Section 4.1 ) . The decoder model for the MI between images and hidden layers is a conditional PixelCNN++ and samples generated therefrom illustrate visually MI ( Figure 1 ) . 1.1 OUR CONTRIBUTIONS . • An experimental framework for tracking the MI in a realistic setting . Tracking both the forward and inverse MI in a ResNet using realistic images . Earlier research tracked these quantities for constrained toy-problems or low-dimensional data . Lifting these constraints requires defining models to compute a lower bound on the MI . • Analysis of PixelCNN++ samples conditioned on hidden layer activations to illustrate the type of information that ResNet classifiers learn to compress . This is done via the visual demonstration of the sorts of invariances that a ResNet learns . This paper compliments earlier work on the IB interpretation of deep learning , which is described in the next section . The key difference is that we analyse a modern network trained on realistic images . 2 INFORMATION BOTTLENECK INTERPRETATION OF DEEP LEARNING . The IB interpretation of learning ( Tishby & Zaslavsky , 2015 ; Shwartz-Ziv & Tishby , 2017 ) suggests that an optimal representation exists between input data , x , and target data , y , that captures all relevant components in x about y . An optimal representation , h , should retain only the information relevant for the task described by y . The IB interpretation posits that the hidden layers in neural networks learn hidden layer configurations that maximally compress characteristics in the input data that are irrelevant to the target task . In classification , for example : the nature of the ground and/or background in an image of a horse may not matter and could be discarded , provided the horse remains ( see Figure 1 ) . Mutual Information We interpret the activations of hidden layers as random variables so that we can compute and track the mutual information ( MI ) between these layers and data . MI is defined as : I ( x ; y ) = ∫ y ∫ x p ( x , y ) log p ( x , y ) p ( x ) p ( y ) dx dy , ( 1 ) which is the Kullback-Leibler ( KL ) divergence between the joint distribution of two random variables and the product of their marginals . Application to Deep Learning Shwartz-Ziv & Tishby ( 2017 ) applied the IB principle to deep learning . By studying what they called the information plane – how I ( x ; h ) and I ( y ; h ) changed over time ( h is a hidden layer , x is input data , and y is the target ) – they showed that neural networks have two learning phases : 1 . Fitting , or empirical error minimisation , where the information shared between hidden representations and input data was maximised . 2 . Compression , where the the information shared between hidden representation and input data was minimised but constrained to the classification task at hand . We refer the reader to Sections 2.1 to 2.3 in Shwartz-Ziv & Tishby ( 2017 ) for more detail on the information plane analysis . Generalisation via compression was put forward as the reason deep learning is successful . From the IB perspective , an advantage of depth is computational in that it shortens compression time . 3 RELATED WORKS . Applying the IB principle to deep learning goes some way to give a theoretical explanation of why neural networks generalise well . However , empirical research to determine its true relevance and applicability is paramount – we contribute here by analysing a modern network using realistic data to see if the principle of compression for generalisation holds in this case . On the IB interpretation of deep learning Saxe et al . ( 2018 ) constructed several experiments to explore and refute the IB interpretation . They demonstrated : 1 . The choice of non-linearity with a binning methodology for MI computation may explain the compression behaviour . Shwartz-Ziv & Tishby ( 2017 ) used a saturating non-linearity that , when paired with a binned MI computation , seems to confound whether compression occurs . Saxe et al . ( 2018 ) used the non-saturating ReLU and did not see compression . 2 . Generalisation does not require compression . A deep linear network toy example was constructed to show generalisation without compression . 3 . Stochastic relaxation is not the mechanism of compression . Neural networks with ReLU activations did not compress ( according to the binned MI calculation ) but still switched from high to low SNRs . What we seek to show in this paper is that modern convolutional networks do evidence information compression during training . We use the ReLU family of non-linearities and instead of binning to compute MI , we use decoding models . Therefore , our experiments aim to contextualise further the IB principle and its applicability to deep learning theory . Reversible Networks Jacobsen et al . ( 2018 ) queried whether compression is necessary for generalisation by constructing an invertible convolutional neural network ( CNN ) . They posited that a reversible network is an example that refutes the IB principle because information is never discarded . They also provided an accompanying counter explanation : where depth is responsible for progressively separating data ( in the inter-class sense ) and contracting data ( in the intra-class sense ) . Although intentionally reversible networks ( Jacobsen et al. , 2018 ) do not discard irrelevant components of the input space , we postulate that these instead progressively separate the irrelevant components from the relevant , allowing the final classification mapping to discard this information . Inverting Supervised Representations Concurrent to the work in this paper , Nash et al . ( 2018 ) trained conditional PixelCNN++ models to ‘ invert ’ representations learned by a CNN classifier . Using the MNIST ( Lecun et al. , 1998 ) and CIFAR-10 ( Krizhevsky , 2009 ) image datasets , they showed how a PixelCNN++ can be used as a tool to analyse the invariances and behaviour of hidden layers . The MI was tracked using a PixelCNN++ model , as here . However , the model tested was much smaller than the ResNet we inspect here ; we test both classification and autoencoding , whereas that work only considered classification ; we provide a finer granularity of assessment , including at model initialisation ; and the conditionally generated samples we provide illustrate greater variation owing to the deeper ResNet . In the next section we present and discuss a lower bound on the MI . 4 MUTUAL INFORMATION LOWER BOUND COMPUTATION . Earlier work applied various binning strategies to toy data . Binning is not applicable to the modern networks we study here because images as input have many more dimensions than toy datasets . We derive a lower bound , similar to Alemi et al . ( 2017 ) , on the MI between two random vectors as follows : I ( x ; h ) = EpD ( x , h ) [ log pD ( x | h ) q ( x | h ) q ( x | h ) ] − C = EpD ( x , h ) [ log q ( x | h ) ] + EpD ( h ) [ DKL ( pD ( x | h ) ||q ( x | h ) ) ] − C ≥ EpD ( x , h ) [ log q ( x | h ) ] − C , ( 2 ) where x is the input image data , h is a hidden representation ( the activations of a hidden layer ) , pD is the true data distribution , and q is an auxiliary distribution introduced for the lower bound . We need not estimate C = EpD ( x ) [ log pD ( x ) ] , since the entropy of the data is constant . The lower bound follows since the KL-divergence is positive . We can replace x with y for the analogous quantity w.r.t . the target data . With sufficiently large data ( of size N ) we can estimate : EpD ( x , h ) [ log q ( x | h ) ] ' 1 N ∑ x ( i ) , h ( i ) log q ( x ( i ) | h ( i ) ) , ( 3 ) where x ( i ) and h ( i ) are images and the activations of a hidden layer , respectively . The task now becomes defining the decoder models q ( x | h ) and q ( y | h ) to estimate the MI . 4.1 DECODER MODELS . MI is difficult to compute unless the problem and representations are heavily constrained or designed to make it possible . We do not enforce such constraints , but instead define decoder models that can estimate a lower bound on the MI . Forward direction : computing I ( y ; h ) The decoder model for q ( y | h ) is constructed as a classifier model that takes as input a hidden layer ’ s activations . To simplify matters , we define this decoder model to be identical to the encoder architecture under scrutiny ( Section 5 ) . To compute the MI between any chosen hidden representation , hj ( where j defines the layer index ) , we freeze all weights prior to this layer , reinitialise the weights thereafter , and train these remaining weights as before ( Section 5.1 ) . Inverse direction : computing I ( x ; h ) The input images – x ∈ RM×M×3 , where M = 32 is the image width/height – are high-dimensional . This makes estimating I ( x ; h ) more complicated than I ( y ; h ) . To do so , we use a PixelCNN++ model ( Salimans et al. , 2017 ) : a state-of-the-art autoregressive explicit density estimator that allows access to the model log-likelihood ( a critical advantage over implicit density estimators ) . See Appendix B for more details . A note on the quality of the lower bound The tightness of the lower bound is directly influenced by the quality of the model used to estimate it . We take a pragmatic stance on what sort of error to expect : using a PixelCNN++ to decode I ( x ; h ) essentially estimates the level of usable information , in as much as it can recover the input images . A similar argument can be made for the forward direction , but there is no direct way of measuring the tightness of the bound . Even though empirical research such as this could benefit from an ablation study , for instance , we leave that to future work .

Summary: The authors propose to extend the analysis of Shwartz-Ziv & Tishby on the information bottleneck principle in artificial neural network training to realistic large-scale settings. They do so by replacing otherwise intractable quantities with tractable bounds in forms of classifiers for I(y;h) and Pixel CNNs for I(x;h). In conclusion, they observe two phases during training, one that maximizes mutual information between input and hidden representation and a second one that compresses the representation at the end of training, in line with the predictions from toy tasks of Shwartz-Ziv & Tishby.