Here is a blog-style summary of the paper "Similarity and Matching of Neural Network Representations".
TL;DR
By introducing a "Dr. Frankenstein" toolset that stitches the bottom half of one neural network to the top half of another, this paper demonstrates that independently trained networks share highly compatible internal representations. Crucially, the authors reveal a striking disconnect between statistical similarity metrics (like CKA) and actual functional performance, proving that two representations can look statistically different while remaining completely interchangeable on a task.
What Problem Does This Paper Address?
Deep neural networks are notoriously difficult to interpret. A fundamental question in deep learning research is: Do two networks trained on the same task learn the same internal features?
To answer this, researchers typically rely on representational similarity indices like Centered Kernel Alignment (CKA) or Canonical Correlation Analysis (CCA). These metrics look at the mathematical embeddings of data inside the network layers and calculate how geometrically aligned they are. However, these methods suffer from a major blind spot: they only look at the data geometry, ignoring the actual function of the network.
This paper shifts the paradigm from representational similarity to functional similarity. Instead of asking if two internal representations look the same, the authors ask: Can Network B successfully complete its task using the internal representations learned by Network A?
Methods
The authors introduce an evaluation framework dubbed Dr. Frankenstein to perform model stitching.
Network A (Bottom) ---> [ Stitching Layer (Affine/1x1 Conv) ] ---> Network B (Top) ---> Task Output
They take two pre-trained networks (Model 1 and Model 2), split them at a specific layer, and insert a simple, single-layer affine transformation (a 1x1 convolutional layer) between them. This "stitching layer" aligns the activations of Model 1 so they can be fed into Model 2.
The authors explore two main ways to find the optimal stitching layer:
- Direct Matching: Aligning the representations using only the raw activations themselves via analytical methods like Least Squares, Orthogonal Procrustes, or Singular Value Decomposition (SVD).
- Task Loss Matching: Using backpropagation to train the stitching layer directly on the network's final objective function (e.g., cross-entropy), optimizing for final task performance.
They also experiment with adding $L_1$ regularization to force sparse, neuron-to-neuron mappings, and bottleneck layers to test low-rank representations.
Datasets
The methods were validated across standard computer vision benchmarks using diverse network architectures:
- CIFAR-10: Used to evaluate a simple 10-layer convnet (Tiny-10) and a standard ResNet-20.
- CelebA: A 40-label face attribute dataset used to evaluate the larger Inception V1 architecture.
- ImageNet: Used in cross-task experiments where a model trained on ImageNet was stitched into a model trained on CelebA.
Key Insights and Ideas
- The "Matchability" Phenomenon: Neural networks are surprisingly flexible. Even when two identical architectures are trained from completely different random initializations, their internal representations can be aligned using a single linear layer with virtually zero loss in final task accuracy.
- The CKA Paradox: Popular statistical metrics like CKA do not perfectly reflect functional performance. In a striking experiment, the authors trained a stitching layer while explicitly penalizing the CKA value. The CKA score plummeted below 0.7, yet the stitched network maintained near 100% relative accuracy.
- Variance $\neq$ Importance: When forcing a low-rank bottleneck using SVD, direct geometric matching performs poorly compared to task-loss optimization. This implies that the directions in activation space with the highest geometric variance (what SVD captures) are not necessarily the ones carrying the most vital information for the task.
Key Results
- Near-Perfect Stitching: On ResNet-20 (CIFAR-10), task loss matching achieved virtually identical accuracy to the unstitched baseline models across almost all layers.
- Cross-Task Compatibility: In a cross-task setup (stitching an ImageNet-trained model into a CelebA-trained model), the hybrid network experienced only a ~3% relative drop in accuracy at the highest layers, and practically 0% at lower layers, proving that early-stage features are highly generic and transferable.
- Robustness to Sparsity: When forcing sparsity via $L_1$ regularization, task loss matching maintained high accuracy even when 80-90% of the stitching matrix entries were zeroed out, whereas direct activation matching collapsed entirely.
Limitations and Future Work
- Lower Bounds: The performance of the stitched models represents a lower bound because optimizing the stitching layer can occasionally get trapped in poor local minima.
- Architecture Scope: The study focuses exclusively on well-established convolutional neural networks (CNNs). While the authors note concurrent work showing success with Transformers, they did not deeply explore non-convolutional architectures themselves.
- Isolation of Variables: The effects of network width were analyzed in isolation, leaving room for a more holistic study on how width and depth interact during model stitching.
Summary updated