Forthcoming large-scale structure (LSS) Stage IV surveys will provide us with unprecedented data to probe the nature of dark matter and dark energy.
However, analysing these data with conventional Markov Chain Monte Carlo (MCMC) methods will be challenging, due to the increase in the number of nuisance parameters and the presence of intractable likelihoods. In light of this, we present the first application of Marginal Neural Ratio Estimation (MNRE) (a recent approach in simulation-based inference) to LSS photometric probes: weak lensing, galaxy clustering and the cross-correlation power spectra. In order to analyse the hundreds of spectra simultaneously, we find that a pre-compression of data using principal component analysis, as well as parameter-specific data summaries lead to highly accurate results. Using expected Stage IV experimental noise, we are able to recover the posterior distribution for the cosmological parameters with a speedup factor of ∼ 10-60 compared to classical MCMC methods. To illustrate that the performance of MNRE is not impeded when posteriors are significantly non-Gaussian, we test a scenario of two-body decaying dark matter, finding that Stage IV surveys can improve current bounds on the model by up to one order of magnitude. This result supports that MNRE is a powerful framework to constrain the standard cosmological model and its extensions with next-generation LSS surveys.