A Hybrid Transformer–Ontology Framework for Halal Food Classification Using Multilingual Ingredient Label Analysis

Authors

  • Mohd Azmi Al Betar Artificial Intelligence Research Centre, Ajman University, United Arab Emirates
  • Noorrezam Yusop Department of Software Engineering, Universiti Teknikal Malaysia Melaka, Malaysia https://orcid.org/0000-0001-9846-8864
  • Tao Hai Artificial Intelligence Research Centre, Ajman University, United Arab Emirates https://orcid.org/0000-0002-6156-1974
  • Nor Aiza Moketar Department of Software Engineering, Universiti Teknikal Malaysia Melaka, Malaysia
  • Nuridawati Mustafa Department of Software Engineering, Universiti Teknikal Malaysia Melaka, Malaysia https://orcid.org/0000-0002-4247-2255
  • Mohd Nazrien Zaraini Department of Computer System and Communication, Universiti Teknikal Malaysia Melaka, Malaysia https://orcid.org/0009-0006-2898-6272
  • Massila Kamalrudin Department of Software Engineering, Universiti Teknikal Malaysia Melaka, Malaysia https://orcid.org/0000-0003-4804-2042

DOI:

https://doi.org/10.47852/bonviewJCCE62029040

Keywords:

multilingual transformer, halal food classification, domain adaptation, semantic reasoning, halal ingredient ontology

Abstract

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



Conflicts of Interest

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

2026-07-24

Issue

Section

Research Articles

How to Cite

Al Betar, M. A., Yusop, N., Hai, T., Moketar, N. A., Mustafa, N., Zaraini, M. N., & Kamalrudin, M. (2026). A Hybrid Transformer–Ontology Framework for Halal Food Classification Using Multilingual Ingredient Label Analysis. Journal of Computational and Cognitive Engineering. https://doi.org/10.47852/bonviewJCCE62029040

Funding data