SVCCA: Singular Vector Canonical Correlation Analysis for Deep Learning Dynamics and Interpretability

06/19/2017 ∙ by Maithra Raghu, et al. ∙ 0

We propose a new technique, Singular Vector Canonical Correlation Analysis (SVCCA), a tool for quickly comparing two representations in a way that is both invariant to affine transform (allowing comparison between different layers and networks) and fast to compute (allowing more comparisons to be calculated than with previous methods). We deploy this tool to measure the intrinsic dimensionality of layers, showing in some cases needless over-parameterization; to probe learning dynamics throughout training, finding that networks converge to final representations from the bottom up; to show where class-specific information in networks is formed; and to suggest new training regimes that simultaneously save computation and overfit less. Code:



There are no comments yet.


page 7

page 12

page 16

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

As the empirical success of deep neural networks (

hinton2012deep ; krizhevsky2012imagenet ; wu2016google ) become an indisputable fact, the goal of better understanding these models escalates in importance. Central to this aim is a core issue of deciphering learned representations. Facets of this key question have been explored empirically, particularly for image models, in alain2016understanding ; eigen2013understanding ; lenc2015understanding ; li2015convergent ; mahendran2015understanding ; montavon2011kernel ; simonyan2013deep ; yosinski2015understanding ; zeiler2014visualizing . Most of these approaches are motivated by interpretability of learned representations. More recently, li-2016-arXivICLR-convergent-learning:-do-different

studied the similarities of representations learned by multiple networks by finding permutations of neurons with maximal correlation.

In this work we introduce a new approach to the study of network representations, based on an analysis of each neuron’s activation vector

– the scalar outputs it emits on input datapoints. With this interpretation of neurons as vectors (and layers as subspaces, spanned by neurons), we introduce SVCCA, Singular Vector Canonical Correlation Analysis, an amalgamation of Singular Value Decomposition and Canonical Correlation Analysis (CCA)

ccapaper , as a powerful method for analyzing deep representations. Although CCA has not previously been used to compare deep representations, it has been used for related tasks such as computing the similarity between modeled and measured brain activity sussillo2015neural , and training multi-lingual word embeddings in language models faruqui2014improving .

The main contributions resulting from the introduction of SVCCA are the following:

  1. We ask: is the dimensionality of a layer’s learned representation the same as the number of neurons in the layer? Answer: No. We show that trained networks perform equally well with a number of directions just a fraction of the number of neurons with no additional training, provided they are carefully chosen with SVCCA (Section 2.1). We explore the consequences for model compression (Section 4.4).

  2. We ask: what do deep representation learning dynamics look like? Answer: Networks broadly converge bottom up. Using SVCCA, we compare layers across time and find they solidify from the bottom up. This suggests a simple, computationally more efficient method of training networks, Freeze Training, where lower layers are sequentially frozen after a certain number of timesteps (Sections 4.1, 4.2).

  3. We develop a method based on the discrete Fourier transform which greatly speeds up the application of SVCCA to convolutional neural networks (Section 


  4. We also explore an interpretability question, of when an architecture becomes sensitive to different classes. We find that SVCCA captures the semantics of different classes, with similar classes having similar sensitivities, and vice versa. (Section 4.3).

Experimental Details

Most of our experiments are performed on CIFAR-10 (augmented with random translations). The main architectures we use are a convolutional network and a residual network111Convnet layers: conv-conv-bn-pool-conv-conv-conv-bn-pool-fc-bn-fc-bn-out. Resnet layers: conv-(x10 c/bn/r block)-(x10 c/bn/r block)-(x10 c/bn/r block)-bn-fc-out.. To produce a few figures, we also use a toy regression task: training a four hidden layer fully connected network with 1D input and 4D output, to regress on four different simple functions.

2 Measuring Representations in Neural Networks


Figure 1: To demonstrate SVCCA, we consider a toy regression task (regression target as in Figure 3). (a) We train two networks with four fully connected hidden layers starting from different random initializations, and examine the representation learned by the penultimate (shaded) layer in each network. (b) The neurons with the highest activations in net 1 (maroon) and in net 2 (green). The x-axis indexes over the dataset: in our formulation, the representation of a neuron is simply its value over a dataset (Section LABEL:sec:method). (c)

The SVD directions — i.e. the directions of maximal variance — for each network.

(d) The top SVCCA directions. We see that each pair of maroon/green lines (starting from the top) are almost visually identical (up to a sign). Thus, although looking at just neurons (b) seems to indicate that the networks learn very different representations, looking at the SVCCA subspace (d) shows that the information in the representations are (up to a sign) nearly identical.

Our goal in this paper is to analyze and interpret the representations learned by neural networks. The critical question from which our investigation departs is: how should we define the representation of a neuron? Consider that a neuron at a particular layer in a network computes a real-valued function over the network’s input domain. In other words, if we had a lookup table of all possible mappings for a neuron, it would be a complete portrayal of that neuron’s functional form.

However, such infinite tables are not only practically infeasible, but are also problematic to process into a set of conclusions. Our primary interest is not in the neuron’s response to random data, but rather in how it represents features of a specific dataset (e.g. natural images). Therefore, in this study we take a neuron’s representation to be its set of responses over a finite set of inputs — those drawn from some training or validation set.

More concretely, for a given dataset and a neuron on layer , , we define to be the vector of outputs on , i.e.

Note that this is a different vector from the often-considered vector of the “representation at a layer of a single input.” Here is a single neuron’s response over the entire dataset, not an entire layer’s response for a single input. In this view, a neuron’s representation can be thought of as a single vector in a high-dimensional space. Broadening our view from a single neuron to the collection of neurons in a layer, the layer can be thought of as the set of neuron vectors contained within that layer. This set of vectors will span some subspace. To summarize:

Considered over a dataset with examples, a neuron is a vector in .

A layer is the subspace of spanned by its neurons’ vectors.

Within this formalism, we introduce Singular Vector Canonical Correlation Analysis (SVCCA) as a method for analysing representations. SVCCA proceeds as follows:

  • Input: SVCCA takes as input two (not necessarily different) sets of neurons (typically layers of a network) and

  • Step 1 First SVCCA performs a singular value decomposition of each subspace to get sub-subspaces which comprise of the most important directions of the original subspaces . In general we take enough directions to explain 99% of variance in the subspace. This is especially important in neural network representations, where as we will show many low variance directions (neurons) are primarily noise.

  • Step 2 Second, compute the Canonical Correlation similarity (ccapaper ) of

    : linearly transform

    to be as aligned as possible and compute correlation coefficients. In particular, given the output of step 1, , CCA linearly transforms these subspaces , such as to maximize the correlations between the transformed subspaces.

  • Output: With these steps, SVCCA outputs pairs of aligned directions, and how well they correlate, . Step 1 also produces intermediate output in the form of the top singular values and directions.

For a more detailed description of each step, see the Appendix. SVCCA can be used to analyse any two sets of neurons. In our experiments, we utilize this flexibility to compare representations across different random initializations, architectures, timesteps during training, and specific classes and layers.

Figure 1 shows a simple, intuitive demonstration of SVCCA. We train a small network on a toy regression task and show each step of SVCCA, along with the resulting very similar representations. SVCCA is able to find hidden similarities in the representations.

2.1 Distributed Representations

An important property of SVCCA is that it is truly a subspace method: both SVD and CCA work with instead of being axis aligned to the directions. SVD finds singular vectors , and the subsequent CCA finds a linear transform , giving orthogonal canonically correlated directions . In other words, SVCCA has no preference for representations that are neuron (axes) aligned.

If representations are distributed across many dimensions, then this is a desirable property of a representation analysis method. Previous studies have reported that representations may be more complex than either fully distributed or axis-aligned szegedy2013intriguing ; zhou-2014-arXiv-object-detectors-emerge ; li-2016-arXivICLR-convergent-learning:-do-different but this question remains open.

Figure 2: Demonstration of (a) disproportionate importance of SVCCA directions, and (b) distributed nature of some of these directions. For both panes, we first find the top SVCCA directions by training two conv nets on CIFAR-10 and comparing corresponding layers. (a) We project the output of the top three layers, pool1, fc1, fc2, onto this top- subspace. We see accuracy rises rapidly with increasing , with even giving reasonable performance, with no retraining. Baselines of random neuron subspaces and max activation neurons require larger to perform as well. (b): after projecting onto top subspace (like left), dotted lines then project again onto neurons, chosen to correspond highly to the top -SVCCA subspace. Many more neurons are needed than for better performance, suggesting distributedness of SVCCA directions.

We use SVCCA as a tool to probe the nature of representations via two experiments:

  1. We find that the subspace directions found by SVCCA are disproportionately important to the representation learned by a layer, relative to neuron-aligned directions.

  2. We show that at least some of these directions are distributed across many neurons.

Experiments for (a), (b) are shown in Figure 2 as (a), (b) respectively. For both experiments, we first acquire two different representations, , for a layer by training two different random initializations of a convolutional network on CIFAR-10. We then apply SVCCA to and to get directions and , ordered according to importance by SVCCA, with each being a linear combination of the original neurons, i.e. .

For different values of , we can then restrict layer ’s output to lie in the subspace of , the most useful -dimensional subspace as found by SVCCA, done by projecting each neuron into this dimensional space.

We find — somewhat surprisingly — that very few SVCCA directions are required for the network to perform the task well. As shown in Figure 2(a), for a network trained on CIFAR-10, the first 25 dimensions provide nearly the same accuracy as using all 512 dimensions of a fully connected layer with 512 neurons. The accuracy curve rises rapidly with the first few SVCCA directions, and plateaus quickly afterwards, for . This suggests that the useful information contained in neurons is well summarized by the subspace formed by the top SVCCA directions. Two baselines for comparison are picking random and maximum activation neuron aligned subspaces and projecting outputs onto these. Both of these baselines require far more directions (in this case: neurons) before matching the accuracy achieved by the SVCCA directions. These results also suggest approaches to model compression, which are explored in more detail in Section 4.4.

Figure 2(b) next demonstrates that these useful SVCCA directions are at least somewhat distributed over neurons rather than axis-aligned. First, the top SVCCA directions are picked and the representation is projected onto this subspace. Next, the representation is further projected onto neurons, where the are chosen as those most important to the SVCCA directions . The resulting accuracy is plotted for different choices of (given by x-axis) and different choices of (different lines). That, for example, keeping even 100 fc1 neurons (dashed green line) cannot maintain the accuracy of the first 20 SVCCA directions (solid green line at x-axis 20) suggests that those 20 SVCCA directions are distributed across 5 or more neurons each, on average. Figure 3 shows a further demonstration of the effect on the output of projecting onto top SVCCA directions, here for the toy regression case.

Figure 3: The effect on the output of a latent representation being projected onto top SVCCA directions in the toy regression task. Representations of the penultimate layer are projected onto top SVCCA directions (from second pane). By , the output looks very similar to the full neuron output (left).
Why the two step SV + CCA method is needed.

Both SVD and CCA have important properties for analysing network representations and SVCCA consequently benefits greatly from being a two step method. CCA is invariant to affine transformations, enabling comparisons without natural alignment (e.g. different architectures, Section 4.4). See Appendix B for proofs and a demonstrative figure. While CCA is a powerful method, it also suffers from certain shortcomings, particularly in determining how many directions were important to the original space , which is the strength of SVD. See Appendix for an example where naive CCA performs badly. Both the SVD and CCA steps are critical to the analysis of learning dynamics in Section 4.1.

3 Scaling SVCCA for Convolutional Layers

Applying SVCCA to convolutional layers can be done in two natural ways:

  1. Same layer comparisons: If are the same layer (at different timesteps or across random initializations) receiving the same input we can concatenate along the pixel (height , width ) coordinates to form a vector: a conv layer maps to vectors, each of dimension , where is the number of datapoints. This is a natural choice because neurons at different pixel coordinates see different image data patches to each other. When are two versions of the same layer, these different views correspond perfectly.

  2. Different layer comparisons: When are not the same layer, the image patches seen by different neurons have no natural correspondence. But we can flatten an conv into neurons, each of dimension . This approach is valid for convs in different networks or at different depths.

3.1 Scaling SVCCA with Discrete Fourier Transforms

Applying SVCCA to convolutions introduces a computational challenge: the number of neurons () in convolutional layers, especially early ones, is very large, making SVCCA prohibitively expensive due to the large matrices involved. Luckily the problem of approximate dimensionality reduction of large matrices is well studied, and efficient algorithms exist, e.g. tropp2009randommatrices .

For convolutional layers however, we can avoid dimensionality reduction and perform exact SVCCA, even for large networks. This is achieved by preprocessing each channel with a Discrete Fourier Transform (which preserves CCA due to invariances, see Appendix), causing all (covariance) matrices to be block-diagonal. This allows all matrix operations to be performed block by block, and only over the diagonal blocks, vastly reducing computation. We show:

Theorem 1.

Suppose we have a translation invariant (image) dataset and convolutional layers , . Letting denote the discrete fourier transform applied to each channel of , the covariance is block diagonal, with blocks of size .

We make only two assumptions: 1) all layers below , are either conv or pooling layers with circular boundary conditions (translation equivariance) 2) The dataset has all translations of the images . This is necessary in the proof for certain symmetries in neuron activations, but these symmetries typically exist in natural images even without translation invariance, as shown in Figure App.2 in the Appendix. Below are key statements, with proofs in Appendix.

Definition 1.

Say a single channel image dataset of images is translation invariant if for any (wlog ) image , with pixel values , is also in , for all , where (and similarly for ).

For a multiple channel image , an translation is an height/width shift on every channel separately. is then translation invariant as above.

To prove Theorem 1, we first show another theorem:

Theorem 2.

Given a translation invariant dataset , and a convolutional layer with channels applied to

  1. the DFT of , has diagonal covariance matrix (with itself).

  2. the DFT of , , have diagonal covariance with each other.

Finally, both of these theorems rely on properties of circulant matrices and their DFTs:

Lemma 1.

The covariance matrix of applied to translation invariant is circulant and block circulant.

Lemma 2.

The DFT of a circulant matrix is diagonal.

4 Applications of SVCCA

4.1 Learning Dynamics with SVCCA

We can use SVCCA as a window into learning dynamics by comparing the representation at a layer at different points during training to its final representation. Furthermore, as the SVCCA computations are relatively cheap to compute compared to methods that require training an auxiliary network for each comparison alain2016understanding ; lenc2015understanding ; li-2016-arXivICLR-convergent-learning:-do-different , we can compare all layers during training at all timesteps to all layers at the final time step, producing a rich view into the learning process.

The outputs of SVCCA are the aligned directions , how well they align, , as well as intermediate output from the first step, of singular values and directions, , . We condense these outputs into a single value, the SVCCA similarity , that encapsulates how well the representations of two layers are aligned with each other,


where is the size of the smaller of the two layers being compared. The SVCCA similarity is the average correlation across aligned directions, and is a direct multidimensional analogue of Pearson correlation.

The SVCCA similarity for all pairs of layers, and all time steps, is shown in Figure 4 for a convnet and a resnet architecture trained on CIFAR10.

Figure 4: Learning dynamics plots for conv (top) and res (bottom) nets trained on CIFAR-10. Each pane is a matrix of size layers layers, with each entry showing the SVCCA similarity between the two layers. Note that learning broadly happens ‘bottom up’ – layers closer to the input seem to solidify into their final representations with the exception of the very top layers. Per layer plots are included in the Appendix. Other patterns are also visible – batch norm layers maintain nearly perfect similarity to the layer preceding them due to scaling invariance (with a slight reduction since batch norm changes the SVD directions which capture 99% of the variance). In the resnet plot, we see a stripe like pattern due to skip connections inducing high similarities to previous layers.

4.2 Freeze Training

Observing in Figure 4 that networks broadly converge from the bottom up, we propose a training method where we successively freeze lower layers during training, only updating higher and higher layers, saving all computation needed for deriving gradients and updating in lower layers.

Figure 5: Freeze Training reduces training cost and improves generalization. We apply Freeze Training to a convolutional network on CIFAR-10 and a residual network on CIFAR-10. As shown by the grey dotted lines (which indicate the timestep at which another layer is frozen), both networks have a ‘linear’ freezing regime: for the convolutional network, we freeze individual layers at evenly spaced timesteps throughout training. For the residual network, we freeze entire residual blocks at each freeze step. The curves were averaged over ten runs.

We apply this method to convolutional and residual networks trained on CIFAR-10, Figure 5, using a linear freezing regime: in the convolutional network, each layer is frozen at a fraction (layer number/total layers) of total training time, while for resnets, each residual block is frozen at a fraction (block number/total blocks). The vertical grey dotted lines show which steps have another set of layers frozen. Aside from saving computation, Freeze Training appears to actively help generalization accuracy, like early stopping but with different layers requiring different stopping points.

4.3 Interpreting Representations: when are classes learned?

Figure 6:

We plot the CCA similarity using the Discrete Fourier Transform between the logits of five classes and layers in the Imagenet Resnet. The classes are firetruck and two pairs of dog breeds (terriers and husky like dogs: husky and eskimo dog) that are chosen to be similar to each other. These semantic properties are captured in CCA similarity, where we see that the line corresponding to firetruck is clearly distinct from the two pairs of dog breeds, and the two lines in each pair are both very close to each other, reflecting the fact that each pair consists of visually similar looking images. Firetruck also appears to be

easier for the network to learn, with greater sensitivity displayed much sooner.

We also can use SVCCA to compare how correlated representations in each layer are with the logits of each class in order to measure how knowledge about the target evolves throughout the network. In Figure 6 we apply the DFT CCA technique on the Imagenet Resnet resnet2015he . We take five different classes and for different layers in the network, compute the DFT CCA similarity between the logit of that class and the network layer. The results successfully reflect semantic aspects of the classes: the firetruck class sensitivity line is clearly distinct from the two pairs of dog breeds, and network develops greater sensitivity to firetruck earlier on. The two pairs of dog breeds, purposefully chosen so that each pair is similar to the other in appearance, have cca similarity lines that are very close to each other through the network, indicating these classes are similar to each other.

Figure 7: We plot the CCA similarity using the Discrete Fourier Transform between convolutional layers of a Resnet and Convnet trained on CIFAR-10. We find that the lower layrs of both models are noticeably similar to each other, and get progressively less similar as we compare higher layers. Note that the highest layers of the resnet are least similar to the lower layers of the convnet.

4.4 Other Applications: Cross Model Comparison and compression

SVCCA similarity can also be used to compare the similarity of representations across different random initializations, and even different architectures. We compare convolutional networks on CIFAR-10 across random initializations (Appendix) and also a convolutional network to a residual network in Figure 7, using the DFT method described in 3.

In Figure 3, we saw that projecting onto the subspace of the top few SVCCA directions resulted in comparable accuracy. This observations motivates an approach to model compression. In particular, letting the output vector of layer be , and the weights , we replace the usual with where is a projection matrix, projecting onto the top SVCCA directions. This bottleneck reduces both parameter count and inference computational cost for the layer by a factor . In Figure App.5 in the Appendix, we show that we can consecutively compress top layers with SVCCA by a significant amount (in one case reducing each layer to original size) and hardly affect performance.

5 Conclusion

In this paper we present SVCCA, a general method which allows for comparison of the learned distributed representations between different neural network layers and architectures. Using SVCCA we obtain novel insights into the learning dynamics and learned representations of common neural network architectures. These insights motivated a new Freeze Training technique which can reduce the number of flops required to train networks and potentially even increase generalization performance. We observe that CCA similarity can be a helpful tool for interpretability, with sensitivity to different classes reflecting their semantic properties. This technique also motivates a new algorithm for model compression. Finally, the “lower layers learn first” behavior was also observed for recurrent neural networks as shown in Figure 

App.6 in the Appendix.


Appendix A Mathematical details of CCA and SVCCA

Canonical Correlation of

Finding maximal correlations between can be expressed as finding to maximise:

where are the covariance and cross-covariance terms. By performing the change of basis and

and using Cauchy-Schwarz we recover an eigenvalue problem:


Given two subspaces , SVCCA first performs a singular value decomposition on . This results in singular vectors with associated singular values (for , and similarly for ). Of these singular vectors, we keep the top where is the smallest value that . That is, of the variation of is explainable by the top vectors. This helps remove directions/neurons that are constant zero, or noise with small magnitude.

Then, we apply Canonical Correlation Analysis (CCA) to the sets of top singular vectors.

CCA is a well established statistical method for understanding the similarity of two different sets of random variables – given our two sets of vectors

, we wish to find linear transformations, that maximally correlate the subspaces. This can be reduced to an eigenvalue problem. Solving this results in linearly transformed subspaces with directions that are maximally correlated with each other, and orthogonal to . We let . In summary, we have:

SVCCA Summary
  1. Input:

  2. Perform: SVD(X), SVD(Y). Output:

  3. Perform CCA(, ). Output: , and

Appendix B Additional Proofs and Figures from Section 2.1

Proof of Orthonormal and Scaling Invariance of CCA:

We can see this using equation (*) as follows: suppose are orthonormal transforms applied to the sets . Then it follows that becomes , for , and similarly for and . Also note becomes . Equation (*) then becomes

So if is a solution to equation (*), then is a solution to the equation above, which results in the same correlation coefficients.

Figure App.1: This figure shows the ability of CCA to deal with orthogonal and scaling transforms. In the first pane, the maroon plot shows one of the highest activation neurons in the penultimate layer of a network trained on CIFAR-10, with the x-axis being (ordered) image ids and the y-axis being activation on that image. The green plots show two resulting distorted directions after this and two of the other top activation neurons are permuted, rotated and scaled. Pane two shows the result of applying CCA to the distorted directions and the original signal, which succeeds in recovering the original signal.
b.0.1 The importance of SVD: how many directions matter?

While CCA is excellent at identifying useful learned directions that correlate, independent of certain common transforms, it doesn’t capture the full picture entirely. Consider the following setting: suppose we have subspaces , with being dimensions, being dimensions, of which are perfectly aligned with and the other being noise, and C being dimensions, of which are aligned with (and ) and the other being useful, but different directions.

Then looking at the canonical correlation coefficients of and will give the same result, both being for values and for everything else. But these are two very different cases – the subspace is indeed well represented by the directions that are aligned with . But the subspace has more useful directions.

This distinction becomes particularly important when aggregating canonical correlation coefficients as a measure of similarity, as used in analysing network learning dynamics. However, by first applying SVD to determine the number of directions needed to explain of the observed variance, we can distinguish between pathological cases like the one above.

Appendix C Proof of Theorem 1

(a) (b) (c) (d)
Figure App.2: This figure visualizes the covariance matrix of one of the channels of a resnet trained on Imagenet. Black correspond to large values and white to small values. (a) we compute the covariance without a translation invariant dataset and without first preprocessing the images by DFT. We see that the covariance matrix is dense. (b) We compute the covariance after applying DFT, but without augmenting the dataset with translations. Even without enforcing translation invariance, we see that the covariance in the DFT basis is approximately diagonal. (c) Same as (a), but the dataset is augmented to be fully translation invariant. The covariance in the pixel basis is still dense. (d) Same as (c), but with dataset augmented to be translation invariant. The covariance matrix is exactly diagonal for a translation invariant dataset in a DFT basis.

Here we provide the proofs for Lemma 1, Lemma 2, Theorem 2 and finally Theorem 1.

A preliminary note before we begin:

When we consider a (wlog) by channel of a convolutional layer, we assume it has shape

When computing the covariance matrix however, we vectorize by stacking the columns under each other, and call the result :

One useful identity when switching between these two notations (see e.g. [8]) is

where are matrices and is the Kronecker product. A useful observation arising from this is:

Lemma 3.

The CCA vectors of are the same (up to a rotation by ) as the CCA of .

Proof: From Section B we know that unitary transforms only rotate the directions. But while DFT pre and postmultiplies by – unitary matrices, we cannot directly apply this as the result is for unitary transforms on . But, using the identity above, we see that , which is unitary as is unitary. Applying the same identity to , we can thus conclude that the DFT preserves CCA (up to rotations).

As Theorem 1 preprocesses the neurons with DFT, it is important to note that by the Lemma above, we do not change the CCA vectors (except by a rotation).

c.1 Proof of Lemma 1


Translation invariance is preserved We show inductively that any translation invariant input to a convolutional channel results in a translation invariant output: Suppose the input to channel , ( by ) is translation invariant. It is sufficient to show that for inputs and , . But an shift in neuron coordinates in corresponds to a

height stride

a,width strideb) shift in the input. And as is translation invariant, there is some .

is circulant:

Let be (by proof above) a translation invariant input to a channel in some convolution or pooling layer. The empirical covariance, is the by matrix computed by (assuming is centered)

So, , i.e. the inner products of the neurons and .

The indexes and refer to the neurons in their vectorized order in . But in the matrix ordering of neurons in , and correspond to some and . If we applied a translation , to both, we would get new neuron coordinates (all coordinates ) which would correspond to and , by our stacking of columns and reindexing.

Let be the translation in inputs corresponding to an translation in , i.e. . Then clearly , and similarly for

It follows that , or, with indexing

This gives us the circulant structure of .

is block circulant: Let be the ith column of , and the jth. In , these correspond to and , and the by submatrix at those row and column indexes of corresponds to the covariance of column . But then we see that the covariance of columns , corresponding to the covariance of neurons , and , which corresponds to the 2-d shift , applied to every neuron. So by an identical argument to above, we see that for all

In particular, is block circulant. ∎

An example with being by look like below:

where each is itself a circulant matrix.

c.2 Proof of Lemma 2


This is a standard result, following from expressing a circulant matrix in terms of its diagonal form , i.e. with the columns of

being its eigenvectors. Noting that

, the DFT matrix, and that vectors of powers of , are orthogonal gives the result. ∎

c.3 Proof of Theorem 2


Starting with (a), we need to show that is diagonal. But by the identity above, this becomes:

By Lemma 1, we see that

with each circulant.

And so becomes

From this, we see that the th entry has the form

Letting denote the coefficient of the term , we see that (addition being )

with the last step following by the fact that the sum of powers of non trivial roots of unity are .

In particular, we see that only the diagonal entries (of the by matrix of matrices) are non zero. The diagonal elements are linear combinations of terms of form , and by Lemma 2 these are diagonal. So the covariance of the DFT is diagonal as desired.

Part (b) follows almost identically to part (a), but by first noting that exactly by the proof of Lemma 1, is also a circulant and block circulant matrix.

c.4 Proof of Theorem 1


This Theorem now follows easily from the previous. Suppose we have a layer , with channels . And let have directions . By the previous theorem, we know that the covariance of all of these neurons only has non-zero terms .

So arranging the full covariance matrix to have row and column indexes being the nonzero terms all live in the by blocks down the diagonal of the matrix, proving the theorem. ∎

c.5 Computational Gains

As the covariance matrix is block diagonal, our more efficient algorithm for computation is as follows: take the DFT of every channel ( due to FFT) and then compute covariances according to blocks: partition the directions into the by matrices that are non-zero, and compute the covariance, inverses and square roots along these.

A rough computational budget for the covariance is therefore , while the naive computation would be of order , a polynomial difference. Furthermore, the DFT method also makes for easy parallelization as each of the blocks does not interact with any of the others.

Appendix D Per Layer Learning Dynamics Plots from Section 4.1

Figure App.3: Learning dynamics per layer plots for conv (left pane) and res (right pane) nets trained on CIFAR-10. Each line plots the SVCCA similarity of each layer with its final representation, as a function of training step, for both the conv (left pane) and res (right pane) nets. Note the bottom up convergence of different layers

Appendix E Additional Figure from Section 4.4

Figure App.4 compares the converged representations of two different initializations of the same convolutional network on CIFAR-10.

Figure App.4: Comparing the converged representations of two different initializations of the same convolutional architecture. The results support findings in [12], where initial and final layers are found to be similar, with middle layers differing in representation similarity.

Appendix F Experiment from Section 4.4

Figure App.5: Using SVCCA to perform model compression on the fully connected layers in a CIFAR-10 convnet. The two gray lines indicate the original train (top) and test (bottom) accuracy. The two sets of representations for SVCCA are obtained through 1) two different initialization and training of convnets on CIFAR-10 2) the layer activations and the activations of the logits. The latter provides better results, with the final five layers: pool1, fc1, bn3, fc2 and bn4 all being compressed to of their original size.

Appendix G Learning Dynamics for an LSTM

Figure App.6: Learning dynamics of the different layers of a stacked LSTM trained on the Penn Tree Bank language modeling task. We observe a similar pattern to that of convolutional architectures trained on image data: lower layer converge faster than upper layers.