CSGNN: Contamination Warning and Control of Food Quality via Contrastive Self-Supervised Learning-Based Graph Neural Network

Foods. 2023 Mar 1;12(5):1048. doi: 10.3390/foods12051048.

Abstract

Effective contamination warning and control of food quality can significantly reduce the likelihood of food quality safety incidents. Existing food contamination warning models for food quality rely on supervised learning, do not model the complex feature associations between detection samples, and do not consider the unevenness of detection data categories. In this paper, To overcome these limitations, we propose a Contrastive Self-supervised learning-based Graph Neural Network framework (CSGNN) for contamination warning of food quality. Specifically, we structure the graph for detecting correlations between samples and then define the positive and negative instance pairs for contrastive learning based on attribute networks. Further, we use a self-supervised approach to capture the complex relationships between detection samples. Finally, we assessed each sample's contamination level based on the absolute value of the subtraction of the prediction scores from multiple rounds of positive and negative instances obtained by the CSGNN. Moreover, we conducted a sample study on a batch of dairy product detection data in a Chinese province. The experimental results show that CSGNN outperforms other baseline models in contamination assessment of food quality, with AUC and recall of unqualified samples reaching 0.9188 and 1.0000, respectively. Meanwhile, our framework provides interpretable contamination classification for food detection. This study provides an efficient early warning method with precise and hierarchical contamination classification for contamination warning of food quality work.

Keywords: contamination warning; contrastive learning; food quality safety; graph neural networks; self-supervised learning.