Fake hadith detection using semantic similarity analysis in natural language processing for mobile application
DOI:
https://doi.org/10.55573/JISED.118863Keywords:
Fake Hadith Detection, Natural Language Processing, Semantic Similarity, CAMelBERTAbstract
The widespread dissemination of fabricated (mawdhu) Hadiths through social media and digital platforms poses a significant challenge to the Muslim community, as misattributed narrations can mislead believers and distort Islamic teachings. This project presents HadithGuard, an AI powered mobile application designed to detect fake Hadiths using Natural Language Processing (NLP) techniques. The system addresses the limitation of existing manual verification methods, which require specialised Islamic scholarship and are inaccessible to the general public.To achieve this, a fake Hadith detection model was developed by fine-tuning the CAMeLBERT Arabic language model on a balanced dataset comprising 7,008 authentic Hadiths from Sahih al-Bukhari and 2,048 fabricated Hadiths from the MAHADDAT corpus. A semantic similarity engine using the paraphrase-multilingual-MiniLM-L12-v2 SentenceTransformer model was also implemented to compare user input against the full Sahih al-Bukhari reference database via cosine similarity. The hybrid decision system combines both classification confidence and similarity score to produce a final verdict of Authentic, Likely Fake, or Uncertain. The model was trained over three epochs achieving a final test accuracy of 96.83% and a macro F1-score of 0.98, with precision and recall of 0.98–0.99 across both classes. The system was deployed as a REST API on Hugging Face Spaces and integrated into a Flutter mobile application supported by Firebase Authentication and Cloud Firestore. Functional testing confirmed all features operate correctly. Key limitations include short-text misclassification and single-source similarity matching, which are recommended for future improvement through multi-corpus expansion and offline model deployment.
Downloads
References
Alayba, A. M. (2025). Arabic Natural Language Processing (NLP): A Comprehensive Review of Challenges, Techniques, and Emerging Trends. In Computers (Vol. 14, Issue 11). Multidisciplinary Digital Publishing Institute (MDPI). https://doi.org/10.3390/computers14110497
Alghamdi, J., Albukhari, A., & Al-Dala’in, T. (2025). Pretrained Models Against Traditional Machine Learning for Detecting Fake Hadith. Electronics (Switzerland), 14(17). https://doi.org/10.3390/electronics14173484
Antoun, W., Baly, F., & Hajj, H. (2020). AraBERT: Transformer-based Model for Arabic Language Understanding. In Proceedings of the 4th Workshop on Open-Source Arabic Corpora and Processing Tools, with a Shared Task on Offensive Language Detection, pages 9–15, Marseille, France. European Language Resources Association.
Circulators on Arabic Social Media. Fernandez, A. C., Flores, I. A. R., & Estrella, A. L. P. (2024). Agile User-Centered Development of Mobile Applications: A Systematic Literature Review. Proceedings - 2024 12th International Conference in Software Engineering Research and Innovation, CONISOFT https://doi.org/10.1109/CONISOFT63288.2024.00012 2024, 1–10.
Gaanoun, K., & Alsuhaibani, M. (2022). Fabricated Hadith Detection: A Novel Matn Based Approach With Transformer Language Models. IEEE Access, 10, 113330–113342. https://doi.org/10.1109/ACCESS.2022.3217457
Haque, F., Orthy, A. H., & Siddique, S. (2020, October 7). Hadith Authenticity Prediction using Sentiment Analysis and Machine Learning. 14th IEEE International Conference on Application of Information and Communication Technologies, AICT 2020 https://doi.org/10.1109/AICT50176.2020.9368569 - Proceedings.
Hsu, B. M. (2020). Comparison of supervised classification models on textual data. Mathematics, 8(5). https://doi.org/10.3390/MATH8050851
Inoue, G., Alhafni, B., Baimukan, N., Bouamor, H., & Habash, N. (n.d.). The Interplay of Variant, Size, and Task Type in Arabic Pre-trained Language Models. https://github.com/google-research/
Jasper C, J. H. (2020). Blended Agile Approach: A Mobile Application Approach. International Journal of Advanced Trends in Computer Science and Engineering, 9(1.3), 465–469. https://doi.org/10.30534/ijatcse/2020/7391.32020
Nafea, A. A., Muayad, M. S., Majeed, R. R., Ali, A., Bashaddadh, O. M., Khalaf, M. A., Sami, A. B. N., & Steiti, A. (2024). A Brief Review on Preprocessing Text in Arabic Language Dataset: Techniques and Challenges. Babylonian Journal of Artificial Intelligence, 2024, 46–53. https://doi.org/10.58496/bjai/2024/007
Opitz, J., Möller, L., Michail, A., Padó, S., & Clematide, S. (2025). Interpretable Text Embeddings and Text Similarity Explanation: A Survey. http://arxiv.org/abs/2502.14862
Patidar, A., & Suman, U. (2025). iALBMAD: an improved agile-based layered approach for mobile app development. Automated Software Engineering, 32(2). https://doi.org/10.1007/s10515-025-00520-w
Rahman, N. A., Rafhan Syamil, F. I. M., & bin Rodzman, S. B. (2020). Development of mobile application for Malay translated hadith search engine. Indonesian Journal of Electrical Engineering and Computer Science, 20(2), 932–938. https://doi.org/10.11591/ijeecs.v20.i2.pp932-938
Refaee, E. A. (2022). Detecting Hadith Authenticity Using a Deep-learning Approach. Scientific Journal of King Faisal University Basic and Applied Sciences, 23(1), 80–84. https://doi.org/10.37575/b/sci/210084
Sani, Dr. A., & Abdulmumini, M. D. (2025). The Role of Artificial Intelligence (AI) and Digital Technology in Authenticating and Preserving Hadith Literature. Middle East Journal of Islamic Studies and Culture, 5(02), 122–129. https://doi.org/10.36348/mejisc.2025.v05i02.002
Suhaili, N., Fauzi, B. N., Hoque, M., Kadir, K. A., Quran, F. P., & Sunnah, D. (2022). Spreading Hadith Maudhu’ Via Information And Communication Technology: Reasons And Suggestions. 7(1), 2550–1488. https://doi.org/10.26438/ijcse/v5i10.35135










