Master's Thesis Presentation | 1. November 2025 | ETH Cosmology Group Meeting
Full text
Probabilistic reconstruction of 3D peculiar velocity fields using generative models Constança Tropa! Supervisors: Carol Cuesta-Lazaro, Daniel Eisenstein" AstroAI and ITC! Center for Astrophysics | Harvard & Smithsonian! Institute of Particle Physics and Astrophysics |#ETH Zürich
My Project - Motivation GOAL: Study large scale structure Dark Matter distribution Galaxy distribution Pk No direct observation + bias δg=bδm “Cosmic web: galaxies, clusters, filaments and voids”
My Project - Motivation Galaxy distribution in redshift space + peculiar velocities H0 PRSD k Dark Matter distribution Galaxy distribution Pk No direct observation + bias δg=bδm “We see galaxies at the wrong position because of the expansion of the universe and their individual velocities” GOAL: Study large scale structure
My Project - Motivation Galaxy distribution in redshift space + peculiar velocities H0 PRSD k Dark Matter distribution Galaxy distribution Pk No direct observation + bias δg=bδm Simultaneous constraint Remove peculiar velocities (vpec) Infer ζ= (Ωm,σ8,b) GOAL: Study large scale structure
Hubble tension: what is ? H0 local determinations. Both the TRGB and Cepheid measurements have smaller uncertainties than the other (local)methods shown. These two methods currently have the largest samples of nearby objects (19 in both cases)that tie directly into the Hubble flow via SNe Ia. In Figure 11, the values of H o as a function of time are shown for those based on measurements of the CMB, as well as those from the TRGB and Cepheid calibrations of SNe Ia. Thus, the current situation is that there are two different types of tensions in play: (1)that between Cepheid measurements and the early universe and (2)that between Cepheid measurements and the TRGB. For completeness, in the Appendix, we show a plot of 1065 H 0 values as a function of time for published data since 1980 (I. Steer 2021, private communication), as well as their histogram distribution. Interestingly, there is no bimodality (67 versus 73) Figure 10. Relative PDFs for several current methods for measuring H 0 . The CMB, BAO, strong lensing, and TRGB methods currently yield lower values of H 0 , while Cepheids yield the highest values. The uncertainties associated with H 0 measurements from gravitational-wave sirens, strong lensing, Miras, masers, and SBF are currently significantly larger than the errors quoted for the TRGB and Cepheids. See text for details. (CMB: Planck Collaboration 2018; TRGB: this paper; Cepheids: R21; lensing: Birrer et al. 2020; DES Y3 +BAO +BBN: DES Collaboration et al. 2021; GW sirens: Hotokezaka et al. 2019; Miras: Huang et al. 2018; SBF: Khetan et al. 2021; masers: Reid et al. 2019). Figure 11. Summary of Hubble constant values in the past two decades based on Cepheid variables (blue squares), the TRGB (red circles and star), and estimates based on measurements of fluctuations in the CMB (WMAP: black diamonds; Planck: yellow diamonds; ACT +WMAP: cyan diamond). The CMB H 0 values assume a flat ΛCDM model. The CMB and Cepheid results straddle a range of 67–74 km s −1 Mpc −1 , with the TRGB results falling in the middle and overlapping the CMB results. The tension between the CMB and TRGB results amounts to only 1.3σ. 19 The Astrophysical Journal, 919:16 (22pp), 2021 September 20 Freedman “How fast is the universe really expanding?”! “Well… we are no longer sure, but it’s important to know” [1] W. Freedman (2021)
Peculiar velocities! and density fields Galaxies 0 2 4 6 8 10 12 14 Galaxy overdensity field Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 “Linear velocity field” “…and depends on parameters that we are not sure about” δDM =δgal b f=Ω0.55 m δ=− ∇ ⋅ v aHf Galaxy velocity on top of Hubble expansion (nothing strange/weird) “We have an approximation for the velocities that only works sometimes…”
Peculiar velocities! and density fields “Nonlinear velocity field” Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Nonlinear effects in collapsed regions, virialized halos Simulations?! Machine Learning? δDM =δgal b f=Ω0.55 m Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 “Linear velocity field” δDM =δgal b f=Ω0.55 m “We want to paint the detail on the blur”
p(vnl |δRSD g,vlin(ζ), ζ) Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 local determinations. Both the TRGB and Cepheid measurements have smaller uncertainties than the other (local)methods shown. These two methods currently have the largest samples of nearby objects (19 in both cases)that tie directly into the Hubble flow via SNe Ia. In Figure 11, the values of H o as a function of time are shown for those based on measurements of the CMB, as well as those from the TRGB and Cepheid calibrations of SNe Ia. Thus, the current situation is that there are two different types of tensions in play: (1)that between Cepheid measurements and the early universe and (2)that between Cepheid measurements and the TRGB. For completeness, in the Appendix, we show a plot of 1065 H 0 values as a function of time for published data since 1980 (I. Steer 2021, private communication), as well as their histogram distribution. Interestingly, there is no bimodality (67 versus 73) Figure 10. Relative PDFs for several current methods for measuring H 0 . The CMB, BAO, strong lensing, and TRGB methods currently yield lower values of H 0 , while Cepheids yield the highest values. The uncertainties associated with H 0 measurements from gravitational-wave sirens, strong lensing, Miras, masers, and SBF are currently significantly larger than the errors quoted for the TRGB and Cepheids. See text for details. (CMB: Planck Collaboration 2018; TRGB: this paper; Cepheids: R21; lensing: Birrer et al. 2020; DES Y3 +BAO +BBN: DES Collaboration et al. 2021; GW sirens: Hotokezaka et al. 2019; Miras: Huang et al. 2018; SBF: Khetan et al. 2021; masers: Reid et al. 2019). Figure 11. Summary of Hubble constant values in the past two decades based on Cepheid variables (blue squares), the TRGB (red circles and star), and estimates based on measurements of fluctuations in the CMB (WMAP: black diamonds; Planck: yellow diamonds; ACT +WMAP: cyan diamond). The CMB H 0 values assume a flat ΛCDM model. The CMB and Cepheid results straddle a range of 67–74 km s −1 Mpc −1 , with the TRGB results falling in the middle and overlapping the CMB results. The tension between the CMB and TRGB results amounts to only 1.3σ. 19 The Astrophysical Journal, 919:16 (22pp), 2021 September 20 Freedman ± Peculiar velocities and ζ=Ωm,σ8,b p(ζ|δRSD g) Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Parameter Inference Velocity Field Reconstruction 12
•Varying cosmologies = more Universes :D" •Most non-linear effects are in the late time, nearby universe ! " •“Infinite Universe”! or box with periodic BC" • resolution ⟹z= 0 1(h−1Gpc)3 1283 N-Body simulations: QUIJOTE Nonlinear effects in collapsed regions, virialized halos [2] F. Villaescusa-Navarro (2020)
1 Model architecture and loss Training ℒ=𝔼[log p(θ| z)] AdamW optimizer Inference 1. Encode: z = Encoder(x_obs) 2. Sample: θ ~ p(θ | z) 3. Posterior: p(θ | x_obs) 1D ResNet Conv1D blocks 32→64→128→256 AdaptivePool FC → z [64] Feature Extraction Latent z [batch, 64] Compressed representation Neural Spline Flow p(θ | z) with 4 coupling layers Hidden: [256, 256, 256, 128] Invertible: Gaussian ↔ p(θ | x) Exact likelihood 3D ResNet Conv3D blocks 32→64→128→256 GlobalPool FC → z [64] Simulation Data P(k) Spectra [N_k] θ=(Ω_m, σ_8, b_g) 3D Fields [128³] Augmentation Flip, Rotate, Normalize Sample Augment Data Have data Check goodness and update parameters to be better at predicting Neural net learns! optimal statistics Reduce data to ! low-dim representation ℒ(θ) = −1 N N ∑ i=1 log pθ(ζ(i)∣z(i)) Normalising Flow learns posterior Negative log-likelihood loss
0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0249 Redshift Space: æ8 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0454 Redshift Space: bg 0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0154 Redshift Space + LOS Velocity: æ8 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0090 Redshift Space + LOS Velocity: ≠m 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0290 Redshift Space + LOS Velocity: bg Putting them together: p(Ωm,σ8,b|tracer) 1 Galaxies 0 2 4 6 8 10 12 14 Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 δRSD g vRSD pec Training ℒ=𝔼[log p(θ| z)] AdamW optimizer Inference 1. Encode: z = Encoder(x_obs) 2. Sample: θ ~ p(θ | z) 3. Posterior: p(θ | x_obs) 1D ResNet Conv1D blocks 32→64→128→256 AdaptivePool FC → z [64] Feature Extraction Latent z [batch, 64] Compressed representation Neural Spline Flow p(θ | z) with 4 coupling layers Hidden: [256, 256, 256, 128] Invertible: Gaussian ↔ p(θ | x) Exact likelihood 3D ResNet Conv3D blocks 32→64→128→256 GlobalPool FC → z [64] Simulation Data P(k) Spectra [N_k] θ=(Ω_m, σ_8, b_g) 3D Fields [128³] Augmentation Flip, Rotate, Normalize Sample Augment Data Have data Check goodness and update parameters to be better at predicting Neural net learns! optimal statistics Reduce data to ! low-dim representation ℒ(θ) = −1 N N ∑ i=1 log pθ(ζ(i)∣z(i)) Normalising Flow learns posterior Negative log-likelihood loss 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m
True vs predicted parameters 1 “What information does the velocity encode?” 0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0249 Redshift Space: æ8 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0454 Redshift Space: bg 0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0154 Redshift Space + LOS Velocity: æ8 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0090 Redshift Space + LOS Velocity: ≠m 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0290 Redshift Space + LOS Velocity: bg Galaxy overdensity RSD + mean LOS velocity RSD
True vs pred Ωm 1 0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0249 Redshift Space: æ8 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0454 Redshift Space: bg 0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0154 Redshift Space + LOS Velocity: æ8 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0090 Redshift Space + LOS Velocity: ≠m 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0290 Redshift Space + LOS Velocity: bg Galaxy overdensity RSD + mean velocity field RSD = how much matter there is ! how it is spread around! = how galaxies and DM relate Ωm σ8= b and " breaks degeneracy δ=− ∇ ⋅ v aHf f=Ω0.55 m ⟹
1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0454 Redshift Space: bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0290 Redshift Space + LOS Velocity: bg True vs pred fσ8 1 0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0249 Redshift Space: æ8 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m 0.6 0.7 0.8 0.9 1.0 True æ8 0.6 0.7 0.8 0.9 1.0 Predicted æ8 RMSE = 0.0154 Redshift Space + LOS Velocity: æ8 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0090 Redshift Space + LOS Velocity: ≠m Galaxy overdensity RSD + mean velocity field RSD = how much matter there is ! how it is spread around! = how galaxies and DM relate f∼ Ω0.55 m σ8= b Peculiar velocities ! are powerful probes" Test alternative theories ! of gravity ⟹ Combine to ! = Growth rate of structure! at low redshifts fσ8
•E.g. DESI Peculiar Velocity Survey data" •We assumed to know all velocities: unrealistic ! Only certain galaxy types permit velocity measurements! (ellipticals via Fundamental Plane, spirals via Tully-Fisher)" •Add noise! intrinsic scatter ~ error ∼20 % ⟹ ∼0.2czobs 1 Make realistic “Until we can use it for real data from telescopes, we need to make our data realistic”
p(vnl |δRSD g,vlin(ζ), ζ) Linear theory Cloud-In-Cell (CIC) ± Peculiar velocities and ζ=Ωm,σ8,b p(ζ|δRSD g) Cloud-In-Cell (CIC) Linear theory Parameter Inference Velocity Field Reconstruction 12 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m
p(vnl |δRSD g,vlin(ζ), ζ) Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 ± Peculiar velocities and ζ=Ωm,σ8,b p(ζ|δRSD g) Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Parameter Inference Velocity Field Reconstruction 1 2 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m
Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 δ=− ∇ ⋅ v aHf Velocity Field Reconstruction 2 Velocity field reconstruction on small scales (with true cosmology) “We already kind of know the velocities but only approximately” Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Linear theory Cloud-In-Cell (CIC) °800 °600 °400 °200 0 200 400 600 800 Gaussian smoothing ( Mpc) R= 15
Flow Matching Model Linear velocity field Nonlinear velocity field CONDITION ON Galaxy overdensity field in redshift space p(vnl |δRSD g,vlin) 2 dx dt =uθ(x(t), t)“flow” Learn flow ! modelled with UNet
2 3D Velocity Field Reconstruction
2 Velocity Field Reconstruction
2 Cross-correlation 10°210°1 k[Mpc°1] 0.0 0.2 0.4 0.6 0.8 1.0 Cross Correlation vx:rlin: 0.239, rpred: 0.814 vy:rlin: 0.409, rpred: 0.856 vz:rlin: 0.409, rpred: 0.850 |v|:r: 0.908 vx vy vz |v| Linear theory Model prediction “It worked!”
10°210°1 k[Mpc°1] 0.0 0.2 0.4 0.6 0.8 1.0 Cross Correlation vx:rlin: 0.239, rpred: 0.814 vy:rlin: 0.409, rpred: 0.856 vz:rlin: 0.409, rpred: 0.850 |v|:r: 0.908 vx vy vz |v| Linear theory Model prediction 10°210°1 k[Mpc°1] 0.0 0.2 0.4 0.6 0.8 1.0 Cross Correlation vx:rlin: 0.239, rpred: 0.814 vy:rlin: 0.409, rpred: 0.856 vz:rlin: 0.409, rpred: 0.850 |v|:r: 0.908 vx vy vz |v| Linear theory Model prediction 2 Cross-correlation: kSZ effect = how accurate is the reconstruction? r Mean correlation coefficient r=⟨vtruevpred⟩ σv trueσv pred
2 ΔT TCMB =−τv|| c “Good velocity reconstructions tell us more about how many electrons there are, and where” Higher = better signal r ⟨ΔT×(δg× v)⟩ ∝ τ×r(vtrue,vpred) Direct probe of ! electron density! measure the ionised gas abundance and distribution in galaxies and clusters ⟶ Mean correlation coefficient r=⟨vtruevpred⟩ σv trueσv pred Kinetic Sunyaev-Zel’dovich effect [4] T. Mroczkowski (2019)
p(vnl |δRSD g,vlin(ζ), ζ) ± Peculiar velocities and ζ=Ωm,σ8,b Parameter Inference Velocity Field Reconstruction 12 p(ζ|δRSD g) 10°210°1 k[Mpc°1] 0.0 0.2 0.4 0.6 0.8 1.0 Cross Correlation vx:rlin: 0.239, rpred: 0.814 vy:rlin: 0.409, rpred: 0.856 vz:rlin: 0.409, rpred: 0.850 |v|:r: 0.908 vx vy vz |v| Linear theory Model prediction 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m
± p(vnl,ζ|δRSD g,vlin(ζ))=p(vnl |δRSD g,vlin(ζ), ζ)⋅p(ζ|δRSD g) 3 Joint posterior Peculiar velocities and ζ=Ωm,σ8,b Parameter Inference Velocity Field Reconstruction 12 p(vnl |δRSD g,vlin(ζ), ζ) p(ζ|δRSD g) 10°210°1 k[Mpc°1] 0.0 0.2 0.4 0.6 0.8 1.0 Cross Correlation vx:rlin: 0.239, rpred: 0.814 vy:rlin: 0.409, rpred: 0.856 vz:rlin: 0.409, rpred: 0.850 |v|:r: 0.908 vx vy vz |v| Linear theory Model prediction 0.1 0.2 0.3 0.4 0.5 True ≠m 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 Predicted ≠m RMSE = 0.0265 Redshift Space: ≠m
Simulation-Based Cosmological Parameter Inference with Normalizing Flows Simulation Data P(k) Spectra [N_k] θ=(Ω_m, σ_8, b_g) 3D Fields [128³] Augmentation Flip, Rotate, Normalize 1D ResNet Conv1D blocks 32→64→128→256 AdaptivePool FC → z [64] Feature Extraction Latent z [batch, 64] Compressed representation Neural Spline Flow p(θ | z) with 4 coupling layers Hidden: [256, 256, 256, 128] Invertible: Gaussian ↔ p(θ | x) Exact likelihood 3D ResNet Conv3D blocks 32→64→128→256 GlobalPool FC → z [64] Training ℒ=𝔼[log p(θ| z)] AdamW optimizer Inference 1. Encode: z = Encoder(x_obs) 2. Sample: θ ~ p(θ | z) 3. Posterior: p(θ | x_obs) Putting everything together… p(vnl,ζ|δRSD g,vlin) ζ1= {Ωm,1,σ8,1,b1} ζ2= {Ωm,2,σ8,2,b2} ζ3= {Ωm,3,σ8,3,b3} 1 2 ζ= {Ωm,σ8,b} ± 3 p(vnl |δRSD g,vlin(ζ), ζ) p(ζ|δRSD g)
3 ζ= {Ωm,σ8,b} ± Joint inference: ! correlation coefficient Velocity reconstruction when we know the ! true “cosmology” vs. when the model learns it ζ1= {Ωm,1,σ8,1,b1} Simulation-Based Cosmological Parameter Inference with Normalizing Flows Simulation Data P(k) Spectra [N_k] θ=(Ω_m, σ_8, b_g) 3D Fields [128³] Augmentation Flip, Rotate, Normalize 1D ResNet Conv1D blocks 32→64→128→256 AdaptivePool FC → z [64] Feature Extraction Latent z [batch, 64] Compressed representation Neural Spline Flow p(θ | z) with 4 coupling layers Hidden: [256, 256, 256, 128] Invertible: Gaussian ↔ p(θ | x) Exact likelihood 3D ResNet Conv3D blocks 32→64→128→256 GlobalPool FC → z [64] Training ℒ=𝔼[log p(θ| z)] AdamW optimizer Inference 1. Encode: z = Encoder(x_obs) 2. Sample: θ ~ p(θ | z) 3. Posterior: p(θ | x_obs) ζ= {Ωm,σ8,b} ζ2= {Ωm,2,σ8,2,b2} ζ3= {Ωm,3,σ8,3,b3}
and sampling method. Linear theory results are shown for reference. Method vxvyvz|v| Linear Theory 0.169 ±0.402 0.464 ±0.320 0.468 ±0.321 — Uniform 0.520 ±0.242 0.601 ±0.199 0.601 ±0.206 0.723 ±0.141 NF Posterior 0.545 ±0.252 0.699 ±0.202 0.693 ±0.206 0.768 ±0.145 True values 0.639 ±0.209 0.780 ±0.153 0.770 ±0.159 0.830 ±0.102 3 ζ= {Ωm,σ8,b} ± Master’s Thesis ETH Zürich Constança Tropa sampling from the normalizing flow posterior rather than using true parameter values, both the mean correlation r decreases and its variance ωr increases. This pattern confirms that cosmological parameter uncertainties directly impact velocity field reconstruction quality. The marginalised approach (normalizing flow posterior) nevertheless achieves considerably higher correlations than the uniform sampling baseline, demonstrating that the normalizing flow successfully constrains parameters to values consistent with the observed galaxy distribution. These results validate our hierarchical inference framework and quantify the trade-o!between parameter uncertainty and reconstruction fidelity. Table 4.1: Mean correlation coe"cients r±ωr across k for each velocity component and sampling method. Linear theory results are shown for reference. Method vxvyvz|v| Linear Theory 0.169 ±0.402 0.464 ±0.320 0.468 ±0.321 — Uniform 0.520 ±0.242 0.601 ±0.199 0.601 ±0.206 0.723 ±0.141 NF Posterior 0.545 ±0.252 0.699 ±0.202 0.693 ±0.206 0.768 ±0.145 True values 0.639 ±0.209 0.780 ±0.153 0.770 ±0.159 0.830 ±0.102 Correcting redshift-space distortions Once we have jointly sampled velocities and cosmological parameters, we can correct for redshift-space distortions in a selfconsistent manner. The reconstructed nonlinear velocities can be interpolated onto galaxy positions, assigning each galaxy a probabilistic velocity range. By applying these corrections under each sampled cosmology and marginalizing over the ensemble, we obtain a posterior distribution over real-space positions for each galaxy that properly accounts for both cosmological and field-level uncertainties. Crucially, after removing velocity-induced anisotropies, any residual clustering anisotropy predominantly traces geometric distortions from the Alcock-Paczy#ski e!ect, enabling clean separation and joint constraints on growth and expansion history. Robustness to cosmological uncertainties A key advantage of our marginalization approach becomes evident in light of ongoing cosmological tensions. The 3 . 6 ω Hubble tension (Figure 1.2) implies that any method assuming a fixed fiducial cosmology risks systematic errors of order 10% in velocity predictions. Our joint inference framework naturally handles this uncertainty: when we sample from 57 Master’s Thesis ETH Zürich Constança Tropa sampling from the normalizing flow posterior rather than using true parameter values, both the mean correlation r decreases and its variance ωr increases. This pattern confirms that cosmological parameter uncertainties directly impact velocity field reconstruction quality. The marginalised approach (normalizing flow posterior) nevertheless achieves considerably higher correlations than the uniform sampling baseline, demonstrating that the normalizing flow successfully constrains parameters to values consistent with the observed galaxy distribution. These results validate our hierarchical inference framework and quantify the trade-o!between parameter uncertainty and reconstruction fidelity. Table 4.1: Mean correlation coe"cients r±ωr across k for each velocity component and sampling method. Linear theory results are shown for reference. Method vxvyvz|v| Linear Theory 0.169 ±0.402 0.464 ±0.320 0.468 ±0.321 — Uniform 0.520 ±0.242 0.601 ±0.199 0.601 ±0.206 0.723 ±0.141 NF Posterior 0.545 ±0.252 0.699 ±0.202 0.693 ±0.206 0.768 ±0.145 True values 0.639 ±0.209 0.780 ±0.153 0.770 ±0.159 0.830 ±0.102 Correcting redshift-space distortions Once we have jointly sampled velocities and cosmological parameters, we can correct for redshift-space distortions in a selfconsistent manner. The reconstructed nonlinear velocities can be interpolated onto galaxy positions, assigning each galaxy a probabilistic velocity range. By applying these corrections under each sampled cosmology and marginalizing over the ensemble, we obtain a posterior distribution over real-space positions for each galaxy that properly accounts for both cosmological and field-level uncertainties. Crucially, after removing velocity-induced anisotropies, any residual clustering anisotropy predominantly traces geometric distortions from the Alcock-Paczy#ski e!ect, enabling clean separation and joint constraints on growth and expansion history. Robustness to cosmological uncertainties A key advantage of our marginalization approach becomes evident in light of ongoing cosmological tensions. The 3 . 6 ω Hubble tension (Figure 1.2) implies that any method assuming a fixed fiducial cosmology risks systematic errors of order 10% in velocity predictions. Our joint inference framework naturally handles this uncertainty: when we sample from 57 Joint inference: ! correlation coefficient With model cosmology = a bit worse but captures uncertainty ζ= {Ωm,σ8,b} Simulation-Based Cosmological Parameter Inference with Normalizing Flows Simulation Data P(k) Spectra [N_k] θ=(Ω_m, σ_8, b_g) 3D Fields [128³] Augmentation Flip, Rotate, Normalize 1D ResNet Conv1D blocks 32→64→128→256 AdaptivePool FC → z [64] Feature Extraction Latent z [batch, 64] Compressed representation Neural Spline Flow p(θ | z) with 4 coupling layers Hidden: [256, 256, 256, 128] Invertible: Gaussian ↔ p(θ | x) Exact likelihood 3D ResNet Conv3D blocks 32→64→128→256 GlobalPool FC → z [64] Training ℒ=𝔼[log p(θ| z)] AdamW optimizer Inference 1. Encode: z = Encoder(x_obs) 2. Sample: θ ~ p(θ | z) 3. Posterior: p(θ | x_obs) ζ1= {Ωm,1,σ8,1,b1} ζ2= {Ωm,2,σ8,2,b2} ζ3= {Ωm,3,σ8,3,b3}