Xuewen Qin, Yulong Chen, Bing Li, Shan Zeng, Gaoxiang Mei, Chen Yu
Olive oil adulteration with low-cost vegetable oils poses a serious food safety concern. This study proposes a Dynamic Task Priority Multi-Gate Mixture-of-Experts (DTP-MMoE) model based on Raman spectroscopy to simultaneously perform the qualitative discrimination of adulteration types and quantitative prediction of adulteration ratios. The model learns shared spectral representations through expert networks and task-specific gating mechanisms, while a dynamic task priority loss function adaptively balances optimization between the classification and regression tasks. Experimental results demonstrated that the DTP-MMoE model achieved a classification accuracy of 99.15% and a coefficient of determination (R2) of 0.99 for prediction, significantly outperforming conventional single-task and multi-task baselines. Ablation studies confirmed the critical contributions of the gating mechanism, expert network configuration, and dynamic weighting strategy. Furthermore, external validation on commercial blended oil samples not involved in training yielded a mean absolute error (MAE) of 0.317%, an RMSE of 0.459%, and a MAPE of 6.34%, demonstrating good generalization capability. The proposed method provides an efficient, non-destructive, and reliable analytical tool for rapid screening of olive oil authenticity, showing considerable promise for application in food quality control and regulatory practice.