{"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/what-makes-data-suitable-for-a-locally","title":"What Makes Data Suitable for a Locally Connected Neural Network? A Necessary and Sufficient Condition Based on Quantum Entanglement","arxiv_id":"2303.11249","date":"2023-03-20","proceeding":null,"authors":["Yotam Alexander","Nimrod De La Vega","Noam Razin","Nadav Cohen"],"abstract":"The question of what makes a data distribution suitable for deep learning is a fundamental open problem. Focusing on locally connected neural networks (a prevalent family of architectures that includes convolutional and recurrent neural networks as well as local self-attention models), we address this problem by adopting theoretical tools from quantum physics. Our main theoretical result states that a certain locally connected neural network is capable of accurate prediction over a data distribution if and only if the data distribution admits low quantum entanglement under certain canonical partitions of features. As a practical application of this result, we derive a preprocessing method for enhancing the suitability of a data distribution to locally connected neural networks. Experiments with widespread models over various datasets demonstrate our findings. We hope that our use of quantum entanglement will encourage further adoption of tools from physics for formally reasoning about the relation between deep learning and real-world data.","url_abs":"https://arxiv.org/abs/2303.11249v5","url_pdf":"https://arxiv.org/pdf/2303.11249v5.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":"what-makes-data-suitable-for-a-locally","repo_url":"https://github.com/nmd95/data_suitable_lc_nn_code","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"deep-learning","task_name":"Deep Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2303.11249","atlas_url":"https://app.syntology.ai/?focus=2303.11249","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.11249"}},"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/danielajisafe/Audio_WaveForm_","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/lucidrains/local-attention","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nmd95/data_suitable_lc_nn_code","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":9,"ran_violates":3,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":8,"ran":8,"repositories":1},"found_in_text":{"samples":7,"ran":6,"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":"0d569724bd138801","entry":"FeedForward","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"models/local_attention.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/models/local_attention.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":"0d569724bd138801"}},{"code_sha256_prefix":"a1046a51a674e467","entry":"create_index_map","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"common/data_utils.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/common/data_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":"a1046a51a674e467"}},{"code_sha256_prefix":"10e461943197ec33","entry":"create_q_multidim","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"rearrangement_algorithms/igtd.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/rearrangement_algorithms/igtd.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":"10e461943197ec33"}},{"code_sha256_prefix":"60fff7c3c400d7ff","entry":"default","repo":"lucidrains/local-attention","repo_kind":"found_in_text","path":"local_attention/transformer.py","file_url":"https://github.com/lucidrains/local-attention/blob/HEAD/local_attention/transformer.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"b5307f70349f5c27","entry":"default","repo":"lucidrains/local-attention","repo_kind":"found_in_text","path":"local_attention/local_attention.py","file_url":"https://github.com/lucidrains/local-attention/blob/HEAD/local_attention/local_attention.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b5307f70349f5c27"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"lucidrains/local-attention","repo_kind":"found_in_text","path":"local_attention/local_attention.py","file_url":"https://github.com/lucidrains/local-attention/blob/HEAD/local_attention/local_attention.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"b0ce87c616f140a4","entry":"get_optimizer_and_scheduler","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/models/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":"b0ce87c616f140a4"}},{"code_sha256_prefix":"3eb58dae620046d3","entry":"l2norm","repo":"lucidrains/local-attention","repo_kind":"found_in_text","path":"local_attention/transformer.py","file_url":"https://github.com/lucidrains/local-attention/blob/HEAD/local_attention/transformer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3eb58dae620046d3"}},{"code_sha256_prefix":"19f6a689dc934e45","entry":"load_configuration","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"configs/config_utils.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/configs/config_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":"19f6a689dc934e45"}},{"code_sha256_prefix":"ca019c11c4f8c20a","entry":"permute_elements","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"common/data_utils.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/common/data_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":"ca019c11c4f8c20a"}},{"code_sha256_prefix":"7109b50374757d1d","entry":"prepare_model","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/models/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":"7109b50374757d1d"}},{"code_sha256_prefix":"970d663a0ca4c94d","entry":"rearrange_partitions","repo":"nmd95/data_suitable_lc_nn_code","repo_kind":"official","path":"common/data_utils.py","file_url":"https://github.com/nmd95/data_suitable_lc_nn_code/blob/HEAD/common/data_utils.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":"970d663a0ca4c94d"}},{"code_sha256_prefix":"1147383164fd3a66","entry":"rotate_half","repo":"lucidrains/local-attention","repo_kind":"found_in_text","path":"local_attention/rotary.py","file_url":"https://github.com/lucidrains/local-attention/blob/HEAD/local_attention/rotary.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":"1147383164fd3a66"}},{"code_sha256_prefix":"f092dd8a37a00a6e","entry":"to","repo":"lucidrains/local-attention","repo_kind":"found_in_text","path":"local_attention/local_attention.py","file_url":"https://github.com/lucidrains/local-attention/blob/HEAD/local_attention/local_attention.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f092dd8a37a00a6e"}},{"code_sha256_prefix":"7b83cdd495fff4d9","entry":"apply_rotary_pos_emb","repo":"lucidrains/local-attention","repo_kind":"found_in_text","path":"local_attention/rotary.py","file_url":"https://github.com/lucidrains/local-attention/blob/HEAD/local_attention/rotary.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":"7b83cdd495fff4d9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}