{"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/characterizing-out-of-distribution","title":"Characterizing out-of-distribution generalization of neural networks: application to the disordered Su-Schrieffer-Heeger model","arxiv_id":"2406.10012","date":"2024-06-14","proceeding":null,"authors":["Kacper Cybiński","Marcin Płodzień","Michał Tomza","Maciej Lewenstein","Alexandre Dauphin","Anna Dawid"],"abstract":"Machine learning (ML) is a promising tool for the detection of phases of matter. However, ML models are also known for their black-box construction, which hinders understanding of what they learn from the data and makes their application to novel data risky. Moreover, the central challenge of ML is to ensure its good generalization abilities, i.e., good performance on data outside the training set. Here, we show how the informed use of an interpretability method called class activation mapping (CAM), and the analysis of the latent representation of the data with the principal component analysis (PCA) can increase trust in predictions of a neural network (NN) trained to classify quantum phases. In particular, we show that we can ensure better out-of-distribution generalization in the complex classification problem by choosing such an NN that, in the simplified version of the problem, learns a known characteristic of the phase. We show this on an example of the topological Su-Schrieffer-Heeger (SSH) model with and without disorder, which turned out to be surprisingly challenging for NNs trained in a supervised way. This work is an example of how the systematic use of interpretability methods can improve the performance of NNs in scientific problems.","url_abs":"https://arxiv.org/abs/2406.10012v1","url_pdf":"https://arxiv.org/pdf/2406.10012v1.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"characterizing-out-of-distribution","repo_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2406.10012","atlas_url":"https://app.syntology.ai/?focus=2406.10012","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.10012"}},"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/kcybinski/interpreting_nns_for_topological_phases_of_matter","reach":{"status":"ok"}}],"summary":{"ran":4,"unverified":9},"by_repo_kind":{"official":{"samples":13,"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":13,"samples":[{"code_sha256_prefix":"5cc1278ad1a88e4f","entry":"Thermometer","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/thermometer_encoding.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/thermometer_encoding.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":"5cc1278ad1a88e4f"}},{"code_sha256_prefix":"8d382550d35731fb","entry":"compute_covariance","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/coral.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/coral.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":"8d382550d35731fb"}},{"code_sha256_prefix":"8000cd8b01b06ba5","entry":"coral","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/coral.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/coral.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":"8000cd8b01b06ba5"}},{"code_sha256_prefix":"01b90d0e11981a1e","entry":"get_preds_from_model","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/utils.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":"01b90d0e11981a1e"}},{"code_sha256_prefix":"bafa2aa6a204ba9f","entry":"calc_Dim","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/data_generation.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/data_generation.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":"bafa2aa6a204ba9f"}},{"code_sha256_prefix":"82c643b9633d049d","entry":"calc_dim_tab","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/data_generation.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/data_generation.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":"82c643b9633d049d"}},{"code_sha256_prefix":"91884918abc54a17","entry":"get_tensor_basis","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/data_generation.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/data_generation.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":"91884918abc54a17"}},{"code_sha256_prefix":"63052d81412770ae","entry":"one_hot","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/thermometer_encoding.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/thermometer_encoding.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":"63052d81412770ae"}},{"code_sha256_prefix":"518b0ded87c400a4","entry":"one_hot_to_thermometer","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/thermometer_encoding.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/thermometer_encoding.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":"518b0ded87c400a4"}},{"code_sha256_prefix":"822c059c5f109d5b","entry":"prepare_dfs","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/utils.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":"822c059c5f109d5b"}},{"code_sha256_prefix":"34fd79e9c20497fd","entry":"returnCAM","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/cam_utils.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/cam_utils.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":"34fd79e9c20497fd"}},{"code_sha256_prefix":"1dcac578d4759333","entry":"test_model","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/utils.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":"1dcac578d4759333"}},{"code_sha256_prefix":"14456da0d059f968","entry":"upsample_CAM","repo":"kcybinski/interpreting_nns_for_topological_phases_of_matter","repo_kind":"official","path":"src/cam_utils.py","file_url":"https://github.com/kcybinski/interpreting_nns_for_topological_phases_of_matter/blob/HEAD/src/cam_utils.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":"14456da0d059f968"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}