SERS (surface-enhanced Raman scattering) enhances the Raman signals, but the plasmonic effects are sensitive to the chemical environment and the coupling between nanoparticles, resulting in large and variable backgrounds, which make signal matching and analyte identification highly challenging. Removing background is essential, but existing methods either cannot fit the strong fluctuation of the SeRS spectrum or do not consider the spectra's shape change across time. Here we present a new statistical approach named SABARSI that overcomes these difficulties by combining information from multiple spectra. Further, after efficiently removing the background, we have developed the first automatic method, as a part of SABARSI, for detecting signals of molecules and matching signals corresponding to identical molecules. The superior efficiency and reproducibility of SABARSI are shown on two types of experimental datasets. Surface-enhanced Raman scattering (SERS) is increasingly used to identify and quantify biomolecules in complex samples 1 because the observed Raman spectrum provides a molecular fingerprint that can be used to identify specific molecules. Advances in SERS methodology incorporating internal standards enables quantitative analysis at low concentrations. Incorporating SERS with separation methods can provide high throughput molecularly specific detection 2-6. A significant challenge to using SERS for molecular analysis is separating the molecular signal from the large background arising from the enhancing nanostructure. The enhanced signal originates from the interaction of analytes with the enhanced electromagnetic field from the plasmonic nanostructures 7. These enhancements transform Raman scattering into an ultrasensitive technique that can detect single molecules 8,9. Despite this amazing sensitivity associated with SERS, a number of challenges exist that complicate analysis and interpretation of the signals observed. First, SERS signals contain both molecular contributions and a large continuum background that is associated with the plasmonic nanostructures 10-13. The origin of the continuum background observed in SERS spectra is not fully understood but is generally attributed to some form of plasmonic emission, which can vary with solvents, ionic strength, and changes in nanoparticle structure. At high laser intensities, molecules can photodegrade to produce broad features in the SERS spectrum, and the nanoparticles can change shape altering the emission background. Experiments that can minimize these photodegradation effects 14,15 are important and can also promote stable backgrounds. Additionally, in solution, the molecules can diffuse away from the nanostructures and can have competitive interactions with other solution species 16. These interactions can lead to short signal durations when the analyte can be detected 17. The substrate, solvent, and analytes of interest all make major contributions to a SERS spectrum 18. Typically, the contributions to the signal from the substrate and solvent a...