  The Bayes factor is a widely used criterion in model comparison and its
logarithm is a difference of out-of-sample predictive scores under the
logarithmic scoring rule. However, when some of the candidate models involve
vague priors on their parameters, the log-Bayes factor features an arbitrary
additive constant that hinders its interpretation. As an alternative, we
consider model comparison using the Hyv\"arinen score. We propose a method to
consistently estimate this score for parametric models, using sequential Monte
Carlo methods. We show that this score can be estimated for models with
tractable likelihoods as well as nonlinear non-Gaussian state-space models with
intractable likelihoods. We prove the asymptotic consistency of this new model
selection criterion under strong regularity assumptions in the case of
non-nested models, and we provide qualitative insights for the nested case. We
also use existing characterizations of proper scoring rules on discrete spaces
to extend the Hyv\"arinen score to discrete observations. Our numerical
illustrations include L\'evy-driven stochastic volatility models and diffusion
models for population dynamics.
