Skip to main content
QUICK REVIEW

[Paper Review] Similarity and Matching of Neural Network Representations

Adrián Csiszárik, Péter Kőrösi-Szabó|arXiv (Cornell University)|Oct 27, 2021
Model Reduction and Neural NetworksPhysics and Astronomy20 citations
TL;DR

This paper introduces Dr. Frankenstein, a toolset that evaluates neural network representation similarity by stitching two networks with an affine layer, demonstrating that representations from identical architectures with different initializations can be matched with high accuracy using a single affine layer. The key contribution is a functional similarity perspective that reveals discrepancies between standard similarity indices (like CKA) and actual task performance, showing that high similarity index values do not guarantee good stitching performance.

ABSTRACT

We employ a toolset -- dubbed Dr. Frankenstein -- to analyse the similarity of representations in deep neural networks. With this toolset, we aim to match the activations on given layers of two trained neural networks by joining them with a stitching layer. We demonstrate that the inner representations emerging in deep convolutional neural networks with the same architecture but different initializations can be matched with a surprisingly high degree of accuracy even with a single, affine stitching layer. We choose the stitching layer from several possible classes of linear transformations and investigate their performance and properties. The task of matching representations is closely related to notions of similarity. Using this toolset, we also provide a novel viewpoint on the current line of research regarding similarity indices of neural network representations: the perspective of the performance on a task.

Motivation & Objective

  • To investigate the functional similarity of neural network representations beyond standard statistical similarity measures.
  • To explore whether representations from identical architectures but different initializations can be functionally matched via a single affine stitching layer.
  • To evaluate the relationship between representational similarity indices (e.g., CKA) and actual task performance in stitched networks.
  • To analyze the structural properties of stitching transformations, including sparsity, uniqueness, and mode connectivity.
  • To demonstrate that task loss-based training of stitching layers outperforms direct matching, especially under sparsity constraints.

Proposed method

  • Stitch two identical deep convolutional neural networks using a single affine transformation layer between corresponding intermediate layers.
  • Train the stitching layer via either direct matching (minimizing MSE between activations) or task loss (end-to-end fine-tuning of the stitched network).
  • Use optimal least squares initialization to avoid poor local minima in the stitching layer optimization.
  • Apply L1 regularization to induce sparsity in the stitching matrix and analyze its impact on performance.
  • Perform linear mode connectivity analysis by interpolating between multiple stitching matrices and evaluating performance along the path.
  • Compare the performance of stitching layers under different initialization schemes and sparsity levels.

Experimental results

Research questions

  • RQ1Can representations from two identical but differently initialized networks be functionally matched using a single affine stitching layer?
  • RQ2To what extent do standard representational similarity indices (e.g., CKA) correlate with actual task performance in stitched networks?
  • RQ3How does sparsity in the stitching layer affect the performance of the combined network?
  • RQ4Are multiple optimal stitching transformations for the same layer connected via linear mode connectivity?
  • RQ5Does task loss-based training of the stitching layer yield better performance than direct matching, especially under sparsity constraints?

Key findings

  • Stitched networks with a single affine stitching layer achieve high accuracy (up to 97.7%) when matching representations from identical architectures with different initializations.
  • High Centered Kernel Alignment (CKA) values do not guarantee good performance in stitched networks, indicating a disconnect between standard similarity indices and functional similarity.
  • Task loss-based training of the stitching layer significantly outperforms direct matching under sparsity, maintaining high accuracy even at 90% sparsity, while direct matching degrades sharply.
  • The optimal least squares initialization consistently yields high-performing stitching layers, reducing the risk of poor local minima.
  • Linear mode connectivity holds across most layers, but fails on early layers despite high individual performance, suggesting complex optimization dynamics in early representations.
  • Stitching matrices exhibit non-trivial sparsity patterns, and the relationship between representations is not combinatorial, indicating complex functional alignment beyond simple neuron-to-neuron mapping.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.