Generative Solutions for Cosmic Problems

Flatiron Institute

Institute for Advanced Studies

Carol(ina) Cuesta-Lazaro

p(\mathrm{World}|\mathrm{Prompt})
["Genie 2: A large-scale foundation model" Parker-Holder et al (2024)]
p(\mathrm{Drug}|\mathrm{Properties})
["Generative AI for designing and validating easily synthesizable and structurally novel antibiotics" Swanson et al]

Probabilistic ML has made high dimensional inference tractable

1024x1024xTime

["Genie 3: A new frontier for world models" Parker-Holder et al (2025)]

Carolina Cuesta-Lazaro Flatiron/IAS

["BaryonBridge: Interpolants models for fast hydrodynamical simulations" Horowitz, Cuesta-Lazaro, Yehia ML4Astro workshop 2025]
["Joint cosmological parameter inference and initial condition reconstruction with Stochastic Interpolants
Cuesta-Lazaro, Bayer, Albergo et al 
NeurIPs ML4PS 2024]

 

Simulation-Based Inference in Cosmology

Scaling up Hydro sims

\delta_\mathrm{ICs}
\delta_\mathrm{Obs}

Reconstructed

True

p(\delta_\mathrm{ICs}, \theta|\delta_\mathrm{Obs})

Astrid

EAGLE

\rho_\mathrm{gas}
T

Astrophysics proliferates Simulation-based Inference

on Simulations

Carolina Cuesta-Lazaro Flatiron/IAS

x^\mathcal{O}
x^\mathcal{S}

Simulated Data

Observed Data

z^\mathcal{O}_p
z^\mathcal{O}_s
z^\mathcal{S}_s
z^\mathcal{S}_p

Alignment Loss

\mathcal{L} = \sum_{\mathcal{D} \in (\mathcal{S}, \mathcal{O})} p(x^\mathcal{D}|z^\mathcal{D}_s, z^\mathcal{D}_p) + \lambda d(z^\mathcal{O}_s,z^\mathcal{S}_s)

Reconstruction

Statistical Alignment

50\%

(OT / Adversarial)

Encoder

Obs

Encoder

Sims

Private Domain Information

Shared Information

\hat{x}^\mathcal{O}
\hat{x}^\mathcal{S}

Observed Reconstructed

Simulated Reconstructed

Shared Decoder

Shared Decoder

Carolina Cuesta-Lazaro Flatiron/IAS

A Toy Model Example

Idealized Simulations

Observations

+ Scale Dependent Noise

+ Bump

x^\mathcal{O}
x^\mathcal{S}

Carolina Cuesta-Lazaro Flatiron/IAS

Amplitude

Tilt

Tilt

p(\theta|z^\mathcal{O}_s)
p(\theta|z^\mathcal{O}_p)
p(\theta|z^\mathcal{O}_p,z^\mathcal{O}_s)
p(\theta|z^\mathcal{O}_p)

Robust SBI from Shared

p(x^\mathcal{O}|z^\mathcal{O}_p,z^\mathcal{O}_s)
p(x^\mathcal{O}|z^\mathcal{O}_s)

Visualizing Information Split

Carolina Cuesta-Lazaro Flatiron/IAS

Physics

Systematics

[arXiv:2503.15312]

Carolina Cuesta-Lazaro Flatiron/IAS

Can we separate Systematics from Physics?

Pablo Mercader

Daniel Muthukrishna

Jeroen Audenaert

Legacy Survey

HSC

DESI

SDSS

Same Object / Different Instrument

Different Object / Same Instrument

Carolina Cuesta-Lazaro Flatiron/IAS

Object 1

Object 2

Object 1

z_\mathrm{instrument}

Back to the Playground!

Orientation + Scale

Number

p(
z_\mathrm{instrument},
z_\mathrm{object}
)

Instrument 1

Instrument 1

Instrument 2

Instrument Encoder

z_\mathrm{object}

Object Encoder

Instrument Pair

Object Pair

Instrument Pair

Object Pair

Carolina Cuesta-Lazaro Flatiron/IAS

Ground Truth

Instrument Pair

Object Pair

Recon

Carolina Cuesta-Lazaro Flatiron/IAS

BEFORE

Artificial General Intelligence?

AFTER

Carolina Cuesta-Lazaro Flatiron/IAS

Artificial General Intelligence?

[https://metr.org/blog/2025-07-14-how-does-time-horizon-vary-across-domains/]

Carolina Cuesta-Lazaro Flatiron/IAS

Learning to play "Scientist"

\mathcal{L}(q_\mathrm{obs},q_\mathrm{latent},p_\mathrm{obs},p_\mathrm{latent})

1. Design next Experiment

2. Hypothesize Equation of motion

3. Simulate and Compare

p(\mathrm{World})
p(\mathrm{Prompt}|\mathrm{World})

Carolina Cuesta-Lazaro Flatiron/IAS

3. Science is ultimately a human endeavor, what questions are interesting to answer and may be solvable is up to us.  What role can LLMs play  in Science?

Conclusions

1. LLMs are improving on most subjects at an insane rate, including maths

What problems in physics can we tackle with automated code generation?

Can generally make simulators more controllable!

Artificial Muses

2. How do we improve their physics reasoning skills?

RL over simulated worlds

Science not so amenable to a "scalar reward" setup

"Play" is important

Carolina Cuesta-Lazaro Flatiron/IAS

["An LLM-driven framework for cosmological
model-building and exploration" Mudur, Cuesta-Lazaro, Toomey (in prep)]

Can LLMs help us explore the space of hypothesis?

Propose a model for Dark Energy

Implement it in a Cosmology simulation code: CLASS

Test fit to DESI Observations

Iterate to improve fit

Quintessence, DE/DM interactions....

Must pass a set of general tests for "reasonable" models

Ideally, compare evidence to LCDM.

For now, Bayesian Information Criteria (BIC)

1

2

Nayantara Mudur (Harvard)

Carolina Cuesta-Lazaro Flatiron/IAS - TriState

Can LLMs implement new physics models?

Thawing Quintessence

Axion-like Early Dark Energy

Ultra-light scalar field that temporarily acts as dark energy in the early universe 

Implementation Challenge:

Dynamic dark energy model: scalar field transitions from "frozen"  (cosmological constant-like) to evolving as the universe expands.

Oscillatory behaviour

Can take advantage of existing scalar field implementations in CLASS

+ 43,000 lines of C code

+ 10,000 lines of numerical files

CLASS Challenge:

Carolina Cuesta-Lazaro Flatiron/IAS

1) Code compiles + passes unit tests (reasonable observables, numerical convergence...)

2) Implementation agrees with target repository

3) Goodness of fit for DESI + Supernovae

4) H0 tension metrics

Curated

1 page long description of model to be implemented,  CLASS tips + very explicit units

Paper

Directly from a full paper

If fails, get feedback from another LLM

Carolina Cuesta-Lazaro Flatiron/IAS

Propose a Dark Energy Model

Shortcut: field that produces this?

Carolina Cuesta-Lazaro Flatiron/IAS

Propose a Dark Energy Model

Asked for physical motivation. It tried :( 

Not true, preferred scale

Carolina Cuesta-Lazaro Flatiron/IAS

CCA-Coffee-2025

By carol cuesta

CCA-Coffee-2025

  • 15