The AI Cosmologist I: An Agentic System for Automated Data Analysis
Paper · 2025 · Adam Moss
Summary
Upcoming surveys such as Rubin, Euclid, SKA and DESI, along with large simulation suites, will produce more data than manual analysis can handle. Classic AutoML only optimises fixed, predefined pipelines. Moss proposes the AI Cosmologist, an LLM-based multi-agent system that takes a machine-learning research project from initial ideas to a finished paper.
Separate agents handle:
- planning,
- writing code,
- running it and recovering from errors,
- interpreting results,
- synthesising new strategies from earlier attempts,
- searching the literature.
The agents are chained in a conditional directed graph, with per-agent and global context. Work runs in two stages. A research phase repeatedly generates, implements, evaluates and recombines ideas. A dissemination phase then writes up the outcomes.
The system was tested on galaxy morphology classification and cosmological parameter inference. The appendix includes two complete papers it wrote, starting only from a dataset and a task description. In the Galaxy Zoo case, the model it designed reached strong leaderboard results. The study argues that agentic systems can automate meaningful parts of the research process and speed up discovery in data-heavy sciences.
Key points
- Six specialised agents make up the system: Planning, Coding, Execution, Analysis, Synthesis and Literature. The Literature agent queries arXiv and INSPIRE-HEP and maintains a bibliography.
- The two evaluation tasks are galaxy morphology classification (Galaxy Zoo 2, 37 classes, from a Kaggle challenge) and cosmological parameter inference.
- In the AI-generated Galaxy Zoo paper, a ConvNeXt model with multi-resolution training and test-time augmentation reached an RMSE of 0.07235 on the public leaderboard.
- Test-time augmentation cut error by about 4%, but it needs 36 forward passes per image.
- Code and experimental data are released at github.com/adammoss/aicosmologist.
Institutions
Fields, topics and concepts
📚 Shelves 6The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksDecision Sciences · 306 worksInformation Systems and Management · 96 worksMaterials Science · 58 worksMaterials Chemistry · 58 works
Cite
Cite as Adam Moss. 2025. The AI Cosmologist I: An Agentic System for Automated Data Analysis. arXiv:2504.03424.
@misc{moss2025ai,
title = {{The AI Cosmologist I: An Agentic System for Automated Data Analysis}},
author = {Adam Moss},
year = {2025},
doi = {10.48550/arxiv.2504.03424},
eprint = {2504.03424},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2504.03424}
}References
- Ivezić, v., et al. : LSST: from Science Drivers to Reference Design and Anticipated Data Products. Astrophys. J. 873 (2), 111 (2019) https://doi.org/10.3847/ 1538-4357/ab042c arXiv:0805.2366 [astro-ph] — [arXiv:0805.2366](https://arxiv.org/abs/0805.2366) find
- Laureijs, R., et al.: Euclid Definition Study Report (2011) arXiv:1110.3193 [astro-ph.CO] — [arXiv:1110.3193](https://arxiv.org/abs/1110.3193) find
- Bacon, D.J., et al. : Cosmology with Phase 1 of the Square Kilometre Array: Red Book 2018: Technical specifications and performance forecasts. Publ. Astron. Soc. Austral. 37 , 007 (2020) https://doi.org/10.1017/pasa.2019.51 arXiv:1811.02743 [astro-ph.CO] — [doi:10.1017/pasa.2019.51](https://doi.org/10.1017/pasa.2019.51) ↗
- Aghamousa, A., et al.: The DESI Experiment Part I: Science,Targeting, and Survey Design (2016) arXiv:1611.00036 [astro-ph.IM] — [arXiv:1611.00036](https://arxiv.org/abs/1611.00036) find
- Villaescusa-Navarro, F., et al. : The Quijote simulations. Astrophys. J. Suppl. 250 (1), 2 (2020) https://doi.org/10.3847/1538-4365/ab9d82 arXiv:1909.05273 [astro-ph.CO] — [doi:10.3847/1538-4365/ab9d82](https://doi.org/10.3847/1538-4365/ab9d82) ↗
- Baron, D.: Machine Learning in Astronomy: a practical overview. arXiv e-prints, 1904–07248 (2019) https://doi.org/10.48550/arXiv.1904.07248 arXiv:1904.07248 [astro-ph.IM] — [doi:10.48550/arxiv.1904.07248](https://doi.org/10.48550/arxiv.1904.07248) ↗
- Dieleman, S., Willett, K.W., Dambre, J.: Rotation-invariant convolutional neural networks for galaxy morphology prediction. Monthly Notices of the Royal Astronomical Society 450 (2), 1441–1459 (2015) https://doi.org/10.1093/mnras/stv632 arXiv:1503.07077 [astro-ph.IM] — [doi:10.1093/mnras/stv632](https://doi.org/10.1093/mnras/stv632) ↗
- Charnock, T., Moss, A.: Deep Recurrent Neural Networks for Supernovae Classification. The Astrophysical Journal Letters 837 (2), 28 (2017) https://doi.org/10. 3847/2041-8213/aa603d arXiv:1606.07442 [astro-ph.IM] — [arXiv:1606.07442](https://arxiv.org/abs/1606.07442) find
- Bloom, J.S., Richards, J.W., Nugent, P.E., Quimby, R.M., Kasliwal, M.M., Starr, D.L., Poznanski, D., Ofek, E.O., Cenko, S.B., Butler, N.R., Kulkarni, S.R., Gal-Yam, A., Law, N.: Automating Discovery and Classification of Transients and Variable Stars in the Synoptic Survey Era. Publications of the A… — [doi:10.1086/668468](https://doi.org/10.1086/668468) find
- Petrillo, C.E., Tortora, C., Chatterjee, S., Vernardos, G., Koopmans, L.V.E., Verdoes Kleijn, G., Napolitano, N.R., Covone, G., Schneider, P., Grado, A., McFarland, J.: Finding strong gravitational lenses in the Kilo Degree Survey with Convolutional Neural Networks. Monthly Notices of the Royal Astr… — [doi:10.1093/mnras/stx2052](https://doi.org/10.1093/mnras/stx2052) find
- Collister, A.A., Lahav, O.: ANNz: Estimating Photometric Redshifts Using Artificial Neural Networks. Publications of the Astronomical Society of the Pacific 116 (818), 345–351 (2004) https://doi.org/10.1086/383254 arXiv:astro-ph/0311058 [astro-ph] — [doi:10.1086/383254](https://doi.org/10.1086/383254) ↗
- George, D., Huerta, E.A.: Deep neural networks to enable real-time multimessenger astrophysics. Physical Review D 97 (4), 044039 (2018) https://doi.org/10. 1103/PhysRevD.97.044039 arXiv:1701.00008 [astro-ph.IM] find
- Butler, K.T., Davies, D.W., Cartwright, H., Isayev, O., Walsh, A.: Machine learning for molecular and materials science. Nature 559 (7715), 547–555 (2018) https://doi.org/10.1038/s41586-018-0337-2 — [doi:10.1038/s41586-018-0337-2](https://doi.org/10.1038/s41586-018-0337-2) ↗
- Jumper, J., Evans, R., Pritzel, A., Green, T., Figurnov, S., Ronneberger, O., Tunyasuvunakool, K., Bates, R., . . . , Hassabis, D.: Highly accurate protein structure prediction with AlphaFold. Nature 596 (7873), 583–589 (2021) https://doi.org/10.1038/s41586-021-03819-2 ↗
- Reichstein, M., Camps-Valls, G., Stevens, B., Jung, M., Denzler, J., Carval-hais, N., Prabhat: Deep learning and process understanding for data-driven Earth system science. Nature 566 (7743), 195–204 (2019) https://doi.org/10.1038/ s41586-019-0912-1 find
- Zöller, M.-A., Huber, M.F.: Benchmark and survey of automated machine learning frameworks. Journal of artificial intelligence research 70 , 409–472 (2021) find
- Chen, M., al.: Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374 (2021)
- Li, Y., al.: Competition-level code generation with alphacode. Science 378 (6624), 1092–1100 (2022)
- Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., Cao, Y.: ReAct: Synergizing Reasoning and Acting in Language Models. In: Proc. International Conference on Learning Representations (ICLR) (2023)
- Shinn, N., al.: Reflexion: Language agents with verbal reinforcement learning. arXiv preprint arXiv:2303.11366 (2023)
- Yang, J., Jimenez, C., Wettig, A., Lieret, K., Yao, S., Narasimhan, K., Press, O.: Swe-agent: Agent-computer interfaces enable automated software engineering. Advances in Neural Information Processing Systems 37 , 50528–50652 (2024)
- M. Bran, A., Cox, S., Schilter, O., Baldassari, C., White, A.D., Schwaller, P.: Augmenting large language models with chemistry tools. Nature Machine Intelligence 6 (5), 525–535 (2024) find
- Hutter, F., Kotthoff, L., Vanschoren, J.: Automated machine learning: Methods, systems, challenges. Automated Machine Learning (2019) find
- Elsken, T., Metzen, J.H., Hutter, F.: Neural architecture search: A survey. Journal of Machine Learning Research 20 (55), 1–21 (2019) find
- Thornton, C., Hutter, F., Hoos, H.H., Leyton-Brown, K.: Auto-weka: Combined selection and hyperparameter optimization of classification algorithms. In: KDD, pp. 847–855 (2013) find
- Feurer, M., al.: Efficient and robust automated machine learning. In: NIPS, pp. 2962–2970 (2015) find
- Vanschoren, J.: Meta-learning: A survey. arXiv preprint arXiv:1810.03548 (2019) — [arXiv:1810.03548](https://arxiv.org/abs/1810.03548) find
- Olson, R.S., Bartley, N., Urbanowicz, R.J., Moore, J.H.: Evaluation of a tree-based pipeline optimization tool for automating data science. In: Genetic and Evolutionary Computation Conference (GECCO) Companion, pp. 485–492 (2016) find
- Zoph, B., Le, Q.V.: Neural architecture search with reinforcement learning. In: ICLR (2017)
- Real, E., Aggarwal, A., Huang, Y., Le, Q.V.: Regularized evolution for image classifier architecture search. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 4780–4789 (2019) find
- Liu, H., Simonyan, K., Yang, Y.: DARTS: Differentiable architecture search. In: International Conference on Learning Representations (ICLR) (2019) find
- Finn, C., Abbeel, P., Levine, S.: Model-agnostic meta-learning for fast adaptation of deep networks. In: Proceedings of the 34th International Conference on Machine Learning (ICML), pp. 1126–1135 (2017)
- Kruk, S.J., Garcı́a Martı́n, P., Popescu, M., Merı́n, B., Mahlke, M., Carry, B., Thomson, R., Karadağ, S., Durán, J., al.: Hubble Asteroid Hunter. I. Identifying asteroid trails in HST images. Astronomy & Astrophysics 661 , 85 (2022) find
- Tarsitano, C., La Barbera, F., Vavilova, I., al.: Image feature extraction and galaxy classification: a novel approach using automated machine learning. Monthly Notices of the Royal Astronomical Society 511 , 3330–3348 (2022) find
- Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H.P.d.O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., Ray, A., Puri, R., Krueger, G., Petrov, M., Khlaaf, H., Sastry, G., Mishkin, P., Chan, B., Gray, S., Ryder, N., Pavlov, M., Power, A., Kaiser, L., Bavarian, M., Winter, C., Tillet,… — Evaluating Large Language Models Trained on Code
- Nijkamp, E., Pang, B., Hayashi, H., Tu, L., Wang, H., Zhou, Y., Savarese, S., Xiong, C.: CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis. arXiv preprint arXiv:2203.13474 (2022) find
- Fried, D., Aghajanyan, A., Lin, J., Wang, S.I., Wallace, E., Shi, F., Zhong, R., Yih, W.-t., Zettlemoyer, L., Lewis, M.: InCoder: A generative model for code infilling and synthesis. In: International Conference on Learning Representations (ICLR) (2023) find
- Li, R., Allal, L.B., Zi, Y., Muennighoff, N., Kocetkov, D., Mou, C., Marone, M., Akiki, C., et al.: StarCoder: May the source be with you! arXiv preprint arXiv:2305.06161 (2023) find
- Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., Cao, Y.: ReAct: Synergizing reasoning and acting in language models. Proceedings of the 40th International Conference on Machine Learning (ICML), 11837–11852 (2023)
- Shinn, N., Cassano, F., Berman, E., Gopinath, A., Narasimhan, K., Yao, S.: Reflexion: Language agents with verbal reinforcement learning. In: Advances in Neural Information Processing Systems 36 (NeurIPS 2023), pp. 41895–41908 (2023)
- Shen, Y., Song, K., Tan, X., Li, D., Lu, W., Zhuang, Y.: HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face. arXiv preprint arXiv:2303.17580 (2023)
- Boiko, D.A., MacKnight, R., Kline, B., Gomes, G.: Autonomous chemical research with large language models. Nature 624 , 570–578 (2023)
- Cranmer, K., Brehmer, J., Louppe, G.: The frontier of simulation-based inference. PNAS 117 (48), 30055–30062 (2020) find
- Brehmer, J., al.: Mining gold from implicit models to improve likelihood-free inference. PNAS 117 (10), 5242–5249 (2020) find
- Xu, M., al.: Expert iteration with language models for scientific discovery. arXiv preprint arXiv:2303.03494 (2023) — [arXiv:2303.03494](https://arxiv.org/abs/2303.03494) find
- Laverick, A., Surrao, K., Zubeldia, I., Bolliet, B., Cranmer, M., Lewis, A., Sherwin, B., Lesgourgues, J.: Multi-Agent System for Cosmological Parameter Analysis (2024) find
- Willett, K.W., et al. : Galaxy Zoo 2: detailed morphological classifications for 304,122 galaxies from the Sloan Digital Sky Survey. Mon. Not. Roy. Astron. Soc. 435 , 2835 (2013) https://doi.org/10.1093/mnras/stt1458 arXiv:1308.3496 [astro-ph.CO] — [doi:10.1093/mnras/stt1458](https://doi.org/10.1093/mnras/stt1458) ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/moss-2025-ai-cosmologist-i-agentic-system/