{"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/metric-space-magnitude-for-evaluating","title":"Metric Space Magnitude for Evaluating the Diversity of Latent Representations","arxiv_id":"2311.16054","date":"2023-11-27","proceeding":null,"authors":["Katharina Limbeck","Rayna Andreeva","Rik Sarkar","Bastian Rieck"],"abstract":"The magnitude of a metric space is a novel invariant that provides a measure of the 'effective size' of a space across multiple scales, while also capturing numerous geometrical properties, such as curvature, density, or entropy. We develop a family of magnitude-based measures of the intrinsic diversity of latent representations, formalising a novel notion of dissimilarity between magnitude functions of finite metric spaces. Our measures are provably stable under perturbations of the data, can be efficiently calculated, and enable a rigorous multi-scale characterisation and comparison of latent representations. We show their utility and superior performance across different domains and tasks, including (i) the automated estimation of diversity, (ii) the detection of mode collapse, and (iii) the evaluation of generative models for text, image, and graph data.","url_abs":"https://arxiv.org/abs/2311.16054v5","url_pdf":"https://arxiv.org/pdf/2311.16054v5.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":"metric-space-magnitude-for-evaluating","repo_url":"https://github.com/aidos-lab/magnitude-diversity","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"metric-space-magnitude-for-evaluating","repo_url":"https://github.com/aidos-lab/magnipy","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"dimensionality-reduction","task_name":"Dimensionality Reduction"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2311.16054","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.16054"}},"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":"deterministic:regex_extraction","url":"https://github.com/uoguelph-mlrg/GGM-metrics","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/renata-turkes/turkevs2022on","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/GuyTevet/diversity-eval","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/aidos-lab/magnipy","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/aidos-lab/magnitude-diversity","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran":30,"unverified":3},"by_repo_kind":{"official":{"samples":20,"ran":17,"repositories":1},"found_in_text":{"samples":13,"ran":13,"repositories":3}},"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":9,"samples":[{"code_sha256_prefix":"9095a8a7140419e0","entry":"CamleCase2snake_case","repo":"GuyTevet/diversity-eval","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/GuyTevet/diversity-eval/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9095a8a7140419e0"}},{"code_sha256_prefix":"5c72092158a3698e","entry":"add_and_normalize","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/approximation.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/approximation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5c72092158a3698e"}},{"code_sha256_prefix":"b274151040732cd4","entry":"add_and_normalize_asvec","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/approximation.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/approximation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"b274151040732cd4"}},{"code_sha256_prefix":"14cd7a0ab022008b","entry":"distances_scipy","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/distances.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/distances.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"14cd7a0ab022008b"}},{"code_sha256_prefix":"57bcfd22be6bc28d","entry":"distances_torch_cdist","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/distances.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/distances.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"57bcfd22be6bc28d"}},{"code_sha256_prefix":"80d356a274d36e9d","entry":"dominatingSet","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/approximation.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/approximation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"80d356a274d36e9d"}},{"code_sha256_prefix":"9e95cd27c390703a","entry":"fit","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/model.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9e95cd27c390703a"}},{"code_sha256_prefix":"c38c6f0621bdc25b","entry":"get_scales","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/scales.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/scales.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c38c6f0621bdc25b"}},{"code_sha256_prefix":"30e11bb16f36a080","entry":"get_score","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/model.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"30e11bb16f36a080"}},{"code_sha256_prefix":"390fc61038cf65b4","entry":"get_scores_under_trnsfs","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/model.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"390fc61038cf65b4"}},{"code_sha256_prefix":"74d190a61229bca5","entry":"hawkes_process","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/utils/datasets.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/utils/datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"74d190a61229bca5"}},{"code_sha256_prefix":"c0b92e7dd7294e11","entry":"interpolate_functions","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/function_operations.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/function_operations.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c0b92e7dd7294e11"}},{"code_sha256_prefix":"2a2d2f77cab8ed08","entry":"mag_convergence","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/convergence.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/convergence.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2a2d2f77cab8ed08"}},{"code_sha256_prefix":"77bc05fdc7bdda07","entry":"magitude_dimension_profile_interp","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/dimension.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/dimension.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"77bc05fdc7bdda07"}},{"code_sha256_prefix":"19370684bb74474d","entry":"parse_path_list","repo":"GuyTevet/diversity-eval","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/GuyTevet/diversity-eval/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"19370684bb74474d"}},{"code_sha256_prefix":"99e35b75b8ef77a3","entry":"plot_bar_chart","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/plots.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/plots.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"99e35b75b8ef77a3"}},{"code_sha256_prefix":"1ffb8e1cff07b206","entry":"plot_point_cloud","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/plots.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/plots.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1ffb8e1cff07b206"}},{"code_sha256_prefix":"945af43d6054ff01","entry":"represents_int","repo":"GuyTevet/diversity-eval","repo_kind":"found_in_text","path":"utils.py","file_url":"https://github.com/GuyTevet/diversity-eval/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"945af43d6054ff01"}},{"code_sha256_prefix":"0e0cf18213ce587d","entry":"sample_circle","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/data_construction.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/data_construction.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0e0cf18213ce587d"}},{"code_sha256_prefix":"b9eb1ba39ca9e0f7","entry":"sample_closed_curve","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/data_construction.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/data_construction.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b9eb1ba39ca9e0f7"}},{"code_sha256_prefix":"3938597695a61b0a","entry":"sample_levy","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/utils/datasets.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/utils/datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3938597695a61b0a"}},{"code_sha256_prefix":"69c9cfb6c70b3a98","entry":"sample_parabola","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/data_construction.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/data_construction.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"69c9cfb6c70b3a98"}},{"code_sha256_prefix":"206ca962357ee7ca","entry":"sample_sphere","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/utils/datasets.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/utils/datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"206ca962357ee7ca"}},{"code_sha256_prefix":"bd503d1c36734b04","entry":"scale_when_almost_scattered","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/scales.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/scales.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"bd503d1c36734b04"}},{"code_sha256_prefix":"7af97385a5f3cea1","entry":"scale_when_scattered","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/scales.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/scales.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7af97385a5f3cea1"}},{"code_sha256_prefix":"9dbb5a4e5682531e","entry":"time_function","repo":"uoguelph-mlrg/GGM-metrics","repo_kind":"found_in_text","path":"evaluation/gin_evaluation.py","file_url":"https://github.com/uoguelph-mlrg/GGM-metrics/blob/HEAD/evaluation/gin_evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9dbb5a4e5682531e"}},{"code_sha256_prefix":"13e464fa266c83c1","entry":"tnet","repo":"renata-turkes/turkevs2022on","repo_kind":"found_in_text","path":"SRC/point_net.py","file_url":"https://github.com/renata-turkes/turkevs2022on/blob/HEAD/SRC/point_net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"13e464fa266c83c1"}},{"code_sha256_prefix":"aa5ef8d6a72b7142","entry":"weights_cholesky","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/weights.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/weights.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5ef8d6a72b7142"}},{"code_sha256_prefix":"f865a4ad55735480","entry":"weights_cholesky_torch","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/weights.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/weights.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f865a4ad55735480"}},{"code_sha256_prefix":"40786c634187db66","entry":"weights_naive_torch","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/weights.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/weights.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"40786c634187db66"}},{"code_sha256_prefix":"84017b2cb70badb0","entry":"compute_magnitude_from_distances","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/compute.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/compute.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"84017b2cb70badb0"}},{"code_sha256_prefix":"fe1b4f6db80e1301","entry":"distances_isomap","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/distances.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/distances.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"fe1b4f6db80e1301"}},{"code_sha256_prefix":"3b042402ff1ced65","entry":"guess_convergence_scale","repo":"aidos-lab/magnipy","repo_kind":"official","path":"magnipy/magnitude/convergence.py","file_url":"https://github.com/aidos-lab/magnipy/blob/HEAD/magnipy/magnitude/convergence.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3b042402ff1ced65"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}