Explainable Natural Language Processing Models using Partial Dependence Plots with Random Forests

The interpretability of natural language processing (NLP) models is needed to comprehend the decision-making, especially in the ensemble-based models, like the Random Forests. This paper will discuss how Partial Dependence Plots (PDP) can be used to measure and plot the influence of individual words on model predictions on a variety of NLP models. The datasets that were taken into consideration were multi-class topic classification (20 Newsgroups, AG News), binary sentiment analysis (IMDB, Amazon Reviews), and SMS spam detection. Random Forest classifiers were trained on TF-IDF features and PDPs were used to analyze key words that are representative of each class or sentiment. Findings indicate that words that are class specific and those that bear sentiments have high values of partial dependence, which have strong effects on the classes they are predicted to belong to, whereas generic words have moderate cross-class effects. The method gives both numerical and graphical understanding of the contribution of features, and one can easily interpret the model behavior without compromising the predictive performance. In datasets, PDPs showed consistent patterns, which indicated the generality of the approach. The results highlight that PDPs are useful to discover meaningful word-level relations, identify subtle interactions, and increase the model transparency. Having generalized the use of PDPs across several NLP domains, this work provides a viable framework of interpretable machine learning, making practitioners apply models with confidence and knowing the underlying factors that lead to the predictions. In general, the suggested methodology fills the disconnection between model performance and interpretability, which can make NLP systems more transparent and reliable.

Authors

Institutions

Publication Details

Journal
Elaris Computing Nexus
Published
2025-06-06
DOI
https://doi.org/10.65148/ecn/2025007
Citations
1
Primary Topic
Explainable Artificial Intelligence (XAI)
Type
article
Field-Weighted Citation Impact
2.48
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Explainable Natural Language Processing Models using Partial Dependence Plots with Random Forests

Anandakumar Haldorai
1 citations
Elaris Computing Nexus
Explainable Artificial Intelligence (XAI)
2.48
article

Explainable Natural Language Processing Models using Partial Dependence Plots with Random Forests

Anandakumar Haldorai
article en
1 citations

Abstract

The interpretability of natural language processing (NLP) models is needed to comprehend the decision-making, especially in the ensemble-based models, like the Random Forests. This paper will discuss how Partial Dependence Plots (PDP) can be used to measure and plot the influence of individual words on model predictions on a variety of NLP models. The datasets that were taken into consideration were multi-class topic classification (20 Newsgroups, AG News), binary sentiment analysis (IMDB, Amazon Reviews), and SMS spam detection. Random Forest classifiers were trained on TF-IDF features and PDPs were used to analyze key words that are representative of each class or sentiment. Findings indicate that words that are class specific and those that bear sentiments have high values of partial dependence, which have strong effects on the classes they are predicted to belong to, whereas generic words have moderate cross-class effects. The method gives both numerical and graphical understanding of the contribution of features, and one can easily interpret the model behavior without compromising the predictive performance. In datasets, PDPs showed consistent patterns, which indicated the generality of the approach. The results highlight that PDPs are useful to discover meaningful word-level relations, identify subtle interactions, and increase the model transparency. Having generalized the use of PDPs across several NLP domains, this work provides a viable framework of interpretable machine learning, making practitioners apply models with confidence and knowing the underlying factors that lead to the predictions. In general, the suggested methodology fills the disconnection between model performance and interpretability, which can make NLP systems more transparent and reliable.

Elaris Computing Nexus
Sri Eshwar College of Engineering
Openalex Percentile: Top 8%
Explainable Artificial Intelligence (XAI)
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Explainable Natural Language Processing Models using Partial Dependence Plots with Random Forests — Anandakumar Haldorai · Elaris Computing Nexus (2025) | TGRS Research Map | TGRS