Applied Artificial Intelligence (Dec 2024)

Intelligent Food Safety: A Prediction Model Based on Attention Mechanism and Reinforcement Learning

  • Mingxia Wu,
  • Wei Liu,
  • Shengyang Zheng

DOI
https://doi.org/10.1080/08839514.2024.2379731
Journal volume & issue
Vol. 38, no. 1

Abstract

Read online

Food safety emerges as a locus of heightened concern across societal strata. The establishment of a robust bulwark, embodied in an adept food detection mechanism and prescient early warning system, assumes paramount importance in safeguarding the populace. As artificial intelligence strides forward in the realm of food safety, this investigation endeavors to address the challenge of prognosticating the compliance rate of food safety through a unified RL-ALSTM (Reinforcement learning-attention-long-short term memory) framework, amalgamating reinforcement learning, attention mechanism, and Long Short-Term Memory (LSTM). Anchored by historical correlation data and food-specific attributes, the framework initiates its journey by deploying a dual-layer LSTM network to extract salient features. Subsequently, the model undergoes feature augmentation via attention mechanism and reinforcement learning methodologies, culminating in the realization of highly precise food safety predictions. Examination of experimental outcomes, leveraging both public and internally curated datasets, attests that the performance of the RL-ALSTM approach, as gauged by Root Mean Square Error (RMSE) and Mean Absolute Error (MAE), surpasses that of the disparate LSTM and traditional machine learning methods by lower than 0.001 in the safety ratio. This contribution furnishes a theoretical and methodological foundation for prospective advancements in the realm of food safety prediction.