Manuscript Offprint

arXiv:2610.13797

REFLECT: Role-Aware Detection of Sentiment, Emotion, Politeness, and Formality

Sangpil Youm, Annabel Stocks Natalias, Hayden Heninger, Leah Jones, Xiaoyang Jin, Xiaoya Zhang, Bonnie Dorr

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Detecting communicative meaning in dialogue requires modeling not only lexical content but also the participant-role structures through which sentiment, emotion, politeness, and formality (SEPF) are expressed. Existing approaches rely on contextual language representations while leaving semantic roles implicit. We introduce a role-aware transformer architecture that maps the four SEPF dimensions to theory-grounded Semantic Role Labeling (SRL) configurations, incorporating these configurations directly into the transformer's self-attention mechanism. Role-aware attention models non-directional internal states (sentiment and emotion), while directional role-aware attention captures initiator-to-recipient relations for external cues (politeness and formality). The resulting role-aware representations are fused with contextual embeddings through a learned gate that adaptively weights how much role information each input contributes, rather than appending semantic roles as an auxiliary feature vector. Across four benchmark datasets, the framework yields statistically reliable gains over strong BERT-based baselines for emotion, politeness, and formality, with gains concentrated in theoretically predicted cases such as low-frequency, complex emotions and highly polite expressions; sentiment improvements are marginal and non-significant, suggesting that sentiment is conveyed more through lexical choice than participant-role structure. Additional evaluation on real-world data demonstrates that the framework improves both predictive performance and model traceability. These results demonstrate that linguistically grounded modifications to transformer self-attention improve the detection of communicative meaning, generalize beyond benchmark datasets to real-world mental-health data, and yield traceable, role-grounded explanations that extend beyond predictive performance to interpretability.

Introduction

Linguistic signals of internal states (e.g., sentiment, emotion) and external cues (e.g., politeness, formality) are often expressed through relational interaction patterns. Accurately understanding communication requires modeling these structures. Prior work in psychology, sociolinguistics, and communication theories examines these phenomena through constructs such as affective valence (Russell 1980), basic emotion categories (Ekman and Friesen 1971), politeness strategies (Brown and Levinson 1978), and interpersonal formality (Heylighen and Dewaele 1999). These theories characterize participant roles as central to understanding these dimensions; however, computational models of these dimensions largely do not.

In NLP, these tasks are typically addressed by fine-tuning models using lexical features alone, treating sentiment, emotion, politeness, and formality (SEPF) as separate surface-level classification problems. (See Figure 1(a).) When additional features are incorporated, they are typically added through auxiliary concatenation without theory-grounded principles guiding which semantic-role information to incorporate, motivating the question of whether explicitly modeling participant roles improves detection of internal states (sentiment, emotion) and external cues (politeness, formality). These two groups differ fundamentally: internal states describe properties of a single participant, whereas external cues arise from relationships between participants.

(a) Lexical view cue words scored independently

Figure

(b) Role-aware view directional interaction between participants (politeness)

ARG0 → ARG2 (+ ARGM mitigation)

Figure

Figure 1: Lexical and role-aware are compared using a politeness example. Lexical approaches score cue words (e.g., “Could,” “possibly”), leaving participant structure implicit. REFLECT models the interaction from initiator (ARG0) to recipient (ARG2), with mitigation modifiers (ARGM) softening the directive. Here, a politeness score (3.49) is predicted.

Semantic role labeling (SRL) captures participant relations through structured representations of who did what to whom. These representations support downstream NLP tasks such as question answering (He, Lewis, and Zettlemoyer 2015), summarization (Genest and Lapalme 2011),

Copyright © 2027, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved.

cross-lingual SRL projection (Youm et al. 2024), and stance detection (Mather et al. 2021). In Figure 1(b), SRL assigns ARG0 to the initiator (“you”), ARG1 to the object being sent (“the link”), and ARG2 to the recipient (“me”) in the utterance “Could you possibly send me the link?” This structure supports role-based reasoning, e.g., “Who is being asked to send the link?” is answered by identifying ARG0 as you.

Building on this role-aware perspective, REFLECT represents each utterance along three relational dimensions: who is speaking, what is being discussed, and who is being addressed. In Figure 1, “you” is the speaker, “the link” is the subject of the request, and “me” is the recipient. REFLECT incorporates the corresponding role configurations into transformer self-attention and fuses the resulting role-aware and contextual representations through a learned gate.

This architecture differs from SemBERT (Zhang et al. 2020), which encodes semantic-role labels as embeddings and concatenates them with BERT-derived contextual word representations. In contrast, REFLECT injects role information directly into a role-aware self-attention mechanism that determines which roles are most relevant to each prediction. Because modern SRL models automatically assign semantic roles, REFLECT requires no manual role annotation, enabling scalable enrichment of existing datasets.

The contributions of this work are as follows:

  1. Theory-grounded role-aware framework: A linguistically grounded mapping that associates sentiment, emotion, politeness, and formality (SEPF) with semantic-role configurations derived from established communication theories, treating SRL as a theory-driven representation rather than a generic feature set.

  2. Role-aware transformer architecture: Complementary role-aware and directional role-aware attention mechanisms that integrate semantic-role configurations directly into transformer self-attention and fuse them with contextual representations through a learned gate, allowing role information to influence contextualization rather than appending it as an auxiliary feature.

  3. Benchmark and real-world evaluation: A comprehensive evaluation across benchmark datasets together with an applicability study on real-world mental-health dialogue, demonstrating improved detection of communicative meaning and yielding traceable, role-grounded explanations without sacrificing predictive performance.

Across four benchmark datasets, REFLECT outperforms strong BERT-based baselines for emotion, politeness, and formality, with largest gains in theoretically predicted cases such as low-frequency emotions and highly polite expressions. The framework incorporates interpretable semantic-role representations without sacrificing predictive performance, improving on transformer baselines across settings.

References (47)

  • Interpreting Neural Networks to Improve Politeness Comprehension
  • Sentiment analysis about E-commerce from tweets using decision tree, K-nearest neighbor, and naive bayes
  • PolitePEER: does peer review hurt? A dataset to gauge politeness intensity in the peer reviews
  • Enriching Word Vectors with Subword Information
  • Universals in language usage: Politeness phenomena
  • Can I Trust the Explainer? Verifying Post-hoc Explanatory Methods
  • Using a heterogeneous dataset for emotion analysis in text
  • Frustrated, Polite, or Formal: Quantifying Feelings and Tone in Email
  • A computational approach to politeness with application to social factors
  • Graph Induced Transformer Network for Detection of Politeness and Formality in Text
  • Detecting Text Formality: A Study of Text Classification Approaches
  • GoEmotions: A Dataset of Fine-Grained Emotions
  • BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
  • Constants across cultures in the face and emotion
  • Capacity of generative AI to interpret human emotions from visual and textual data: pilot evaluation study
  • Framework for Abstractive Summarization using Text-to-Text Generation
  • Comparing Styles across Languages
  • Question-Answer Driven Semantic Role Labeling: Using Natural Language to Annotate Natural Language
  • DeBERTa: Decoding-enhanced BERT with Disentangled Attention
  • Leo Apostel
  • Towards faithfully interpretable NLP systems: How should we define and evaluate faithfulness? In Proceedings of the 58th annual meeting of the association for computational linguistics, 4198–4205
  • Analyzing the performance of sentiment analysis using BERT, DistilBERT, and RoBERTa
  • Optimization of Sentiment Analysis using BERT. In 2024 International Conference on Communication, Computer Sciences and Engineering (IC3SE), 1000–1004
  • Deep learning for affective computing:
  • Studying politeness across cultures using English Twitter and Mandarin Weibo
  • RoBERTa: A Robustly Optimized BERT Pretraining Approach
  • Sentiment analysis methods, applications, and challenges: A systematic literature review
  • A general framework for domain-specialization of stance detection: a COVID-19 response use case
  • Predicting Politeness Variations in Goal-Oriented Conversations
  • Sentiment analysis using machine learning approaches
  • Deep Contextualized Word Representations
  • Circumplex models of personality and emotions
  • A multi-task learning framework for politeness and emotion detection in dialogues for mental health counselling and legal aid
  • Language models are unsupervised multitask learners
  • Comparison of Naive Bayes and SVM Algorithm based on sentiment analysis using review dataset
  • Dear Sir or Madam, May I Introduce the GYAFC Dataset: Corpus, Benchmarks and Metrics for Formality Style Transfer
  • Why Should I Trust You?
  • Textual Emotion Detection with complementary BERT transformers in a Condorcet's Jury Theorem assembly
  • A circumplex model of affect
  • Emotion and sentiment analysis from Twitter text
  • Automatic classification of documents by formality
  • An effective approach for emotion detection in multimedia text data using sequence based convolutional neural network
  • Multilingual Universal Sentence Encoder for Semantic Retrieval
  • Revisiting Semantic Role Labeling: Efficient Structured Inference with Dependency-Informed Analysis (opens arXiv in a new tab)
  • DAHRS: Divergence-Aware Hallucination-Remediated SRL Projection
  • Sentiment analysis in the era of large language models: A reality check
  • Semantics-aware BERT for language understanding