Sai Xu, Zhenhui He, Xin Liang, Huazhong Lu
Agricultural products exhibit significant biological activity during the post-harvest storage and circulation stages, and their internal quality evolves over time due to both the passage of time and environmental disturbances. This leads to a non-stationary relationship between spectral response and quality, resulting in performance degradation when non-destructive detection models, established under specific time conditions, are applied across different time periods or batches. To address this distribution shift issue, this paper proposes a spectral quality detection method based on the Mixture of Experts (MoE) model, named Alex-1D-SE-GMoE, using pomelo as the subject. First, the storage process is divided into five relatively stable stages based on the quality evolution pattern. Stage-specific expert models are then constructed using PLSR, with SNV preprocessing and CARS variable selection. Next, a 1D spectral gating network (GMoE) is designed to adaptively weight and combine the expert models, incorporating an SE attention mechanism to enhance feature expression and gating discrimination capabilities. Experimental results show that this method achieves R 2 = 0.96 in SSC detection, representing a 30% improvement compared to the baseline model (R 2 = 0.72), which uses a unified model without distinguishing the stages. Additionally, the gating weights provide interpretability by indicating the storage stage corresponding to each sample. This framework presents a new solution for non-destructive detection of agricultural products under dynamic quality changes during the post-harvest storage period.