$¶$ILCRO: Making Importance Landscapes Flat Again

2020·Arxiv

Abstract

Abstract

Convolutional neural networks have had a great success in numerous tasks, including image clas-sification, object detection, sequence modelling, and many more. It is generally assumed that such neural networks are translation invariant.This paper shows that most of the existing convolutional architectures define, at initialisation, a specific feature importance landscape that conditions their capacity to attend to different locations of the images later during training or even at test time. We demonstrate how this phenomenon occurs under specific conditions and how it can be adjusted under some assumptions. We derive the -objective, or PILCRO, a simple regularisation technique that favours weight configurations that produce smooth, low-curvature importance landscapes that are conditioned on the data and not on the chosen architecture. Through extensive experiments, we further show that -regularised versions of popular computer vision networks have a flat importance landscape, train faster, result in a better accuracy and are more robust to noise at test time, when compared with their original counterparts in common computer-vision classification settings.

1. Introduction

Following birth, the human infant peripheral vision is surprisingly weak: while the morphological maturity of the peripheral retinal structures is more advanced than the foveal, the corresponding functional maturity is poorer (Courage & Adams, 1996). Although this difference is partially mitigated after a few years, the fovea keeps playing a prominent role in the human vision system, while the peripheral cells of the retina are mostly involved in secondary tasks, such as movement perception and night vision.

In this paper, we show that a similar development occurs during training of convolutional neural networks: when initialized, most networks concentrate their attention on the center of the images and on other locations defined by the network topology, and later during training, learn to attend to peripheral features when necessary.

More specifically, Convolutional Neural Networks (CNNs) usually have designs that are inherently biased towards paying more attention to subsets of the pixels which are typically located in, but not limited to, the center of the images. Whereas our poor peripheral visual accuracy is compensated by the capacity of the human eye to actively explore the visual field, CNNs are trained on a set of fixed images, and lack the capability to orientate their attention to the relevant parts of their visual field.

Also, aside from trivial tasks such as classifying black-and-white digits on a unicolor background, the relevant signal (the feature) is usually accompanied by other non-relevant signals, e.g. clouds next to a plane and branches and leaves next to a bird. If the relevant signal does not match the preferred location of the network, there is a risk that confounding signals will prevail, and hence generalisation will be harmed.

The propensity of CNNs to consider some pixel locations as more salient than others can be expected to have a series of negative impacts on training quality:

• Bias to some feature location: By paying more attention to some parts of the image, CNNs implicitly assume that features are more likely to occur in specific areas than in others. Yet, this distribution is dictated by the architecture and not by the data.

• Overfitting and noise robustness: It is likely that smooth, flat or data-dictated feature importance landscapes will be less sensitive to the location of the feature of interest in the training dataset. Similarly, noisy input images should be better classified if the class is predicted based on a larger and more optimal cluster of pixels, looking at the entirety of the image rather than a predefined subset of its pixels.

• Training speed: A model that is biased to look at some parts of the image may be slower to train if a subset of images violates its default salience map, as it will need to overcome this problem as learning goes.

Our contributions to the field are the following: first, we formally show that most conventional CNNs will usually consider some input units (i.e. pixels) as more salient than others in a way that is conditioned on the architecture being used and on the size of the image. Next, we introduce the PILCRO-objective (or -objective), a simple regularisation loss that comes in two flavours: the -objective maximises the smoothness of the importance landscape whereas its counterpart -objective minimises the distance between the importance landscape and a location-based smoothness measure of the training dataset, thereby indirectly minimizing the curvature of the importance landscape in a data-driven manner.

The paper is structured as follows. In Section 3, we will approach the problem theoretically using a simplified mathematical setting that will be made more complex later on. Next, in Section 3.3, we will present a simple family of regularisation losses designed to flatten the importance landscape of the input images. Section 4 will then show results of our regularisation methods on various classification tasks in terms of accuracy and noise robustness.

2. Related work

It has been shown that, under specific conditions, CNNs have the desirable property of being translation invariant (Wiatowski & Bolcskei, 2018). However, the proof of such assertion assumes that there is a clear distinction between the signal to classify and the background (for instance, in the case of MNIST (LeCun & Cortes, 2010) dataset). In real settings, however, multiple signals coexist, and translating a feature usually involves changing the content of the whole image. The ability of CNNs to accurately classify a translated images in such settings is therefore less clear.

Our work is closely related to the assessment of feature importance, a hot topic in explainable Artificial Intelligence, where the general hope is to retrieve from a trained network the set of pixels that were used for inference. (Breiman, 2001) suggested that randomly shuffling units (e.g. pixels in the present setting) across an input location might be used to assess this location salience; however, this technique is disputed by recent works (Hooker & Mentch, 2019). Other methods (Lundberg & Lee, 2017) rely on feature hold-on estimation or require expensive post-training assessment (Ribeiro et al., 2016), and are hence difficult to combine with training. Some techniques (Lu et al., 2018) integrate the feature importance measuring tool in the network, thereby limiting these measures to a specific subset of models. Techniques involving gradient intensity (Baehrens et al., 2010; Smilkov et al., 2017; Adebayo et al., 2018; Sundararajan et al., 2017) have gained popularity recently due to their straightforward usage. Our work subscribes to this logic, to the extent that we use gradient intensities to measure the quantity of information flowing from the a pixel to the last prediction unit of a CNN. However, it differs in the sense that we are not interested in the image-wise feature importance heatmap, but rather how a similar heatmap would behave on average over a whole dataset. It has been shown that, under specific conditions, CNNs have the desirable property of being translation invariant (Wiatowski & Bolcskei, 2018). However, the proof of such assertion assumes that there is a clear distinction between the signal to classify and the background (for instance, in the case of MNIST (LeCun & Cortes, 2010) dataset). In real settings, however, multiple signals coexist, and translating a feature usually involves changing the content of the whole image. The ability of CNNs to accurately classify a translated images in such settings is therefore less clear.

Our work is closely related to the assessment of feature importance, a hot topic in explainable Artificial Intelligence, where the general hope is to retrieve from a trained network the set of pixels that were used for inference. (Breiman, 2001) suggested that randomly shuffling units (e.g. pixels in the present setting) across an input location might be used to assess this location salience; however, this technique is disputed by recent works (Hooker & Mentch, 2019). Other methods (Lundberg & Lee, 2017) rely on feature hold-on estimation or require post-training expensive assessment (Ribeiro et al., 2016), and are hence difficult to combine with training. Some techniques (Lu et al., 2018) integrate the feature importance measuring tool in the network, thereby limiting these measures to a specific subset of models. Techniques involving gradient intensity (Baehrens et al., 2010; Smilkov et al., 2017; Adebayo et al., 2018; Sundararajan et al., 2017) have gained popularity recently due to their straightforward usage. Our work subscribes to this logic, to the extend that we use gradient intensities to measure the quantity of information flowing from the a pixel to the last prediction unit of a CNN. However, it differs in the sense that we are not interested in the image-wise feature importance heatmap, but rather how a similar heatmap would behave on average over a whole dataset.

3. Methods

3.1. The number of paths in convolutional networks

CNNs define a backward forking paths topology (which we will refer to as a lattice) whose number of paths to the root units, in its simplest forms (e.g. Figure 2), behaves like a Generalized Pascal triangle. To show this, take the archetypal 1-dimensional CNN displayed in Figure 1. One can easily see that the number of paths from the output tensor to a single unit of the input tensor is greater for the input units located at the center than for units situated on the edges.

With this simple structure in place, we make explicit the

Figure 1. Number of paths in a simple 2-layer 1d-CNN with kernel of size 3. The center pixel has three paths linking it to the output unit (red), whereas the pixel next to it has only two (blue).

Figure 2. According to the central limit theorem, if the network is regular, as its depth grows, the number of paths from the center output unit to the input units approaches the shape of a Gaussian distribution centered on the central input unit. The red path shows an example of a command vector such that

notation that will be used before proceeding to a rigorous analysis of the number of paths connecting two nodes in this lattice. For simplicity, this section assumes one-dimensional CNNs (unless specified otherwise) of depth L, input tensor and output , where B is the batch size, and are the dimension of the input and output, respectively. Also, intermediate cell values are indicated by , where is the index of the layer in the network (hence ). Lower indices indicate the unit index of the tensor, that is

In its simplest form, we define a size to one-dimensional convolutional layer of weight and bias on an input tensor as the following operation:

where

If nonlinearities are present, then , other-

wise . For simplicity, throughout the rest of the paper, we will assume a dilation and a stride of one, unless specified otherwise.

Next, for the purpose of measuring the importance of any given input unit, we focus on the problem of routing output to input unit in the network. For this purpose, we introduce a route function, that given a cell and a preceding layer couple, returns the cell index in this layer for an input vector of commands that reflect the direction taken when going through the network topology with this sequence of commands. We will then show that the number of unique command vectors that link two cells – say a and b – in a network (i.e. that return the b cell index when the a cell is queried together with the b cell layer) impacts how much the b cell influences the value of the a cell at initialization.

Definition 1 Given a 1d-CNN composed solely of stacked convolutional layers, the recursive function (which is defined only for ) is defined as:

In words, the function route takes as input a vector of “commands” , each representing an entry index of the corresponding weight tensor. It outputs the index of the entry in the input tensor (at the desired layer ) that equals the partial derivative of the output w.r.t. the weights indexed by their corresponding layer-command. This index corresponds to the final unit reached when taking the desired route in the network lattice, starting from a given output entry . An example of a route command vector is displayed in Figures 1 and 2.

For a given output unit, multiple command vectors may lead to the same input unit: it is straightforward for instance to show that the path in a regular lattice is permutation invariant w.r.t. C:

route

If needed, this scheme can be slightly altered to account for residual connections 1.

Definition 2 We say there is a path from network lattice iff. there exists a vector of commands C whose respective route mapping returns i when executed across the network:

To count the number of paths linking two given nodes in a regular lattice, we further define the set of the permutations of single commands that lead to from

where is the set of L length permutations of items, and we assume that more complex lattices, can be defined as the set of commands that return i when executed across the lattice. The number of paths linking two nodes is simply defined as the cardinality of this set:

Usually, for two adjacent layers, there is at most one path linking two unit entries. Yet, an unit can be more or less con- nected to the adjacent layer. We further define the expected number of paths of a layer to an entry as

which measures the connectivity of a layer to a given preceding entry of layer

Similarly, we define as the set of single command combinations leading to when starting from

We can then count the number of paths linking two given nodes in a regular lattice by using the multinomial coeffi-cient formula:

if the lattice is regular. This fact has interesting implications: using the central limit theorem, it is not difficult to see that the number of paths from top to bottom of a lattice such as the one displayed in Figure 2 will follow a shape dictated by a Gaussian bell centered on the middle input units.

3.2. Input unit relevance in Convolutional Neural Networks

We now turn to the problem of estimating the importance of an input unit (e.g. a pixel or a voxel) on a model predictions.

Input unit importance (or relevance) can be defined and measured in many different ways. Intuitively, we could say that a unit is important if modifying it (by adding noise, changing its value, or discarding it) greatly impacts the predictions. A standard method to assess unit importance is to look at the absolute change in some measure of the output quality (for instance, prediction accuracy) when it is randomly resampled in the dataset (Breiman, 2001), although other unit importance measures could be considered (see Section 2) but are beyond the scope of this paper.

Under some settings, output-to-input gradients can be used for feature importance assessment (Baehrens et al., 2010). Interestingly, the following lemma shows that expected square gradient can in some cases approximate the resampling-based unit importance measure propsed above:

Lemma 1 Under specific assumptions, including twice differentiability of the network operations, and that the second derivative of this model is zero almost everywhere, a close proxy to the shuffled input importance measure can be obtained via the square root of the expected squared partial derivative of the output w.r.t. the input entry of interest, scaled by its standard deviation.

The proof of Lemma 1 is given in Appendix A.

We assume the standard deviation of the input units to be approximately identical across input locations and can be therefore ignored.

The pixel importance is a simple measure of “how much” gradient flows from one pixel location to the last layer of the network, which we can expect to loosely correlate with the impact that location will have, on average, over the loss being optimized in a gradient descent setting. We now turn to the problem of estimating the expected pixel importance over multiple initialisations of a given CNN.

Proposition 1 In a network of stacked convolutional layers, and under mild assumption about network initialisation, the expected squared partial derivatives of the last layer with respect to an input entry, is linearly proportional to the sum over the set of output-to-input paths of the product of the variances of the weights of the layers crossed through by the respective path:

(3) where as defined in equation 2 and p(W) is the distribution of the network weights and Layers(C) is an operator that returns the sequence of layers associated with the commands (i.e. the layer reached by the previous command).

The proof of Proposition 1 is given in Appendix B.

Proposition 1 has the interesting consequence that the expected unit importance is independent of the input unit value distribution and of the convolutional layer biases if present. Also, if all paths cross the same set of layers (similarly to what can be seen in VGG architectures (Simonyan & Zisserman, 2014)), then the squared entry importance is proportional to the product of the number of paths ending on this features times the product of the weight variances:

Showing that this result generalises to test-time batch normalisation (Ioffe & Szegedy, 2015) and residual connections is straightforward. Regarding the former, the fact that the BatchNorm operation is affine at test time ensures that Equation 15 is still valid, up to a multiplicative constant reflecting the BatchNorm weight multiplication and the “offline” z-scoring. During training however, the variance of the partial derivatives of the network output are not independent of anymore, due to the “online” z-scoring. In Appendix C, we show that under specific conditions, the expected importance landscape of a convolutional CNN with BatchNorm layers depends upon the network topology (that is, the number of paths) and the variance of the input elements, and not upon the weight variance anymore.

Regarding the latter, for many architectures, the effect of residual connections is simply to add a constant number of identical sub-paths from output to input in the network, regardless of which unit location is being considered. In other words, in such conditions, residual connections do not change the fact that the squared input entry salience is monotonically and linearly conditioned on the number of output-to-input paths that end up on it. In situations where residual connections act as downsampling layers with a stride greater than one, they do indeed modify the number of paths for a subset of locations and not for another, making some parts of the input tensors more salient than others.

3.3. Correcting for the number of paths

We have just shown that, after initialisation, each pixel importance is on average determined by the network topology. In this section, we detail how one can derive a regularisation loss for CNNs in order to make the importance landscape less sensitive to the network topology during training.

It should be emphasised beforehand that several existing data augmentation methods indirectly help the networks to be less sensitive to the feature location in the training dataset. Specifically, random image modifications (cropping, zooming, flipping, noising etc.) present the training images in various ways that have the effect of placing the relevant features at different locations. Hence, CNNs trained in such a way across multiple epochs are being presented with identical features with variable locations (or masks in the case of noise adjunction), making them hopefully oblivious to this factor at test time. We suggest that the fact that these modifi-cations help the networks to generalize better can be seen as indirect evidence for the claim that, with non-trivial datasets, translation invariance of CNNs is not verified. Nevertheless, CNNs will usually be biased towards some coordinates in the input images and this can harm the training process.

For simplicity, let us consider the simple case of a minibatch consisting of a single element. We also assume that the network is used in “evaluation” mode, that is, the BatchNorm layers do not keep track of the running input sufficient statistics and use the pre-recorded running sufficient statistics for inference. In classification settings, the network outputs a vector (or more precisely a tensor with B = 1, dand ) of real values that represents the pre-softmax D-class probability:

We define the square-feature importance landscape of such a network as the following operator

where is the input element location, is the entry of the output vector h, and M is the sample size. Note that this operator is implicitly conditioned on the training data distribution, which does have an impact on the landscape at test time for trained CNNs (since the i.i.d. assumptions made in Section 3 do not hold anymore).

In practice, what we wish is to measure how a 2D location is sensitive to the network topology, hence we use the following transformation of

where are respectively the width and height coordinates, where the norm in the numerator is taken over the channel dimension, and where the norm of the denominator is taken to be the Frobenius norm. It can easily be checked that the landscape operator Iis one on expectation for every image.

The operator

outputs a 2D map of the pixel-wise importance in a CNN f that we wish to optimize, which leads us to derive a general family of regularised objectives:

where CE stands for Cross-Entropy loss, and for a given dataset of input-class pairs with be- ing the true class label, network parameters and where is a regularisation hyperparameter. We name this loss -objective (or -regularisation), where stands for PILCRO: Pixel-wise Importance Landscape Curvature Regularised Objective.

We identify two forms that the landscape loss function can take, but many other could be derived as well. A first method could be to directly minimise the curvature of this landscape. A second method consists in minimising the distance between the gradient landscape and a measure of information content in the training dataset.

3.3.1. CURVATURE MINIMISATION (¶c)

For simplicity, the only curvature measure we consider here is the finite-difference k-Laplacian operator (Per- tuz et al., 2013) whose energy (i.e. empirical variance) is a real positive value indicating how sharp that landscape is. Computing the value of this metric is quite straightforward as it only involves performing a discrete convolution with kernel k over the importance landscape, where k is a hyperparameter. In this setting, the -regularization term takes the form

3.3.2. TARGET LANDSCAPE CASTING (¶t)

Although Equation 8 smooths the importance landscape, it might still be desirable to inject a priori knowledge about the location specific data content of the dataset at hand. To do this, we precompute a measure of “smoothness” of each pixel location:

which is analogous to the 2D-feature importance landscape of Equation 6. This naturally leads us to propose the following -regularization:

In practice, this loss “casts” the feature importance landscape to a target importance map retrieved from the data.

3.3.3. PRACTICAL CONSIDERATIONS

Two factors make the evaluation of Equation 7 laborious and need to be overcome: first, it relies on the estimation of the importance landscape which involves computing the square-jacobian vector product over the whole dataset. Instead, we use the central limit theorem to get an approximation of this value using the probabilities defined in Equation 5:

which is true on expectation, and allows us to compute the regularisation loss online.

The second difficulty comes from the fact that computing the gradient of the -regularisation loss requires the importance landscape loss to be differentiated, which in turn necessitates two consecutive backward passes through the computational graph. To lower the associated computational burden, we use two distinct methods: first, we only compute the loss once every T optimisation steps, and multiply the regularisation loss by a factor of . Second, when computing the regularisation loss, we switch the network to evaluation mode, which makes the second derivative of f equal to zero almost everywhere, thereby reducing the memory and time complexity of this operation.

Figure 3. CIFAR-100 with ResNet-50 results in the RCsetting. The importance landscape heatmaps are plotted, numbers refer to the corresponding model (see the legend).

Table 1. CIFAR-100 results with a standard ResNet-50 architecture. Bold numbers indicate top-performing model for the considered metric.

4. Experiments

We tested our regularized objective on two well known clas-sification tasks: CIFAR-100 (Krizhevsky, 2009), constituted of 50K training and 10K validation 32 32 images, and the 2012 ImageNet dataset (Russakovsky et al., 2015) with over a million medium to large size images for the training dataset and 50K images for the validation dataset. As a measure of performance, we used the Top-1 and Top-5 accuracy.

Hyperparameter settings In all experiments, we tested various values of for the -objective and -objective), whereas the -regularisation interval T was set to 10 iterations in all experiments. All discreteLaplacian kernel width values were set to k = 3. Finally, we trained CIFAR-100 with (RC) and without (RCcropping to test for the model sensitivity to data augmentation. The rest of the hyperparameters used are detailed in Appendix D.

4.1. Results

4.1.1. CIFAR-100 DATASET

In both RC settings, it was apparent that models with a lower curvature were performing better (Table 1), with a curvature measured as the total variation (TV, i.e. average square difference between nearby locations) of the empirical gradient landscape computed over the validation dataset. In particular, the -objective with performed best on both random cropping settings, with an average performance increase of roughly 2% (1% for

As expected, regularisation weight had a significant impact on performance: a completely flat landscape such as the one that can be observed for the RC-objective with a high regularisation weight (see Figure 3 and Figure 4) did not perform better than the State-of-the-art (SOTA) configuration, whereas the same experimental setting with outperformed SOTA. This suggests that regularization was better achieved when it was guided by data.

It also appeared that the use of random cropping was helping SOTA and regularized versions of the model to flatten and smooth the gradient norm landscape, hence corroborating the assertion previously made that data augmentation soften

Figure 4. CIFAR-100 with ResNet-50 results in the RC

Table 2. ImageNet results on square 288 288 images.

the bias caused by the architecture topology on the capability to attend evenly different parts of the input images.

To test the robustness of the various networks we trained, we applied a wide set of perturbation types divided in four main categories (Noise, Weather, Digital, Blur) as suggested by (Hendrycks & Dietterich, 2019) across five different levels to all of them. Results are detailed in Appendix E. Overall, they strongly suggested that -objective with models were the most robust configuration for the Weather, Digital and Blur categories, whereas SOTA instances outperformed other models for the Noise category.

4.1.2. IMAGENET DATASET

On ImageNet, -regularisation provided a modest gain in accuracy for both and methods, that was consistent across Top-1, Top-5 and Loss metrics (Table 2 and Figure 5 in Appendix F).

To get a sense of the model robustness to data perturbation, we tested how vulnerable models were to ablation of relevant information. In short, for each model, we computed the salience map using the technique of Integrated Gradient (Sundararajan et al., 2017) for 512 randomly selected correctly classified images from the validation dataset, using 1000 other images of the dataset as baseline. Next, we sorted each of the pixels according to its relevance per image. Finally, we iteratively replaced the top-pixels by their image and channel-wise average value. For each of these new, noisy images, we measured the ratio of the target class probability change with respect to the baseline as a function of K. This procedure shows of how sensitive a classifier is to its top-K most important pixels: the more vulnerable to noise, the sharper the drop of accuracy. As shown in Figure 6 in Appendix F, it appeared again that the -objective with trained model performed better than other networks for this metric, which was consistent with other metrics, such as curvature, loss and accuracy.

Like we did for CIFAR-100, we also tested robustness of the trained models to different image perturbations. Although results were less clear than with CIFAR-100, we still observed a greater robustness for -regularised models than their naive counterparts, that was consistent per perturbation category and per -objective setting (Appendix E).

5. Conclusion

This paper uncovers an apparently ignored issue in the ML community that has to do with how fairly a neural network treats various input locations, and how gradient flows in neural networks. We propose a regularisation loss (-objective) to deal with this issue. Further work will be required to develop architectures that mitigate this effect as well as metrics that can measure its impact on the network performance and fairness.

References

Adebayo, J., Gilmer, J., Goodfellow, I., and Kim, B. Local explanation methods for deep neural networks lack sensitivity to parameter values. 6th International Conference on Learning Representations, ICLR 2018 - Workshop Track Proceedings, pp. 1–10, 2018.

Baehrens, D., Schroeter, T., Harmeling, S., Kawanabe, M., Hansen, K., and M¨uller, K.-R. How to Explain Individual Classification Decisions. J. Mach. Learn. Res., 11:1803–1831, aug 2010. ISSN 1532-4435. URL http://dl.acm.org/citation. cfm?id=1756006.1859912.

Breiman, L. Random Forests. Machine Learning, 45 (1):5–32, oct 2001. ISSN 1573-0565. doi: 10.1023/ A:1010933404324. URL https://doi.org/10. 1023/A:1010933404324.

Courage, M. L. and Adams, R. J. Infant peripheral vision: The development of monocular visual acuity in the first 3 months of postnatal life. Vision Research, 1996. ISSN 00426989. doi: 10.1016/0042-6989(95)00204-9.

Glorot, X. and Bengio, Y. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS’10), 2010.

He, K., Zhang, X., Ren, S., and Sun, J. Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification. pp. 1026–1034, feb 2015. ISSN 15505499. doi: 10.1109/ICCV.2015.123. URL https: //www.cv-foundation.org/openaccess/ content{_}iccv{_}2015/html/ He{_}Delving{_}Deep{_}into{_}ICCV{_}2015{_}paper. htmlhttp://arxiv.org/abs/1502.01852.

He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2016-Decem, pp. 770– 778, 2016. ISBN 9781467388504. doi: 10.1109/CVPR. 2016.90.

Hendrycks, D. and Dietterich, T. Benchmarking neural network robustness to common corruptions and perturbations. 7th International Conference on Learning Representations, ICLR 2019, pp. 1–16, 2019.

Hooker, G. and Mentch, L. Please Stop Permuting Features: An Explanation and Alternatives. pp. 1–15, 2019. URL http://arxiv.org/abs/1905.03151.

Ioffe, S. and Szegedy, C. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. 2015. URL http://arxiv.org/abs/1502. 03167.

Krizhevsky, A. Learning multiple layers of features from tiny images. Technical report, 2009.

LeCun, Y. and Cortes, C. MNIST handwritten digit database. 2010. URL http://yann.lecun.com/ exdb/mnist/.

Lu, Y. Y., Fan, Y., Lv, J., and Noble, W. S. Deeppink: Reproducible feature selection in deep neural networks. In Advances in Neural Information Processing Systems, volume 2018-Decem, pp. 8676–8686, sep 2018. URL http://arxiv.org/abs/1809.01185.

Lundberg, S. M. and Lee, S. I. A unified approach to in- terpreting model predictions. In Advances in Neural Information Processing Systems, volume 2017-Decem, pp. 4766–4775, 2017.

Nair, V. and Hinton, G. E. Rectified linear units improve Restricted Boltzmann machines. In ICML 2010 - Proceedings, 27th International Conference on Machine Learning, 2010. ISBN 9781605589077.

Pertuz, S., Puig, D., and Angel, M. Analysis of focus measure operators for shape-from-focus. Pattern Recognition, 46(5):1415–1432, 2013. ISSN 0031-3203. doi: 10.1016/j.patcog.2012.11.011. URL http://dx.doi. org/10.1016/j.patcog.2012.11.011.

Ribeiro, M. T., Singh, S., and Guestrin, C. ”Why should i trust you?” Explaining the predictions of any classi-fier. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, volume 13-17-Augu, pp. 1135–1144, feb 2016. ISBN 9781450342322. doi: 10.1145/2939672.2939778. URL http://arxiv.org/abs/1602.04938.

Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., Berg, A. C., and Fei-Fei, L. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.

Simonyan, K. and Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. pp. 1– 14, 2014. URL http://arxiv.org/abs/1409. 1556.

Smilkov, D., Thorat, N., Kim, B., Vi´egas, F., and Wattenberg, M. SmoothGrad: removing noise by adding noise. 2017. URL http://arxiv.org/abs/1706. 03825.

Sundararajan, M., Taly, A., and Yan, Q. Axiomatic attribu- tion for deep networks. 34th International Conference on Machine Learning, ICML 2017, 7:5109–5118, 2017.

Wiatowski, T. and Bolcskei, H. A Mathematical Theory of Deep Convolutional Neural Networks for Feature Extraction. IEEE Transactions on Information Theory, 64(3):1845–1866, 2018. ISSN 00189448. doi: 10.1109/TIT.2017.2776228.

Yao, Z., Gholami, A., Lei, Q., Keutzer, K., and Mahoney, M. W. Hessian-based Analysis of Large Batch Training and Robustness to Adversaries. In 32nd Conference on Neural Information Processing Systems (NIPS 2018), Montr´eal, Canada., number NeurIPS, pp. 1–20, 2018.

A. Proof of Lemma 1

To show that in CNNs, the (squared) permutation-based measure of feature importance can be approximated by the squared expected output-to-input partial derivative, we first start by deriving the formula of the former in a model f receiving two input units

Next, we expand the inner expectation using its second order Taylor series:

A curiosity of CNNs with ReLU activation functions is that the second derivative of the (pre-loss) output layer w.r.t. the input units is zero almost everywhere ((Yao et al., 2018)), which simplifies the above equation to

Plugging Equation 12 into Equation 10 now gives:

Considering the negative difference , we can substitute which leads to

As the partial derivative of is defined as

and under the assumption that are sufficiently close (common to Equation 11), the following approximation holds:

where we have taken advantage of the fact that by definition of the variance.

B. Proof of Proposition 1

Proposition 1 follows directly from the chain rule:

and from the fact that, under most initialisation methods, including Glorot (Glorot & Bengio, 2010) and He (He et al., 2015), the weights of the network are zero on expectation. This simplifies the above equation significantly, as the expectation of the product of two independent draws of a same distribution with zero mean is zero, that is:

Hence,

which leads to Equation 3 by definition of the variance.

C. Effect of nonlinearities

Nonlinear activation functions and other operations (typically normalization at train time) break the above logic and make the expected squared output-input partial derivative dependent on other factors than the number of paths and the weights variance. This means that the expected feature importance is not independent of the data anymore, and the picture is therefore more complex.

Here, we focus on the Restricted Linear Unit (ReLU) activation function ((Nair & Hinton, 2010)). Consider the squared partial derivative of the operation

which is on expectation equal to if is equal to 0 on expectation. For later, it will be interesting to remember that, assuming that entries are i.i.d. and follow a normal distribution N(0, S), the output variance is equal to

where truncated normal distribution.

To some degree, the case of BatchNorm layers is harder to handle. Training time batch normalization and its derivatives essentially entail a z-scoring of the input value – most often the output of a convolutional layer – over some dimension of the input tensor, typically the batch, height and width dimension for two-dimensional CNNs. The following lemma shows how BatchNorm layers typically impact the unit importance in a CNN:

Lemma 2 In a neural network where convolutions are interleaved with batch normalization layers, the salience of a given input entry is in good approximation equal to

which is independent of the weight variance.

Proof: The expected squared partial derivative of the output of a convolutional layer is equal to:

The partial derivative of BatchNorm layers takes two generic forms,

from which we can derive the squared derivative:

Equation 18 shows that we can derive upper bound the squared derivative of the BatchNorm layer, which is tight when the sample size (typically equal to the product of the batch size, the width and the height of the layer considered) is high.

Let us now derive the expected value of the squared partial derivative of the composite function:

where the expectation is taken w.r.t. the weight distribution and the input data. We lower bound this expression using Jensen’s inequality for the inverse variance expectation

which has an error of the order , again making this approximation tight for large

Using the rule of the total expectation, and noting that under the assumption that the entries of , the variance of the output of the convolution is equal to

Equation 19 can be decomposed as

where k is the index of the weight entry s.t. . It becomes apparent in Equation 20 that BatchNorm layers cancel the effect of the variance of convolutional layers, ensuring that the expected squared partial derivative of the output layer is in good approximation dependent of the input variance only.

The generalization to multiple layers follows by simple recursivity.

As we can see, BatchNorm layers decouple the variance of the weights of the discrete convolutions from the measure of input unit importance, at the cost of making it a function of the input variance.

D. Hyperparameter settings

D.1. CIFAR-100 dataset

We tested the CIFAR-100 dataset on the ResNet50 architecture ((He et al., 2016)) over a single random seed. The same standard training hyperparameters were used for all optimisations: batch size of 128 samples, SGD optimizer with momentum set with an initial learning rate of 0.1 decaying with a cosine schedule over 200 epochs. We experimented two data augmentation settings where random horizontal flipping was (RC) or was not (RC) accompanied by 0 to 4 pixels random-cropping with reflection-mode padding. A weight decay of was used according to SOTA standards.

D.2. ImageNet dataset

We tested ResNet50 on the 2012 ImageNet dataset with a standard hyperparameter configuration: batch size of 256 images, SGD with initial learning rate of 0.256 and cosine schedule, momentum of 0.875, label smoothing of 0.1, weight decay of that excluded BatchNorm trainable parameters. Data augmentation included random zooming, and images were cropped with 224 pixels square input dimension. Because of the absence of random cropping for ImageNet, we did not include RCexperiments in this section. Results are reported over a single random seed.

F. ImageNet results

Figure 5. ImageNet with ResNet-50 accuracy and landscape curvature results. The first epochs are zoomed in to show the greater speed of convergence of the -regularized objective.

Figure 6. Top-K ablation based on salience map for the different versions of ResNet-50 trained on ImageNet. As shown by the Area Under the Curve (AUC) in the legend, a narrow range of regularization weight made the model more robust to corruption when compared to SOTA, while too much regularization seemed to have the opposite effect.

designed for accessibility and to further open science