  We propose a novel approach using neural networks (NNs) to differentiate
between cosmological models, especially in the case where they are nested and
the additional model parameters are close to zero, making it difficult to
discriminate them with traditional approaches. Our method complements Bayesian
analyses for cosmological model selection, which heavily depend on the chosen
priors and average the unnormalized posterior over potentially large prior
volumes. By analyzing simulated realistic data sets of the growth rate of the
large scale structure (LSS) of the Universe, based on current galaxy-clustering
survey specifications, for the cosmological constant and cold dark matter
($\Lambda$CDM) model and the Hu-Sawicki $f(R)$ model, we demonstrate the
potential of NNs to enhance the extraction of meaningful information from
cosmological LSS data. We find that the NN can successfully distinguish between
$\Lambda$CDM and the $f(R)$ models, by predicting the correct model with
approximately $97\%$ overall accuracy, thus demonstrating that NNs can maximise
the potential of current and next generation surveys to probe for deviations
from general relativity.
