Interpreting Neural Networks to Improve Politeness Comprehension

Malika Aubakirova, Mohit Bansal

Abstract

While Convolutional Neural Networks (CNNs) have significantly advanced natural language processing, their "black box" nature often obscures the linguistic patterns they leverage. This paper demonstrates that CNNs not only outperform traditional feature-based models in predicting politeness but also serve as instruments for linguistic discovery. By employing visualization techniques such as activation clustering, saliency heatmaps, and embedding space transformations, the authors reveal that neural models can automatically rediscover established linguistic theories and identify novel politeness markers, such as specific uses of indefinite pronouns and punctuation.

Introduction

Politeness is a fundamental yet subtle aspect of human interaction, characterized by context-dependency and social nuance. Historically, computational approaches to politeness relied on manual "feature engineering," where researchers identified specific linguistic markers—like "please" or "could you"—based on established social science theories. While effective, this approach is limited by theoretical biases and the difficulty of capturing the full complexity of natural language.

Neural networks offer a promising alternative by learning features directly from data. However, their lack of interpretability has hindered their adoption in fields like sociolinguistics, where understanding the why is as important as the what. This research addresses this gap by developing interpretable methods to peek inside the CNN "black box" during politeness classification tasks.

Methods and Interpretability Techniques

The researchers utilized a standard Convolutional Neural Network (CNN) architecture. The model processes raw text through a convolutional layer with varying filter sizes to capture n-grams of different lengths, followed by max-over-time pooling and a softmax classification layer.

To interpret the model's internal logic, three primary strategies were employed:

  1. Activation Clustering: By identifying sentences that maximally activate specific neurons, the authors found that certain neurons "specialize" in recognizing specific linguistic strategies, such as gratitude or deference.
  2. First Derivative Saliency: This technique calculates the gradient of the model's output with respect to input word embeddings. The resulting heatmaps highlight which words most significantly influenced the model's classification of a sentence as polite or impolite.
  3. Embedding Space Transformations: Using Principal Component Analysis (PCA), the authors visualized how word embeddings shifted in vector space during training.
Saliency heatmaps illustrating how the CNN identifies influential words for politeness classification.

Linguistic Discovery

The CNN's internal representations revealed a fascinating alignment with human linguistic theory. Without prior instruction, the model automatically identified strategies like "Deference" (e.g., "nice work so far") and "Direct Questions" (often associated with lower politeness).

Beyond rediscovery, the model uncovered novel strategies previously overlooked in computational linguistics:

  • Indefinite Pronouns: Words like "something" or "somebody" (e.g., "Am I missing something?") emerged as strong indicators of specific impolite questioning styles.
  • Punctuation Patterns: The use of multiple question marks ("???") or ellipses ("...") was identified as a significant marker of verbal emotion and impoliteness in online communities.
PCA visualization showing the transformation of word embeddings before (red) and after (blue) training, highlighting the learned polarity of politeness markers.

Results and Validation

The CNN consistently outperformed baseline models on two distinct datasets: Wikipedia talk pages and Stack Exchange requests. On the Wikipedia dataset, the CNN achieved 85.8% accuracy, surpassing the best feature-based model (82.6%).

To validate the CNN's "discoveries," the authors added the newly identified markers (indefinite pronouns and punctuation) as features to a traditional, non-neural model. This led to a significant performance boost for the traditional model (from 82.6% to 83.8%), narrowing the gap with the CNN and providing quantitative evidence that the neural network had indeed learned meaningful, generalizable linguistic patterns.

Conclusion

This work demonstrates that neural networks are not merely high-performance classifiers but can also function as powerful tools for social science research. By making these models interpretable, researchers can move beyond "black box" predictions to gain deeper insights into the mechanics of human communication. Future work will look to extend these techniques to more complex architectures and broader social NLP tasks such as sarcasm and irony detection.

Summary updated

BibTeX
@inproceedings{aubakirova2016interpreting,
  author = {Malika Aubakirova and Mohit Bansal},
  title = {{Interpreting Neural Networks to Improve Politeness Comprehension}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  doi = {10.18653/v1/d16-1216},
}
Figure