{"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/photometric-redshifts-from-sdss-images-with","title":"Photometric Redshifts from SDSS Images with an Interpretable Deep Capsule Network","arxiv_id":"2112.03939","date":"2021-12-07","proceeding":null,"authors":["Biprateep Dey","Brett H. Andrews","Jeffrey A. Newman","Yao-Yuan Mao","Markus Michael Rau","Rongpu Zhou"],"abstract":"Studies of cosmology, galaxy evolution, and astronomical transients with current and next-generation wide-field imaging surveys like the Rubin Observatory Legacy Survey of Space and Time (LSST) are all critically dependent on estimates of photometric redshifts. Capsule networks are a new type of neural network architecture that is better suited for identifying morphological features of the input images than traditional convolutional neural networks. We use a deep capsule network trained on $ugriz$ images, spectroscopic redshifts, and Galaxy Zoo spiral/elliptical classifications of $\\sim$400,000 Sloan Digital Sky Survey (SDSS) galaxies to do photometric redshift estimation. We achieve a photometric redshift prediction accuracy and a fraction of catastrophic outliers that are comparable to or better than current methods for SDSS main galaxy sample-like data sets ($r\\leq17.8$ and $z_{\\mathrm{spec}}\\leq0.4$) while requiring less data and fewer trainable parameters. Furthermore, the decision-making of our capsule network is much more easily interpretable as capsules act as a low-dimensional encoding of the image. When the capsules are projected on a 2-dimensional manifold, they form a single redshift sequence with the fraction of spirals in a region exhibiting a gradient roughly perpendicular to the redshift sequence. We perturb encodings of real galaxy images in this low-dimensional space to create synthetic galaxy images that demonstrate the image properties (e.g., size, orientation, and surface brightness) encoded by each dimension. We also measure correlations between galaxy properties (e.g., magnitudes, colours, and stellar mass) and each capsule dimension. We publicly release our code, estimated redshifts, and additional catalogues at https://biprateep.github.io/encapZulate-1 .","url_abs":"https://arxiv.org/abs/2112.03939v2","url_pdf":"https://arxiv.org/pdf/2112.03939v2.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":"photometric-redshifts-from-sdss-images-with","repo_url":"https://github.com/biprateep/encapZulate-1","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2112.03939","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2112.03939"}},"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/biprateep/encapZulate-1","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":17},"by_repo_kind":{"official":{"samples":17,"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":"4c2151e7395bab36","entry":"CapsNet","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/models/mnist.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/models/mnist.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":"4c2151e7395bab36"}},{"code_sha256_prefix":"6cb5c4cdcc763ed0","entry":"CapsNet","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/models/morphCaps.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/models/morphCaps.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":"6cb5c4cdcc763ed0"}},{"code_sha256_prefix":"14652bd7094d5f4e","entry":"PrimaryCap","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/capsulelayers.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/capsulelayers.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":"14652bd7094d5f4e"}},{"code_sha256_prefix":"81c96231f346fb2e","entry":"central_bias","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/loss.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/loss.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":"81c96231f346fb2e"}},{"code_sha256_prefix":"fa884912b636d261","entry":"central_mse","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/loss.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/loss.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":"fa884912b636d261"}},{"code_sha256_prefix":"bcc255c29c35ada2","entry":"evaluate","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/run_model.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/run_model.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":"bcc255c29c35ada2"}},{"code_sha256_prefix":"d918fcad643bf10e","entry":"load_cifar10","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/data_loader/data_loader.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/data_loader/data_loader.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":"d918fcad643bf10e"}},{"code_sha256_prefix":"cc46682041726145","entry":"load_data","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/data_loader/data_loader.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/data_loader/data_loader.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":"cc46682041726145"}},{"code_sha256_prefix":"ea3d5625d0edc156","entry":"load_mnist","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/data_loader/data_loader.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/data_loader/data_loader.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":"ea3d5625d0edc156"}},{"code_sha256_prefix":"41b0a8638f636a11","entry":"mqe","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/loss.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/loss.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":"41b0a8638f636a11"}},{"code_sha256_prefix":"9c7dfeb5dfb34d6c","entry":"own_batch_dot","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/batchdot.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/batchdot.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":"9c7dfeb5dfb34d6c"}},{"code_sha256_prefix":"294b452ea4501cb9","entry":"predict","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/run_model.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/run_model.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":"294b452ea4501cb9"}},{"code_sha256_prefix":"ae823ae127199b54","entry":"squash","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/capsulelayers.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/capsulelayers.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":"ae823ae127199b54"}},{"code_sha256_prefix":"7c3da8b78efbfce9","entry":"squash","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/deepCapsLayers.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/deepCapsLayers.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":"7c3da8b78efbfce9"}},{"code_sha256_prefix":"e7e5a13dd8c18121","entry":"squeeze","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/deepCapsLayers.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/deepCapsLayers.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":"e7e5a13dd8c18121"}},{"code_sha256_prefix":"79a4779ca17d1af8","entry":"train","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/run_model.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/run_model.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":"79a4779ca17d1af8"}},{"code_sha256_prefix":"2b1b2c6fa385e1f1","entry":"update_routing","repo":"biprateep/encapZulate-1","repo_kind":"official","path":"src/encapzulate/base/deepCapsLayers.py","file_url":"https://github.com/biprateep/encapZulate-1/blob/HEAD/src/encapzulate/base/deepCapsLayers.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":"2b1b2c6fa385e1f1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}