Generative Solutions for Cosmic Problems

Flatiron Institute

Institute for Advanced Studies

NYU (Coming Soon)

 

Carol(ina) Cuesta-Lazaro

Carol's Journey to SBI for Galaxy Evolution

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Physics

Systematics

True

1

Learning What's Real

Disentangling Physics and Instruments in Foundation Models

Reconstructed

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

Did we really break LCDM?

Field Level Inference

2

Can LLMs discover new physics?

3

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Am I a Foundation Model?

Physics

Systematics

[arXiv:2503.15312]

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Euclid Quick Data Release (Q1) 

Pablo Mercader

Daniel Muthukrishna

Jeroen Audenaert

Legacy Survey

HSC

DESI

SDSS

Same Object / Different Instrument

Different Object / Same Instrument

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Can we disentangle Systematics from Physics?

Object 1

Object 2

Object 1

z_\mathrm{instrument}

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 @ GalevSBI 2024 2025 2026

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Finding Outliers 

(no disentanglement)

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Similarity Search

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

A Data-driven Noise Model

2. What is the role of simulations in foundation models? From outlier detection to anomaly detection

#TODOs

1. How do we include information that is private to the instrument

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

3. Going to space! JWST x Euclid

"Tiny human catches a few photons in a bucket, declares dark energy is dynamic"

Can we confidently break LCDM?

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Late Universe

Early Universe

Tension

Early vs Late

Parametric Extensions

[Image Credit: Prof. Wendy Freedman]

 

Breaking LCDM

Systematics?

-> Shrink error bars

-> Build methods for attribution

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

What is field-level inference?

A digital twin of our Universe

Observed Galaxy Distribution

Simulated Galaxy Distribution

Field Level Inference

Forward Model

(= no Cosmic Variance)

+
\Omega_m,
\sigma_8 ...
p(\delta_{\mathrm{ICs}}, \mathcal{\theta}|\delta_{\mathrm{Obs}})

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Why field-level inference?

Optimal constraints

p(
)
|
\mathrm{Cosmology}

N-point functions

Counts-in-cell

Wavelets

Marked tpcfs

Voids

Do we really need to infer 10^9 parameters to constrain 5?

p(
)
|
\mathrm{Cosmology}

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

x_\mathrm{final}, y_\mathrm{final} \sim \mathrm{Simulator}(f, \theta) = p(x_\mathrm{final}, y_\mathrm{final} \mid f, \theta)
p(x_\mathrm{final}, y_\mathrm{final}|f, \theta) = \int dz p(x_\mathrm{final}, y_\mathrm{final},z|f, \theta)

z: All possible trajectories

Simulators sample the Likelihood

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Marginal Inference - SBI

p(
)
|
\mathrm{Cosmology}
S_\theta(
)
p(
)
|
\mathrm{Cosmology}

Neural Compression

p(x|\theta) = \int p(x|z, \theta) p(z|\theta) \, dz

Initial Conditions

Marginal Likelihood

["Diffusion-HMC: Parameter Inference with Diffusion Model driven Hamiltonian Monte Carlo" 
Mudur, Cuesta-Lazaro and Finkbeiner
NeurIPs 2023 ML for the physical sciences, arXiv:2405.05255]

 

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Do we need neural summaries?

kmax ~ 0.5

DESI LRG-like HOD galaxies

(x 10 HODs / cosmology)

L = 1 Gpc/h

p(
)
|
\mathrm{Cosmology}
S_\theta(
)

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

["Detecting Model Misspecification in Cosmology with Scale-Dependent Normalizing Flows" Akhmetzhanova, Cuesta-Lazaro, Mishra-Sharma]

Aizhan Akhmetzhanova (Harvard)

Scale Dependent Compression

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

How well does the model fit the data?

Use optimal summaries instead of field

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Base

OOD Mock 1

OOD Mock 2

Base

OOD Mock 1

OOD Mock 2

Large Scales

Small Scales

Small Scales

OOD Mock 1

OOD Mock 2

Parameter Inference Bias (Supervised)

OOD Metric (Unsupervised)

Large Scales

Small Scales

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

+

Reconstructing ALL latent variables:

Dark Matter distribution

Entire formation history

Peculiar velocities

Predictive Cross Validation:

Cross-Correlation with other probes without Cosmic Variance

[Image Credit: Yuuki Omori]

 

Constraining Inflation:

Inferring primordial non-gaussianity

Why field-level inference?

Data-driven Subgrid models / Data-driven Systematics

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

  The forward model

Scaling up to survey volumes

Modelling small scale clustering

Survey realism

Model mispecification

The FLI Challenges

 Sampling high-dimensional posteriors

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

(Slide credit: Matthew Ho)

Scaling Up to Survey Volumes

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Particle Mesh for Gravity

p(\mathrm{Baryons}|\mathrm{DM}, \mathcal{C}, \mathcal{A})

Gas Properties

Density

Temperature

Galaxy Distribution

["BaryonBridge: Interpolants models for fast hydrodynamical simulations" Horowitz, Cuesta-Lazaro, Yehia ML4Astro workshop 2025]

Scalable Field Level Emulators

Probabilistic

Local

["CHARM: Creating Halos with Auto-Regressive Multi-stage networks" Pandey et al 2024]

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Amanda Lue (Columbia)

Trained on CAMELS 25 Mpc/h -> Inference over 50 Mpc/h

Supernovae Feedback

N-body

p(\delta_g|\delta_m, \mathcal{C}, \mathcal{A})

Galaxies

p(\delta_g|\delta_m, \mathcal{C}, \mathcal{A})

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

(Slide credit: Matthew Ho)

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Posterior resimulations in minutes!

  •  Gravity Solver (Gadget-4)
  • Halo finder (SUBFIND)
  • Semi-analytic galaxy formation model (L-Galaxies)

OOD Tests

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

GANS

Deep Belief Networks

2006

VAEs

Normalising Flows

BigGAN

Diffusion Models

2014

2017

2019

2022

A folk music band of anthropomorphic autumn leaves playing bluegrass instruments

Contrastive Learning

2023

Meanwhile, on Earth...

2026

"Write a C compiler"

AGI?

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Goal: Estimate unknown p(x1) from samples

x_0 \sim \rho_0

Base

Target

T: \Omega \to \Omega

Transport Map

x_1 \sim \rho_1 \quad \text{via} \quad T(x_0) = x_1
x_1 \sim \rho_1

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Particle Mesh

Dark Matter Only

Gaussian Likelihood

Explicit Sampling vs SBI

p(\delta_\mathrm{ICs}, \theta|\delta_\mathrm{Obs}) = p(\delta_\mathrm{ICs} |\delta_\mathrm{Obs}, \theta) p(\theta |\delta_\mathrm{Obs})
["Joint cosmological parameter inference and initial condition reconstruction with Stochastic Interpolants" 
Cuesta-Lazaro, Bayer, Albergo et al 
NeurIPs 2024 ML for the Physical Sciences]

 

Adrian Bayer

Mount Fuji?

Chirag Modi

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

1) Likelihood not necessarily Gaussian

2) Forward model no need differentiable

3) Amortized

Generative Model: Marginalizing over ICs

Generative Model: Fixing ICs

HMC: Marginalizing over ICs

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

True

Reconstructed

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

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Scaling up in volume

Implicit FLI for DESI

DESI Y1 LRG Effective volumes already larger than our sims!

Small Scale Galaxy Bias

Selection

Fibre collisions

Forward Modelling the Survey Systematics

PT

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Scaling up in Volume

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

Large Scale Reconstruction

1024^3
1 \, (\mathrm{Gpc}/h)^3

True

\delta_\mathrm{Galaxies}
\delta_\mathrm{ICs}

Reconstructed

["Reconstructing Cosmological Initial Conditions from Late-Time Structure with Convolutional Neural Networks
Shallue, Eisenstein 2022]
["Initial conditions from galaxies: machine-learning subgrid correction to standard reconstruction
Parker, Bayer, Seljak 2025]

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Power Spectrum

Cross Correlation

Peculiar Velocities

True

Reconstructed

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

BEFORE

Artificial General Intelligence?

AFTER

DiscoverPhysics: Benchmarking LLMs for
Out-of-the-Box Scientific Thinking

Matt Wiemann

Lindsay Smith

Hypothesis

Simulate World

Invisible particles

Extra dimensions

Multi Species ...

Simulate World

Invisible particles

Extra dimensions

Multi Species ...

Propose Experiment

Simulate

Text: Conceptual Understanding

Trajectories (.csv)

Science Agent (LLM)

Science Agent (LLM)

Outputs

Python Code: Trajectory MSE

["DiscoverPhysics: Benchmarking LLMs for Out-of-the-Box Scientific Thinking" Wiemann, Smith et al (including CCL)]

You are an expert physicist tasked with discovering scientific laws in a simulated universe. Your goal is to propose experiments, analyse the data they return, and ultimately deduce the underlying scientific law. Note that the laws of physics in this universe may differ from those in our own. You can perform experiments to gather data but must follow the protocol strictly.

If F = G/r²: G = 80. If F = G/r: G = 8. Linear in 1/r!

 

m=1: a = 0.664 · m=2: a = 0.614 · m=4: a = 0.664 · m=8: a = 0.714 … That's strange."

 

Consistent pattern: small +y 'extra' force (~0.05) regardless of position … maybe the anchor itself moves.

 

a_y_extra ≈ +0.05 everywhere on probes. Spot on! So anchor too just experiences g_y = 0.05 … g = (0, 0.05) is a uniform external acceleration on every particle.

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

You are an expert physicist tasked with discovering scientific laws in a simulated universe. Your goal is to propose experiments, analyse the data they return, and ultimately deduce the underlying scientific law. Note that the laws of physics in this universe may differ from those in our own. You can perform experiments to gather data but must follow the protocol strictly.

Confirmed: a ∝ 1/r.

 

 

observed −5.18. WAY too small. Something is very wrong with my understanding!

 

 

artifact of integration accuracy, NOT the true law. Probably because of close encounters causing chaos.

 

I'll just submit my law. The functional form is solid.

 

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

Conceptual Understanding

Trajectory Prediction

Random Seeds

Carolina Cuesta-Lazaro Flatiron/IAS @ GalevSBI 2024 2025 2026

You are an expert physicist tasked with discovering scientific laws in a simulated universe. Your goal is to propose experiments, analyse the data they return, and ultimately deduce the underlying scientific law. Note that the laws of physics in this universe may differ from those in our own. You can perform experiments to gather data but must follow the protocol strictly.

a × r seems roughly constant … not quite 1/r.

 

Let me try a × r²: … Not consistent.

 

 

So at large r, a ~ 1/r. At small r, a ~ 1/r².

   

Actually note the file path in the error message: 'extra_dimensions.csv'! This is a hint! The world might have an extra compactified dimension…

 

[Model starts fitting Yukawa potential, Bessel functions... At some point fitting tool errors.]

Carolina Cuesta-Lazaro Flatiron/IAS @ Perimeter 2026

Astrophysics proliferates in Simulation-based Inference

on Simulations

Carolina Cuesta-Lazaro Flatiron/IAS @ Perimeter 2026

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 @ Perimeter 2026

A Toy Model Example

Idealized Simulations

Observations

+ Scale Dependent Noise

+ Bump

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

Carolina Cuesta-Lazaro Flatiron/IAS @ Perimeter 2026

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 @ Perimeter 2026

GalaxySBI-2026

By carol cuesta

GalaxySBI-2026

  • 99