Detecting Speaker Personas from Conversational Texts (2021)

Abstract: Personas are useful for dialogue response prediction. However, the personas used in current studies are pre-defined and hard to obtain before a conversation. To tackle this issue, we study a new task, named Speaker Persona Detection (SPD), which aims to detect speaker personas based on the plain conversational text. In this task, a best-matched persona is searched out from candidates given the conversational text. This is a many-to-many semantic matching task because both contexts and personas in SPD are composed of multiple sentences. The long-term dependency and the dynamic redundancy among these sentences increase the difficulty of this task. We build a dataset for SPD, dubbed as Persona Match on Persona-Chat (PMPC). Furthermore, we evaluate several baseline models and propose utterance-to-profile (U2P) matching networks for this task. The U2P models operate at a fine granularity which treat both contexts and personas as sets of multiple sequences. Then, each sequence pair is scored and an interpretable overall score is obtained for a context-persona pair through aggregation. Evaluation results show that the U2P models outperform their baseline counterparts significantly.

## introduction recently, human-machine conversation has achieved great success @xcite @xcite @xcite @xcite , and has been applied to various scenarios, such as customer service and conversational recommendation engine. it is well-known that a user's persona can help the machine to generate more appropriate responses. many studies investigate how to predict a response if a persona is given. @xcite ; @xcite ; @xcite built dialogue agents to perceive the user's persona and then generated personalized responses. @xcite ; @xcite ; @xcite ; @xcite ; @xcite built matching networks to select a response matching not only the conversational context, but also the user's persona. however, these personas are pre-defined and difficult to obtain before a conversation, because the speaker might not want to fill out a specific table to show its persona due to privacy issues. hence, the cold-start problem may hinder the persona-aware response prediction in practice. to tackle this issue, our intuition is that the personal information such as hobbies or occupations may be mentioned explicitly or implicitly during a conversation, which can be utilized to identify the speaker's persona. if we can get the persona from early conversations, it can be utilized for future persona-aware response prediction. motivated by this, we propose a new task, named speaker persona detection (spd), which aims to detect a speaker's persona from the plain conversational text. as illustrated in figure 1 , the agent proactively leads the conversation with a goal to collect the speaker information implicitly. through the conversation between the speaker and the agent, we can use the speaker's utterances carrying the personal information to search for a best-matched persona in the database. here, a persona description is composed of several profiles characterizing a person, which is unstructured and common in practice @xcite @xcite @xcite . then, the searched persona is utilized for follow-up personalized response generation or selection. the ability to learn speakers' personas can have wide applications in commercial chatbots, recommendation systems and other scenarios that involve conversations. for example, it can be applied to the recommendation system. speakers first talk to the intelligent agent in their smart devices for several turns. then the conversational text of the speaker is collected and utilized as a query to search for a best-matched persona description from candidates recorded in the database. finally, the user preferences linked to the best-matched persona will be recommended to the speaker for providing personalized service. in our proposed spd task, a conversation context is composed of multiple utterances and a persona is composed of multiple profiles, which brings three challenges to existing studies on matching. first, the matching in spd relies on modeling the long-term dependency among conversation utterances. second, the matching in spd is established between two sets of sentences which requires a complicated many-to-many matching framework. this has not been explored yet, as previous studies have been conducted either between a pair of sentences (i.e., one-to-one) @xcite @xcite , or between a set of sentences and a single sentence (i.e., many-to-one) @xcite @xcite . third, there exists dynamic redundancy among conversation utterances and persona profiles. specifically, the informativeness of each conversation utterance changes when inferring different profiles in a persona. besides, some utterances may carry no personal information and some profiles may not be reflected by any utterances in the conversation. a dataset is built for studying the spd task. we transform the existing persona-chat dataset @xcite by assuming that conversation sessions are given while personas are what models should predict. we name the transformed dataset persona match on persona-chat (pmpc). regarding with spd methods, context-to-persona (c2p) matching networks, which are established at a coarse granularity by concatenating two sets of sentences respectively, are employed as baselines. furthermore, we propose utterance-to-profile (u2p) matching networks which are established at a fine granularity by treating each sentence in either contexts or personas individually. they first obtain the representation for each sentence and then derive the representations of contexts and personas through an aggregation operation. in this paper, (1) sentence-encoding-based framework such as the encoder of bag-of-words (bow) @xcite , bilstm @xcite and transformer @xcite , and (2) cross-attention-based framework such as esim @xcite and (3) pretraining-based framework such as bert @xcite are considered when building either c2p and u2p models. the experimental results comparing the c2p and u2p models demonstrate the effectiveness of the latter for solving the spd task, which relies on the many-to-many matching between two sets of sentences. in addition to the performance improvement, u2p models yield interpretability by explicitly scoring each utterance-profile pair and performing the aggregation operation. in summary, our contributions in this paper are three-fold. (1) we propose a new task, speaker persona detection (spd), and construct a dataset for studying this problem, which make the first attempt to detect speaker personas from conversational texts by persona matching. (2) many baseline methods have be established for the spd task. (3) we propose u2p matching networks with a fine granularity to explore the matching between two sets of sentences, which outperform their c2p counterparts with a coarse granularity on the spd task in our experiments. we hope the task and datasets will invite more research on detecting speaker profiles from conversational texts. matching tasks matching aims at searching for a best-matched one from a list of candidates. determining the semantic matching degree or label between two pieces of text is a basic problem in many natural language understanding tasks. the existing matching or classification tasks can be generally categorized into two main categories that establish the relationship either (1) between a pair of sentences @xcite @xcite , or (2) between a set of sentences and a single sentence @xcite @xcite . we name them one-to-one and many-to-one matching in this paper. different from the studies mention above, our proposed spd task is a new many-to-many semantic matching task, whose important characteristic is that both contexts and personas are composed of multiple sentences. this discourse-level matching is challenging since the informativeness of an utterance or a profile is dynamically changing, which requires models to filter out the redundant information automatically. thus, we propose the utterance-to-profile (u2p) matching networks which are effective at filtering out less informative sentences and obtaining a more informative representation for the whole set. ## dataset creation a dataset named persona match on persona-chat (pmpc) is built for studying the spd task. luckily, our data construction can be based on an existing persona-chat dataset @xcite which is a high-quality one made available at mila and facebook ai. each dialogue in persona-chat was created by first assigning each human speaker a random persona and then asking them to chat in pair conditioned on the given personas. the personas in persona-chat are created by crowd-sourcing and modified by human. profiles in a persona co-refer to each other, and each profile describes different properties of a coherent persona. due to the natural dataset creating method, the conversational texts conditioned on the given personas can intuitively reflect characteristics of the speaker, which creates the natural matching relationship between the conversational texts and the persona of a speaker. thus, we assume that persona-chat is suitable for studying the spd task. since each dialogue in persona-chat was performed between two speakers, we can consider one of them as human speaker and the other as intelligent agent, and then exchange with each other. in this way, each dialogue in persona-chat can provide two matched context-persona pairs. two versions of personas, including original ones and revised ones were provided by persona-chat. the latter is constructed by rephrasing, generalizing, or specializing the original one. the revised version is adopted in this paper to make the spd task more challenging. the task of spd is defined as selecting a best-matched persona from a list of candidates according to the conversational texts of the speaker, as shown in figure 1 . the candidate set is composed of one correct persona and n incorrect personas, which we call distractors. the context is used as the input conversational texts for detecting speaker personas. the matched persona of the context is adopted to represent the correct persona in the candidate set. besides, n random persona distractors are chosen from the persona pool to form the complete candidate set. ## models we present the formal definition of spd as follows. given a dataset d, an example of the dataset can be represented as (c, p, y). specifically, @xmath0, u 2 , ..., u nc } represents a context with {u m } nc @xmath1. @xmath2, p 2 , ..., p np } represents a persona with {p n } np @xmath3. @xmath4, 1} denotes a label. @xmath5; otherwise, @xmath6. our goal is to learn a matching model g(c, p) from d. for any pair (c, p), g(c, p) measures the matching degree between c and p. we learn g(c, p) by minimizing its cross-entropy loss on d. let θ denote the parameters of the matching model. the objective function l(d, θ) of learning can be formulated as ## conclusion in this paper, we propose the task of speaker persona detection (spd) and build a pmpc dataset for studying this task. in spd, the matching from conversational contexts to persona candidates is established between two sets of sentences and requires a new many-to-many matching framework. thus, this paper proposes the utteranceto-profile (u2p) matching networks, which treat both contexts and personas as sets of multiple sequences. results show that the proposed u2p matching networks outperform their context-topersona (c2p) counterparts, which treat both contexts and personas as single sequences. in the future, we will explore better aggregation methods and investigate model structures for many-to-many matching.