A latent linear model for nonlinear coupled oscillators on graphs