  The standard approach to inference from cosmic large-scale structure data
employs summary statistics that are compared to analytic models in a Gaussian
likelihood with pre-computed covariance. To overcome the idealising assumptions
about the form of the likelihood and the complexity of the data inherent to the
standard approach, we investigate simulation-based inference (SBI), which
learns the likelihood as a probability density parameterised by a neural
network. We construct suites of simulated, exactly Gaussian-distributed data
vectors for the most recent Kilo-Degree Survey (KiDS) weak gravitational
lensing analysis and demonstrate that SBI recovers the full 12-dimensional KiDS
posterior distribution with just under $10^4$ simulations. We optimise the
simulation strategy by initially covering the parameter space by a hypercube,
followed by batches of actively learnt additional points. The data compression
in our SBI implementation is robust to suboptimal choices of fiducial parameter
values and of data covariance. Together with a fast simulator, SBI is therefore
a competitive and more versatile alternative to standard inference.
