Explainable AI for NLP: Enhancing Transparency in Sentiment Analysis and Named Entity Recognition
摘要
As Natural Language Processing (NLP) models grow more complex, explaining their predictions becomes increasingly challenging—particularly for tasks involving structured outputs or multilingual input. This paper introduces adaptations of three explainability methods; SHAP, LIME and Integrated Gradients; to enhance interpretability for Sentiment Analysis and Named Entity Recognition on Arabic–English code-switched data. To the best of our knowledge, this is the first work to systematically adapt these techniques for structured prediction in this language setting. We propose class-specific filtering for SHAP, a language-aware perturbation strategy for LIME, and a refined token-level IG approach (X-DIGG) for more faithful attributions. To improve accessibility, we present Explainify, an interactive tool that combines token-level visualizations with natural language summaries. A human-grounded user study and quantitative analysis demonstrate that our adaptations significantly improve interpretability across tasks.