Skip to content
Last Dictionary

centered kernel alignment

nounAlso: CKA, linear CKA, representational similarity analysis, RSA (neuroscience), SVCCA

In plain wordsA score from 0 to 1 measuring how similar two neural networks' internal representations are, by comparing how each arranges the same set of inputs relative to one another.

  1. A similarity index for comparing representations — two layers of one network, say, or the same layer in networks trained from different random seeds — computed on the same set of n inputs. Each representation is summarized by an n × n similarity (kernel) matrix over the inputs; after centering, CKA is the normalized inner product of the two matrices, so it asks whether both representations place the inputs in similar relative positions, whatever their dimensionality. With linear kernels it reduces to the formula shown. CKA is invariant to orthogonal transformations and uniform scaling but not to arbitrary invertible linear maps, a property its proponents argue is necessary for meaningful comparisons of wide networks. It has been used to reveal block structure among the layers of very wide or deep networks and to test the universality hypothesisuniversality hypothesis, n.: The idea that different AI models trained on similar tasks tend to develop the same internal concepts and mechanisms, so what is learned about one model may carry over to others.. Related indices include canonical-correlation methods (SVCCA, PWCCA) and representational similarity analysis from neuroscience. Studies have shown that such scores can be dominated by a few high-variance directions or altered without changing a network's behavior.

    Linear CKA between the two seeds is above 0.9 for early layers but drops to 0.6 near the output.

CKA⁡(X,Y)=∥Y⊤X∥F2∥X⊤X∥F ∥Y⊤Y∥F(X,Y column-centered)\operatorname{CKA}(X, Y) = \frac{\lVert Y^{\top} X \rVert_F^{2}}{\lVert X^{\top} X \rVert_F \, \lVert Y^{\top} Y \rVert_F} \quad (X, Y \text{ column-centered})

Origin

Centered kernel alignment was introduced for kernel learning by Corinna Cortes, Mehryar Mohri and Afshin Rostamizadeh in work published 2010–2012. Simon Kornblith, Mohammad Norouzi, Honglak Lee and Geoffrey Hinton proposed it for comparing neural-network representations in 'Similarity of Neural Network Representations Revisited' (ICML 2019), following Maithra Raghu and colleagues' SVCCA (2017). Representational similarity analysis comes from Nikolaus Kriegeskorte and colleagues' neuroscience work (2008).

Usage note

'Alignment' here means agreement between two kernel matrices, unrelated to AI alignmentAI alignment, n.: Making an AI system genuinely try to do what the people it serves want — not a literal-minded, distorted or self-serving version of it. Also the research field working on this.. Similarity scores are descriptive; they do not show that two networks use the same mechanism.

Related

See also
  • universality hypothesisuniversality hypothesis, n.: The idea that different AI models trained on similar tasks tend to develop the same internal concepts and mechanisms, so what is learned about one model may carry over to others.
  • platonic representation hypothesisplatonic representation hypothesis, n.: The idea that bigger, more capable AI models, even ones trained on different things such as images and text, end up organizing information in increasingly similar ways, as if all were mapping the same underlying world.
  • activation spaceactivation space, n.: The imaginary space of all possible internal states of one layer of a neural network, where each input becomes a point and related meanings tend to share places or directions.
  • principal component analysisprincipal component analysis, n.: A technique that finds the few directions in which data vary the most and describes each item by its position along them, compressing many measurements into a handful of summary scores.
  • representation learningrepresentation learning, n.: Letting a computer work out for itself how best to describe its data, such as the edges and shapes in images or the meanings of words, instead of relying on descriptions people design by hand.

Sources

  1. Kornblith, S., Norouzi, M., Lee, H. & Hinton, G. (2019). Similarity of Neural Network Representations Revisited. ICML 2019.
  2. Cortes, C., Mohri, M. & Rostamizadeh, A. (2012). Algorithms for Learning Kernels Based on Centered Alignment. Journal of Machine Learning Research 13.
  3. Raghu, M., Gilmer, J., Yosinski, J. & Sohl-Dickstein, J. (2017). SVCCA: Singular Vector Canonical Correlation Analysis for Deep Learning Dynamics and Interpretability. NeurIPS 2017.