Abstract Background Classification of cleanliness grades of vaginal discharge plays a pivotal role in clinical laboratories, serving as indicators for the presence of various vaginal infections such as bacterial vaginosis and candidal vulvovaginitis, etc. The conventional method for assessing vaginal discharge cleanliness involves manual microscopy, a technique susceptible to variations based on the examiner's expertise and subjective judgment, hindering the attainment of swift and accurate diagnoses. Methods This study introduces a novel approach by integrating Surface-Enhanced Raman Spectroscopy (SERS) with a deep learning algorithm for the rapid classification of vaginal discharge cleanliness grades. The proposed classification method combines the Variational Auto-Encoder (VAE) and Long Short-Term Memory (LSTM) to process SERS spectra. The quality of the training data is assessed using the signal-to-noise ratio (SNR) as a standard indicator. Results The application of the VAE-LSTM algorithm significantly enhances classification performance, providing swift and accurate results while reducing the required time. Comparative analyses with various classical machine learning algorithms and evaluation metrics reveal the superior predictive capability and time efficiency of the VAE-LSTM algorithm, demonstrating 100% accuracy and a fitting time of 2 seconds. Blind testing of SERS spectra collected from unknown patients further validates the reliability of the proposed method. Conclusions This study presents a promising and practical approach for the rapid classification of vaginal discharge cleanliness grades. The integration of the SERS technique with the VAE-LSTM algorithm not only ensures accuracy and efficiency in clinical diagnosis but also lays the foundation for advancements in non-invasive diagnostic technologies in gynecological healthcare.