Convolutional neural network-based models for near-infrared prediction of nutritional quality in multi-product animal feeds - Yang, Xueping; Liu, Zhengling; Yang, Fuyu; Lin, Yanli; Berzaghi, Paolo; Castillo-Gironés, Salvador (MDPI, 2026)
Near-infrared spectroscopy (NIRS) is widely used for rapid and non-destructive evaluation of feed nutritional quality, but robust calibration remains challenging for heterogeneous multi-product feed datasets. This study evaluated convolutional neural network (CNN)-based models for predicting crude protein (CP) and acid detergent fiber (ADF) using a previously published NIR database containing forage and grain-based feeds. A one-dimensional CNN and two hybrid models, CNN combined with partial least squares regression (CNN+PLS) and XGBoost (CNN+XGBoost), were developed and compared with conventional PLSR calibration models based on either the pooled multi-product dataset or product-specific subsets. Model performance was assessed using an independent internal hold-out test set generated within the same database. For CP prediction, CNN-based models achieved strong performance on the hold-out test set, with testing R2 values of 0.98 and RMSEP values of 0.60–0.62, showing a clear reduction in prediction error compared with the global PLSR model. For ADF, CNN and CNN+PLS provided only modest improvements over global PLSR, whereas CNN+XGBoost showed weaker generalization for ADF. Product-wise results further indicated that ADF prediction was more strongly affected by feed matrix and product category than CP prediction. Grad-CAM examples suggested that CNN activation patterns were broadly consistent with known protein- and fiber-related absorption regions, although this interpretation should be regarded as illustrative evidence of spectral coherence rather than direct chemical causality. Overall, CNN-based models, particularly CNN+PLS, showed promise for improving NIRS prediction of CP in heterogeneous feed datasets, while their advantage for ADF was limited. Further validation using independent external datasets and multi-instrument conditions is required before routine implementation.
This article belongs to the Special Issue Advances in Farm Animal Feed and Nutrition
Keywords: 30 Agricultural, Veterinary and Food Sciences; Machine Learning and Artificial Intelligence; Networking and Information Technology R&D (NITRD); 3003 Animal production; 3009 Veterinary sciences; 3109 Zoology; near-infrared spectroscopy; animal feed; convolutional neural network; XGBoost algorithm; Grad-CAM