Inner Product-based Neural Network Similarity
Authors: Wei Chen
Zichen Miao
Qiang Qiu
Venue: NeurIPS 2023 poster (2023)
Keywords: Neural Network Similarity
Filter Subspace

Abstract: Analyzing representational similarity among neural networks (NNs) is essential for interpreting or transferring deep models. In application scenarios where numerous NN models are learned, it becomes crucial to assess model similarities in computationally efficient ways. In this paper, we propose a new paradigm for reducing NN representational similarity to filter subspace distance. Specifically, when convolutional filters are decomposed as a linear combination of a set of filter subspace elements, denoted as filter atoms, and have those decomposed atom coefficients shared across networks, NN representational similarity can be significantly simplified as calculating the cosine distance among respective filter atoms, to achieve millions of times computation reduction over popular probing-based methods. We provide both theoretical and empirical evidence that such simplified filter subspace-based similarity preserves a strong linear correlation with other popular probing-based metrics, while being significantly more efficient to obtain and robust to probing data. We further validate the effectiveness of the proposed method in various application scenarios where numerous models exist, such as federated and continual learning as well as analyzing training dynamics. We hope our findings can help further explorations of real-time large-scale representational similarity analysis in neural networks.

Inner Product-based Neural Network Similarity
Wei Chen', Zichen Miaoi, Qiang Qiu Department of ECE Purdue University
{chen2732, miaoz, qqiuh@purdue.edi
Abstract
Analyzing representational similarity among neural networks (NNs) essential for interpreting transferring deep models. In application scenarios where nu- merous NN models are learned, it becomes crucial to assess model similarities in computationally efficient ways. In this paper, propose new paradigm for reducing NN representational similarity to filter subspace distance. Specifically, when convolutional filters are decomposed filter subspace elements, denoted as filter atoms, and have those decomposed atom coefficients shared across networks, NN representational similarity can be signifi- cantly simplified as calculating the cosine distance among respective filter atoms, achieve millions of times computation reduction over popular probing- methods. We provide both theoretical and empirical evidence that such simplified filter subspace-bar based similarity preserves strong linear correlation with other popular probing- based metrics, while being significantly more efficient to obtain and robust to probing data. We further validate the effectiveness of the proposed method in various application scenarios where numerous models exist, such as federated and continual learning as well as analyzing training dynamics. We hope our findings can help further explorations of real-time large-scale representational similarity analysis neural networks.
linear combination of set of
Introduction
Deep neural networks (NNs) have shown unprecedented performance in large variety of tasks [24 46). In many scenarios, numerous models are learned and their relations can be beneficial to exploit. For example, illustrated in Figure a]), aggregate knowledge across space, federated learning (FL) trains models over a large number of clients while keeping data localized. To preserve know inowledge across time while learning new ones, continual learning (CL) can be addressed by training large group of models. one for each timestep. Finding the relations among models is the cornerstone to boosting performance in these scenarios, such as improving personalization for FL (53) or providing knowledge retrieval for CL. 40 Considering the large number of NNs potentially allowed in those scenarios, e.g., model growing spatial/temporal coverage, it becomes crucial to have highly computationally efficient way to assess NN model similarity.
We are inspired by one recent state-of-the-art CL framework in 35 where each convolutional filter is represented as linear combination of set of filter subspace elements, denoted as filter atoms. It is easy notice that each convolutional layer now becomes two convolutional layers, filter atom layer followed by an atom cocfficient layer with 1 x 1 filters. Then, motivated by the literature on task subspace modeling [10, 25 33 45 64 that tasks can be modeled as a set of latent basis tasks and their linear combinations, a group of tasks are sequentially modeled using NNs by learning for each task a different set of filter atoms, while sharing common atom coefficients across
Equal contribution.
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

Medel
Festr Spice
Aboeel
Madel
Fiker Sulepau Suaiarrty
Medel2
D
Space
Traber tenilady
Contrnad cooring
Time
Ay
Share des cactideer
Nonamboro of chert www.erertt.....
(a)
(b)
Figure I: (a) The illustration of scenarios where numerous models exist, such as federated learning (FL), continual learning (CL), and model training process. The relations among models usually critical, and the computational cost to assess the model relation can be a major bottleneck. (b) Comparison between our method and probing-based methods. (left) Feature space similarity metrics, e.g., CCA, rely on probing data, and calculate the correlation between large groups of features generated by the forward pass of probing data through NNs. (right) comparison, our filter subspace- based method decomposes convolutional filters W as filter atoms D (filter subspace elements) and atom coefficients a, W a D, and only calculates the filter subspace similarity between a small portion of parameters, i.e., filter atoms, which is independent from probing data and computation efficient. The proposed filter subspace-bas based method can achieve millions of times computation reduction than popular probing-base methods.
tasks. 35 has in detail analyzed and validated this framework in the CL context. This learning framework with individually modeled filter subspaces but shared rules of linear combinations is generally applicable to many multi-model scenarios, especially CL and FL settings, where numerous NNs with the same architecture are Iearned. For example, FL learns a single global model to fit the data on all clients, and the majority of aggregating methods in FL require NNs to maintain the same network structure 28
In the above setting, it is easy to observe that the representation variations across different NNs now become dominated by respective filter atoms. Thus, (35] adopts in experiments filter subspace distance to assess task relevancy, 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 to the cosine distance of two sets of filter atoms, to eliminate the computation of singular value decomposition in calculating principal angles. Then, show both theoretically and empirically that the obtained filter subspace similarity preserves a strong linear correlation with other popular probing-basee similarity measures such as CCA [3], which require external probing data input stimuli. Our representational similarity is also immune to inappropriate choices of probing data, while probing- based metrics can be perturbed drastically.
Previous works revealed by input data. These approaches introduce heavy computation from both the forward pass of numerous probing data and the calculation of high-dimensional covariance matrices. As these similarity metrics are probing-dependent, their quality can potentially deteriorate when probing data are inappropriately chosen, scarce or unavailable. Such properties make the popular probing- based approaches less appropriate for our target scenarios where a large number of NN models are present.
measure representational similarity directly relying on deep representations
The proposed filter subspace similarity shows extreme efficiency in both memory and computation. Since our similarity computation does not involve network forward pass, no GPU memory access required, whereas other probing-base based measures consume the same amount of GPU memory as regular inference. On the other hand, the proposed method involves only inner product calculations on filter atoms, which takes negligible time for similarity evaluation. The evaluation time of probing- based measures includes the time of both the forward pass of probing data and the calculation of high-dimensional covariance matrices. We report later the dramatically improved evaluation time of the proposed method against other popular probing- based methods, e.g., CKA (11. These unique

---

properties make our method highly desirable for exploring NN similarity under scenarios with large number NN models.
We further validate our filter subspace similarity for knowledge transfer with various CL and FI. tasks, sample examples exploit NN model relations. 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 probing-based similarity metries, 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 subspace-based bassseecebaeed measure preserves a strong linear correlation with other popular probing- grobing-based measures, while being significantly more robust and efficient in both memory and computation.
We demonstrate the effectiveness of the proposed similarity measure using several simple examples, such as federated and continual learning as well as analyzing training dynamics.
Methodology
In this section, we first review probing- probing-based representational similarities and show their limitations. Then, we provide a filter subspace formulation for NNs, and propose NN similarity metric based on simplified filter subspace distance. We further demonstrate that under certain assumptions, the proposed measure shows a strong linear relationship with popular probing-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 retrieval across large number of NN models.
2.1 Revisiting Representational Similarity in Feature Space
Intuitively, the NN representational similarity can be directly assessed via features generated from different neural networks. As shown in Figure [b), it usually includes three steps to evaluate probing- based representational similarity between two NNs Fu and F.: (1) Collect an appropriate and sufficient amount of external probing data X, E Raxe' xh'xx' xw' that can represent the whole data distribution. (2) Generate the feature Zu and Z, (Zu, Zu E B=xexhxwy by the forward pass (Xp:
of probing data through different neural networks, Z. = =u.(Xp 0,) and Z. F,, (Xp 0s), where Ou, O, denote parameters of two NNs. (3) Choose a probing-based metric to assess the model similarity. Several popular probing-base bassd methods can be adopted in step (3), and we will give a brief introduction below.
4 proposes to analyze the NN representational similarity by conducting canonical correla- tion analysis on 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 Z,, Z.. the CCA can be denoted as,
CCA.
SCCA
where denotes the I-th eigenvalue of Au,e = QIQu.
CKA. 21 proposes another way assess the NN similarity based on Centered Kernel Alignment (CKA). Let K. = Z,Z,, K. = Z.ZZ denote the Gram matrices of two feature space, the CKA is computed by.
HSIC(K,, Kv)
(F.A(F..FF)) /HSIC(K,, K2) HSIC(K,,
where HSIC is the Hilbert-Schmidt Independence Criterion 11].
However, addition to the forward pass, all the aforementioned approaches further introduce significant computational costs while performing evaluation in the representation space. Nevertheless,

---

Correlation: 0,9469
100
Correlation: 0.9327
Urpespaang Signnagg
100
Correlation
CCA 4
0.9327
CKA
0,9550
Grassmann Distance 35
0.9469
100
636 61 d6 on xmp
Kin toe Filter Subspace Similarity
Filter Subspace Similarity
(a)
(b)
Figure 2: (a) Correlation between Grassmann similarity and filter subspace similarity; (b) Correlation between CCA and filter subspace similarity. (Table) Correlation between filter subspace similarity and other approaches.
their qualities rely heavily on the mindful choice of probing data Xn, which undermines their robustness.
2.2 Representational Similarity in Filter Subspace
Filter subspace. As in 41, the convolutional filter W E Re' xexxxx (c' and c are the number of input and output channels, it is the kernel size) can be decomposed over m filter atoms (filter subspace elements) D[i E (i
I,...,m) linearly combined by atom coefficients a E R.xxee xe as W D. Note that each convolutional layer becomes two convolutional layers, filter atom layer followed by an atom coefficient layer with
filters. The filter subspace then expressed as V = Span D [1]. .... D [m]]]. With this formulation, consider a paradigm where filter subspaces are model-specific, and subspace linear combination rules, i.e., atom coefficients, are shared across different networks. The intuition and detailed validation of this learning paradigm be found in 35.. where ofate-f-thh--ee art performance in the continual learning context reported.
In this setting, we dive deep into the relationship between filter subspaces and representations. For simplicity, let e = d' = 1, and the argument extends. Given an input image X(b) (b E B, B Z²), define the local input norm [r,N, = (EveN, X(b - 1/22)//2 and the convolution (X, w) N, = EveN, X(b - (b)), where N₂, C a local Euclidean grid centered at Then the decomposed convolution can be written as Z(b) = Σ (x, where D[i] denotes the i-th atom, Oz is the corresponded i-th coefficient.
Proposition 2.1. Suppose D., and D,, are two different sets of filter aloms for a convolutional layer with the common alom coefficients az, we can upper bound the changes the corresponding features Zu, Zu with atom changes,
Iz. Z.lle S (1[a)1AA)/BB) -D. -Dolee with X sup
|||
F.No
BEB
The proof is provided Appendix A.1 We further empirically validate this relationship in Sec- tion A.3
Filter subspace similarity The above theorem suggests the possibility measure the representa- tional similarity of two NNs by simply measuring the distance of their filter subspaces. As proposed in (35), the representational similarity of NNs with different filter subspaces V., V, can be assessed by the similarity based on Grassmann distance between V,,, V2 as,
(Fa, = d(V., Vo) = mT Σ cosO,
1
(4)
where 8; is the i-th principal angle between V., and Ve.
However, the above metric requires costly singular value decomposition. Note that filter atoms in different NNs are intrinsically aligned under shared atom coefficients, which allows us to approximate the filter subspace similarity using the cosine similarity of the corresponding filter atoms. To this end, as shown Figure [[b), we propose a significantly simplified representational similarity measure with filter atom similarity.

---

Definition 2.2. Suppose two convolution neural networks Fu: Fu share atom coefficients layer-wise, and their model-specific filter atoms are D.. D., then the filter subspace representational similarity is simplified as,
< (rec(Du)) vecl (ec(D.) > (r)l ||vec(D.))
Atoom (Fu,FF) (D.. D.)
(5)
The above definition is layer-wise similarity, allowing us compare the similarity of different networks per layer, and we simply average layer-wise similarities for the network-wist similarity. Remark 2.3. The filter subspace similarity measure becomes proper metric after taking the arccosine, i.e., arccos(S Attom (Fu. F.)) is a proper metric.
We further show that Atom and SCras are equivalent under certain assumption.
Proposition 2.4. Assume D D x orthogonal matrices, then Scras SAtom-
The proof is provided in Appendix A.I We empirically show in Figure a that the above simplified filter subspace similarity has still strong linear correlation with the Grassmann subspace similarity even without imposing the above orthogonality over atoms.
Note that our filter subspace similarity measure only involves linear operations of vectorized atoms of around hundreds of dimensions, which requires negligible computation. Additionally, the proposed method depends solely models themselves and eliminates the reliance on external probing data, equipping our similarity with robustness to inappropriate choice of probing data.
2.3 Algorithm Complexity Analysis
Here, we provide detailed comparison of computation complexity between the proposed filter subspace similarity and probing-based similarities. Consider one convolutional layer with filter W E R xexkxk (W a x D. D E m=xxxx) which transforms the input X, E B xh' xw' to output Z E |=xcxhxx: The complexity of our method is dominated by inner product two tiny filter atoms, O(m A²), e.g., = 9, k 3 in typical setting.
In contrast, probing-bascl similarity measure first forward feeds n probing samples with a complexity of On h w/ k2² cc'), ) then calculates covariance matrix with the complexity of O( hw c). In total, the time complexity of CCA is O(n h'w'" k.2 cd n² hw c). Our method is at least p.M w' oer on --we times more efficient than probing-basee similarity measures. As h > k, m=-k
cd' > m, the computational cost of our method is negligible. For example, with 10k probing datapoints, the CCA calculation requires 1.14 x 107 times more FLOPs than the proposed method.
2.4 Relationship with Probing-based Similarities
The proposed filter subspace similarity not only shows extreme efficiency but also exhibits a strong linear relationship with other popular probing-based similarities. Here, analyze the proposed filter subspace similarity S Atom with CCA, SCCA 43 Suppose forward passes of decomposed convolutional layer for Fu and F. are Z, aX,D Ze aX,Dr, respectively. To start with, we show that the Scc is upper bounded by the proposed SAtom-
Theorem 2.5. Let T Tr([[aTaXxx) C min (XxTTaX,) Assume K(ZTZ,))K(ZZZ,)) S
y. Then SeCA (Fu, F.) is upper bounded by S SAoom (Fu, Fo),
SCCA S SAtom Fu); T
(6)
where Tr(-) denotes trace of matrix, Jmin indicates the minimum eigenvalue, KC(A) denotes the condition number of matrix A. We provide the proof in Appendix A.I.
Specifiially, the formulation writes as Z. ax,- D... where is the convolutional operation. By converting convolutional kernel D, into a Toeplitz matrix, we can replace the convolution operation X,: * D.,
with matrix multiplication X, D.. We also modify a by Inn X where X is Kronecker product, to enable the matrix multiplication a.,D....
5

---

Lerwey (iteeadde
Levnee
fextorty reakrally CEAURA afoced disiccal prrning
Softimees more elfccient that CCA
CMA
Durs
CCA
CCA
In-Cutsbabe Nokia
06
004
-02
R1.0%
1ine
Meraary
4.0P5
1ine
Morcry
0. 25 10.0 12.5
(a)
(b)
Figure (a) The ratio of the computational cost savings of our filter subspace similarity over probing- braeedg-based similarities. (b) The performance of probing-basee similarities can be compromised by poorly selected probing data. For models trained on CIFAR-I00, they have high CCA and CKA similarities with probing from CIFAR-100 but low similarities with probing from other datasets. In contrast, our filter subspace similarity does not rely on probing data and shows high similarity between the networks, aligning with our expectations.
Since SecA probing-dependent. the calculated value varies depending on the choice of probing data, and the value range shows bounded by our filter subspace similarity, as in the theorem above.
With additional assumptions imposed, can further show near-linear relationship between CCA and our filter subspace similarity.
Assumption 2.6. Suppose the diagonal elements of ZTZ,, ZTZ, and ZzZ,, are larger than non- diagonal element, i.e., (Z >> (ZTZ)) ).....
The Assumption 2.6 suggests different channels of feature Z have low correlation. Reducing channel-ve -iie dependencies has been studied [69] and has been shown to benefit model stability. We provide the empirical verification of the assumption in Appendix(A.3
Theorem 2.7. If Assumption 2.6 holds, (Fu, F.) is approximately linear to filter subspace similarity,
Ve
(c,,(Fu,FFo) = SAttm (Fu;
71122'3
where 71. 72 and Y contain higher order of features, which can be found in detail with the proof in Appendix A.1 Specifically, we have 7/2 = V1 The cos DD.. and since A are small, with
Taylor expansion, 12 R 1 THE (D...D. The term (D.. causes non-linearity in the relation between CCA and filter subspace similarity.
we empirically observe the linear correlation between CCA and filter subspace similarity, which agrees with our theoretical findings. In addition, we find that the proposed similarity also shows a strong correlation with CKA.
As in Figure 2
3 Experiments
In this section, first validate our theorems with several validation experiments and then demonstrate simple example applications of the proposed filter subspace similarity in efficiently analyzing training dynamics as well as in federated and continual learning scenarios.
3.1 Validation Experiments
We conduct empirical validation to confirm the near-linear relationship between filter subspace similarity and probing- based similarity and explored the limitations of probing-baid based similarities.
Correlation of CCA and filter subspace similarity. The empirical verification of the correlation between CCA and filter subspace similarity is presented in Figure 2 In this experiment, 10 tasks

---

Triining Epuch
Training Epoch
Triining Epoch
Triining Freech
Tranning Epech
CAU
Trining
0099
00.99
00.9
36
(8)
150
(b)
150
0
43
150
Training Epoch
Training Eooch
Training Fpoch
Trsining Spoch
Trining Epoch
Tinoh
(d)
(e)
Figure 4: Liyer-wise similarity matrices that show relations of model parameters of different training time points. (a)(b)(c are the 1st, 3rd and 5th convolutional layer of AlexNet trained on CIFAR-100 (I)(e)(I are the 1st, 4th and 8th convolutional layer of VGGII 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 37 43
generated from CIFAR-100 100 dataset 23 each consisting of 10 classes. We employ the ResNet1 model [2), training only the filter atoms while keeping the atom coefficients fixed each task. The CCA and filter subspace similarity are calculated among 45 pairs models. The correlation between CCA and filter subspace similarity is 0.9327, as depicted in Figure bb). Furthermore, the correlation between Centered Kernel Alignment (CKA) and filter subspace similarity is also reported in Table These findings clearly indicate that the proposed filter subspace similarity exhibits a strong linear re relationship with well-established probing- similarities, supporting the claims made in Theorem 2.5 and Theorem 2.7
Limitations of probing-based similarities. The consistency of probing-based similarities can vary depending on the probing data. Ideally, we anticipate high similarity value when comparing models trained on the same dataset. To investigate this, we conduct an experiment where models are trained on the CIFAR-100 dataset. Figure (bb) displays the distribution of model similarity with different probing data, where the y-axis represents the similarity and the x-axis represents the corresponding density models. And with CIFAR-100 probing data, the CCA similarity between models yields value over 0.8. However, when the probing data are derived from the other datasets including CIFAR-10, SVHN [38], CelebA [31]. and etc., the CCA similarity drops to 0.59. A similar inconsistency in values is observed with the CKA similarity using different probing data. In contrast, the average of our proposed filter subspace similarity between models 0.91, which aligns well with our expectation of high similarity. This finding demonstrates the effectiveness of our approach in capturing the inherent similarities between models trained on the same dataset, irrespective of the specific choice of probing data.
3.2 Learning Dynamics
The filter subspace similarity has various applications in analyzing NNs. 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 filter subspace similarities. In this experiment, AlexNet (24] is trained CIFAR-100 (23] for 150 epochs and VGG11 (50] is fine-tuned
ImageNet 47 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 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
7

---

CIXAIX
CFARIK
CEXAIX
33
3M
330
37
-37
231
(a) 10th epoch
(b) 50th epoch
(c) 90th epoch
Figure 5: Similarity matrices that show relations among 60 users in FL with our filter subspace similarity through the training process. The labels of x-axis represent the ID's of CIFAR tasks. We can clearly see user clusters 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.
epoch. The first layer reaches 0.99 similarity at epoch 36 which is earlier than final layers. In Figure d--f, VGG11 shows 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 [3]. Our filter subspace similarity provides a highly efficient way to examine the training dynamics while showing results in accord with previous studies. Moreover,
apply method to calculate the similarity of model trained on different tasks, so we can track the process of the same model interacting with different datasets. The details shown in Appendix A.2
3.3 Federated Learning
Federated learning (FI.) aims at learning models collaboratively by leveraging the local computational power and data of all users with the concern of privacy [34]. Personalized Federated Learning (PFL. emerges to address some challenges in FL, such as poor convergence on heterogeneous data and lack of solution personalization [53
In this setting, our framework achieves personalization by enforcing FL models with the shared atom coefficients for all users and specifie filter atoms for each user. As illustrated in Figure 6 the shared coefficients preserve common knowledge, while user-specific atoms hold personalized information about each user. Then, can assess model relationships with filter subspace similarity without any probing data, which meets the privacy requirement of the FL scenario.
The shared atom coefficients can be achieved in different ways. With our framework, the coefficient can 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.
Measuring user similarity. With the shared atom coefficients and user-specific filter atoms, we can simply get relations of users by calculating filter subspace similarity. To be specific, we expect that users with similar data have higher similarity. In this experiment, we distribute data of CIFAR- 100 (23] and SVHN 38 to 120 clients, containing 20 SVHN clients and 100 CIFAR clients. Specifically, the SVHN dataset is randomly distributed in 20 SVHN clients. And the CIFAR- 100 dataset is split into 20 subtasks with 5 classes each subtask, and each subtask is shared by CIFAR clients. The model is AlexNet (24 with 3 convolutional layers. The models share the same random initialization and filter atoms are trained independently without communication with other clients. All models are trained for T 100 communication rounds datasets. At each round, the client executes 1 epoch of SGD with momentum to train the local model, the learning rate 0.01 and the momentum is 0.9. The experimental details are described in Appendix A.2
Figure shows the filter subspace similarity among the last clients the CIFAR- 100 task and 20 clients of the SVHN task. Specifically, a distinct cluster of the 20 SVHN clients is observed, indicating a higher similarity among these clients and dissimilarity with the CIFAR clients. Additionally, every group of 5 CIFAR clients, who share the same task, also exhibit high similarity among themselves.

---

Table Classification accuracy model ensemble using different FL methods and model selection strategies: Models are selected with different similarity measures in each setting. The model ensemble using our filter subspace-basee method is millions of times faster and consumes much fewer resources than probing- baanngg-aeeddde methods while producing comparable performance.
Results
Base
+Ours
+CCA
+CKA 21
FedAvg [34
83.78. 0.08
85,82 1 0.35
85.65 - 0.21
85.29 1 0.18
Ditto 27
82,98 1: 0.13
85.49 1 0.21
85.54 + 0.19
85.37 1 0.2
FedRep 8
76,44 +: 0.06
78.35 1 0.24
78.18 = 0.18
77.73
0.19
FedProx 29
80,6 + 0.1
82.95 + 0.16
82.55
= 0.19
82.86 = 0.16
FedPer 2
83.57 + 0.07
85.21 - 0.2
84.91 0
84.9 = 0.14
Pretrain
81.77 + 0.08
85.41 + 0.19
85.24 = 0.13
86.33 = 0.14
Similarity Compitation Cost
GFLOPs
0.019
258,610
2,225
Time
0.016
1930.4
92.6
GPU Memory (MB)
4915
3965
Table 2: Continual Learning Results. The model ensemble using our filter subspace similarity significantly faster and consumes much fewer resources than probing-bait -base methods, while maintaining comparable classification accuracy.
Similarity Computation Cost Time (s)
Method
CIFAR-100
MFLOPs
GPU Memory (MB)
AtomCL (base)
78.11 + 0.13
+CCA 43
79.83 + 0.04
35.2
0.26
1996
+CKA 21
80.01 + 0.06
111
0.3
1637
+Ours
80.19 + 0.09
0.007
0.0008
0
This clustering capability holds great potential for facilitating efficient cluster identification in federated learning scenarios [53]. Refer to Appendix Figure 7 for the results of all 120 clients.
The computational cost of three different approaches is shown in Figure a). Notably, calculating the filter subspace similarity is significantly faster (million times), requiring GPU memory usage than grbbing-based methods. Note that the advantages in computational efficiency of filter subspace similarity become more prominent as the number of models increases.
Improving personalized model with ensemble of similar users. Once 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 filter subspace similarity are comparable with probing-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 the past [40]. Some of the tasks in continual learning are related, so models trained with these tasks can be benefited from aggregating knowledge from each other. We adopt the setting in (35), and apply filter subspace similarity to find related models. Specifically, we 10- 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 on the first task, and train only the atoms on the following tasks. Then, we calculate the task similarity with filter subspace 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 probing- probing-based methods.

---

4 Related Work
Model similarity. Representational similarity analysis (RSA) 22 demonstrates the method of understanding brain activities by computing similarities between brain responses in different regions. Measuring the similarity of models is beneficial for understanding neural network (NN) architectures Model similarity can be used to understand or incorporate various machine learning paradigms across different areas, including contrastive learning [13 15].
and learning dynamics 9 21
knowledge distillation [52]. meta-learning [42]. and transfer learning S 39 44).
Multiple approaches are proposed to estimate the representational similarity of NNs. Some early works show that individual neurons can capture meaningful information 3
61665)
65]. Later, gradient-
based methods emerge to provide visual explanation of deep neural networks [49]. Current popular
representational similarity methods rely on features of NN. 43] proposes SVCCA to measure similarity by calculating the covariance matrix of the features of each layer after channel alignments.
[1 discusses the invariance properties of similarity indices and proposes CKA with consistent correspondences between layers. grobing-based similarities are data-dependent and computationally expensive. But our method measures the representational similarity only via atoms, a portion of model parameters, which is data-agnostic and much more efficient.
Learning paradigm with numerous models. Some machine learning tasks involve numerous models. For example, in Federated learning [53] thousands of models are trained across clients. In Continual learning, there are multiple models generated across time [18] Federated learning (FL) aims to improve the performance of the system by continuously training and aggregating models from
users without collecting data [20 34 [1]] FL requires communication efficiency while thousands or even millions of clients may be involved (28] It also required to achieve personalization [14 53
considering data heterogeneity of different users 6 17 17. 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 tasks while remembering the old ones [ 18 19 26 66). One promising way is to store neural networks for each task [16 30 32 48 60) As the number of tasks increases, a large number of models are generated and stored. It is important to find a way to access their relations to reuse models.
Filter atom decomposition. The research in task subspace modeling treats tasks as compositions of latent basis tasks and their linear combinations [T0
In the context of convolutional filter decomposition, DCFNet [41] introduces the filter subspace as an expansion of convolutional filters using predetermined set of filter atoms. With the filter subspace, group of tasks are separately modeled using neural networks, with sets of filter atoms learned for individual tasks, while a common set of atom coefficients is shared among tasks, The applications of filter subspace span among various
25 33
domains, including domain adaptation [54 57 continual learning (35), adaptive convolution [56] 59
image generation 55 58], video comprehension [3),, and graph convolution (7).
5 Conclusion
In this paper, we proposed new paradigm for reducing representational similarity analysis in CNNs to filter subspace distance assessment, which is targeted for application scenarios where numerous models are learned. The proposed approach is targeted for application scenarios where numerous models are learned, and computationally efficient method to assess model similarities is critical in these scenarios. We provided both theoretical and empirical evidence that the proposed filter subspace-basee similarity exhibits strong linear correlation with popular probing-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.
The majority of approaches in FL or CL are applied to the models with the same architecture, the proposed similarity measure with shared atom coefficient is more advantageous to incorporated in these tasks. 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 atom coefficients among layers to achieve filter subspace similarity with different dimensions.
10

---

References
[1] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuyte- laars. Memory aware synapses: Learning what (not) forget. In Proceedings of the European Conference on Computer Vision (ECCV), 2018.
[2] Manoj Ghuhan Arivazhagan, Vinay Aggarwal, Aaditya Kumar Singh, and Sunav Choudhary. Federated learning with personalization layers. arXiv preprint
2019. [3] Anthony Bau, Yonatan Belinkov, Hassan Sujjad, Nadir Durrani, Fahim Dalvi, and James Glass. Identifying and controlling important neurons in neural machine translation, In International Conference on Learning Representations, 2018.
[4] David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissec- tion: Quantifying interpretability of deep visual representations. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2017.
[5] Daniel Bolya, Rohit Mittapalli, and Judy Hoffman. Scalable diverse model selection for accessible transfer learning. Advances in Neural Information Processing Systems, 2021.
[6] Wei Chen, Kartikeya Bhardwaj, and Radu Marculescu. Fedmax: mitigating activation di- vergence for accurate and communication--ene -efficcinnnff federated learning. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, 2021.
[7] Xiuyuan Cheng, Zichen Miao, and Qiang Qiu. Graph convolution with low-rank learnable local filters. In International Conference on Learning Representations, 2020.
[8] Liam Collins, Hamed Hassani, Aryan Mokhtari, and Sanjay Shakkottai. Exploiting shared representations for personalized federated learning. In International Conference on Machine Learning, 2021.
[9] Kshitij Dwivedi and Gemma Roig. Representation similarity analysis for efficient task taxonomy & transfer learning. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2019.
[10] An Evgeniou and Massimiliano Pontil. Multi-task feature learning. Advances in neural information processing systems, 19:41, 2007.
[11] Arthur Gretton, Olivier Bousquet, Alex Smola, and Bernhard Schölkopf. Measuring statistical dependence with hilbert-schmidt norms. In International conference on algorithmic learning theory, 2005.
[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and paltern recognition, pages 770-778, 2016
[13] Tianyu Hua, Wenxiao Wang, Zihui Xue, Sucheng Ren, Yue Wang, and Hang Zhao. feature decorrelation in self-supervised learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021.
[14] Yutao Huang, Lingyang Chu, Zirui Zhou, Lanjun Wang, Jiangchuan Liu, Jian Pei, and Yong Zhang. Personalized cross-silo federated learning non-iid data. In Proceedings of the AAAI Conference on Artificial Intelligence, 2021.
[15] 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 Computer Vision, 2021.
[16] Ghassen Jerfel, Erin Grant, Thomas L. Griffiths, and Katherine Heller. Reconciling meta- learning and continual learning with online mixtures of tasks. Advances Neural Information Processing Systems, 2019.

---

[17] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Ar- jun Nitin Bhagoji. Kallista Bonawitz, Zachary Charles, Graham Cornode, Rachel Cummings. et al. Advances and open problems in federated learning, Foundations and Trends in Machine Learning. 2021.
[18] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka BarbbskaBaarinkka, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 2017.
[19] Soheil Kolouri, Nicholas Ketz, Xinyun Zou, Jeffrey Krichmar, and Praveen Pilly. Attention- based struccural-plastiittyy arXiv preprint arXiv: 1903.06070 2019.
[20] 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.5559, 2016.
[21] Simon Korblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In International Conference on Machine Learning, 2019.
[22] Nikolaus Kriegeskorte, Marieke Mur, and Peter A Bandettini. Representational similarity analysis-connecting the branches of systems neuroscience. Frontiers in systems neuroscience, 2008.
[23] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. PhD thesis, University of Toronto, 2009.
[24] Alex Krizhevsky, lla Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 2012.
[25] Abhishek Kumar and Hal Daume III. Learning task grouping and overlap in multi-task learning. International Conference on Machine Learning, 2012.
[26] Sang-Woo Lee, Jin- Hin-Hwa Kim, Jachyun Jun, Jung- Woo Ha, and Byoung- Tak Zhang. Overcoming catastrophic forgetting by incremental moment matching. In Advances in Neural Information Processing Systems, 2017
[27] Tian Li, Shengyuan Hu, Ahmad Beirami, and Virginia Smith. Ditto: Fair and robust federated learning through personalization. International Conference on Machine Learning. 2021.
[28] Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. Federated learning: Chal- lenges, methods, and future directions. IEEE Signal Processing Magazine, 2020.
[29] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. Proceedings of Machine Learning and Systems, 2020.
[30] 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.
[31] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference Computer Vision (ICCV) December 2015.
[32] David Lopez-Paz and Marc' Aurelio Ranzato. Gradient episodic memory for continual learning. Advances in neural information processing systems, 2017.
[33] Andreas Maurer, Massi Pontil, and Bernardino Romera-Paredes. Sparse coding for multitask and transfer learning. In International conference on machine learning, pages 343-351. PMLR, 2013.
[34] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efite learning of deep networks from decentralized data. In Artificial intelligence and statistics, 2017.
12

---

[35] Zichen Miao, Ze Wang, Wei Chen, and Qiang Qiu. Continual learning with filter atom swapping. In International Conference on Learning Representations, 2021.
[36] Zichen Miao, Ze Wang. Xiuyuan Cheng, and Qiang Qiu. Spatiotemporal joint filter decomposi- tion in 3d convolutional neural networks. Advances in Neural Information Processing Systems, 2021.
[37] Ari Morcos, Maithra Raghu, and Samy Bengio. Insights on representational similarity in neural networks with canonical correlation. Advances in Neural Information Processing Systems, 2018.
[38] 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.
[39] Behnam Neyshabur, Hanie Sedghi, and Chiyuan Zhang. What is being transferred in transfer learning? Advances in neural information processing systems, 2020.
[40] German I Parisi, Ronald Kemker, Jose Part, Christopher Kanan, and Stefan Wermter. Continual lifelong learning with neural networks: A review. Neural Networks, 2019.
[41] Qiang Qiu, Xiuyuan Cheng, Guillermo Sapiro, and Robert Calderbank. DCFNet: Deep neural network with decomposed convolutional filters. In International Conference on Machine Learning, 2018.
[42] Aniruddh Raghu, Maithra Raghu, Samy Bengio, and Oriol Vinyals. Rapid learning or feature reuse? towards understanding the effectiveness of maml. In International Conference Learning Representations, 2019.
[43] 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.
[44] Maithra Raghu, Chiyuan Zhang, Jon Kleinberg, and Samy Bengio. Transfusion: Understanding transfer learning for medical imaging. Advances in neural information processing systems, 2019.
[45] Bernardino Romera-Paredes, Hane Aung. Nadia Maanchi-Berthouze. and Massimiliano Pontil. Multilincar multitask learning. In International Conference on Machine Learning, pages 1444-1452. PMLR, 2013.
[46] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, 2015.
[47] 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 (IJCV), 2015.
[48] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv: 04671, 2016.
[49] Ramprasaath Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE international conference on computer vision, 2017.
[50] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv: 14099 /5569955666,0. 2014.
[51] Virginia Smith, Chao-Kai Kai Chiang, Maziar Sanjabi, and Ameet S Talwalkar. Federated multi-task learning. In Advances in Neural Information Processing Systems, 2017.
13

---

[52] Samuel Stanton, Pavel Izmailov, Polina Kirichenko, Alexander A Alemi, and Andrew G Wilson. Does knowledge distillation really work? Advances Neural Information Processing Systems, 2021.
[53] Alysa Ziying Tan, Han Yu, Lizhen Cui, and Qiang Yang. Toward personalized federated learning. IEEE Transactions on Neural Networks and Learning Systems, 2022.
[54] Ze Wang. Efficient Adaptation of Deep Vision Models. PhD thesis, Purdue University, 2023.
[55] Ze Wang, Xiuyuan Cheng, Guillermo Sapiro, and Qiang Qiu. Stochastic conditional generative networks with basis decomposition. In International Conference on Learning Representations. 2019.
[56] Ze Wang, Xiuyuan Cheng, Guillermo Sapiro, and Qiang Qiu. Acde: Weight sharing in atom- coefficient decomposed convolution. arXiv preprint arXiv:2009.023880 2020.
[57] Ze Wang, Xiuyuan Cheng, Guillermo Sapiro, and Qiang Qiu. A dictionary approach to domain- invariant learning in deep networks. Advances in neural information processing systems, 2020.
[58] Ze Wang, Seunghyun Hwang. Zichen Miao, and Qiang Qiu. Image generation using continuous filter atoms. Advances in Neural Information Processing Systems, 2021.
[59] Ze Wang, Zichen Miao, Jun Hu, and Qiang Qiu. Adaptive convolutions with per-pixel dynamic filter atom. Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021.
[60] Jaehong Yoon, Eunho Yang, Jeongtae Lee, and Sung Ju Hwang. Lifelong learning with dynamically expandable networks. In International Conference on Learning Representations, 2018.
[61] Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European conference on computer vision, 2014.
[62] Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In International Conference on Machine Learning, 2017.
[63] Xingxuan Zhang, Peng Cui, Renzhe Xu, Linjun Zhou, Yue He, and Zheyan Shen. Deep stable learning for duttt--dist generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021.
[64] Yu Zhang and Qiang Yang. A survey on multi-task learning. IEEE Transactions on Knowledge and Data Engineering, 2021.
[65] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2016.
14

---

A Appendix
A.1 Theoretical Proofs
Notations of Convolutional Operations. In our paper, we express convolution operation as Zu .. More explicitly, the formulation writes Zu aX,, Du, where is the convolutional operation. By converting convolutional kernel D. into a Toeplitz matrix, we can replace the convolution operation X, * D2 with matrix multiplication X,D We also modify by Ihw X where X is Kronecker product, to enable the matrix multiplication aXpDD..
Proposition A.1. Suppose Du and D are two different sets of filter atoms for a convolutional layer with the common atom coefficients a, Zus Zn with atom changes,
upper bound the changes the corresponding features
Z Zz s ([|a|]]A) |[D,, - DD))lE,, with À sup BEB
|X F,No
(8)
Proof. Recall the decomposed convolution can be expressed as,
Z Σ a D(.
(9)
vb we have,
(b) - (b)l = Σ
a X D.. (..(i))
Σ a2 (x,), 1=1
i=1
(10)
$ ||||||
[X, (Dul1
D. 12/1/2.
By Cauchy-Schwarz inequuual inequality,
(X, (Duld) - -D.I)) < F.N, [|Du[ D.iilleN
(11)
$ A D D.fille
we have that
Σ (b) Z.) > ||1| Σ
(X. (D.l - -D.M
BEB
s 1|aa!1? Σ
X 1... |ID. D.MDI..N
(12)
< (|@(1=2)² 2)² Σ
(Da.ii D. D.
b,
and observe that
EI( D.D
ΣΣ
[D
D. -I(,, D.)
(13)
BEB
where [B] is the area of the domain of Then Eq. 12 becomes
Σ (b) (b) < (||a x> 2 B IID, - D.)
(14)
h
which proves that IZ,,, 2. S (Ila]) (ID,, -D.)IlF as claimed.
Proposition A.2. Assume filter atoms D,,, D, orthogonal matrices, then Scras S Atom.
15

---

Proof. Since Du: Dr E RR xm are orthogonal matrices, i.e. D. = D. = I, the Grassmann
similarity can be represented as,
1
cos 1 Σ 4.
SGrae Fo)
(15)
where o; Ei,, UEV D,
SAoo is defined as,
vec(Du), ree(Dx))
S Atom Fo) cos(Da; D.) (wve(DD)lla | ||vec(Do)ll=
(16)
Analyze each part separately, we have < vec(Du), vec(Dr)) >= Dr.D E, o, Ivee(DD)]l D.) = VTr(I) = vm, and also ||vee(D))]lF vm. In total.
the filter subspace similarity becomes,
Stom (FuFFF) cos(Da; D.) E
(17)
m
which equals SGras- The claimed theorem is proved.
Lemma A.3. For two positive semidefinite matrices A,
Tr (AB 2 minn (A)Tr(B),
(18)
where min denotes the minimum eigenvalue of A.
Proof. It is equivalent to prove that,
Tr((A 5 mmnn (A)I)B) 2 0.
(19)
Let D be matrices such that A- - miin (A)I = CTC, B = D'D, then
Tr((A Tmin ()) Tr(CTCDDD)
=TT(CD"DCT)) =T(((CC))(CC') 2 0.
(20)
Theorem A.4. Suppose the forward of decomposed convolution layer for the u-th model is Z, aXD,, Zu Z, nearly have zero-mean since X, is preprocessed to be normalized. CCA coefficient
is defined as S(Z.. Z,) = V E; of where of denotes the i-th eigenvalue of Au,o = Qu TQ. Qu Zn, (ZTZ.)) 3. Then S(Zin, Zo)) is upper bounded,
e²T cos (os(D.. Dz),
S(Zu, 5
S
(21)
where T TT((XTTaXXxx mmin
Omi (TxxTaX).
Proof. Consider S2 = - of
1 -T. )
52
(22)
1=1
where
Tr(Au,
TIQ.QQQ.0)))
(23)
16

---

As defined above, we have
= = Z. (, - (Z. Z
(24)
Q. Z. (Z.Z.)) - #ZI (ZTZZ))
Then Equation 23 becomes,
(25)
-T((ZZZZ.) )ZZZ.
By Inequality,
Ar S (((21
(26)
Then we analyze these terms individually,
Tr(Z,Z.) = - TxX ST. Tr(D,,,)
(27)
As for Tr Tr -) let '₁ A2 .... de be eigenvalues for ZTZ,, listed in descending order (A1 Z d2 2 2 Ac), and assume the condition number of ZTZ,, and ZTZ, satisfy Xmaz/ / Amin S then,
c
Tr((ZTZ.)-))
(28)
where A = /2.2./12. || ll2 denotes the operator norm induced by the vector L2-norm. With the norm inequalities of any positive semidefinite matrix A,
1 ||A||= ||A||2 2 Ve
1 ||A|| 2 TAA),
2
(29)
where ||- ||rr11 || ||- denote the Frobenius norm and the nuclear norm, respectively.
Equation (30 then becomes,
yC²
Tr((ZZZ)))) < IZZZZul2 Tr(Z.Zu)
(30)
By Lemma A.3
Tr(Z,Z,)) Tr(D(X
TT(XTTa
mmin (XT a (
(31)
2 C. Tr(D.D.)
2 C. [|vec(DD.))
where vea(-) denotes vectorization a matrix.
Then Equation 30 is further derived as,
762
Tr((ZZZ.)~1) < C. (Ieeee
(32)
Similarly, we have
7a2
Tr((Z(Z.)-)) < C C-I)eec(D,))1
(33)
17

---

Finally, with Tr(D,D.) =< vec(Da), vec(D.) >, we have
Td vcc(DD.,, vec(D.)) >)
Tr(
Ca (eI 1 [[vec(D,) DD)
(34)
Tc
cos" (D.,
C²
and thus,
S(Zu, 2.)
V Tr(Au,
(35)
T
cos Dw. D.).
C
Then the claimed theorem is proved.
Lemma A.S. For two malrices A, B, their frobenius norm satisfies,
V
A
AB F ||
B Bl
1
(36)
| B
where A = Ei 4 By sin? ((Ar, B.))).
Proof. According to the definition of frobenius norm ||]| Eis |
we have,
AB
Σ Ait
(37)
vt) Note that xxyi) xI sin² ((z, 3)), where (z, y) is the angle of two vectors and y. We have,
cos2 ((x, v))
E v8)
E, < vi)
Ask B2g)²
1
k
B
A |
B
sin ((Ar:, B.j))
h
b
k
h
Eis Ex A ) (E, B22))
sin" ((Ars Ba)))
Σ
A2
B2
1
(38)
Eit A3t Ekz
B2
Eij <) B2, sin² ((Azs B,y))
=||A||
B P
1
| BI2
A
=||A|| B
|A BI
where AG. is the i-th row of A and Bij is the j-th column of B, A E. ALW BBJ) sin? ((A B.))). As Ag and By are more correlated, (Au.; B.g) + 0, thus, A & |
Lemma A.6.
| AA |F |
A 3/4
(39)
A 1
18

---

Proof. According to Lemma
A.5 we have.
| P 1 A
(40)
Thus,
|| 1 (14 A A 1M
(41)
||
where ALAYA (2 sin (((A4))): J:: (A))) As (Av and (A)(2) are more correlated, ((11/3 )as (A112))) - 0, thus, A 1AI/2 & |
Lemma A.7. For three matrices A, B, and C, their frobenius norm satisfiex,
4 + As | B BI
| = |A B BI
(42)
where A2 = 111 (E, (2) Cit) sinn ((Br. C.)) + E2
1R BB))
sin (AA Bai)) and A3
E Ex ( sin? ((A,. (BC).s)
EnS (AB) CH sin? (((AB) C.)i)
Proof. Based on Lemma A.5
we have.
A
AB
Σ
(AB)a)
Σ Cit) sin (((AB) Ci))
= B|
|C F
Σ A Σ
B
sin ((A Ba))
(43)
i
A
Σ
(AB)
Σ city
sin 2 (((AB):: C.y))
1f
Symmetrically, we also have,
ABC |
BC 2 A
Σ
P2
(BC) sin" ((Ar, (BC):))
A
B
B
Ci) sin" ((B:. C.y))
(44)
Σ
A
2C))
sin? 2 ((A (BC)-))
1/
Thus,
|BC 2
||
2
BI
B
-A
Σ
B Σ
Cit) sin? ((Bk:: C.y))
kj
BC))
sin ((As, (BC),)))
1 h:
(45)
+ A F
B
|C||
F
A2x Σ
B sin ((Ar, B.))
d
Σ
AB
C
sin 2 (((AB);; C.
=
=||A||
22
A3,
19

---

where A2 -111AA11/ Bx (E Cip) sin ((Bk: C,)) ||||| Eu(Ex (x & Bxi)
sin? (AA:: B:1)]] and As
E Ex (BC))
sin ((As: (BC):))
Eig (AB) (Z, CH2) sin (((AB);: Cg)) Therefore,
A As
|BC|| = ||
B |C||
(46)
B C
B
As A and B.,, By: and C.yy are more correlated, (Ag. Ba), (Bk. Cy), (A,, ((A))) C3y)
0, thus, 22 < ||A] B
|CC and As < || P B ICP..
Lemma A.8.
B
4 + As
|A 1/2 F/ KF (C²(1
|A1/2|| C1/21F
| 1/ B |C 1/
(47)
where (p(2) and (CL/))) are the condition number of A/2 and C/222 Kp (A
(( (((()T5) and Kr (r(()/2)= = ( मालाग::; (A are sin-
gular value of 2/2 and of (C)/2) are singular value of 122
Proof. Based on Lemma A.7 we have,
A + As B
A /C || 1
1/2 |
B
1/2
(48)
A
1/3
1/ ||
1/3
By the definition of condition number kx(X)=
|X||=|X-
B
A + A B
|| < (C4/2)
A
C1/2
|
1/2
CC 1/2
(49)
Theorem A.9. Suppose the forward of decomposed convolution layer for the u-th model is Zu aXD,,, CCA coefficient be S(Z., Z,) = v² V Ei= o7, where of denotes the i-th eigenvalue of Au.o Qu.Q.. Qu ZZ.Z... 1, Then S(Z., Zn) is approximately linear to filter subspace similarity,
S(Zu, Zn) = 717273 cos D.),
(50)
Ve
Proof. Based on S(Z,, Z,) / 1 De of and ||A = Din of where or are the singular
value An,
1
S
of
AlAuullF
Ve
(51)
According to Lemma,
A.8 we have
(Z.Z.)) 1 ZZZ. (Z.Z.)
7172
ZTZ. ||
(52)
Vc
[ZZZZ
20

---

where 71 (p )b) (Zp(( and 72 /1 [1222.)
4,44
1
As n. = aXD,, and Z, = aXD,,, by we have
7122
Z.Z |F
ve (Z ||| (Z)Z.)
(53)
7172
[DIXTaaaXD.Il
Ve
According to Lemma
A.6
71
|
Ve [DDXitatxXDD)
(54)
71723
|DXtataXDD.le
vc
[
where = (1+ (D.XTataXD..
4 (1
[D.XTaToXD..II]
As Assumption 2.6 holds, it becomes
7273
D[XTaTaXD.ll
Ve
[D w)ll ( [DIXTaTaXD
73
D XTataXX]
Ve
|D |
D |
(55)
71277
DDDDel
Ve
|
DDole
727273
cos D D.).
Ve
Thus, have
S(Z,, Z,) 717223 Vc
cos D,).
(56)
Specifically, have 7/2
Ti's DD) and since A are small, with Taylor expansion,
12 A= Tie (D. The term (D. causes non-lincarity in the relation between CCA and filter subspace similarity.
A.2 Experiment Settings
Model training of Federated Learning. In each experiment 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 0.9. Accuracies are computed by taking the average local accuracies for all users the final communication round. As shown in the Table 3 we have different settings for CIFAR-10 and CIFAR- 100. For example, (100, 2) means 100 clients with classes on each client. For each method, the training takes about 12 hours on Nvidia RTX A5000.
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 [2] and FedRep have the similar ideas by learning shared global representation and personalized local heads. Ditto 27 and FedProx [29] induce global regularization to improve the model performance. We also compare our method with
FedAvg (34). FedRep
[8] approaches the common knowledge with shared representation. The codes
21

---

Table 3: Compare accuracy with different approaches
CIFAR-100
CIFAR-10
(# client, classes per client)
(100, 5)
(100, 20)
(100.
(100, 5)
(1000, 2)
FedAvg
82.39
62.92
86.37
70.63
86.12
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
are adapted from We evaluate the test accuracy on CIFAR-10 and CIFAR-100 with different FL setting. As shown in Table our method achieves comparable performance among different methods.
Fine-tuming models for ensemble. We select 3 models with different similarity measures for ensemble. For feature-based similarity methods, we randomly select 1000 examples from CIFAR-100 dataset. The funneccon layer of each model is fine-tuned epochs. The fine-tuning takes about hours on Nvidia RTX A5000, After fine-tuning, the accuracy measured on local test data, with the predictions of current model and 3 selected models.
the user's local data with 100
A.3 Extra Experiments
Representation dependency on filter atoms. We first validate the dependency deep features on filter atoms in Proposition 2.1 with simple experiment. The model F here is 2-layer CNN with coefficient a and atom generated from normal distribution (0,, 1). The input sample X also generated from normal distribution (0,, 1). Figure g a) shows the relation between Zz, Z and |D, - -Dll by fixing coefficient a and input sample X and randomly varying filter atoms D. All the points are below the line which is the bound provided by Proposition 2.1 reflecting that the representation variations are dominated by filter atoms.
Correlation between probing-based and filter subspace-based methods. In addition, we em- pirically verify that CCA and filter subspace similarity have strong correlation with AlexNet. In this experiment, 10 tasks are generated from CIFARIÓ0 (33 with 10 classes in each task. Only the filter atoms of each task are trained while the atom coefficients are fixed. We calculate CCA and filter subspace similarity among 45 pairs of models. The correlation between CCA and filter subspace similarity is 0.8638 which is shown in Figure (b). Similarly, the correlation between CKA and filter subspace similarity is also reported in Figure (Table). These results clearly show that the proposed filter subspace similarity has high linear rel relationship with popular probing-basse similarities, which agrees with Theorem 2.5 and Theorem 2.7
/https://githun ctt.bb..commooolll. ins ins/FedRep
0.97
0.71
0.7
0.97
0.63
0.63
0.63
Figure 6: The shared coefficients and user-specific atoms represent common knowledge and personal- ized information. The filter subspace similarity used calculate the relations among users. Users with heterogeneous data result in lower similarity, as illustrated in similarity matrix.
22

---

(a) 10th epoch
(b) 50th epoch
(c) 90th epoch
Figure 7: Similarity matrices that show relations among 120 users in FL with our filter subspace similarity through the training process.
I| Z,Il, = (Al ( D Sp-Uper Bound
Correlation
47
06222
Linear Relationship
6.803
0.225
0.003
0.0650
|D Dylle
(a)
(b)
Figure 8: (a) The change of features || !z., Zullæ is bounded by the change of atoms Dulle (b) The channel decorrelation leads to higher correlation between CCA and filter subspace similarity. And the correlation can reach 0.985 with 3 x 10-3, which means near linear relation between CCA and filter subspace similarity.
Effect of channel decorrelation. We further design a regularization term 3 3 is (Z to
approach ZZ > (ZiZw)s in Assumption. 2.6 As shown in Figure B(b. the correlation between CCA and filter subspace similarity keeps increasing as increases. The correlation reaches 0.985 when / = 3 x 10-3, indicating near-linear relationship, which is aligned with Theorem. 2.7
Similar representations across datasets. Similar to 21 we can use filter subspace similarity to compare networks trained different datasets. In Figure T0]a), a), show that pairs of models that are both trained on CIFAR-10 and CIFAR-100 have high two datasets respectively still show high similarity. In contrast, similarities between trained and untrained models are significantly lower.
similarities. Models learned
Limitation of probing-based methods. probing-basee -baen similarities to probing data, perform simple regression task with data, {(z, 0, yr, 2,) | where 2, = =f fI y:) + E and yı, E, (N0..5,0.. 0.1). Two NN models Fi and F2
shown Figure T0(b), to illustrate sensitivity of
Conrelation: 0.8793
Correlation: 0.8638
Grassmam Similnnt
Correlation
CCA
43
0.8638
638
CKA PTI
0.7358
Grussmann Distance
35
0.8793
036
Atom-based Similarity
Atom-based Similarity
(a)
(b)
Figure 9: (a) Correlation between Grassmann similarity and filter subspace similarity; (b) Correlation between CCA and filter subspace similarity. (Table) Correlation between filter subspace similarity and other approaches.
23

---

Z
=
10 10 (v
Atom- cen--basedd Similarity
6.
F
10
044
CARRO0 CIFARIDO
GFARID CTARLO
Untraied
FAR100 Untrained
0.0
02
0.4
0.4
0.6
0.6
Layer Index
0.8
10
1.0
(a)
(b)
Figure 10: (a) Using filter subspace similarity, models trained on different datasets (CIFAR-10 and CIFAR-100) are similar among themselves, but they differ from untrained models.
(b) Illustration of limitations of mrbiing-bssen similarities. Input data from "red" (1 0, y)))) and "blue" (1 = ys, vf 0))) are orthogonal. Since two models are learned on "red" data, their similarity should be 1, which be faithfully indicated by our atom similarity. However, probing- based similarities will become O with the "blue" probing data.
0000
5.55
0853
085
(a) 1st conv
(b) 2nd conv
(c) 3rd conv
2.04
5.0%
125
A401
(d) 4th conv
(c) 5th conv
Figure 11: Similarity of AlexNet with atoms from different time point during the training.
with the same initialization and atom coefficients trained for their different atoms to learn F: (X, Y) > Z. It is can be simply found that the filter subspace similarity F1 and F2 is 1 and the probing- based similarity is also with the same {(z, O, y4)} the probing data. However, we choose {x/ = yts v = 0)} as the probing data, then the probing-base based similarities directly become 0 as the data
orthogonal to model parameters.
A.4 Training dynamics.
We investigate the training dynamics of AlexNet 24 and VGG (50 separately on CIFAR-100 23 and ImageNet [47). The details of training dynamics of models with atoms from different time point during the training are shown in Figure II and Figure 12, Moreover, we 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 B and Figure [4] The difference is less on the first few layers, but more the middle layers. It reflects the middle layer is more critical than other layers, which is aligned with previous work 39
24

---

now
nom
cm
(a) 1st
(b) 2nd
3rd conv
4th
cm
(e) 5th
(f) 6th
(g) 7th
(h) 8th
Figure 12: Similarity of VGG with atoms from different time point during the training.
120 100
100
140
(a) Model 0 vs.
(b) Model vs. 2
(c) Model vs. 3
4.5
(d) Model 0 vs.
(e) Model vs.
(f) Model vs.
3.50
1.50
1.5
382
200
(g) Model 0 7
Model O vs.
(i) Model 0 vs.
Figure 13: Similarity AlexNet trained different tasks during the training.
25

---

11
625
350
125
354
384
(a) Model 0 vs.
(h) Model 2
(c) Model
(d) Model 0 vs.
(c) Model vs. 5
(f) Model 0 vs. 6
060
1pe
212
MACIS
124 100
12.4
324
(g) Model 0 vs. 7 Figure 14; Similarity of VGG trained on different tasks during the training.
(h) Model O vs.
(i) Model 0 vs. 9
26


Reviews:
[{"review_id": "HgYJrPjE9y", "reviewer": "Reviewer_8het", "summary": "This paper proposes an approach for evaluating neural network similarity by decomposing convolution layer into linear combination of atom filters. The basic idea derives from [33] and the paper extend the approach for continual learning (CL), to federated learning (FL). The paper provides both empirical and theorical evidence and shows the time-efficiency of the proposed method. However, the application scenarios are relatively limited. ", "questions": "Q1. In the experiment, CKA and CCA compute which layer computation? How does the proposed method consider merging the result of different layers? By concatenation or summation? This paper only discusses the case of single-layer convolution. \n\nQ2. What’s the essential difference between the proposed method and directly computing the cosine similarity and inner product of parameters?\n", "limitations": "NA", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "S1. The paper extends [33], which is originally oriented for continual learning (CL), to federated learning (FL), and compares with CCA and CKA.\n\nS2. In limited cases, the proposed method is more efficient than feature-based similarity evaluation (e.g., CCA [40] and CKA [19])\n\nS3. In limited cases, the proposed method can achieve more accurate similarity evaluation and can provide theoretical justifications. \n", "weaknesses": "W1. The proposed method has strong restrictions in limited cases.\nW1.1 The proposed method is restricted to only convolutional layers, and it further needs different neural networks using the same atom coefficients. That means the proposed method is hard to be used in the similarity evaluation of common neural networks.\n\nW1.2 The proposed method is restricted to cases where the model architecture must be identical and the model parameters much be similar. For example, in Fig. 2 (Correlation between filter subspace similarity and other approaches), all the three methods achieve a high estimated similarity up to 0.9. What about the cases of lower similarity? The author should present more results for the lower estimated similarity. Thus, it’s unclear whether the proposed method is as flexible as the baselines CCA and CKA, which can be used to compare neural networks with different depths or trained by different datasets. Whether the proposed method can only be used in FL and CL, where the models as well as the parameters are inherently similar? \n\nW1.3 The theoretical evidence in this paper is limited to single-layer convolution, particularly, without nonlinearity. Proposition 2.4 (line 152) is restricted to orthogonal matrices and the case of k^2 =m.  \n\nW2 In FL/CL, the proposed method is time-efficient, but that time is not a severe bottleneck in FL/CL. Furthermore, by nature, the proposed method vectorizes the model parameters and computes the similarities of vectors, which are widely used in multi-task learning. \n\nW3. The proposed method has already been proposed in [33]. \n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thanks for your constructive comments. We address all your concerns in the following.\n\n**W1.1** The proposed method is restricted to only convolutional layers, and it needs different NNs using the same atom coefficients. \n\n**A:** Although our method focuses on convolutional filter subspace, it can also be easily extended to other types of layers, e.g., linear layers. As explained in our general response **GR1**, our approach can be effectively extended to **transformer-based models** in continual learning experiments while still maintaining a strong correlation with CCA/CKA. \n\nWe also would like to state that fixing a large number of parameters of a pretrained model while finetuning a small portion is a common paradigm in the field of modeling visual knowledge, e.g., images. The shared parameters $A_i$ can be viewed as the fixed part of a model pretrained on a significant amount of data, and the $B_i$ is a set of a small number of parameters tuned to fit downstream tasks. In other words, we can potentially obtain pretrained atom coefficients on large datasets and finetuning multiple models on downstream tasks for better performances. Therefore, we argue that, although a new filter subspace view to NN is adopted in the paper, sharing atom coefficients across models does not deviate from the above common paradigm, and poses no major limitation.\n\n**W1.2** The author should present more results for the lower estimated similarity.\nWhether the proposed method can only be used in FL and CL, where the models as well as the parameters are inherently similar?\n\n**A:** Our method also applies to lower-similarity cases. We conduct an additional experiment to show the correlation between our method and CCA/CKA in low-similarity cases. In our experiment, we train neural networks on two distinct datasets, Oxford Flower and Food-101. For each dataset, we trained 10 models and computed the similarity between models trained on different datasets. The results show a low similarity range of [0.4, 0.5]. In this case, our similarity measure still exhibits a consistently high correlation with CCA/CKA, as shown in Figure 2 in the attached PDF of our general response.\n\n|         | Correlation |\n|---------|:------:|\n| CCA     |  0.9231  |\n| CKA     |  0.9178  |\n\nWhen considering the network architecture, it is important to highlight the increasing popularity of the pretraining-finetuning paradigm today, as discussed above, where the network structure remains consistent. In our framework, we have pretrained atom coefficients and fine-tuned the filter atoms with various architectures, demonstrating the versatility of our method, which can be applied not only to FL and CL but also to this commonly used setting.\n\n**W1.3** The theoretical evidence in this paper is limited to single-layer convolution without nonlinearity. Proposition 2.4 is restricted to orthogonal matrices and the case of k^2 =m.\n\n**A:** In Proposition 2.4, $D_u, D_v$ are not required to be square matrices. As shown in line 502 in the Appendix, by saying 'orthogonal matrices' we actually assume atoms matrices satisfy $D_u^T D_u=I$, i.e. their columns are orthonormal. We will revise it to 'Assume $D_u, D_v$ satisfy $D_u^T D_u=D_v^T D_v=I$' in Proposition 2.4 for clarification. Note that orthonormality makes equality happen in Proposition 2.4, a strong correlation can still be observed without the orthonormality requirement as shown in Figure 2 Table.\n\nWe can extend our analysis to a non-linear layer with approximation to the non-linearity. Consider the non-linear layer, $Z=\\sigma(\\alpha X D)$, we can approximate it with two linear terms as $Z=\\alpha X D + \\alpha X' D=\\alpha \\tilde{X} D$, where $X'=\\alpha^{+}(\\sigma(\\alpha X D) - \\alpha X D) D^+$, $\\alpha^{+}, D^+$ denote psuedoinverses of $\\alpha, D$. For the derivation of Theorem 1 and 2, we can simply replace $X$ with $\\tilde{X}$ and the rest remains the same. In this way, our main theoretical results still hold.\n\nFinally, we simplify our analysis with a single-layer setting, yet it can be easily extended to multi-layer.\n\n**W2** In FL/CL, the proposed method is time-efficient, but...\n\n**A:** It is infeasible to directly assess network similarities by vectorizing their weights and computing the inner product, since a permutation matrix is required for alignment [1]. Our method leverages the decomposition structure and can directly evaluate network similarities with filter atom inner-products.\n\nOur method is not restricted to FL/ CL tasks. We only adopt FL/ CL to demonstrate our method in multi-model scenarios. In a large multi-model system where there are frequent needs to compare similarities for, e.g., deciding whether to train a new model or reuse an old one given a new task, the proposed method can dramatically reduce the latency and costs of model comparisons.\n\n**W3** The proposed method has already been proposed in [33].\n\n**A:** [33] proposes to use the Grassmann distance of filter atoms to assess network similarity as a heuristic approach with **no theoretical justification**. In this work, we simplify the atom-based similarity to inner-product computation and provide both theoretical and empirical results to demonstrate its equivalence with popular feature-based similarities CCA/CKA.\n\n**Q1.** How does the proposed method consider merging the result of different layers? \n\n**A:** As we explained in line 147-148, we simply average layer-wise similarities for the network-wise similarity.\n\n**Q2.** What’s the essential difference between the proposed method and directly computing the cosine similarity and inner product of parameters?\n\n**A:** As explained in our general response **GR2**, there is a substantially low correlation between CCA/CKA and the weight inner-product, suggesting that directly using the inner product of parameters is unlikely to effectively measure model similarity. \n\nReference:\n1. Ainsworth, Samuel, et al. \"Git Re-Basin: Merging Models modulo Permutation Symmetries.\" ICLR. 2022."}, {"review_id": "LGEZZOIJvo", "reviewer": "Reviewer_naiq", "summary": "This paper presents a new approach for measuring the similarity between neural network models based on a new efficient metric defined layer-wise on filter atoms. \nIn particular, the metric is defined as the cosine similarity between this filter atoms that can be implemented as the normalised inner product of the filter atom vectors.\nIt is shown that 1) the probing-based similarity CCA is upper-bounded by the proposed metric up to a scaling factor, where both CCA and the factor are data dependant, and 2) under the assumption that the features in a layer have low correlation, there is an approximately linear relation between CCA and the proposed metric. \nExperimental results show that the proposed approach can be effectively used to study the learning dynamics of deep neural networks. The method has been further applied to Personalized Federated Learning and Continual Learning and improves the results over CCA and CKA similarity metrics. \n", "questions": "- In the experiments, the overall similarity between two neural networks is computed as the average over the layer-wise similarities. However, intuitively not all layers are equally important for a given task. Would it make sense to use different weights for different layers (i.e. a weighted average)? Would that change the overall results?\n", "limitations": "See weaknesses.", "rating": 7, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "- An original theoretically-grounded approach for measuring layer-wise similarity between two neural network models \n- Evaluation on different applications and good results", "weaknesses": "- Comparison only with CCA and CKA-based similarity metrics\n- Assumption 2.6. is quite strong. Although your empirical results seem to corroborate this assumption, in practice I believe there can be strong correlations between different features within a layer. \n- Only AlexNet and VGG are used (a part from the experiment showing the correlation between Grassmann similarity and the proposed filter subspace similarity). It would have been interesting, if the proposed method also performs well for other models, e.g. ResNet models. \n\n\n\n\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your supportive comments.\n\n**W1:** Comparison only with CCA and CKA-based similarity metrics\n\n**A:** We want to claim that CCA and CKA are two representative feature-based network similarity measures that are adopted in many works [1,2,3]. Showing a strong linear correlation with CCA and CKA is significant for demonstrating the effectiveness of our method.\n\nReference:\n1. Raghu, Maithra, et al. \"Do vision transformers see like convolutional neural networks?.\" Advances in Neural Information Processing Systems, (2021).\n2. Neyshabur, Behnam, Hanie Sedghi, and Chiyuan Zhang. \"What is being transferred in transfer learning?.\" Advances in neural information processing systems, (2020).\n3. Yang, Xingyi, et al. \"Deep model reassembly.\" Advances in neural information processing systems, (2022).\n\n**W2:** Assumption 2.6. is quite strong. Although your empirical results seem to corroborate this assumption, in practice I believe there can be strong correlations between different features within a layer.\n\n**A:** As shown in the Appendix line 628-631, we further design a regularization loss to reduce the correlation between features, which improves the correlation between our method and CCA in Figure 8(b) and matches our theoretical findings.\n\n**W3:** Only AlexNet and VGG are used (apart from the experiment showing the correlation between Grassmann similarity and the proposed filter subspace similarity). It would have been interesting, if the proposed method also performs well for other models, e.g. ResNet models.\n\n**A:** As shown in Figure 2(b) and Figure 2 (Table), we show strong correlations between our method and CCA/ CKA with ResNet-18. Besides, we also show the effectiveness of our method with ViT in our general response **GR1**.\n\nFollowing the experimental setup in Section 3.4, we apply our method to continual learning with transformer-based models. The corresponding results are presented in the table below.\n\n|         | CIFAR100 | MFLOPs | Time (s) | GPU Memory (MB) |\n|---------|:------:|---------|:------:|---------|\n| ViT (base) |  75.17 $\\pm$ 0.21  | - | - | - |\n| +CCA     |  77.28 $\\pm$ 0.09 |  4.13 $\\times 10^7$  |  46.84  |  1181  |\n| +CKA     |  76.67 $\\pm$  0.13|  1.81 $\\times 10^5$  |  35.08  |  1209  |\n| +Ours     |  **78.16  $\\pm$ 0.05** | **0.015**   |  **0.35**  |  **0**  |\n\n\n**Q1:** In the experiments, the overall similarity between two neural networks is computed as the average over the layer-wise similarities. However, intuitively not all layers are equally important for a given task. Would it make sense to use different weights for different layers (i.e. a weighted average)? Would that change the overall results?\n\n**A:** We agree that there would be a more effective weighted scheme to aggregate layer-wise similarities. Since it is likely non-trivial to decide weights for different layers, we leave it for future study."}, {"review_id": "ifyhgh1tpA", "reviewer": "Reviewer_PBCY", "summary": "In their paper, the authors introduce a novel approach to significantly decrease the computational cost of representational similarity analysis in CNNs by transitioning it to filter subspace distance evaluation. Their proposed filter subspace-based similarity is both theoretically and empirically demonstrated to display a robust linear correlation with prevalent probing-based metrics.", "questions": "1.\tOn line 115, is m a hyperparameter? If yes, is the model performance sensitive to the selection of m?\n2.\tIn Figure 2b, it appears that the points located in the center are less correlated (or more distant from the diagonal blue line) than the points positioned at the ends. Could you explain why this might be?\n3.\tWith regard to Proposition 2.1, would the inequality become significantly looser if many extreme values exist in X?\n4.\tOn line 148, the proposed method suggests averaging layer-wise similarities for network-wise similarity. Is it possible that some layers might be more significant than others? For instance, should the final few layers carry more importance?\n5.\tThe paper [1] outlines certain limitations of CCA/CKA in Section 3, for example, randomly permuting the order of pixels (either at the input or in the latents) is an orthogonal transform, and thus does not affect the CKA. However, this destroys the spatial structure of the input, and intuitively should affect the “representation quality.”, does this apply to the proposed method?\n\n[1]Bansal, Yamini, Preetum Nakkiran, and Boaz Barak. \"Revisiting model stitching to compare neural representations.\" Advances in neural information processing systems 34 (2021): 225-236.\n", "limitations": "Authors do not discuss the limitation of their work. Based on the information presented, it does not appear that this work has any negative societal impacts.", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "1.\tThe approach offers significant improvements in efficiency and robustness.\n2.\tThe paper is very clear, especially the methodology part is clearly written and easy to understand.\n3.\tThe proposed method is simple, making it easy to implement.\n", "weaknesses": "1.\tCould you elaborate on how Assumption 2.6 is applicable to complex real-world datasets? It appears to be a strong assumption. For instance, consider a simple matrix $$\\begin{pmatrix}0 & 0\\\\\\ 1 & 0.9\\end{pmatrix}$$, the assumption does not hold true.\n2.\tNo obvious weakness in my mind now. \n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your supportive comments.\n\n**W1:** Could you elaborate on how Assumption 2.6 is applicable to complex real-world datasets? Consider a simple matrix $\\begin{pmatrix} 0 & 0 \\\\\\\\ 1 & 0.9 \\end{pmatrix}$, the assumption does not hold true.\n\n**A:** Our assumption states that different channels in the features are less correlated. In specific, every diagonal component in $Z_u^T Z_u \\in \\mathbb{R}^{c\\times c}$ represents the variances within each channel, and an off-diagonal element indicate the correlation between two channels. Therefore, the 2x2 matrix shown by the reviewer may not be valid in practice, as there is likely no 0 in the diagonal elements, and little chance to have two channels completely correlated.\n\nIn complex datasets, it may be hard to have features that satisfy the assumption directly. As shown in the Appendix line 628-631, we further propose a regularization term to reduce channel-wise correlation, which improves the correlation with CCA in Figure 8(b) and matches our theoretical findings.\n\n  \n\n**Q1:** On line 115, is m a hyperparameter? If yes, is the model performance sensitive to the selection of m?\n\n**A:** Yes, $m$ is a hyperparameter. In our paper, we choose $m=9$. The similarity of models remains robust across different choices of $m$. In this experiment, we follow the setting in Section 3.1. Specifically, we train 10 models separately on 10 sub-tasks of the CIFAR-100 dataset. In the table below, we present the correlation between CCA and the filter subspace similarity with different choices of $m$, the standard deviation of the correlations is only 0.0027.\n\n|   m   | 3 | 6 | 9 | 12 |\n|---------|:------:|---------|:------:|---------|\n| correlation w/ CCA    |  0.9313  | 0.9289  | 0.9327  | 0.9366  |\n\n\n\n**Q2:** In Figure 2b, it appears that the points located in the center are less correlated (or more distant from the diagonal blue line) than the points positioned at the ends. Could you explain why this might be?\n\n**A:** We hypothesize that when networks are more intrinsically dissimilar, the distance between atoms $D_u, D_v$ becomes larger, i.e., $\\text{cos}(D_u, D_v)$ becomes smaller. In this case, the linear correlation between our method and CCA would be slightly affected, as stated in line 195. Yet, we still show a reasonably strong correlation with CCA in both high-similarity and low-similarity cases. which is shown in the following table as the similarity is in the range [0.4, 0.5].\n\n|         | Correlation |\n|---------|:------:|\n| CCA     |  0.9231  |\n| CKA     |  0.9178  |\n\n\n\n**Q3:** With regard to Proposition 2.1, would the inequality become significantly looser if many extreme values exist in X?\n\n**A:** As we only consider real image datasets, the values in $X$ are normalized and bounded. Thus it is unlikely to have extreme values in it.\n\n\n\n**Q4:** On line 148, the proposed method suggests averaging layer-wise similarities for network-wise similarity. Is it possible that some layers might be more significant than others? For instance, should the final few layers carry more importance?\n\n**A:** Since different layers can carry different information, we agree that there would be a more effective weighted scheme to aggregate layer-wise similarities. Since it is likely non-trivial to decide weights for different layers, we leave it for future study.\n\n\n\n**Q5:** The paper [1] outlines certain limitations of CCA/CKA in Section 3, for example, randomly permuting the order of pixels (either at the input or in the latents) is an orthogonal transform, and thus does not affect the CKA. However, this destroys the spatial structure of the input, and intuitively should affect the “representation quality.”, does this apply to the proposed method?\n\n**A:** Our method is immune to those \"attacks\" on CCA/CKA as we don't rely on probing data to compute feature similarity. Our method focuses on the intrinsic similarity of models with inner-product of decomposed model parameters. It is agnostic to distortion on probing data. We show similar experiments as [1] in Figure 3(b), where CCA and CKA are severely affected by the choice of the probing data and our atom-based similarity remains robust."}, {"review_id": "WyrgCaFn25", "reviewer": "Reviewer_qnN8", "summary": "This paper studies neural network similarity which is an important problem in many areas such as federated learning and continue learning. In this paper, the authors develop a new method to reduce NN representational similarity to filter subspace distance. Moreover, they present the effectiveness and efficiency of their algorithms in theory and practice.", "questions": "1. Is it possible to extend this algorithm to other models? I am interested in why this method can be extended to transformer-based model.\n2. As for the experimental section, is it possible to add experimental results over CIFAR-10, SVHN, and ImageNet?", "limitations": "If the authors can solve the issues mentioned in the Questions, I am willing to improve the rate.", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. The problem studied in this paper is fundamental.\n2. The algorithm mentioned in this paper is simple and effective.\n3. The experimental results show that the method developed in this paper is effective.\n4. The authors present the effectiveness of algorithm in theory and practice.", "weaknesses": "1. The solution mentioned in this paper can be used for only CNNs.\n2. The experimental section can be improved.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your supportive comments.\n\n**Q1:** Is it possible to extend this algorithm to other models, such as transformer-based model?\n\n**A:** We can extend our method to other models, including transformer-based models. The proposed method relies on the decomposition of weight matrices, and sharing components with a substantial number of parameters among models while finetuning remaining parameter-efficient elements. This approach can thus be effectively applied to, for example, linear layers, major components of transformer-based models (Feedforward, Query, Key, and Value matrices). Specifically, by utilizing our proposed method in Section 2.2, we can decompose the weight of the linear layer $W \\in \\mathbb{R}^{c_{out} \\times c_{in}}$ into two components: $W = \\text{reshape}(\\alpha \\times D)$, where the atom coefficients are represented by $ \\alpha \\in \\mathbb{R}^{c'\\_{out} \\times c'\\_{in} \\times m} $, and the atoms by $D \\in \\mathbb{R}^{m \\times k \\times k}$, and $c_{out} = c'\\_{out} \\times k$ and $c_{in} = c'\\_{in} \\times k$. For instance, assume $k=4, m=9$, weight matrix $w \\in \\mathbb{R}^{256 \\times 64}$ is decomposed into $\\alpha \\in \\mathbb{R}^{64\\times 16\\times 9}$ and $D\\in \\mathbb{R}^{9\\times 4\\times 4}$. Moreover, we finetune $D$ while fixing $\\alpha$ when finetuning transformer models. Following the experimental setup in Section 3.4, we apply our method to continual learning with transformer-based models. The corresponding results are presented in the table below.\n\n|         | CIFAR100 | MFLOPs | Time (s) | GPU Memory (MB) |\n|---------|:------:|---------|:------:|---------|\n| ViT (base) |  75.17 $\\pm$ 0.21  | - | - | - |\n| +CCA     |  77.28 $\\pm$ 0.09 |  4.13 $\\times 10^7$  |  46.84  |  1181  |\n| +CKA     |  76.67 $\\pm$  0.13|  1.81 $\\times 10^5$  |  35.08  |  1209  |\n| +Ours     |  **78.16  $\\pm$ 0.05** | **0.015**   |  **0.35**  |  **0**  |\n\n\nOur method also exhibits a strong correlation with CCA/CKA in transformer-based models. The correlation between our method and CCA/CKA is shown in the table below, and Figure 1 (a)(b) in the attached PFD of the general response. Our experiment is built on top of the code [1].\n\n|         | Correlation |\n|---------|:------:|\n| CCA     |  0.9443  |\n| CKA     |  0.9079  |\n\nMoreover, by adopting the experimental setting outlined in Section 3.3, our method enables the measurement of task similarity using transformer-based models. In this specific experiment, we employed 100 models, and the CIFAR-100 dataset was divided into 20 subtasks, with each subtask containing 5 classes. Each subtask was shared by 5 models. As demonstrated in Figure 1 (c) in the attached PDF of the general response, every group of 5 models that share the same task shows a notably high similarity among themselves. The results indicate that our method can effectively measure the similarities of transformer-based models.\n\nOn the other hand, since the above decomposition equation remains the same form as the convolution considered in the paper, our theoretical results can also be extended to transformer models with linear layers. However, a rigorous application of our method to transformer-based models would require further study, which we leave for further study.\n\n\n**Q2:** Is it possible to add experimental results apart from CIFAR, SVHN, and ImageNet?\n\n**A:** We evaluate the performance of our method on three different datasets: CelebA[2], Oxford Flower[3], and Food-101[4]. The experimental setup remains consistent with the one described in Section 3.1 of the paper. As shown in the table below, our method consistently shows high correlations with CCA and CKA on three datasets.\n\n|         | CelebA [2] | Flower [3] | Food [4] |\n|---------|:------:|--------|:----:|\n| CCA     |  0.9014  | 0.9155 | 0.9901 |\n| CKA     |  0.8766  | 0.8831 | 0.9266 |\n\nReference:\n1. https://github.com/kentaroy47/vision-transformers-cifar10\n2. Liu, Ziwei and Luo, Ping and Wang, Xiaogang and Tang, Xiaoou. \"Deep Learning Face Attributes in the Wild.\" Proceedings of International Conference on Computer Vision (ICCV), 2015.\n3. Nilsback, M-E. and Zisserman, A. \"Automated flower classification over a large number of classes.\" Proceedings of the Indian Conference on Computer Vision, Graphics and Image Processing, 2008.\n4. Bossard, Lukas and Guillaumin, Matthieu and Van Gool, Luc. \"Food-101 -- Mining Discriminative Components with Random Forests.\" European Conference on Computer Vision, 2014."}]

Author rebuttal:
### General Responses
*We provide figures for the additional required experimental results in the attached PDF.*

**GR1: Extend our algorithm to transformer-based models.**

Although our method focuses on convolutional filter subspace due to the highly compact size of resulting filter subspace elements (atoms), it can also be easily extended to other types of layers, e.g., linear layers. In essence, our findings rely on: 1) weights $W_i$ are decomposed into two components, $W_i=A_i\times B_i$; 2) in a group of models, one component $B_i$ is fine-tuned while the other component $A_i$ remains fixed. For example, one can apply our method to transformer-based models with decomposed weight matrices in linear layers (Feedforward, Query, Key, and Value matrices). 
Specifically, by utilizing our proposed method in Section 2.2, we can decompose the weight of the linear layer $W \in \mathbb{R}^{c_{out} \times c_{in}}$ into two components: $W = \text{reshape}(\alpha \times D)$, where the atom coefficients are represented by $\alpha \in \mathbb{R}^{c'\_{out} \times c'\_{in} \times m}$, and the atoms by $D \in \mathbb{R}^{m \times k \times k}$, and $c_{out} = c'\_{out} \times k$ and $c_{in} = c'\_{in} \times k$. For instance, assume $k=4, m=9$, weight matrix $w \in \mathbb{R}^{256 \times 64}$ is decomposed into $\alpha \in \mathbb{R}^{64\times 16\times 9}$ and $D\in \mathbb{R}^{9\times 4\times 4}$. Moreover, we finetune $D$ while fixing $\alpha$ when finetuning transformer models.
Following the experimental setup in Section 3.4, we apply our method to continual learning with transformer-based models. As shown in the table below, our approach can be effectively extended to transformer-based models in continual learning experiments while still maintaining a strong correlation with CCA/CKA. 

|         | CIFAR100 | MFLOPs | Time (s) | GPU Memory (MB) |
|---------|:------:|---------|:------:|---------|
| ViT (base) |  75.17 $\pm$ 0.21  | - | - | - |
| +CCA     |  77.28 $\pm$ 0.09 |  4.13 $\times 10^7$  |  46.84  |  1181  |
| +CKA     |  76.67 $\pm$  0.13|  1.81 $\times 10^5$  |  35.08  |  1209  |
| +Ours     |  **78.16  $\pm$ 0.05** | **0.015**   |  **0.35**  |  **0**  |

|         | Correlation |
|---------|:------:|
| CCA     |  0.9443  |
| CKA     |  0.9079  |

Moreover, by adopting the experimental setting outlined in Section 3.3, our method enables the measurement of task similarity using transformer-based models. In this specific experiment, we employed 100 models, and the CIFAR-100 dataset was divided into 20 subtasks, with each subtask containing 5 classes. Each subtask was shared by 5 models. As demonstrated in Figure 1 (c) in the attached PDF, every group of 5 models that share the same task shows a notably high similarity among themselves. The results indicate that our method can effectively measure the similarities of transformer-based models.

On the other hand, since the above decomposition equation remains in the same form as the convolution considered in the paper, our theoretical results can also be extended to transformer models with linear layers. However, a rigorous application of our method to transformer-based models would require further study, which we leave for further study.

**GR2: The fundamental difference between our method and directly computing the cosine similarity or inner product of weight parameters.**

It is infeasible to directly assess network similarities by computing cosine similarity and inner product of parameters, since a permutation matrix is required for alignment [1]. Our method leverages the decomposition structure and can directly evaluate network similarities with filter atom inner-products.

Here we present an ablation study to show the correlation between CCA/ CKA with both the weight inner-product and our atom inner product. We adopt the same settings in Section 3.1. The table presented below demonstrates that there is a substantially low correlation between CCA/CKA and the weight inner-product, suggesting that directly using the inner product of parameters is unlikely to effectively measure model similarity. The results are also presented in Figure 3 in the attached PDF.

|         | Inner-product of weights | Inner-product of atoms |
|---------|:------:|:------:|
| Correlation w/ CCA     |  0.0803  | **0.9327** |
| Correlation w/ CKA     |  0.2924  | **0.9550** |

Reference:
1. Ainsworth, Samuel, et al. "Git Re-Basin: Merging Models modulo Permutation Symmetries." International Conference on Learning Representations. 2022.


Meta-review: This paper proposes a novel method for computing neural network similarity efficiently, which decomposes each filter into a linear combination of filter atoms, and then treats the coefficient similarity as the network similarity. The paper provides theory and also empirical results to verify the efficiency and effectiveness, compared with previous methods, such as CCA.
Decision: Accept (poster)