DOI QR코드

DOI QR Code

Korean Food Review Analysis Using Large Language Models: Sentiment Analysis and Multi-Labeling for Food Safety Hazard Detection

대형 언어 모델을 활용한 한국어 식품 리뷰 분석: 감성분석과 다중 라벨링을 통한 식품안전 위해 탐지 연구

  • Eun-Seon Choi ;
  • Kyung-Hee Lee ;
  • Wan-Sup Cho
  • 최은선 (충북대학교 빅데이터협동과정) ;
  • 이경희 (충북대학교 경영정보학과) ;
  • 조완섭 (충북대학교 경영정보학과)
  • Received : 2024.05.23
  • Accepted : 2024.06.13
  • Published : 2024.06.30

Abstract

Recently, there have been cases reported in the news of individuals experiencing symptoms of food poisoning after consuming raw beef purchased from online platforms, or reviews claiming that cherry tomatoes tasted bitter. This suggests the potential for analyzing food reviews on online platforms to detect food hazards, enabling government agencies, food manufacturers, and distributors to manage consumer food safety risks. This study proposes a classification model that uses sentiment analysis and large language models to analyze food reviews and detect negative ones, multi-labeling key food safety hazards (food poisoning, spoilage, chemical odors, foreign objects). The sentiment analysis model effectively minimized the misclassification of negative reviews with a low False Positive rate using a 'funnel' model. The multi-labeling model for food safety hazards showed high performance with both recall and accuracy over 96% when using GPT-4 Turbo compared to GPT-3.5. Government agencies, food manufacturers, and distributors can use the proposed model to monitor consumer reviews in real-time, detect potential food safety issues early, and manage risks. Such a system can protect corporate brand reputation, enhance consumer protection, and ultimately improve consumer health and safety.

최근 온라인 플랫폼에서 구입한 육회를 섭취한 후 식중독 증상을 호소하거나 방울토마토에서 쓴맛이 난다는 리뷰가 뉴스에 등장한 사례가 있다. 이것은 정부 기관, 식품 제조업체나 유통업체가 온라인 플랫폼의 식품 리뷰를 분석하여 식품 위해를 탐지함으로써 소비자 식품안전 위험을 관리할 수 있음을 시사한다. 본 연구는 감성분석과 대형 언어 모델을 활용하여 식품 리뷰를 분석하고, 부정적인 리뷰를 탐지하여 주요 식품안전 위해(식중독, 변질, 화학적 이취, 이물질)를 다중 라벨링하는 분류 모델을 제안한다. 감성 분류 모델에서는 'funnel' 모델이 낮은 False Positive 비율로 부정 리뷰의 오분류 가능성을 최소화하는 데 효과적이었다. 식품안전 위해 다중 라벨링 모델은 GPT-3.5 보다 GPT-4 Turbo를 활용한 것이 재현율과 정확도 모두 96% 이상으로 높은 성능을 보였다. 정부 기관, 식품 제조업체나 유통업체는 제안된 모델을 사용하여 소비자 리뷰를 실시간으로 모니터링하고, 잠재적인 식품안전 문제를 조기에 탐지함으로써 위험을 관리할 수 있다. 이와 같은 시스템은 기업의 브랜드 평판을 보호하고, 소비자 보호를 강화하며, 궁극적으로는 소비자의 건강과 안전을 증진시키는 결과를 가져올 수 있다.

Keywords

Acknowledgement

본 연구는 정부(식품의약품안전처)의 출연연구사업 지원을 받아 수행된 연구임(과제고유번호 : KMDF-RnD 21163수입안517-1)

References

  1. 식품안전정보원. (2022). 부정.불량식품 소비자신고 동향보고서.
  2. 이상아, 장한솔, 백연미, 박수지, & 신효필. (2020). A small-scale Korean-specific BERT language model. Journal of KIISE, 47(7), 682-692. https://doi.org/10.5626/JOK.2020.47.7.682
  3. 안정국 & 김희웅. (2015). 집단지성을 이용한 한글 감성어 사전 구축. 지능정보연구, 21(2), 49-67. https://doi.org/10.13088/jiis.2015.21.2.49
  4. 소진수 & 신판섭. (2020). 음식점 리뷰 감성분석을 통한 세부 평가항목별 평점 예측. 한국컴퓨터정보학회논문지, 25(6), 81-89.
  5. 최혜선 & 연규필. (2022). A case study on text analysis using meal kit product review data. 한국콘텐츠학회논문지, 22(5), 1-14. https://doi.org/10.5392/JKCA.2022.22.05.001
  6. 최준영 & 임희석. (2020). 자연어처리 모델을 이용한 이커머스 데이터 기반 감성 분석 모델 구축. 한국융합학회논문지, 11(11), 33-39. https://doi.org/10.15207/JKCS.2020.11.11.033
  7. 정재윤, 모경현, 서승완, 김창엽, 김해동, & 강필성. (2018). 워드 임베딩과 단어 네트워크분석을 활용한 비지도학습 기반의 문서 다중범주 가중치 산출. 대한산업공학회지, 44(6), 442-451. https://doi.org/10.7232/JKIIE.2018.44.6.442
  8. Shin Bee, Ryu Sohee, Kim Yongjun, & Kim Dongwhan.(2022). Analysis on review data of restaurants in Google Maps through text mining: Focusing on sentiment analysis. Journal of Multimedia Information System, 9(1), 61-68. https://doi.org/10.33851/JMIS.2022.9.1.61
  9. M. I. Hossain Junaid, F. Hossain, U. S. Upal, A. Tameem, A. Kashim and A. Fahmin, "Bangla Food Review Sentimental Analysis using Machine Learning," 2022 IEEE 12th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 2022, pp. 0347-0353, doi: 10.1109/CCWC54503.2022.9720761.
  10. N. Islam, N. Akter and A. Sattar, "Sentiment Analysis on Food Review using Machine Learning Approach," 2021 International Conference on Artificial Intelligence and Smart Systems (ICAIS), Coimbatore, India, 2021, pp. 157-164, doi: 10.1109/ICAIS50930.2021.9395874.
  11. 정민경, 권지윤, 이재우, 이유나, & 이새봄. (2021). 텍스트마이닝을 활용한 식품유통 플랫폼에 대한 소비자 인식 분석 - 토픽모델링 기법을 중심으로. 외식경영연구, 24, 71-100. https://doi.org/10.47584/jfm.2021.24.7.71
  12. 백세희, 김세형, 배미란, & 강주영. (2022). 제주시의 지속가능한 여행 활성화를 위한 지역화폐 '탐나는전' 가맹점의 리뷰 데이터 분석. 한국빅데이터학회 학회지, 7(2), 113-128. https://doi.org/10.36498/KBIGDT.2022.7.2.113
  13. Tang, T., Tang, X., & Yuan, T. (2020). Fine-tuning BERT for multi-label sentiment analysis in unbalanced code-switching text. IEEE Access, 8, 193248-193256.
  14. 노동훈, 민재옥, & 우소연. (2024). 특허상담자동분류의 성능 향상 방안 연구: 트랜스포머 기반 인공지능 모델 버트(BERT)를 활용. 지식재산연구, 19(1), 159-177. https://doi.org/10.34122/jip.2024.19.1.7
  15. 이원민, & 온병원. (2021). 감성 및 감정 단어 마스킹 기반 BERT와 GPT 파이프라인 방식을 통한 감정 문장 생성. 한국정보기술학회논문지, 19(9), 29-40. https://doi.org/10.14801/jkiit.2021.19.9.29
  16. Peskine, Y., Korencic, D., Grubisic, I., Papotti, P., Troncy, R., & Rosso, P. (2023). Definitions matter: Guiding GPT for multi-label classification. Findings of the Association for Computational Linguistics: EMNLP 2023, pp. 4054-4063. https://doi.org/10.18653/v1/2023.findingsemnlp.267
  17. Yang, S., Shang, Z., Wang, Y., Deng, D., Chen, H., Cheng, Q., & Wu, X. (2024). Data-free multi-label image recognition via LLM-powered prompt tuning. arXiv preprint arXiv:2403.01209.
  18. 서혜진, & 신정아. (2020). 딥러닝을 활용한 감정 분석 과정에서 필요한 데이터 전처리 및 형태 변형. 영어학, 20, 42-63.
  19. https://github.com/kiyoungkim1/LMkor/blob/main/README.md
  20. Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805v2. https://doi.org/10.48550/arXiv.1810.04805