A deep learning-based early warning model for food safety risks: evidence from the aquatic products sector in China
摘要
Developing a scientifically sound early warning mechanism is crucial for improving the accuracy of food safety risk prediction and allocating resources more effectively to address major risks. In response to these challenges, our study proposes a food safety risk early warning model that utilizes a modified slime mold algorithm (mSMA) to optimize a long short-term memory (LSTM) neural network. The effectiveness of mSMA is validated by comparing its convergence rate and precision against seven different swarm optimization algorithms across 12 test functions from CEC2022, applied in varying dimensions. Additionally, a risk evaluation index system for aquatic products is developed, comprising four categories of risk indices. The calculated risk values of aquatic products are employed as the expected output for the LSTM using the coefficient of variation method (CVM) integrated with the entropy weight method (EWM), referred to as the coefficient of variation-entropy weight method (CV-EWM). The mean square error between the predicted and actual risk values is then used as the objective function for mSMA to optimize the LSTM's hyperparameters, finally yielding the proposed mSMA-LSTM-based early warning model. The findings indicate that heavy metal and additive indicators significantly impact the quality and safety of aquatic products, with weight values both reaching approximately 34%. Furthermore, mSMA demonstrates superior convergence precision and the proposed early warning model is effective and feasible in processing the complex aquatic product inspection data. The proposed model exhibits strong predictive performance, with a high R-squared value (0.988), low root mean square error (0.00204), and mean absolute error (0.00119), indicating high accuracy. Our study presents a scalable decision-support framework that enables regulatory authorities to enhance governance throughout the food supply chain. Local governments can leverage these predictions to strategically allocate inspection resources by increasing sampling efforts in high-risk areas identified by the mSMA-LSTM model during periods of high consumption or seasonal contamination risk, thereby improving the responsiveness of food safety management systems.