Exploring Neural Network Representational Similarity using Filter Subspaces
Authors: Wei Chen
Zichen Miao
Qiang Qiu
Venue: Submitted to ICLR 2023 (2023)

Abstract: Analyzing representational similarity in neural networks is crucial to numerous tasks, such as interpreting or transferring deep models. One typical approach is to input probing data into convolutional neural networks (CNNs) as stimuli to reveal their deep representation for model similarity analysis. Those methods are often computationally expensive and stimulus-dependent. By representing filter subspace in a CNN as a set of filter atoms, previous work has reported competitive performance in continual learning by learning a different set of filter atoms for each task while sharing common atom coefficients across tasks. Inspired by this observation, in this paper, we propose a new paradigm for reducing representational similarity analysis in CNNs to filter subspace distance assessment. Specifically, when filter atom coefficients are shared across networks, model representational similarity can be significantly simplified as calculating the cosine distance among respective filter atoms, to achieve \textit{millions of times} computation reduction. We provide both theoretical and empirical evidence that this simplified filter subspace-based similarity preserves a strong linear correlation with other popular stimulus-based metrics, while being significantly more efficient and robust to probing data. We further validate the effectiveness of the proposed method in various applications, such as analyzing training dynamics as well as in federated and continual learning. We hope our findings can help further explorations of real-time large-scale representational similarity analysis in neural networks.

Under review as a conference paper at ICLR 2023
EXPLORING NEURAL NETWORK REPRESENTATIINAL SIMILARITY USING FILTER SUBSPACES
Anonymous authors
Paper under double-blind review
ABSTRACT
Analyzing representational similarity in neural networks crucial to numerous tasks, such as interpreting or transferring deep models. One typical approach is to input probing data into convolutional neural networks (CNNs) as stimuli to re- veal their deep representation for model similarity analysis. Those methods are By representing filter
often computationally expensive and Himulus-dependent subspace in CNN as set of filter atoms, previous work has reported compet- itive performance in continual learning by learning a different set of filter atoms for each task while sharing common atom coefficients across tasks. Inspired by this observation, in this paper, we propose a new paradigm for reducing repre- sentational similarity analysis in CNNs to filter subspace distance assessment. Specifically,, when filter atom coefficients are shared across networks, model rep- resentational similarity can be significantly simplified as calculating the cosine distance among respective filter atoms, to achieve millions of times computation reduction. We provide both theoretical and empirical evidence that this simplified filter subspace-based similarity preserves strong linear correlation with other popular stimulus-based metrics, while being significantly more efficient and ro- bust to probing data. We further validate the effectiveness of the proposed method in various applications, such as analyzing training dynamics as well as in feder- ated and continual learning. We hope findings can help further explorations of real-time large-scale representational similarity analysis in neural networks.
INTRODUCTION
Deep neural networks have shown unprecedented performance in large variety of tasks (Krizhevsky et al. 2012; Ronneberger et al.) 2015). The connerstone to the success is the deep representation learned by neural networks (NNs), which contains high-level semantic informa- tion about a task. By viewing deep representation to the characterization of each task in a high- dimensional space, the representational similarity between a pair of deep models can be exploited understand the intrinsic relationship between associated tasks. In this way, the representational similarity provides a way to open the black box of deep learning by showing the training dynam- ies (Kornblith et al. 2019), and it further empowers machine learning systems with the ability to transfer knowledge from one task to another (Huang et al. 2021a).
2018) measure representational similarity directly relying on deep representations revealed by input data. These approaches introduce heavy computa- tion from both the forward pass numerous stimulus inputs and the calculation of high- high-dimensional covariance matrices. Since these similarity metrics are stimulus deepndde,,,,,,,ntt, their quality can poten- tially deteriorate when probing data are inappropriately chosen, scarce or unavailable.
Previous works (Raghu et al. 2017 Morcos
We are inspired by the continual learning framework in Miao et al. 22021) where group of tasks simultaneously modeled using NNs by learning for each task a different set of filter atoms while sharing common atom coefficients across tasks. Miao et al. (2021) l) has in detail analyzed and val- idated this framework a continual learning context. In the above setting, it is easy to observe that the representation variations across different NNs now become dominated by respective filter atoms. Thus, Miao et al. (2021) adopts in experiments filter subspace distance to assess task rele- vancy, however, without formal justification.
In this paper, we formally explore NN representational similarity using filter subspace distance, with detailed theoretical and empirical justifications. We first simplify the filter subspace distance

---

Under review as a conference paper at ICLR 2023
to the cosine distance of two sets of filter atoms, to eliminate heavy computation of singular value decomposition in calculating principal angles. Then, we show both theoretically and empirically that the obtained filter atom- booo- similarity preserves strong linear correlation with other popular stimulas-dependent similarity measures such as CCA (Raghu et al., 2017). Our representational similarity is also immune inappropriate choices of probing data, while stimulus-dependent metrics can be perturbed drastically.
The proposed filter atom-based similarity shows extreme efficiency in both memory and computa- tion. Since the similarity computation does not involve network forward pass, no GPU memory ac- cess required, whereas other stimulus-based measures consume the same amount of GPU memory as regular inference. On the other hand, the proposed method involves only inner product calcula- tions on filter atoms, which takes neglectable time for similarity evaluation. The evaluation time of stimulus-be based measures includes the time of both the forward pass of probing data and the calcula- tion of high-dimensional covariance matrices. We report later the dramatically improved evaluation time of the proposed method against other popular method, e.g., CKA (Kornblith et al. 2019).
We further validate our atom-based similarity for knowledge transfer with various continual learning and federated learning tasks. In both settings, we fix the atom coefficients, learn the filter atoms for each task, and finally conduct knowledge transfer among tasks by recalling the most similar models for the ensemble. Compared with stimulus- -bsed similarity metrics, the proposed measure achieves competitive performance with millions of times reduction in the computational cost.
We summarize contributions follows,
We formally explore NN representational similarity measure using filter subspace distance.
We show both theoretically and empirically that the proposed filter atom-based measure preserves strong linear correlation with other popular -eependdd measures while being significantly more robust and efficient in both memory and computation.
We demonstrate the effectiveness of the proposed similarity measure under various example settings, such as analyzing training dynamics well as in federated continual learning.
METHODOLOGY
In this section, we first provide filter subspace formulation for NNs and propose a model simi- larity metric based on a simplified filter subspace distance. Then, we review stimulus-bseed rep- resentational similarities and show their limitations. We further demonstrate that under certain as- sumptions, the proposed measure shows strong linear relationship with popular stimulus based measures, while exhibiting dramatic improvement in computational efficiency and data robustness. These unique characteristics of the proposed measure can potentially enable real-time large-scale NN similarity assessment, e.g., helping fast knowledge transfer across a large number of models.
2.1 REPRESENTATIONAL SIMILARITY IN FILTER SUBSPACE
Filter subspace. As in Qiu et al. (2018). the convolutional filter W E <e'xxx (c' and are the number of imput and output channels, lo is the kernel size) can be decomposed as m filter atoms Dii E R 1,..., m). linearly combined by atom coefficients a E Rmme' xe as W = a x D. The filter subspace is then expressed as V Span (D[],,... D[m]]- With this formulation we consider a paradigm where atom coefficients are shared across different deep models while filter subspaces are model specific. This paradigm has been in detail analyzed and validated in Miao al. (20T)) and reports state-of-the-art performance in a continual learning context.
In this setting, we dive deep into the relationship between filter atoms and representations. For simplicity, let c = c' = 1, and the argument extends. Given an input image X(b) (b B, c 2²), define the local input norm ||X||F,M, = (EN X(b 3/)3)1/2 and the convolution (X, w) == EVEN. X(b- (b'), where No C B is a local Euclidean grid centered at b. Then the decomposed convolution can be written Z(b)= = a (> ar (X. N,), where D[i] denotes the i-th atom, a; is the corresponded i-th coefficient.
Proposition 1. Suppose D., and D. are two different sets of filter atoms for convolutional layer with the common atom coefficients a, and the activation function a is non-expansive, we can upper bound the changes in the corresponding features Zu,, Zo with atom changes,
Zz - ZoIlF= < ([]a|[>\) (B] D. - D lF, with À = sup X
F.N&
(1)
bEB
2

---

Under review as a conference paper at ICLR 2023
Stimulus-based similarity
Atom-based similarity
Model
Model
Model
Model
Cosine Similarity
CCA
Eayer
Layer(t)
Layer (2)
Lager ())
CCA
Filter afomm
Cosine Similarity
D
Deep
Features
Eayer())
Shared
coefflcient
Probing data Xp
Figure I: Comparison between our method and stimulus-based methods. (left) Stimulus-based sim- ilarity metrics, e.g., CCA, rely probing data, and calculate the correlation between large groups of features generated by the forward pass of probing data through NNs. (right) In comparison, our atom-based method decomposes convolutional filters W filter atoms D and atom coefficients a, W = a x D, and only calculates the atom- atom-based similarity between a small portion parame- ters, i.e., atoms, which stimuli independent and computation efficient. The proposed atom-based method can achieve millions of times computation reduction than popular stimulus-based methods.
The proof is provided in Appendix A.1 tion 3.1
We further empirically validate this relationship in Sec-
Filter subspace similarity The above theorem suggests the possibility measure the represen- tational similarity of two CNNs by simply measuring the distance of their filter subspaces. As proposed Miao et al. (2021), the representational similarity of two models with different filter subspaces Va. V. can be assessed by the similarity based on Grassmann distance between Va, V, as,
Sarae (Fa, d(Vu. Vo)
m Σ coso,,
1
where 0, the i-th principal angle between Vu and V.-
However, the above metric requires costly singular value decomposition. Note that filter atoms in different models are intrinsically aligned under shared atom coefficients, which allows us to ap- proximate the filter subspace similarity using the cosine similarity of the corresponding filter atoms. To this end, as shown in Figure [ we propose a significantly simplified representational similarity measure with filter atom similarity.
Definition 1. Suppose two convolution neural networks Fu, share atom coefficients layer-wise which assume to full-ran matrices, and their model-specific filter atoms are D,, D.. then the alom-bused representational similarity is defined as,
< vec(Du), veel vec(D,) SAtom Fo) cos D.) [eee |F Ivecc (DlF
(3)
The above definition is layer-wise similarity, allowing us to compare the similarity of different networks per layer, and we simply average layer-wise similarities for the network- wise similarity.
We further show that S Atom and SGras are equivalent under certain assumption.
Proposition 2. Assume D.,. D., E R km are orthogonal matrices, then SGras SAtom-
The proof is provided in Appendix A.I similarity has still strong linear correlation with the Grassmann subspace similarity even without imposing the above orthogonality over atoms.
We empirically show in Figure 2aa) that the atom-based
Note that our atom- similarity measure only involves linear operations of vectorized atoms of around 100 dimensions, which requires neglectable computation. Additionally, the proposed method depends solely on models themselves and eliminates the reliance on probing data, equipping our similarity with robustness to inappropriate choice of probing data.
3

---

Under review as a conference paper at ICLR 2023
Correlation: 0.8793
Correlation: 0.8638
Grassmann Sumiaray
Comdutioo
CCA
Kathe JL 2017
0.8638
UKA
Komman IT
0.7158
Grasszan Disunce
Miares aarresalae 2002
0.793
< sie od Atom-basee Similarity
de 6/ 234 Atom-based Similarity
(a)
(b)
Figure 2: (a) Correlation between Grassmann similarity and atom-based similarity; (b) Correlation between CCA and atom-based similarity. (Table) Correlation between atom-based similarity and other approaches.
2.2 REPRESENTATIONAL SIMILARITY IN FEATURE SPACE
Intuitively, the representational similarity be directly assessed via features generated from different neural net- works. As shown in Figure it usually includes three steps to evaluate stimulus-based representational similarity be- tween NNs Fa and F,; (1) Collect an appropriate and sufficient amount of probing data X, Raxe' xh' xwr that can represent the whole data distribution, (2) Generate the feature Zu and Z. (Z., Z, E [BaxexXxxy by the forward pass of probing data through different neural networks, Zu = F.. 0w) and Z. J,, (X,, 0,), where 0u, Og de- note parameters of two NNs; (3) Choose stimulus-baser metric to assess the model similarity. Several popular meth- ods can be adopted in step (3), below will give brief introduction.
Falemed Lering moiia
Contrall
Simibaity
CGA
Feftimes efficeent than
Mkurary
1.0%
Mamery
Figure The ratio the computational cost savings of our atom-hased similarity over stimulus-based similarities.
CCA. Raghu al. 2017 proposes to analyze the representational similarity by conducting canon- ical corre lation analysis on two Z,, Z,,, which is a recursive process of finding projection directions for two matrices that their correlation is maximized. Specifically, let Qu: Qu denote the orthonormal bases of Zu Zp the CCA can be denoted as,
SccA =
Σ 1=1
of
(4)
where di denotes the /-th eigenvalue of Au,o = QTQ CKA. Kornblith al. (2019) proposes another way to assess the similarity based on Centered Kernel Alignment (CKA). ). Let Ku = Z, Z,, , Kr = Z.Z3 denote the Gram matrices of two feature
space, the CKA computed by.
HSIC(K,,, K.) HSIC(K (a, K.) HSIC(KK,, K.)
ScKA(F..Fo))
(5)
where HSIC is the Hilbert-Schmin Independence Criterion (Getton et al. 2005).
However, in addition to the forward pass, all the aforementioned approaches further introduce sig- nificant computational costs while performing evaluation in the representation space. Nevertheless, their qualities rely heavily the mindful choice of probing data Xp. which undermines their ro- bustness.
2.3 ALGORITHM COMPLEXITY ANALYSIS
Here, provide detailed comparison of computation complexity between the proposed atom- based similarity and stimulus- based similarities. Consider one convolutional layer with filter W e Re' xexkxk (W = a x D. D E m pmxxk which transforms the input X, E Rexe' xM xw" to output E Rexexhxx The complexity of our method is dominated by inner product of two tiny filter atoms, O(m k2), e.g., 9, k = 3 in typical setting.
4

---

Under review as a conference paper at ICLR 2023
In contrast, stimulus-based similarity measure first forward feed probing samples with complex- ity of Onn d'''= cc'), ,, then calculates covariance matrix with complexity of On? hw c). In total, the time complexity of CCA is On W'w k2 cd' + +n² hws c).
Our method at least no ne' hove times more efficient than stimulus-based similarity mea- m
sures. As h > ki ec' > the computational cost of our method is negligible. For example, with 10k probing datapoints, the CCA calculation requires 1.14 x 10 times more FLOPs than the proposed ttom-based similarity.
2.4 RELATIONSHIP WITH STIMULUS- SAASUUSS-BAEDD SIMILARITIES
The proposed atom-based measure not only shows extreme efficiency, but also exhibits a linear rela- tionship with other popular stimulus-base based similarities. Here, analyze the proposed atom-based similarity S Atom with CCA SCCa (Raghu et al. 2017). Suppose forward passes of decomposed convolutional layer for Fu and Fr are Zu ax2, Du.. Zu ax,DD,, respectively. To start with, we show that the Soca A is upper bounded by the proposed Atom-
Theorem 1. = Tr(XjaTaX px,,, min (XIaTXX))) Assume K(ZZZZ,) S. Then Seo (Ju F,)) upper bounded by Asom (Fu: F.).
C
SCCCAA S SACom Fu), T
(6)
where Tr(-) denotes trace of matrix, amin indicates the minimum eigenvalue, K((A) denotes the condition number of matrix A. We provide the proof in Appendix A.I
Since S stimulus-dependent, the calculated value varies depending on the choice of probing data, and the value range shows bounded by our atom-basee similarity, as in the theorem above.
With additional assumptions imposed, we can further show a simple linear relationship between CCA and our atom- basdd similarity.
Assumption 1. Suppose the diagonal elements of Z.Z.,. ZZZ, and ZzZ, are larger than non- diagonal element, i.e.. (ZIZZ)) > (ZTZ.)ij.
The Assumption D suggests different channels of feature have a low correlation. Reducing channel-wise dependencies has been studied in Zhang et al. (2021) and has been shown to bene- fit model stability.
Theorem Assumpttio hholss SOCA F.) approximately linear to atom-based similarity, Vc
(eCA Fo) SAtom (Fu, Fo):
737233
where 7/1 "2 and ns contain higher order of features, which can be found in detail with the proof in Appendix A.
As in Figure 2, empirically observe the linear correlation between CCA and atom-based similar- ity, which agrees with our theoretical findings. In addition, we find that the proposed similarity also shows a strong correlation with CKA with different kernels.
3 EXPERIMENTS
In this section, we first validate our theorems with several simple experiments, and then demonstrate various applications of the proposed atom-base similarity in efficiently analyzing training dynamics as well in federated and continual learning scenarios.
3.1 SIMPLE VALIDATION EXPERIMENTS
We empirically validate that the change of features is bounded by the change atoms, and the near- linear relationship between atom- based and stimulus-based similarity. Besides, we demonstrate the limit of stimulus-based similarities, as well as the verification of our assumption and theorems.
Representation dependency on filter atoms. We first validate the dependency of deep features on filter atoms in Proposition| with simple experiment. The model FF here is 2-layer CNN with coefficient a and atom D generated from normal distribution (0, 1). The input sample X is also generated from normal distribution (0, 1). Figure 4a) shows the relation between Z,, Z, IF and |D,,, D2 |r by fixing coefficient and input sample X and randomly varying filter atoms D.
5

---

Under review as a conference paper at ICLR 2023
2,1+
1pp
Z.
Linear Relationship
Toasay
CLA
CEMB-00
UMA
bundarly
68:45
690N
D
(a)
(b)
Figure 4: (a) The change of features ||,, Z |F is bounded by the change of atoms [DD, - Dr (b) The channel decorrelation leads to higher correlation between CCA and atom-based similarity. And the correlation can reach 0.985 with = x 10 which means a near linear relation between CCA and atom-based similarity. (Table) The performance of stimulus-bas compromised by poorly selected stimulus data. For two models trained on CIFAR-100, they have high CCA and CKA similarities with stimuli from CIFAR-I00 but low similarities with stimuli from SVHN. In contrast, our atom- homebased similarity does not depend on stimulus data and shows a high similarity between two networks expected.
similarities can be
reflecting that the All the points are below the line which is the bound provided by Proposition ! representation variations are dominated by filter atoms.
Correlation of CCA and atom-based similarity. We next empirically verify that CCA and atom- based similarity have strong correlation. In this experiment, 10 tasks generated from CI- FARI00 (Krizhevsky et al. 2009) with 10 classes in each task. Only the filter atoms of each task are trained while the atom coefficients 45 pairs of models. The correlation between CCA and atom-based similarity is 0.8638 which is shown in Figure (b).. Similarly, the correlation between CKA and atom-based similarity is also reported in Figure 2 (Table). These results clearly show that the proposed atom-based similarity has high linear relationship with popular stimulus-based similarities, which agrees with Theorem and Theorem 2
fixed. We caleulate CCA and atom-based similarity among
Effect of channel decorrelation. We further design a regularization term Σite 2
ap-
proach (Zjz.) is >> (ZiZ.)ig in Assumption. As shown in Figure 4b), the correlation between CCA and atom-basee based similarity keeps increasing as 3 increases. The correlation reaches 0.985 when 3 10-3 indicating a near-linear relationship, which is aligned with Theorem. 2
Limitations stimulus-basee similarities. Depending on stimulus data, the stimulus-based sim- ilarities be inconsistent. We expect high value while evaluating the similarity between two models trained on the same dataset. this experiment, we train two models on CIFAR-100. As shown in Figure A (Table), the CCA similarity of two models with stimuli from CIFAR-100 is 0.8793, but drops to 0.4862 with stimuli from SVHN (Netzer et al.) 201T). The CKA similar- ity demonstrates the same inconsistency in values with different choices of stimuli. However, our atom-base based similarity of two models is 039, which is aligned with our expectation.
3.2 LEARNING DYNAMICS
The atom-based similarity has various applications in analyzing NNs. It is capable of reflecting the data similarity and measuring the evolution of model similarity during the training time. We examine the training dynamics based on the heat map of atom- atsed similarities. In this experiment, AlexNet (Krizhevsky et al.) (2012) is trained on CIFAR- 100 (Krizhevsky et al.] (2009) for 150 epochs and VGGTI (Simonyan Zisserman (004)) is fine-tuned on ImageNet (Russakovsky et al. 2015) for 20 epochs. For both models, we train and store atoms at each epoch. Figure shows heat maps of similarities of the model among different training epochs.
Figure B(a-c) are heat maps of the 1st, 3rd and 5th convolutional layers of Alexnet. We mark the epoch when the parameters of each layer reaches 0.99 similarity with the their states in the last epoch. The first layer reaches 0.99 similarity at epoch 36 which earlier than final layers. In Figure d-f), VGGII shows a similar behavior. Several previous works have also indicated this bottom-up learning dynamics where layers closer to the input solidify into their final states faster than very top layers (Raghu et al. 2017 Morcos et al. 2018). Our atom-based similarity provides a highly efficient way to examine the training dynamics while showing results accord with previous studies. Moreover, we can apply our method to calculate the similarity of model

---

Under review as a conference paper at ICLR 2023
Triniing Epech
Training Epoch
Taining Epoch
Triinnn Lpoch
Traiiing Epech
00.9
00.99
00.99
(a)
150
(b)
150
(c)
Training Upoch
Trining Epuch
Training Epoch
Training Epoch
Trinting Epoch
Trainay Enoch
(d)
20
17
20
19 20
Figure 5: Layer-wise similarity matrices that show relations of model parameters different train- ing time points. (a)(b)() are the 1st, 3rd and 5th convolutional layer of AlexNet trained on CIFAR- 100. (f) are the 1st, 4th and 8th convolutional layer of VGG11 trained on ImageNet. We mark the epoch when the parameter reaches 0.99/ 0.999 similarity to its final state with white lines. For both models, we observe bottom-up learning dynamics where layers closer to the input solidify into their final states faster than very top layers, which is in accord with previous studies (Raghu et al., 2017 Morcos et al. 2018).
trained on different tasks, so we can track the process of the same model interacting with different datasets. The details are shown in Appendix A.2
3.3 FEDERATED LEARNING
Federated learning (FL) aims at learning models collaboratively by leveraging the local computa- tional power and data of all users with the concern of privacy (McMahan et al. 2017). Personalized Federated Learning (PFL) emerges to address some challenges in FL, such poor convergence on heterogeneous data and lack of solution personalization (Tan et al. 2022).
In this setting, our framework achieves personalization by enforcing FL models with the shared atom coefficients for all users and specific filter atoms for each user. As illustrated in Figure 7 the shared coefficients preserve the common knowledge, while user-specific atoms hold personalized information about each user. Then, without any stimuli data, which meets the privacy requirement of the FL scenario.
assess model relationships with our atom-based similarity
The shared atom coefficients can be achieved different ways. With our framework, the coefficient can be obtained from model pre-trained on a public dataset or from a global model trained by other FL approaches. We can also get the coefficients by training the model locally and evolving the coefficients at each communication round.
6595
3.9
330
635
6.50
330
6370
65
320
62
(a) 10th epoch
(b) 50th epoch
(c) 90th epoch
Figure 6: Similarity matrices that show relations among 60 users in FL with our atom-based simi- larity through the training process. The labels of x-axis represent the ID's of CIFAR tasks. We can clearly see user clusters in all three figures. Specifically, the last 20 clients with SVHN data show higher similarities with themselves than the first 40 clients with CIFAR data, while every five of the first 40 clients sharing the same CIFAR task also show high similarities within themselves.
7

---

Under review as a conference paper at ICLR 2023
Table 1: Classification accuracy of model ensemble using different FL methods and model selection strategies: Models are selected with different similarity measures in each setting. The model ensem- ble performance using our atom-base base- method is comparable with stimulus- camulus-based methods while being millions of times faster and consuming much fewer resources.
Base
(Raghu 2017
Komblich 2019
FedAvg. McMahan et
2017
83.78= 0.08
85.82 = 0.35
85,65 + 0.21
85.29 = 0.18
Dirto (laanu
82.98 + 0.13
85.49
0:21
85,54 0.19
85.37
FedRRp (Coliin Sl 2021
76.44 + 0.96
78.35
+: 0.24
18.18 + 0.18
77.73 0.19
FedProx 1Lr cC 20200 B
80.6 +: 0.1
82.95
-: 0.16
82.55 +: 0.19
82.86 = 0.16
FedPer Amazzlagan
83.57 0.07
85.21
84,91 0.18
0.14
Pretruin
81.77 1 0.08
85.41 4: 0.19
85.24 1: 0.13
86.33 0.14
Similarity Compatation Cost
GFLOPs
0.019
258.610
2,225
1930.4
GPL Memory (MB)
4915
3965
Table 2: Continual Learning Results. The model ensemble using atom-based similarity shows better result than stimulus-based methods. Our similarity is also faster and consuming much fewer resources.
Similarity Computation Cost
Method
CIFAR-100
MFLOPs
Time (8)
GPU Memory (MB)
AtomCI. (base)
78. + 0.13
+CCA Raghu ct al. 2017
79.83 = 0.04
35.2
0.26
1996
+CKA Kornbitth et al 2019
80.01 + 0.06
111
0.3
1637
+Ours
80.19 0.09
0.007
0.0008
Measuring user similarity. With the shared atom coefficients and user-specific filter atoms, we can simply get relations of users by calculating atom-based similarity. To be specific, we expect that users with similar data have higher similarity. In this experiment, we combine two datasets, CIFAR-100 (Krizhevsky et al. (2009) and SVHN (Netzer et al., 201T), and separate data on 120 clients. Specifically, SVHN are randomly split into 20 tasks and each task contains classes; CIFAR-100 are also split in the order of the class into 20 tasks and each task contains 5 classes. 20 clients are trained on 20 SVHN tasks, with each learning one task, while the other 100 clients are trained on 20 CIFAR- 100 tasks, where every 5 clients equally share the data of one task by way. The models share the same random initialization and
partitioning the data in a filter atoms are trained independently without communication with other clients. The experimental details are described in Appendix A.2
Figure& shows the stom-based similarity among last 40 clients of CIFAR- task and 20 clients of SVHN task. In Figure c(c). where clients are trained for 90 epochs, we can clearly see the cluster of 20 SVHN clients: The SVHN clients have higher similarity among themselves but are dissimilar from CIFAR clients. Every CIFAR clients who share the same task also have high similarity among themselves. We can the cluster appears at the early stage of training in Figure 6 ab))). It can be applied to quickly find clusters in FL (Tan et al. 2022). The full results of all 120 clients are shown Appendix Figure g We compare atsed similarity with CCA and CKA. Note that stimulus- bussel similarities need probing data which could violate the privacy requirement of FL.
The computational cost of three different approaches is shown in Figure 3 Notably, calculating the atom-based similarity is significantly faster (million times), requiring 0 GPU memory usage
than stimuli-based methods. Note that the advantages in computational efficiency of atom-based similarity become more prominent as the number of models increases.
Improving personalized model with ensemble of similar users. Once we get the relationships of users, we can further improve the accuracy of the current model by the ensemble of similar models, which is effective mitigate the data heterogeneity problem in FL. The experiment is described in detail in Appendix A.2 The final results are shown in Table [ With ensemble, the accuracies of all FL methods can be improved. Note that the results of model ensemble selected by our atom-based similarity are comparable with stimulus- based methods while consuming much fewer resources.
3.4 CONTINUAL LEARNING
Continual learning is an open problem in machine learning in which data from multiple tasks arrive sequentially and the model is learned to adapt to new tasks while not forgetting the knowledge from
8

---

Under review as a conference paper at ICLR 2023
the past (Parisi et al. 2019). Note that some of the tasks in continual learning related, so models trained with these tasks can be benefited from aggregating knowledge from each other. We adopt the setting in Miao et al. (2021), and apply atom-based similarity to find related models. Specifically, we 10-Split CIFAR- 100 dataset, where the 100 classes is broken down into 10 tasks with 10 classes per task. We train AlexNet including atoms and atom coefficients
the first task, and train only the atoms on the following tasks. Then, we calculate the task similarity with atom-based similarity, and report the model ensemble result with most similar members. The accuracy and the similarity computation costs are shown in Table 2 Our method provides higher results and has faster speed compared with stimulus- based methods.
RELATED WORK
4.1 MODEL SIMILARITY
Representational similarity analysis (RSA) (Kriegeskorte et al. 2008 demonstrates the method of
understanding brain activities by computing similarities between brain responses in different re-
gions. Measuring the similarity of models is beneficial for understanding neural network (NN)
architectures and learning dynamics (Raghu et al.] | Kornblith et al. 2019 Morcos et al. 2018
Dwivedi & Roig 2019). Model similarity can be used to understand or incorporate various machine
learning paradigms across different areas, including contrastive learning (Islam et al. 2021 Hua
et al. 2021), knowledge distillation (Stanton et al. 2021). meta- meta-learming (Raghu et al.
2019a and
transfer learning (Raghu et al. 2019b; Neyshabur et al. 2020 Bolya et al. (202I).
Multiple approaches are proposed to estimate the representational similarity of NNs. Some early works show that individual neurons can capture meaningful information (Bau et al.) 2017 Zeiler & Fergus 2014 Zhou et al. 2016 Bau et al., 2018). Later, gradient- based methods emerge to provide visual explanation of deep neural networks (Selvaraju et al. 2017/. Current popular representa- tional similarity methods rely on features of Raghu et al. (017) proposes SVCCA to measure similarity by calculating the covariance matrix of the features of each layer after channel alignments. Kornblith et al. (2019) discusses the invariance properties of similarity indices and proposes CKA with consistent correspondences between layers. Stimulus-based similarities are data-dependent and computationally expensive. But our method measures the representational similarity only via atoms, a portion of model parameters, which data- agnossii and much more efficient.
4.2 LEARNING PARADIGM WITH NUMEROUS MODELS
Some machine learning tasks involve numerous models. For example, in Federated learning (Tan ct al. 2022), thousands of models are trained across clients. In Continual learning, there are multiple models generated across time (Kirkpatrick et al. (017). Federated learning (FL) aims to improve the performance of the system by continuously training and aggregating models from users without collecting data (McMahan al. 2017 Smith et al. 2017 Konečný et al. 2016). FL requires com- munication efficiency while thousands or even millions of clients may be involved (Li al. (0200)). also required achieve personalization (Tan et al. [202 Huang et al. (021b) considering data heterogeneity of different users (Li et al. 2020a Kairouz et al.) 2021). Estimating user similarity can effectively address these challenges in FL. Continual learning (CL) aims at providing long-term knowledge accumulation, and the main challenge is to avoid catastrophic forgetting by learning new (017/AAljua Aljundi et al.) 20188
tasks while remembering the old ones (Kirkpatrick et al., [017
[ [ee al.) al.] 2017]
Zenke et al. 2017 Kolouri et al. (019). One promising way is to store neural networks for each task (Lopez-Paz & Ranzato 2017] Rusu et al. 2016]] Yoon et al. 2018 Jerfel et al.] [2099] Li et al. 2019). As the number of tasks increases, large number of models are generated and stored. It is important to find a way to access their relations to reuse models.
5 CONCLUSION
In this paper, we proposed a new paradigm for reducing representational similarity analysis in CNNs to filter subspace distance assessment. We provided both theoretical and empirical evidence that the proposed filter subspace-base based similarity exhibits a strong linear correlation with popular stimulus- based metrics, while being significantly more efficient and robust in probing data. It was evaluated on both federated learning and continual learning tasks, and achieves competitive performance with millions of times reduction in computational cost.
Our method currently assumes respective layers among compared CNNs to have coefficients with the same dimension. For our future work, we will explore the way to share coefficient among layers to achieve atom-based similarity with different dimensions.

---

Under review as a conference paper at ICLR 2023
REFERENCES
Rahaf Aljundi, Francesca Babiloni. Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Confer- ence on Computer Vision (ECCV), 2018.
Manoj Ghuhan Arivazhagan, Vinay Aggarwal, Aaditya Kumar Singh, and Sunav Choudhary. Fed- erated learning with personalization layers. arXiv preprint arXiv: 2019.
Anthony Bau, Yonatan Belinkov, Hassan Sajjad, Nadir Durrani, Fahim Dalvi, and James Glass. Identifying and controlling important neurons in neural machine translation. In International Conference on Learning Representations, 2018.
David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissection: Quantifying interpretability of deep visual representations. In Proceedings the IEEE conference on computer vision and pattern recognition, 2017.
Daniel Bolya, Rohit Mittapalli, and Judy Hoffman. Scalable diverse model selection for accessible transfer learning. Advances in Neural Information Processing Systems, 2021.
Liam Collins, Hamed Hassani, Aryan Mokhtari, and Sanjay Shakkottai. Exploiting shared repre- sentations for personalized federated learning. In International Conference on Machine Learning, 2021.
Kshitij Dwivedi and Gemma Roig. Representation similarity analysis for efficient task taxonomy & transfer learning. Proceedings of the IEEF/CVF Conference on Computer Vision and Pattern Recognition, 2019.
Arthur Gretton, Olivier Bousquet, Alex Smola, and Bernhard Schölkopf. Measuring statistical de- pendence with hilbert-schmidt norms. In International conference on algorithmic learning theory, 2005.
Tianyu Hua, Wenxiao Wang, Zihui Xue, Sucheng Ren, Yue Wang, and Hang Zhao. On feature decorrelation in self-supervised learning. In Proceedings of the IEEE/CVF International Confer- ence on Computer Vision, 2021.
Jiaji Huang, Qiang Qiu, and Kenneth Church. Exploiting zoo of checkpoints for unseen tasks. Advances in Neural Information Processing Systems, 2021a.
Yutao Huang, Lingyang Chu, Zirui Zhou, Lanjun Wang, Jiangehuan Liu, Jian Pei, and Yong Zhang- Personalized cross-silo federated learning on non-iid data. In Proceedings of AAAI Conference on Artificial Intelligence, 2021b.
Ashraful Islam, Chun-Fu Richard Chen, Rameswar Panda, Leonid Karlinsky, Richard Radke, and Rogerio Feris. A broad study on the transferability of visual representations with contrastive learning. In Proceedings of the IEEF/CVF International Conference on Computer Vision, 2021.
Ghassen Jerfel, Erin Grant, Thomas Griffiths, and Katherine Heller. Reconciling meta-learning and continual learning with online mixtures of tasks. Advances in Neural Information Processing Systems, 2019.
Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Kallista Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, al. Ad- vances and open problems in federated learning. Foundations and Trends@ in Machine Learning, 2021.
James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska- Barrskskka al. Overcom- ing catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 2017.
Soheil Kolouri, Nicholas Ketz, Xinyun Zou, Jeffrey Krichmar, and Praveen Pilly. Attention-based 2019.
structural-plastiiityy arXiv preprint arXiv:
10

---

Under review as a conference paper at ICLR 2023
Jakub Konečný, H Brendan McMahan, Felix X Yu, Peter Richtárik, Ananda Theertha Suresh, and Dave Bacon. Federated learning: Strategies for improving communication efficiency. arXiv preprint arXiv:1610.05442, 2016.
Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In International Conference Machine Learning, 2019.
Nikolaus Kriegeskorte, Marieke Mur, and Peter A Bandettini. Representational similarity analysis- connecting the branches of systems neuroscience. Frontiers in systems neuroscience, 2008.
Alex Krizhevsky, Geoffrey Hinton, Learning multiple layers features from tiny images. PhD thesis, University of Toronto, 2009.
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convo- lutional neural networks. Advances in neural information processing systems, 2012.
Sang-Woo Lee, Jin-Hwa Kim, Jaehyun Jun, Jung-Woo Ha, and Byoung-Tak Zhang. Overcoming catastrophic forgetting by incremental moment matching. In Advances Neural Information Processing Systems, 2017.
Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. Federated learning: Challenges, methods, and future directions. IEEE Signal Processing Magazine, 2020a.
Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. Proceedings of Machine Learning and Sys- tems, 2020b.
Tian Li, Shengyuan Hu, Ahmad Beirami, and Virginia Smith. Ditto: Fair and robust federated learning through personalization. In International Conference on Machine Learning, 2021.
Xilai Li, Yingbo Zhou, Tianfu Wu, Richard Socher, and Caiming Xiong. Learn to grow: continual structure learning framework for overcoming catastrophic forgetting. In International Conference on Machine Learning, 2019.
David Lopez-Paz and Marc' Aurelio Ranzato. Gradient episodic memory for continual learning. Advances in neural information processing systems, 2017.
Brendan McMahan, Fider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communicatoon-eficiene learning of deep networks from decentralized data. In Artificial intelli- gence and statistics, 2017.
Zichen Miao, Ze Wang, Wei Chen, and Qiang Qiu. Continual learning with filter atom swapping. In International Conference on Learning Representations, 2021.
Ari Morcos, Maithra Raghu, and Samy Bengio. Insights on representational similarity in neural networks with canonical correlation. Advances in Neural Information Processing Systems, 2018.
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. Advances in Neural Information Processing Systems, 2011.
Behnam Neyshabur, Hanie Sedghi, and Chiyuan Zhang. What being transferred in transfer learn- ing? Advances in neural information processing systems, 2020.
German Parisi, Ronald Kemker, Jose Part, Christopher Kanan, and Stefan Wermter. Continual lifelong learning with neural networks: A review. Neural Networks, 2019.
Qiang Qiu, Xiuyuan Cheng, Guillermo Sapiro, et al. Defnet: Deep neural network with decomposed convolutional filters. In International Conference on Machine Learning. 2018
Aniruddh Raghu, Maithra Raghu, Samy Bengio, and Oriol Vinyals. Rapid learning feature reuse? towards understanding the effectiveness of maml. In International Conference on Learning Rep- resentations, 2019a.
11

---

Under review as a conference paper at ICLR 2023
Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. Sveca: Singular vector canonical correlation analysis for deep learning dynamics and interpretability. Advances in neural information processing systems, 2017.
Maithra Raghu, Chiyuan Zhang, Jon Kleinberg, and Samy Bengio. Transfusion: Understanding transfer learning for medical imaging. Advances in neural information processing systems, 2019b.
Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedi- cal image segmentation. In International Conference on Medical image computing and computer- assisted intervention, 2015.
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJC),, 2015.
Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint 1o0vv:6606.0667,, 2016.
Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based local- ization. In Proceedings of the IEEE international conference computer vision, 2017.
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:14099, 1556, 2014.
Virginia Smith, Chao- Kai Chiang, Maziar Sanjabi, and Ameet S Talwalkar. Federated multi-task learning. Advances in Neural Information Processing Systems, 2017.
Samuel Stanton, Pavel Izmailov, Polina Kirichenko, Alexander Alemi, and Andrew G Wilson. Does knowledge distillation really work? Advances in Neural Information Processing Systems, 2021.
Alysa Ziying Tan, Han Yu, Lizhen Cui, and Qiang Yang. Toward personalized federated learning. IEEE Transactions on Neural Networks and Learning Systems, 2022.
Jaehong Yoon, Eunho Yang, Jeongtae Lee, and Sung Ju Hwang. Lifelong learning with dynamically expandable networks. In International Conference on Learning Representations, 2018.
Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, 2014.
Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In International Conference on Machine Learning, 2017.
Xingxuan Zhang, Peng Cui, Renzhe Xu, Linjun Zhou, Yue He, and Zheyan Shen. Deep stable learning for oft-of-distributt generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021.
Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE conference computer vision and pattern recognition, 2016.
12

---

Under review as a conference paper at ICLR 2023
A
APPENDIX
A.1 THEORETICAL PROOFS
Suppose Dy and D, different sets of filter atoms for convolutional layer with the common atom coefficients a, and the activation function octuctoionfuucciion a is non-expansive, we can upper bound the changes the corresponding features Lus Zu with atom changes,
Proposition 1.
I. Zu I (I| [[]]|=>)] B II(D,, F,, with X sup |X| F.No
bgB
Proof. Recall the decomposed convolution can be expressed as,
Z
X ((1))))
(9)
Since is non-expansive, vb we have,
m
m
(b) Z.(b)l =
Σ a (X, Σ
a (X,
(10)
||||| F
(X, (D.li 1,
By Cauchy-Schwarz inequality,
(D. D.
S |X
F.N. [|Dw[] -.ill
(11)
A D D. F.N.
we have that
Σ (b) - (b) s | ΣΣ
[X, [D D.))),
bEB
< ||a1 Σ
X I F.N, II(Du D.DDIEM
(12)
im1
< (||)||A))
Σ
(Da. D. D.
b,
and observe that
EII - D.
ΣΣ
[DD - D. -B] - D.)
(13)
b.d
BEB
where |B] is the area of the domain of X. Then Eq. 12 becomes
Σ
Z.. Z. (b)
(1|@
F a B [|.,. D.
(14)
BEB
which proves that ZZ, Zelle & (||a) (|la||>>)) B [[ - -D,)I p as claimed.
Proposition 2. Assume filter atoms Du, Dr are orthogonal matrices, then SGras S Atom-
Proof. Since D,,. D. E B xm are orthogonal matrices, i.e., D.D. = DDD I, the Grassmann similarity can be represented as,
1
(F, = m
cost, = m Σ di
(15)
13

---

Under review as a conference paper at ICLR 2023
where o; Es, UEV = D.D.
SAoom is defined as,
< vec(Da): vec(D.))
S Aaoom (Fu, Fo) cDs(Da; D.) [Ivec(D,,) F. |/vec
(16)
Analyze each part separately, have Dec(Dw), (ec(D,) D.) Σ o [Ive((D.)]I= = D..) vTr(T) vm, and also ||vec(D,))1z /m. In total, the atom-based similarity becomes.
S Stom Fo), cos D.) 2i m
(17)
which equals SGras- The claimed theorem is proved.
Lemma 1. For two positive semidefinite matrices A, B,
Tr(BB) 2 Jmin (A) Tr(B),
(18)
where min denotes the minimum eigenvalue of A.
Proof. It is equivalent to prove that,
Tr((A Mmin (A)I)B) 2 0.
(19)
Let C be matrices such that - min (A)I= B then
Tr((A mmnn (A)T)B) Tr(CTCDTD)
=Tr(CD'DC)) =I((DDCTT(DCT)) 2
(20)
Theorem 1. Suppose the forward of decomposed convolution layer for the w-th model is Zu, aXD Zu Zo nearly have zero-mean since X, is preprocessed to normalized. CCA coefficient
is defined as S(Z,, Zw) V E of where of denotes the i-th eigenvalue of Au,v Qu TQ 3. Then S(Z., Zo) is upper bounded,
Qu Z. (Z.Z.)
S(Z,, Z.) S c²T cos (as. Dz),
(21)
Gmin where T TT(XTaTX)x,C Omin ( (T)a
Proof. Consider S² = -E of.
2² AL..)
(22)
i=l
where
Tr(Auu, Tr -TQ.Q....0)
(23)
As defined above, we have
QUaT Z, (ZTZ.) (Z.Z.)) (ZTZ...) -I
ZT
(24)
Q.QT = (Z.Z.) (Z.Z.) Z. (Z.Z.)-12 -Zz.
14

---

Under review as a conference paper at ICLR 2023
Then Equation 23 becomes,
Tr,
(25)
-TT((272.) -Z
By Schwartz Incquality,
(T, (12
(26)
Then we analyze these terms individually.
Tr(ZZz,) Tr(D = = " S <TXX'a'aX) Dr. S Tr(D.,,))
(27)
As for Tr Tz((ZZ)))-)),, let \1 λ2; de be eigenvalues for Z, listed in descending order (A1 2 2 2 2 de). and assume the condition number of Z,Z, and ZJZ satisfy Xmaa / Amin S 7,
then,
c
Tr((Z(Z,))1))
Se
70 d A1
(28)
where \ Z 12- |l. 1/2 denotes the operator norm induced by the vector T2-norm. With the norm inequalities of any positive semidefinite matrix A,
1 | 2 vel |All 2 ||A||| (rA),,
(29)
where || 1|r, || ||. denote the Frobenius norm and the nuclear norm, respectively.
Equation 30 then becomes,
762
Tr (ZZZ))))-1) Se.
(30)
|ZZZ,l12 Tr(Z.
By Lemma
Tr(Z.z,) = IT(D('
TT(XTa
2 amin (X ( TrDDD.)
(31)
2 C- D..D...)
2 C. [lv)c(DD))l..
where vec(-) denotes vectorization matrix. Then Equation 30 is further derived as,
7
Tr Tr((ZZ.)) S C. (DveeeDD..))
(32)
Similarly, we have
7a2
Tr((ZZZ,) < C |leec
(33)
Finally, with Tr(D.D.) =< Dw), vec (ec(D.) D.) >, we have
22 TT2 (rec(D,)), vea( vec(D,)) >)²
Tr(A,, S
C2 Ieec Dw 3 /ec D.))
(34)
Td
< C²
cos 2 (D, D.).
15

---

Under review as a conference paper at ICLR 2023
and thus,
1
S(Zu; Z.)
V Tr(AupAATi))
(35)
T
-os(Oss D.).
C
Then the claimed theorem is proved.
Lemma 2. For two matrices A, B. their frobenius norm satisfies,
A | F B
AB F | FF Bll
(36)
where 4 En D B sin? ((A B,y))-
Proof.
According to the definition of frobenius norm | = =V Eis
|Ayl we have,
|B
Σ Ait Bky)3.
(37)
Note that (E, =
( e vوt
cos ((r, w\) = + vi) -
sin" 2 ((z, v)), where (z, v) is the angle of two vectors r and y. We have,
B2
B sin? ((A B,j))
Ei A (2 B sin ((Ai, Baii)
2
B
(38)
Esk 1 Σxs
B3
Eng Ex Ale 1 B3 sin" ((Ar, B,y))
- -||||| F
A
= =||||| BII
|A 2 B
where Ag is the i-th row of A and B.j is the j-th column of A, = E, 43, BBy)) sin? ((A B.))). As Ag and B.y are more correlated, (Ag, B.z) - 0, thus, A < || B
Lemma 3.
A 1144
|| 1/2 F |
(1
(39)
A
Proof. According Lemma
we have,
| 2 = |A 1/ A
(40)
Thus,
A 1/1
A 1/2 r = // (1+
(41)
AA
16

---

Under review as a conference paper at ICLR 2023
where AAA (AV9)) (A!/2); are more correlated, ((A!))) ee (A))))g)) + O, thus, 1A1/2 & ||
sin" (((A4))s: )x: (A))):;))) As (AV)), and
Lemma 4, For three matrices A, B, and C, their frobenius norm satisfies,
A + As | B CIP
|||| F
|A
B F
(42)
where D2 A7 Σ kky E B C.)) sin" ((BE. C +|] EN En Bi)
sin? (AA:: Ba)))] and A
2 EE,(Cn (BOR) . sin? ((Ap, (BC),)) +
En (AB))) Ci sin" (((AB);. Cg)il.
Proof. Based on Lemma 2
we have,
ABC
AB
Σ
(AB))) Σ (t)) -sim" (((A) b. C2y)
= =|A
B
| Σ
B sin? ((A Ba))
(43)
Σ
(AB))C
Σ
cit)
sin 2 (((A); C.)))
Symmetrically, we also have,
| F
A 7
BC
Σ
A2r (BC)2)) ).l.).sii ssi" ((A,, (BC):)))
k
k
=|A BI
B sin² ((Br.. C2))
(44)
A Σ (BO) sin? ((A (BC),))
1/
Thus,
ABC
-AII
Σ
B
Cipy sin? ((Br.. Cy))
(BO)t)) sin? ((As:) (BC):))
(45)
B
|C|
Σ B sin? ((Ar, B.))
il
Σ
AB
Σ Ci
sin² (((AB) Czy))]
"
=||A|
B
C F
- A2 -s.
where 42 11 Eny
Σ B2 (2,
CBP sin? ((BL, Cg))+ + EI 13 EB BB)
sin ((A Ba))] and
Aa
1
EE (BC))) . sin? ((Ass, (BC):))) +
Ei (AB()))) (E, C
sin" ((AA)),, Cg))]. Therefore,
A + A 2
ABC = || B |CIL
(46)
|
B
2
CI
17

---

Under review as a conference paper at ICLR 2023
As Ag and B,, Bk: and Ci are more correlated, (Ag. Ba), (Be. (y). (BC).)) ((AB) C.))
0, thus, A2 & |A| B &
and A3 < ||
F B B CI
Lemma 5.
B A
2 + A
|A |A-11/2C BC- = =F ) (C
| 1 B B
1-
(47)
where (F(2222 and (C(/2) are the condition number of A and C kF(AA12)
(AP)) oF(A7/3) and (p(C)/3) of of((v)a)) (A are
singular value of A1/2 and (CC/2) are singular value of C2/22
Proof. Based on Lemma 4 we have,
As
A BC- = 1--1|111110
1/2 1
1/2
(48)
A
2
By the definition of condition number (X)
|X||=||X
||
[ of (X)
Σ (x(x))
A + A
|A 1A-1/2Be BC- KF 1/2 KF >F (C*/2)
A
C1/2
|
1 B
C
1/1
(49)
Theorem 2. Suppose the forward of decomposed convolution layer for the with model is Zu oXD,,. u. CCA coefficient be S(Zu, Zw) Vt Ei where of denotes the i-th eigenvalue of Au, Qu Qu Z., (ZTZ.)) 2. Then S(Z,, Zo) is approximately linear to atom-based similarity.
S(Z,, Z.)
717273 cos(Da, D.),
(50)
Ve
Proof. Based on S(Z,, Z,) = / -i and ||u,,ll = v Vi of where are the singular value of Ag,
1
S =
of
(Z.Z.)
(Z.Z.
(51)
Vc
Ve
According to Lemma. we have
1 (2T2.) Z.Z. b11
7172
Z.Z. ||
(52)
Vc
[[
)
||| ZTZZ,)
where (Zz,ZZ, 1) KF (Z.Z, and 72 = (12.2.)-/2111
A,+
2.
As Z, = aXD, and Z, = aXD... .. we have
7172
ZTZ. |F
Vc (Z (
(53)
7222
D
Ve
[DDXTaaaaXD.)) (IIt
18

---

Under review as a conference paper at ICLR 2023
According to Lemma
7/ 72
[D[XTaaXDD.IF
ve
(54)
7273
|DXaalaXDDlll
Vē
where 7/3 (1
[ (1+
[DD:FaaaaDD]]I* )
4
As Assumption holds, it becomes
712273
D
ve
[ID J.
7273
|D [
Ve
| X
D D Xiaxxx D
(55)
717273 Ve
DDD,,le
[Dul Delle
727233
cos D.,, D.).
Ve
Thus, we have
711273 S(Z., Ve
cos(D,, D,).
(56)
A.2 EXPERIMENT SETTINGS
Model training of Federated Learning. In each experiment we have 100 clients in total and sample a ratio r 0.1 of all the clients on every round. All models are randomly initialized and trained for T = 100 communication rounds for the CIFAR datasets. At each round, the client executes 15 epochs of SGD with momentum to train the local model, the learning rate is 0.01 and momentum is 0.9. Accuracies computed by taking the average local accuracies for all users the final communication round. As shown the Table 3 we have different settings for CIFAR-10 10 and CIFAR- For example, (100, means 100 clients with 2 classes each client. For each method, the training takes about 12 hours on Nvidia RTX A5000.
0.97
0.97
0.71
0.71
0.97
1
0.63
0.63
0.71
0.63
Figure 7: The shared coefficients and uper-specific atoms represent common knowledge and person- alized information. The atom-bat based similarity is used to calculate the relations among users. Users with heterogeneous data result in lower similarity, as illustrated in similarity matrix.
19

---

Under review as a conference paper at ICLR 2023
Table 3: Compare accuracy with different approaches
CIFAR-100
CIFAR-10
(# client, classes per client)
(100, 5)
(100, 20)
(100, 2)
(100, 5)
(1000, 2)
FedAvg
82.39
62.92
86.37
70.63
86. 16
FedProx
80.77
59.7
85.90
69.94
84.83
FedPer
81.46
62.52
81.74
68.24
81.74
FedRep
72.98
37.71
80.55
67.3
82.98
Local
81.21
49.25
90.24
72.05
97.80
Ours
81.03
52.13
83.37
65.63
82.54
280
AM3
050
280
(a) 10th epoch
(b) 50th epoch
(c) 90th epoch
Figure 8: Similarity matrices that show relations among 120 users in FL with our atom-basee simi- larity through the training process.
Evolving shared atom coefficients. we can get shared atom coefficients by evolving them during the communication, apart from pre-trained models or from other FL approaches. In FL. the server aggregates models from every involved client at each communication round. Our method enforces the model with shared atom coefficient and atoms. each communication round, the clients perform training on both atoms and atom coefficients with locally stored data. Then, the server aggregates only the atom coefficients of selected clients to get an updated coefficient. this way, we can get shared coefficient across clients.
Comparison with other FL approaches. We compare our approach by evolving shared atom coefficients with various personalized federated learning methods and federated learning methods with local finetuning. Among these methods, FedPer (Arivazhagan et al. 2019) and FedRep(Collins ett al.] 2021) have the similar ideas by learning shared global representation and personalized local heads. Ditto (Li et al., [202]] and FedProx (Li et al. 2020b) induce global regularization to im- method with FedAvg (MeMahan et al. (017). 202T) approaches the common knowledge with shared representation. The FedRep (Collins et al.
prove the model performance. We also compare
codes are adapted from We evaluate the test accuracy on CIFAR-10 and CIFAR- 100 with differ- ent FL setting. As shown in Table 3 our method achieves comparable performance among different methods.
Fine-tuning models for ensemble. We select models with different similarity measures for en- semble. For feature-based similarity methods, we randomly select 1000 examples from CIFAR-100 dataset. The fully-connected layer of each model is fine-tuned on the user's local data with 100 epochs. The fine-tuning takes about 12 hours on Nvidia RTX A5000. After fine-tuning, the aceu- racy is measured on local test data, with the predictions of current model and 3 selected models.
Similar representations across datasets. Similar (Kornblith al., 2019 we can use atom- based similarity to compare networks trained on different datasets. In Figure Da., we show that pairs of models that are both trained on CIFAR-I0 and CIFAR- 100 have high atom-based similari- ties. Models learned two datasets respectively still show high similarity. In contrast, similarities between trained and untrained models are significantly lower.
https://github.rr https/////////tttooo///////o///o
20

---

Under review as a conference paper at ICLR 2023
7
2 = 10 (y +
Atom-baa see-basedd Similarity
10
0-
6
04-
CIFARIO-CIFAR10
22-
CIFAR10 Untrained
UIFAR100-Untriined
0---
0.6
0.6
Layer Index
0.8
(b)
Figure 9: (a) Using atom-based similarity, models trained on different datasets (CIFAR-10 and CIFAR-100 100) similar among themselves, but they differ from untrained models. (b) Illustration of limitations of stimulus-bies based similarities. Input data from "red" ({(x; = 0, y;))) and "blue" (f(z) yt, v/ = 0)}) orthogonal. Since two models learned "red" data, their similarity should be 1, which can be faithfully indicated by our atom similarity. However, stimulus-based similarities will become 0 with the "blue" probing data.
0535
0555
5.05
280
280
525
(a) 1st cony
(b) 2nd conv
(c) 3rd conv
1,00
1.00
1251
5.73
AM05
4th conv
(e) Sth conv
Figure 10: Similarity of AlexNet with atoms from different time point during the training.
Limitation of stimulus-based methods. As shown in Figure bb) to illustrate sensitivity of stimulus-based similarities to probing data, perform simple regression task with data, {(æ; 0, yis 2,) where = f y:) + c, and yi, ~ (O.55, 0.1). Two NN models F, and F, with the same initialization and atom coefficients
trained for their different atoms learn F (X,Y) Y) + Z. It is can be simply found that the atom-based similarity of Fi and F2 is and the timulus-based similarity is also with the same {(0, 0, y4) as the probing data. How- ever, if we choose {( ys 3/ = 0)} as the stimuli data, then the stimulus nimulus-based similarities directly become as the data are now orthogonal to model parameters.
Training dynamics. We investigate the training dynamics AlexNet (Krizhevsky et al. 2012) and VGG (Simonyan & Zisserman 2014) separately CIFAR-100 (Krizhevsky et al. 2009) and ImageNet (Russakovsky et al.) 2015). The details of training dynamics models with atoms from different time point during the training shown in 10 Figure Moreover, examine the similarity between the two participated models shared the same initialization trained only with atoms two different tasks. The results is shown in Figure T2 and Figure The difference is less
21

---

Under review as a conference paper at ICLR 2023
(a) 1st conv
(h) 2nd conv
(c) 3rd conv
(d) 4th conv
(e) conv
(f) 6th conv
(g) 7th conv
(h) 8th conv
Figure 11: Similarity of VGG with atoms from different time point during the training.
(a) Model 0 vs.
(b) Model vs. 2
(c) Model vs. 3
SerC2
Sed
(d) Model vs.
(e) Model
(f) Model
1.00
3.44
200
678
(g) Model 0 vs.
(h) Model 0 vs.
(i) Model 0 vs.
Figure 12: Similarity of AlexNet trained different tasks during the training.
on the first few layers, but more on the middle layers. It reflects the middle layer is more critical than other layers, which is aligned with previous work (Neyshabur et al. 2020).
22

---

Under review as a conference paper at ICLR 2023
km8
131
131
12
360
17A
45
126
100
(a) Model 0 vs.
(b) Model 0
(c) Model 0 vs. 3
SpnC
199-3
125
350
724 36.
306
(d) Model 0 vs.
(e) Model vs. 5
(f) Model vs. 6
092
(g) Model vs.
Model O vs.
(i) Model vs.
Figure 13: Similarity of VGG trained on different tasks during the training.
23


Reviews:
[{"review_id": "hYRXDGz1U2h", "reviewer": "Reviewer_Sx1E", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper proposes a new paradigm for reducing representational similarity analysis in CNNs to filter subspace distance assessment. Model representational similarity can be significantly simplified when filter atom coefficients are shared across networks by calculating the cosine distance among respective filter atoms. This study demonstrates that this simplified filter subspace-based similarity preserves a strong linear correlation with other popular stimulus-based metrics while being significantly more efficient and robust. Overall this is an interesting paper. Major concerns and minor comments are presented in the review section.", "summary_of_the_review": "a) The primary concept that is unclear to me is that the paper claims that the proposed method is linear. How stacked layers of ConvNets can be considered linear. I believe that it should be discussed with some mathematical evidence. \n\nb) The performance of the proposed method should be compared with state-of-the-art representational learning approaches, such as Deep CCA (Andrew 2013), Deep GPs (Damianou 2013), Representational Similarity Learning (Oswal 2016), and Energy-Based Processes for Exchangeable Data (Yang 2020).\n\nc) Lemmas 1 and 5 did not follow the same format to denote matrices – i.e., they should be highlighted in bold.\n\nd) There are some minor linguistic and typo problems in this paper.\n", "strength_and_weaknesses": "Please refer to the review section.\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "auc5AD74Jrd", "reviewer": "Reviewer_KvFf", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "This paper explores the use of the filter subspace distance as a measure of similarity between two neural networks. They provide theoretical and empirical justifications for this measure of similarity and validate their atom-based similarity on continual learning and federated learning tasks.\n\nMost measures of representational similarity (like CCA and CKA) require a forward pass through a trained model to compute representations of different inputs at different layers in a model. This paper takes a different approach and aims to decompose the filter weights of the network directly and then compare the underlying subspaces that are spanned by the network weights. By avoiding having to compute the representations directly, they can avoid the computational overhead needed in other existing approaches.\n\nWhile it is likely that the weights in two networks, when tuned or aligned, can help to reveal differences between the two, the claims in the abstract that they can achieve million times reduction in computation appears overstated because the setup for both approaches and goals is very different -- as RSA and the other tested approaches are black-box. There are other approaches that use weight distributions to compute measures of similarity and perhaps would be more appropriate to compare here.\n\nOverall, the assumptions underlying their framework aren’t very well described and it's unclear how and when their metric will provide appropriate measures of similarity for different pre-trained models. \n", "summary_of_the_review": "This paper provides new tools for measuring similarity between networks using their weights rather than representations. While some of their results are promising and show that their approach can be helpful in continual and federated learning settings, none of the baselines are weight-based analysis approaches, the assumptions underlying their framework aren’t very well described, and it's unclear how and when the atom-based metric will provide appropriate measures of similarity for different pre-trained models. ", "strength_and_weaknesses": "Strengths:\n+ Validated their approach in diverse contexts, continual learning and federated learning setting where different distributed learners have access to different batches of data and are learning locally.\n \n+ Major benefits in terms of savings if filter subspaces are analyzed rather than the representations directly.\n\n+ They show that on simple tasks, analyzing filter subspaces is very correlated with the RSA-based approach\n\nWeaknesses:\n\n- There appear to be fundamental differences in what representational similarity is after vs. what this method provides. Thus it’s unclear if the claims of “the proposed atom-based method can achieve millions of times computation reduction than popular stimulus-based methods” is entirely fair since the methods aren’t trained/tested under the same assumptions (where RSA is a black-box method).  \n\nThe assumptions are unclear:\n\n- The authors start with the assumption that “two convolution neural networks Fu, Fv share atom coefficients layer-wise”. \nWhen is this assumption satisfied? Do you need to train networks in a particular way to align them or to ensure that this constraint holds? \n\n- Because similarity is implicit, it seems that for the comparisons in the first propositions to hold, you need assume that the networks are trained on the same data streams. Either way it seems that the bounds linking the filter subspaces and representational similarity would be very loose.\n\n- Does this only work on CNNs? Why make this assumption?\n", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "JGxhpoGtph", "reviewer": "Reviewer_kifh", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "The authors propose a new metric to evaluate representational similarity in deep neural networks. They aim to capture the properties of the well-known centered kernel alignment (CKA; Kornblith et al., 2019), but with substantially faster computation times. To do this, they leverage work by Miao et al. (2021) in which a group of neural networks is trained on different tasks but with a shared \"atom coefficients\" that render their weights directly comparable.", "summary_of_the_review": "Overall, I think this work is potentially interesting. I would have liked to have seen it focused on when and why weight space similarity coincides with representational similarity in deep nets. Instead, the authors sold this new method as being a computationally cheaper and stimulus-independent form of CKA. I am less enthusiastic about this conclusion. The notation and clarity of the manuscript could also be improved. For now, I don't think this is quite ready and am categorizing this as a borderline reject, although I might be persuaded to increase my score if others find this interesting and if the text/equations can be clarified as mentioned above.", "strength_and_weaknesses": "This paper has a relatively detailed theory section and a clever idea. I think it is pretty interesting that weight space similarity and representational similarity can be correlated.\n\nHowever, there are several weaknesses which have muted my enthusiasm.\n\n* It is not clear to me that the computational expense of CKA (and related metrics) is a major bottleneck to research. So while the paper presents a potentially useful way to speed up calculations, I am not sure this enables fundamentally new research directions.\n\n* The authors seem to claim that a weakness of CKA is that it is stimulus-dependent. However, I would claim the opposite &mdash; it is potentially very useful to compare CKA values on in-sample vs out-of-distribution inputs to understand how hidden layer representations are sensitve to these shifts. By focusing only on weight space similarity, the authors' approach is less flexible.\n\n* The authors' framework requires the atom coefficients, denoted $\\alpha$, to be shared across different networks. This means that the authors' method is less generally applicable than CKA. For example, it would be useful to compare representational similarity between the DCFNet architecture (which includes the atom coefficients) and more standard architectures. However, while it would be possible to make this comparison with standard CKA, there isn't a way to do this with the authors' method.\n\n* While there is a lot of theoretical analysis in this paper, certain technical portions of the manuscript are not clear (see below).\n\n* Related to above, I think that certain technical assumptions are not made explicitly. For example, it would seem to me that the atom coefficients need to be full-rank in order for the filter subspace similarity to be meaningful. Consider if $\\alpha_{ij} = 1$, then any permutation of the filter atoms, $\\mathbf{D}^1, \\dots, \\mathbf{D}^m$, would produce the same convolutional filter $\\mathbf{W}$. Is my understanding here correct? If so, the conditions under which the filter atoms are directly comparable across networks needs further unpacking.", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}]

Author rebuttal:

Decision: Reject