65
Views
0
CrossRef citations to date
0
Altmetric
Research Article

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

, &
Article: 2379731 | Received 26 May 2024, Accepted 08 Jul 2024, Published online: 21 Jul 2024
 

ABSTRACT

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.

Acknowledgements

The authors would like to thank the anonymous reviewers who have provided valuable comments on this article.

Disclosure Statement

No potential conflict of interest was reported by the author(s).

Data Availability Statement

The dataset employed in this investigation is made readily available and accessible to interested parties.

Additional information

Funding

Ningde Teachers College Innovation Team Project [2019T02]. Natural Science Foundation of Fujian [2020J02011]. Scientific Research Program of Ningde Normal University [Nos: 2019ZDK10, 2019Y13, 2020T03, and 2021ZX501]