A Hybrid Transformer–Ontology Framework for Halal Food Classification Using Multilingual Ingredient Label Analysis
DOI:
https://doi.org/10.47852/bonviewJCCE62029040Keywords:
multilingual transformer, halal food classification, domain adaptation, semantic reasoning, halal ingredient ontologyAbstract
Ensuring halal compliance within global food supply chains has become increasingly challenging due to multilingual ingredient labeling, ambiguous additive terminology, and heterogeneous sourcing practices. Existing rule-based systems or sequential machine learning models have limited capacity to resolve semantic ambiguity, address cross-lingual variation, and meet the interpretability requirements imposed by halal certification authorities. A hybrid neural–symbolic classification framework is proposed that integrates a multilingual transformer-based semantic encoder (XLM-R) with ontology-driven lexical reasoning for automated halal ingredient assessment. The proposed architecture leverages contextual embeddings learned from Malay, Arabic, and English ingredient descriptions, while a structured halal ontology encodes domain knowledge on ingredient origin, permissibility, and confidence levels. A probabilistic fusion mechanism combines transformer prediction scores with weighted ontological evidence to produce confidenceaware classifications into halal, haram, and syubhah categories. An experimental evaluation was conducted on a dataset of 10,000 product records using an 80:20 stratified train-test split. The proposed XLM-R + Ontology model achieves consistently superior performance, achieving overall accuracy of 0.81–1.00, recall of 0.90–1.00, and macro-averaged F1 of 0.85–0.90, outperforming Naive Bayes, support vector machine, and LSTM baselines. The hybrid framework demonstrates substantial improvements in detecting ambiguous syubhah cases and low-resource haram indicators, which remain problematic for conventional classifiers. Attention-based interpretability and performance attribution analyses indicate that integrating contextual semantic learning with structured symbolic knowledge enhances both reliability and transparency. These findings underscore the effectiveness of hybrid neural-symbolic architectures for multilingual, domain-specific food classification and support deployment in consumer-oriented digital platforms.
Received: 8 January 2026 | Revised: 27 April 2026 | Accepted: 18 May 2026
The authors declare that they have no conflicts of interest to this work.
Data Availability Statement
The data that support the findings of this study are openly available at https://doi.org/10.5281/zenodo.19173858.
Author Contribution Statement
Mohd Azmi Al Betar: Conceptualization, Methodology, Supervision. Noorrezam Yusop: Conceptualization, Methodology, Software, Formal analysis, Resources, Writing – original draft, Writing – review & editing, Project administration. Tao Hai: Methodology, Validation, Software, Supervision, Project administration, Investigation. Nor Aiza Moketar: Validation, Formal analysis, Writing – review & editing. Nuridawati Mustafa: Investigation. Mohd Nazrien Zaraini: Software, Data curation, Resources. Massila Kamalrudin: Supervision.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Authors

This work is licensed under a Creative Commons Attribution 4.0 International License.
How to Cite
Funding data
-
Universiti Teknikal Malaysia Melaka
Grant numbers URMG-AJMAN/2024/ FTMK/A00070