{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/grounding-representation-similarity-with","title":"Grounding Representation Similarity with Statistical Testing","arxiv_id":"2108.01661","date":"2021-08-03","proceeding":null,"authors":["Frances Ding","Jean-Stanislas Denain","Jacob Steinhardt"],"abstract":"To understand neural network behavior, recent works quantitatively compare different networks' learned representations using canonical correlation analysis (CCA), centered kernel alignment (CKA), and other dissimilarity measures. Unfortunately, these widely used measures often disagree on fundamental observations, such as whether deep networks differing only in random initialization learn similar representations. These disagreements raise the question: which, if any, of these dissimilarity measures should we believe? We provide a framework to ground this question through a concrete test: measures should have sensitivity to changes that affect functional behavior, and specificity against changes that do not. We quantify this through a variety of functional behaviors including probing accuracy and robustness to distribution shift, and examine changes such as varying random initialization and deleting principal components. We find that current metrics exhibit different weaknesses, note that a classical baseline performs surprisingly well, and highlight settings where all metrics appear to fail, thus providing a challenge set for further improvement.","url_abs":"https://arxiv.org/abs/2108.01661v2","url_pdf":"https://arxiv.org/pdf/2108.01661v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"grounding-representation-similarity-with","repo_url":"https://github.com/js-d/sim_metric","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null},{"paper_slug":"grounding-representation-similarity-with","repo_url":"https://github.com/brando90/ultimate-anatome","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"grounding-representation-similarity-with","repo_url":"https://github.com/moskomule/anatome","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"specificity","task_name":"Specificity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2108.01661","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.01661"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/brando90/ultimate-anatome","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/moskomule/anatome","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/js-d/sim_metric","reach":null}],"summary":{"ran_fixture":1,"ran_draft_wrong":2,"ran_violates":2,"unverified":10},"by_repo_kind":{"official":{"samples":3,"ran":3,"repositories":1},"listed":{"samples":9,"ran":0,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":6,"samples":[{"code_sha256_prefix":"e11bf983b15a4422","entry":"cca_decomp","repo":"js-d/sim_metric","repo_kind":"official","path":"dists/scoring.py","file_url":"https://github.com/js-d/sim_metric/blob/HEAD/dists/scoring.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e11bf983b15a4422"}},{"code_sha256_prefix":"5193c5e04cb818a8","entry":"landscape1d","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"5193c5e04cb818a8"}},{"code_sha256_prefix":"bc2b6fecc0fce1d0","entry":"landscape2d","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"bc2b6fecc0fce1d0"}},{"code_sha256_prefix":"46264c0d57365f61","entry":"mean_cca_corr","repo":"js-d/sim_metric","repo_kind":"official","path":"dists/scoring.py","file_url":"https://github.com/js-d/sim_metric/blob/HEAD/dists/scoring.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"46264c0d57365f61"}},{"code_sha256_prefix":"e47af62595e70b38","entry":"mean_sq_cca_corr","repo":"js-d/sim_metric","repo_kind":"official","path":"dists/scoring.py","file_url":"https://github.com/js-d/sim_metric/blob/HEAD/dists/scoring.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e47af62595e70b38"}},{"code_sha256_prefix":"ae32dd46639c53d7","entry":"add_fourier_noise","repo":"brando90/ultimate-anatome","repo_kind":"listed","path":"anatome/fourier.py","file_url":"https://github.com/brando90/ultimate-anatome/blob/HEAD/anatome/fourier.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ae32dd46639c53d7"}},{"code_sha256_prefix":"a2999dfd1ff300c1","entry":"add_fourier_noise","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/fourier.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/fourier.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a2999dfd1ff300c1"}},{"code_sha256_prefix":"e0631598d35a837f","entry":"cca","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/distance.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/distance.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e0631598d35a837f"}},{"code_sha256_prefix":"40a17642cadaf3cd","entry":"cca_by_qr","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/distance.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/distance.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"40a17642cadaf3cd"}},{"code_sha256_prefix":"55baeeb075958544","entry":"cca_by_svd","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/distance.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/distance.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55baeeb075958544"}},{"code_sha256_prefix":"158351adf6e53105","entry":"fft_shift","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/utils.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"158351adf6e53105"}},{"code_sha256_prefix":"428ae24350e49c39","entry":"fourier_map","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"428ae24350e49c39"}},{"code_sha256_prefix":"268e67909741a516","entry":"ifft_shift","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/utils.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"268e67909741a516"}},{"code_sha256_prefix":"d0cf26be2713f45f","entry":"landscape1d","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/landscape.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/landscape.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d0cf26be2713f45f"}},{"code_sha256_prefix":"3d27cb293ed77803","entry":"landscape2d","repo":"moskomule/anatome","repo_kind":"listed","path":"anatome/landscape.py","file_url":"https://github.com/moskomule/anatome/blob/HEAD/anatome/landscape.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3d27cb293ed77803"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}