On the Way to Gentle AI Counselor: Politeness Cause Elicitation and Intensity Tagging in Code-mixed H inglish Conversations for Social Good (2024)

Abstract: Politeness is a multifaceted concept influenced by individual perceptions of what is considered polite or impolite. With this objective, we introduce a novel task - Politeness Cause Elicitation and Intensity Tagging (PCEIT). This task focuses on conversations and aims to identify the underlying reasons behind the use of politeness and gauge the degree of politeness conveyed. To address this objective, we create HING-POEM, a new conversational dataset in Hinglish (a blend of Hindi and English) for mental health and legal counseling of crime victims. The rationale for the domain selection lies in the paramount importance of politeness in mental health and legal counseling of crime victims to ensure a compassionate and cordial atmosphere for them. We enrich the HING-POEM dataset by annotating it with politeness labels, politeness causal spans, and intensity values at the level of individual utterances. In the context of the introduced PCEIT task, we present PAANTH (Politeness CAuse ElicitAion and INtensity Tagging in Hinglish), a comprehensive framework based on Contextual Enhanced Attentive Convolution Transformer. We conduct extensive quantitative and qualitative evaluations to establish the effectiveness of our proposed approach using the newly constructed dataset. Our approach is compared against state-of-the-art baselines, and these analyses help demonstrate the superiority of our method.

## introduction crime is a severe social problem causing tremendous pain to victims. the world health organization (who) estimates that globally about onethird of the women and one billion children aged 2-17 have been subjected to some form of crime in their lifetime @xcite however, victims are often discouraged from seeking support due to impolite (2) polite (3) neutral (0) polite (2) [i appreciate that you shared your struggles with us. it takes courage to open and seek support. if you could provide some information about the incident you're talking about, we would be able to help you in a better way.] [i've been struggling with depression after that incident and it's been affecting my daily life.] [i can understand your hesitation and frustration. it's completely valid to question whether someone can understand your experiences. but i can listen and try to help and support you. could you please share your problem?] [i don't know why should i even bother opening up to you. you can't understand what i'm going through.] self-disclosure @xcite , acquainted perpetrators @xcite , fear of revenge @xcite , and social stigma about victimization and support-seeking @xcite . to tackle this overwhelming problem, recently, there has been an emerging interest in building conversational agents (or chatbots) that can extend support to the victims @xcite . in order to develop effective and interactive counseling systems that can be easily integrated with human experts, it is crucial to comprehend the victim's social and cognitive behavioral aspects. politeness exhibits socially and cognitively-desirable behavior. the incorporation of politeness in interactions makes the victims feel respected, validated, and more willing to engage in the counseling process, ultimately promoting their healing and well-being @xcite . also, in order to identify how to best avoid negative thought patterns and maladaptive behavior, it is crucial to recognize not just the polite/impolite behavior but also the factor(s) or trigger(s) that contribute to that behavior and the intensity of that behavior during interaction. this allows for a more comprehensive understanding of the individual's emotional and mental state as well as communication dynamics, facilitating a tailored approach to counseling and promoting positive therapeutic outcomes. for conversational systems to emulate intelligent behavior, they must not only be potent enough to identify politeness but also possess the ability to comprehend it in its entirety. with this objective in mind, we progress beyond the scope of politeness identification and introduce a novel task-politeness cause elicitation and intensity tagging (pceit) in conversations. pceit aims to analyze the politeness, the underlying politeness cause(s)/factor(s) that lead individuals to employ polite or impolite behaviors and the extent to which polite or impolite language or behaviors are used during conversation. to illustrate, we depict a dialogue snippet between the victim and the agent in figure 1 . in the second turn of the dialogue snippet, the agent discerns the victim's hesitation and frustration. this discernment suggests that the victim harbors a concern that the agent may not fully comprehend the intricacies of their situation. consequently, the agent behaves politely by acknowledging and validating the victim's feelings and extending support. the extraction of politeness causal spans enables the agent to respond with empathy, understanding, or reassurance as and when needed while ensuring an appropriate level of politeness. this eventually helps in establishing trust, validating the victim's emotional and mental state, and encouraging open communication, thereby enabling a more productive relationship. studies have shown that code-mixing enables more natural and engaging conversations among multilingual users @xcite . given the limited availability of codemixed counseling conversational datasets, we present a novel and meticulously curated counseling conversational dataset in the code-mixed hinglish language. we extend poem @xcite ) -a counseling conversational dataset for mental health and legal counseling of crime victims by refurbishing its english text into code-mixed hinglish embodiment. we name this dataset hing-poem. poem dataset lacks politeness cause and intensity information; hence, we annotate hing-poem with politeness causal span and intensity information along with the politeness label. to address the task of pceit in conversations, we propose a paanth foot_0 (politeness cause elicitaion and intensity tagging in hinglish) -a contextual enhanced attentive convolution transformer (ce-act)-based framework. the system leverages the utterance-level politeness information for which the causes are to be extracted and intensity is to be predicted. in summary, our contributions are five-fold: (i) we propose politeness cause elicitation and intensity tagging (pceit) in conversations -a novel task that aims at analyzing the cause(s) that contribute to the use of polite/impolite behavior and the degree of polite/impolite behavior exhibited during a conversation; (ii) we extend an existing counseling conversational dataset, to curate hing-poem, a novel dataset containing conversations between the victim and the counseling agent in code-mixed hinglish language; (iii) we annotate hing-poem with politeness label, politeness cause(s) and politeness intensity value at the utterance level; (iv) we develop a contextual enhanced attentive convolution transformer (ceact)-based framework for the pceit task in conversations; (v) we carry out extensive quantitative and qualitative analysis to prove the efficacy of the proposed approach. societal implications and reproducibility. the chatbots for mental health and legal support of the victims offer a potential solution by engaging effectively with victims and comprehending their needs for the overall development of society. our present research focuses on the dialogue understanding module within mental health and legal conversational systems. the ongoing research in the mental health and legal domain for crime victims could leverage this work and enhance chatbots' ability to better comprehend counseling conversations and better emulate human-like behavior. the resources will be made available upon request to aid future research. ## related work in recent times, conversational system research for social good applications like healthcare @xcite , education @xcite , charity donation @xcite , legal aid @xcite , etc. have attracted significant attention from the natural language processing (nlp) community. given the escalating demand to combat crimes against women and children to meet the sustainable development goals (sdgs) 2030 @xcite , a few research emphasize the need for initiating research on conversational systems for supporting crime victims @xcite @xcite . these systems are predominantly rule-based, which limits their scalability and generalizability. in order to help victims feel ready to access professional support, a convincing approach is demanded @xcite . the use of polite language displays a cordial and credible impression of the system, which helps in achieving positive outcomes during counseling @xcite @xcite @xcite . in the past, a few studies developed computational approaches for identifying politeness in text @xcite @xcite . lately, computational methods for automatic detection of politeness in conversations have been proposed to enable the conversational system to effectively adapt to the ongoing conversation and generate responses according to users' situation @xcite @xcite . likewise, @xcite introduced a politeness and emotion-annotated dialogue corpus and proposed a multi-task framework for detecting politeness and emotion simultaneously. all these existing politeness studies are in english. the extensive utilization of social media has driven progress in studying code-mixed languages for a range of nlp tasks, including emotion detection @xcite , sarcasm detection @xcite , and sentiment analysis @xcite , among others @xcite @xcite . there have been a handful of works that focus on politeness and its related cues, like emotion @xcite in other languages @xcite @xcite @xcite . however, politeness research in code-mixed settings remains unexplored. in a nutshell, our research pioneers the explo-ration of politeness cause elicitation and intensity tagging in code-mixed hinglish conversations for mental health and legal counseling of crime victims. ## dataset to promote the research and development of a code-mixed dialogue agent for a social good application containing code-mixed hinglish (combining hindi with english) conversations, we create hing-poem dataset. this dataset is developed utilizing the existing dialogue dataset poem @xcite ) by transforming its monolingual (english) utterances into code-mixed (hinglish) manifestations. to the best of our knowledge, no largescale code-mixed dataset is available to facilitate research in this direction. ## methodology in this section, we outline the problem statement and subsequently delve into a comprehensive discussion of the proposed methodology. problem formulation. given a dialogue @xmath0, u 2 , ..., u n } consisting of a sequence of n utterances, where u @xmath1, w i2 , ..., w im } (m representing the word count in utterance u t ). let @xmath2, p 2 , ..., p n }, denote the utterance-level politeness in the dialogue d. for a target utterance u t , the pceit task objective is to detect the politeness label, extract all possible causal spans, and identify the politeness intensity for the given politeness p t . proposed approach. in this section, we outline the various elements comprising our proposed approach for politeness cause elicitation and intensity tagging (pceit) within code-mixed hinglish conversations. the architecture of our approach is presented in figure 2 . contextual character embedding. initially, we employ the sentencepiece tokenizer @xcite to tokenize utterances. given the complexities of code-mixed data like hinglish where out-of-vocabulary (oov) words are common, the standard pre-trained embeddings might not perform well @xcite . hence, we adopt a hybrid strategy to generate embeddings, which combines character embeddings and contextdependent word embeddings. for character-level features in code-mixed utterances, we utilize a convolutional neural network (cnn) followed by max pooling to capture effective text representations and local dependencies at both word and sub-word levels @xcite . for context-dependent word embeddings, we employ a fusion of elmo @xcite and @xcite embeddings. contextual enhanced attentive convolution transformer (ceact). we introduce ceact to enhance the integration of context within input phrases, and entrans -an enhanced attention mechanism that replaces the conventional selfattention in the transformer encoder @xcite . the process involves two primary steps: token contribution computation and token pruning. the forward propagation mechanism of entrans is shown in figure 2 . for clarity, we explain the operations using a single-head entrans. importantly, we compute the attention map before token contribution to guide our approach of incorporating pre-pruning of key and value in the proposed entrans. to assess the combined impact of tokens arranged by columns or rows, we exploit the distributive nature of the vector inner product, thereby minimizing computational complexity effectively. consider q i and k j as tokens in query (@xmath3, respectively, where n and m denote the dimensions of the query and key vectors. the recalibrated scores for row and column vectors denoted by sco r and sco c , respectively, are outlined as: token pruning involves computing contribution scores, denoted as sco @xmath4, which ranks rows and columns based on their contribution levels. subsequently, the rows and columns with the highest scores are selected, while the remaining ones are discarded. in our experimental setup, the number of selected rows or columns, represented as n h (a hyper-parameter), is established as the square root of n as ind @xmath5: the reconfiguration of k and v is determined by @xmath6,indc] and @xmath7,indc] . the process of selecting rows or columns is facilitated by employing the contribution scores along with argmax and [: n h ] to identify the indices ranking at the top. to effectively boost attention, we leverage a gated linear unit (glu) in conjunction with a convolutional layer for input representation following @xcite . to optimize computational efficiency, we replace the standard convolution with a lighter version @xcite that incorporates linear layers and depth-wise convolution. the convolutional output is then linearly combined with the output from entrans, and self-attention is subsequently applied to this combined representation. this integration of sources allows the model to capture intricate relationships and patterns in the data more effectively. auto-encoder. to better grasp emotional nuances within the input text, we use context-free-grammar-noun-adjective-pairs (context free anp) to extract adjective-noun pairs from the utterances. this approach enables the model to identify textual concepts effectively. the anp features extracted through context-free anp are then input into an auto-encoder to generate a latent representa- penalty. we introduce a penalty value into the system to enhance token prediction. this is intended to improve the model's ability to grasp the relationship between various labels and the input utterance. incorporating this penalty into the loss function is driven by the complexity of defining a clear decision boundary for token markers in tasks involving information extraction. the uncertainty surrounding this boundary can make it challenging for a standard softmax/sigmoid classifier to precisely distinguish between different classes, which might result in misclassification of certain instances. the original equations representing softmax and sigmoid are as follows: here, l @xmath8, while b s indicates the batch size. moreover, b i and b j correspond to the biases, and @xmath9. to tackle the challenge of establishing a decision boundary for token markers in information extraction tasks, the insightface loss technique @xcite offers a solution by normalizing the feature l i and weight matrix w. it evaluates the similarity of features based on the angle difference between them. to expedite feature convergence, a penalty value v is introduced to the angle θ in the loss function. this adjustment applies to both softmax and sigmoid and is expressed in the following manner: in the context provided, θ denotes the angle between the weight matrix w and the feature l i , while a represents the amplifier function. the equation exp a(cos(θ+v)) is employed to compute the similarity score for the positive sample, and exp a(cos(θ)) is used for the negative samples' similarity score. the inclusion of the penalty value v introduces a margin to the classification boundary, enhancing the feature's convergence rate. training and inference. we outline the process of training our model and explain how to make predictions for politeness cause and intensity. our model is trained in an end-to-end fashion using four different loss functions. reconstruction loss. the aim is to bring the structures of label features and adjective-noun pair features into alignment within the learned latent space using an autoencoder. this autoencoder is responsible for reconstructing adjective-noun pair features and generating latent features while retaining politeness-related information. the optimization of autoencoder parameters involves minimizing a loss function that quantifies the similarity between the autoencoder's input and output. this loss function is defined as ## results and analysis qualitative analysis. we conduct a comprehensive analysis of the predictions made by different systems. consider the examples presented in ablation study. as shown in ## conclusion this study introduces a novel task titled "politeness cause elicitation and intensity tagging" (pceit) in hinglish conversations. to address this, we present the hing-poem dataset, a novel codemixed conversational data for mental health and legal counseling involving crime victims. leveraging the capabilities of the bloomz, we generate code-mixed dialogues with in-context few-shot examples. we annotate the dataset at the utterance level to include politeness, the causes of politeness, and the intensity of politeness. to identify politeness along with its underlying causal span(s) and intensity, we design paanth, a framework built upon a contextual enhanced attentive convolution transformer. notably, the paanth is the first task-specific system tailored to address the pceit task within conversational settings. to underscore the effectiveness of our approach, we benchmark it against various state-of-the-art baselines.