  In this study, we use Rational-Quadratic Neural Spline Flows, a sophisticated
parametrization of Normalizing Flows, for inferring posterior probability
distributions in scenarios where direct evaluation of the likelihood is
challenging at inference time. We exemplify this approach using the T2K near
detector as a working example, focusing on learning the posterior probability
distribution of neutrino flux binned in neutrino energy. The predictions of the
trained model are conditioned at inference time by the momentum and angle of
the outgoing muons released after neutrino-nuclei interaction. This
conditioning allows for the generation of personalized posterior distributions,
tailored to the muon observables, all without necessitating a full retraining
of the model for each new dataset. The performances of the model are studied
for different shapes of the posterior distributions.
