Explainable AI in Email Detection: From Black-Box to Trustworthy Models
摘要
The professional and educational sectors are facing a significant issue that affects both career and academic paths. Important emails can appear in the spam folder despite the absence of typical spam indicators, while messages containing such indicators can still reach the inbox. Although various machine learning and deep learning models have achieved strong performance in email classification, a key challenge remains: these models lack explainability in their decisions, which undermines user trust in such black box systems. The objective of this work is to analyze and explain which features influence a deep learning model’s decision in classifying emails as spam or ham. We employ the BERT model, a state-of-the-art transformer, which achieves high performance by capturing complex contextual relationships between words. Using Shapley values, we provide explainability both globally, to identify the most influential words across the dataset, and locally, to show each word’s contribution within individual emails.