SlowGuess/ACL_2020_OCR huggingface dataset:
Zeming Liu $^{1*}$ , Haifeng Wang $^{2}$ , Zheng-Yu Niu $^{2}$ , Hua Wu $^{2}$ , Wanxiang Che $^{1}$ , Ting Liu $^{1}$
Research Center for Social Computing and Information Retrieval  
Harbin Institute of Technology, Harbin, China  
 $^{2}$ Baidu Inc., Beijing, China  
{zmliu, car, tliu}@ir.hit.edu.cn  
{wanghaifeng, niuzhengyu, wu_hua}@baidu.com
We focus on the study of conversational recommendation in the context of multi-type dialogs, where the bots can proactively and naturally lead a conversation from a non-recommendation dialog (e.g., QA) to a recommendation dialog, taking into account user's interests and feedback. To facilitate the study of this task, we create a human-to-human Chinese dialog dataset DuRecDial (about 10k dialogs, 156k utterances), which contains multiple sequential dialogs for every pair of a recommendation seeker (user) and a recommender (bot). In each dialog, the recommender proactively leads a multi-type dialog to approach recommendation targets and then makes multiple recommendations with rich interaction behavior. This dataset allows us to systematically investigate different parts of the overall problem, e.g., how to naturally lead a dialog, how to interact with users for recommendation. Finally we establish baseline results on DuRecDial for future studies.
In recent years, there has been a significant increase in the work of conversational recommendation due to the rise of voice-based bots (Christakopoulou et al., 2016; Li et al., 2018; Reschke et al., 2013; Warnestal, 2005). They focus on how to provide high-quality recommendations through dialog-based interactions with users. These work fall into two categories: (1) task-oriented dialog-modeling approaches (Christakopoulou et al., 2016; Sun and Zhang, 2018; Warnestal, 2005); (2) nontask dialog-modeling approaches with more freeform interactions (Kang et al., 2019; Li et al., 2018).
Almost all these work focus on a single type of dialogs, either task oriented dialogs for recommendation, or recommendation oriented open-domain conversation. Moreover, they assume that both sides in the dialog (especially the user) are aware of the conversational goal from the beginning.
In many real-world applications, there are multiple dialog types in human-bot conversations (called multi-type dialogs), such as chit-chat, task oriented dialogs, recommendation dialogs, and even question answering (Ram et al., 2018; Wang et al., 2014; Zhou et al., 2018b). Therefore it is crucial to study how to proactively and naturally make conversational recommendation by the bots in the context of multi-type human-bot communication. For example, the bots could proactively make recommendations after question answering or a task dialog to improve user experience, or it could lead a dialog from chitchat to approach a given product as commercial advertisement. However, to our knowledge, there is less previous work on this problem.
To address this challenge, we present a novel task, conversational recommendation over multi-type dialogs, where we want the bot to proactively and naturally lead a conversation from a non-recommendation dialog to a recommendation dialog. For example, in Figure 1, given a starting dialog such as question answering, the bot can take into account user's interests to determine a recommendation target (the movie  $<$  The message  $\rangle$ ) as a long-term goal, and then drives the conversation in a natural way by following short-term goals, and completes each goal in the end. Here each goal specifies a dialog type and a dialog topic. Our task setting is different from previous work (Christakopoulou et al., 2016; Li et al., 2018). First, the overall dialog in our task contains multiple dialog types, instead of a single dialog type as done in previous work. Second, we emphasize the initiative of the recommender, i.e. the bot proactively plans
* This work was done at Baidu.  
† Corresponding author: Wanxiang Che.  
<sup>1</sup>Dataset and codes are publicly available at https://github.com/PaddlePaddle/models/develop/PaddleNLP/Research/ACL2020-DuRecDial.
Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 1036-1049 July 5 - 10, 2020. ©2020 Association for Computational Linguistics
Knowledge graph
Figure 1: A sample of conversational recommendation over multi-type dialogs. The whole dialog is grounded on knowledge graph and a goal sequence, while the goal sequence is planned by the bot with consideration of user's interests and topic transition naturalness. Each goal specifies a dialog type and a dialog topic (an entity). We use different colors to indicate different goals and use underline to indicate knowledge texts.
Conversational recommendation
a goal sequence to lead the dialog, and the goals are unknown to the users. When we address this task, we will encounter two difficulties: (1) how to proactively and naturally lead a conversation to approach the recommendation target, (2) how to iterate upon initial recommendation with the user.
To facilitate the study of this task, we create a human-to-human recommendation oriented multi-type Chinese dialog dataset at Baidu (DuRecDial). In DuRecDial, every dialog contains multi-type dialogs with natural topic transitions, which corresponds to the first difficulty. Moreover, there are rich interaction variability for recommendation, corresponding to the second difficulty. In addition, each seeker has an explicit profile for the modeling of personalized recommendation, and multiple dialogs with the recommender to mimic real-world application scenarios.
To address this task, inspired by the work of Xu et al. (2020), we present a multi-goal driven conversation generation framework (MGCG) to handle multi-type dialogs simultaneously, such as QA/chitchat/recommendation/task etc.. It consists of a goal planning module and a goal-guided responding module. The goal-planning module can conduct dialog management to control the dialog
flow, which determines a recommendation target as the final goal with consideration of user's interests and online feedback, and plans appropriate short-term goals for natural topic transitions. To our knowledge, this goal-driven dialog policy mechanism for multi-type dialog modeling is not studied in previous work. The responding module produces responses for completion of each goal, e.g., chatting about a topic or making a recommendation to the user. We conduct an empirical study of this framework on DuRecDial.
- We identify the task of conversational recommendation over multi-type dialogs.
- To facilitate the study of this task, we create a novel dialog dataset DuRecDial, with rich variability of dialog types and domains as shown in Table 1.
- We propose a conversation generation framework with a novel mixed-goal driven dialog policy mechanism.
Datasets↓ Metrics→	#Dialogs	#Utterances	Dialog types	Domains	User profile
Facebook_Rec (Dodge et al., 2016)	1M	6M	Rec.	Movie	No
REDIAL (Li et al., 2018)	10k	163k	Rec., chitchat	Movie	No
GoRecDial (Kang et al., 2019)	9k	170k	Rec.	Movie	Yes
OpenDialKG (Moon et al., 2019)	12k	143k	Rec.	Movie, book	No
CMU DoG (Zhou et al., 2018a)	4k	130k	Chitchat	Movie	No
IIT DoG (Moghe et al., 2018)	9k	90k	Chitchat	Movie	No
Wizard-of-wiki (Dinan et al., 2019)	22k	202k	Chitchat	1365 Wikipedia topics	No
OpenDialKG (Moon et al., 2019)	3k	38k	Chitchat	Sports, music	No
DuConv (Wu et al., 2019)	29k	270k	Chitchat	Movie	No
KdConv (Zhou et al., 2020)	4.5k	86k	Chitchat	Movie, music, travel	No
DuRecDial	10.2k	156k	Rec., chitchat, QA, task	Movie, music, movie star, food, restaurant, news, weather	Yes
Table 1: Comparison of our dataset DuRecDial to recommendation dialog datasets and knowledge grounded dialog datasets. "Rec." stands for recommendation.
Datasets for Conversational Recommendation To facilitate the study of conversational recommendation, multiple datasets have been created in previous work, as shown in Table 1. The first recommendation dialog dataset is released by Dodge et al. (2016), which is a synthetic dialog dataset built with the use of the classic MovieLens ratings dataset and natural language templates. Li et al. (2018) creates a human-to-human multi-turn recommendation dialog dataset, which combines the elements of social chitchat and recommendation dialogs. Kang et al. (2019) provides a recommendation dialogue dataset with clear goals, and Moon et al. (2019) collects a parallel Dialog  $\leftrightarrow$  KG corpus for recommendation. Compared with them, our dataset contains multiple dialog types, multidomain use cases, and rich interaction variability.
Datasets for Knowledge Grounded Conversation As shown in Table 1, CMU DoG (Zhou et al., 2018a) explores two scenarios for Wikipediaarticle grounded dialogs: only one participant has access to the document, or both have. IIT DoG (Moghe et al., 2018) is another dialog dataset for movie chats, wherein only one participant has access to background knowledge, such as IMDB's facts/plots, or Reddit's comments. Dinan et al. (2019) creates a multi-domain multi-turn conversations grounded on Wikipedia articles. OpenDialKG (Moon et al., 2019) provides a chit-chat dataset between two agents, aimed at the modeling of dialog logic by walking over knowledge graph-Freebase. Wu et al. (2019) provides a Chinese dialog dataset-DuConv, where one participant can proactively lead the conversation with an explicit goal. KdConv (Zhou et al., 2020) is a Chinese dialog dataset,
where each dialog contains in-depth discussions on multiple topics. In comparison with them, our dataset contains multiple dialog types, clear goals to achieve during each conversation, and user profiles for personalized conversation.
Models for Conversational Recommendation Previous work on conversational recommender systems fall into two categories: (1) task-oriented dialog-modeling approaches in which the systems ask questions about user preference over predefined slots to select items for recommendation (Christakopoulou et al., 2018, 2016; Lee et al., 2018; Reschke et al., 2013; Sun and Zhang, 2018; Warnestal, 2005; Zhang et al., 2018b); (2) non-task dialog-modeling approaches in which the models learn dialog strategies from the dataset without predefined task slots and then make recommendations without slot filling (Chen et al., 2019; Kang et al., 2019; Li et al., 2018; Moon et al., 2019; Zhou et al., 2018a). Our work is more close to the second category, and differs from them in that we conduct multi-goal planning to make proactive conversational recommendation over multi-type dialogs.
Goal Driven Open-domain Conversation Generation Recently, imposing goals on open-domain conversation generation models having attracted lots of research interests (Moon et al., 2019; Li et al., 2018; Tang et al., 2019b; Wu et al., 2019) since it provides more controllability to conversation generation, and enables many practical applications, e.g., recommendation of engaging entities. However, these models can just produce a dialog towards a single goal, instead of a goal sequence as done in this work. We notice that the model by Xu et al. (2020) can conduct multi-goal planning for conversation generation. But their goals are limited
Figure 2: We collect multiple sequential dialogs  $\{d_i^{s_k}\}$  for each seeker  $s_k$ . For annotation of every dialog, the recommender makes personalized recommendations according to task templates, knowledge graph and the seeker profile built so far. The seeker must accept/reject the recommendations.
to in-depth chitchat about related topics, while our goals are not limited to in-depth chitchat.
3.1 Task Design
We define one person in the dialog as the recommendation seeker (the role of users) and the other as the recommender (the role of bots). We ask the recommender to proactively lead the dialog and then make recommendations with consideration of the seeker's interests, instead of the seeker to ask for recommendation from the recommender. Figure 2 shows our task design. The data collection consists of three steps: (1) collection of seeker profiles and knowledge graph; (2) collection of task templates; (3) annotation of dialog data. Next we will provide details of each step.
Explicit seeker profiles Each seeker is equipped with an explicit unique profile (a ground-truth profile), which contains the information of name, gender, age, residence city, occupation, and his/her preference on domains and entities. We automatically generate the ground-truth profile for each seeker, which is known to the seeker, and unknown to the recommender. We ask that the utterances of each seeker should be consistent with his/her profile. We expect that this setting could encourage the seeker to clearly and self-consistently explain what he/she likes/dislikes. In addition, the
recommender can acquire seeker profile information only through dialogs with the seekers.
Knowledge graph Inspired by the work of document grounded conversation (Ghazvininejad et al., 2018; Moghe et al., 2018), we provide a knowledge graph to support the annotation of more informative dialogs. We build them by crawling data from Baidu Wiki and Douban websites. Table 3 presents the statistics of this knowledge graph.
Multi-type dialogs for multiple domains We expect that the dialog between the two task-workers starts from a non-recommendation scenario, e.g., question answering or social chitchat, and the recommender should proactively and naturally guide the dialog to a recommendation target (an entity). The targets usually fall into the seeker's interests, e.g., the movies of the star that the seeker likes.
Moreover, to be close to the setting in practical applications, we ask each seeker to conduct multiple sequential dialogs with the recommender. In the first dialog, the recommender asks questions about seeker profile. Then in each of the remaining dialogs, the recommender makes recommendations based on the seeker's preferences collected so far, and then the seeker profile is automatically updated at the end of each dialog. We ask that the change of seeker profile should be reflected in later dialogs. The difference between these dialogs lies in subdialog types and recommended entities.
Rich variability of interaction How to iterate upon initial recommendation plays a key role in the interaction procedure for recommendation. To provide better supervision for this capability, we expect that the task workers can introduce diverse interaction behaviors in dialogs to better mimic the decision-making process of the seeker. For example, the seeker may reject the initial recommendation, or mention a new topic, or ask a question about an entity, or simply accept the recommendation. The recommender is required to respond appropriately and follow the seeker's new topic.
Task templates as annotation guidance Due to the complexity of our task design, it is very hard to conduct data annotation with only high-level instructions mentioned above. Inspired by the work of MultiWOZ (Budzianowski et al., 2018), we provide a task template for each dialog to be annotated, which guides the workers to annotate in the way we expect them to be. As shown in Table 2, each template contains the following information: (1) a goal sequence, where each goal consists of two
2Please see Appendix 1. for more details.
<sup>3</sup>We have a strict data quality control process, please see Appendix 1.2 for more details.
Goals	Goal description
Goal1: QA (dialog type) about the movie <Stolen life> (dialog topic)	The seeker takes the initiative, and asks for the information about the movie <Stolen life>; the recommender replies according to the given knowledge graph; finally the seeker provides feedback.
Goal2: chitchat about the movie star Xun Zhou	The recommender proactively changes the topic to movie star Xun Zhou as a short-term goal, and conducts an in-depth conversation;
Goal3: Recommendation of the movie <The message>	The recommender proactively changes the topic from movie star to related movie <The message>, and recommend it with movie comments, and the seeker changes the topic to Rene Liu's movies;
Goal4: Recommendation of the movie <Don't cry, Nanking!>	The recommender proactively recommends Rene Liu's movie <Don't cry, Nanking!> with movie comments. The seeker tries to ask questions about this movie, and the recommender should reply with related knowledge. Finally the user accepts the recommended movie.
elements, a dialog type and a dialog topic, corresponding to a sub-dialog. (2) a detailed description about each goal. We create these templates by (1) first automatically enumerating appropriate goal sequences that are consistent with the seeker's interests and have natural topic transitions and (2) then generating goal descriptions with the use of some rules and human annotation.
To obtain this data, we develop an interface and a pairing mechanism. We pair up task workers and give each of them a role of seeker or recommender. Then the two workers conduct data annotation with the help of task templates, seeker profiles and knowledge graph. In addition, we ask that the goals in templates must be tagged in every dialog.
Data structure We organize the dataset of DuRecDial according to seeker IDs. In DuRecDial, there are multiple seekers (each with a different profile) and only one recommender. Each seeker  $s_k$  has multiple dialogs  $\{d_i^{s_k}\}_i$  with the recommender. For each dialog  $d_i^{s_k}$ , we provide a knowledge graph and a goal sequence for data annotation, and a seeker profile updated with this dialog.
Data statistics Table 3 provides statistics of knowledge graph and DuRecDial, indicating rich
Table 2: One of our task templates that is used to guide the workers to annotate the dialog in Figure 1. We require that the recommendation target (the long-term goal) is consistent with the user's interests and the topics mentioned by the user, and short-term goals provide natural topic transitions to approach the long-term goal.
#Domains	7
Knowledge	#Entities	21,837
graph	#Attributes	454
#Triples	222,198
#Dialogs	10,190
DuRecDial	#Sub-	6,722/8,756/3,234/10,190
dialogs for
QA/Rec/task/chitchat
#Utterances	155,477
#Seekers	1362
#Entities	11,162/8,692/2,470/
recom-
mended/accepted/rejected
Table 3: Statistics of knowledge graph and DuRecDial.
variability of dialog types and domains.
Data quality We conduct human evaluations for data quality. A dialog will be rated "1" if it follows the instruction in task templates and the utterances are fluent and grammatical, otherwise "0". Then we ask three persons to judge the quality of 200 randomly sampled dialogs. Finally we obtain an average score of 0.89 on this evaluation set.
4.1 Problem Definition and Framework Overview
Problem definition Let  $D^{s_k} = \{d_i^{s_k}\}_{i=0}^{N_D^{s_k}}$  denote a set of dialogs by the seeker  $s_k$  ( $0 \leq k < N_s$ ), where  $N_{D^{s_k}}$  is the number of dialogs by the seeker  $s_k$ , and  $N_s$  is the number of seekers. Recall that we attach each dialog (say  $d_i^{s_k}$ ) with an updated seeker profile (denoted as  $\mathcal{P}_i^{s_k}$ ), a knowledge graph  $\mathcal{K}$ , and a goal sequence  $\mathcal{G} = \{g_t\}_{t=0}^{T_g-1}$ . Given a context  $X$  with utterances  $\{u_j\}_{j=0}^{m-1}$  from the dialog  $d_i^{s_k}$ , a goal history  $\mathcal{G}' = \{g_0, \dots, g_{t-1}\}$  ( $g_{t-1}$  as the goal for  $u_{m-1}$ ),  $\mathcal{P}_{i-1}^{s_k}$  and  $\mathcal{K}$ , the aim is to provide an appropriate goal  $g_c$  to determine where the dialog goes and then produce a proper response  $Y = \{y_0, y_1, \dots, y_n\}$  for completion of the goal  $g_c$ .
Framework overview The overview of our framework MGCG is shown in Figure 3. The goal-planning module outputs goals to proactively and naturally lead the conversation. It first takes as input  $X$ ,  $\mathcal{G}'$ ,  $\mathcal{K}$  and  $\mathcal{P}_{i-1}^{s_k}$ , then outputs  $g_c$ . The responding module is responsible for completion of each goal by producing responses conditioned on  $X$ ,  $g_c$ , and  $\mathcal{K}$ . For implementation of the responding module, we adopt a retrieval model and a generation model proposed by Wu et al. (2019), and modify them to suit our task.
For model training, each [context, response] in  $d_{i}^{s_{k}}$  is paired with its ground-truth goal,  $\mathcal{P}_i^{s_k}$  and
Figure 3: The architecture of our multi-goal driven conversation generation framework (denoted as MGCG).
$\kappa$ . These goals will be used as answers for training of the goal-planning module, while the tuples of [context, a ground-truth goal,  $\kappa$ , response] will be used for training of the responding module.
4.2 Goal-planning Model
As shown in Figure 3(a), we divide the task of goal planning into two sub-tasks, goal completion estimation, and current goal prediction.
Goal completion estimation For this subtask, we use Convolutional neural network (CNN)(Kim, 2014) to estimate the probability of goal completion by:
$$
P _ {G C} (l = 1 | X, g _ {t - 1}). \tag {1}
$$
Current goal prediction If  $g_{t-1}$  is not completed ( $P_{GC} < 0.5$ ), then  $g_c = g_{t-1}$ , where  $g_c$  is the goal for  $Y$ . Otherwise, we use CNN based multi-task classification to predict the current goal by maximizing the following probability:
$$
g _ {t} = \arg \max  _ {g ^ {t y}, g ^ {t p}} P _ {G P} \left(g ^ {t y}, g ^ {t p} | X, \mathcal {G} ^ {\prime}, \mathcal {P} _ {i} ^ {s _ {k}}, \mathcal {K}\right), \tag {2}
$$
$$
g _ {c} = g _ {t}, \tag {3}
$$
where  $g^{ty}$  is a candidate dialog type and  $g^{tp}$  is a candidate dialog topic.
4.3 Retrieval-based Response Model
In this work, conversational goal is an important guidance signal for response ranking. Therefore,
we modify the original retrieval model to suit our task by emphasizing the use of goals.
As shown in Figure 3(b), our response ranker consists of five components: a context-response representation module (C-R Encoder), a knowledge representation module (Knowledge Encoder), a goal representation module (Goal Encoder), a knowledge selection module (Knowledge Selector), and a matching module (Matcher).
The C-R Encoder has the same architecture as BERT (Devlin et al., 2018), and it takes a context  $X$  and a candidate response  $Y$  as segment_a and segment_b in BERT, and leverages a stacked self-attention to produce the joint representation of  $X$  and  $Y$ , denoted as  $xy$ .
Each related knowledge knowledge is also encoded as a vector by the Knowledge Encoder using a bi-directional GRU (Chung et al., 2014), which can be formulated as  $k_{i} = [\overrightarrow{h_{T_{k}}};\overleftarrow{h_{0}}]$ , where  $T_{k}$  denotes the length of knowledge,  $\overrightarrow{h_{T_k}}$  and  $\overleftrightarrow{h_0}$  represent the last and initial hidden states of the two directional GRU respectively.
The Goal Encoder uses bi-directional GRUs to encode a dialog type and a dialog topic for goal representation (denoted as  $g_{c}$ ).
For knowledge selection, we make the context-response representation  $xy$  attended to all knowledge vectors  $k_{i}$  and get the attention distribution:
$$
p \left(k _ {i} \mid x, y, g _ {c}\right) = \frac {\exp \left(\mathbf {M L P} \left([ x y ; g _ {c} ]\right) \cdot k _ {i}\right)}{\sum_ {j} \exp \left(\mathbf {M L P} \left([ x y ; g _ {c} ]\right) \cdot k _ {j}\right)} \tag {4}
$$
We fuse all related knowledge information into a single vector  $k_{c} = \sum_{i}p(k_{i}|x,y,g_{c})*k_{i}$
We view  $k_{c}$ ,  $g_{c}$  and  $xy$  as the information from knowledge source, goal source and dialogue source respectively, and fuse the three information sources into a single vector via concatenation. Finally we calculate a matching probability for each  $Y$  by:
$$
p (l = 1 | X, Y, K, g _ {c}) = \operatorname {s o f t m a x} (\mathbf {M L P} ([ x y; k _ {c}; g _ {c} ])) \tag {5}
$$
4.4 Generation-based Response Model
To highlight the importance of conversational goals, we also modify the original generation model by introducing an independent encoder for goal representation. As shown in Figure 3(c), our generator consists of five components: a Context Encoder, a Knowledge Encoder, a Goal Encoder, a Knowledge Selector, and a Decoder.
Given a context  $X$ , conversational goal  $g_{c}$  and knowledge graph  $K$ , our generator first encodes them as vectors with the use of above encoders (based on bi-directional GRUs).