{"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/towards-an-astronomical-foundation-model-for","title":"Towards an astronomical foundation model for stars with a Transformer-based model","arxiv_id":"2308.10944","date":"2023-08-21","proceeding":null,"authors":["Henry W. Leung","Jo Bovy"],"abstract":"Rapid strides are currently being made in the field of artificial intelligence using Transformer-based models like Large Language Models (LLMs). The potential of these methods for creating a single, large, versatile model in astronomy has not yet been explored. In this work, we propose a framework for data-driven astronomy that uses the same core techniques and architecture as used by LLMs. Using a variety of observations and labels of stars as an example, we build a Transformer-based model and train it in a self-supervised manner with cross-survey data sets to perform a variety of inference tasks. In particular, we demonstrate that a $\\textit{single}$ model can perform both discriminative and generative tasks even if the model was not trained or fine-tuned to do any specific task. For example, on the discriminative task of deriving stellar parameters from Gaia XP spectra, we achieve an accuracy of 47 K in $T_\\mathrm{eff}$, 0.11 dex in $\\log{g}$, and 0.07 dex in $[\\mathrm{M/H}]$, outperforming an expert $\\texttt{XGBoost}$ model in the same setting. But the same model can also generate XP spectra from stellar parameters, inpaint unobserved spectral regions, extract empirical stellar loci, and even determine the interstellar extinction curve. Our framework demonstrates that building and training a $\\textit{single}$ foundation model without fine-tuning using data and parameters from multiple surveys to predict unmeasured observations and parameters is well within reach. Such \"Large Astronomy Models\" trained on large quantities of observational data will play a large role in the analysis of current and future large surveys.","url_abs":"https://arxiv.org/abs/2308.10944v3","url_pdf":"https://arxiv.org/pdf/2308.10944v3.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":"towards-an-astronomical-foundation-model-for","repo_url":"https://github.com/henrysky/astronn_stars_foundation","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"towards-an-astronomical-foundation-model-for","repo_url":"https://github.com/NolanKoblischke/SpectraFM_NeurIPS_FM4Science","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.10944","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.10944"}},"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/NolanKoblischke/SpectraFM_NeurIPS_FM4Science","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/henrysky/astronn_stars_foundation","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":11},"by_repo_kind":{"official":{"samples":12,"ran":1,"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":"00ed7823bf5bae82","entry":"robust_mean_squared_error","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"stellarperceptron/nn_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/stellarperceptron/nn_utils.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":"00ed7823bf5bae82"}},{"code_sha256_prefix":"f1fb55e3900659cb","entry":"crop_xp","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/gaia_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/gaia_utils.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":"f1fb55e3900659cb"}},{"code_sha256_prefix":"0916108f810a8280","entry":"estimate_bprp","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/empirical_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/empirical_utils.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":"0916108f810a8280"}},{"code_sha256_prefix":"f11021746c757675","entry":"estimate_logg_from_teff_MS","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/empirical_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/empirical_utils.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":"f11021746c757675"}},{"code_sha256_prefix":"7b7fe2d763e1898f","entry":"estimate_teff_from_logg_rgb","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/empirical_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/empirical_utils.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":"7b7fe2d763e1898f"}},{"code_sha256_prefix":"6b0d532c134d64b5","entry":"get_activation","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"stellarperceptron/layers.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/stellarperceptron/layers.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":"6b0d532c134d64b5"}},{"code_sha256_prefix":"b76ac4984902fcc3","entry":"get_initializer","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"stellarperceptron/layers.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/stellarperceptron/layers.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":"b76ac4984902fcc3"}},{"code_sha256_prefix":"db139f93c836329b","entry":"mag_to_flux","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/gaia_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/gaia_utils.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":"db139f93c836329b"}},{"code_sha256_prefix":"ac32065953e99b32","entry":"mean_squared_error","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"stellarperceptron/nn_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/stellarperceptron/nn_utils.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":"ac32065953e99b32"}},{"code_sha256_prefix":"6b321439c20994fb","entry":"random_choice","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/data_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/data_utils.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":"6b321439c20994fb"}},{"code_sha256_prefix":"63e230bcdbaee56a","entry":"shuffle_row","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/data_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/data_utils.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":"63e230bcdbaee56a"}},{"code_sha256_prefix":"150b30062b840abc","entry":"top_cbar","repo":"henrysky/astronn_stars_foundation","repo_kind":"official","path":"utils/plotting_utils.py","file_url":"https://github.com/henrysky/astronn_stars_foundation/blob/HEAD/utils/plotting_utils.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":"150b30062b840abc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}