T ech SSN 3 at S em E val-2025 Task 9: Food Hazard and Product Detection - Category Identification and Vector Prediction (2025)

Abstract: Food safety is a critical global concern, and timely detection of food-related hazards is essential for public health and economic stability. The automated detection of food hazards from textual data can enhance food safety monitoring by enabling early identification of potential risks. In the Food Hazard Detection task, we address two key challenges: (ST1) food hazard-category and product-category classification and (ST2) food hazard and product vector detection. For ST1, we employ BertForSequenceClassification, leveraging its powerful contextual understanding for accurate food hazard classification. For ST2, we utilize a Random Forest Classifier, which effectively captures patterns in the extracted features for food hazard and product vector detection. This paper presents the results of the TechSSN3 team at SemEval-2025 Food Hazard Detection Task .

## introduction food safety is a critical global concern, as contaminated food products can lead to widespread health risks, economic losses, and damage to consumer trust. identifying food hazards early is essential for preventing outbreaks and ensuring regulatory compliance. traditionally, food safety monitoring relies on manual inspection, regulatory reporting, and consumer complaints. however, these methods are slow, labor-intensive, and reactive rather than proactive. with the increasing availability of food-related incident reports on the web, there is an urgent need for automated systems that can detect food hazards from unstructured textual data. the semeval-2025 food hazard detection task @xcite aims to tackle these challenges by evaluating explainable classification models for food-incident reports. this task consists of two subtasks: (st1) food hazard and product category classification, and (st2) food hazard and product vector detection, which aims to identify the exact hazard-product associations. the task focuses on enhancing nlp-based hazard detection models for english-language reports, ensuring their effectiveness for regulatory and industrial applications. we approach each subtask with methods best suited to their objectives. for st1, we use bert-forsequenceclassification to leverage contextual embeddings for accurate classification of food hazard and product categories. for st2, a random forest classifier is applied to engineered features to detect hazard-product associations, providing robustness and interpretability in relational modeling. ## related work the integration of machine learning (ml) with food hazard detection has been extensively explored, leveraging technologies such as spectroscopy, chromatography, mass spectrometry, and biosensors to identify potential contaminants. ml enhances the accuracy and efficiency of hazard detection by analyzing complex patterns in food composition, enabling real-time identification of chemical, biological, and physical hazards. recent advancements include rfid (radio-frequency identification)-based contamination sensing @xcite , where ultra-highfrequency (uhf) rfid tags detect signal variations caused by contaminants, with ml models like xgboost (azmi and baliga, 2020) achieving high accuracy. additionally, ml-driven food hazard detection systems utilize cross-media data sources, including government reports, news, and social media, to identify emerging risks. techniques such as semantic topic modeling and event detection further improve early warning systems. despite these advancements, challenges persist in handling data variability, adapting models to detect novel hazards, and ensuring real-world applicability across different regulatory and geographical contexts. moreover, integrating domain expertise with automated hazard detection remains crucial for refining model predictions and reducing false positives, ensuring the reliability of ml-based food safety monitoring systems. ## background the semeval-2025 food hazard detection task focuses on extracting and classifying food safety incidents from textual data. the task is designed to improve the automated detection of food hazards in real-world reports, supporting early warning systems and regulatory monitoring. it is divided into two subtasks: the semeval-2025 food hazard detection dataset provided for this task consists of 5,082 labeled samples for training, covering food hazard incidents in english. an additional 565 samples were provided as validation data, followed by 997 test samples for final evaluation. the dataset contains structured and unstructured data relevant to food safety incidents. it includes 'year', 'month', 'day', and 'country' for temporal and geographical context. the 'title' and 'text' describe incidents, serving as inputs for classification.the dataset features 10 unique hazard categories (e.g., biological, chemical, foreign bodies) and 22 unique product categories (e.g., meat, egg and dairy products, prepared dishes and snacks, cereals and bakery products). additionally, the hazard and product columns specify the exact contaminant (e.g., escherichia coli, listeria monocytogenes) and affected item (ground beef, hot dogs). figure 1 illustrates the frequency distribution of food hazard categories. figure 2 depicts the frequency distribution of food product categories. our participation focused on both subtasks (st1 and st2) to develop a comprehensive system capable of handling hazard and product category classification and precise vector detection. ## system overview this section outlines the approach taken for the semeval-2025 food hazard detection task, highlighting the key methodologies, models, and techniques used. it covers the data preprocessing, feature extraction, model selection, and training strategies used to optimize performance across both subtasks. ## experimental setup the experimental setup section outlines the key tools, libraries, and evaluation strategies used to develop and assess our food hazard detection models. the results subsection presents the performance outcomes, highlighting the impact of our approach on food hazard classification and product detection. ## results we conducted multiple submissions to evaluate different modeling approaches for food hazard and product category classification. submission 1 utilized a support vector machine (svm) @xcite model. submission 2 employed bertforsequenceclassification with both 'text' and 'title' (bert-tt) as input features. submission 3 also used bertforsequence-classification but considered only 'text' (bert1-t) as the input feature. submission 4 experimented with bertforsequenceclassification while increasing the learning rate (bert2-t), using 'text' as the sole input feature. ## limitations our approach utilizes bert-based models for classification but may face challenges in capturing intricate contextual relationships, particularly when dealing with implicit references or specialized terminology. the computational demands of finetuning bert and training random forest on large datasets can be significant, making real-time deployment in low-resource settings difficult. additionally, while the dataset is well-structured for this task, real-world food safety reports often contain noisy, ambiguous, or incomplete information. the model's ability to generalize to such unstructured or multilingual data remains an area for future exploration.