Probabilistic reconstruction of 3D peculiar velocity fields of galaxies using generative models
Full text
Probabilistic reconstruction of 3D peculiar velocity fields of galaxies using generative models Master’s Thesis Constança Tropa November 1, 2025 Harvard-Smithsonian Center for Astrophysics ETH Zurich Cosmology Group Supervisors: Dr. Carolina Cuesta-Lazaro Prof. Daniel Eisenstein Prof. Alexandre Refregier
Master’s Thesis ETH Zürich Constança Tropa Acknowledgements I thank Prof. Alexandre Refregier for introducing me to cosmology during my Bachelor’s, teaching me phenomenology in Astro II, and taking me as his master’s student. His continued guidance led to my decision to pursue a PhD in this field. I’m deeply grateful to Prof. Daniel Eisenstein for hosting me at Harvard and providing mentorship that exceeded my expectations. His passion for physics and teaching made working under his supervision a privilege and joy. AstroAI’s support made this experience possible, and provided me with resources to learn more about machine learning in astrophysics through the workshop and summer program. Special thanks to Cecilia, Rafa and Josh. Thank you also to everyone at the CfA, and especially to Yueying Ni, for fostering an environment where science is exciting and one can truly thrive. Most importantly, a huge thank you to Carol, without whom this project would not have been possible. Always available, incredibly smart and knowledgeable, and working on cutting-edge science, I could not have asked for a better supervisor! You were always patient and optimistic about our work, and have shown me how enjoyable research can be. Your support has extended beyond thesis supervision, giving valuable advice on my presentations, proof-reading this thesis, preparing me for the PhD search, and finding opportunities for me to learn. To my fellow Boston astrophysicists, Rocco, Rebeka, Pablo, and Zeineb, and to Cassiano at the sailing pavilion, thank you for making Boston feel like home. Of course, to Aya and Lori at Chestnut, for standing by me through my chaotic adventures. Finally, my warmest thanks to everyone in Zurich for accompanying me during my studies, helping, learning and growing together. A special thank you goes to André, who has been there since the first day, Giada, my fellow physicist and friend, and Justus, who has supported and encouraged me even from very far away. Obrigada Kika, Madalena, Pai e Mãe por acreditarem sempre em mim, e me darem asas para eu seguir os meus sonhos. O vosso apoio incondicional fez-se sentir até ao último momento. 1
Abstract Peculiar velocities of galaxies encode critical information about the growth of cosmic structure and the nature of gravity, yet remain challenging to measure directly. Upcoming peculiar velocity surveys such as DESI and Rubin will probe velocities at low redshifts, during late-time epochs when structure formation is highly nonlinear, making careful modeling of the underlying gravitational nonlinearities especially important This thesis develops machine learning frameworks that operate at the field level for cosmological inference from galaxy redshift surveys, addressing two complementary problems: extracting cosmological parameters from observations and reconstructing three-dimensional nonlinear velocity fields. We first present a likelihood-free method to constrain the posterior distribution over cosmological parameters, which describe the overall composition of the Universe, and a linear galaxy bias parameter, relating observed galaxy distributions to the underlying dark matter field, using neural networks trained on nonlinear N-body simulations at a redshift z = 0. By comparing constraints from different tracers, namely power spectra P ( k ), density fields δg , and non-linear velocity fields v nl , in both real and redshift space, we quantify their relative information content. Joint densityvelocity observations achieve mean log probabilities ⟨log ptrue⟩ = 10 . 22 compared to 8 . 39 for density alone, reducing Ω m posterior variance by a factor of 9.3 and demonstrating the significant value of peculiar velocity measurements. For velocity reconstruction, we develop a high-dimensional inference framework based on flow matching generative models that learn the transformation from linear perturbation theory predictions to fully nonlinear velocity fields, conditioned on observed galaxy overdensity δRSD g and linear velocity estimates v lin . The method achieves mean correlation coefficients of rpred x = 0 . 814 ± 0 . 128 for the line-of-sight component and rpred |v| = 0 . 908 ± 0 . 067 for velocity magnitude, maintaining r ( k ) > 0 . 8 with ground truth at scales k≲ 0 . 2 hMpc−1 , a 3 . 4 × improvement over linear theory that extends accurate reconstruction well into the mildly nonlinear regime. We combine these approaches into a hierarchical inference pipeline that marginalizes over cosmological parameter uncertainties. By avoiding fixed fiducial cosmologies, we properly propagate uncertainties into velocity predictions. This is particularly important given current tensions in Hubble constant and S8 measurements, where estimates differ significantly from Planck values.
Contents 1 Introduction 6 1.1 The Matter Distribution and Galaxy Bias . . . . . . . . . . . . . . . 7 1.2 Peculiar Velocities and Redshift-Space Distortions . . . . . . . . . . . 9 1.2.1 Mapping from Real to Redshift Space . . . . . . . . . . . . . . 10 1.2.2 The Kaiser Effect on Large Scales . . . . . . . . . . . . . . . . 10 1.2.3 The Finger-of-God Effect on Small Scales . . . . . . . . . . . . 11 1.3 The Alcock-Paczyński Effect and Geometric Distortions . . . . . . . . 13 1.4 Cosmological Tensions and the Need for Velocity Measurements . . . 14 1.5 Linear Theory and Nonlinear Corrections . . . . . . . . . . . . . . . . 17 1.6 The Kinetic Sunyaev-Zel’dovich Effect . . . . . . . . . . . . . . . . . 19 1.7 Machine Learning for Velocity Field Reconstruction . . . . . . . . . . 20 2 Generative Models in Cosmology and N-body Simulations 22 2.1 Field-levelInference............................ 23 2.2 Normalizing Flows for Parameter Inference . . . . . . . . . . . . . . . 23 2.3 Flow Matching for Generating High-Dimensional Data . . . . . . . . 24 2.4 Quijote Latin-Hypercube Simulations . . . . . . . . . . . . . . . . . . 25 2.4.1 Field Construction . . . . . . . . . . . . . . . . . . . . . . . . 27 3 Parameter Inference using Normalizing Flows and a ResNet 30 3.1 Tracers: Summary Statistics and 3D Fields . . . . . . . . . . . . . . . 31 3.2 ModelArchitecture............................ 33 3.2.1 Simulation Data Standardization and Augmentation . . . . . . 34 3.2.2 Feature Extraction using Convolutional ResNets . . . . . . . . 34 3.2.3 Normalizing Flow Architecture . . . . . . . . . . . . . . . . . 35 3.2.4 Training and Evaluation Metrics . . . . . . . . . . . . . . . . . 36 1
Master’s Thesis ETH Zürich Constança Tropa 3.3 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4 Reconstruction of Peculiar Velocity Fields combining Flow Matching and a UNet 42 4.1 Initial, Conditioning and Target Distributions . . . . . . . . . . . . . 43 4.2 UNetArchitecture ............................ 45 4.2.1 Input, Conditioning and Output . . . . . . . . . . . . . . . . . 45 4.2.2 Encoder-Decoder Architecture . . . . . . . . . . . . . . . . . . 46 4.2.3 Training and Inference . . . . . . . . . . . . . . . . . . . . . . 47 4.3 Comparison of Ground Truth, Linear Theory and Model Prediction Fields ................................... 47 4.3.1 Scatter Plots of True and Predicted Velocities . . . . . . . . . 48 4.3.2 Power Spectrum Reconstruction . . . . . . . . . . . . . . . . . 49 4.3.3 Cross-correlation Coefficients and Implications for kSZ . . . . 50 4.4 Model Ablations: Impact of Network Depth . . . . . . . . . . . . . . 53 4.5 Joint Inference of Velocities and Cosmological Parameters . . . . . . . 54 5 Discussion and Conclusion 59 5.0.1 Additional Cosmological Applications . . . . . . . . . . . . . . 62 5.0.2 Limitations and Extensions . . . . . . . . . . . . . . . . . . . 64 5.0.3 Path toward Application to DESI . . . . . . . . . . . . . . . . 65 A Normalizing Flow Model: Training Hyperparameters 67 B Parameter Inference with Normalizing Flows: Predicted vs True Parameters 68 B.1 Power Spectra in Real and Redshift space . . . . . . . . . . . . . . . 68 B.2 Matter and Galaxy Density Fields in Real Space . . . . . . . . . . . . 69 C Parameter Inference with Normalizing Flows: Joint Posterior Contours 70 2
List of Figures 1.1 Redshift-space distortions and Fingers-of-God in the Coma cluster . . 12 1.2 Hubble tension: Recent measurements of the Hubble constant . . . . 15 2.1 Normalizing flow transformation sequence . . . . . . . . . . . . . . . 24 2.2 Dark matter overdensity field from a Quijote simulation . . . . . . . . 28 3.1 Monopole and quadrupole in real and redshift space . . . . . . . . . . 32 3.2 Galaxy overdensity field . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.3 Velocity fields in real and redshift space . . . . . . . . . . . . . . . . . 34 3.4 Cosmological parameter inference pipeline using normalizing flows. . . 35 3.5 Training and validation losses for six tracers . . . . . . . . . . . . . . 38 3.6 Predicted versus true parameter values using δRSD g........... 38 3.7 Predicted versus true parameter values using δRSD g+vRSD pec . ...... 39 3.8 Joint posterior constraints on cosmological parameters and linear bias fordifferenttracers............................ 40 4.1 Conditional flow matching framework for velocity field reconstruction 43 4.2 Linear and nonlinear velocity fields . . . . . . . . . . . . . . . . . . . 44 4.3 ResUNet3D architecture for the flow matching model . . . . . . . . . 46 4.4 Velocity fields for linear theory, model prediction, and ground truth . 48 4.5 Scatter plot of model prediction and ground truth velocity fields . . . 49 4.6 Power spectrum of linear theory, model prediction and ground truth . 50 4.7 Cross-correlation between predicted and true velocity fields . . . . . . 51 4.8 Ablation study of U-Net depth in velocity reconstruction . . . . . . . 53 4.9 Two-stage hierarchical inference workflow . . . . . . . . . . . . . . . . 55 B.1 Predicted versus true parameters for P(k)............... 68 3
Master’s Thesis ETH Zürich Constança Tropa B.2 Predicted versus true parameter values using PRSD(k)........ 69 B.3 Predicted versus true parameter values using δm............ 69 B.4 Predicted versus true parameter values using δg............ 69 C.1 Posterior contours for different tracer combinations, test simulation 2 70 C.2 Posterior contours for different tracer combinations, test simulation 3 71 C.3 Posterior contours for different tracer combinations, test simulation 4 71 C.4 Posterior contours for different tracer combinations, test simulation 5 71 C.5 Posterior contours for different tracer combinations, test simulation 6 71 4
List of Tables 2.1 Specifications of the Quijote Latin Hypercube dataset . . . . . . . . . 29 3.1 Parameter inference summary statistics comparison for the six tracers 37 4.1 Joint posterior: Mean correlation coefficients for each velocity component and sampling method . . . . . . . . . . . . . . . . . . . . . . . . 57 A.1 Training hyperparameters for each tracer used for training the normalizingflowmodel............................ 67 5
Chapter 1 Introduction The distribution of matter in the Universe forms a complex network of structures, including clusters, filaments, and voids, collectively known as the cosmic web. This structure originated from tiny quantum fluctuations in the early Universe, which have since evolved and grown through gravitational instability. Understanding this evolution requires not only mapping where matter resides, but also how it moves. Beyond the Hubble expansion, galaxies possess peculiar velocities that encode critical information about gravitational dynamics, the growth rate of cosmic structure, and potentially even modifications to general relativity on cosmological scales. Galaxy redshift surveys have revolutionized our ability to map the three-dimensional distribution of matter in the Universe. By measuring both angular positions and spectroscopic redshifts for millions of galaxies, surveys such as the Sloan Digital Sky Survey (SDSS) [1], the 2-degree Field Galaxy Redshift Survey (2dFGRS) [2, 3], and the Baryon Oscillation Spectroscopic Survey (BOSS) [4] have constructed detailed three-dimensional maps of cosmic structure. Current and upcoming surveys promise even more ambitious datasets: the Dark Energy Spectroscopic Instrument (DESI) will measure redshifts for 40 million galaxies and quasars [5], while Euclid and the Vera Rubin Observatory’s Legacy Survey of Space and Time (LSST) will extend this to billions of galaxies over the next decade [6, 7]. These datasets will enable precision tests of cosmological models with high statistical power, provided we can accurately extract cosmological information from the complex, nonlinear structures they reveal. Among these surveys, the DESI Bright Galaxy Survey (BGS) stands out for its focus on the nearby Universe at z < 0 . 6, where it will construct a three-dimensional map during the era when dark energy dominates cosmic expansion [8]. Operating at these 6
Master’s Thesis ETH Zürich Constança Tropa with σv representing the effective pairwise velocity dispersion of galaxies. While these phenomenological damping functions can suppress small-scale power in redshift-space power spectrum models, accurately recovering the real-space distribution requires detailed velocity field information that cannot be captured by summary statistics alone. This limitation motivates field-level approaches that work directly with the three-dimensional galaxy distribution rather than compressed statistics like the power spectrum. 1.3 The Alcock-Paczyński Effect and Geometric Distortions If we could accurately reconstruct the full three-dimensional velocity field across all scales, from the large-scale Kaiser effect described by linear theory down to the smallscale Fingers-of-God, we could in principle correct for redshift-space distortions and recover the real-space matter distribution. This corrected distribution would enable more precise cosmological measurements by removing velocity-induced anisotropies. However, this correction procedure is complicated by the Alcock-Paczyński (AP) effect: geometric distortions arise when an incorrect cosmological model is assumed to convert observed angles and redshifts into physical distances [42]. The AP effect quantifies how geometric assumptions distort the inferred threedimensional distribution. When converting observed angles θ and redshift differences ∆ z to physical separations, we use the angular diameter distance DA ( z )and Hubble parameter H(z): ∆x⊥=DA(z) ∆θ, ∆x∥=c∆z H(z).(1.3.1) If the fiducial cosmology used for these conversions differs from the true cosmology, distances are systematically distorted. The distortion is quantified by two parameters: α⊥=Dtrue A(z) Dfid A(z), α∥=Hfid(z) Htrue(z),(1.3.2) comparing the true and fiducial angular diameter distances and Hubble parameters. Intrinsically spherical structures appear elongated or compressed depending on whether α∥> α⊥or α∥< α⊥. The observed clustering anisotropy therefore has two coupled phenomena in their 13
Master’s Thesis ETH Zürich Constança Tropa origin: dynamical effects from peculiar velocities (RSD) and geometric distortions from coordinate transformations (AP). These effects are entangled because the same clustering pattern can result from different combinations of cosmological parameters and velocity fields, making them difficult to separate. When constraining cosmological parameters using galaxy clustering [43–47], this entanglement means that RSD contamination induces apparent anisotropy even when the correct cosmology is assumed. To mitigate this issue, methods exploiting the redshift dependence of the AP effect have been developed. These include using the galaxy density gradient field [48] or the integrated 2-point correlation function [49], both of which are less affected by RSD because peculiar velocities do not exhibit significant redshift evolution. Several other methods have also been proposed which apply the AP test to large-scale structure and dark energy using symmetry properties of galaxy pairs [50, 51] and cosmic voids [52, 53]. An alternative approach to breaking the degeneracy between RSD and AP is simultaneous inference: by jointly fitting both the velocity field and cosmological parameters, we can attribute anisotropies to their correct physical origins. Accurate velocity field reconstruction effectively disentangles RSD from AP distortions, enabling independent constraints on the expansion history H ( z )(through AP) and structure growth fσ8 (through RSD). In the presence of cosmological tensions, this joint approach is particularly important, as assuming incorrect fiducial cosmological parameters introduces systematic biases in the analysis. 1.4 Cosmological Tensions and the Need for Velocity Measurements Understanding and accurately modeling peculiar velocity fields has become increasingly urgent in light of persistent tensions in our cosmological measurements. The most prominent example is the Hubble tension: early-universe Planck measurements from the cosmic microwave background (CMB) yield H0 = 67 . 4 ± 0 . 5 ,km,s−1,Mpc−1 [54], whereas late-universe measurements using Cepheid variable stars and Type Ia supernovae from the SH0ES collaboration give H0 = 73 . 0 ± 1 . 0 ,km,s−1,Mpc−1 [55], a discrepancy exceeding 5 σ (Figure 1.2). Similar, though milder, differences are observed in the amplitude of matter fluctuations, quantified by S8 = σ8qΩm/0.3 , 14
Master’s Thesis ETH Zürich Constança Tropa where weak lensing and galaxy clustering data show lower values than CMB predictions [56]. These tensions may point to residual systematics or potentially to new physics beyond ΛCDM [57, 58]. 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 Figure 1.2: Recent measurements of the Hubble constant H0 since the year 2000 based on Cepheid variable stars (blue), tip of the red giant branch (TRGB, red) and the cosmic microwave background (CMB, black). Shaded regions illustrate the evolution of central values and uncertainties over time, highlighting the persistent tension between late-universe (Cepheid, TRGB) and early-universe (CMB) measurements. The results for the CMB assume a flat ΛCDM universe. This ∼ 5 σ discrepancy motivates improved velocity field measurements to provide independent constraints on the expansion history and structure growth. In this context, peculiar velocity fields serve as a powerful probe of gravitational dynamics and play a crucial role in testing cosmological models by enabling direct comparisons between observed galactic motions and theoretical predictions based on the underlying dark matter distribution [59–64]. Their statistical properties provide an independent avenue for constraining key cosmological parameters such as the matter density and the amplitude of matter fluctuations [65–70]. Recently, Duangchan et al. [71] demonstrated that peculiar velocity data alone can yield a competitive, cosmology-independent estimate of the Hubble constant. Using the Cosmicflows-4 catalog and a forward-modeling approach without cosmological priors, they obtained H0 = 75 . 8 ± 0 . 4 ,km,s−1,Mpc−1 , further intensifying the Hubble tension through an entirely independent probe of the local velocity field. The linearized continuity equation relates the velocity divergence to the matter 15
Master’s Thesis ETH Zürich Constança Tropa overdensity in the linear regime, δ=− ∇ · v aHf ,(1.4.1) which in Fourier space becomes v k=iaHf k2 k δ k.(1.4.2) This relationship implies that the amplitude of the velocity field is directly sensitive to the growth rate f , providing complementary information to density-based measurements. Combining galaxy density and velocity information from the same samples allows degeneracies between cosmological parameters to be broken, leading to tighter constraints. Redshift-space distortions encode this same physics through anisotropies in the observed galaxy clustering pattern. The amplitude and angular dependence of these distortions trace the parameter combination fσ8 , making RSD one of the most direct probes of the growth of structure and, by extension, tests of gravity on cosmological scales [72]. Observations from galaxy surveys such as BOSS and eBOSS have constrained fσ8 to within ∼ 5–10% across multiple redshifts [73–77], providing stringent consistency checks of the ΛCDM paradigm. A variety of complementary approaches have been developed to extract this information: Percival and White [78] demonstrated that the measured galaxy power spectrum can constrain fσ8 , while Gil-Marín et al. [79] obtained independent estimates from the redshift-space bispectrum. Joint analyses combining galaxy density and peculiar velocity information further enhance constraining power. Adams and Blake [67] showed, using the 6dF Galaxy Survey, that modeling the cross-covariance between the two fields improves fσ8 precision by about 20% compared to auto-covariance analyses alone. Similarly, Howlett et al. [80] used simulated 2MTF data to demonstrate that the velocity power spectrum alone can yield competitive constraints on fσ8 , while Palmese and Kim [81] explored the how to combine galaxy peculiar velocities and gravitational-wave signal for cosmological inference. Beyond parameter estimation, peculiar velocity measurements also enable direct tests of modified gravity scenarios, as shown by Song and Koyama [72], Jain and 16
Master’s Thesis ETH Zürich Constança Tropa Zhang [82], and Song and Percival [83], who demonstrated that deviations in the velocity field can reveal departures from general relativity. These considerations highlight why improved reconstruction and modeling of velocity fields are so valuable. The mapping from peculiar velocities to redshift-space positions depends explicitly on H ( a ), and the prediction of linear velocity fields from the density field through Equation 1.4.1 depends on the growth rate f (Ω m ) ≈ Ω 0.55 m . Uncertainties in H0 or Ω m therefore propagate directly into systematic biases in inferred velocities and cosmological parameters. Conventional reconstruction techniques typically assume a fixed fiducial cosmology (often Planck-based), which implicitly assumes that ΛCDM is correct. If the true cosmology differs, as current tensions suggest, these methods introduce systematic biases in both recovered velocity fields and derived constraints. This motivates approaches that marginalize over cosmological parameter uncertainties, allowing the data to inform both the cosmology and the velocity field simultaneously. 1.5 Linear Theory and Nonlinear Corrections The relationship between density and velocity fields provides the theoretical foundation for velocity reconstruction. In the linear regime where perturbations are small ( |δ| ≪ 1), the continuity equation (Equation 1.4.1) provides an exact relationship. This implies that velocity fields can be computed directly from density fields in Fourier space via Equation 1.4.2. The factor of i k /k2 indicates that the velocity field is irrotational ( ∇ × v= 0) in linear theory, with velocities pointing radially toward overdense regions and away from underdense voids [33]. This linear prediction captures large-scale flows accurately on scales k≲ 0 . 1– 0 . 2 hMpc−1 . At these scales, the typical density contrast is |δ| ∼ 0 . 1–0 . 3, justifying the linear approximation, and the velocity-density correlation coefficient is nearly perfect ( r > 0 . 95) [84]. However, this approximation breaks down on smaller scales where nonlinear gravitational evolution becomes significant. In collapsed regions where |δ| ≫ 1, several nonlinear effects emerge that cannot be captured by Equation 1.4.2: Shell-crossing and vorticity generation: When orbits of dark matter particles or galaxies intersect, the single-stream approximation underlying the continuity 17
Master’s Thesis ETH Zürich Constança Tropa equation fails. This shell-crossing generates vorticity, violating the irrotational assumption ∇ × v= 0 [85]. While the vorticity remains subdominant compared to the potential flow component even in the nonlinear regime ( |∇ × v |/|∇ · v | ∼ 0 . 1–0 . 3 at k∼0.5hMpc−1), it represents a qualitative departure from linear theory. Multi-streaming: In virialized halos, particles occupy a range of velocities at each spatial position due to multi-streaming. The velocity field v(x)becomes illdefined as a single-valued function, and should properly be described by a velocity distribution function f (x , v)[86]. The mapping from density to velocity is therefore fundamentally non-unique in collapsed regions. Nonlinear gravitational couplings: Higher-order perturbation theory reveals that the velocity field receives corrections from mode coupling, with contributions proportional to products and spatial derivatives of the density field beyond the simple linear relationship [84]: v(x) = vlin[δ] + v(2)[δ, δ] + v(3)[δ, δ, δ] + . . . , (1.5.1) where v lin is given by Equation 1.4.2 and higher-order terms involve convolutions of density modes. These corrections become increasingly important as k increases and δgrows. Accurately reconstructing velocities in the nonlinear regime therefore requires going beyond linear perturbation theory, capturing the complex velocity structure that emerges from gravitational collapse. Standard Lagrangian perturbation theory (LPT) provides approximate solutions by tracking particle trajectories from their initial Lagrangian positions [87, 88], while the Zel’dovich approximation gives first-order displacements: x(q, t) = q+D(t)Ψ(q),(1.5.2) where qis the initial Lagrangian position, xis the Eulerian position, and Ψis the displacement field computed from the initial density. However, these analytical approaches still fail in strongly nonlinear regions where multi-streaming occurs. Full N-body simulations resolve these effects but are computationally expensive, taking hours to days for a single realization depending on resolution [89]. This computational cost motivates the machine learning approach developed in this thesis: by training neural networks on a suite of N-body simulations that 18
Master’s Thesis ETH Zürich Constança Tropa span cosmological parameter space, we can learn the nonlinear corrections to linear theory velocity predictions. Once trained, the model provides accurate velocity field predictions orders of magnitude faster than running new simulations, enabling practical application to large observational datasets while properly marginalizing over cosmological uncertainties. 1.6 The Kinetic Sunyaev-Zel’dovich Effect Improved velocity predictions enhance measurements of the kinetic Sunyaev-Zel’dovich (kSZ) effect, where CMB photons scatter off moving electrons in galaxy clusters and groups, providing direct probes of line-of-sight velocities [90, 91]. When CMB photons inverse Compton scatter off free electrons moving with bulk velocity v e , the resulting temperature anisotropy is proportional to the line-of-sight momentum: ∆T TCMB =−τv∥ c,(1.6.1) where τis the optical depth through the ionized gas: τ=σTZnedl, (1.6.2) with σT the Thomson scattering cross-section, ne the electron number density, and the integral performed along the line of sight. Unlike redshift-space distortions, which encode velocity information implicitly through position distortions, the kSZ effect directly measures line-of-sight velocities, making it a powerful complementary probe. Recent detections by the Atacama Cosmology Telescope (ACT) and South Pole Telescope (SPT) have demonstrated the feasibility of measuring kSZ signals by cross-correlating CMB temperature maps with galaxy catalogs [92–96]. These analyses use the galaxy distribution to identify where electron gas resides and predict its velocity based on the surrounding density field. The cross-correlation between CMB temperature and galaxy density, weighted by an estimate of the velocity field, yields: ⟨∆T×(δg׈v)⟩ ∝ τ×r(vtrue, vpred),(1.6.3) 19
Master’s Thesis ETH Zürich Constança Tropa where r is the correlation coefficient between the true and predicted line-of-sight velocities. Improving this correlation directly enhances the signal-to-noise of kSZ detections. Future surveys combining high-resolution CMB observations from the Simons Observatory and CMB-S4 with spectroscopic galaxy catalogs from DESI and Euclid will achieve the statistical power to detect kSZ signals from increasingly lower-mass systems [97, 98]. The statistical power to detect kSZ signals from these systems depends critically on reducing velocity-induced systematic uncertainties. Current analyses rely on linear theory velocity predictions from Equation 1.4.2, which become increasingly inaccurate on smaller scales. Improved reconstruction of the cosmic velocity field on small scales would therefore enhance the precision of kSZ measurements, boosting signal-to-noise. This would enable tighter constraints on the growth rate of structure and gravity theories [99, 100], and open up possibilities for studying velocity fields on smaller scales where kSZ signatures peak. 1.7 Machine Learning for Velocity Field Reconstruction Machine learning approaches, particularly simulation-based inference (SBI) [101] and generative models, offer compelling solutions to the challenges described above: unprecedented data volumes from next-generation surveys, limitations of linear theory for studying the non-linear regime, and marginalising over cosmological parameters due to tensions. Rather than running computationally expensive simulations ondemand during inference, we can train neural networks once on a large suite of simulations, learning mappings between observables and parameters. Once trained, these models enable fast and simple inference, generating posteriors from which we can extract samples. This thesis addresses the fundamental challenge: how can we reconstruct three-dimensional peculiar velocity fields from galaxy redshift surveys while simultaneously constraining cosmological parameters, thereby improving both our understanding of structure formation and our ability to test cosmological models? We employ two complementary classes of generative models, normalizing flows for cosmological parameter inference and flow matching 20
Master’s Thesis ETH Zürich Constança Tropa for velocity field reconstruction. These models learn nonlinear corrections from cosmological simulations while properly marginalizing over cosmological parameter uncertainties. These models are trained on the Quijote Latin Hypercube simulation suite, comprising 2000 independent N-body realizations that systematically explore cosmological parameter space. Our work builds upon several recent advances in the field. Cuesta-Lazaro et al. [102] developed a probabilistic approach toward joint cosmological parameter inference and reconstruction of initial conditions using normalising flows and stochastic interpolants. Similarly, Park et al. [103] and Ono et al. [104] employed diffusion models to tackle high-dimensional problems using galaxy density fields for reconstructing dark matter fields, and Santi et al. [105] used graph neural networks for field-level parameter inference. In the reconstruction of peculiar velocity fields, the BORG algorithm is especially relevant [106]. Stiskalek et al. [107] recently showed that the CSiBORG1/CSiBORG2 models [108, 109], which are based on the BORG algorithm, outperform other peculiar velocity reconstruction methods such as those in Carrick et al. [62], Sorce [110], and Lilow, Veena, and Nusser [111]. Prideaux-Ghee et al. [112] used the Bayesian Origin Reconstruction from Galaxies (BORG) algorithm to infer initial conditions as well as density and velocity fields on non-linear scales. However, these reconstructions do not take a probabilistic approach and do not marginalise over cosmological parameters, motivating our alternative methodology. This thesis is organized as follows. Chapter 2 provides the methodological background on generative models (normalizing flows and flow matching) and describes the Quijote simulation suite used for training and validation, including details of the simulation physics, field construction, and data preprocessing. Chapter 3 presents cosmological parameter inference using normalizing flows, comparing six different observable tracers to quantify their constraining power on the posteriors. Chapter 4 develops the velocity field reconstruction method using flow matching, validates performance through power spectra and cross-correlations, and compares results with linear theory predictions. This chapter also presents the joint inference pipeline that marginalizes over cosmological uncertainties when reconstructing velocity fields. Finally, Chapter 5 discusses applications to kSZ measurements and redshift-space distortion corrections, addresses limitations, and outlines future directions. 21
Chapter 2 Generative Models in Cosmology and N-body Simulations Generative models learn to sample from complex probability distributions by transforming simple base distributions into target distributions that match observed data. In cosmology, these models address fundamental challenges in inference and prediction. Cosmological inference faces the unique challenge that we observe only a single realization of our Universe, yet must infer underlying parameters by comparing with synthetic realizations. Generative models learn to rapidly sample possible universes conditioned on cosmological parameters, enabling efficient parameter-space exploration without expensive N-body simulations for each configuration. Modern analyses involve high-dimensional inference with complex parameter correlations and often lack tractable likelihoods, as the mapping from parameters to observables involves non-linear evolution that cannot be written analytically. Generative models bypass explicit likelihood computation through simulation-based inference and naturally provide full posterior distributions for proper uncertainty quantification. We leverage normalizing flows for parameter inference and flow-matching models for velocity-field reconstruction, where the probabilistic inverse problem and physical priors make them particularly suitable. 22
Master’s Thesis ETH Zürich Constança Tropa Table 2.1 summarizes the key properties of the Quijote Latin Hypercube dataset used throughout this work. Table 2.1: Summary of the Quijote Latin Hypercube dataset specifications. Property Value / Description Number of simulations 2000 (Latin Hypercube design) Sampling method Uniform LH in 5D parameter space Cosmological model Flat ΛCDM with massless neutrinos Box size V= 1 (h−1Gpc)3 Number of particles Np= 5123≈1.34 ×108 Particle mass (fiducial) mp≈1.6×1010 h−1M⊙ Nyquist frequency kNyq =πNgrid/L N-body code gadget-iii (TreePM algorithm) Initial conditions Second-order Lagrangian perturbation theory (2LPT) Starting redshift zinit = 127 Available redshifts z={0,0.5,1,2,3} Output specifications Primary redshift (this work) z= 0 Derived fields Density ρ(x), mean velocity ¯ v(x), linear velocity vlin(x); real and redshift space Grid resolution 1283 Mass-assignment scheme Cloud-in-Cell (CIC) via Pylians 29
Chapter 3 Parameter Inference using Normalizing Flows and a ResNet Traditional cosmological parameter inference from galaxy clustering uses analytical summary statistics like the power spectrum, which cannot capture non-Gaussian information in the density field, particularly on non-linear scales where higher-order statistics are significant. For galaxy surveys, traditional MCMC-based inference is computationally intractable. Each likelihood evaluation p (x |ζ )would require running expensive N-body simulations and marginalizing over stochastic initial conditions across parameter space. On top of that, analytical likelihoods are often not well known in the non-linear regime, and incorrect assumptions on the likelihood can introduce significant biases in the inference [116]. The high dimensionality of the data (millions of galaxies with complex spatial correlations), complex observational systematics, and the lack of analytical likelihoods make explicit likelihood evaluation almost impossible. In this Chapter, we show how we can work around these problems using likelihood-free inference via neural posterior estimation (NPE). We generate training sets { ( ζi, x i ) } by running forward simulations across parameter space, and train a normalizing flow to learn p ( ζ| x)directly. Once trained, the flow provides immediate posterior evaluations for new observations without an explicit likelihood calculation or additional simulations. This approach enables Bayesian inference from the full spatial structure of galaxy surveys, including non-Gaussian information inaccessible to traditional likelihood-based methods. We infer three cosmological and astrophysical parameters: the matter density pa30
Master’s Thesis ETH Zürich Constança Tropa rameter Ω m , the amplitude of matter fluctuations σ8 , and the linear galaxy bias b1 . We infer these parameters from various quantities derived from the simulated galaxy density fields from Quijote, which we refer to as tracers because they trace the underlying matter distribution. For each tracer, we construct the posterior distribution p(Ωm, σ8, b1|tracer). Tracers include compressed statistics like P ( k )and field-level information: the 3D galaxy density field δg (x), line-of-sight peculiar velocity field v pec (x), and their joint distribution {δg(x),vpec(x)}. Using a ResNet, our model learns optimal summary statistics directly from 3D galaxy and velocity distributions, automatically extracting the most informative features for parameter inference. By comparing the six different tracers, we can quantify how much parameter constraints improve when moving from summary statistics to field-level data. The remainder of this chapter is organized as follows: we present the different tracers and their properties (Section 3.1), describe the normalizing flow architecture and training procedure (Section 3.2), and analyze the resulting parameter constraints for these tracers at a grid resolution of 1283(Section 3.3). 3.1 Tracers: Summary Statistics and 3D Fields We compare six different tracers that vary in their information content and computational cost. The simplest statistics used for conditioning are the galaxy power spectrum in both real and redshift space. Figure 3.1 on the left shows that the redshift-space power spectrum PRSD 0 (dashed lines) exhibits an enhancement compared to the real-space spectrum P0 (solid lines). On large scales, this enhancement follows the Kaiser formula, which can be approximated as: PRSD(k) P(k)= 1 + 2 3β+1 5β2,(3.1.1) where β = f/b , with f the linear growth rate and b the linear bias. This monopole enhancement arises from the Kaiser effect on large scales. At small scales, nonlinear structure formation and the Fingers of God effect modify this simple picture, but the overall enhancement persists and encodes cosmological information. 31
Master’s Thesis ETH Zürich Constança Tropa Figure 3.1 on the right demonstrates that the quadrupole remains near zero in real space (blue), while exhibiting significant non-zero structure in redshift space (green), quantifying the anisotropy induced by RSD. 10−210−1 k[h/Mpc] 102 2×102 3×102 4×102 kP0(k)/2π2 Monopole Real Space Redshift Space 10−210−1 k[h/Mpc] 0 50 100 150 200 250 300 kP2(k)/2π2 Quadrupole Real Space Redshift Space Figure 3.1: Power spectrum multipoles in real (blue) and redshift space (green) at a resolution of 128 3 , with spectra truncated at the Nyquist frequency kNyq = πngrid/L . Left: The monopole P0 ( k )shows enhancement in redshift space due to coherent infall velocities. Right: The quadrupole P2 ( k )is near zero in real space but exhibits significant structure in redshift space, demonstrating that RSD introduces anisotropic features that can be exploited for parameter inference. Beyond summary statistics, we also use the full three-dimensional fields that preserve spatial information. These include the galaxy overdensity field δg in real space and δRSD g in redshift space, as well as the unbiased matter density field δm . While the matter field is not directly observable, it serves as a useful benchmark for quantifying the information loss introduced by galaxy bias and selection effects in real observations. Figure 3.2 shows a slice of δg at x = 64 for a grid resolution of 1283. The matter density field δmcan be seen in Fig 2.2 above. Finally, we incorporate the peculiar velocity fields in redshift space as additional conditioning information. Figure 3.3 compares the x -component of the velocity field along the line of sight at an x = 64 slice in real space (left) and redshift space (right) for a resolution of 128 3 . In real space, the velocity field exhibits smooth, coherent structures corresponding to gravitational infall onto overdense regions. In redshift space, the mapping of galaxy positions along the line of sight introduces apparent discontinuities and artifacts. Yellow circles highlight examples of this effect: voxels with anomalously high velocities surrounded by near-zero velocity regions. These features arise when galaxies with large line-of-sight velocities are displaced significantly along the redshift coordinate, causing the cloud-in-cell interpolation to 32
Master’s Thesis ETH Zürich Constança Tropa Galaxies 0 2 4 6 8 10 12 14 Figure 3.2: Galaxy overdensity fields δg , at a resolution of 128 3 , showing a single slice through the simulation volume (x= 64). assign their velocities to grid cells far from their true positions. While these artifacts complicate the velocity field structure, they encode information about the growth rate and velocity distribution that can improve parameter constraints. 3.2 Model Architecture Having defined our six tracers, we now describe the complete inference architecture. We employ a simulation-based inference approach using normalizing flows to learn the mapping from observable tracers to cosmological parameters. Normalizing flows are generative models that learn invertible transformations between a simple base distribution (here a standard Gaussian) and the target posterior distribution, enabling both efficient density estimation and sample generation. Our target posteriors are p ( ζ|tracer )with ζ = { Ω m, σ8, b1} tracer = P ( k ) , PRSD ( k ) , δm, δg, δRSD g and δRSD g + vpec. The complete inference pipeline is shown in Figure 3.4: normalized simulation data is augmented with flips and rotations before being fed into the network. A series of convolutional layers embeds the data onto a lower-dimensional latent space, which serves as conditioning information for the normalizing flow to model the posterior distribution. The network is trained by minimizing the negative log-likelihood, and at inference time, samples are drawn from the predicted distribution. 33
Master’s Thesis ETH Zürich Constança Tropa Real Space Redshift Space °750 °500 °250 0 250 500 750 1000 Figure 3.3: Comparison of the x -component velocity field vx obtained from cloudin-cell (CIC) interpolation in real space (left) and redshift space (right) at resolution 128 3 , showing the same x = 64 slice. In real space, the velocity field exhibits smooth, coherent structures corresponding to gravitational infall patterns. In redshift space, the yellow circles highlight isolated high-velocity voxels surrounded by nearzero regions. There are artifacts created when galaxies with large line-of-sight velocities are significantly displaced from their true positions. These RSD-induced distortions encode information about the growth rate and cosmological parameters, demonstrating why velocity fields provide complementary constraints that break parameter degeneracies in the inference analysis. 3.2.1 Simulation Data Standardization and Augmentation Before feeding data into the neural network, we apply logarithmic transformation to the power spectrum and standardize the density and velocity fields (velocity fields are normalized component-wise). For 3D fields in real space, we augment the data using random flips and rotations, while for fields in redshift space we perform only rotations around the x -axis to preserve the line-of-sight direction. We apply this augmentation with probability p = 0 . 8during training but disable it during validation and testing to ensure reproducible evaluation metrics. 3.2.2 Feature Extraction using Convolutional ResNets The feature extraction architecture is shown in the central orange block of Figure 3.4, consisting of a series of convolutional blocks with progressively increasing channel dimensions (32, 64, 128, 256), followed by pooling operations and a fully connected projection to a 64-dimensional latent space. For power spectra, we use 1D convolutions with adaptive pooling. For density and velocity fields, each convolutional layer uses 3 × 3 × 3kernels with circular padding 34
Master’s Thesis ETH Zürich Constança Tropa 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) Figure 3.4: Cosmological parameter inference pipeline using normalizing flows. The model learns the conditional posterior distribution p (Ω m, σ8, b1|tracer )for six different tracers: the real-space power spectrum P ( k ), redshift-space power spectrum PRSD ( k ), matter density field δm , galaxy density field δg , redshift-space galaxy density field δRSD g , and the combination δRSD g +v RSD . Input data is augmented (flips and rotations, preserving line-of-sight direction for RSD fields), passed through convolutional encoders (orange block) to extract features and compress to a 64dimensional latent representation z, which conditions a neural spline flow [117] (green block) to model the posterior. Training minimizes the negative log-likelihood over simulation-parameter pairs, enabling efficient sampling from the learned posterior at inference time. This framework demonstrates how field-level information and velocity data can improve cosmological constraints beyond traditional summary statistics. (to enforce periodic boundary conditions), followed by group normalization with 8 groups and a SiLU activation functions. After the final convolutional block, we apply global average pooling to produce a spatially-invariant representation, followed by a linear projection to a 64-dimensional latent vector zthat serves as conditioning for the normalizing flow. 3.2.3 Normalizing Flow Architecture The core of our inference model is a neural spline flow implemented using the zuko1 package. We use monotonic rational-quadratic splines, which provide flexible and numerically stable transformations that have demonstrated improved performance for density estimation and inference tasks compared to simpler coupling flows [117]. Our flow consists of 4 coupling layers, each transforming a subset of the parameter dimensions while leaving others unchanged (then alternating which dimensions are transformed). Each coupling layer uses a conditioner network composed of fully 1Documentation on the Zuko package: https://zuko.readthedocs.io/stable/ 35
Master’s Thesis ETH Zürich Constança Tropa connected layers with hidden dimensions [256, 256, 256, 128] that takes the latent representation zas input and outputs the spline parameters (bin positions, heights, and derivatives) that define the transformation. 3.2.4 Training and Evaluation Metrics We split our 2000 simulations into 1800 for training, 100 for validation, and 100 for testing. The model is trained by minimizing the negative log-likelihood of observed parameter-data pairs {(ζ(i),z(i))}N i=1 from the Quijote simulations: L(θ) = −1 N N X i=1 log pθζ(i)|z(i).(3.2.1) We use the AdamW optimizer with learning rates, number of epochs, and batch sizes that vary depending on the tracer. These hyperparameters are detailed in Appendix A. We monitor validation loss during training and save the checkpoint with the lowest validation loss. Evaluation Metrics. To quantify the performance of each tracer and enable systematic comparisons, we compute the following metrics on the test set: For the posterior distribution as a whole, we calculate the mean log probability at the true value ⟨log ptrue⟩ for each tracer. Higher values indicate that the model assigns greater probability density to the true parameters, reflecting both accuracy and precision. For individual parameters, we compute the mean posterior variance ⟨σ2⟩ , which quantifies the average uncertainty, and the root mean squared error (RMSE) between posterior means and true values. 3.3 Results and Discussion For each test simulation, we generate 1,000 posterior samples to construct the full posterior distribution and compute the metrics described above. Table 3.1 shows the mean log probability at the true value ⟨log ptrue⟩ and mean posterior variances ⟨σ2⟩ for each tracer. A clear hierarchy emerges: summary statistics ( P ( k ), PRSD ( k )) yield the lowest log probabilities ( ⟨log ptrue⟩ = 6 . 73 and 7 . 74, respectively), indicating weaker constraints. Biased tracers ( δg , δRSD g ) perform better than their corresponding 36
Master’s Thesis ETH Zürich Constança Tropa power spectra, with ⟨log ptrue⟩ = 8 . 00 and 8 . 39. The unbiased matter field δm provides tighter constraints ( ⟨log ptrue⟩ = 9 . 11) than biased tracers. Velocity fields provide complementary information that breaks parameter degeneracies: δRSD g +v RSD pec achieves the highest log probability ( ⟨log ptrue⟩ = 10 . 22), representing a 1.8-unit improvement over δRSD g alone. The same trend is visible in the training and validation losses shown in Figure 3.5: although higher-dimensional models require more training steps to converge, they reach lower final loss values than low-dimensional models. Table 3.1: Summary statistics for six tracers at resolution 128 3 . The mean log probability at the true parameter values ( ⟨log ptrue⟩ ) and mean posterior variances ( ⟨σ2⟩ ) for each cosmological parameter are reported, averaged over 100 test simulations. Higher log probabilities indicate tighter, more accurate constraints. Lower variances indicate more precise parameter recovery. Tracer ⟨log ptrue⟩ ⟨σ2 Ωm⟩ ⟨σ2 σ8⟩ ⟨σ2 b⟩ P(k) 6.73 9.46 ×10−43.86 ×10−31.41 ×10−2 PRSD(k) 7.74 7.70 ×10−41.34 ×10−35.49 ×10−3 δm9.11 1.97 ×10−32.09 ×10−53.47 ×10−4 δg8.00 9.70 ×10−43.38 ×10−41.44 ×10−3 δRSD g8.39 6.47 ×10−45.86 ×10−42.00 ×10−3 δRSD g+vpec 10.22 6.98 ×10−54.01 ×10−47.33 ×10−4 Examining the posterior variances ⟨σ2⟩ in Table 3.1, we see that the matter field δm achieves the lowest σ8 variance (2 . 09 × 10 −5 ) among all tracers, as it measures density fluctuations directly without bias confusion. The biggest improvement occurs when adding velocity information to δRSD g . The Ω m variance decreases by a factor of 9 . 3(from 6 . 47 × 10 −4 to 6 . 98 × 10 −5 ), while σ8 and bias variances decrease by factors of 1.5 (from 5 . 86 × 10 −4 to 4 . 01 × 10 −4 ) and 2 . 7(from 2 . 00 × 10 −3 to 7 . 33 × 10 −4 ), respectively. This impact is visible when comparing Figures 3.6 and 3.7, which show mean predicted values with uncertainties for galaxy density fields in redshift space with and without velocity data. The variance reduction is most pronounced for Ω m because velocity fields directly depend on the growth rate through f≈ Ω 0.55 m on linear scales. The enhanced constraints on bias arise because bias serves as a scaling factor between density and velocity fields in the continuity equation. Finally, we present the joint posterior distributions for Ω m , σ8 , and b1 for a single test simulation in Figure 3.8. The 1 σ ,2 σ , and 3 σ credible regions are indicated by progressively lighter contours, with black dashed lines and crosses marking the 37
Master’s Thesis ETH Zürich Constança Tropa 0 1000 2000 3000 4000 5000 6000 7000 Training Steps −12 −10 −8 −6 −4 −2 Loss Training (EMA) 0 1000 2000 3000 4000 5000 6000 7000 Training Steps Validation (EMA) P(k) P(k)RSD δg δm δRSD g δRSD g+vRSD pec Figure 3.5: Training (left) and validation (right) losses for all six tracers as a function of training steps, smoothed using a time-weighted exponential moving average (EMA). The power spectrum models P ( k )and PRSD ( k )use longer smoothing half-lives (4 hours) due to slower convergence, while density-based tracers ( δm , δg , δRSD g , δRSD g +v RSD ) use shorter half-lives (1 hour) to preserve fine structure in the learning curves. Summary statistics (power spectra) converge quickly but plateau at higher loss values, indicating limited constraining power. Field-level tracers require more training steps but achieve lower final losses, with δRSD g +v RSD reaching the lowest validation loss. This demonstrates that field-level information, particularly when combined with velocity data, enables significantly better parameter inference despite increased computational cost during training. 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.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 Figure 3.6: Predicted versus true parameter values for the redshift-space galaxy density field δRSD g . Each point represents one test simulation, with error bars indicating the posterior uncertainty. Scatter around the diagonal quantifies systematic bias, while error bar sizes indicate precision. All three parameters show strong correlation between predicted and true values, with σ8 and b1 exhibiting the tightest constraints. The results demonstrate that δRSD g alone provides meaningful parameter inference, though parameter degeneracies remain visible in the scatter patterns. true parameter values. In real space (left), the matter density field δm (orange) provides the tightest constraints on σ8 and b1 while breaking the degeneracy between these parameters that persists for P ( k )(blue) and δg (green). Despite information loss from compression, P ( k )still recovers true parameters within the 1 σ region and 38
Master’s Thesis ETH Zürich Constança Tropa conditioning fields (δRSD,(i) g,v(i) lin)using the loss function from Eq. (2.3.3). 4.2 UNet Architecture We parameterize the flow velocity field u θ (x( t ) , t, c)using a three-dimensional residual U-Net architecture (ResUNet3D) similar to Ronneberger, Fischer, and Brox [121]. u θ (x( t ) , t, c)governs the evolution from the source distribution at t = 0 to the target distribution at t = 1. The U-Net architecture is ideal for transforming 3D velocity fields because it processes information at multiple spatial scales, capturing both large-scale flows and small-scale turbulent features through skip connections that preserve spatial structure. A schematic can be seen in Figure 4.3 below, showing the input data, encoding and decoding blocks and the output uθ(vt, t). 4.2.1 Input, Conditioning and Output The network processes three types of input: (1) the current velocity field state x(t)∈R128×128×128×3during flow time t, given by x(t) = (1 −t)vlin +tvnl +σϵ,ϵ∼ N(0,I),(4.2.1) with σ = 0 . 03, (2) the observed galaxy density δRSD g∈R128×128×128×1 , and (3) the linear velocity prediction v lin ∈R128×128×128×3 , totaling 7 input channels that are concatenated along the channel dimension. The continuous flow time parameter t∈ [0 , 1] is embedded using sinusoidal positional encodings of the form [ sin(2πfit),cos(2πfit) ]for frequencies fi = 2 i, i = 0 ,..., 31, producing a 64-dimensional vector. This encoding, inspired by transformer architectures, allows the network to distinguish different flow stages at multiple temporal scales [122]. The resulting embedding is processed through a two-layer MLP with SiLU activations to produce a 128-dimensional time embedding that is injected into each residual block via adaptive feature modulation. This temporal conditioning is crucial because the optimal transformation strategy differs at different stages: at t≈ 0, the network should make small corrections to the near-linear input, while at t≈ 1, it must produce fully nonlinear structure including vorticity and multi-streaming effects. 45
Master’s Thesis ETH Zürich Constança Tropa ResUNet3D Flow Matching Architecture Input v(t) [3ch] +ρ[1ch] + v_lin [3ch] Flow Time t Sinusoidal PE →2-layer MLP injected into all blocks Down 1 32 ch 128³ 2 ResBlocks GroupNorm Down 2 64 ch 64³ 2 ResBlocks + Downsample Down 3 128 ch 32³ 2 ResBlocks + Downsample Bottleneck 256 ch 16³ 2 ResBlocks Up 3 128 ch 32³ 3 ResBlocks + Upsample Up 2 64 ch 64³ 3 ResBlocks + Upsample Up 1 32 ch 128³ 3 ResBlocks GroupNorm U-Net skip connections (concat) Output u_θ(v(t),t) velocity field [3 channels] Architecture Details: Downsampling (stride-2 conv) Upsampling (interpolate + conv) Skip connections (concatenation) Circular padding (periodic BC) • Group norm (8 groups) • Dropout 0.05 • SiLU activation Figure 4.3: ResUNet3D architecture for the flow matching model. The network takes as input the current velocity field x( t )at flow time t (3 channels), galaxy density δRSD g (1 channel), and linear velocity v lin (3 channels), for a total of 7 input channels. The sinusoidal time embedding of t is processed through a 2-layer MLP and injected into all residual blocks. The encoder downsamples through 3 blocks (32, 64, 128 channels) to a bottleneck (256 channels at 16 3 resolution). The decoder upsamples through 3 blocks back to 128 3 resolution, outputting the predicted flow velocity field u θ (x( t ) , t, c)(3 channels). Skip connections (red dashed lines) link encoder and decoder layers at matching resolutions. All convolutions use circular padding to respect periodic boundary conditions, group normalization with 8 groups, SiLU activation, and dropout of 0.05. The network outputs a predicted flow velocity field u θ (x( t ) , t, c)with the same spatial dimensions as the input (3 channels), representing the instantaneous rate of change dx/dt at time t. 4.2.2 Encoder-Decoder Architecture Our ResUNet3D processes the 7-channel input through an initial 3 × 3 × 3convolution with circular padding (for periodic boundaries), producing 32 channels at full 128 3 resolution. The encoder progressively downsamples through three blocks while increasing channel capacity: 32 → 64 channels (128 3→ 64 3 ), 64 → 128 channels (64 3→ 32 3 ), and 128 → 256 channels (32 3→ 16 3 ). Each block contains 2 residual layers with group normalization, SiLU activation, and 0.05 dropout for regularization. 46
Master’s Thesis ETH Zürich Constança Tropa A bottleneck block processes features at 163resolution with 256 channels. The decoder mirrors this structure, upsampling through three blocks: 256 → 128 channels (16 3→ 32 3 ), 128 → 64 channels (32 3→ 64 3 ), and 64 → 32 channels (64 3→ 128 3 ). Each decoder block uses transposed convolutions for upsampling, concatenates skip connection features from the corresponding encoder layer, and processes through 3 residual layers. A final 3 × 3 × 3convolution maps to the 3-channel output velocity field uθ(x(t), t, c). Each encoder and decoder block employs residual connections of the form h l+1 = h l + F (h l ), which facilitate gradient flow and allow the network to learn identity-like transformations when linear theory already provides a good approximation [123]. 4.2.3 Training and Inference We split our simulation into the same 1800/100/100 groups for training, validating and testing as before. We use an AdamW optimizer with a base learning rate of 10 −4 for 1500 epochs and a batch size of 2. During training we monitor not only the train and validation losses, but also rint k ( val_auc_rk ) and rkmax ( val_last_rk ), which measure the cross-correlation between predicted and true velocity fields in Fourier space (integrated over all wavenumbers and at the highest resolved wavenumber, respectively). We consider the model converged once both rint k and rkmax plateau, as these metrics directly measure reconstruction quality and continue improving even after the loss saturates. For inference, we generate samples using an Euler solver and find convergence at 500 ODE integration steps and noise level σ= 0.03. 4.3 Comparison of Ground Truth, Linear Theory and Model Prediction Fields We now present the performance of our trained flow matching model on test simulations. Figure 4.4 compares two-dimensional slices of the linear, predicted and true velocity fields of vx,vyand vz, as well as the mean and variance over 20 samples. The model prediction (middle panel) successfully preserves the large-scale structure from the linear theory input and reproduces the complex small-scale features visible 47
Master’s Thesis ETH Zürich Constança Tropa vx Linear theory Posterior Sample Ground Truth Posterior Mean Posterior Variance vy vz −1500 −1000 −500 0 500 1000 1500 Velocity 0 20000 Variance Figure 4.4: Velocity field slices at fixed x = 64 for a test simulation using 500 ODE integration steps with noise level σ = 0 . 03. From left to right: (i) linear theory prediction; (ii) flow matching model prediction exhibiting both large-scale coherence and fine-scale nonlinear structure; (iii) ground truth nonlinear velocity field from CIC interpolation; (iv) mean reconstructed field showing smoothed small-scale variations; and (v) variance across samples highlighting regions of higher model uncertainty. in the ground truth field. We can that the model shows higher variance in vx (last panel) than in vyand vz, as these are the velocities affected by RSD. The probabilistic nature of our method is particularly valuable: rather than producing a single deterministic prediction, the model generates multiple velocity field samples that reflect the posterior uncertainty. This ensemble-based approach allows us to propagate uncertainties into downstream analyses and prevents overconfident estimates in regions where the density–velocity relation is intrinsically degenerate. 4.3.1 Scatter Plots of True and Predicted Velocities To assess performance more quantitatively, we examine pixel-level correlations between predicted and true velocity fields. Figure 4.5 shows scatter plots comparing predicted velocities (averaged over 20 stochastic samples) and their uncertainties to 48
Master’s Thesis ETH Zürich Constança Tropa ground truth values for all three velocity components. −1000 0 1000 True velocity [km/s] −1000 −500 0 500 1000 Predicted velocity [km/s] R2= 0.832 r= 0.922 RMSE = 119.37 Avg σ= 74.02 vx −1000 0 1000 True velocity [km/s] R2= 0.891 r= 0.945 RMSE = 88.01 Avg σ= 59.15 vy −1000 0 1000 True velocity [km/s] R2= 0.883 r= 0.942 RMSE = 91.71 Avg σ= 61.54 vz Figure 4.5: Predicted vs. ground truth velocity components for 20,000 voxels using 500 ODE steps and noise level σ = 0 . 03. Each point represents a voxel with predictions averaged over 20 samples to estimate the posterior mean. Error bars show the standard deviation across samples, quantifying prediction uncertainty. The three panels show the x , y , and z components separately, with metrics reported in the legend: R2 coefficient of determination, Pearson correlation coefficient r , root mean squared error (RMSE), and average uncertainty σ . All components achieve r > 0.92 and R2>0.83, indicating strong predictive performance. All three components achieve strong correlation with the ground truth, with Pearson correlation coefficients r > 0 . 92 and R2> 0 . 83. The anisotropy in performance (with vx showing a larger RMSE than vy, vz and a higher average variance σx = 74 . 02 km/s compared to σy = 59 . 15 km/s and σz = 61 . 54 km/s ) reflects the redshiftspace distortions applied along the x -axis during data generation, which compress structures and create discontinuities preferentially along the line of sight. The error bars represent posterior uncertainty across 20 samples, with average uncertainties ( ∼ 60–75 km/s) smaller than RMSE values, indicating the model appropriately captures both systematic accuracy and stochastic uncertainty in the reconstruction. 4.3.2 Power Spectrum Reconstruction Figure 4.6 shows the mean of the power spectrum over all samples for the all three velocity components in red, as well as the power spectrum of the mean field in yellow. For the y and z -components, we see a nearly identical power spectra to that of the ground truth. The predicted power spectrum tracks the ground truth (black line) closely from large scales ( k∼ 0 . 01 hMpc−1 ) all the way to the Nyquist frequency 49
Master’s Thesis ETH Zürich Constança Tropa ( k∼ 0 . 4 hMpc−1 ). However, vx shows a near-constant offset, the reason for which not yet understood and that needs to be further investigated. For the predictions of the mean field of vy and vz , we see the power spectrum deviating from the truth at low scales, which is not the case for the mean of the predictions. This is because the mean field blurs out structures on small scales when capturing the uncertainty. 10−210−1 k[Mpc−1] 107 108 109 1010 1011 P(k) vx Ground Truth Mean of Prediction Prediction of Mean 10−210−1 k[Mpc−1] vy 10−210−1 k[Mpc−1] vz Figure 4.6: Power spectrum for all three velocity components using 500 ODE steps and noise level σ = 0 . 03. The mean power spectrum averaged over 20 samples (red line) with 1 σ uncertainty band (shaded region) is compared to the ground truth (black line). The power spectrum of the mean field is shown in yellow. All three velocity components show nearly identical power spectra that closely track the ground truth from large scales ( k∼ 0 . 01 hMpc−1 ) up to the Nyquist frequency ( kNyq ≈ 0 . 4 hMpc−1 ). The vx component shows slight deviation from the ground truth at k > 0 . 3 hMpc−1 , while the y and z -components perform slightly better on the smallest scales. The mean field (yellow) deviates earlier due to blurring of small-scale structures when capturing uncertainty. 4.3.3 Cross-correlation Coefficients and Implications for kSZ An important metric for quantifying the predicted velocity field is the cross-correlation coefficient r ( k ), shown in Figure 4.7. It shows the r ( k )for linear theory prediction of vx , vy , and vz , and the non-linear reconstruction for the three velocity components and the velocity magnitude | v | . We also compute the mean correlation coefficient to better compare the gain relative to linear theory: r=⟨vtruevpred⟩ σv trueσv pred .(4.3.1) Our model achieves near-perfect correlations ( r ( k ) > 0 . 95) at large scales ( k < 0 . 1 hMpc−1 ), confirming that it faithfully preserves linear-theory information. At 50
Master’s Thesis ETH Zürich Constança Tropa 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 Figure 4.7: Cross-correlation coefficients r ( k )between predicted and ground truth velocity fields, obtained with 500 ODE steps and noise level σ = 0 . 03. Individual velocity components show r ( k ) > 0 . 95 at large scales ( k < 0 . 1 hMpc−1 ), with the transverse components vy and vz (blue, purple) maintaining higher correlation than the line-of-sight component vx (blue) at intermediate and small scales due to RSDinduced anisotropies. The velocity magnitude | v | (orange) achieves the highest overall correlation. Linear theory predictions (dashed) are shown for comparison, as well as the mean correlation-coefficient. intermediate scales (0 . 1 < k < 0 . 2 hMpc−1 ), correlation remains high with r ( k ) > 0 . 8 for all components, indicating successful learning of mildly nonlinear corrections. The model significantly outperforms linear theory (dashed line), which drops below r ( k ) < 0 . 5for k > 0 . 15 hMpc−1 , while our predictions maintain high correlation to much smaller scales. The transverse components vy and vz show notably better performance than the line-of-sight component vx at k > 0 . 1 hMpc−1 , reflecting RSD-induced anisotropies in the training data. The velocity magnitude performs best overall, as directional errors in individual components partially cancel when computing |v|, maintaining r(k)∼0.8even at k∼0.3hMpc−1. Quantitatively, we find mean cross-correlation coefficients of rpred x = 0 . 814 ± 0 . 128, rpred y = 0 . 856 ± 0 . 101, rpred z = 0 . 850 ± 0 . 102, and rpred |v| = 0 . 908 ± 0 . 067 for the nonlinear predictions, compared to rlin x = 0 . 239 ± 0 . 344, rlin y = 0 . 409 ± 0 . 298, and rlin z = 0 . 409 ± 0 . 297 for linear theory. This represents a 1 . 7 × improvement for 51
Master’s Thesis ETH Zürich Constança Tropa transverse components and a 3.4×improvement for the line-of-sight component. Implications for kinetic Sunyaev-Zel’dovich observations These improvements directly benefit kSZ effect studies, where CMB temperature anisotropies are proportional to the line-of-sight momentum of free electrons: ∆ T/T ∝Rnevrdl (Eqs. 1.6.1-1.6.2). Traditional galaxy redshift surveys measure only positions, encoding velocities implicitly through redshift-space distortions. Future surveys combining spectroscopy with CMB observations can access velocity information directly through the kSZ effect by cross-correlating CMB temperature maps with galaxy surveys that trace the density field. The kSZ signal scales as r×Pδv ( k )(Eq. 1.6.3), so velocity prediction errors directly bias the inferred gas properties [124]. Existing methods use linear theory velocities, which become increasingly inaccurate in nonlinear regimes [125]. Our 3 . 4 × improvement in line-of-sight velocity correlation translates to a similar increase in signal-to-noise ratio, reducing the residuals between predicted and true kSZ signals. This is particularly valuable for low redshift measurements where nonlinear effects are strongest. It would enable more accurate measurements of the missing baryon fraction in circumgalactic media and tighter constraints on feedback processes that regulate gas distributions [126, 127]. 52
Master’s Thesis ETH Zürich Constança Tropa 4.4 Model Ablations: Impact of Network Depth To understand the contribution of different architectural choices, we performed ablation studies varying network depth while keeping other hyperparameters fixed. Figure 4.8 compares U-Net models with different numbers of downsampling blocks in the encoder, corresponding to models that downsample to minimum resolutions of 83,163, and 323for the 4-block, 3-block, and 2-block architectures respectively. Figure 4.8: Ablation study comparing U-Net architectures with different encoder depths (500 ODE steps, noise σ = 0 . 03). Models with more downsampling blocks reach higher minimum resolutions i.e. bigger receptive fields, but at higher computational costs. All architectures accurately reproduce the power spectrum (left), but deeper networks show modest improvements in cross-correlation at nonlinear scales k > 0 . 1 hMpc−1 (right). The diminishing returns beyond 3 blocks suggest that linear theory conditioning already captures the necessary large-scale context. All three architectures accurately reproduce the power spectrum across all scales (left panel), with no degradation when reducing depth. The cross-correlation results (right panel) show similar performance at large scales ( k < 0 . 05 hMpc−1 ) for all models. At smaller scales, the 2-block and 3-block models perform nearly identically, with only modest gains from increasing to 4 blocks. This follows from our conditioning strategy: initializing with linear theory predictions capturing large-scale information means deeper layers add limited benefit. Deeper networks with more downsampling achieve larger receptive fields, enabling integration across spatial scales. 53
Master’s Thesis ETH Zürich Constança Tropa 4.5 Joint Inference of Velocities and Cosmological Parameters The normalizing flow and flow matching models can be combined into a two-stage hierarchical inference pipeline that provides complete probabilistic predictions for both cosmological parameters and velocity fields. This joint approach is necessary because the linear velocity field v lin computed from Eq. (1.4.2) depends on cosmological parameters through the growth rate f (Ω m )and Hubble parameter H ( z ). By marginalizing over parameter uncertainties, we obtain velocity field predictions that properly account for our incomplete knowledge of the true cosmology. The joint posterior over velocity fields and cosmological parameters factors as: p(vnl,ζ|δRSD g,vlin(ζ)) = p(vnl|δRSD g,vlin(ζ),ζ)·p(ζ|δRSD g),(4.5.1) where the first term is the conditional posterior and the product represents the marginalised posterior obtained by integrating over parameter uncertainties. This factorization enables a two-stage sampling procedure illustrated in Figure 4.9. Given an observed redshift-space galaxy density field δRSD g (x), the two-stage procedure operates as follows: Stage 1—Parameter inference Given an observed redshift-space galaxy density field δRSD g , we use the trained normalizing flow described in Chapter 3 to sample from the posterior distribution ζ(i)∼p(Ωm, σ8, b |δRSD g)(4.5.2) This produces an ensemble of parameter sets {ζi}Ns i=1 that are consistent with the observed galaxy distribution, where each ζi = (Ω m,i, σ8,i, b1,i )represents one draw from the posterior. Stage 2—Field reconstruction For each sampled cosmology ζ(i) , compute the corresponding linear theory velocity prediction. Condition the flow matching model on this cosmology-specific linear prediction to generate nonlinear velocity field 54
Master’s Thesis ETH Zürich Constança Tropa loss from conditioning on galaxies rather than the underlying dark matter distribution, as the former are very sparse tracers. Additionally, fingers-ofgod and multi-streaming introduce small-scale effects with some inherent stochasticity. Our 3 . 4 × improvement in line-of-sight velocity correlation increases the signal-tonoise ratio in kSZ-derived electron pressure profiles by approximately the same factor, enabling more accurate measurements of missing baryons and feedback processes at z < 0.5. Joint inference: combining parameter estimation and velocity reconstruction. By integrating the normalizing flow and flow matching frameworks, we developed a hierarchical two-stage inference pipeline that jointly constrains cosmological parameters and reconstructs velocity fields. The pipeline first samples cosmological parameters from the posterior p (Ω m, σ8, b|δRSD g )using the normalizing flow. For each sampled cosmology, we then compute the corresponding linear velocity field and use the flow matching model to generate nonlinear velocity predictions conditioned on that specific cosmology. This marginalization approach accounts for both parameter-level and field-level uncertainties while avoiding systematic biases from incorrect fiducial parameters. Our comparison of conditional versus marginalised posteriors quantifies the impact of parameter uncertainties on velocity reconstruction quality. While the marginalised approach yields slightly lower mean correlation coefficients r and higher variance compared to using true parameter values, it clearly outperforms reconstructions based on uniformly sampled parameters or linear theory predictions. This demonstrates that the normalizing flow successfully constrains cosmological parameters to values consistent with the observed galaxy distribution, even when those parameters carry some uncertainty. We now compare our approach to previous work, discuss broader implications, limitations, and future directions for observational data. Comparison to previous work reconstructing peculiar velocities using deep learning Similarly to our approach, several recent works combine neural networks with physical models for RSD and velocity field reconstruction. Maragliano et al. [128] uses a hybrid LT+NN method that applies linear perturbation theory to 61
Master’s Thesis ETH Zürich Constança Tropa correct large-scale distortions before training a neural network on residual features. They achieve a ∼ 50% improvement in MSE over linear theory alone on Quijote simulations at z = 1. However, they did not reconstruct the velocities, but rather the density field in real space directly. Other recent works have focused on explicitly reconstructing the peculiar velocity field using neural network architectures. U-Net models Wu et al. [129] and Wang and Yang [130] have achieved strong performance in nonlinear regions under realistic observational conditions. Lilow, Veena, and Nusser [111] similarly used a U-Net autoencoder trained on Quijote simulations, incorporating observational effects to mimic 2MASS characteristics and consistently outperforming Wiener filters. Chen et al. [131] took a different approach using ANNs with spherical shell models to estimate line-of-sight velocities, achieving better than 1%accuracy in correlation function recovery at scales >8 h −1 Mpc, and demonstrating that it can generalize across different galaxy formation models. Our work makes two key advances. First, while prior methods fix a fiducial cosmology during training, we jointly infer cosmological parameters and galaxy bias alongside the velocity field. This is especially important given the ongoing cosmological tensions of H0 and S8 , which directly affect the linear theory predictions. Second, whereas existing methods employ deterministic neural networks that produce point estimates, our flow matching framework adopts a probabilistic generative modeling approach that naturally captures the stochasticity inherent in the density-velocity relationship. This combination enables simultaneous three-dimensional velocity reconstruction and cosmological inference, allowing the velocity field and cosmological parameters to mutually inform each other rather than treating cosmology as fixed input. 5.0.1 Additional Cosmological Applications Beyond parameter inference and kSZ measurements, accurate velocity field reconstruction enables several other cosmological applications. Redshift-space distortions and coordinate transformation. Our model enables forward modeling of redshift-space distortion (RSD) effects, allowing conversion of observed galaxy positions from redshift space to real space with quantified uncertainties through the probabilistic sampling framework. Crucially, accurate peculiar 62
Master’s Thesis ETH Zürich Constança Tropa velocity reconstruction breaks the degeneracy between peculiar velocities and the assumed cosmology. By correctly modeling RSD effects, the remaining anisotropy in galaxy clustering reflects only geometric distortions from the background cosmology. This enables RSD and Alcock-Paczynski (AP) effects to be disentangled when marginalizing over cosmological parameters. Velocity fields account for dynamical distortions, while cosmological parameters absorb geometric ones. BAO reconstruction and initial conditions. Baryon acoustic oscillation (BAO) reconstruction algorithms aim to reverse nonlinear structure growth to sharpen the BAO feature for improved distance measurements. Current methods use linear theory to estimate particle displacements, then iteratively refine them. Our flow matching approach provides these displacement estimates directly, improving reconstruction accuracy and convergence speed. The method could also be extended to reconstruct initial conditions, as demonstrated by Bayer, Modi, and Ferraro [132], who showed that incorporating halo velocity field information improves initial condition reconstruction accuracy. Such reconstruction enables new tests of inflationary models and primordial non-Gaussianity. Tests of modified gravity and cosmological tensions. Modified gravity theories predict specific deviations from general relativity in f (Ω m ), the relationship between matter distribution and growth rate. Joint analysis of density and velocity fields provides powerful tests. The density field probes matter distribution directly, while velocity fields probe gravitational dynamics. Discrepancies between growth rates inferred from density versus velocity would signal beyond-ΛCDM physics, and our joint inference framework naturally enables such consistency tests. Furthermore, proposed resolutions to the Hubble tension have different predictions. Early dark energy, modified recombination, and distance ladder systematics each predict different relationships between H0 ,Ω m , and structure growth. By jointly constraining these parameters from large-scale structure and velocity fields, our method provides measurements that are complementary to CMB and distance ladder observations. This helps discriminate between competing cosmological models. 63
Master’s Thesis ETH Zürich Constança Tropa 5.0.2 Limitations and Extensions Our simulations use dark matter halos as galaxy tracers rather than implementing realistic galaxy formation models, neglecting baryonic physics such as star formation, supernova and AGN feedback, and environmental quenching. These processes govern how galaxies populate halos and can modify the density-velocity relationship, particularly in high-density environments where feedback processes alter the matter distribution on small scales. Future work should incorporate hydrodynamical simulations like IllustrisTNG [133] or EAGLE [134] to learn these effects and better capture the physical processes governing galaxy formation and evolution. However, before integrating these hydrodynamical simulations, an important intermediate step is to test the robustness of our models across different halo-galaxy connections. This requires performing inference on simulations not used during training to verify that our framework can generalize beyond the specific halo occupation models employed here. We focused on a single redshift ( z = 0), limiting our ability to test cosmological evolution. Extending to multiple redshifts would enable tests of growth rate evolution, providing independent constraints on modified gravity theories. The Quijote suite provides snapshots at z = 0 . 5 , 1 , 2 , 3that enable straightforward extension to redshiftdependent analyses. We used fixed simulation resolution (128 3 ), which limits our ability to resolve smallscale structure. Higher resolutions could improve small-scale velocity reconstruction, but require larger networks and more training data. Additionally, extending to smaller scales might actually make our models less robust, as they become more sensitive to small-scale baryonic physics that varies significantly across different galaxy formation models. Alternative representations: point clouds versus density fields While our work employs grid-based density fields processed through convolutional neural networks, the discrete nature of galaxy surveys naturally suggests an alternative approach: treating galaxies as point clouds. This representation preserves the fundamental discrete character of the data and avoids artificial binning into density fields, which can introduce discretization artifacts and information loss, particularly in sparse regions. 64
Master’s Thesis ETH Zürich Constança Tropa Point cloud representations can be processed using Graph Neural Networks (GNNs) via message passing, where galaxies serve as nodes and their relationships are encoded through learnable edge features [135]. However, GNNs face a fundamental challenge: gravity’s long-range nature ideally requires fully connected graphs to capture all gravitational interactions, but these contain O ( N2 )edges that become computationally prohibitive for realistic surveys containing millions of galaxies. Practical implementations must truncate interactions using fixed-radius connectivity or k-nearest neighbors, potentially missing crucial large-scale tidal fields and correlations. Several recent studies have successfully applied point cloud methods to cosmological inference: [136–140] used GNNs and transformers for parameter inference. Most relevant to velocity reconstruction, Tanimura et al. [141] achieved 10%better precision than perturbation theory or CNNs when reconstructing cluster velocities with GNNs, though their improvements plateaued at galaxy number densities comparable to DESI. 5.0.3 Path toward Application to DESI Looking ahead, we plan to apply this method to real redshift survey data from the Dark Energy Spectroscopic Instrument (DESI). To bridge the gap between our current idealized simulations and observational data, several extensions are necessary. First, we will populate dark matter halos with galaxies using a Halo Occupation Distribution (HOD) model to create more realistic mock catalogs that capture the relationship between central and satellite galaxies and dark matter halos [142]. Second, we must account for the survey-specific observational effects described above to create mock catalogs that faithfully represent DESI systematics. These improvements will enable better validation of our method against observational systematics before application to DESI data. While our simulations include some shot noise from finite sampling via a minimum halo mass threshold, real surveys exhibit additional complexities: luminositydependent selection functions, incomplete sky coverage from survey masks (bright stars, Galactic dust), fiber collisions preventing simultaneous observations of close pairs, and redshift measurement errors. Incorporating these observational systematics would broaden posteriors and introduce additional degeneracies that more accurately reflect real-world constraints. 65
Master’s Thesis ETH Zürich Constança Tropa This work advances simulation-based inference in cosmology. As DESI, Euclid and LSST observe and catalog millions to billions, traditional likelihood-based methods become computationally intractable, requiring machine learning approaches that extract information from high-dimensional data while quantifying uncertainties. Our flow-based frameworks demonstrate that deep learning can tackle both parameter inference and field-level reconstruction while accounting for cosmological uncertainty. These methods enable analysis pipelines that jointly model density and velocity fields, break degeneracies between dynamical and geometric effects, as well as consistency tests across multiple cosmological probes. As systematic errors dominate statistical uncertainties, such methods become essential for extracting constraints from nextgeneration surveys. 66
Appendix A Normalizing Flow Model: Training Hyperparameters Table A.1 lists the hyperparameters used to train normalizing flow models for each tracer at 128 3 resolution. We vary the learning rate, the number of epochs the model runs for and the batch size. We also present the approximate number of epochs it takes the model to reach convergence. Table A.1: Training hyperparameters for each tracer at 1283resolution. Tracer Learning Total Convergence Batch Runtime Rate Epochs (epochs) Size P(k) 10−4450 240 16 35 min PRSD(k) 10−3450 240 16 35 min δm10−4400 260 6 20 h δg10−4400 300 6 20 h δRSD g10−4360 300 6 20 h δRSD g+vRSD 10−4700 320 4 40 h 67
Appendix B Parameter Inference with Normalizing Flows: Predicted vs True Parameters Figures in this appendix show predicted versus true cosmological parameters and linear bias for the remaining tracers from Section 3.3: power spectra in real and redshift space P ( k )and PRSD ( k ), and galaxy and dark matter density fields in real space δg and δm . Each point represents one test simulation, with mean and uncertainty values for the learned posterior. B.1 Power Spectra in Real and Redshift space 0.1 0.2 0.3 0.4 0.5 True Ωm 0.1 0.2 0.3 0.4 0.5 Predicted Ωm RMSE = 0.0262 P(k): Ωm 0.6 0.7 0.8 0.9 1.0 True σ8 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Predicted σ8 RMSE = 0.0600 P(k): σ8 1.0 1.5 2.0 2.5 True bg 1.0 1.5 2.0 2.5 3.0 Predicted bg RMSE = 0.1025 P(k): bg Figure B.1: Predicted vs true parameters for the power spectrum in real space P(k). 68
Master’s Thesis ETH Zürich Constança Tropa 0.1 0.2 0.3 0.4 0.5 True Ωm 0.1 0.2 0.3 0.4 0.5 Predicted Ωm RMSE = 0.0262 PRSD(k): Ω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.0235 PRSD(k): σ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 3.00 Predicted bg RMSE = 0.0455 PRSD(k): bg Figure B.2: Predicted vs true parameters for the power spectrum in redshift space PRSD(k). B.2 Matter and Galaxy Density Fields in Real Space 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.0465 Matter: Ωm 0.6 0.7 0.8 0.9 1.0 True σ8 0.6 0.7 0.8 0.9 1.0 1.1 Predicted σ8 RMSE = 0.0029 Matter: σ8 1.0 1.5 2.0 2.5 True bg 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 Predicted bg RMSE = 0.0187 Matter: bg Figure B.3: Predicted vs true parameters for the dark matter density field in real space δm. 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.0324 Galaxies: Ωm 0.6 0.7 0.8 0.9 1.0 True σ8 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 Predicted σ8 RMSE = 0.0185 Galaxies: σ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.0418 Galaxies: bg Figure B.4: Predicted vs true parameters for the galaxy density field in real space δg. 69
Appendix C Parameter Inference with Normalizing Flows: Joint Posterior Contours In this appendix we present the joint posterior distribution results for four more test simulations, similar to Figure 3.8 in Section 3.3. Figures below show 68% and 95%credible regions in the (Ω m, σ8 )plane for different tracer combinations. True values are marked with crosses. These illustrate the constraining power and parameter degeneracies for each combination. We show that different simulations show variations in the constraining power of the different tracers. On the left we show real-space tracers P ( k ) , δg and δm . In the middle we show redshift-space tracers PRSD ( k )and δRSD g . On the right, we show the effect of RSD and adding peculiar velocities, comparing δgto δRSD gto δRSD g+vRSD pec . Figure C.1: Posterior contours for test simulation 2. 70
Master’s Thesis ETH Zürich Constança Tropa 449.3 (May 2015). arXiv:1408.4648 [astro-ph], pp. 3312–3322. issn: 1365-2966, 0035-8711. doi:10.1093/mnras/stv525. arXiv: arXiv:1408.4648. [48] Xiao-Dong Li et al. “Cosmological constraints from the redshift dependence of the Alcock-Paczynski test and volume effect: galaxy two-point correlation function”. In: Monthly Notices of the Royal Astronomical Society 450.1 (June 2015). arXiv:1504.00740 [astro-ph], pp. 807–814. issn: 0035-8711, 1365-2966. doi: 10. 1093/mnras/stv622. arXiv: arXiv:1504.00740. [49] Xiao-Dong Li et al. “The Redshift Dependence of the Alcock–Paczynski Effect: Cosmological Constraints from the Current and Next Generation Observations”. en. In: The Astrophysical Journal 875.2 (Apr. 2019). Publisher: The American Astronomical Society, p. 92. issn: 0004-637X. doi:10.3847/1538-4357/ab0f30. [50] Christian Marinoni and Adeline Buzzi. “A geometric measure of dark energy with pairs of galaxies”. en. In: Nature 468.7323 (Nov. 2010). Publisher: Nature Publishing Group, pp. 539–541. issn: 1476-4687. doi:10.1038/nature09577. [51] Alicia Bueno Belloso et al. “Using galaxy pairs as cosmological tracers”. en. In: Physical Review D 86.2 (July 2012), p. 023530. issn: 1550-7998. doi: 10.1103/ PhysRevD.86.023530. [52] Barbara S. Ryden. “Measuring q0 from the Distortion of Voids in Redshift Space”. en. In: The Astrophysical Journal 452 (Oct. 1995), p. 25. issn: 0004-637X. doi: 10.1086/176277. [53] Slađana Radinović et al. “Alcock-Paczyński effect on void-finding: Implications for void-galaxy cross-correlation modelling”. In: Astronomy & Astrophysics 691 (Nov. 2024). arXiv:2407.02699 [astro-ph], A39. issn: 0004-6361, 1432-0746. doi: 10.1051/0004-6361/202451358. arXiv: arXiv:2407.02699. [54] Planck Collaboration et al. “Planck 2018 results. VI. Cosmological parameters”. In: Astronomy & Astrophysics 641 (Sept. 2020). arXiv:1807.06209 [astro-ph], A6. issn: 0004-6361, 1432-0746. doi: 10.1051/0004-6361/201833910 . arXiv: arXiv: 1807.06209. [55] Adam G. Riess et al. “A Comprehensive Measurement of the Local Value of the Hubble Constant with 1 km/s/Mpc Uncertainty from the Hubble Space Telescope and the SH0ES Team”. In: The Astrophysical Journal Letters 934.1 (July 2022). arXiv:2112.04510 [astro-ph], p. L7. issn: 2041-8205, 2041-8213. doi: 10.3847/20418213/ac5c5b. arXiv: arXiv:2112.04510. 77
Master’s Thesis ETH Zürich Constança Tropa [56] T. M. C. Abbott et al. “Joint analysis of DES Year 3 data and CMB lensing from SPT and Planck III: Combined cosmological constraints”. In: Physical Review D 107.2 (Jan. 2023). arXiv:2206.10824 [astro-ph], p. 023531. issn: 2470-0010, 24700029. doi:10.1103/PhysRevD.107.023531. arXiv: arXiv:2206.10824. [57] Eleonora Di Valentino et al. “In the Realm of the Hubble tension - a Review of Solutions”. In: Classical and Quantum Gravity 38.15 (July 2021). arXiv:2103.01183 [astro-ph], p. 153001. issn: 0264-9381, 1361-6382. doi: 10.1088/1361-6382/ac086d . arXiv: arXiv:2103.01183. [58] Elcio Abdalla et al. “Cosmology Intertwined: A Review of the Particle Physics, Astrophysics, and Cosmology Associated with the Cosmological Tensions and Anomalies”. In: Journal of High Energy Astrophysics 34 (June 2022). arXiv:2203.06142 [astroph], pp. 49–211. issn: 22144048. doi: 10.1016/j.jheap.2022.04.002 . arXiv: arXiv:2203.06142. [59] R. W. Pike and Michael J. Hudson. “Cosmological Parameters from the Comparison of the 2MASS Gravity Field with Peculiar Velocity Surveys”. In: The Astrophysical Journal 635.1 (Dec. 2005). arXiv:astro-ph/0511012, pp. 11–21. issn: 0004-637X, 1538-4357. doi:10.1086/497359. [60] Adi Nusser and Marc Davis. “On the Prediction of Velocity Fields from Redshift Space Galaxy Samples”. In: The Astrophysical Journal 421 (Jan. 1994). arXiv:astroph/9309009, p. L1. issn: 0004-637X, 1538-4357. doi:10.1086/187172. [61] Tamara M. Davis et al. “The Effect of Peculiar Velocities on Supernova Cosmology”. en. In: The Astrophysical Journal 741.1 (Nov. 2011), p. 67. issn: 0004-637X. doi: 10.1088/0004-637X/741/1/67. [62] Jonathan Carrick et al. “Cosmological parameters from the comparison of peculiar velocities with predictions from the 2M++ density field”. In: Monthly Notices of the Royal Astronomical Society 450.1 (June 2015), pp. 317–332. issn: 0035-8711. doi:10.1093/mnras/stv547. [63] Caitlin Adams and Chris Blake. “Improving constraints on the growth rate of structure by modelling the density-velocity cross-correlation in the 6dF Galaxy Survey”. en. In: Monthly Notices of the Royal Astronomical Society 471.1 (Oct. 2017), pp. 839–856. issn: 0035-8711. doi:10.1093/mnras/stx1529. [64] Stuart Lyall, Chris Blake, and Ryan J. Turner. “Constraining modified gravity scenarios with the 6dFGS and SDSS galaxy peculiar velocity datasets”. In: Monthly Notices of the Royal Astronomical Society 532.4 (July 2024). arXiv:2407.18684 [astro78
Master’s Thesis ETH Zürich Constança Tropa ph], pp. 3972–3984. issn: 0035-8711, 1365-2966. doi: 10.1093/mnras/stae1718 . arXiv: arXiv:2407.18684. [65] Adi Nusser. “Velocity-density correlations from the cosmicflows-3 distance catalogue and the 2MASS Redshift Survey”. en. In: Monthly Notices of the Royal Astronomical Society 470.1 (Sept. 2017), pp. 445–454. issn: 0035-8711. doi: 10.1093/mnras/ stx1225. [66] Dragan Huterer et al. “Testing CDM at the lowest redshifts with SN Ia and galaxy velocities”. In: Journal of Cosmology and Astroparticle Physics 2017.05 (May 2017). arXiv:1611.09862 [astro-ph], pp. 015–015. issn: 1475-7516. doi: 10.1088/14757516/2017/05/015. arXiv: arXiv:1611.09862. [67] Caitlin Adams and Chris Blake. “Joint growth-rate measurements from redshiftspace distortions and peculiar velocities in the 6dF Galaxy Survey”. en. In: Monthly Notices of the Royal Astronomical Society 494.3 (May 2020), pp. 3275–3293. issn: 0035-8711. doi:10.1093/mnras/staa845. [68] Supranta S. Boruah, Michael J. Hudson, and Guilhem Lavaux. “Cosmic flows in the nearby Universe: new peculiar velocities from SNe and cosmological constraints”. In: Monthly Notices of the Royal Astronomical Society 498.2 (Sept. 2020). arXiv:1912.09383 [astro-ph], pp. 2703–2718. issn: 0035-8711, 1365-2966. doi:10.1093/mnras/staa2485. arXiv: arXiv:1912.09383. [69] Amber M. Hollinger and Michael J. Hudson. Cosmological parameters estimated from velocity – density comparisons: Calibrating 2M++. arXiv:2312.03904 [astro-ph]. Mar. 2024. doi:10.48550/arXiv.2312.03904. arXiv: arXiv:2312.03904. [70] Khaled Said et al. “Joint analysis of 6dFGS and SDSS peculiar velocities for the growth rate of cosmic structure and tests of gravity”. In: Monthly Notices of the Royal Astronomical Society 497.1 (Sept. 2020), pp. 1275–1293. issn: 0035-8711. doi: 10.1093/mnras/staa2032. [71] C. Duangchan et al. Prior-free cosmological parameter estimation of Cosmicflows-4. arXiv:2507.22236 [astro-ph]. Aug. 2025. doi: 10.48550/arXiv.2507.22236 . arXiv: arXiv:2507.22236. [72] Yong-Seon Song and Kazuya Koyama. “Consistency test of general relativity from large scale structure of the Universe”. In: Journal of Cosmology and Astroparticle Physics 2009.01 (Jan. 2009). arXiv:0802.3897 [astro-ph], pp. 048–048. issn: 14757516. doi:10.1088/1475-7516/2009/01/048. arXiv: arXiv:0802.3897. 79
Master’s Thesis ETH Zürich Constança Tropa [73] Seshadri Nadathur et al. “The completed SDSS-IV extended baryon oscillation spectroscopic survey: geometry and growth from the anisotropic void–galaxy correlation function in the luminous red galaxy sample”. In: Monthly Notices of the Royal Astronomical Society 499.3 (Nov. 2020), pp. 4140–4157. issn: 0035-8711. doi: 10.1093/mnras/staa3074. [74] Amélie Tamone et al. “The completed SDSS-IV extended baryon oscillation spectroscopic survey: growth rate of structure measurement from anisotropic clustering analysis in configuration space between redshift 0.6 and 1.1 for the emission-line galaxy sample”. In: Monthly Notices of the Royal Astronomical Society 499.4 (Nov. 2020), pp. 5527–5546. issn: 0035-8711. doi:10.1093/mnras/staa3050. [75] Jiamin Hou et al. “The completed SDSS-IV extended Baryon Oscillation Spectroscopic Survey: BAO and RSD measurements from anisotropic clustering analysis of the quasar sample in configuration space between redshift 0.8 and 2.2”. In: Monthly Notices of the Royal Astronomical Society 500.1 (Jan. 2021), pp. 1201–1221. issn: 0035-8711. doi:10.1093/mnras/staa3234. [76] Julian E Bautista et al. “The completed SDSS-IV extended Baryon Oscillation Spectroscopic Survey: measurement of the BAO and growth rate of structure of the luminous red galaxy sample from the anisotropic correlation function between redshifts 0.6 and 1”. In: Monthly Notices of the Royal Astronomical Society 500.1 (Jan. 2021), pp. 736–762. issn: 0035-8711. doi:10.1093/mnras/staa2800. [77] Zhongxu Zhai et al. “The Aemulus Project. V. Cosmological Constraint from Smallscale Clustering of BOSS Galaxies”. en. In: The Astrophysical Journal 948.2 (May 2023). Publisher: The American Astronomical Society, p. 99. issn: 0004-637X. doi: 10.3847/1538-4357/acc65b. [78] Will J. Percival and Martin White. “Testing cosmological structure formation using redshift-space distortions”. en. In: Monthly Notices of the Royal Astronomical Society 393.1 (Feb. 2009), pp. 297–308. issn: 0035-8711. doi: 10.1111/j.13652966.2008.14211.x. [79] Héctor Gil-Marín et al. “The power spectrum and bispectrum of SDSS DR11 BOSS galaxies II: cosmological interpretation”. In: Monthly Notices of the Royal Astronomical Society 452.2 (Sept. 2015). arXiv:1408.0027 [astro-ph], pp. 1914– 1921. issn: 0035-8711, 1365-2966. doi: 10.1093/mnras/stv1359 . arXiv: arXiv: 1408.0027. 80
Master’s Thesis ETH Zürich Constança Tropa [80] Cullan Howlett et al. “2MTF VI. Measuring the velocity power spectrum”. In: Monthly Notices of the Royal Astronomical Society 471.3 (Nov. 2017). arXiv:1706.05130 [astro-ph], pp. 3135–3151. issn: 0035-8711, 1365-2966. doi: 10 . 1093 / mnras / stx1521. arXiv: arXiv:1706.05130. [81] Antonella Palmese and Alex G. Kim. “Probing gravity and growth of structure with gravitational waves and galaxies’ peculiar velocity”. In: Physical Review D 103.10 (May 2021). arXiv:2005.04325 [astro-ph], p. 103507. issn: 2470-0010, 2470-0029. doi:10.1103/PhysRevD.103.103507. arXiv: arXiv:2005.04325. [82] Bhuvnesh Jain and Pengjie Zhang. “Observational Tests of Modified Gravity”. In: Physical Review D 78.6 (Sept. 2008). arXiv:0709.2375 [astro-ph], p. 063503. issn: 1550-7998, 1550-2368. doi: 10.1103/PhysRevD.78.063503 . arXiv: arXiv: 0709.2375. [83] Yong-Seon Song and Will J. Percival. “Reconstructing the history of structure formation using redshift distortions”. In: Journal of Cosmology and Astroparticle Physics 2009.10 (Oct. 2009). arXiv:0807.0810 [astro-ph], pp. 004–004. issn: 14757516. doi:10.1088/1475-7516/2009/10/004. arXiv: arXiv:0807.0810. [84] F. Bernardeau et al. “Large-Scale Structure of the Universe and Cosmological Perturbation Theory”. In: Physics Reports 367.1-3 (Sept. 2002). arXiv:astro-ph/0112551, pp. 1–248. issn: 03701573. doi:10.1016/S0370-1573(02)00135-7. [85] Cornelius Rampf and Oliver Hahn. “Shell-crossing in a CDM Universe”. In: Monthly Notices of the Royal Astronomical Society: Letters 501.1 (Jan. 2021). arXiv:2010.12584 [astro-ph], pp. L71–L75. issn: 1745-3925, 1745-3933. doi: 10 . 1093 / mnrasl / slaa198. arXiv: arXiv:2010.12584. [86] Sergei F.Shandarin. “The multi-stream flows and the dynamics of the cosmic web”. en. In: Journal of Cosmology and Astroparticle Physics 2011.05 (May 2011), p. 015. issn: 1475-7516. doi:10.1088/1475-7516/2011/05/015. [87] Thomas Buchert. “Lagrangian theory of gravitational instability of FriedmanLemaıtre cosmologies and the ‘Zel’dovich approximation’”. In: Monthly Notices of the Royal Astronomical Society 254.4 (Feb. 1992), pp. 729–737. issn: 0035-8711. doi:10.1093/mnras/254.4.729. [88] M. Crocce, S. Pueblas, and R. Scoccimarro. “Transients from Initial Conditions in Cosmological Simulations”. In: Monthly Notices of the Royal Astronomical Society 373.1 (Nov. 2006). arXiv:astro-ph/0606505, pp. 369–381. issn: 0035-8711, 1365-2966. doi:10.1111/j.1365-2966.2006.11040.x. 81
Master’s Thesis ETH Zürich Constança Tropa [89] Volker Springel. “The cosmological simulation code GADGET-2”. In: Monthly Notices of the Royal Astronomical Society 364.4 (Dec. 2005). arXiv:astro-ph/0505010, pp. 1105–1134. issn: 0035-8711, 1365-2966. doi: 10.1111/j.1365-2966.2005. 09655.x. [90] R. A. Sunyaev and Ya B. Zel’dovich. “Microwave Background Radiation as a Probe of the Contemporary Structure and History of the Universe”. en. In: Annual Review of Astronomy and Astrophysics 18.Volume 18, 1980 (Sept. 1980). Publisher: Annual Reviews, pp. 537–560. issn: 0066-4146, 1545-4282. doi: 10.1146/annurev.aa.18. 090180.002541. [91] R. A. Sunyaev and Ya B. Zeldovich. “The velocity of clusters of galaxies relative to the microwave background - The possibility of its measurement.” en. In: Monthly Notices of the Royal Astronomical Society 190 (Feb. 1980), pp. 413–420. issn: 0035-8711. doi:10.1093/mnras/190.3.413. [92] B. A. Benson et al. “SPT-3G: A Next-Generation Cosmic Microwave Background Polarization Experiment on the South Pole Telescope”. In: arXiv:1407.2973 [astroph]. July 2014, 91531P. doi:10.1117/12.2057305. arXiv: arXiv:1407.2973. [93] J. Colin Hill et al. “Kinematic Sunyaev-Zel’dovich Effect with Projected Fields: A Novel Probe of the Baryon Distribution with Planck, WMAP, and WISE Data”. In: Physical Review Letters 117.5 (July 2016). Publisher: American Physical Society, p. 051301. doi:10.1103/PhysRevLett.117.051301. [94] Simone Ferraro et al. “The Kinematic Sunyaev-Zel’dovich Effect with Projected Fields II: prospects, challenges, and comparison with simulations”. In: Physical Review D 94.12 (Dec. 2016). arXiv:1605.02722 [astro-ph], p. 123526. issn: 2470-0010, 2470-0029. doi:10.1103/PhysRevD.94.123526. arXiv: arXiv:1605.02722. [95] Emmanuel Schaan et al. “Evidence for the kinematic Sunyaev-Zeľdovich effect with ACTPol and velocity reconstruction from BOSS”. In: Physical Review D 93.8 (Apr. 2016). arXiv:1510.06442 [astro-ph], p. 082002. issn: 2470-0010, 2470-0029. doi: 10.1103/PhysRevD.93.082002. arXiv: arXiv:1510.06442. [96] Atacama Cosmology Telescope Collaboration et al. “Atacama Cosmology Telescope: Combined kinematic and thermal Sunyaev-Zel’dovich measurements from BOSS CMASS and LOWZ halos”. In: Physical Review D 103.6 (Mar. 2021). Publisher: American Physical Society, p. 063513. doi:10.1103/PhysRevD.103.063513. [97] Carlos Hervías-Caimapo et al. “The Simons Observatory: Validation of reconstructed power spectra from simulated filtered maps for the Small Aperture Telescope 82
Master’s Thesis ETH Zürich Constança Tropa survey”. In: Journal of Cosmology and Astroparticle Physics 2025.06 (June 2025). arXiv:2502.00946 [astro-ph], p. 055. issn: 1475-7516. doi: 10.1088/1475-7516/ 2025/06/055. arXiv: arXiv:2502.00946. [98] E. Schiappucci et al. Constraining cosmological parameters using the pairwise kinematic Sunyaev-Zel’dovich effect with CMB-S4 and future galaxy cluster surveys. arXiv:2409.18368 [astro-ph]. Sept. 2024. doi: 10.48550/arXiv.2409.18368 . arXiv: arXiv:2409.18368. [99] Kendrick M. Smith et al. KSZ tomography and the bispectrum. arXiv:1810.13423 [astro-ph]. Oct. 2018. doi: 10.48550/arXiv.1810.13423 . arXiv: arXiv:1810. 13423. [100] Moritz Münchmeyer et al. “Constraining local non-Gaussianities with kinetic Sunyaev-Zel’dovich tomography”. In: Physical Review D 100.8 (Oct. 2019). Publisher: American Physical Society, p. 083508. doi: 10.1103/PhysRevD.100.083508 . [101] Kyle Cranmer, Johann Brehmer, and Gilles Louppe. “The frontier of simulationbased inference”. In: Proceedings of the National Academy of Sciences 117.48 (Dec. 2020). Publisher: Proceedings of the National Academy of Sciences, pp. 30055–30062. doi:10.1073/pnas.1912789117. [102] Carolina Cuesta-Lazaro et al. “Joint cosmological parameter inference and initial condition reconstruction with Stochastic Interpolants”. en. In: (). [103] Core Francisco Park et al. “3D Reconstruction of Dark Matter Fields with Diffusion Models: Towards Application to Galaxy Surveys”. en. In: (). [104] Victoria Ono et al. Debiasing with Diffusion: Probabilistic reconstruction of Dark Matter fields from galaxies with CAMELS. arXiv:2403.10648 [astro-ph]. Mar. 2024. doi:10.48550/arXiv.2403.10648. arXiv: arXiv:2403.10648. [105] Natalí S. M. de Santi et al. “Robust Field-level Likelihood-free Inference with Galaxies”. In: The Astrophysical Journal 952.1 (July 2023). arXiv:2302.14101 [astroph], p. 69. issn: 0004-637X, 1538-4357. doi: 10.3847/1538-4357/acd1e2 . arXiv: arXiv:2302.14101. [106] J. Jasche and G. Lavaux. “Physical Bayesian modelling of the non-linear matter distribution: New insights into the nearby universe”. en. In: Astronomy & Astrophysics 625 (May 2019). Publisher: EDP Sciences, A64. issn: 0004-6361, 1432-0746. doi:10.1051/0004-6361/201833710. 83
Master’s Thesis ETH Zürich Constança Tropa [107] Richard Stiskalek et al. The Velocity Field Olympics: Assessing velocity field reconstructions with direct distance tracers. arXiv:2502.00121 [astro-ph]. Jan. 2025. doi: 10.48550/arXiv.2502.00121. arXiv: arXiv:2502.00121. [108] Guilhem Lavaux and Michael J. Hudson. “The 2M++ galaxy redshift catalogue”. In: Monthly Notices of the Royal Astronomical Society 416.4 (Oct. 2011), pp. 2840–2856. issn: 0035-8711. doi:10.1111/j.1365-2966.2011.19233.x. [109] Stephen Stopyra et al. “Towards accurate field-level inference of massive cosmic structures”. In: Monthly Notices of the Royal Astronomical Society 527.1 (Jan. 2024), pp. 1244–1256. issn: 0035-8711. doi:10.1093/mnras/stad3170. [110] Jenny G Sorce. “Galaxy clusters in local Universe simulations without density constraints: a long uphill struggle”. In: Monthly Notices of the Royal Astronomical Society 478.4 (Aug. 2018), pp. 5199–5208. issn: 0035-8711. doi: 10.1093/mnras/ sty1631. [111] Robert Lilow, Punyakoti Ganeshaiah Veena, and Adi Nusser. “Neural network reconstruction of density and velocity fields from the 2MASS Redshift Survey”. en. In: Astronomy & Astrophysics 689 (Sept. 2024). Publisher: EDP Sciences, A226. issn: 0004-6361, 1432-0746. doi:10.1051/0004-6361/202450219. [112] James Prideaux-Ghee et al. “Field-based physical inference from peculiar velocity tracers”. In: Monthly Notices of the Royal Astronomical Society 518.3 (Jan. 2023), pp. 4191–4213. issn: 0035-8711. doi:10.1093/mnras/stac3346. [113] Ivan Kobyzev, Simon J. D. Prince, and Marcus A. Brubaker. “Normalizing Flows: An Introduction and Review of Current Methods”. In: IEEE Transactions on Pattern Analysis and Machine Intelligence 43.11 (Nov. 2021). arXiv:1908.09257 [stat], pp. 3964–3979. issn: 0162-8828, 2160-9292, 1939-3539. doi: 10.1109/TPAMI. 2020.2992934. arXiv: arXiv:1908.09257. [114] Yaron Lipman et al. Flow Matching for Generative Modeling. arXiv:2210.02747 [cs]. Feb. 2023. doi:10.48550/arXiv.2210.02747. arXiv: arXiv:2210.02747. [115] Francisco Villaescusa-Navarro et al. “The Quijote simulations”. In: The Astrophysical Journal Supplement Series 250.1 (Sept. 2020). arXiv:1909.05273 [astro-ph], p. 2. issn: 0067-0049, 1538-4365. doi: 10.3847/15384365/ab9d82 . arXiv: arXiv: 1909.05273. [116] Kazuyuki Akitsu et al. Cosmology inference with perturbative forward modeling at the field level: a comparison with joint power spectrum and bispectrum analyses. 84
Master’s Thesis ETH Zürich Constança Tropa arXiv:2509.09673 [astro-ph] version: 1. Sept. 2025. doi: 10.48550/arXiv.2509. 09673. arXiv: arXiv:2509.09673. [117] Conor Durkan et al. Neural Spline Flows. arXiv:1906.04032 [stat]. Dec. 2019. doi: 10.48550/arXiv.1906.04032. arXiv: arXiv:1906.04032. [118] Anirban Bairagi, Benjamin Wandelt, and Francisco Villaescusa-Navarro. How many simulations do we need for simulation-based inference in cosmology? arXiv:2503.13755 [astro-ph]. Sept. 2025. doi: 10.48550/arXiv.2503.13755 . arXiv: arXiv:2503. 13755. [119] Takuya Akiba et al. Optuna: A Next-generation Hyperparameter Optimization Framework. arXiv:1907.10902 [cs]. July 2019. doi: 10.48550/arXiv.1907.10902 . arXiv: arXiv:1907.10902. [120] Shi-Fan Chen et al. Effective Theories of Redshift-Space Galaxy Peculiar Velocities. arXiv:2508.00066 [astro-ph]. July 2025. doi: 10.48550/arXiv.2508.00066 . arXiv: arXiv:2508.00066. [121] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional Networks for Biomedical Image Segmentation. arXiv:1505.04597 [cs]. May 2015. doi: 10.48550/arXiv.1505.04597. arXiv: arXiv:1505.04597. [122] Ashish Vaswani et al. Attention Is All You Need. arXiv:1706.03762 [cs]. Aug. 2023. doi:10.48550/arXiv.1706.03762. arXiv: arXiv:1706.03762. [123] Md Zahangir Alom et al. Recurrent Residual Convolutional Neural Network based on U-Net (R2U-Net) for Medical Image Segmentation. arXiv:1802.06955 [cs]. May 2018. doi:10.48550/arXiv.1802.06955. arXiv: arXiv:1802.06955. [124] Bernardita Ried Guachalla et al. “Velocity reconstruction in the era of DESI and Rubin (part I): Exploring spectroscopic, photometric & hybrid samples”. In: Physical Review D 109.10 (May 2024). arXiv:2312.12435 [astro-ph], p. 103533. issn: 24700010, 2470-0029. doi: 10.1103/PhysRevD.109.103533 . arXiv: arXiv:2312.12435 . [125] Fiona McCarthy et al. The Atacama Cosmology Telescope: Large-scale velocity reconstruction with the kinematic Sunyaev–Zel’dovich effect and DESI LRGs. arXiv:2410.06229 [astro-ph]. Oct. 2024. doi: 10.48550/arXiv.2410.06229 . arXiv: arXiv:2410.06229. [126] Hideki Tanimura, Saleem Zaroubi, and Nabila Aghanim. “Direct detection of the kinetic Sunyaev-Zel’dovich effect in galaxy clusters”. In: Astronomy & Astrophysics 645 (Jan. 2021). arXiv:2007.02952 [astro-ph], A112. issn: 0004-6361, 1432-0746. doi:10.1051/0004-6361/202038846. arXiv: arXiv:2007.02952. 85
Master’s Thesis ETH Zürich Constança Tropa [127] Stefania Amodeo et al. “The Atacama Cosmology Telescope: Modeling the Gas Thermodynamics in BOSS CMASS galaxies from Kinematic and Thermal SunyaevZel’dovich Measurements”. In: Physical Review D 103.6 (Mar. 2021). arXiv:2009.05558 [astro-ph], p. 063514. issn: 2470-0010, 2470-0029. doi: 10.1103/PhysRevD.103. 063514. arXiv: arXiv:2009.05558. [128] Edoardo Maragliano et al. From Redshift to Real Space: Combining Linear Theory With Neural Networks. arXiv:2507.11462 [astro-ph]. July 2025. doi: 10.48550/ arXiv.2507.11462. arXiv: arXiv:2507.11462. [129] Ziyong Wu et al. “Cosmic Velocity Field Reconstruction Using AI”. In: The Astrophysical Journal 913.1 (May 2021). arXiv:2105.09450 [astro-ph], p. 2. issn: 0004637X, 1538-4357. doi:10.3847/1538-4357/abf3bb. arXiv: arXiv:2105.09450. [130] Yuyu Wang and Xiaohu Yang. “Peculiar Velocity Reconstruction From Simulations and Observations Using Deep Learning Algorithms”. en. In: The Astrophysical Journal 969.2 (July 2024). arXiv:2406.14101 [astro-ph], p. 76. issn: 0004-637X, 1538-4357. doi:10.3847/1538-4357/ad4d84. arXiv: arXiv:2406.14101. [131] Hongxiang Chen et al. “Estimation of line-of-sight velocities of individual galaxies using neural networks – I. Modelling redshift–space distortions at large scales”. In: Monthly Notices of the Royal Astronomical Society 532.4 (Aug. 2024), pp. 3947–3960. issn: 0035-8711. doi:10.1093/mnras/stae1682. [132] Adrian E. Bayer, Chirag Modi, and Simone Ferraro. “Joint velocity and density reconstruction of the Universe with nonlinear differentiable forward modeling”. en. In: Journal of Cosmology and Astroparticle Physics 2023.06 (June 2023), p. 046. issn: 1475-7516. doi:10.1088/1475-7516/2023/06/046. [133] Volker Springel et al. “First results from the IllustrisTNG simulations: matter and galaxy clustering”. In: Monthly Notices of the Royal Astronomical Society 475.1 (Mar. 2018). arXiv:1707.03397 [astro-ph], pp. 676–698. issn: 0035-8711, 1365-2966. doi:10.1093/mnras/stx3304. arXiv: arXiv:1707.03397. [134] Joop Schaye et al. “The EAGLE project: simulating the evolution and assembly of galaxies and their environments”. en. In: Monthly Notices of the Royal Astronomical Society 446.1 (Jan. 2015), pp. 521–554. issn: 0035-8711. doi: 10.1093/mnras/ stu2058. [135] Jie Zhou et al. Graph Neural Networks: A Review of Methods and Applications. arXiv:1812.08434 [cs]. Oct. 2021. doi: 10 . 48550 / arXiv . 1812 . 08434 . arXiv: arXiv:1812.08434. 86