{"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/clustering-units-in-neural-networks-upstream","title":"Clustering units in neural networks: upstream vs downstream information","arxiv_id":"2203.11815","date":"2022-03-22","proceeding":null,"authors":["Richard D. Lange","David S. Rolnick","Konrad P. Kording"],"abstract":"It has been hypothesized that some form of \"modular\" structure in artificial neural networks should be useful for learning, compositionality, and generalization. However, defining and quantifying modularity remains an open problem. We cast the problem of detecting functional modules into the problem of detecting clusters of similar-functioning units. This begs the question of what makes two units functionally similar. For this, we consider two broad families of methods: those that define similarity based on how units respond to structured variations in inputs (\"upstream\"), and those based on how variations in hidden unit activations affect outputs (\"downstream\"). We conduct an empirical study quantifying modularity of hidden layer representations of simple feedforward, fully connected networks, across a range of hyperparameters. For each model, we quantify pairwise associations between hidden units in each layer using a variety of both upstream and downstream measures, then cluster them by maximizing their \"modularity score\" using established tools from network science. We find two surprising results: first, dropout dramatically increased modularity, while other forms of weight regularization had more modest effects. Second, although we observe that there is usually good agreement about clusters within both upstream methods and downstream methods, there is little agreement about the cluster assignments across these two families of methods. This has important implications for representation-learning, as it suggests that finding modular representations that reflect structure in inputs (e.g. disentanglement) may be a distinct goal from learning modular representations that reflect structure in outputs (e.g. compositionality).","url_abs":"https://arxiv.org/abs/2203.11815v1","url_pdf":"https://arxiv.org/pdf/2203.11815v1.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":"clustering-units-in-neural-networks-upstream","repo_url":"https://github.com/wrongu/modularity","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"disentanglement","task_name":"Disentanglement"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"dropout","method_name":"Dropout"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2203.11815","atlas_url":"https://app.syntology.ai/?focus=2203.11815","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.11815"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wrongu/modularity","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":13,"unverified":2},"by_repo_kind":{"official":{"samples":15,"ran":13,"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":"3c8817de7268fd3e","entry":"best_model","repo":"wrongu/modularity","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/analysis.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":"3c8817de7268fd3e"}},{"code_sha256_prefix":"8f1b37230e0e63f7","entry":"corrcov","repo":"wrongu/modularity","repo_kind":"official","path":"associations.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/associations.py","link_basis":"harvester_set","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":"8f1b37230e0e63f7"}},{"code_sha256_prefix":"e97a9f275da126b0","entry":"girvan_newman","repo":"wrongu/modularity","repo_kind":"official","path":"modularity.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/modularity.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":"e97a9f275da126b0"}},{"code_sha256_prefix":"e777d089d7f9983f","entry":"is_iterable","repo":"wrongu/modularity","repo_kind":"official","path":"util.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/util.py","link_basis":"harvester_set","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":"e777d089d7f9983f"}},{"code_sha256_prefix":"ff44186668c788a6","entry":"is_valid_adjacency_matrix","repo":"wrongu/modularity","repo_kind":"official","path":"modularity.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/modularity.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":"ff44186668c788a6"}},{"code_sha256_prefix":"7822097901139cf2","entry":"last_model","repo":"wrongu/modularity","repo_kind":"official","path":"analysis.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/analysis.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":"7822097901139cf2"}},{"code_sha256_prefix":"e043f2d92ffd7dab","entry":"log2prob","repo":"wrongu/modularity","repo_kind":"official","path":"probability.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/probability.py","link_basis":"harvester_set","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":"e043f2d92ffd7dab"}},{"code_sha256_prefix":"b90540f21b539e44","entry":"log_normalize","repo":"wrongu/modularity","repo_kind":"official","path":"probability.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/probability.py","link_basis":"harvester_set","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":"b90540f21b539e44"}},{"code_sha256_prefix":"028c5c4fc9dd3797","entry":"merge_dicts","repo":"wrongu/modularity","repo_kind":"official","path":"util.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/util.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":"028c5c4fc9dd3797"}},{"code_sha256_prefix":"a828da824800b5de","entry":"prod","repo":"wrongu/modularity","repo_kind":"official","path":"models/cifar10.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/models/cifar10.py","link_basis":"harvester_set","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":"a828da824800b5de"}},{"code_sha256_prefix":"a7f0e094813bc883","entry":"soft_num_clusters","repo":"wrongu/modularity","repo_kind":"official","path":"modularity.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/modularity.py","link_basis":"harvester_set","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":"a7f0e094813bc883"}},{"code_sha256_prefix":"50bc4124ee074d37","entry":"temperature","repo":"wrongu/modularity","repo_kind":"official","path":"probability.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/probability.py","link_basis":"harvester_set","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":"50bc4124ee074d37"}},{"code_sha256_prefix":"8514a1c62a638ec8","entry":"validate_layer_size","repo":"wrongu/modularity","repo_kind":"official","path":"models/cifar10.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/models/cifar10.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":"8514a1c62a638ec8"}},{"code_sha256_prefix":"57f67813b1665e3b","entry":"sum_hessian","repo":"wrongu/modularity","repo_kind":"official","path":"associations.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/associations.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":"57f67813b1665e3b"}},{"code_sha256_prefix":"bf597a04bcc92e05","entry":"sum_hessian_conv","repo":"wrongu/modularity","repo_kind":"official","path":"associations.py","file_url":"https://github.com/wrongu/modularity/blob/HEAD/associations.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":"bf597a04bcc92e05"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}