Soft Matching Distance: A metric on neural representations that captures single-neuron tuning

Meenakshi Khosla, Alex H. Williams

Introduction

Comparing neural representations is fundamental to understanding how artificial and biological systems process information. Currently, the field relies heavily on rotation-invariant metrics like Centered Kernel Alignment (CKA) and Representational Similarity Analysis (RSA). While these metrics capture the global geometry of a population response, they are fundamentally blind to the tuning of individual neurons. As illustrated in Figure 1, identical population manifolds can be generated by entirely different sets of individual neuron responses if the representation is rotated. If the specific features detected by individual neurons—such as edge detectors in vision—are computationally significant, we require a metric that is sensitive to these rotations while remaining invariant to the arbitrary indexing of neurons.

Rotation changes individual tuning curves while preserving the global manifold shape, a distinction missed by rotation-invariant metrics.

Methods: The Soft Matching Distance

To address this, the authors propose the Soft Matching Distance ($d_{\mathcal{T}}$). This metric generalizes permutation-based alignment to networks of different sizes by leveraging optimal transport theory. Specifically, the metric is equivalent to the 2-Wasserstein distance between the empirical distributions of tuning curves from two networks. By relaxing one-to-one matching to "soft" assignments within a transportation polytope, the distance can be computed efficiently via linear programming. The authors also introduce a normalized version, the Soft Matching Correlation Score ($s_{\mathcal{T}}$), which provides a similarity measure between 0 and 1.

The Convergent Basis Hypothesis

A key finding of this work is that deep networks do not just learn similar global geometries; they converge toward similar individual neuron features. Standard metrics like CKA would report perfect similarity between a network and a randomly rotated version of itself, even if the interpretable filters (e.g., Gabor-like filters in AlexNet) are destroyed. In contrast, the Soft Matching Distance correctly identifies the loss of structure in rotated bases, supporting the hypothesis that networks learn a non-arbitrary, convergent coordinate basis.

Biological Alignment

The utility of this metric is most evident when comparing artificial models to biological data. Using the Natural Scenes Dataset (NSD), the authors compared various architectures to human fMRI responses across the ventral, lateral, and dorsal visual streams. While traditional linear predictivity ($R^2$) failed to distinguish significantly between Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs), the Soft Matching Distance revealed a clear distinction.

While linear predictivity (left) shows similar performance across models, the soft-matching score (right) reveals that CNNs better capture the single-unit tuning of the human ventral stream.

Results indicate that CNNs like ResNet50 achieve higher soft-matching correlations with the human ventral stream than ViTs. This suggests that the inductive biases of CNNs lead to internal representations that more closely mirror the single-neuron tuning properties of the biological visual system.

Conclusion

Soft Matching Distance provides a mathematically rigorous framework for comparing neural representations at the level of individual unit tuning. By moving beyond rotation invariance, this metric uncovers structural alignments in both artificial and biological networks that were previously invisible, offering a more nuanced tool for the comparative study of intelligence.

Summary updated

BibTeX
@inproceedings{khosla2023soft,
  author = {Meenakshi Khosla and Alex H. Williams},
  title = {{Soft Matching Distance: A metric on neural representations that captures single-neuron tuning}},
  booktitle = {UniReps @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=BJ2SmiCZrM},
}
Figure