Wider Networks Learn Better Features

1 INTRODUCTION . While the process of feature learning by deep neural networks is still poorly understood , numerous techniques have been developed for visualizing these features in trained networks in an attempt to better understand the learning process ( Erhan et al . ( 2009 ) ; Simonyan et al . ( 2013 ) ; Nguyen et al . ( 2015 ) ; Mordvintsev et al . ( 2015 ) ) . This is usually achieved by optimizing over the input space in order to maximize the activation of a single neuron or filter , with appropriate regularization . These techniques are commonly applied to pre-trained state-of-the-art models , yet they can also be used to explore the effects of various architectural choices on the learned representations . In this work , we specifically investigate the effect of the number of neurons on the quality of the learned representations . It has been shown that increasing the width of a neural network will generally not affect performance on a given task or even improve it ( Neyshabur et al . ( 2017 ) ; Geiger et al . ( 2019 ) ) , and it is natural to study the effect of this modification on the learned representations . We use the recently developed activation atlases technique ( Carter et al . ( 2019 ) ) in order to visualize the inputs that activate an entire hidden state , as opposed to a single neuron . In the case of a wide network , we find that the resulting visualizations differ dramatically . Our main findings are : • As we increase the number of neurons in a network , the features that an individual neuron responds to appear less like natural images . However , there exist directions in the hidden state space that are activated by natural-looking images . • Additionally , the hidden states of wide network contain interpretable information about the inputs that appears not to be present in narrow networks trained to the same test accuracy . • Fine-tuning a linear classifier on the learned features of a wide network on a novel task leads to a substantial improvement in performance , compared to fine-tuning on the features of a narrow network . This is true even when the test accuracy on the original task is the same for the wide and narrow networks . Presumably , this is a result of the additional information encoded in the hidden states of wide networks . The last observation suggests that networks designed for transfer learning tasks may benefit from increasing the width , even though this change may have little effect on performance on the original task . 2 RELATED WORK . The features that activate individual neurons have been the subject of study for a number of years , with early work focusing on MNIST ( Erhan et al . ( 2009 ) ) as well as more complex image datasets ( Simonyan et al . ( 2013 ) ) . The visualization procedure is sensitive to the choice of regularization , and numerous approaches have been explored including regularization using adversarial examples ( Szegedy et al . ( 2013 ) ) , robustness to transformations ( Mordvintsev et al . ( 2015 ) ) and using generative models to parameterize the images ( Nguyen et al . ( 2016 ; 2017 ) ) . In contrast to previous works , activation atlases ( Carter et al . ( 2019 ) ) visualize features learned by the entire hidden state . Since these do not focus on single neurons , they are particularly well-suited to studying wide networks where individual neurons may not learn meaningful features . There is also extensive literature on measuring the responses of individual biological neurons in a number of organisms and brain areas in order to better understand the structure and computation performed in in the input pathways of the brain ( Gross et al . ( 1969 ) ; Mohler et al . ( 1973 ) ; Theunissen et al . ( 2000 ) ) . Thee transferability of learned features between tasks is a well-studied phenomenon ( Long et al . ( 2015 ) ; Zoph et al . ( 2018 ) ) . Recently , it was also shown that the performance of the widely used MAML algorithm for transfer learning ( Finn et al . ( 2017 ) ) can be matched on many benchmark tasks simply by fine-tuning the last layer on the new task ( Raghu et al . ( 2019 ) ) , which is exactly the fine-tuning setting used in the present work . This suggests that the success of MAML is in learning re-usable features as opposed to converging to points in parameter space that are particularly wellsuited to re-training on a novel task . 3 ACTIVATION ATLASES . We briefly summarize the visualization technique introduced in Carter et al . ( 2019 ) . Given a set of inputs { x1 , ... , xk } , a network with activations f l ( x ) at layer l and input x and a grid size g , the technique involves the following steps . 1 . Collecting a set of activations { f l ( x1 ) , ... , f l ( xk ) } 1 . 2 . Reducing the dimensionality of the activations to 2 using UMAP ( McInnes et al . ( 2018 ) ) . 3 . Defining a 2D grid of size g × g , and averaging over the activation vectors that fall in a given grid cell after dimensionality reduction . The averaged activations are then whitened , giving a set of vectors { f̂ l1 , ... , f̂ lg2 } . 4 . For each averaged activation , solving the optimization problem x∗i = argmin x [ g ( f l ( x ) , f̂ li ) ] , where g ( x , y ) is a distance function . Following Carter et al . ( 2019 ) , we use g ( x , y ) = ( x · y ) ×max ( 0.1 , ∠ ( x , y ) ) 4 . The optimization problem is solved iteratively using ADAM ( Kingma & Ba ( 2014 ) ) . At every iteration , a series of transformations are applied to x that one expects the network map to be invariant under ( such as jitters , rescalings and rotations ) . This provides a form of implicit regularization during training that improves the visualization results . 5 . The resulting images { x∗1 , ... , x∗g2 } are then plotted in their respective locations on the grid , giving the activation atlas for layer l. Additional details are provided in Appendix B.1 . 4 FEATURE VISUALIZATION AND NETWORK WIDTH . In order to visualize the features learned by networks of different widths , we train convolutional networks with different numbers of neurons in the penultimate fully-connected layer , which we 1When applied to convolutional layers , a spatial location is also chosen at random for each input . denote by n. We then generate activation atlases at this layer , as reviewed in Section 3 . The generated images in the atlas are ones which activate the hidden state in a given direction ( corresponding to the averaged activations in the given grid cell ) . As such , they provide an indication of the types of inputs that the network responds to , and the type of structure in the input that it is sensitive to . We additionally visualize the features that individual neurons respond to by applying the same optimization procedure where the averaged activations f̂ li are replaced by uniformly sampled one-hot vectors . As we will see , there are cases where the hidden state as a whole is activated by interpretable images even though individual neurons are not . Additional experimental details are presented in Appendix B.2 . 4.1 MNIST . The results on the MNIST dataset for a narrow network with n = 20 and for a wide network with n = 2048 are shown in Figure 1 . Both networks reach 99.0 % test accuracy , and as can be seen in the UMAP output the classes cluster well in both cases . However , in the hidden state of the wide network we see additional fine structure that is not present in the narrow network , which can be observed in the atlas images . In the case of the digit 4 for instance , there is a sub-cluster of activations ( corresponding to a direction in the hidden state space ) that are sensitive to “ closed ” 4s that contain a triangle . Similarly , there are sub-clusters for 2s with a closed loop and 7s with a crossing line . None of this structure seems to be captured by the hidden state of the narrow network . Individual neurons in the narrow network respond to images that resemble digits more than those of the wide network . Based on works such as Frankle & Carbin ( 2018 ) , one may expect that a small subset of neurons in the wide network should still respond to natural images in the same way as the neurons in the narrow network , but this does not appear to be the case . Rather , it appears that the hidden state learns representations that are distributed across all neurons , and as the number of neurons increases the relative amount of information encoded by any individual neuron is reduced . One may wonder whether these results obtained from the MNIST dataset , which is close to being linearly separable in input space , are in fact trivial . To check this , we generated atlases by using the original images as the activations . The results , presented in Appendix A.2 , show that the images are not as clearly interpretable as those generated from the atlases on the trained networks ( and as expected , the clustering is not as good ) . 4.2 TRANSLATED MNIST . The difference between the information in the hidden states of narrow and wide networks is easier to discern in datasets with additional fine grained structure compared to MNIST . We construct such a dataset , which we call translated MNIST , by selecting a subset of training images from MNIST and horizontally translating each image cyclically in all possible 28 ways . The size of the training set remains the same , and the test set is left unchanged . We then generated the atlases for this dataset using the same network architecture and training procedure as in the previous subsection . The final test accuracies were 96.0 % and 96.8 % for widths n = 20 and n = 2048 , respectively . As can be seen in Figure 2 , the additional structure induced by the translations is clearly present in the hidden state of the wide network in the form of the annular structures in the UMAP output . The location of activation vectors in an annulus for a given class are seen to correspond to the degree of translation of the image . In contrast , the hidden state of the narrow network does not clearly encode the degree of translation . Since the translation information was present in the inputs , one may wonder whether this gap between the wide and narrow network is simply a result of a bottleneck in the narrow network . As we show in Section 5 however , the features learned by the wide network are more useful than either the features of the narrow network or the inputs themselves when fine-tuning a linear classifier on a new task . 4.3 CIFAR-10 . Similar phenomena to those described above are also observed on the CIFAR-10 dataset . We again train convolutional networks of the same architecture , this time varying not only the width of the final layer but of all intermediate layers as well by scaling the number of filters in the convolutional layers linearly with n. The final test accuracies for the networks of width n = 64 and n = 2048 were 83 % and 82 % respectively . The results are presented in Figure 3 , where there again appears to be more information in the hidden state of the wide network than the narrow one . Similar to the fine structure observed in the atlases for MNIST and translated MNIST ( which enabled one to distinguish the degree of translation or style of digit ) , here we can distinguish between automobiles of different color in the lower left section of the atlas ( and not in the case of the narrow network ) . On the right section of the atlas , we see that left- and right-facing horses become separated . As before , we also observe that individual neurons learn less interpretable features in the wide network .

Summary: This paper considers the effect of network width of the neural network and its ability to capture various intricate features of the data. In particular, the central claim of this paper is what the title claims "Wider networks learn features that are better". They make this claim using the visualization technique called "activation atlasses". They find that wider networks learn features in the hidden neurons that are more "interpretable" in this visualization framework. Additionally, they also notice that fine-tuning a _linear model_ using the learned features for the wider networks provide better accuracy for new (but related) tasks over the shallower counterparts. For most experiments of this paper, "shallow network" refers to a width of 64 and "wide network" refers to a width of 2048. The main datasets used for the experiments are MNIST, CIFAR 10/100 and a "translated" version of MNIST images.