Personalized Response Generation with Tensor Factorization (2021)

Abstract: Personalized response generation is essential for more human-like conversations. However, how to model user personalization information with no explicit user persona descriptions or demographics still remains under-investigated. To tackle the data sparsity problem and the huge number of users, we utilize tensor factorization to model users’ personalization information with their posting histories. Specifically, we introduce the personalized response embedding for all question-user pairs and form them into a three-mode tensor, decomposed by Tucker decomposition. The personalized response embedding is fed to either the decoder of an LSTM-based Seq2Seq model or a transformer language model to help generate more personalized responses. To evaluate how personalized the generated responses are, we further propose a novel ranking-based metric called Per-Hits@k which measures how likely are the generated responses come from the corresponding users. Results on a large-scale conversation dataset show that our proposed tensor factorization based models generate more personalized and higher quality responses compared to baselines.

## introduction building human-like conversational systems has received much attention in artificial intelligence communities, and personalized response generation is one essential step towards this goal, as more personalized responses are often associated with increased user engagement @xcite . to this end, we focus on the task of personalized response generation in this work, and argue that incorporating personalization into text generation can benefit many down-stream applications such as social chit-chat chatbots @xcite and auto-complete responses like smart replies @xcite . prior text generation work on modeling personalization mainly relied on explicitly given persona or demographic information. for instance, @xcite @xcite utilized a set of persona sentences to profile users, and other line of research leveraged demographics to model user personalization @xcite . despite its effectiveness, such approaches are limited when it comes to real world scenarios. first, explicit persona or demographic information is often not available. second, collecting such personalization information is usually costly and time-consuming, which also suffers from either artificially designed persona descriptions from third-party annotators or subjective and unreliable self-reports from users themselves @xcite . although such explicit personalization information is often unavailable, content that users produce is generally ubiquitous and can indicate their preferences, personal information, styles, and knowledge in a relatively implicit but objective manner. our work thus utilizes these posts and comments users made to learn latent representations of their personalization information. different generation models have been designed to learn user personalization information and further impose such representation on text generation. for instance, @xcite proposed the speaker model based on seq2seq framework by introducing trainable speaker embedding for each user and feeding it to decoder at each step of decoding. however, there are always a large number of distinct users and users often participate in only a few conversations; as a result, the speaker embedding may be under-fitted given the limited data points associated with a user. another line of research uses generative memory network @xcite , which first retrieves some most relevant responses to a user's input as the memory and then encodes them into an embedding. the difference between the embedding from memory network and speaker embedding is that the former encodes both information of question and user, while the latter represents only users. nevertheless, the set of observable question-user pairs and their responses is still a small subset of the whole user and question sets, leading to the sparsity issue. matrix factorization (mf) has been widely used to infer latent relationships between users and items in recommender systems, especially for data sparsity issues @xcite . motivated by this, we propose to model latent interactions between questions and users by looking at who participated in which conversations, and infer user personalization information from data automatically, for personalized response generation tasks. differently, as the score or rating used in recommender system usually denotes users' preferences towards items, such scalar is not enough to represent the semantic meaning of a response. thus, we introduce a response vector to indicate the response content that a user will make for a given conversation, i.e., personalized response embedding, resulting in a tensor form representation for all question-user pairs. decomposing this tensor (tensor factorization, tf) will lead to the factorized representations for each user, question, and dimension of the response embedding. we propose to augment response generation models with such tfinduced modules, which are model-agnostic and can be applied to many different generation models. specifically, we introduce a tf module based framework on top of lstm-based seq2seq model and transformer language model for personalized response generation, and further train them together in an end-to-end fashion. evaluating response generation usually considers content relatedness and language quality to ensure that generated text is grammatically correct and fluent, using bleu and perplexity. however, evaluating personalization in personalized response generation is relatively challenging as there lacks effective metrics. to this end, we propose a novel evaluation metric per-hits@k to model personalization , which for the response of a user first calculates its perplexity values via language models of all users, and then ranks the perplexity via this user's language model to examine whether it is ranked as top-k, based on a pre-trained gpt-2 language model @xcite for each user. our contributions are: personalized response generation personalization has received much attention in the natural language processing community, such as personalized image captioning @xcite , personalized machine translation @xcite , personalized response generation @xcite , personalized intent classification and personalized slot tagging @xcite . prior studies formulate the task of response generation as generating an output given an input text, mainly based on either the sequence-to-sequence (seq2seq) models @xcite or the pretrained models like gpt-2 @xcite and bart @xcite . when it comes to personalized response generation, speaker model @xcite extended traditional response generation models by assigning each user with a trainable speaker id embedding. another line of research focuses on leveraging persona descriptions or demographic attributes @xcite @xcite , building on recent personalized dialogue datasets such as persona-chat @xcite and per-sonaldialog @xcite . for instance, @xcite utilized the predefined user persona description together with their semantically correlated content for generating personalized responses in dialogue systems. different learning paradigms have also been introduced for personalized response generation such as reinforcement learning @xcite @xcite and transfer learning to benefit from a source domain with sufficient training data @xcite . however, most aforementioned approaches require explicit persona or demographic information which is often unavailable in real world scenarios. to fill this gap, we propose to learn latent representation of personalized user information from users' posts and model personalization jointly together with traditional generation methods for personalized response generation. evaluation metrics for personalized response generation current automatic evaluation metrics for response generation can be broadly categorized into three classes. (1) content relatedness measures how related a generated response is with its corresponding ground-truth, with representative metrics such as bleu @xcite , nist @xcite , and meteor @xcite . speaker sensitive responses evaluation model (ssrem) @xcite enhances the relatedness score with a context-response classifier. (2) language quality mainly refers to the fluency and diversity, where the former is measured via perplexity @xcite and the latter is assessed via distinct diversity @xcite ) that indicates how diverse the generated responses are. (3) style adherence aims to evaluate the adherence of the generated responses' language style to the user's own language style; example metrics include the average negative log-likelihood (nll) of one poet's generated lyrics on it's poet specific language model @xcite , stylistic alignment @xcite ) that looks at the language style alignment at the surface, lexical and syntactic level, and hits@1/n @xcite that measures how accurate the generated response can be classified to its corresponding user by a classifier. our proposed per-hits@k metric thus belongs to the style adherence class, a more fine-grained metric compared to the average nll metric @xcite . ## preliminaries 3.1 tucker decomposition to learn latent association between users, questions and responses for personalized response generation, we choose tucker decomposition, one widely used tensor factorization algorithm. tucker @xcite decomposes a given 3-mode tensor @xmath0 here, × i denotes the mode-i product of a tensor by a matrix (@xmath1, 2, 3}). any element x (i,j,k) in x can be approximated by: ## method we formulate the task of personalized response generation as follows: given a set of question-user pair (q, u) ∈ s q × s u where s q and s u refer to the question set and user set respectively, generate a response r for this question-user pair (q, u), i.e., posted by user u for question q. the overall model architecture is described in figure 1 . ## conclusion and discussion this work proposed a tensor factorization module to model user personalization from users' posting history for the task of personalized response generation, where explicit persona or demographic information is unavailable. to automatically evaluate the personalization of generated response, we proposed a new evaluation metric called per-hits@k. extensive experiments on a large-scale dataset show that our proposed tf module outperforms previous methods significantly in terms of its content generation quality and also the personalization of generated responses. our ablation studies further demonstrated the effectiveness and robustness of our tf based generation framework. one limitation to note for our work is that our tensor factorization based framework to model personalization has only been tested on a corpus derived from reddit @xcite . we acknowledge that potential user population bias might be introduced in this process. another limitation of our results lies in dealing with new users, i.e., the cold start problem. future research could further examine these issues, build upon our work to examine how different types of implicit information such as social knowledge and commonsense might be learned together with these user profiles in this tensor factorization manner, and model personalization in multi-turn dialogue systems.