Deconfounded Representation Similarity for Comparison of Neural Networks

Tianyu Cui, Yogesh Kumar, Pekka Marttinen, Samuel Kaski
1/31/2022
stat.MLcs.LG

Official code: ykumards/simtorch (13 stars, Python, Apache-2.0, PyTorch, last commit 2025-02-27).

Abstract

Similarity metrics such as representational similarity analysis (RSA) and centered kernel alignment (CKA) have been used to compare layer-wise representations between neural networks. However, these metrics are confounded by the population structure of data items in the input space, leading to spuriously high similarity for even completely random neural networks and inconsistent domain relations in transfer learning.

Show full abstract

We introduce a simple and generally applicable fix to adjust for the confounder with covariate adjustment regression, which retains the intuitive invariance properties of the original similarity measures. We show that deconfounding the similarity metrics increases the resolution of detecting semantically similar neural networks. Moreover, in real-world applications, deconfounding improves the consistency of representation similarities with domain similarities in transfer learning, and increases correlation with out-of-distribution accuracy.

View on arXivView PDF

Code Implementations(1)

ykumards/simtorchOfficial100%
PyTorchApache-2.0

[NeurIPS'22] PyTorch library to compare similarity between NN representations

133Python, ShellNov 20, 20221 years agoApache-2.0
ckadeep-learninginterpretabilityneural-networkspytorch

Similar Papers

Cite this paper

@article{cui2022deconfounded,
  title  = {Deconfounded Representation Similarity for Comparison of Neural Networks},
  author = {Tianyu Cui and Yogesh Kumar and Pekka Marttinen and Samuel Kaski},
  year   = {2022},
  eprint = {2202.00095},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.00095}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.00095.svg)](https://codeofpaper.com/paper/2202.00095)

Discussion