S + PAGE : A Speaker and Position-Aware Graph Neural Network Model for Emotion Recognition in Conversation (2022)

Abstract: Emotion recognition in conversation (ERC) has attracted much attention in recent years for its necessity in widespread applications. With the development of graph neural network (GNN), recent state-of-the-art ERC models mostly use GNN to embed the intrinsic structure information of a conversation into the utterance features. In this paper, we propose a novel GNN-based model for ERC, namely S+PAGE, to better capture the speaker and position-aware conversation structure information. Specifically, we add the relative positional encoding and speaker dependency encoding in the representations of edge weights and edge types respectively to acquire a more reasonable aggregation algorithm for ERC. Besides, a two-stream conversational Transformer is presented to extract both the self and inter-speaker contextual features for each utterance. Extensive experiments are conducted on four ERC benchmarks with state-of-the-art models employed as baselines for comparison, whose results demonstrate the superiority of our model.

## introduction emotion recognition in conversation (erc), which aims to identify the emotion of each utterance in a conversation, is a task arousing increasing interests in many fields. with the prevalence of social media and intelligent assistants, erc has great potential applications in several areas, such as emotional chatbots, sentiment analysis of comments in social media and healthcare intelligence, for understanding emotions in the conversation with emotion dynamics and generating emotionally coherent responses. erc problem still remains a challenge. both lexicon-based @xcite and deep learning-based (colnerič and demšar, 2018) text emotion recognition methods that treat each utterance individu- in the past few years, recurrent neural network (rnn)-based solutions, such as cmn @xcite , icon @xcite and dialoguernn @xcite , have dominated this field due to the sequential nature of conversational context. nonetheless, they share some inherent limitations: 1) rnn model performs poorly in grasping distant contextual information; 2) rnn-based methods are not capable of handling large-scale multiparty conversations. with the rise of graph neural network (gnn) @xcite in many natural language processing (nlp) tasks, researchers pay increasing attention to gnn-based erc methods recently. instead of modeling only sequential data recurrently in rnn, gnn is designed to capture all kinds of graph structure information via various aggregation algorithms. existing gnn-based erc methods, such as dialoguegcn @xcite , rgat @xcite and dag-erc @xcite , which are the state of the art, have demonstrated the superiority of gnn in modeling conversational structure information. a directed graph is constructed on each dialogue in these methods, where the nodes denote the individual utterances, and the edges indicate relationships between utterances. however, we notice that the relative position and speaker dependency information are mostly encoded together in one weight matrix according to the edge type in these methods, which can not exploit these conversation structure information sufficiently. on the other hand, these methods do not work well on modeling speaker-specific context, which is also important in the erc task. for example, in figure 1 the third utterance spoken by speaker a is more influenced by speaker a's prior utterances rather than the second utterance spoken by speaker b, even though the latter is closer. thus, in contextual modeling, we should consider both the emotional influence that speakers have on themselves during a conversation, i.e., self-speaker context, and context on the entire conversation flow, i.e., inter-speaker context, as well as the interaction between them. in this paper, we propose a novel speaker and position-aware gnn model for erc (s+page) to settle the above drawbacks of existing methods. our model contains three stages to fully consider both contextual modeling and conversation structure modeling. specifically, given a sequence of utterances in the same dialogue, we first leverage a two-stream conversational transformer (tsct) with the attentive masking mechanism to get both self and inter-speaker contextual features. then, guided by the speaker dependency, we construct a conversation graph. we propose an enhanced relational graph convolution network (r-gcn), called spgcn, to refine the contextual features with conversation structure information. particularly, we introduce relational relative positional encoding in the aggregation algorithm to make spgcn capable of capturing fine-grained positional information in a conversation. finally, the global transfer of emotion labels is modeled by a conditional random field (crf) layer with the features from both tsct and spgcn. experimental results demonstrate the superiority of our model compared with state-of-the-art models. ablation study illustrates the effectiveness of the proposed components in the model. to conclude, our contributions are as follows: ## methodology the framework of our model is shown in figure 2 . we decompose the emotion classification procedure into three stages, i.e., contextual modeling, speaker dependency modeling, and global consistency modeling. in the first stage, we present a conversation-specific transformer to get both self and inter-speaker contextual features. then, a graph neural network is proposed to refine the features with conversation structure information, including the speaker dependency and relative position of each utterance. subsequently, we employ conditional random field as the output layer to model the context of global consistency of emotion labels. ## conclusion in this paper, we propose a novel graph neural network-based model, named s+page, for emotion recognition in conversation (erc). specifically, s+page contains three parts, i.e., contextual modeling, speaker dependency modeling, and consistency modeling. in contextual modeling, we present a new transformer structure with two-stream attention mechanism to better capture the self and inter-speaker contextual features. in speaker dependency modeling, we introduce a novel gnn model, named spgcn, to refine the features with the conversation structure information including speaker dependency and relative position information. furthermore, we use a crf layer to model emotion transfer in the consistency modeling part. experimental results on four erc benchmark datasets demonstrate the superiority of our model.