The information detection of complex systems from data is currently undergoing a revolution,driven by the emergence of big data and machine learning methodology. Discovering governingequations and quantifying dynamical properties of complex systems are among central challenges. Inthis work, we devise a nonparametric approach to learn the relative entropy rate from observationsof stochastic differential equations with different drift functions. The estimator corresponding tothe relative entropy rate then is presented via the Gaussian process kernel theory. Meanwhile, thisapproach enables to extract the governing equations. We illustrate our approach in several examples.Numerical experiments show the proposed approach performs well for rational drift functions, notonly polynomial drift functions.