Table of Contents
Fetching ...

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

Max Klabunde, Tobias Schumacher, Markus Strohmaier, Florian Lemmerich

TL;DR

The paper provides a comprehensive taxonomy and formal framework for two complementary notions of neural network similarity: representations of intermediate activations and models' outputs. It surveys and categorizes dozens of measures across six representational families (CCA-based, alignment-based, RSM-based, neighborhood-based, topology-based, descriptive statistics) and five functional categories (performance-based, hard/soft predictions, gradient/adversarial, and stitching). The work analyzes properties, invariances, robustness, and applicability while highlighting open questions and the need for systematic evaluation via benchmarks like ReSi. It aims to guide researchers and practitioners in selecting appropriate similarity measures for tasks such as distillation, pruning, continual learning, and model merging, and to spur more rigorous, context-aware analyses of model similarity.

Abstract

Measuring similarity of neural networks to understand and improve their behavior has become an issue of great importance and research interest. In this survey, we provide a comprehensive overview of two complementary perspectives of measuring neural network similarity: (i) representational similarity, which considers how activations of intermediate layers differ, and (ii) functional similarity, which considers how models differ in their outputs. In addition to providing detailed descriptions of existing measures, we summarize and discuss results on the properties of and relationships between these measures, and point to open research problems. We hope our work lays a foundation for more systematic research on the properties and applicability of similarity measures for neural network models.

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

TL;DR

The paper provides a comprehensive taxonomy and formal framework for two complementary notions of neural network similarity: representations of intermediate activations and models' outputs. It surveys and categorizes dozens of measures across six representational families (CCA-based, alignment-based, RSM-based, neighborhood-based, topology-based, descriptive statistics) and five functional categories (performance-based, hard/soft predictions, gradient/adversarial, and stitching). The work analyzes properties, invariances, robustness, and applicability while highlighting open questions and the need for systematic evaluation via benchmarks like ReSi. It aims to guide researchers and practitioners in selecting appropriate similarity measures for tasks such as distillation, pruning, continual learning, and model merging, and to spur more rigorous, context-aware analyses of model similarity.

Abstract

Measuring similarity of neural networks to understand and improve their behavior has become an issue of great importance and research interest. In this survey, we provide a comprehensive overview of two complementary perspectives of measuring neural network similarity: (i) representational similarity, which considers how activations of intermediate layers differ, and (ii) functional similarity, which considers how models differ in their outputs. In addition to providing detailed descriptions of existing measures, we summarize and discuss results on the properties of and relationships between these measures, and point to open research problems. We hope our work lays a foundation for more systematic research on the properties and applicability of similarity measures for neural network models.
Paper Structure (35 sections, 68 equations, 5 figures, 6 tables)

This paper contains 35 sections, 68 equations, 5 figures, 6 tables.

Figures (5)

  • 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 $\bm{O}, \bm{O'}$ of the compared models, whereas representational similarity measures consider their intermediate representations $\bm{R}, \bm{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 $\bm{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.
  • 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 \ref{['ap:fig2_transforms']} for exact parameter values.
  • Figure 3: Types of representational similarity measures, illustrated with 2-dimensional representations. A: Representations of $N$ instances are projected onto the $N$-dimensional unit ball, and similarity is then quantified based on their angle (their correlation). The illustration of the unit ball is not to scale, and only the first three dimensions are shown. B: Representations are aligned with each other, and similarity is computed after alignment. C: Similarity is based on comparing matrices of pairwise similarities within representations. D: Representations are compared based on similarity of their $k$ nearest neighbors, here $k=1$. E: Manifolds of the representations are approximated and compared. F: Statistics are computed individually for each representation (here: spread of instance representations) and then compared.
  • Figure 4: Types of functional similarity measures, illustrated in the context of classifying inputs with respect to their shape ($\diamond,\square, \triangle$). Performance-based (A), hard prediction-based (B), soft prediction-based (C), and gradient and adversarial example-based measures (D) compare outputs of different granularity. Model stitching (E) combines parts of two models and measures functional similarity between the resulting model and the original models.
  • Figure 5: Mean Orthogonal Procrustes scores between two matrices over increasing dimensionality with varying noise level. The matrices have $N=1000$ rows. Shuffled Baseline refers to the score between two effectively unrelated matrices, a row-wise shuffled copy of the representation matrix and the original, similar to kriegeskorte_representational_2008. The baseline is unrelated to the noise level. Scores increase until the number of dimensions matches the number of inputs ($N=D$), then stays flat. While $N>D$, the relation between the similarity score and the dimensionality follows a power law, as shown by the linear relation in the log-log plot. The standard deviation is too small to be visible. The same trend can be observed with other $N$ (not shown).