Application of integrated gradients explainability to sociopsychological semantic markers
Ali Aghababaei, Jan Nikadon, Magdalena Formanowicz, Maria Laura Bettinsoli, Carmen Cervone, Caterina Suitner, Tomaso Erseghe
TL;DR
The paper addresses explainability for sociopsychological textual markers beyond sentiment by applying word-level Integrated Gradients (IG) to transformer-based agency classifiers. It systematically benchmarks IG against Sequential IG, DeepLIFT, and GradientSHAP, analyzes baseline and step-size effects, and validates with a RoBERTa-based agency predictor (BERTAgent). A rendering pipeline aligned with SpaCy and negation handling translates attributions into readable word-level cues, and a small-dataset, overfitting strategy reveals salient keywords to characterize classes, supporting dictionary expansion. Across multiple datasets, IG reliably highlights agentic terms and demonstrates practical utility for sociopsychology and communication strategy in both data-rich and data-scarce settings, with mathematical grounding in attribution as $F(x)-F(x_0)$ computed via $N$ steps along a path from baseline $x_0$ to input $x$.
Abstract
Classification of textual data in terms of sentiment, or more nuanced sociopsychological markers (e.g., agency), is now a popular approach commonly applied at the sentence level. In this paper, we exploit the integrated gradient (IG) method to capture the classification output at the word level, revealing which words actually contribute to the classification process. This approach improves explainability and provides in-depth insights into the text. We focus on sociopsychological markers beyond sentiment and investigate how to effectively train IG in agency, one of the very few markers for which a verified deep learning classifier, BERTAgent, is currently available. Performance and system parameters are carefully tested, alternatives to the IG approach are evaluated, and the usefulness of the result is verified in a relevant application scenario. The method is also applied in a scenario where only a small labeled dataset is available, with the aim of exploiting IG to identify the salient words that contribute to building the different classes that relate to relevant sociopsychological markers. To achieve this, an uncommon training procedure that encourages overfitting is employed to enhance the distinctiveness of each class. The results are analyzed through the lens of social psychology, offering valuable insights.
