Anastasia at S em E val-2025 Task 9: Subtask 1, Ensemble Learning with Data Augmentation and Focal Loss for Food Risk Classification. (2025)

Abstract: Our approach for the SemEval-2025 Task 9: Subtask 1, The Food Hazard Detection Challenge showcases a robust ensemble learning methodology designed to classify food hazards and associated products from incident report titles. By incorporating advanced data augmentation techniques, we significantly enhanced model generalization and addressed class imbalance through the application of focal loss. This strategic combination led to our team securing the Top 1 position, achieving an impressive score of 0.8223, underscoring the strength of our solution in improving classification performance for food safety risk assessment.

## introduction food safety is a growing global concern, with foodrelated hazards posing risks to public health and the economy. identifying and categorizing these hazards from online incident reports is crucial for early detection and prevention. the semeval-2025 task 9, subtask 1 @xcite addresses this issue by evaluating ai models for classifying food hazards and associated products based on web-sourced report titles. this task presents challenges such as handling imbalanced data, ensuring model explainability, and improving classification accuracy to support automated food risk monitoring systems. our approach to this task involved employing an ensemble learning method that integrates multiple bert @xcite models, including roberta-large @xcite and @xcite , trained with various data augmentation strategies. to address the class imbalance commonly found in food hazard classification tasks, we fine-tuned these models using focal loss @xcite . this approach not only helped improve performance but also ensured our system's ability to generalize well across diverse hazard categories. by leveraging both lightweight and intensive data augmentation techniques, we crafted a solution that maintained high accuracy while prioritizing transparency, which is essential in explainable ai. you can access our system's code through the following github repository: semeval-task9-the-food-hazard-detection-challenge-2025. ## related work food safety risk classification is crucial for protecting public health and ensuring regulatory compliance. traditional approaches relied on rule-based systems and expert knowledge, but advances in machine learning and natural language processing have significantly improved classification accuracy and scalability. @xcite introduced a deep learning framework that incorporates categorical embeddings to predict food safety risks using european union data. their model demonstrated high accuracy in predicting product categories, hazard types, and appropriate actions, laying the foundation for large-scale food safety classification using neural architectures. @xcite proposed cicle, a conformal in-context learning approach for large-scale multi-class food risk classification. by integrating conformal prediction, cicle provides reliable uncertainty estimates, enhancing decision-making in high-risk scenarios. additionally, they introduced a dataset of 7,546 labeled food recall announcements, serving as a benchmark for future studies. recent advances in ai-driven text classification have demonstrated significant potential in regulatory and news analysis. @xcite conducted an empirical study utilizing large language models (llms) to classify requirements-related provisions in food safety regulations. in a related effort, @xcite proposed a hierarchical transformer-based model for food safety news classification, addressing the challenge of longtext processing. morever, @xcite used bert to detect unsafe food reports in amazon reviews, linking them to fda recalls @xcite @xcite . their model achieved an f1 score of 0.74 and identified potential underreporting of food safety issues. similarly, @xcite reviewed machine learning applications in food safety, highlighting improvements in monitoring, detection, and prediction. these studies collectively demonstrate the progress in food risk classification. building upon this foundation, our work explores strategies to enhance both classification accuracy and explainability, with a focus on real-world applicability. ## system description we performed exploratory data analysis @xcite and discovered that the data suffers from severe class imbalance. to address this issue, we augmented the data by creating multiple different datasets and chunking them into various sizes. we trained different variants of bert models using focal loss to mitigate the impact of the imbalance in the classes. to further improve performance, we applied an ensemble method using soft voting on the probabilities of each label, combining the results from multiple models to optimize accuracy and minimize classification errors. ## conclusion in summary, we presented an ensemble-based approach for the food hazard detection task in se-meval 2025 task 9, subtask 1. by combining deberta-v3-large and roberta-large models with data augmentation and focal loss, we achieved a top performance with a macro f1 score of 0.8223. our results highlight the importance of model ensembling, data augmentation, and addressing class imbalance for multi-class classification tasks. future work will focus on improving the model's ability to distinguish between similar hazard types by incorporating advanced techniques such as retrieval-augmented generation (rag) @xcite , which combines information retrieval and generation to enhance context and reduce ambiguity. additionally, we plan to explore few-shot learning and gan-based data augmentation @xcite to generate more realistic data, addressing class imbalance and boosting performance with limited labeled data. these methods are expected to improve model generalization and enhance its ability to handle complex hazard detection tasks.