We propose a novel approach using neural networks (NNs) to differentiate between cosmological models, and implemented lime as an interpretability approach to identify the key features influencing our model's decisions. We show the potential of NNs to enhance the extraction of meaningful information from cosmological large-scale structure data, based on current galaxy-clustering survey specifications, for the cosmological constant and cold dark matter (ΛCDM) model and the Hu-Sawicki f(R) model. We find that the NN can successfully distinguish between ΛCDM and the f(R) models, by predicting the correct model with approximately 97% overall accuracy, thus demonstrating that NNs can maximize the potential of current and next generation surveys to probe for deviations from general relativity.