Speaker Verification in Agent-generated Conversations (2024)

Abstract: The recent success of large language models (LLMs) has attracted widespread interest to develop role-playing conversational agents personalized to the characteristics and styles of different speakers to enhance their abilities to perform both general and special purpose dialogue tasks. However, the ability to personalize the generated utterances to speakers, whether conducted by human or LLM, has not been well studied. To bridge this gap, our study introduces a novel evaluation challenge: speaker verification in agent-generated conversations, which aimed to verify whether two sets of utterances originate from the same speaker. To this end, we assemble a large dataset collection encompassing thousands of speakers and their utterances. We also develop and evaluate speaker verification models under experiment setups. We further utilize the speaker verification models to evaluate the personalization abilities of LLM-based role-playing models. Comprehensive experiments suggest that the current role-playing models fail in accurately mimicking speakers, primarily due to their inherent linguistic characteristics.

## introduction the recent advances in large language models (llms) have significantly increased the capabilities of conversational ai to solve challenging dialogue problems @xcite @xcite @xcite . in particular, llm-based role-playing chatbots have been developed to simulate speakers of different personal attributes and linguistic styles so as to provide more immersive interaction with users @xcite . nevertheless, there is a lack of study on how well the agent-generated utterances are personalized according to the target characters/speakers. conventional evaluations of * work was done during a visit at smu. following previous research that highlights the significant influence of topic on style identification @xcite , we have designed our evaluation to control for conversation setting by introducing three levels of difficulty: base, where the two sets of utterances may come from different conversation contexts and thus easier to distinguish; hard, where utterances are from the same conversation context; and harder, where utterances are from the same conversation. this approach allows us to isolate the impact of conversation topic on speaker verification accuracy. moreover, our experiment design includes diverse testing scenarios of different degrees of exposure to speakers and utterances, corresponding to different applications. our extensive experiment results show that neither non-experts nor the chatgpt are able to perform speaker verification accurately, highlighting both the challenges and the limitations of current evaluation. in contrast, our proposed fine-tuned models demonstrate the ability to differentiate between speakers effectively, and thus the potential to evaluate the ability of role-playing agents personalizing utterances to speakers. despite the poorer performance at the harder level, we argue that the topic should also be considered in speaker verification processes, as it reflects the speaker's personal topic preference. for example, when agents simulate harry potter, the topic should be around the wizarding world, reflecting his magical background. in contrast, the topic for simulating sheldon cooper, a physicist, may focus on theoretical physics, highlighting their distinct backgrounds and interests. moreover, we utilize the developed speaker verification models to evaluate how well agentgenerated utterances could preserve the personal identity of the speakers. we expect that the utterances generated by the role-playing model should closely mirror the style and persona of the speaker being simulated, while also demonstrating clear differentiation from other speakers, including the model itself. to evaluate these two aspects, we introduce two metrics: (a) simulation score, which evaluates the alignment of agent-generated utterances with actual utterances from the target speaker, and (b) distinction score, which measures the differences among utterances generated by the same agent model when simulating various speakers. moreover, we visualize the similarity distributions estimated by speaker verification models. the separability between similarity distributions of positive and negative pairs serves as an indicator of the model's simulation proficiency. our analyses reveal that llms, whether prompted or specifically fine-tuned, generally struggle to simulate the style or personal characteristics of a target speaker. furthermore, the limited variability in utterances generated by the same role-playing model for different speakers points to an inherent linguistic consistency within these llms. this consistency limits the models' ability to significantly alter their linguistic style when tasked for diverse speakers. we summarize our contributions as follows: the structure of our paper is organized as follows: after introducing related work (section 2), we first construct a dataset for the task of speaker verification in conversations (section 3). we then test the performance on this task by humans and by chatgpt (section 4). observing that neither humans nor llms can perform well, we design several speaker verification models and evaluate their performance on the dataset we have constructed (section 5). finally, we use our trained speaker verification model to evaluate several existing roleplaying models (section 6). our code and data are available for public access to facilitate further research. foot_0 2 related work ## data collection in this section, we describe the datasets we construct for training and evaluating our speaker verification models. recall that our goal is to identify whether two sets of utterances belong to the same speaker, including the speaker's utterances generated by role-playing agents. therefore, we adopt the conversations from films, television series, and literary fiction as characters from these sources are commonly employed in the development and evaluation of role-playing agents. the conversations included in our datasets are sourced from: cornell movie dialogues. this is a large collection of fictional conversations extracted from raw movie scripts friends. this is a conversational dataset from the 'friends' tv sitcom, with 3,107 scenes and 67,373 utterances among 700 characters @xcite . harry potter. this is a conversation corpus derived from the transcripts of the harry potter movie series foot_1 and the harry potter dialogue dataset @xcite the big bang theory. this is a conversation corpus from the 'the big bang theory' transcripts foot_2 , covering 2,191 scenes with 1,966,215 utterances. in addition to the linguistic style, we also believe that personal characteristics are valuable for speaker verification. therefore, we choose the following conversation datasets that discuss about personal traits: multiple sessions conversation. this is a longterm conversation dataset including multiple sessions, where participants share their personal characteristics such as interests @xcite . we treat multiple sessions as distinct conversations from the same speaker. annomi this dataset comprises therapy conversations between clients and counselors, selected for its inclusion of discussions on clients' personal traits. our approach centers on client verification and segments the entire counseling dialogues into multiple sessions according to different stages of the counseling process. following the framework of authorship verification @xcite @xcite , we construct our datasets by pairing sets of utterances. these pairs are labeled 'positive' when both sets of utterances originate from the same speaker, and 'negative' otherwise. to balance the labeled data and to prevent overfitting, we maintain an equal number of positive and negative labeled utterance set pairs. we first split the speakers into seen and unseen ensuring no overlapping speakers between the two sets. subsequently, we create pairs of utterance sets among these two speaker sets. pairs of utterance sets from the unseen speakers form the unseen-unseen test set. we further divide pairs of utterance sets from seen speakers into three subsets: training set, seen-seen test set and seen-unseen test set . the seen-seen test set comprises pairs of utterance sets that were both included in the training set, although they are paired differently. the seen-unseen test set consists of pairs such that each pair combines an utterance set from the training set with another utterance set not in the training set. this approach yields three test sets that vary based on whether the speakers or utterances have been encountered in the training dataset. the performance of the seen-seen setting is considered to represent the upper bound of speaker verification models as it benefits from well-trained utterance representations. only the seen-unseen setting has adopted in speech-based speaker verification and author attribution research, which tests the model's ability to verify known speakers in novel conversations. in contrast, our primary emphasis is on the unseen-unseen test set, which evaluates the model's adaptability to completely new speakers. moreover, we categorize the test sets based on the source of speakers in negative pairs. the neg-ative pairs in base level consist of two speakers comes from different sources, such as pairs consists of utterances from hermione granger (from harry potter) and utterances from sheldon cooper (from the big bang theory). the hard level introduces a coarse-grained topic control, ensuring negative pairs consist of utterances from speakers within the same source. for example, a negative pair may consist of hermione granger and ron weasley, who are both characters within the harry potter universe. furthermore, the harder level intensifies the topic control by resticting negative pairs solely from utterances of different speakers within the same conversation, such as pairing utterances from hermione granger with those of ron weasley in the same conversation. these categorization isolates the impact of conversation topic on the speaker verification which similar to the setting in authorship attribution @xcite . the data statistics and more detailed processing are detailed in appendix a. ## speaker verification by human and llms speaker verification requires the ability to identify personal traits and linguistic styles. llm's performance on such an intricate and nuanced task has been not studied much so far @xcite . consequently, we want to assess the performance of llms and humans (non-experts) in speaker verification tasks first. given that neither humans nor llms undergo training in this study, we create two types of samples categorized into two complexity levels: 'conversation' and 'utterances'. the 'conversation' option provides human/llm with pairs of dialogues, offering context that could reveal more detailed information, such as names. the 'utterances' option on the other hand presents only pair of utterance sets following our speaker verification task definition. each option comprises 200 pairs randomly selected from our unseen-unseen test set. we engage ten human annotators, who are nonexperts, to assess whether pairs of conversations or sets of utterances are from the same speaker. for chatgpt (utilizing gpt-3.5-turbo-1106), we examine its performance under zero-shot, chain-of-thought @xcite , and few-shot paradigms. the detailed setup can be found in appendix d ## evaluating role-playing agents after verifying the effectiveness of our speaker verification models, we employ these models to evaluate the performance of several role-playing conversational agents. ## conclusion in this work, we define the task of speaker verification in conversation and compile a dataset from a variety of sources, including thousands of speakers, to construct a reliable speaker verification system. our investigation reveals that both non-expert users and chatgpt cannot distinguish the speakers based on utterances. through extensive experimentation, we develop and evaluate various speaker verification models, such as style-based, authorship attribution, and specifically fine-tuned models. our fine-tuned models exhibit promising performance even when applied on completely unseen speakers verification. additionally, we employ our models to evaluate current llm-based role-playing agent models by the proposed simulation score and distinction score metrics. the low simulation score shows that the current role-playing agents fail to preserve personal characteristic in generated utterances while the low distinction score indicates these agent models may have their built-in characteristics that persists when playing different roles. the findings highlight that existing roleplaying models may struggle to overcome their built-in characteristics and convincingly imitate actual speaker for immersive conversations.