As shown by the Pierre Auger Collaboration, the combined fit of energy spectrum and depth of shower maximum distributions of ultra-high-energy cosmic rays can provide constraints on the parameters their sources. To this end, a database describing the connection between the shape of the injected energy spectrum and composition at the sources and the observables measured on Earth is built using 1-dimensional CRPropa3 simulations. Here, the injection at the source is described by several free model parameters, namely the spectral index, maximum rigidity and five representative mass fractions.The inference of the free model parameters can be done with, e.g., Markov chain Monte Carlo (MCMC) sampling which allows to reconstruct posterior distributions.
In this work, we investigate an alternative approach based on normalizing flows, a conditional invertible neural network. We show that the posterior distributions obtained with the network agree with those using MCMC, for a simulation of energy spectrum and shower depth distributions resembling Auger measurements. Additionally, the mapping of the source parameters and the observables as learned by the cINN is investigated. The accuracy of the reconstructed variables on a test dataset is shown to be very good. For different applications, the concept may also be exploited to swiftly generate observables for specific source scenarios after the initial computing-expensive learning phase.