Similarity of Neural Network Models: A Survey of Functional and Representational Measures

Max Klabunde, Tobias Schumacher, Markus Strohmaier, Florian Lemmerich · DOI

Deep learning models are often treated as "black boxes," making it difficult to understand why two models trained on the same data might behave differently—or why two models with completely different architectures might behave identically. This paper provides a much-needed map of the landscape, surveying over 50 different measures used to quantify the similarity between neural networks.

TL;DR

This survey provides a unified framework for measuring neural network similarity, categorizing over 50 methods into representational (internal activations) and functional (output behavior) perspectives. It highlights that similarity is not a single metric but a multi-faceted concept dependent on chosen invariances and application goals.

What Problem Does This Paper Address?

As deep learning matures, researchers need to compare models for various reasons: understanding learning dynamics, evaluating knowledge distillation, designing ensembles, or checking for model reuse (IP protection). However, "similarity" is ill-defined. Does it mean the models make the same predictions? Or that their internal "thought processes" (activations) are structured similarly?

The lack of a unified terminology and a systematic overview of these measures has led to disconnected research lines. This paper bridges that gap, providing formal definitions and analyzing the practical properties (like robustness and computational cost) of existing similarity measures.

Methods

The authors categorize similarity measures into two primary, complementary perspectives:

  1. Representational Similarity: These measures look inside the box at the activations of intermediate layers. They are often defined by their invariances—what kind of transformations (like rotating, scaling, or permuting neurons) can you apply to the activations without changing the similarity score?
  2. CCA-based: Uses Canonical Correlation Analysis to find linear combinations of neurons that are highly correlated (e.g., SVCCA, PWCCA).
  3. Alignment-based: Directly aligns one representation space to another via transformations like Orthogonal Procrustes.
  4. RSM-based: Compares Representational Similarity Matrices, which capture how similar different inputs are to each other within a single model (e.g., CKA, RSA).
  5. Neighborhood & Topology-based: Focuses on whether the "manifold" or the local neighborhood of data points is preserved across models.
  6. Functional Similarity: these measures treat the model as a black box and compare its outputs.
  7. Hard Prediction-based: Measures how often models disagree on the final label (e.g., Churn/Disagreement, Cohen’s Kappa).
  8. Soft Prediction-based: Compares the full probability distributions of outputs (e.g., Jensen-Shannon Divergence).
  9. Gradient & Adversarial-based: Checks if models have similar decision boundaries by seeing if adversarial attacks transfer between them.
  10. Model Stitching: A hybrid approach where the bottom of one model is "stitched" to the top of another to see if they can still function together.
Figure 1: A conceptual overview of representational and functional similarity. We compare a pair of neural network models f, f ′. Functional similarity measures mainly consider the outputs O, O′ of the compared models, whereas representational similarity measures consider their intermediate representations R, R′. All models get the same inputs. Specifically in classification tasks, outputs have clear and universal semantics, so that they can be compared in a straightforward manner. In contrast, the geometry of the representations requires more care when measuring their similarity. In the illustration above, for instance, rotating R by 90 degrees would yield an alignment of representations after which they would appear much more similar. Combined, representational and functional measures cover all layers of the models.

Datasets

As a survey, the paper reviews results across a vast array of standard benchmarks in:

  • Vision: ImageNet, CIFAR-10/100, SVHN.
  • Language: BERT, GPT-2, MNLI, SST-2, WikiText.
  • Graphs: Cora, Flickr, OGBN-Arxiv.
  • Benchmarks for Similarity: The authors specifically highlight the ReSi benchmark [70] as a comprehensive tool for testing representational similarity measures across these domains.

Key Insights and Ideas

  • Representational $\neq$ Functional: Models can have very similar internal representations but different outputs, or vice versa. A holistic view requires both perspectives.
  • The Invariance Hierarchy: Choosing a measure is essentially choosing what you don't care about. For example, if you believe the specific ordering of neurons shouldn't matter, you must choose a measure invariant to permutations.
  • Geometry Matters: Figure 2 illustrates how different transformations (translations, rotations, scaling) affect representations. Understanding which of these are "meaningless" for your specific task is crucial for selecting the right measure.
Figure 2: Illustration of representations considered equivalent under different invariances. The invariances form a hierarchy: Arrows describe implication, with the left invariance being more general. For AT and ILT, the same linear transformation is applied. AT further translates representations by the same vector that is used in TR. In OT, the representations are rotated (120°) and reflected over the 15° axis. In PT, axes are swapped. IS applies a scaling factor of 2. See Appendix G for exact parameter values.
  • Confounding Factors: Similarity scores are often biased by external factors. For instance, Orthogonal Procrustes distance scales with the dimensionality of the representation, making it hard to compare models of different widths without careful normalization.

Key Results

The paper provides a meta-analysis of how these measures perform in standard tests (Table 3 in the paper).

  • No "Silver Bullet": No single measure consistently outperforms all others across all tests (like layer matching or noise robustness).
  • CKA and Procrustes: Centered Kernel Alignment (CKA) and Orthogonal Procrustes are among the most popular for representational similarity due to their intuitive properties and general robustness.
  • Black-box Efficiency: Most functional measures (except Rashomon capacity) can be computed in linear time, making them highly efficient for comparing large sets of models.

Limitations and Future Work

  • Interpretability Gap: A similarity score of 0.95 is hard to interpret. Does it mean the models are nearly identical, or is that just the "baseline" similarity for any two models trained on that dataset?
  • Robustness: Some popular measures like CKA can be surprisingly sensitive to small perturbations in a single instance's representation.
  • Open Challenge: There is a significant need for more systematic research into the properties of these measures. The authors argue that we currently have many tools but a limited understanding of when to use which one. Future work should focus on improving the interpretability and robustness of these metrics.

Summary updated

BibTeX
@article{klabunde2025similarity,
  author = {Max Klabunde and Tobias Schumacher and Markus Strohmaier and Florian Lemmerich},
  title = {{Similarity of Neural Network Models: A Survey of Functional and Representational Measures}},
  journal = {ACM Computing Surveys},
  year = {2025},
  doi = {10.1145/3728458},
}
Figure