Improving accuracy and generalization in single kernel oil characteristics prediction in maize using NIR-HSI and a knowledge-injected spectral tabtransformer - Anran Song; Xinyu Guo; Weiliang Wen; Chuanyu Wang; Shenghao Gu; Xiaoqian Chen; Juan Wang; Chunjiang Zhao (Artificial Intelligence in Agriculture, 2025)
Near-infrared spectroscopy hyperspectral imaging (NIR-HSI) is widely used for seed component prediction due to its non-destructive and rapid nature. However, existing models often suffer from limited generalization, particularly when trained on small datasets, and there is a lack of effective deep learning (DL) models for spectral data analysis. To address these challenges, we propose the Knowledge-Injected Spectral TabTransformer (KIT-Spectral TabTransformer), an innovative adaptation of the traditional TabTransformer specifically designed for maize seeds. By integrating domain-specific knowledge, this approach enhances model training efficiency and predictive accuracy while reducing reliance on large datasets. The generalization capability of the model was rigorously validated through ten-fold cross-validation (10-CV). Compared to traditional machine learning methods, the attention-based CNN (ACNNR), and the Oil Characteristics Predictor Transformer (OCP-Transformer), the KIT-Spectral TabTransformer demonstrated superior performance in oil mass prediction, achieving Rp2= 0.9238 ± 0.0346, RMSEp = 0.1746 ± 0.0401. For oil content, Rp2= 0.9602 ± 0.0180 and RMSEp = 0.5301 ± 0.1446 on a dataset with oil content ranging from 0.81 % to 13.07 %. On the independent validation set, our model achieved R2 values of 0.7820 and 0.7586, along with RPD values of 2.1420 and 2.0355 in the two tasks, highlighting its strong prediction capability and potential for real-world application. These findings offer a potential method and direction for single seed oil prediction and related crop component analysis.