# Learning Personalized End-to-End Goal-Oriented Dialog

## Introduction

1. the inability to adjust language style flexibly
2. the lack of a dynamic conversation policy based on the interlocutor’s profile
3. the incapability of handling ambiguities in user requests

Fig 1 显示传统的content-based model与本文提出的personalized model生成对话的区别：

1. content-based model生成的回复不能根据情境调整称谓和表达方式，相对单一
2. 在推荐候选方案时，content-based model只能随机生成顺序，而personalized model可以根据用户个性来动态调整推荐策略
3. 对话中出现的contact 这个词既可以被解释成 phone，也可以解释成 social media，这两者都是knowledge base里的slot属性，personalized model可以根据学习到的个性知识（例如年轻人更喜欢social media，而成年人更偏phone）来消除歧义。

Psychologists have proven that during a dialog humans tend to adapt to their interlocutor to facilitate understanding, which enhances conversational efficiency (Brown 1965; Brown 1987; Kroger and Wood 1992).

_主要介绍了闲聊对话系统中的个性化，同样值得借鉴_

## End-to-End Memory Network

As the model conducts a conversation with the user, utterance (from the user) and response (from the model) are in turn appended to the memory. At any given time step t there are $c_{1}^{u},…,c_{t}^{u}$ user utterances and $c_{1}^{r},…,c_{t-1}^{r}$ model responses. The aim at time t is to retrieve the next response $c_{t}^{r}$.

### Memory Operation

Memory Operation主要是将当前时刻t的initial query q与 memory $m_{i}$ 做attention计算，再将attention output与query q相加得到新的query q，重复迭代N hops。

$$\alpha_{i}=softmax(q^{T}m_{i})$$
$$o=R\sum_{i}\alpha_{i}m_{i}$$
$$q_{2}=q+o$$

C是集合y的大小，也即总共有C个回复。

## Personalized Dialog System

### Profile Model

Profile Model是将profile信息融合到query中，包含两个模块：profile embedding , global memory

#### Profile Embedding

In the MEMN2N, the query q plays a key role in both reading memory and choosing the response, while it contains no information about the user. We expect to add a personalized information term to q at each iteration
of the query.

$$q_{i+1}=q_{i}+o_{i}+p\:\:(3)$$

$$r_{i}^{*}=\sigma (p^{T}r_{i})\cdot r_{i}\:\:(4)$$

$\sigma$ 是sigmoid，使用$r_{i}^{*}$代替Eq 2 中的$r_{i}$。

#### Global Memory

Users with similar profiles may expect the same or a similar response for a certain request. Therefore, instead of using the profile directly, we also implicitly integrate personalized information of an interlocutor by utilizing the conversation history from similar users as a global memory. The definition of similarity varies with task domains. In this paper, we regard those with the same profile as similar users.

N hops之后得到最终的 $q^{(g)}$ ，然后将其与MN相加：$q^{+}=q_{N+1}+q_{N+1}^{(g)}$。

### Preference Model

The ambiguity refers to the user preference when more than one valid entities are available for a specific request. We propose inferring such preference by taking the relation between user profile and knowledge base into account.

Preference Model定义如下：给定user profile 和 K col的KB，先对用户偏好建模：

Note that we assume the bot cannot provide more than one option in a single response, so a candidate can only contains one entity at most.

• 如果第k个候选回复不包含KB实体，$b_{k}=0$；
• 如果第k个候选回复包含一个KB实体 $e_{i,j}$ ，$b_{k}=\lambda(i,j)$。

For example, the candidate “Here is the information: The Place Phone” contains a KB entity “The Place Phone”
which belongs to restaurant “The Place” and column “Phone”. If “The Place” has been mentioned in the conversation, the bias term for this response should be $v_{Phone}$.

Eq 2式变为：

## Experiments

_Details in original paper Learning Personalized End-to-End Goal-Oriented Dialog_

### Dataset

The personalized bAbI dialog dataset (Joshi, Mi, and Faltings 2017) is a multi-turn dialog corpus extended from the bAbI dialog dataset (Bordes, Boureau, and Weston 2017). It introduces an additional user profile associated with each dialog and updates the utterances and KB entities to integrate personalized style. Five separate tasks in a restaurant reservation scenario are introduced along with the dataset. Here we briefly introduce them for better understanding of our experiments. More details on the dataset can be found in the work by Joshi, Mi, and Faltings (2017).

## Conclusion and Future Work

We introduce a novel end-to-end model for personalization in goal-oriented dialog. Experiment results on open datasets and further analysis show that the model is capable of overcoming some existing issues in dialog systems. The model improves the effectiveness of the bot responses with personalized information, and thus greatly outperforms state-of-the-art methods.

In future work, more representations of personalities apart from the profile attribute can be introduced into goal-oriented dialogs models. Besides, we may explore on learning profile representations for non-domain-specific tasks and consider KB with more complex format such as ontologies.