{"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/on-the-ability-of-deep-networks-to-learn","title":"On the Ability of Deep Networks to Learn Symmetries from Data: A Neural Kernel Theory","arxiv_id":"2412.11521","date":"2024-12-16","proceeding":null,"authors":["Andrea Perin","Stephane Deny"],"abstract":"Symmetries (transformations by group actions) are present in many datasets, and leveraging them holds significant promise for improving predictions in machine learning. In this work, we aim to understand when and how deep networks can learn symmetries from data. We focus on a supervised classification paradigm where data symmetries are only partially observed during training: some classes include all transformations of a cyclic group, while others include only a subset. We ask: can deep networks generalize symmetry invariance to the partially sampled classes? In the infinite-width limit, where kernel analogies apply, we derive a neural kernel theory of symmetry learning to address this question. The group-cyclic nature of the dataset allows us to analyze the spectrum of neural kernels in the Fourier domain; here we find a simple characterization of the generalization error as a function of the interaction between class separation (signal) and class-orbit density (noise). We observe that generalization can only be successful when the local structure of the data prevails over its non-local, symmetric, structure, in the kernel space defined by the architecture. This occurs when (1) classes are sufficiently distinct and (2) class orbits are sufficiently dense. Our framework also applies to equivariant architectures (e.g., CNNs), and recovers their success in the special case where the architecture matches the inherent symmetry of the data. Empirically, our theory reproduces the generalization failure of finite-width networks (MLP, CNN, ViT) trained on partially observed versions of rotated-MNIST. We conclude that conventional networks trained with supervision lack a mechanism to learn symmetries that have not been explicitly embedded in their architecture a priori. Our framework could be extended to guide the design of architectures and training procedures able to learn symmetries from data.","url_abs":"https://arxiv.org/abs/2412.11521v1","url_pdf":"https://arxiv.org/pdf/2412.11521v1.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":"on-the-ability-of-deep-networks-to-learn","repo_url":"https://github.com/andrea-perin/gpsymm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok"}}],"tasks":[{"task_slug":"rotated-mnist","task_name":"Rotated MNIST"}],"methods":[{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2412.11521","atlas_url":"https://app.syntology.ai/?focus=2412.11521","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.11521"}},"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/andrea-perin/gpsymm","reach":{"status":"ok"}}],"summary":{"unverified":13},"by_repo_kind":{"official":{"samples":13,"ran":0,"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":13,"samples":[{"code_sha256_prefix":"0898c848918c24cf","entry":"clean_3d_ax","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"toy_model.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/toy_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0898c848918c24cf"}},{"code_sha256_prefix":"3f316e7891ba93af","entry":"concat_interleave","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"multiple_seeds.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/multiple_seeds.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3f316e7891ba93af"}},{"code_sha256_prefix":"6a332e60f9de2df6","entry":"get_accuracy","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"fig1_data.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/fig1_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a332e60f9de2df6"}},{"code_sha256_prefix":"d84ad4a8e8e79bf4","entry":"get_data","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"toy_model.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/toy_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d84ad4a8e8e79bf4"}},{"code_sha256_prefix":"4be11eaa4df4a60d","entry":"get_datasets","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"fig1_data.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/fig1_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4be11eaa4df4a60d"}},{"code_sha256_prefix":"36d6f4ac12d38853","entry":"get_datasets","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"groktest.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/groktest.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"36d6f4ac12d38853"}},{"code_sha256_prefix":"a96b39483c358815","entry":"get_deltasq","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"cntk.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/cntk.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a96b39483c358815"}},{"code_sha256_prefix":"45893237407af809","entry":"get_deltasq","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"mlp_ntk.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/mlp_ntk.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"45893237407af809"}},{"code_sha256_prefix":"037d500be599ab91","entry":"get_projected_radius","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"mlp_ntk.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/mlp_ntk.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"037d500be599ab91"}},{"code_sha256_prefix":"e9b2a858f1ea102b","entry":"kaiming_uniform_pytree","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"m_classification.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/m_classification.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e9b2a858f1ea102b"}},{"code_sha256_prefix":"7f1d2d2eaaff7f24","entry":"loss","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"mlp_trained.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/mlp_trained.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7f1d2d2eaaff7f24"}},{"code_sha256_prefix":"45bd5b7e41a05327","entry":"set_seed_and_generator","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"fig1_data.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/fig1_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"45bd5b7e41a05327"}},{"code_sha256_prefix":"2f3600edc6e640ec","entry":"train_apply","repo":"andrea-perin/gpsymm","repo_kind":"official","path":"m_classification.py","file_url":"https://github.com/andrea-perin/gpsymm/blob/HEAD/m_classification.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2f3600edc6e640ec"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}