Introduction
In deep learning, a recurring question is whether two neural networks with different architectures or initializations have "learned the same thing." Traditional methods for comparing internal representations often rely on the geometry of feature vectors. However, researchers from Peking University and Microsoft Research argue in this 2020 paper that representation similarity should be measured by functional performance on downstream tasks. They introduce Transferred Discrepancy (TD), a task-dependent metric that reveals significant differences in models previously thought to be similar.
The Problem with Task-Agnostic Metrics
Existing metrics like Canonical Correlation Analysis (CCA) or Central Kernel Alignment (CKA) are task-agnostic. They analyze the feature space without considering the intended application. This often leads to contradictory results where one metric suggests high similarity while another suggests the opposite. The authors posit that if two models produce identical predictions for a specific task, their internal coordinate differences are secondary.
Transferred Discrepancy (TD)
The proposed metric, Transferred Discrepancy (TD), evaluates representations based on their utility for a downstream task. The process involves:
- Freezing the features of two pre-trained models.
- Training a linear probe (a simple output head) on top of each frozen model for a specific task.
- Measuring disagreement between the predictions of these two probed models on the test set.
A low TD indicates functional similarity for that task, while a high TD suggests the models captured different information. Theoretically, TD is invariant to orthogonal transformations and isotropic scaling, providing a more robust measure than its predecessors.
Key Insights: Task-Dependence and Initialization
A major finding is that similarity is inherently task-dependent. Two models may appear identical on a simple task (e.g., distinguishing animals from vehicles) but diverge significantly on more granular tasks (e.g., distinguishing specific dog breeds).
Furthermore, while task-agnostic metrics like CKA often suggest that different random initializations lead to nearly identical features, TD reveals substantial disagreement. For instance, two models trained on CIFAR-5 with different seeds showed a 21.39% disagreement rate on CIFAR-10 test samples, as shown in the data above.
TD Robustness as a Quality Signal
The authors define "TD robustness" as the similarity between models trained with different seeds. Their experiments show a strong correlation between a model's generalization ability and its TD robustness. Training techniques that improve accuracy, such as data augmentation, also tend to decrease TD (increase similarity).
As seen in the results, adding random cropping and flipping reduced TD from 0.2812 to 0.2150. Notably, adversarial training significantly enhances TD robustness, suggesting it forces networks to learn more fundamental, initialization-independent features that are less susceptible to random noise.
Conclusion
Transferred Discrepancy provides a functional lens through which to view neural representations. By focusing on downstream task performance rather than raw feature geometry, TD offers a more nuanced understanding of what models learn and how training factors like initialization and augmentation influence feature stability. Future work may extend this to fine-tuning scenarios and broader architectural components.
Summary updated