Halal or Not, A Novel GNN Model for Predicting Cultural Appropriateness of Everyday Products

We present HaCKG, a novel GNN model for analyzing ingredients of everyday products to predict their cultural availability, e.g. predicting whether food or cosmetics meet halal or vegan criteria. HaCKG is developed by NS Lab, CUK, based on pure PyTorch backend.

LiteralKG Architecture
The overall architecture of LiteralKG.

The growing demand for halal cosmetic products has exposed significant challenges, especially in Muslimmajority countries. Recently, various machine learning-based strategies, e.g., image-based methods, have shown remarkable success in predicting the halal status of cosmetics. However, these methods mainly focus on analyzing the discrete and specific ingredients within separate cosmetics, which ignore the high-order and complex relations between cosmetics and ingredients. To address this problem, we propose a halal cosmetic recommendation framework, namely HaCKG, that leverages a knowledge graph of cosmetics and their ingredients to explicitly model and capture the relationships between cosmetics and their components. By representing cosmetics and ingredients as entities within the knowledge graph, HaCKG effectively learns the high-order and complex relations between entities, offering a robust method for predicting halal status. Specifically, we first construct a cosmetic knowledge graph representing the relations between various cosmetics, ingredients, and their properties. We then propose a pre-trained relational graph attention network model with residual connections to learn the structural relation between entities in the knowledge graph. The pre-trained model is then fine-tuned on downstream cosmetic data to predict halal status. Extensive experiments on the cosmetic dataset over halal prediction tasks demonstrate the superiority of our model over state-of-the-art baselines.

A short description of HaCKG:

  • We construct a cosmetic knowledge graph that represents the natural relations between cosmetic products, ingredients, and the ingredient’s properties. The knowledge graph then can serve as a fundamental tool for our model to learn cosmetic relations and predict the halal status.
  • The main core of HaCKG is a pre-trained residual Graph Attention Network (r-GAT) that incorporates residual connections to capture relationships between entities in the cosmetic knowledge graph effectively in the context of Self-Supervised Learning. The pre-training strategy enables r-GAT to learn the structural relationships among cosmetics, ingredients, and their properties without relying on label information.
  • We conduct extensive experiments on halal cosmetic product datasets. The significant improvements demonstrate the superiority of our proposed model compared to state-of-the-art baselines.

The HaCKG is available at:

  • GitHub
  • arXiv
  • DOI

Cite “HaCKG” as:

Please cite our paper if you find HaCKG useful in your work:

@Article{Hoang2023,
  author  = {Van Thuy Hoang and Tien-Bach-Thanh Do and Jinho Seo and Seung Charlie Kim and Luong Vuong Nguyen and Duong Nguyen Minh Huy and Hyeon-Ju Jeon and O-Joun Lee},
  title   = {Halal or Not: Knowledge Graph Completion for Predicting Cultural Appropriateness of Daily Products},
  journal = {IEEE Access},
  year    = {2025},
  volume  = {},
  pages   = {},
  month   = jan,
  issn    = {2169-3536},
  doi     = {10.1109/ACCESS.2025.3528488},
}

:page_facing_up::woman_technologist::bookmark_tabs::label::black_nib:

Contributors: