{"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/learning-cosmology-and-clustering-with-cosmic","title":"Learning cosmology and clustering with cosmic graphs","arxiv_id":"2204.13713","date":"2022-04-28","proceeding":null,"authors":["Pablo Villanueva-Domingo","Francisco Villaescusa-Navarro"],"abstract":"We train deep learning models on thousands of galaxy catalogues from the state-of-the-art hydrodynamic simulations of the CAMELS project to perform regression and inference. We employ Graph Neural Networks (GNNs), architectures designed to work with irregular and sparse data, like the distribution of galaxies in the Universe. We first show that GNNs can learn to compute the power spectrum of galaxy catalogues with a few percent accuracy. We then train GNNs to perform likelihood-free inference at the galaxy-field level. Our models are able to infer the value of $\\Omega_{\\rm m}$ with a $\\sim12\\%-13\\%$ accuracy just from the positions of $\\sim1000$ galaxies in a volume of $(25~h^{-1}{\\rm Mpc})^3$ at $z=0$ while accounting for astrophysical uncertainties as modelled in CAMELS. Incorporating information from galaxy properties, such as stellar mass, stellar metallicity, and stellar radius, increases the accuracy to $4\\%-8\\%$. Our models are built to be translational and rotational invariant, and they can extract information from any scale larger than the minimum distance between two galaxies. However, our models are not completely robust: testing on simulations run with a different subgrid physics than the ones used for training does not yield as accurate results.","url_abs":"https://arxiv.org/abs/2204.13713v2","url_pdf":"https://arxiv.org/pdf/2204.13713v2.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":"learning-cosmology-and-clustering-with-cosmic","repo_url":"https://github.com/PabloVD/CosmoGraphNet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2204.13713","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.13713"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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/PabloVD/CosmoGraphNet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":8},"by_repo_kind":{"official":{"samples":8,"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":0,"samples":[{"code_sha256_prefix":"6e5ceb75374ba83e","entry":"colorsuite","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/constants.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/constants.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":"6e5ceb75374ba83e"}},{"code_sha256_prefix":"92d24907643e22fd","entry":"denormalize","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/plotting.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/plotting.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":"92d24907643e22fd"}},{"code_sha256_prefix":"4999020ad90ea459","entry":"get_edges","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/load_data.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/load_data.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":"4999020ad90ea459"}},{"code_sha256_prefix":"64cacf6b7e7ecaf0","entry":"normalize_params","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/load_data.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/load_data.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":"64cacf6b7e7ecaf0"}},{"code_sha256_prefix":"0dbfb18befc36d12","entry":"normalize_ps","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/load_data.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/load_data.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":"0dbfb18befc36d12"}},{"code_sha256_prefix":"12748ea8defb4965","entry":"test","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/training.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/training.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":"12748ea8defb4965"}},{"code_sha256_prefix":"eee4e6c08031e113","entry":"train","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/training.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/training.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":"eee4e6c08031e113"}},{"code_sha256_prefix":"ba1a8be93bc4b64c","entry":"training_routine","repo":"PabloVD/CosmoGraphNet","repo_kind":"official","path":"Source/training.py","file_url":"https://github.com/PabloVD/CosmoGraphNet/blob/HEAD/Source/training.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":"ba1a8be93bc4b64c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}