Gradients of Generative Models for Improved Discriminative Analysis of Tandem Mass Spectra