{"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/detecting-gravitational-lenses-using-machine","title":"Detecting gravitational lenses using machine learning: exploring interpretability and sensitivity to rare lensing configurations","arxiv_id":"2202.12776","date":"2022-02-25","proceeding":null,"authors":["Joshua Wilde","Stephen Serjeant","Jane M. Bromley","Hugh Dickinson","Leon V. E. Koopmans","R. Benton Metcalf"],"abstract":"Forthcoming large imaging surveys such as Euclid and the Vera Rubin Observatory Legacy Survey of Space and Time are expected to find more than $10^5$ strong gravitational lens systems, including many rare and exotic populations such as compound lenses, but these $10^5$ systems will be interspersed among much larger catalogues of $\\sim10^9$ galaxies. This volume of data is too much for visual inspection by volunteers alone to be feasible and gravitational lenses will only appear in a small fraction of these data which could cause a large amount of false positives. Machine learning is the obvious alternative but the algorithms' internal workings are not obviously interpretable, so their selection functions are opaque and it is not clear whether they would select against important rare populations. We design, build, and train several Convolutional Neural Networks (CNNs) to identify strong gravitational lenses using VIS, Y, J, and H bands of simulated data, with F1 scores between 0.83 and 0.91 on 100,000 test set images. We demonstrate for the first time that such CNNs do not select against compound lenses, obtaining recall scores as high as 76\\% for compound arcs and 52\\% for double rings. We verify this performance using Hubble Space Telescope (HST) and Hyper Suprime-Cam (HSC) data of all known compound lens systems. Finally, we explore for the first time the interpretability of these CNNs using Deep Dream, Guided Grad-CAM, and by exploring the kernels of the convolutional layers, to illuminate why CNNs succeed in compound lens selection.","url_abs":"https://arxiv.org/abs/2202.12776v1","url_pdf":"https://arxiv.org/pdf/2202.12776v1.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":"detecting-gravitational-lenses-using-machine","repo_url":"https://github.com/JoshWilde/LensFindery-McLensFinderFace","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2202.12776","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2202.12776"}},"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/JoshWilde/LensFindery-McLensFinderFace","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":2},"by_repo_kind":{"official":{"samples":2,"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":"1500e97d7f954935","entry":"preprocess_image","repo":"JoshWilde/LensFindery-McLensFinderFace","repo_kind":"official","path":"Interpretability/Code/CNN_Layer_VIS.py","file_url":"https://github.com/JoshWilde/LensFindery-McLensFinderFace/blob/HEAD/Interpretability/Code/CNN_Layer_VIS.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":"1500e97d7f954935"}},{"code_sha256_prefix":"74d27d19736fe2e0","entry":"recreate_image","repo":"JoshWilde/LensFindery-McLensFinderFace","repo_kind":"official","path":"Interpretability/Code/CNN_Layer_VIS.py","file_url":"https://github.com/JoshWilde/LensFindery-McLensFinderFace/blob/HEAD/Interpretability/Code/CNN_Layer_VIS.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":"74d27d19736fe2e0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}