Differentiable Optimization of Similarity Scores Between Models and Brains
Authors: Nathan Cloos
Moufan Li
Markus Siegel
Scott L Brincat
Earl K Miller
Guangyu Robert Yang
Christopher J Cueva
Venue: ICLR 2025 Poster (2025)
Keywords: similarity measures
representational alignment
procrustes distance
centered kernel alignment
linear regression
Primary area: applications to neuroscience & cognitive science
TL;DR: Not all metrics for representational alignment are created equal; we show limitations in similarity metrics between models and brains by maximizing similarity with gradient descent.

Abstract: How do we know if two systems - biological or artificial - process information in a similar way? Similarity measures such as linear regression, Centered Kernel Alignment (CKA), Normalized Bures Similarity (NBS), and angular Procrustes distance, are often used to quantify this similarity. However, it is currently unclear what drives high similarity scores and even what constitutes a "good" score. Here, we introduce a novel tool to investigate these questions by differentiating through similarity measures to directly maximize the score. Surprisingly, we find that high similarity scores do not guarantee encoding task-relevant information in a manner consistent with neural data; and this is particularly acute for CKA and even some variations of cross-validated and regularized linear regression. We find no consistent threshold for a good similarity score - it depends on both the measure and the dataset. In addition, synthetic datasets optimized to maximize similarity scores initially learn the highest variance principal component of the target dataset, but some methods like angular Procrustes capture lower variance dimensions much earlier than methods like CKA. To shed light on this, we mathematically derive the sensitivity of CKA, angular Procrustes, and NBS to the variance of principal component dimensions, and explain the emphasis CKA places on high variance components. Finally, by jointly optimizing multiple similarity measures, we characterize their allowable ranges and reveal that some similarity measures are more constraining than others. While current measures offer a seemingly straightforward way to quantify the similarity between neural systems, our work underscores the need for careful interpretation. We hope the tools we developed will be used by practitioners to better understand current and future similarity measures.

Published as a conference paper at ICLR 2025
DIFFERENTIABLE OPTIMIZATION OF SIMILARITY SCORES BETWEEN MODELS AND BRAINS
Nathan Cloos'
Moufan Li
Markus Siegel Scott L. Brincat'
Earl K. Miller
Guangyu Robert Yang' Christopher J. Cueva
MIT NYU HHIHH Tübingen
nacloosêmin edu, ccueva@gma i coom
ABSTRACT
How do we know if two systems biological or artificial process information in a similar way? Similarity measures such as linear regression, Centered Kernel Alignment (CKA), Normalized Bures Similarity (NBS), and angular Procrustes distance, are often used to quantify this similarity. However, is currently unclear what drives high similarity scores and even what constitutes "good" score. Here, we introduce a novel tool to investigate these questions by differentiating through similarity measures directly maximize the score. Surprisingly, find that high similarity scores do not guarantee encoding task-relevant information in a manner consistent with neural data; and this is particularly acute for CKA and even some variations of cross cross-validatee validated and regularized linear regression. We find no consistent threshold for a good similarity score depends on both the measure and the dataset. In addition, synthetic datasets optimized to maximize similarity scores initially learn highest variance principal component of the target dataset, but some methods like angular Procrustes capture lower variance dimensions much earlier than methods like CKA. shed light on this, we mathematically derive the sensitivity of CKA, angular Procrustes, and NBS the variance of principal component dimensions, and explain the emphasis CKA places on high variance components. Finally, by jointly optimizing multiple similarity measures, we characterize their allowable ranges and reveal that some similarity measures are more constraining than others. While current measures offer seemingly straightforward way to quantify the similarity between neural systems, our work underscores the need for careful interpretation. We hope the tools we developed will be used by practitioners to better understand current and future similarity measures.
Project page
Code
Optimize dataset
Reference
Scores
Anguler Procrustes, Lineer Regreesion, CKA, Anguler CKA, NBS
+ others
datasets
Dots
Dots
Reaching
Texturo
Object
Yeur Y Xxoref Yo)
Mante
Slegel
Hatsopoulos
Freeman
Majaj
Figure I: (a) To better understand the properties of similarity measures we optimize synthetic datasets to become more similar to reference dataset, for example, neural recordings. (b) We analyzed similarity scores between artificial datasets and electrode recordings from five experiments on nonhuman primates spanning a diverse range of behaviors and brain regions.

---

Published as a conference paper at ICLR 2025
INTRODUCTION
Similarity measures have become cornerstone in evaluating representational alignment across different models (Kornblith et al., 2019), different biological systems (Kriegeskorte et al., 2008b), and across both artificial and biological systems. Researchers have employed diverse methods to compare model representations with, for example, brain activity, aiming to identify models that exhibit brain-like representations (Yamins al., 2014; Sussillo et al., 2015; Schrimpf al., 2018; Nayebi et al., 2018). However, while these measures are actively used and provide an efficient way to compare structure across complex systems,
not clear that they adequately represent the computational properties of interest, and there is need to better understand their limitations. Whenever we choose a similarity measure, we are making a commitment to what we care about in the two systems we comparing. Therefore, understanding what drives these similarity scores is crucial for understanding this commitment. The field lacks clear guidelines for interpreting similarity scores in given experimental context.
In this work we study several popular methods that have been proposed to quantify the similarity between models and neural data, in particular, linear regression (Yamins al., 2014; Schrimpf et al., 2018), Centered Kernel Alignment (CKA) (Kornblith et al., 2019), angular Procrustes distance (Williams et al., 2021; Ding et al., 2021). and Normalized Bures Similarity (NBS) (Tang et al., 2020). See appendix C. for a brief overview. We analyzed neural data from studies on nonhuman primates (Figure 1) and compared the neural responses task-optimized recurrent neural networks (RNNs), or synthetic datasets, with different similarity scores. In order to study what drives high similarity scores we directly optimize the synthetic datasets to maximize their similarity to the neural datasets as assessed by different similarity measures.
Disagreement between similarity measures. An example application of similarity measures is to quantify how brain-like models are. However, when we compare task-optimized RNNs to two neural datasets, as shown in Figure 2, we find that different similarity measures do not agree about which models more similar to the data, even about whether the models are more less similar than two baseline scores that compare modified versions of the neural data to the original neural data. Are most of the models generally performing well or not, i.e. achieving model-data similarities above one or both of these baseline scores? Different measures give different answers. These similarity measures lack consistency and do not present consensus interpretation. This is not irrelevant exercise as all of these similarity measures have been used in the literature to compare models to neural data.
Our main contributions and findings can be summarized as follows:
1. We show that good value for a similarity score varies depending the similarity measure and the dataset (Figure 3). Furthermore, we demonstrate that a high similarity score does not guarantee that models encode task-relevant information a manner consistent with neural data. This is particularly relevant for the many studies that rely on these similarity measures to quantitatively characterize the degree of alignment between models and brains.
2.
We identify what drives high similarity scores by differentiating through the similarity measures to directly maximize the score. We discover that different similarity measures differentially prioritize learning principal components of the data. For example, CKA, as opposed to angular Procrustes, may indicate a high score when many of the lower variance components are not captured, even when these dimensions carry crucial task-related information (Figures 4 and 5).
3. Through theoretical derivation we show the sensitivity of CKA, angular Procrustes, and Nor- malized Bures Similarity to the variance of principal component dimensions, and explain the dependence CKA shows to high variance components (section 4.3 and Figure 6)
4. We characterize the allowable range of scores between two different similarity measures by jointly optimizing their scores. Surprisingly, we reveal that a high angular Procrustes similarity implies a high CKA score, but not the converse (for the dataset shown in Figure 7).
5. Comparing similarity scores across studies is challenging, primarily due to variability in naming and implementation conventions. As part of our contribution to the research community we have created, and are continuing to develop, a Python package that benehmarks and standardizes similarity measures. Currently there are approximately 100 different similarity measures from 14 packages. Similarity package:
2

---

Published as a conference paper at ICLR 2025
Mante 2013
b
Siegel 2015
to VON
Cilennce
d
Angular Procrustes
Ridge Regression
Angular Procrustes
Ridge Regression CV
CIrAch For lonk
Score
02-
(ITT Holle
66-
LIT lood
02
02
C2
02
Figure 2: Different similarity measures do not agree on the relative rankings when comparing models to neural datasets. One example application of similarity measures to evaluate the similarity of task-optimizedd recurrent neural networks to neural datasets. We consider two neural datasets from (a) prefrontal cortex (PFC) (Mante et al., 2013) and (b) Frontal Eye Field (FEF) (Siegel et al., 2015) in monkeys performing an experimental task that required the animal to attend to either color or motion information while ignoring the non-cued feature of the stimuli. (c. d) RNNs with three different architectures, CTRNN, LowPassCTRNN, LSTM and three different nonlincarities, ReLU, ReTann, Tanh are compared to neural datasets (see appendix B for details).
2 RELATED WORK
Reviews. Recent reviews by Sucholutsky et al. (2024) and Klabunde et al. (2023) provide compre- hensive overviews of representational similarity measures and their theoretical properties. While these reviews highlight the diversity of available metrics, they offer limited practical guidance on interpreting similarity scores.
Our work addresses this gap by proposing general framework for evaluating similarity measures. By directly optimizing synthetic datasets to maximize their similarity to, for example, neural recordings, we can systematically investigate how different metrics prioritize various aspects of the data, such as specific principal components or task-relevant information. Similarity measures are often charac- terized by the invariance properties between representations with maximum similarity. In contrast, we focus on what drives intermediate similarity scores and how to interpret them, since we are often dealing with intermediate levels of similarity in practice when comparing models to brain data.
Mathematical properties. This work builds upon several important theoretical and empirical contributions. Korbliih et al. (2019) discussed the invariance properties of similarity measures and their implications for comparing neural representations. Williams et al. (2021) advocated for similarity measures that satisfy the axioms of metric distance. Harvey et al. (2023) established a duality between Normalized Bures Similarity (NBS) and Procrustes distance, shedding light on their mathematical relationship to CKA. We leverage these thcoretical insights to provide deeper interpretation of our empirical findings.
Comparison with functional measures. Our approach shares similarities with the work of Ding et al. (2021), who evaluated metrics based on their correlation with functional behavioral measures. They analyzed a collection of trained models and observed how variations the models, such as the removal of principal components, impacted both the similarity scores and the performance on task-specific probes. They identified that CKA exhibited sensitivity primarily to the top principal components, while orthogonal Procrustes demonstrated more robust performance.
However, our approach differs significantly in how we construct a diverse set of datasets with varying behavioral characteristies. Instead of relying on pre-trained models, we begin with unstructured noise and directly optimize it to maximize similarity to neural recordings. This allows us to address questions such as whether high similarity scores can be achieved without encoding task-relevant variables. Our optimization based approach reveals how different similarity measures guide the emergence of task-relevant information within the synthetic datasets, offering dynamic perspective
3

---

Published as a conference paper at ICLR 2025
their properties. Additionally, by leveraging optimization-basel perspective for multiple similarity measures we can find the allowable ranges of scores, and identify dependencies between similarity measures.
In contrast to the majority of previous work, our method is model-agnostic, focusing on the properties of similarity measures themselves rather than specifie model architectures. We demonstrate the generalizability of our findings by applying our framework to multiple neural datasets, revealing consistent patterns in how different metrics prioritize data features. Interestingly, we find that the optimization dynamics observed with neural data are closely predicted when using Gaussian datasets with matched variance distributions. This suggests that our insights extend beyond the specifics of individual neural datasets and reflect fundamental properties of the similarity measures themselves.
3 METHOD
3.1
MEASURING SIMILARITY
To evaluate the similarity of representations between two systems, we extract feature representations such as activity in brain area or model layer in response to some sample stimuli. Our objective is to quantify the alignment between these representations using a similarity score. Assume two datasets X and Y represent these features with dimensions (sample, feature) and mean-centered columns. Datasets with temporal dynamics are reshaped from (time, sample, feature) to (timelsappe,, feature). We define scoring function score(X,, (X,, Y) measure that increases with similarity, achieving maximum of when = Y.
We consider the following similarity measures (see appendix C.1 for details):
Centered Kernel Aligmment (CKA) measures the correlation between the kernels of two datasets X and Y (Kornblith et al., 2019). We consider here linear CKA where the kernels are XXT and YYT.
CKA(X,Y) = (vec(X X XXT), vec(YY?)) |XXT| ||
Angular CKA is a variant of CKA that satisfies the axioms of a distance metric (Williams et al., 2021; Lange et al., 2022). It defined as the arccosine of CKA. We additionally renormalize to have a value between 0 and 1, where I is perfect similarity.
Angular Procrustes finds the optimal orthogonal linear alignment between X and Y to maxi- mize their correlation (Williams et al., 2021; Ding al., 2021).
(X, QY) X |
min arccos
QEO
where O is the group of orthogonal linear transformations. Williams al. (2021) proposed taking the arccosine to satisfy the axioms of a distance metric. Here we rescale the angular Procrustes distance obtain scoring measure between 0 and where is perfect similarity.
Normalized Bures Similarity (NBS) (Tang et al., 2020) is the cosine of the angular Procrustes distance (Harvey et al., 2023). NBS is also closely related to CKA and mainly differs by a choice of matrix norm (see details in appendix C.I).
I|
NBS(X, Y)
VIIXX|I YYT
Ridge Regression finds the best linear mapping B that predicts a reference dataset from a dataset Y (Yamins al., 2014; Schrimpf et al., 2018). We measure the goodness of fit using Ri2 and use ridge regularization as well as 5-fold cross-validation that tests generalization across different experimental conditions. We use 100 by default and show results with varying in appendix A.
B" arg min
||X
Y BBB + A||B|r
B
X Y 13
R2
|
Linear Regression. Same as Ridge Regression but for À = 0 (unregularized).
4

---

Published as a conference paper at ICLR 2025
3.2 OPTIMIZING SIMILARITY SCORES
To better characterize similarity measures we optimize synthetic datasets Y to become more similar reference dataset X. We initialize the synthetic dataset Y by randomly sampling from standard Gaussian distribution with the same shape as X. We use Adam (Kingma & Ba, 2017) to optimize Y to maximize the similarity score with X, leveraging the differentiability of the similarity measures, and stop the optimization when the score reaches a fixed threshold near 1. Note that some similarity measures have parameters to optimize to compute the similarity score. Our method can be applied in such cases too, as long as the similarly score is differentiable with respect to the input datasets. For example, in the case of linear regression, we directly differentiate PyTorch" Istsq function.
As we optimize Y towards greater similarity with X, we simultaneously evaluate how well task- relevant variables can be linearly decoded from the evolving synthetic data. This decoding analysis employs logistic regression with stratified 5-fold cross tross-validation. For datasets with temporal dynam- ies, we fit a separate decoder for each time step and report the average accuracy across time.
We also evaluate how each principal component (PC) of the reference dataset X is captured Y is optimized for similarity. Specifically, for each PC v; of X, we use linear regression to find the optimal linear combination of columns of Y that best predicts Xe.. The goodness of fit is then quantified using the R² coefficient:
RPc. == 11x De,
||x;; 12
where X = YÉ and B argmin, ş ||X BB
4 RESULTS
4.1 WHAT CONSTITUTES A GOOD SIMILARITY SCORE DEPENDS ON THE SIMILARITY MEASURE AND THE DATASET
What is good value for similarity score? Our approach to address this question is to examine, across five neural datasets, the similarity score required for synthetic dataset to encode task relevant information to the same degree as the neural data. More specifically, the dots along the x-axis in Figure indicate the score when a decoder trained on the synthetic data can extract 90% of the full task relevant information present in the neural data. Consider the Mante 2013 dataset, and notice that the "good" scores for the six similarity measures are quite different, ranging from less than 0.5 to almost 1. So even for the same dataset, the similarity score required to encode task relevant information to a similar extent as the neural data, can be very different across similarity measures.
Now if we look across the five neural datasets, at single similarity measure, constitutes a good score varies depending not only on the similarity measure but also on the dataset. An angular Procrustes score above 0.5 may constitute good score for the Mante 2013 dataset but score above 0.8 is required for the Siegel 2015 dataset (see also Supplementary Figure S1).
that what
High similarity scores do not guarantee encoding of task relevant variables. A crucial point to make with Figure is that high similarity scores near the maximum value of 1, particularly for CKA and unregularized linear regression without pross-validation, do not guarantee that models encode task-relevant information in a manner consistent with neural data, i.c. the CKA and linear regression curves in the Siegel 2015 dataset do not approach the horizontal line showing the decode accuracy for the neural data. There may be important features in dataset that are not captured by model even when the model-data similarity score is high.
For linear regression, even cross-validated and regularized, a high similarity score does not nec- essarily mean that the task relevant information is encoded in a similar manner to the neural data (Supplementary Figure 52).
Surprisingly, in Figure some optimized datasets encode task relevant information better than the original neural data (colored lines showing decode accuracy are above the horizontal dashed line). This might suggest that the optimized datasets are denoised versions of the original data. We tested this hypothesis by removing low-variance principal components from the neural dataset. but this did not change the results. This suggests it is probably a more complex form of denoising and would require further investigation (Supplementary Figure S3).
5

---

Published as a conference paper at ICLR 2025
Mante 2013
Siegel 2015
Hatsopoulos 2007
MajajHong 2015
FreemanZlemba 2013
geoulig
CA
Optniind
Optinkedd
Openizod scors
Figure 3: dataset. Decode accuracy for experimental variables versus similarity scores. The experimental variables are color vs motion contexts (binary variable) for Mante 2013 and Siegel 2015, reaching direction (total of 8 directions) for Hatsopoulos 2007, object categories (total of 8 categories) for MajajHong 2015, and texture vs noise categories (binary variable) for FreemanZiemba 2013. Horizontal dashed lines show the decode accuracy from the neural data (upper line) and chance level (lower line). Colored dots above the x-axis indicate the similarity scores when the decode accuracy reaches 90% midway between chance level and the decode accuracy from the reference neural dataset.
What constitutes good score varies depending on the similarity measure and the
4.2
OPTIMIZATION DYNAMICS OF SIMILARITY SCORES
4.2.1
LOW-DIMENSIONAL SYNTHETIC DATASETS
Question. How much of the neural data must be captured by synthetic dataset model before the decode accuracy reaches the level seen in the neural dataset itself? One perspective on this question is to decode the task variables from neural data after projecting onto principal components I through N, where principal component I captures the most variance. As we might expect, in order to capture all the information about the task variables, at least several principal components must be included in the decode (Figures Sic and S1d show an example of this analysis for two of the neural datasets). This motivates the following hypothesis.
Hypothesis. Perhaps the reason that some variations of linear regression and CKA similarity scores can be high while the synthetic data fails encode task variables is because these similarity measures preferentially rely on the top few principal components. In other words, if these measures only encode information from the top principal components then this may not be sufficient encode all the task variables. We explore this hypothesis in the following set of analyses with a synthetic dataset based on the neural recordings from Mante et al. 2013.
Figure 4a shows the reference dataset (compare to Figure 2a). We can think of this reference dataset as a low-dimensional neural trajectory summarizing the population activity of many neurons, or alternatively, as the firing rates of two neurons over time (shown here encoding the two task variables of choice and dot motion coherence), recorded during six different experimental conditions, with the color in Figure 4a denoting the condition. Figure 4b shows the transformation of an initially random Gaussian noise dataset as is optimized to maximize either the angular Procrustes or CKA similarity score with respect the reference dataset. The score increases from initial value near 0 to maximum near 1 as optimization progresses, with the insets at the top of the figure showing the optimized noise dataset at various points during this procedure. The yellow curve shows how well the optimized dataset captures the first principal component of the reference dataset, as quantified by R² throughout optimization (see section 3.2 for details). Notice that the second principal component, shown in purple, is only captured at a much higher optimization score for CKA versus angular Procrustes. Figure 4c shows the same results when synthetic Gaussian noise dataset optimized towards the reference dataset using either linear regression similarity or angular CKA similarity (Williams et al., 2021).
Dependence on the variance distribution. The optimization dynamics not only depend on the similarity measure but also on the variance distribution of the reference dataset. Figure 4d shows four reference datasets with the same variance along the first principal component but decreasing variance along the second. If both dimensions have approximately equal variance then angular Procrustes, CKA, and linear regression will learn both dimensions similarly during optimization shown by the white curve in Figure 4e. The curves are colored to indicate the fraction of variance the second principal component has relative to the first, so 1 indicates both principal components have the same

---

Published as a conference paper at ICLR 2025
a
b
Angular
C
Ridge Regression CV
Reference datasel
Captured veriance
Goussian
Captured varianoe
Out vedion
0.75
chikke
0.50
Might
0.00
6 conditions
Optimized
0.4
88
0.5
0.0
0.
Oplimized
0.4
0.6
0.8
0.0
Optimized
d
Angular Procrustes
Ridge Regression
PC2
Reference dataset
Captured variance
PC1
nnn
PC2
52
Decrease variance of PC2
Oplimized score
Figure 4: Different similarity measures differentially prioritize learning principal components of the data. (a) Reference dataset used as a target during optimization. (b, c) Initial Gaussian random noise data is updated to maximize similarity with the reference dataset, quantified by of the similarity measures. The transformation of the random noise dataset is shown at the top of panel The first principal component of the reference dataset is increasingly well captured by the optimized data as the similarity scores increase (yellow curves). The second, lower variance, component also learned when maximizing the angular Procrustes similarity but is only captured at high similarity scores when maximizing linear regression, CKA, and angular CKA similarity. (d) Four reference datasets with decreasing variance along the second principal component. (e) Similarity measures capture both principal components when their variance is approximately equal. However, when the variance differs, CKA and linear regression preferentially neglect the low variance component (curves colored according to asymmetry of variance distribution).
variance. As the asymmetry between the principal components grows, the optimization to maximize angular Procrustes similarity still effectively learns the lower variance principal component (first column, second row), while CKA and linear regression not capture the second principal component of the reference dataset until much later during optimization.
4.2.2 NEURAL DATASETS
The optimization dynamics revealed in Figure 4a for a two-dimensional dataset also holds on real neural data (B. We now consider several neural datasets the reference dataset for the optimization procedure. Figure 5a shows the optimization dynamics when a random noise Gaussian dataset is optimized towards the Siegel et 2015 dataset by maximizing angular Procrustes similarity (top) or CKA similarity (bottom). Each curve shows how the optimized dataset captures single principal component of the reference dataset during the course of optimization; the yellow curve shows the highest variance component. Similar to the results in Figure 4, optimizing for angular Procrustes similarity, as opposed CKA, captures more of the lower variance components the data for given similarity score.
convenient way of summarizing these curves is note the similarity score required capture given principal component above some threshold. The PC threshold is defined here (and shown in Figure 5a for PC 1) as the centerpoint between the maximum and initial S?2 value for given principal component. Figure 5b shows the score required to reach the principal component threshold for the different principal components in the Mante et al. 2013 dataset. Figures 5c and 5d show the same curves when the reference datasets are the electrode recordings from Siegel et al. 2015 and Majaj et al. 2015. Figures 5b, 5c, and 5d additionally show that the metric version of CKA (angular CKA) increases CKA's sensitivity lower variance components.
7

---

Published as a conference paper at ICLR 2025
Angular Procrustes
b
Mante 2013
Siegel 2015
Refieencce dilbest captured verennce (R2
1.0
0.-
PC1
Scote to reach PC threshold
0.5
0.8
0.6
0.6
0.4
0.6
0.
1.0
OKA
10Th
10
10
1.0
CKA
Pg)
0.4
Anguar Procrates
MajejHong 2015
0.2
NBS
0.8
Heggesson CV
0.5
0.0
10a
10"h
10-
10
0.75
1.00
Variance explained by each PC
10th
15-d
Optimized score
Variance explained by each PC
Angular Procrustes
NBS
Angular CKA
CKA
Ridge Regression CV
Mante 2013
Mutcred Caussion
1.00
1.0
2.-
Nak usi cotnont
0.75
Score Sooreior rorehh traatee
2.-
0.0
0.50
0.50
0.5
0.25
0.0
10
10-7
10-2
10"1
201
20a
10%
Siegel 2015
20-
1.0
1.40
1.00
1.0
0.5
0.75
0.50
0.35
10 12
30
10
Variance explained by each PC
Figure 5: (a) A randomly initialized synthetic dataset is updated to maximize the similarity with a neural dataset, taken here be the FEF dataset from (Siegel et al., 2015). The principal components (PCs) of this reference dataset are captured by the optimized dataset at different similarity scores, which subsequent figures we call the score to reach the PC threshold. (b) The score to reach the PC threshold for the (Mante et al., 2013) dataset is shown by each PC. The highest variance PC is learned first during optimization at the lowest similarity score (bottom right of figure). A vertical slice through the figure shows the similarity score required to capture a specific PC. For example, to capture the PC at 10 requires a much lower similarity score when maximizing angular Procrustes versus CKA (light blue curve is below the red curve). (c, d) The reference dataset used as a target during optimization is the neural activity from (Siegel et al., 2015) FEF (panel c) and (Majaj et al., 2015) (panel d). (e) The neural data points the same in panels c and d (colored dots). The similarity scores at which PCs of this neural activity are learned, well predicted by replacing neural activity with random Gaussian datasets that have matching distribution of variances for each PC (black curves).
function of the variance explained
Neural curves predicted by matched Gaussians. Surprisingly, the optimization dynamics shown in these figures are well matched when the reference neural dataset is replaced by new reference dataset that consists of random Gaussian numbers with variances for each principal component matched to the neural data (Figure 5e). The variance distribution of the reference dataset strongly determines when each principal component is captured during optimization.
4.3 THEORETICAL ANALYSIS OF CKA AND ANGULAR PROCRUSTES
We aim to understand the increased sensitivity of CKA scores to high variance principal components compared to angular Procrustes. Following Harvey et al. (2023), we use the Normalized Bures Similarity (NBS) metric as an intermediary metric between CKA and angular Procrustes. Specifically, we study the sensitivity to dimensions of different variances by analyzing the similarity scores between a neural dataset and a modified version of the same dataset when a single principal component (PC) is perturbed (Figure 6). We "perturb" single PC of the neural dataset by first decomposing the dataset into its projections onto every PC and then replacing a single one of these projections by Gaussian random noise that is rescaled so the variance is unchanged.
8

---

Published as a conference paper at ICLR 2025
From NBS to CKA. NBS and CKA mainly differ by choice of matrix norm shown in the following formulation (Harvey et al., 2023) (see appendix C.I for details):
I
IXTY|L
CKA(X, |XX |YYT|F
NBS(X,Y) VIXXIIIXXYX)
NBS quantifies similarity using the nuclear norm, which involves a sum of singular values, whereas CKA uses the Frobenious norm, which sums the square of the singular values. The additional square operation in CKA significantly increases the contribution of large variance components. We show this in theory by considering how CKA and NBS change when perturbing a single principal component of the data. The result is that CKA depends quadratically on the variance of the perturbed principal component, whereas NBS has linear dependence (see proof in appendix C.2).
(x)x(Ax) E,(}))
Σitr
CKA(X, Xx)
NBS(X, XA)
Σ
where Xg is equal to X where only the 1tth principal component is modified, and Xxx are the eigenvalues of XXT.
We validate these results empirically by computing CKA and NBS scores between five different neural datasets and versions of these datasets when a single principal component is perturbed (see colored dots in Figure 6). As predicted by the theory, the NBS and CKA scores are well matched by, respectively, linear and quadratic function of the variance of the perturbed PC (see orange and blue curves).
From angular Procrustes to NBS. Harvey et al. (2023) showed that angular Procrustes related to Normalized Bures Similarity (NBS) (Tang et al., 2020) by the arccosine function. We additionally normalize the angular Procrustes distance to obtain a score version, where I corresponds to perfect similarity.
AngularPreeuustesSconee/ X, Y) = - NNBcos
* 2/n
The arccosine function decreases linearly around 0 with slope of -1 and has vertical asymptote in When NBS is small, which corresponds to high variances of the perturbed PC in Figure 6, angular Procrustes is also linear. When NBS is around 1, which corresponds to low variances of the perturbed PC Figure 6, angular Procrustes has increased sensitivity compared to NBS, as explained by the large slope of arccosine around 1.
Mante 2013
Siegel 2015
Hatsopoulos 2007
MajajHonn 2015
FreemanZeema 2013
Thaay
DXA
VBS
t0
01
300
400
0000 2000 500 1200 Vaat portated
1250
020 525
Vyltoio pf nartee
Figure 6: The similarity score between five neural datasets and a modified version of these datasets when single principal component is perturbed. The colored dots show the empirical CKA, NBS, and angular Procrustes scores. The solid lines show the predictions of our theory. In particular, the CKA scores decrease quadratically with the variance of the perturbed principal component, whereas NBS scores decrease linearly. Angular Procrustes is related to NBS by the arccosine function, which explains its linear dependence to high variance PCs and increased sensitivity to low variance PCs compared to NBS.
4.4 ARE METRICS MUTUALLY INDEPENDENT?
A natural question that arises is whether these different similarity metrics are independent of each other, or if they exhibit consistent relationships. To address this, we consider three possible rela- tionships between any two given similarity metrics (Figure 7). Independent: The two metrics are independent. A high score on one metric offers no guarantee of a high score on the other. Coupled: The two metrics tightly coupled. A high score vice versa. Asymmetric: One metric subsumes the other. high score on the first metric guarantees high score the second, but not the other way around.
metric implies high score on the other, and

---

Published as a conference paper at ICLR 2025
Anguler Procrustes
1.0
Independent
Coupled
Asymmetric
0.5
Score
0.0
0.5
0.0
0.5
1.0
0.0
0.5
1.0
CKA
Regression
Ridge Regression CV
Figure 7: We jointly optimized the values of both angular Procrustes and CKA or linear regression to illustrate the allowed ranges of both similarity scores (gray region enclosed by the solid black lines). (a) Different categories of possible relationships between a similarity measure A and similarity measure B. (b) Allowable ranges of similarity scores for a fixed reference dataset, illustrated here for the Siegel 2015 dataset. These ranges are estimated by jointly optimizing pair of similarity measures get close as possible to different target values (shown with the pink dots forming square on the first plot). If angular Procrustes has a high score of 0.9 (horizontal dashed line) then linear regression will have value above this. In contrast, high linear regression score of 0.9 (vertical dashed line) does not imply high angular Procrustes score, and wide range of angular Procrustes scores are possible (see appendix C.3 for details).
We jointly optimize multiple similarity scores find their allowed ranges (Figure 7) and show that high angular Procrustes similarity implies a high CKA score, but not the converse. A high value of angular Procrustes implies a high score for unregularized linear regression but linear regression that is regularized and cross-validated across experimental conditions can take independent values.
DISCUSSION
Our study reveals critical limitations of commonly used similarity measures for comparing models and neural datasets. While these measures offer a seemingly straightforward way to quantify representational alignment, our optimization-basse particularly for CKA and linear regression, do not guarantee that synthetic datasets encode task- relevant information in a manner consistent with neural data. Specifically, we demonstrate that measures like CKA are heavily influenced by the top principal components of the data, often achieving high scores even when lower variance components, which might carry crucial task-related information, remain poorly captured.
approach shows that high similarity scores,
The central aim of our work is to explore the question of what it means for similarity score to be good, as well as what drives a high similarity score. Our findings demonstrate that the interpretation of these scores is highly dependent similarity scores require further interpretation before making any claim based on them. Here we show two concrete ways of doing so, that incorporate the context of the dataset and similarity measure, by optimizing synthetic datasets to determine (i) how strongly task variables are encoded in order to reach the score (Figure 3), and (ii) how many PCs need to be captured in order reach the score (Figures 4 and 5).
the specifics of both the metric and the dataset. We argue that
Limitations & future work. Our study focused on differentiable, geometry- similarity measures and their optimization dynamics. Future work should investigate how it extends to other types of measures. Additionally, when we study the optimization dynamics are studying both the behavior of the optimization method and the behavior of the similarity measure. Future work should investigate the potential limitations of our gradient- based optimization method, and how to better untangle from the behavior of the similarity measure.
Moving forward, our python package aims to standardize similarity measures, facilitating a more cumulative scientific approach by centralizing findings related to these measures, and enabling more integrated benchmarking and comparisons. There are many similarity measures we have not analyzed in this work, for example, even CKA has at least 12 variations, which are easily accessible in our package (Cloos et al., 2024). These similarity measures may, upon further investigation with the techniques we have proposed here, suffer from the same limitations have demonstrated. Before using a similarity measure it is crucial to be aware of these limitations. Similarity package: http://ggtubb.oooo//oooosssiaaaa
10

---

Published as a conference paper at ICLR 2025
ACKNOWLEDGMENTS
We thank Laureline Logiaco for valuable discussions.

---

Published as a conference paper at ICLR 2025
REFERENCES
Nathan Cloos, Guangyu Robert Yang, and Christopher J Cueva. A framework for standardizing similarity measures in a rapidly evolving field. In UniReps: 2nd Edition of the Workshop on Unifying Representations in Neural Models, 2024.
Frances Ding, lean-Stanislas Denain, and Jacob Steinhardt. Grounding representation similarity through statistical testing. In Advances in Neural Information Processing Systems, volume 34, 2021.
Jeremy Freeman, Corey M Ziemba, David J Heeger, Eero P Simoncelli, and J Anthony Movshon. A functional and perceptual signature of the second visual area in primates. Nature Neuroscience, 16 (7):974-881, 2013.
Sarah E Harvey, Brett W. Larsen, and Alex H Williams. Duality of bures and shape distances with implications for comparing neural representations. In UniReps: the First Workshop on Unifying Representations in Neural Models, 2023.
Nicholas Hatsopoulos, Qingqing Xu, and Yali Amit. Encoding of movement fragments in the motor cortex. Journal of Neuroxcience, 27(19):1155-5114 2007.
Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9:1735-80, 12 1997.
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv: 1412,698,, 2017.
Max Klabunde, Tobias Schumacher, Markus Strohmaier, and Florian Lemmerich. Similarity of neural network models: A survey of functional and representational measures. wrXiv:2305.06632, 2023.
Simon Korbliihh, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 3519-3529. PMLR, 2019.
Nikolaus Kriegeskorte, Maricke Mur, and Peter Bandettini. Representational similarity analysis connecting the branches of systems neuroscience. Frontiers in Systems Neuroscience, 2, 2008a.
Nikolaus Kriegeskorte, Marieke Mur, Douglas Ruff, Roozbeh Kiani, Jerzy Bodurka, Hossein Esteky, Keiji Tanaka, and Peter A. Bandettini. Matching categorical object representations in inferior temporal cortex man and monkey. Neuron, 60(6):1126-1144 12 2008b.
Richard D. Lange, Devin Kwok, Jordan Matelsky, Xinyue Wang, David S. Rolnick, and Konrad P. Kording. Neural networks as paths through the space of representations. 0rXiv:2206.10900 2022.
Najib J. Majaj. Ha Hong, Ethan A. Solomon, and James J. DiCarlo. Simple learned weighted sums inferior temporal neuronal firing rates accurately predict human core object recognition performance. Journal of Neuroscience, 13402-1334 2015.
Valerio Mante, David Sussillo, Krishna V. Shenoy, and William T. Newsome. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature, 503:78-84, 84, 2013.
Kenneth D. Miller and Francesco Fumarola. Mathematical equivalence of two common forms of firing rate models of neural networks. Neural Computation, 24(1):25-31) 2012.
Aran Nayebi, Daniel Bear, Jonas Kubilius, Kohitij Kar, Surya Ganguli, David Sussillo, James J DiCarlo, and Daniel Yamins. Task-driven convolutional recurrent models of the visual system. Advances in neural information processing systems, 31, 2018
Martin Schrimpf. Jonas Kubilius, Ha Hong, Najib J. Majaj, Rishi Rajalingham, Elias B. Issa, Kohitij Kar, Pouya Bashivan, Jonathan Prescott-Roy, Franziska Geiger, Kailyn Schmidt, Daniel L. K. Yamins, and James DiCarlo. Brain-score: Which artificial neural network for object recognition is most biain-like? bioRxiv, 2018
12

---

Published as a conference paper at ICLR 2025
Martin Schrimpf, Jonas Kubilius, Michael J Lee, N Apurva Ratan Murty, Robert Ajemian, and James J DiCarlo. Integrative benchmarking to advance neurally mechanistic models of human intelligence. Neuron, 2020.
Markus Siegel, Timothy Buschman, and Earl K. Miller. Cortical information flow during flexible sensorimotor decisions. Science, 348(6241):13322-3355 2015.
Ilia Sucholutsky, Lukas Muttenthaler, Adrian Weller, Andi Peng, Andreea Bobu, Been Kim, Bradley C. Love, Christopher Cueva, Erin Grant, Iris Groen, Jascha Achterberg, Joshua B. Tenenbaum, Katherine M. Collins, Katherine L. Hermann, Kerem Oktar, Klaus Greff, Martin N. Hebart, Nathan Cloos, Nikolaus Kriegeskorte, Nori Jacoby, Qiuyi Zhang, Raja Marjieh, Robert Geirhos, Sherol Chen, Simon Kornblith, Sunayana Rane, Talia Konkle, Thomas P. O' Connell, Thomas Unterthiner, Andrew K. Lampinen, Klaus-Robert Müller, Mariya Toneva, and Thomas L. Griffiths. Getting aligned representational alignment. 2rXiv:2310.130/1 2024.
David Sussillo, Mark M Churchland, Matthew T Kaufman, and Krishna V Shenoy. neural network that finds a naturalistic solution for the production of muscle activity, Nature neuroscience, 18(7):
1033-1033, 2015.
Shuai Tang, Wesley J. Maddox, Charlie Dickens, Tom Diethe, and Andreas Damianou. Similarity of neural networks with gradients. arXiv:2003. 14498, 2020.
Alex H Williams. Equivalence between representational similarity analysis, centered kernel alignment, and canonical correlations analysis. In UniReps: 2nd Edition of the Workshop on Unifying Representations in Neural Models, 2024.
Alex H. Williams, Erin Kunz, Simon Korblith, and Scott W. Linderman. Generalized shape metries on neural representations. In Advances in Neural Information Processing Systems, volume 34, 2021.
Daniel L. K. Yamins, Ha Hong. Charles F. Cadieu, Ethan A. Solomon, Darren Seibert, and James J. DiCarlo. Performance-optinize hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619 1624,,644,,,,, 2014.
13

---

Published as a conference paper at ICLR 2025
A ADDITIONAL RESULTS: DECODE ACCURACY OF TASK VARIABLES
Figures S1a and S1b show the decode accuracy of a linear classifier trained to decode task relevant variables for the Mante 2013 and the Siegel 2015 datasets (cross-validated validated across different conditions) as the similarity score increases. For both datasets, monkeys are shown a field of colored moving dots each trial, and required attend to either color or motion information while ignoring the non-cued feature of the stimuli. Following Mante et al. (2013), we consider as the relevant task variables, the direction of motion of the dots, the color of the dots, the contextual cue, and the response of the monkey. We additionally binarize each of these variables for our decoding analysis. Before optimization, the synthetic datasets initially consisted of Gaussian noise and the decode accuracy was near the baseline chance level of 0.5 as expected for binary classifier. We show results for the context task variable in Figure
In Figure S2 we focus task relevant information can decoded from synthetic dataset that is optimized to become increasingly more similar to the Siegel 2015 dataset. Even when linear regression is cross- valssevalddated and regularized, a high similarity score does not necessarily mean that task relevant information is encoded in a similar manner to neural data (leftmost panels).
popular similarity measure, linear regression, and show how much
Angular Procrustes
CKA
Ridge Regression CV
Decoding accuratyy
Mante 2013
Decoding
0.-
0.a
0.5
0.8
0.6
0.4
0.6
0.8
1.0
0.4
0.5
0.8
1.0
0.2
0.8
1.0
10
16
20
Optimized score
Optimized soore
Optimized soore
Number PCr included
Siegel 2015
Decoding scourocy
Deeading acouwey
0.9
0.5
0.7
0.
cirboo rapors
0.5
0.4
0.6
0.6
1.0
0.4
0.6
0.7
0.8
1.0
Optimized
Optimizdd
Optimized
Number PCs included
Figure S1: (a, b) Decode accuracy for experimental variables versus similarity scores. Decode is from synthetic data optimized towards greater similarity with the neural data from (a) Mante et al. (2013) and (b) Siegel et al. (2015). Horizontal dashed lines indicate the decode accuracy from the neural data, (c, d) Decode accuracy from neural data versus number of principal components included in the decode. Decode uses data from (c) prefrontal cortex from Mante et al. 2013 and (d) FEF from Siegel al. 2015.
A=1
A=
A=100
A=1000
A=10000
Decooinng auauney
Optimized
Optimized
Optiiied
Optimized
Optimieed
Figure $2: Decode accuracy versus similarity scores when optimizing ridge regression scores with varying regularization strengths X. Regression scores are cross- validated across conditions. Horizontal lines show the decode accuracy from the neural data for the task relevant variables, and colored curves shows the corresponding decode accuracy on a synthetic dataset that is optimized to become increasingly more similar the neural data. For some values of the ridge regularization parameter, even at the highest similarity scores near 1, the synthetic dataset does not encode task relevant information to the same extent as the neural data.
14

---

Published as a conference paper at ICLR 2025
Mante 2013
1,0
Decoding accuracy
Angular Procruates
0.5
Noural
20
40
80
80
100
Number of principal companents
We test whether removing low-variance principal components from the neural dataset increases the decoding accuracy, in order to see if this "denoising" may be potential mechanism for explaining the increased decoding accuracy in the optimized dataset compared the reference neural dataset in Figure 3. We show results for decoding of the context task variables from the Mante 2013 dataset after projecting onto principal components through N, where principal component is taken to have the highest variance, and N increases along the x-axis of the figure. The solid blue line shows the decoding accuracy from the synthetic dataset optimized with Angular Procrustes when the similarity score reaches value of 0.9. Although the decoding accuracy from the neural data increases slightly when the lowest variance components are removed, does not match the decoding accuracy from the synthetic data. This suggests the improved decoding accuracy from the synthetic data is probably more complex form of denoising and would require further investigation.
Figure S3:
B NEURAL DATASETS AND MODELS
B. DATASETS
We analyzed neural data from five studies on nonhuman primates:
Mante et al. (2013): Prefrontal cortex (PFC) electrode recordings during contextual decision- making task involving colored moving dots. Activity is averaged across trials with the same condition (72 unique conditions) and averaged across 50 non-overlapping time bins during the 750 ms interval from 100 ms after dots onset to 100 ms after dots offset. The total number of neurons recorded is 727. To make optimization faster, we reduce the dimensionality of this dataset by keeping 99% of the variance, corresponding to the first 448 principal components. Data link The final dataset used in all the similarity analyses had size (time 15, sample 72, feature 448).
Siegel et al. (2015): Electrode recordings from multiple cortical regions during a contextual becision-making task involving colored moving dots, similar Mante et al. (2013). We analyze data from the Frontal Eye Field (FEF) region during the stimulus period of the task. Activity is averaged across trials with the same condition (42 unique conditions) and averaged across 50 ms non-overlapping time bins from 0 to 500 ms after dots onset. A total of 1220 neurons were recorded. We reduce the dimensionality of this dataset by keeping 99% of the variance, corresponding to the first 278 principal components. The final dataset used in all the similarity analyses had size (time 11, sample 42, feature 278).
Hatsopoulos al. (2007): Primary motor (M1) electrode recordings during center-out reaching task. Simultancous recordings were collected for 391 trials, 141 neurons. Activity is averaged across 50 non-overlapping time bins from 0 to 500 after movement onset. Data link?. The final dataset used in all the similarity analyses had size (time = 10, sample = 391, feature = 141).
Majaj et al. (2015): Inferior temporal (IT) electrode recordings during object image presentations. Simultaneous recordings for 3200 trials, 168 neurons. Activity is averaged across all time steps. The final dataset used in all the similarity analyses had size (sample 33200, feature = 168).
Freeman et al. (2013): Primary (V1) and secondary (V2) visual area electrode recordings during texture and noise image presentations. Simultancous recordings were collected for 135 trials,
ini httpesss/www....n..ooooceeeeeeee Antree://abtarraaa..rrraataaaate
htm] 5061 /dryad xa 3tx9em
15

---

Published as a conference paper at ICLR 2025
205 neurons. Data is averaged across 150 ms non-overlapping time bins. The final dataset used in all the similarity analyses had size (time = 2, sample 135, feature = 205).
We use the BrainScore" library (Schrimpf et al., 2020) for the Majaj et al. (2015); Freeman et al. (2013) datasets.
B.2 RECURRENT NEURAL NETWORK (RNN) MODELS
RNN architectures. We show results for three commonly used RNN architectures: LSTMs (Hochre- iter & Schmidhuber, 1997) and two choices for continuous time recurrent neural networks (CTRNNs), which differ by the position of the nonlinearity (Miller & Fumarola, 2012). A first alternative given by the following equations.
dh W Bu di f(h) +
where u is the input, h represents the membrane potential, E is a Gaussian white noise, and r is the firing rate produced by the model and is used to compare the model with the neural data. The second alternative is given by the following equation.
dr dt
- + f(Wr Bu+ + +
We call it the LowPasSCTRNN since it can be shown that its firing rate is low-pass filter of the firing of the first architecture, which we call CTRNN (Miller & Fumarola, 2012). The RNNs trained using supervised learning on simplified task inputs and outputs.
Comparing task-optimized RNNs to neural datasets. We train the RNNs on the tasks from Mante al. (2013) and Siegel al. (2015), and compare them the respective neural datasets. We consider two neural datasets from prefrontal cortex (PFC) (Mante et al., 2013) and Frontal Eye Field (FEF) (Siegel al., 2015) in monkeys performing an experimental task that required the animal to attend to either color or motion information while ignoring the non-cued feature of the stimuli. On each trial, field of colored moving dots shown. Monkeys are given cue at the beginning of the trial to determine whether the dots in the stimulus are moving left vs right, or The monkey reported its choice with a saccade to one of two visual targets. In both datasets, we analyzed neural activity taken when the dot stimulus was presented. In panel a of Figure neural activity is visualized a lww-dimensional space capturing task-relevant dynamics using the targeted dimensionality reduction method from Mante et al. 2013. Each curve shows the average neural activity for a different experimental condition. See Mante et al. 2013 for a detailed description of the analysis. This visualization highlights features of the data but the similarity scores were computed using the firing rates from the electrode recordings before any dimensionality reduction. In panel b of Figure neural firing rates for two example neurons are shown with the colors denoting average.
red green.
In Figure 2 c, d, we compare model-data similarity scores to two baseline scores. The Neuron-split baseline score is obtained by dividing the neurons from single dataset into disjoint sets and then comparing. If the model-data scores are equal to the neuron-sple scores this indicates that model activity indistinguishable from the neural activity of other recorded neurons. The Condition-average baseline score is obtained by averaging the neural activity along the trial and condition dimensions and comparing it to the original dataset. Each neuron in this condition -vverage-- dataset still has a unique time-vane varying firing rate. This strong bascline shows the similarity to the original data that one can obtain by only keeping the condition-independde neural dynamics.
C SIMILARITY MEASURES
C.I DEFINITIONS
Several methods have been proposed to measure similarity between models and neural data (see (Sucholutsky et al., 2024), (Klabunde et al., 2023) for comprehensive reviews). While some efforts have been made to characterize these metries mathematically, for instance, by examining their
httpps://gi
16

---

Published as a conference paper at ICLR 2025
invariance properties, clear guidance in interpreting similarity scores for given scenario remains limited. To address this gap, we introduce a novel method for analyzing the specific aspects of data prioritized by different similarity metrics. Our method leverages the difffreetiiaiility of these metrics and is applicable to a wide range of measures. We focus here on three commonly used metrics and their variants, linear regression (Yamins et al., 2014; Schrimpf al., 2018), Centered Kernel Alignment (CKA) (Kornblith et al., 2019), and Procrustes distance (Williams et al., 2021; Ding et al., 2021). These methods quantify similarity based the goodness of fit after aligning the representations. This alignment transformation allows for greater flexibility by making similarity measures invariant to specific transformations. For example, instead of demanding one-to-one mapping of neurons between datasets, these methods can accommodate scenarios where neurons in one dataset correspond to linear combinations of neurons in the other.
Consider two datasets X and Y with shape (sample, feature) and mean-centered columns. Datasets with dynamics are shaped from (time, sample, feature) to (tmple feature).
Assuming X our reference dataset (e.g.. neural data), linear regression seeks the optimal linear mapping B to predict X from Y. We use the R2 coefficient to evaluate goodness of fit and ridge regularization with parameter À 100, well as 5-fold cross-validation. Note that we apply cross velidatiin after reshaping the data from (time, sample, feature) to sample, feature).
B arg min mingmnngllaa
||- YBI /|IB|
B
|X 1 -YBIE |
R2
It's important to note that this score is not symmetric. Applying linear regression on Y, X instead of X, Y may yield significantly different scores. This asymmetry arises because one dataset might be highly predictive of the other, while the reverse might not hold true.
Unlike linear regression. CKA and Procrustes are symmetric, meaning the metric yields the same result whether applied to X, Y or Y, X. Moreover, they exhibit a different class of invariance. While linear regression is invariant under invertible linear transformations, CKA A and Procrustes are invariant under orthogonal linear transformations. This stricter invariance to orthogonal transformations potentially reduces sensitivity to noise (Kornblith et al., 2019).
CKA measures the correlation between the kernels of two datasets X and Y (Kornblith et al., 2019). We consider here linear CKA where the kernels are XX"" and YYT..
CKA(X, Y) (vec X X²), vec(YY)))
IXTY
|XX |
|XXT |
CKA scores range from 0 to 1, with I indicating perfect similarity. We also consider the arccosine of CKA, metric satisfying the axioms of distance metric (e.g.. the triangle inequality) with O signifying perfect similarity (Williams et al., 2021). This metric, also known as Angular CKA (Lange al., 2022). is then normalized to a similarity score between 0 and for direct comparison with other scoring methods. This normalization involves dividing the angular distance by π and subtracting the result from ensuring the measure increases with similarity.
AngularCKAScore(X,) Y) = arccos CKA(X,
n/2
Procrustes distance provides another approach for quantifying similarity (Williams et al., 2021; Ding et al., 2021). This metric identifies the optimal orthogonal alignment maximize the correlation between and Y:
max (X, QEO +
where O is the group of orthogonal linear transformations. An angular distance metric can be obtained by taking the arccosine of this quantity (Williams et al., 2021).
17

---

Published as a conference paper at ICLR 2025
As shown in Harvey al. (2023), Procrustes distance is closely related Normalized Bures Similarity (NBS) (Tang et al., 2020), with Procrustes distance equating the arccosine of NBS. NBS defined as:
|
NBS(X,Y) Y) VIIXXTII- |Y
This definition resembles CKA but utilizes the nuclear matrix norm instead of the Frobenius matrix norm. The Frobenius norm, denoted by ||A|[ for a matrix A, is calculated as the square root of the sum of squared singular values. The nuclear norm, || is simply the sum of singular values. The implications of this difference in matrix norms for the weighting principal components by CKA and NBS are further explored in C.2.
Similar to the score version of CKA distance, we define a score version of Procrustes distance, ranging from 0 to 1, where represents perfect similarity.
(XBS, Y))
AngglaaFroccusteeseomm((X( =
T/2
C.2 THEORETICAL ANALYSIS OF CKA AND NBS
Our results show that similarity in the high variance components Kernel Alignment (CKA) score. contrast, while the high variance components still have an overall larger impact than lower variance components, metrics like Normalized Bures Distance (NBS) seem to be more sensitive to changes in lower variance components relative to CKA. We explain this difference by showing, in theory, how CKA and NBS changes when perturbing single principal component of the data. The result is that CKA depends quadratically on the variance of the perturbed principal component. whereas NBS has linear dependence. We start the derivation from the matrix norm definitions of CKA and NBS (Harvey et al., 2023).
dominate the Centered
I
NBS(X,Y)
VIIXX VYTI-
Y 12
CKA(X,Y) |XXXI|+|||
Let X be dataset, and be perturbed version of X, denoted Xg. where only the kth principal component modified. Specifically, define Y such that its jth left singular vector uy equal the jth left singular vector u²x X for all j * k. and define ut to be a perturbation of u that preserves variance. Here we randomly sample ut from a Gaussian distribution with the same variance as the variance of u so that of = x The right singular vectors Y are the same as the right singular vectors of X. Intuitively this perturbation affects only the projection of the data along the ttth principal component.
We first show how CKA(X, Xx) depends on the variance the perturbed principal component. As shown in (Kornblith et al., 2019), CKA can be rewritten in terms of dot products of the left singular vectors.
CKA(X,Y) = Ens Alx AR 1
VE,( (,
where X = Y = VV are the SVD decompositions of and Y respectively,
and Xxx = x Since uz = u'x for all * k and since Ux is an orthogonal for all j * i whenever * k. The dot products
matrix, the dot products (u'x, ux are equal guaranteed be zero since randomly sampling ut doesn't 't guarantee preserve the orthogonality with the other left singular vectors. However, when the number of samples in the data is large the projection ut: on the other singular vectors will be relatively small. With the assumption that (ux.uf x O, CKA can be written as:
(u'x, )²²)
18

---

Published as a conference paper at ICLR 2025
CKA(X, Xx) Exxx(A()²
Σ
This shows that CKA scores between the original data and the perturbed data depend quadratically the variance of the perturbed principal component. As shown in Figure 6, our theoretical approximation closely matches simulations.
As opposed CKA, NBS cannot be directly rewritten sum of left singular vector dot products. However, we show that NBS reduces to simple form when Y is defined as X perturbed along a single principal component and when (u'x, ut)) z 0 assumed. We start by expressing the nuclear norm in the numerator of NBS in terms of the SVD decomposition of X and Y.
|| IIXXEXUUUUU = |ExU - Ey
The individual entries of the product of matrices inside the nuclear norm corresponds to the dot products between the left singular vectors of X and Y weighted by the corresponding singular values.
EyUlg o'x (uxx, uzy)
By definition of Y = Xx.
(o x ut)
if k if j k
xxxo (uxx,xx)
With our assumption that (ux, uf) 2 0 and the nuclear norm property |||||, Tr VATA find:
we
|| ~
E(xx)² i
Since our perturbation preserves the variance, have || finally obtain the following approximation, which explicitly reveals the linear dependence of NBS on the variance of the principal components.
= We
Eitklofa2 E(OO}²
Di Σ
NBS(X,
C.3 JOINT OPTIMIZATION SIMILARITY MEASURES
Figure shows how two metrics relate by jointly optimizing for both metrics. Given score for the first metric and score for the second metric, we ask whether it is possible to find a single synthetic dataset that would produce these two similarity scores. Specifically, for given reference dataset X, similarity measures A and B, and respective targets target, and targetg, we optimize a synthetic dataset Y to minimize the sum of absolute errors:
min |Score (X,Y) target, |scores (X, Y) targetg]
We chose the absolute error instead of the squared error as we find practice that it gives scores that closer to their targets.
This analysis gives an approximation the range of scores that two metrics can jointly take. For example, if two metrics are completely independent, then any point the [0, 1] [0, 1] square is reachable (see third plot of Figure 7b for an example). However, if there exists a one-to-one mapping between the two metrics, then the scores constrained to lie dicdenmnniooal curve.
19

---

Published as a conference paper at ICLR 2025
1.
2.
3.
Target scores
1.0
1.0
1.0
Achievable
V
Mcasure
Measure
Measure
0.5
0.5
0.5
Inital scores
0.0
0.0
0.0
0.0
0.5
1.0
0.0
0.5
1.0
0.0
0.5
1.0
Measure
Measure
Measure A
Figure S4: Computing the allowed ranges between two similarity scores by optimizing synthetic data towards grid of target similarity scores. (1) Given synthetic dataset Y and reference dataset X we attempt simultaneously achieve the desired target scores for similarity measures A and B (pink circle). To this we optimize Y with the Adam optimizer by differentiating through the scores for similarity measure A, SсoreĄ (X, Y), and B, scorey Y), to minimize sum of absolute error loss function between the current and target similarity scores. As is optimized the scores for measures A and trace out the curve shown in blue. Note that the final achievable scores for the two similarity measures approach but, in this case, do not reach the target scores. (2) This optimization procedure is repeated for many different target scores (pink dots) and the intermediate scores recorded (blue curves). (3) The edges of the blue curves are marked with black dots and approximate boundary of achievable scores shown in gray.
R3A Eudioean, coeine
1.0
Eudlidaan centered cosine
1.0
RSA Eudideen comelation
1.0
RSA Euclidean, corneaation
0.5
0.0
0.0
0.0
0.0
0.5
0.0
0.5
0.0
0.5
0.5
1.0
CKA
CKA
CKA
RSA Euclidean,
Figure S5: We analyze different variations of Representational Similarity Analysis (RSA) (Kriegeskorte al., 2008a) and CKA by jointly optimizing the similarity measures to approxi- mate the allowable regions of scores. (a) We compare CKA and a commonly used version of RSA that uses the Euclidean distance to compute the Representational Dissimilarity Matrices (RDMs) and cosine similarity compare the RDMs. We find that these two similarity measures are mostly independent, where a high score for one measure doesn't 't necessarily imply a high score for the other. (b) We confirm the equivalence between CKA and RSA when centering the Euclidean RDMs before computing the cosine similarity, as shown by Williams (2024). (c) We compare CKA to another common variation of RSA that computes the correlation between the RDMs instead of the cosine similarity. We find that these two measures are also mostly independent. (d) We compare two RSA variants together and show that changing the RDM comparison method makes the RSA measures non-equivalent.
20


Reviews:
[{"review_id": "ZEnb0pOJSq", "reviewer": "Reviewer_GR1j", "summary": "This paper studies several popular methods to quantify the similarity between models and neural data by applying them to five neural data from several studies. The approach is to directly optimize synthetic datasets to maximize their similarity to neural recordings.  The work is of expository nature and there have been several reviews on similarity measures, but this work is model-agnostic and can shed light on how different metrics prioritize various aspects of the data, such as specific principal components or task-relevant information.", "questions": "1. What guidance will you provide to scientists in choosing a suitable similarity measure? \n\n2. How will this work have impact in the way that similarity scores are applied in practice?", "limitations": "", "rating": 5, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "Similarity measures have played a pivotal role in guiding the development of more realistic models of the brain. This work provides new insights and challenges of such measures.", "weaknesses": "This work is of expository nature, so by this nature its advancement in methodology and theory is less significant.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "RQAbIyUYze", "reviewer": "Reviewer_CM3i", "summary": "The paper aims to compare various similarity measures by optimizing randomly initialized datasets to various neural recording datasets. The authors find that some measures such as CKA can have high scores without sufficiently encoding task relevant information. The paper then investigates how much of a dataset needs to be captured before a certain score is achieved. It finds that some of the measures that have high scores without encoding task-relevant information also are most sensitive to high variance principal components. The authors complete theoretical and perturbation experiments to validate this hypothesis.", "questions": "1. Do the authors have suggestions on how to use these measures? Or do they have a suggestion of what analysis is still needed before picking a measure?\n2. Why does ridge regression seem to be independent from Angular Procrustes (Fig 7)?", "limitations": "", "rating": 8, "confidence": 4, "soundness": 4, "presentation": 3, "contribution": 3, "strengths": "1. Very Clear writing, easy to see what analysis is being done and why.\n2. Evaluating in a model agnostic way puts the focus on the measures and leads to a better understanding of the relevant differences for completing model-brain comparisons.\n3. This analysis is fundamental to the field. Understanding what aspects lead to a high similarity score is extremely important to guide development of new models and to properly apply the modeling results to the brain.", "weaknesses": "1. Ridge-Regression seems to be the most widely-used measure in the field although most of the comparisons focus on CKA vs Angular Procrustes. Would be nice to see more commentary on this especially in Fig. 7 where it seems independent from angular Procrustes.\n2. From the start of the paper it seems like it will answer the question: \"What metrics should guide the development of more realistic models of the brain?\" The discussion seems to attempt to avoid this question: \"Our findings demonstrate that the interpretation of these scores is highly dependent on the specifics of both the metric and the dataset. We do not claim that one metric is superior to another, as indeed, they are sensitive to different aspects of the data and in some cases can be largely independent. Rather, we emphasize that the concept of a \"good\" score is nuanced and varies with context.\" I would like the authors to comment more directly on what should be done. Should this style of analysis be done for every new dataset which can provide a score range that encodes certain relevant variables? Is there some other guideline? It makes sense that there isn't one best choice but the question that starts off the paper doesn't seem to be addressed.\n3. The datasets are all electrophysiology datasets whereas comparisons are often also done with fMRI datasets, will these results still hold for these datasets? Especially with the difference in sampling between the methods.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "6OUzXBz1ZH", "reviewer": "Reviewer_c7uz", "summary": "This paper aims to compare how different similarity measures such as CKA and linear regression behave, based on both prior theoretical work as well as by optimizing synthetic data through Adam to become more similar (under some similarity measure, e.g. CKA) to a reference neural dataset. The paper analyzes what properties a synthetic dataset can be expected to have (e.g. with respect to decodability of task relevant variables) at various levels of similarity to a reference dataset under a range of similarity measures.", "questions": "In Figure 5, what does PC explained variance mean? What is the PC threshold? (I'm also not sure which PC we are talking about here - is it the first, largest PC?) Why is it that the score to reach PC threshold is *larger* for a smaller PC explained variance? Shouldn't explaining less variance require a smaller score? \n\nIn Figure 6, what does it mean to perturb a single PC? How much do you perturb that PC? (it isn't stated, but I assume that how much you perturb it is very important for what the resulting similarity score should be).", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "- Although optimizing a set of features to become more similar to neural data has been done (e.g. optimizing neural network models of the brain), specifically optimizing a synthetic dataset to in order to gain insight into how similarity measures behave, especially at various intermediate levels of similarity, is novel. \n- Most discussions of similarity measures have focused on the special case where the similarity score is 1 (for example, what happens when response profiles X and Y are equivalent under some similarity measure such as CKA), so discussion of how intermediate values behave for different measures is a good contribution, especially since we are often dealing with intermediate levels of similarity in practice, e.g. when comparing models to brain data.\n- CKA and linear regression are widely used methods of measuring similarity, so this paper can potentially be useful to many researchers comparing models to brain data.", "weaknesses": "- In this paper, the regularization level for Ridge Regression is fixed to some chosen level (and the authors do consider results for different fixed levels of lambda). However it seems to me that, because of the probability of overfitting in high dimensional data settings, it is generally preferable to tune the ridge penalty through some cross-validation method (searching over a range of possible alpha values) such as k-fold so as to select the lambda that will maximize generalization performance on the chosen data.\n- Linear regression is only done in one direction, from the model to the reference neural dataset. This is good to know about, but it also would be useful to see what happens when linear regression is done in both directions, i.e. if synthetic data is optimized so that it predicts the brain and the brain predicts the data as well. \n- RSA is also widely used as a similarity measure, but is not mentioned at all in the paper. It would be very useful if the paper included an analysis of RSA, especially since RSA is mathematically very closely related to linear CKA, but the formulas for RSA and linear CKA are not identical. It would be good to therefore have an analysis of the relationship between these two methods, as well as empirical simulations showing how the intermediate values compare for RSA and CKA (just as the authors did for other methods, like comparing CKA to NBS).\n- While many parts of the paper are clearly written, Figures 5 and 6 were hard for me to understand, and there was not much explanation in either the caption or main text. See questions below.\n- While I understand the intended application of these results is to help researchers better understand similarity scores when comparing models to brains, the paper title seems a bit misleading, since it gives the impression that the paper is optimizing the similarity between an actual ANN model and the brain, whereas what is actually done here is optimizing similarity scores between a randomly initialized matrix and the brain features. Perhaps the title doesn't need to be fixed, but initially the title gave me a different idea of what the paper was going to do.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "zZikCfYKzz", "reviewer": "Reviewer_w1zm", "summary": "This paper investigates the properties of several similarity metrics in various neural activity datasets. The goal of similarity metrics is to quantify how well models of brain align with neural data. However, there are inconsistencies across different metrics, i.e., some metrics score high while others score low. This paper aims to address this inconsistency problem and propose a model-agnostic synthetic dataset optimization to analyze the properties of similarity metrics. The optimization dynamics in numerical experiments reveal that there is no single metric that is universally applicable for all dataset since the concept of a good score is highly dependent on the dataset. Additionally, the authors provide a python package that includes various similarity metrics.", "questions": "* What is the reason for using ridge regularization in the $R^2$ definition (in the numerator in line 208)? In that case, the numerator will not be the residual square and I do not see the rationale behind this. \n\n* Why is line 512 specifically bold-faced, but not the next one? According to Figure 7, the relation that high value of angular Procrustes implies a high score for linear regression appears more established compared to the relation of angular Procrustes and CKA scores.\n\n* Given the findings, the main takeaway seems to be that similarity metrics are highly sensitive to different data aspects and may be mutually independent. How, then, would the authors suggest selecting the best similarity metric for a given dataset?\n\n**Post rebuttal comment:** I appreciate the authors' detailed responses and the revisions made to the paper. These changes have significantly improved its clarity in my opinion. Considering the positive feedback from other reviewers as well, I am pleased to raise my score to 6.", "limitations": "", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "* The problem is well-formulated in the introduction and clearly illustrated in Figure 2.\n* Numerical experiments are presented clearly for the reader.\n* The published code is well-structured, enhancing reproducibility.\n* The observations made in Figure 3 are interesting (that some scores are good for some datasets while they are bad for other datasets).", "weaknesses": "The paper has some clarity and novelty issues in my opinion. Please see the points below and the questions section.\n\n* One premise stated in the abstract is that the paper offers a theoretical analysis to show how similarity metrics are dependent on the principal components of the dataset. However, this premise appears weak to me because: (i)  it does not seem to be a novel analysis but rather a predictable outcome of using Frobenius and nuclear norms in metrics CKA and NBS; (ii) the assumption $\\langle u_X^i, u_Y^i\\rangle \\approx 0$  is introduced without sufficient context and is unclear; and (iii) the assumption is said to hold with large sample sizes, validated in a numerical experiment, yet I did not see a clear mention of dataset sizes in the paper. Including more details on the datasets and clarifying the underlying assumptions would be helpful.\n\n* The introduction and related work section suggest that prior research lacks practical guidance on metric selection given a dataset. However, I am uncertain if this paper proposes such a guidance. Suppose I have a neural dataset $X$ and model representations $Y$ to compare. How should I choose the most suitable metric based on this paper? My understanding is that I can optimize a synthetic dataset $Z$ using various metrics, observe the optimization dynamics, and then choose a similarity metric for $X$ and $Y$. Is that correct? I am asking this since I am struggling to understand how this paper offers a method for selecting an appropriate metric for a given task, if indeed it is promising.\n\n* The claim between lines 267-270 is not detailed enough in the paper. The authors mention testing a hypothesis, but they simply state \"we tested this hypothesis ... but this did not change the results\" without further context. The results for that is not shared in the paper. Including these results in the appendix would enhance the paper's clarity.\n\n* The joint optimization method in Section 4.4 and Appendix C.3 is unclear, as the details on experiments in this section are sparse. I think the paper can benefit from more details.\n\n* The term \"Proof\" in Appendix C.2 and Section 4.3 seems a bit strong without an accompanying theorem or lemma, especially since the assumption is only noted in the appendix. Revising the word \"proof\" might be appropriate.\n\n**Minor Comments** \n\n* The sentence in line 417 is repeated; it was already mentioned that Williams et al. (2021) advocate taking the arccos of CKA to align with distance metric axioms.\n\n* Appendix B.1 could provide more dataset details rather than referring readers to other works. Including information such as dataset dimensions and data collection methods would be helpful.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)