FOOD SCIENCE ›› 2026, Vol. 47 ›› Issue (1): 309-316.doi: 10.7506/spkx1002-6630-20250724-189

• Safety Detection • Previous Articles    

Coffee Powder Adulteration Detection Based on Near-Infrared Spectroscopy Combined with Machine Learning

ZHANG Fujie, ZENG Qingyu, KONG Dandan, YU Xiaoning, HU Weiming, CHEN Shen’ao, YUE Xiaoxian, LIANG Jiawen   

  1. (1. Faculty of Modern Agricultural Engineering, Kunming University of Science and Technology, Kunming 650500, China; 2. Yunnan Aromatic Tobacco Co. Ltd., Baoshan 678000, China)
  • Published:2026-02-04

Abstract: This study aims to develop a rapid and non-destructive method based on near-infrared (NIR) spectroscopy combined with machine learning modeling for the quantitative detection of soybean-adulterated coffee powder. A hierarchical modeling strategy was adopted to improve prediction accuracy. Support vector regression (SVR) combined with three spectral preprocessing methods was used to construct prediction models. A total of 30 characteristic wavelengths were selected by comparing competitive adaptive reweighted sampling (CARS) and iteratively retains informative variables (IRIV). Furthermore, three optimization algorithms: dung beetle optimization (DBO), particle swarm optimization (PSO), and grey wolf optimizer (GWO) were tested to find the most effective algorithm. The CARS-DBO-SVR model exhibited coefficients of determination (R2) of 0.978 4 and 0.966 9, root mean square error (RMSE) of 0.015 7 and 0.022 8, and residual prediction deviation (RPD) of 6.809 6 and 5.499 8 for the calibration and test sets, respectively. This study demonstrates that NIR spectroscopy provides an effective technical means for detecting soybean powder adulteration in coffee.

Key words: near-infrared spectroscopy; coffee adulteration; support vector regression

CLC Number: