{"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/from-images-to-dark-matter-end-to-end","title":"From Images to Dark Matter: End-To-End Inference of Substructure From Hundreds of Strong Gravitational Lenses","arxiv_id":"2203.00690","date":"2022-03-01","proceeding":null,"authors":["Sebastian Wagner-Carena","Jelle Aalbers","Simon Birrer","Ethan O. Nadler","Elise Darragh-Ford","Philip J. Marshall","Risa H. Wechsler"],"abstract":"Constraining the distribution of small-scale structure in our universe allows us to probe alternatives to the cold dark matter paradigm. Strong gravitational lensing offers a unique window into small dark matter halos ($<10^{10} M_\\odot$) because these halos impart a gravitational lensing signal even if they do not host luminous galaxies. We create large datasets of strong lensing images with realistic low-mass halos, Hubble Space Telescope (HST) observational effects, and galaxy light from HST's COSMOS field. Using a simulation-based inference pipeline, we train a neural posterior estimator of the subhalo mass function (SHMF) and place constraints on populations of lenses generated using a separate set of galaxy sources. We find that by combining our network with a hierarchical inference framework, we can both reliably infer the SHMF across a variety of configurations and scale efficiently to populations with hundreds of lenses. By conducting precise inference on large and complex simulated datasets, our method lays a foundation for extracting dark matter constraints from the next generation of wide-field optical imaging surveys.","url_abs":"https://arxiv.org/abs/2203.00690v2","url_pdf":"https://arxiv.org/pdf/2203.00690v2.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":"from-images-to-dark-matter-end-to-end","repo_url":"https://github.com/swagnercarena/paltas","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2203.00690","atlas_url":"https://app.syntology.ai/?focus=2203.00690","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.00690"}},"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/swagnercarena/paltas","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":8,"unverified":3},"by_repo_kind":{"official":{"samples":11,"ran":8,"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":"8dd78bfdeda299fe","entry":"calc_p_dlt","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/posterior_functions.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/posterior_functions.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":"8dd78bfdeda299fe"}},{"code_sha256_prefix":"69dd5cb7afa36753","entry":"eval_lognormal_logpdf_approx","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/pdf_functions.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/pdf_functions.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":"69dd5cb7afa36753"}},{"code_sha256_prefix":"678f2f28852a4b28","entry":"eval_normal_logpdf_approx","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/pdf_functions.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/pdf_functions.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":"678f2f28852a4b28"}},{"code_sha256_prefix":"33c44db03da86bda","entry":"gaussian_product_analytical","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/hierarchical_inference.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/hierarchical_inference.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":"33c44db03da86bda"}},{"code_sha256_prefix":"482acc8fc8a3f864","entry":"log_p_omega","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/hierarchical_inference.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/hierarchical_inference.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":"482acc8fc8a3f864"}},{"code_sha256_prefix":"11233485ab535344","entry":"log_p_xi_omega","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/hierarchical_inference.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/hierarchical_inference.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":"11233485ab535344"}},{"code_sha256_prefix":"1f8988f30a73f827","entry":"normalize_outputs","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/dataset_generation.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/dataset_generation.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":"1f8988f30a73f827"}},{"code_sha256_prefix":"aef692810b285d6c","entry":"plot_calibration","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/posterior_functions.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/posterior_functions.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":"aef692810b285d6c"}},{"code_sha256_prefix":"a9d9d74d126bf8fa","entry":"build_population_transformer","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/transformer_models.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/transformer_models.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":"a9d9d74d126bf8fa"}},{"code_sha256_prefix":"fc74169535304902","entry":"build_xresnet34","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/conv_models.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/conv_models.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":"fc74169535304902"}},{"code_sha256_prefix":"acb3ce113d624745","entry":"build_xresnet34_fc_inputs","repo":"swagnercarena/paltas","repo_kind":"official","path":"paltas/Analysis/conv_models.py","file_url":"https://github.com/swagnercarena/paltas/blob/HEAD/paltas/Analysis/conv_models.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":"acb3ce113d624745"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}