TL;DR
Researchers at MIT have introduced a framework and Python repository to standardize the "Tower of Babel" of similarity measures used to compare artificial neural networks and biological brains. By decomposing complex measures like Centered Kernel Alignment (CKA) into their mathematical building blocks, the team provides a path toward reproducible, cross-study comparisons in representational alignment.
What Problem Does This Paper Address?
In the quest to understand how AI models relate to the human brain, researchers rely on "similarity measures"—mathematical tools that quantify how closely two systems represent the same information. However, the field is currently a Wild West of implementation.
Even a single popular measure, like Centered Kernel Alignment (CKA), has at least 12 different variations depending on the choice of kernel, estimator, and scoring method. Because different research groups use different naming conventions and code implementations, it is often impossible to tell if a difference in results is due to the underlying science or just a subtle implementation choice (like how a matrix was centered). This lack of standardization hinders the community's ability to build upon previous findings.
Methods
The authors developed a four-step standardization procedure to bring order to this chaos:
- Collection: Identifying similarity measures from prominent GitHub repositories.
- Interface Standardization: Ensuring all functions handle data arrays (e.g., transposing or centering) in a consistent way.
- Compositional Naming: Mapping each implementation to a name that reflects its mathematical components. For example, instead of just "CKA," a measure might be named
cka-kernel_linear-hsic_gretton-score. - Consistency Validation: Testing if different implementations assigned the same name actually produce the same output.
Datasets
To validate their framework, the authors used synthetic datasets. They generated a base Gaussian dataset $X$ with a specific eigenspectrum and created a sequence of comparison datasets $Y$ by adding varying levels of Gaussian noise. This allowed them to precisely control the "ground truth" similarity and test how different measure implementations responded to the same data.
Key Insights and Ideas
- Implementation details are not "details": The authors show that subtle choices—like which estimator is used for the Hilbert-Schmidt Independence Criterion (HSIC)—can lead to wildly different similarity scores for the exact same data.
- The Complexity-Consistency Trade-off: A naming convention that is too simple (e.g., calling everything "CKA") leads to high "consistency error" because different algorithms get the same name. Conversely, giving every single piece of code a unique name is too complex. The authors' framework finds the "sweet spot" where names are as simple as possible while maintaining zero consistency error.
- Deriving the Missing Links: By standardizing the math, the authors can often "derive" versions of a measure that a specific paper didn't originally implement. For instance, if a paper provides a "score" version of CKA, the framework can automatically generate the "angular distance" version.
Key Results
- Scale: The repository currently incorporates approximately 100 different similarity measures from 14 different code packages.
- Zero Consistency Error: The proposed standardized naming convention achieved a consistency error of zero, meaning that any two measures sharing a name in their system are guaranteed to produce identical results.
- Non-Equivalence: The authors demonstrated that different variations of CKA are not just linearly scaled versions of each other; they provide "different windows" into the similarity between datasets. As shown in Figure 5, the relationship between different CKA variants is often non-linear, meaning you cannot easily convert a result from one paper to another without this standardization framework.
Limitations and Future Work
The authors acknowledge that because the field is rapidly evolving, no naming convention can be truly "definitive" or fixed. Their framework is designed to be flexible and evolve alongside new research.
One technical limitation is that not all variations are mathematically derivable from one another (e.g., you cannot easily derive an unbiased estimator from a biased one just by tweaking inputs/outputs). Future work will likely involve expanding the repository to include even more diverse measures beyond the CKA and RSA families and developing more automated ways to validate new implementations as they are published.
Code available at: https://github.com/nacloos/similarity-repository
Summary updated