a Schematic illustration of ss-SERS detection with coded light excitation. A laser beam is encoded by using a spreading code of pseudorandom noise (PN) and is injected on a SERS substrate with Raman active molecules, where the SERS signals are simultaneously encoded with the coded excitation of light. Noise-suppressed SERS signals are reconstructed at the decoder by using peak autocorrelation between the spreading code and the coded SERS signals, whereas all noise, including fluorescence and background noise, is effectively eliminated due to a near-zero cross-correlation between the spreading code and the noise. b Encoding and decoding principles for the removal of background noise and the restoration of noise-suppressed SERS signals. SCW, SSERS, SF, and Nb represent the CW light excitation, original SERS signals, original fluorescence signals, and background noise signals, respectively. PN is the PN code used in the encoding process and PN′ is a distorted pattern from PN. The bit duration (Tb) and the modulation frequency (fc) are inversely proportional. P, t, and f represent the signal power, time, and frequency, respectively. In the time domain, the coded light and the coded SERS signals exhibit pulse sequences of the same pattern as the PN code of the encoding process, whereas the fluorescence signals are encoded in a distorted pattern from the PN code due to the lifetime of the fluorescence signals being longer than the bit duration. Consequently, the coded fluorescence and background noise are completely filtered out by correlating with the PN code of the encoding process due to the spectrum-spreading property of the spreading code, resulting in an exceptional SNR enhancement.