Explainable AI for NLP Dataset Debugging

Project Overview

This research introduces X-Deep, a Human-in-the-Loop (HitL) framework for systematically debugging NLP datasets using Explainable AI (XAI) techniques. The work was published in Nature Scientific Reports, demonstrating the practical value of data-centric AI approaches.

X-Deep Framework The X-Deep framework combines human expertise with XAI techniques for systematic dataset error analysis

Key Contributions

  • Novel Framework: Designed a data-centric approach that iteratively improves datasets rather than just models
  • XAI Integration: Combined LIME and SHAP to uncover patterns in model misclassifications
  • Systematic Analysis: Identified spurious correlations, bias patterns, and other anomalies in Arabic emotion detection datasets
  • Multi-Classifier Evaluation: Analyzed misclassifications across Naive Bayes, Logistic Regression, GRU, and MARBERT

Explainable AI in Action

The framework uses LIME and SHAP to understand why models make incorrect predictions:

LIME and SHAP Analysis Example: LIME and SHAP outputs revealing how repeated words influence emotion classification

Spurious Pattern Detection Example: Detecting spurious correlations where specific words (e.g., “Olympics”) trigger incorrect labels

Impact

  • Published in Nature Scientific Reports (Impact Factor: 4.6)
  • Practical mitigation strategies for informed data collection and augmentation
  • Reproducible framework applicable to other NLP tasks beyond emotion detection

Technical Details

AspectDetails
XAI MethodsLIME, SHAP
ClassifiersNaive Bayes, Logistic Regression, GRU, MARBERT
DomainArabic emotion detection
PublicationNature Scientific Reports, 2025

Publication

“A Data Centric HitL Framework for Conducting a Systematic Error Analysis of NLP Datasets using Explainable AI”
Ahmed El-Sayed, Aly Nasr, Youssef Mohamed, Ahmed Alaaeldin, Mohab Ali, Omar Salah, Abdullatif Khalid & Shaimaa Lazem
Scientific Reports 15, 30406 (2025) | DOI: 10.1038/s41598-025-13452-y