maho3/ltu-gobig

Extend charm to resolve subgrid positions and velocities

Opened this issue · 8 comments

Extend charm to resolve subgrid positions and velocities

TLDR: modelling halo positions in [x,y,z] as a conditional distribution from existing CHARM pipeline:

$$p(M, [x,y,z]) = \int p([x,y,z] | M_{\rm halos}, N_{\rm halos}) p(M_{\rm halos}, N_{\rm halos} | \rm{CNN+charm\ inputs}) d\ {\rm inputs}\ d M_{\rm halos} d N_{\rm halos} $$

For now, we're fixing M_halos, N_halos to the simulation values, but eventually these will be sampled from CHARM

Screenshot 2024-07-30 at 11 03 18 AM Screenshot 2024-07-30 at 11 03 24 AM Screenshot 2024-07-30 at 11 03 29 AM Screenshot 2024-07-30 at 11 05 53 AM

experimenting with velocities in CHARM, by implementing a separate autoregressive network that predicts the halo velocity. This is first test that assumes halo position and masses are true, and just learns the correction for velocity on top of the interpolated velocity from FASTPM field.

how many transformations / descriptive is the velocity autoregressive network ? is it the same architecture as is used for the positions ?

Yes, more or less. It is stack of two normalizing flows going from Gaussian to velocity distribution (difference between FastPM and true).

first attempt at generalizing for cosmologies. Seems to work much better than getting the velocities from FastPM, but currently only ~10% level.

Image
Image
Image
Image

CHARM updated training for both masses and velocities. Now the network goes to smaller halo masses (M > 5e12 Msun/h) and also trains much better on multiple GPUs. Also the code is stand-alone installable and pushed here : https://github.com/shivampcosmo/CHARM . Integration with current ltu-cmass pipeline in progress.

Image
Image
Image
Image

some updated objectives after conversations with @shivampcosmo @maho3:

  • look at modelling positions on nodes within $ 8^3$ voxels using a cheap fully-connected GNN layer.
  • TODO: look at (true) displacement distributions from COM in each voxel
  • heavy-tailed studentT MDN might be the best parameterization for the loss $- \ln p(x, \hat{x})$

Updates from LtU meeting:

Predicting positions within voxels might be best done as a residual learning problem. Looking at the difference in position between the heaviest halo $x_0$ and the next heaviest halo $x_1$ (and so on), we see a zero-centered heavy-tailed distribution.
Image

Would be good to model this with an MDN neural studentT e.g. following https://arxiv.org/pdf/2006.06599