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

Introduction

In the quest to build "brain-like" artificial intelligence, researchers rely heavily on similarity measures—such as Centered Kernel Alignment (CKA), Normalized Bures Similarity (NBS), or Procrustes distance—to quantify how closely a model’s internal representations match actual neural recordings. However, the field lacks a definitive "ground truth" for these metrics. We do not truly know what a "good" score looks like, nor do we fully understand what features of the data these metrics prioritize.

There is a significant risk that a model might achieve a high similarity score simply by matching the "loudest" (highest variance) components of brain activity. These high-variance components might just be background noise or generic signals, allowing a model to score well while completely missing the subtle, low-variance patterns that actually encode behavior or thought. This paper introduces a "stress test" for these metrics, using gradient descent to "hack" similarity scores and reveal their underlying biases.

Methodology: Differentiable Optimization

To pull back the curtain on what these metrics actually measure, the authors propose a novel framework: Differentiable Optimization of Similarity Scores.

Optimization of a synthetic dataset to match a reference neural dataset

Instead of comparing a pre-trained model to a brain, the researchers start with a dataset of pure Gaussian noise. They then use gradient descent to iteratively "sculpt" that noise until it maximizes a specific similarity score (e.g., CKA) relative to a reference neural dataset.

Once they generate this optimized synthetic dataset, they perform two key evaluations:

  1. Decoding Analysis: Can task-relevant variables (like the direction a monkey is moving its arm) be decoded from the synthetic data as effectively as from the original brain data?
  2. Principal Component (PC) Analysis: Which dimensions of the brain data did the metric "force" the synthetic data to learn first?

They also employ Joint Optimization to observe if maximizing one metric automatically leads to a high score in another, helping to define the mathematical boundaries and strictness of different measures.

Neural Datasets

The study grounds its synthetic experiments using electrode recordings from five distinct primate experiments. These datasets cover a diverse range of brain regions and cognitive behaviors.

Overview of the similarity scores and neural datasets used in the study

The datasets include:

  • Prefrontal Cortex (PFC): Contextual decision-making (Mante 2013).
  • Frontal Eye Fields (FEF): Visual attention and saccades (Siegel 2015).
  • Primary Motor Cortex (M1): Reaching tasks (Hatsopoulos 2007).
  • Inferior Temporal Cortex (IT): Object recognition (Majaj 2015).
  • V1/V2 Visual Areas: Texture and noise processing (Freeman 2013).

Key Insights and Results

The Variance Bias

The authors mathematically derive and empirically show that metrics are not created equal when it comes to variance. CKA is heavily biased toward the highest-variance principal components. Because it relies on the Frobenius norm (which squares values), it effectively ignores lower-variance dimensions. In contrast, Angular Procrustes and NBS have a linear dependence on variance, making them much more sensitive to the "finer details" encoded in lower-variance dimensions.

High Scores Do Not Guarantee Good Models

Because of this variance bias, it is possible to "cheat" metrics like CKA. The authors successfully created synthetic datasets with CKA scores near 1.0 that were almost entirely useless for decoding the actual task the monkey was performing. The metric was satisfied by matching high-variance noise, ignoring the task-relevant signals.

No Universal Threshold

A "good" score is entirely relative. A score of 0.8 might indicate excellent alignment for one dataset but be mediocre for another. The optimization dynamics on real neural data are almost perfectly predicted by synthetic Gaussian datasets with matched variance profiles, suggesting that the behavior of these metrics is driven more by the statistics of the data (the "power spectrum" of variances) than by the actual biological signals.

Metric Hierarchy

Joint optimization revealed an asymmetric relationship between metrics. A high Angular Procrustes score almost always implies a high CKA score, but a high CKA score tells you very little about the Procrustes alignment. This hierarchy suggests that Procrustes is a "stricter" and potentially more meaningful metric for evaluating true representational alignment.

Limitations and Future Work

The authors acknowledge that their study focuses primarily on differentiable, geometry-based measures. Non-differentiable measures or those based on different mathematical foundations, such as Information Theory, might exhibit different behaviors and biases.

Furthermore, while the study demonstrates that gradient descent can "hack" these scores, the behavior of the optimization algorithm itself might introduce its own biases. Future work could explore how these insights apply to more complex, non-linear models and whether new metrics can be designed to be explicitly "variance-invariant," forcing them to prioritize task-relevant signals regardless of their magnitude. To aid ongoing research, the authors have released a Python package that benchmarks and standardizes approximately 100 different similarity measures, aiming to bring more rigor to model-brain comparisons.

Summary updated

BibTeX
@inproceedings{cloos2025differentiable,
  author = {Nathan Cloos and Moufan Li and Markus Siegel and Scott L Brincat and Earl K Miller and Guangyu Robert Yang and Christopher J Cueva},
  title = {{Differentiable Optimization of Similarity Scores Between Models and Brains}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=vWRwdmA3wU},
}
Figure