[Paper Review] Similarity of Neural Network Representations Revisited
The paper introduces centered kernel alignment (CKA) as a robust, non-invertible-transform-invariant measure to compare neural network representations, showing it reliably matches corresponding layers across random initializations and architectures, unlike prior methods like CCA.
Recent work has sought to understand the behavior of neural networks by comparing representations between layers and between different trained models. We examine methods for comparing neural network representations based on canonical correlation analysis (CCA). We show that CCA belongs to a family of statistics for measuring multivariate similarity, but that neither CCA nor any other statistic that is invariant to invertible linear transformation can measure meaningful similarities between representations of higher dimension than the number of data points. We introduce a similarity index that measures the relationship between representational similarity matrices and does not suffer from this limitation. This similarity index is equivalent to centered kernel alignment (CKA) and is also closely connected to CCA. Unlike CCA, CKA can reliably identify correspondences between representations in networks trained from different initializations.
Motivation & Objective
- Motivate a principled way to measure similarity between neural network representations.
- Critically analyze existing similarity measures and their invariance properties.
- Introduce centered kernel alignment (CKA) and relate it to CCA and regression.
- Demonstrate CKA’s ability to identify layer correspondences across initializations and architectures.
- Explore how representation similarity evolves with width, depth, and across datasets.
Proposed method
- Define and formalize similarity indices with respect to invariances (orthogonal, invertible linear, isotropic scaling).
- Propose Centered Kernel Alignment (CKA) as a scalable, invariant similarity measure using HSIC normalization.
- Relate linear CKA to CCA and linear regression, and discuss kernel choices (linear and RBF).
- Compare CKA with existing methods (CCA, SVCCA, PWCCA, linear regression, HSIC) under various invariances.
- Empirically evaluate layer correspondence, architecture depth/width effects, and cross-dataset similarity on CIFAR-10/ CIFAR-100 using CNNs and Transformers.
Experimental results
Research questions
- RQ1Can CKA reliably identify layer correspondences between networks trained with different random initializations?
- RQ2How do width, depth, and architectural differences affect representational similarity as measured by CKA?
- RQ3Are early-layer representations more similar across datasets than later layers?
- RQ4How does CKA compare to prior similarity measures (CCA, SVCCA, PWCCA, linear regression) in identifying correspondences across architectures?
- RQ5What is the geometric interpretation of the shared subspace captured by CKA in neural representations?
Key findings
- CKA consistently identifies correspondences between layers across networks initialized differently and with different widths, outperforming CCA, SVCCA, and PWCCA in this regard.
- Increasing network width leads to higher representation similarity across networks, and early layers saturate similarity with fewer channels than later layers.
- Early-layer representations tend to be more dataset-agnostic than later layers; representations across CIFAR-10 and CIFAR-100 are similar in early layers but diverge later.
- CKA can reveal architectural structure, such as grid-like patterns in ResNets and layer-group similarity tied to feature map scales, which other indexes miss.
- Linear CKA aligns with CCA under certain transformations, while also providing robustness to perturbations and avoiding the inversion limitation of some multivariate statistics.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.