Automation of Halal Food Classification Using Bidirectional Long Short-term Memory on Ingredients List
DOI:
https://doi.org/10.15575/kjrt.v3i2.1774Keywords:
BiLSTM, Deep Learning, food ingredient list, halal classification, halal food detection, NLP, word embeddingAbstract
The global demand for halal food products continues to increase, particularly among Muslim consumers, necessitating an efficient and accurate halal classification system. This study proposes a deep learning-based automatic classification approach using Bidirectional Long Short-Term Memory (BiLSTM) to determine the halal or haram status of a product based on its ingredient list. The system utilizes comprehensive text preprocessing techniques such as normalization, stopword removal, and dictionary-based term mapping. Word representations are converted into dense semantic vectors using word embeddings such as Word2Vec and GloVe. A BiLSTM model is used to capture bidirectional contextual relationships in ingredient sequences, thereby enhancing semantic understanding. Testing results on a dataset of 3,979 samples show that the proposed model achieves a classification accuracy of 99.75%, outperforming traditional machine learning methods such as Naive Bayes and SVM. The system is proven effective in handling ingredient ambiguity and context-based classification, and has potential for real-world applications such as mobile-based halal scanners. Future research can adopt attention mechanisms and transform-based models to improve performance and interpretability.
References
[1] United Nations, “Sustainable Development Goals (SDGs) 2030,” sdgs.un.org. Accessed: May 12, 2025. [Online]. Available: https://sdgs.un.org
[2] D. Khairani, D. A. Bangkit, N. F. Rozi, S. U. Masruroh, S. Oktaviana, and T. Rosyadi, “Named-Entity Recognition and Optical Character Recognition for Detecting Halal Food Ingredients: Indonesian Case Study,” in 2022 10th International Conference on Cyber and IT Service Management (CITSM), IEEE, Sep. 2022, pp. 01–05. doi: 10.1109/CITSM56380.2022.9935966.
[3] S. Tarannum, Md. S. Jalal, and M. N. Huda, “HALALCheck: A Multi-Faceted Approach for Intelligent Halal Packaged Food Recognition and Analysis,” IEEE Access, vol. 12, pp. 28462–28474, 2024, doi: 10.1109/ACCESS.2024.3367983.
[4] Y. I. P. Basuki and B. Sjabadhyni, “Halal awareness as a moderator between halal certification and consumer intention to buy skincare through e-commerce,” The Journal of Religion and Communication Studies, vol. 1, no. 2, pp. 103–113, 2024.
[5] M. Kartiwi, T. S. Gunawan, A. Anwar, and S. S. Fathurohmah, “Mobile Application for Halal Food Ingredients Identification using Optical Character Recognition,” in 2018 IEEE 5th International Conference on Smart Instrumentation, Measurement and Application (ICSIMA), IEEE, Nov. 2018, pp. 1–4. doi: 10.1109/ICSIMA.2018.8688756.
[6] E. P. Bagundang and Ma. R. R. Gallo, “Machine Learning-Based Halal Classification System for Food Ingredients,” in 2025 International Conference on Information Technology Research and Innovation (ICITRI), IEEE, Sep. 2025, pp. 1–5. doi: 10.1109/ICITRI67507.2025.11233090.
[7] E. P. Bagundang and C. B. Rael, “Halal Food Prediction Using Long Short-Term Memory Neural Networks,” in 2024 7th International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), IEEE, Dec. 2024, pp. 74–78. doi: 10.1109/ISRITI64779.2024.10963526.
[8] A. Al-Qerem, M. Raja, S. Taqatqa, and M. R. A. Sara, “Utilizing Deep Learning Models (RNN, LSTM, CNN-LSTM, and Bi-LSTM) for Arabic Text Classification,” 2024, pp. 287–301. doi: 10.1007/978-3-031-43490-7_22.
[9] J. Li, “Legal information extraction and classification using BERT, Bi-LSTM, and CRF models,” Journal of Computational Methods in Sciences and Engineering, vol. 25, no. 4, pp. 3509–3522, Jul. 2025, doi: 10.1177/14727978251323131.
[10] U. K. Agrawal, B. V Ramana, D. Singh, and N. Panda, “Leveraging LSTM and Multinomial Naive Bayes for Nuanced Textual-Based Sentiment Analysis,” SN Comput. Sci., vol. 5, no. 8, p. 1090, Nov. 2024, doi: 10.1007/s42979-024-03463-3.
[11] J. Chen and C. Ngo, “Deep-based Ingredient Recognition for Cooking Recipe Retrieval,” in Proceedings of the 24th ACM international conference on Multimedia, New York, NY, USA: ACM, Oct. 2016, pp. 32–41. doi: 10.1145/2964284.2964315.
[12] C. Liu et al., “A New Deep Learning-Based Food Recognition System for Dietary Assessment on An Edge Computing Service Infrastructure,” IEEE Trans. Serv. Comput., vol. 11, no. 2, pp. 249–261, Mar. 2018, doi: 10.1109/TSC.2017.2662008.
[13] A. Mustapha, I. Ishak, N. N. M. Zaki, M. R. Ismail-Fitry, S. Arshad, and A. Q. Sazili, “Application of machine learning approach on halal meat authentication principle, challenges, and prospects: A review,” Heliyon, vol. 10, no. 12, p. e32189, Jun. 2024, doi: 10.1016/j.heliyon.2024.e32189.
[14] N. Yusop et al., “Recent Integrating Machine Learning and Malay-Arabic Lexical Mapping for Halal Food Classification,” International Journal of Advanced Computer Science and Applications, vol. 16, no. 10, 2025, doi: 10.14569/IJACSA.2025.0161067.
[15] T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Efficient Estimation of Word Representations in Vector Space,” Sep. 2013.
[16] S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Comput., vol. 9, no. 8, pp. 1735–1780, Nov. 1997, doi: 10.1162/neco.1997.9.8.1735.
[17] M. Schuster and K. K. Paliwal, “Bidirectional recurrent neural networks,” IEEE Transactions on Signal Processing, vol. 45, no. 11, pp. 2673–2681, 1997, doi: 10.1109/78.650093.
[18] P. Zhou et al., “Attention-Based Bidirectional Long Short-Term Memory Networks for Relation Classification,” in Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), Stroudsburg, PA, USA: Association for Computational Linguistics, 2016, pp. 207–212. doi: 10.18653/v1/P16-2034.
[19] M. Bianco, G. Ventura, C. D. Calvano, I. Losito, and T. R. I. Cataldi, “Food allergen detection by mass spectrometry: From common to novel protein ingredients,” Proteomics, vol. 23, no. 23–24, Dec. 2023, doi: 10.1002/pmic.202200427.
[20] C.-Y. Teng, Y.-R. Lin, and L. A. Adamic, “Recipe recommendation using ingredient networks,” in Proceedings of the 4th Annual ACM Web Science Conference, New York, NY, USA: ACM, Jun. 2012, pp. 298–307. doi: 10.1145/2380718.2380757.
[21] W. Min, S. Jiang, L. Liu, Y. Rui, and R. Jain, “A Survey on Food Computing,” ACM Comput. Surv., vol. 52, no. 5, pp. 1–36, Sep. 2020, doi: 10.1145/3329168.
[22] M. M. Islam, M. S. Ab Talib, and N. Muhamad, “Challenges of Halal Standards and Halal Certification for Islamic Marketing,” Muslim Business and Economic Review, vol. 2, no. 1, pp. 105–124, Jul. 2023, doi: 10.56529/mber.v2i1.156.
[23] N. Noordin, N. L. M. Noor, M. Hashim, and Z. Samicho, “Value chain of Halal certification system: A case of the Malaysia Halal industry,” in European and Mediterranean conference on information systems, The British University in Dubai UAE, 2009, pp. 1–14.
[24] M. Tieman, “The application of Halal in supply chain management: in‐depth interviews,” Journal of Islamic Marketing, vol. 2, no. 2, pp. 186–195, Jun. 2011, doi: 10.1108/17590831111139893.
[25] J. A. J. Wilson and J. Liu, “The challenges of Islamic branding: navigating emotions and halal,” Journal of Islamic Marketing, vol. 2, no. 1, pp. 28–42, Mar. 2011, doi: 10.1108/17590831111115222.
[26] P. Zhou, Z. Qi, S. Zheng, J. Xu, H. Bao, and B. Xu, “Text classification improved by integrating bidirectional LSTM with two-dimensional max pooling,” in Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, 2016, pp. 3485–3495.
[27] A. Graves and J. Schmidhuber, “Framewise phoneme classification with bidirectional LSTM and other neural network architectures,” Neural Networks, vol. 18, no. 5–6, pp. 602–610, Jul. 2005, doi: 10.1016/j.neunet.2005.06.042.
[28] D. M. W. Powers, “Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlation,” Oct. 2020.
[29] S. Xiong, W. Tian, H. Si, G. Zhang, and L. Shi, “A Survey of the Applications of Text Mining for the Food Domain,” Algorithms, vol. 17, no. 5, p. 176, Apr. 2024, doi: 10.3390/a17050176.
[30] R. Brochier, A. Guille, and J. Velcin, “Global Vectors for Node Representations,” in The World Wide Web Conference, New York, NY, USA: ACM, May 2019, pp. 2587–2593. doi: 10.1145/3308558.3313595.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Devi Mulyana, Dika Haekal Firza Pratama, Dailfhiana Fujianti, Dimas Arya Nurhakim, Daffa Rabbani

This work is licensed under a Creative Commons Attribution 4.0 International License.
You are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.