Application of NIR spectroscopy with machine learning in the food industry: A comprehensive review
Nayeem Mia, Md. Abul Hashem, Md. Abdul Halim, Sania Tariq, Zubayed Ahamed
Abstract
Near-infrared (NIR) spectroscopy has become a key enabling technology for rapid and nondestructive analysis in the food industry; however, the intrinsic complexity of NIR spectral data, arising from overlapping absorption bands, scattering effects, and matrix-dependent variability, requires advanced data-driven strategies for reliable interpretation. This review critically examines the integration of NIR spectroscopy with machine-learning approaches for food quality evaluation, authentication, and process monitoring, with emphasis on methodological rigor, robustness, and industrial applicability. Fundamental aspects of NIR spectral generation, instrumentation, and measurement configurations are discussed alongside preprocessing strategies, highlighting matrix-dependent selection, risks of over-preprocessing, and interactions with modern machine-learning and deep-learning models. A systematic comparative framework is presented to evaluate classical chemometric and advanced machine-learning algorithms in terms of data requirements, nonlinearity handling, interpretability, computational cost, and suitability for industrial deployment. Applications across major food sectors, including meat and fish, dairy, cereals and grains, fruits and vegetables, and processed or fermented foods, are reviewed with explicit distinction between laboratory-scale studies and industrial-scale implementations. Particular attention is given to external validation, batch effects, instrument transferability, model drift, and performance metrics relevant to quantitative NIR applications. Emerging trends such as deep learning, transfer learning, portable and inline NIR devices, process analytical technology (PAT), and Industry 4.0 integration are evaluated alongside practical challenges related to data scarcity, sensor stability, and regulatory acceptance. Overall, this review provides a structured and application-oriented perspective on advancing NIR–machine learning systems toward robust, interpretable, and regulatory-compliant food quality control. • Integrates near-infrared spectroscopy with machine learning for nondestructive food quality assessment. • Critically analyzes preprocessing strategies, feature selection, and their impact on model robustness and interpretability. • Provides a systematic comparison of machine-learning and deep-learning algorithms for NIR-based food analysis. • Distinguishes laboratory-scale studies from industrial-scale implementations across major food sectors. • Addresses validation, standardization, and regulatory challenges for deploying NIR–ML systems in real-world food processing environments.