{"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/intrinsic-dimension-persistent-homology-and-1","title":"Intrinsic Dimension, Persistent Homology and Generalization in Neural Networks","arxiv_id":"2111.13171","date":"2021-11-25","proceeding":"NeurIPS 2021 12","authors":["Tolga Birdal","Aaron Lou","Leonidas Guibas","Umut Şimşekli"],"abstract":"Disobeying the classical wisdom of statistical learning theory, modern deep neural networks generalize well even though they typically contain millions of parameters. Recently, it has been shown that the trajectories of iterative optimization algorithms can possess fractal structures, and their generalization error can be formally linked to the complexity of such fractals. This complexity is measured by the fractal's intrinsic dimension, a quantity usually much smaller than the number of parameters in the network. Even though this perspective provides an explanation for why overparametrized networks would not overfit, computing the intrinsic dimension (e.g., for monitoring generalization during training) is a notoriously difficult task, where existing methods typically fail even in moderate ambient dimensions. In this study, we consider this problem from the lens of topological data analysis (TDA) and develop a generic computational tool that is built on rigorous mathematical foundations. By making a novel connection between learning theory and TDA, we first illustrate that the generalization error can be equivalently bounded in terms of a notion called the 'persistent homology dimension' (PHD), where, compared with prior work, our approach does not require any additional geometrical or statistical assumptions on the training dynamics. Then, by utilizing recently established theoretical results and TDA tools, we develop an efficient algorithm to estimate PHD in the scale of modern deep neural networks and further provide visualization tools to help understand generalization in deep learning. Our experiments show that the proposed approach can efficiently compute a network's intrinsic dimension in a variety of settings, which is predictive of the generalization error.","url_abs":"https://arxiv.org/abs/2111.13171v1","url_pdf":"https://arxiv.org/pdf/2111.13171v1.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":"intrinsic-dimension-persistent-homology-and-1","repo_url":"https://github.com/tolgabirdal/phdimgeneralization","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"intrinsic-dimension-persistent-homology-and-1","repo_url":"https://github.com/benjidupuis/data_dependent_dimensions","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"learning-theory","task_name":"Learning Theory"},{"task_slug":"topological-data-analysis","task_name":"Topological Data Analysis"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2111.13171","atlas_url":"https://app.syntology.ai/?focus=2111.13171","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.13171"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/tolgabirdal/PHDimGeneralization","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tolgabirdal/phdimgeneralization","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/benjidupuis/data_dependent_dimensions","reach":{"status":"ok"}}],"summary":{"ran_honours":3,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":7,"ran":4,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"84713b36556a5bdd","entry":"get_weights","repo":"tolgabirdal/phdimgeneralization","repo_kind":"official","path":"train_analysis.py","file_url":"https://github.com/tolgabirdal/phdimgeneralization/blob/HEAD/train_analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"84713b36556a5bdd"}},{"code_sha256_prefix":"3ca6b94b401f3e65","entry":"get_weights","repo":"tolgabirdal/phdimgeneralization","repo_kind":"official","path":"train_regularize.py","file_url":"https://github.com/tolgabirdal/phdimgeneralization/blob/HEAD/train_regularize.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3ca6b94b401f3e65"}},{"code_sha256_prefix":"c2bc6461f7a89576","entry":"sample_W","repo":"tolgabirdal/phdimgeneralization","repo_kind":"official","path":"topology.py","file_url":"https://github.com/tolgabirdal/phdimgeneralization/blob/HEAD/topology.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c2bc6461f7a89576"}},{"code_sha256_prefix":"c288f58e7439e5c5","entry":"sample_W","repo":"tolgabirdal/phdimgeneralization","repo_kind":"official","path":"topology.py","file_url":"https://github.com/tolgabirdal/phdimgeneralization/blob/HEAD/topology.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c288f58e7439e5c5"}},{"code_sha256_prefix":"e8a6570666470b59","entry":"calculate_ph_dim","repo":"tolgabirdal/phdimgeneralization","repo_kind":"official","path":"topology.py","file_url":"https://github.com/tolgabirdal/phdimgeneralization/blob/HEAD/topology.py","link_basis":"first_harvest_node","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":"e8a6570666470b59"}},{"code_sha256_prefix":"082629bd467320c3","entry":"calculate_ph_dim","repo":"tolgabirdal/phdimgeneralization","repo_kind":"official","path":"topology.py","file_url":"https://github.com/tolgabirdal/phdimgeneralization/blob/HEAD/topology.py","link_basis":"first_harvest_node","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":"082629bd467320c3"}},{"code_sha256_prefix":"9602c9f82945f8cf","entry":"calculate_ph_dim_gpu","repo":"tolgabirdal/phdimgeneralization","repo_kind":"official","path":"topology.py","file_url":"https://github.com/tolgabirdal/phdimgeneralization/blob/HEAD/topology.py","link_basis":"first_harvest_node","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":"9602c9f82945f8cf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}