Abstract:Objective To enhance the milk adulteration detection accuracy.Methods This study proposes a milk adulteration detection method by integrating Raman spectroscopy with a spatiotemporal attention network (STAN). In the method, Raman spectroscopy is employed to extract molecular features, while STAN is applied to capture both temporal and spatial features, with a self-attention mechanism for further emphasizing critical information.Results Compared with existing methods, the experimental method increases milk adulteration detection accuracy by an average of 4.5%, precision by about 5.8%, recall by 4.9%, and F1 score by 5.4%.Conclusion The experimental method achieves high accuracy and robustness in milk adulteration detection, with strong potential for real-time detection and broad applicability. It can be utilized for online quality monitoring in milk production and regulatory processes and extended to adulteration detection in other foods.