<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">JCC</journal-id><journal-title-group><journal-title>Journal of Computer and Communications</journal-title></journal-title-group><issn pub-type="epub">2327-5219</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/jcc.2022.107003</article-id><article-id pub-id-type="publisher-id">JCC-118775</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Personalized Dialogue Generation Model Based on BERT and Hierarchical Copy Mechanism
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Zijian</surname><given-names>Liu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Yan</surname><given-names>Peng</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Shifeng</surname><given-names>Ni</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>School of Computer Science and Engineering, Sichuan University of Science and Engineering, Yibin, China</addr-line></aff><pub-date pub-type="epub"><day>07</day><month>07</month><year>2022</year></pub-date><volume>10</volume><issue>07</issue><fpage>35</fpage><lpage>52</lpage><history><date date-type="received"><day>15,</day>	<month>June</month>	<year>2022</year></date><date date-type="rev-recd"><day>24,</day>	<month>July</month>	<year>2022</year>	</date><date date-type="accepted"><day>27,</day>	<month>July</month>	<year>2022</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Despite the great advances in generative dialogue systems, existing dialogue generation models are still unsatisfactory in maintaining persona consistency. In order to make the dialogue generation model generate more persona-consistent responses, this paper proposes a model named BERT-HCM (Personalized Dialogue Generation Model Based on BERT and Hierarchical Copy Mechanism). The model uses an encoder based on BERT initialization to encode persona information and dialogue queries and subsequently uses a Transformer decoder incorporating a hierarchical copy mechanism to dynamically copy the input-side content to guide the model in generating responses. The experimental results show that the proposed model improves on both automatic and human evaluation metrics compared to the baseline model and is able to generate more fluent, relevant and persona-consistent responses.
 
</p></abstract><kwd-group><kwd>Personalized Dialogue Generation</kwd><kwd> BERT</kwd><kwd> Hierarchical Copy Mechanism</kwd><kwd> Persona Consistency</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Building a conversational system that makes it impossible for humans to distinguish between truth and fiction is a long-term goal of artificial intelligence. With the development of deep learning technology and big data technology, generative dialogue systems have made great progress. Today’s dialogue systems have made great progress in generating complete and fluent sentences, but the distance to passing the Turing test [<xref ref-type="bibr" rid="scirp.118775-ref1">1</xref>] is still far away, and one of the important reasons is the lack of persona consistency in dialogue generation. A dialogue system with incoherent personas will greatly degrade the user interaction experience, so it is important to build a dialogue system with consistent personas to gain the trust of users and establish long-term connections with them.</p><p>More recently, Zhang et al. [<xref ref-type="bibr" rid="scirp.118775-ref2">2</xref>] introduced the Persona-Chat and promoted widespread interest in researching personalized dialogue models [<xref ref-type="bibr" rid="scirp.118775-ref3">3</xref>] [<xref ref-type="bibr" rid="scirp.118775-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.118775-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.118775-ref6">6</xref>]. This dataset defines personas as several profile sentences, requiring the model to generate responses consistent with several persona sentences. Many attempts have been made to control the model to generate more persona-consistent responses [<xref ref-type="bibr" rid="scirp.118775-ref7">7</xref>] - [<xref ref-type="bibr" rid="scirp.118775-ref12">12</xref>].</p><p>However, although these attempts have more or less improved different aspects of persona-based dialogue generation, today’s persona-based dialogue models still present significant challenges in generating responses with persona consistency. As shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, the strong baseline Transfertransfo fine-tuned on the persona dialogue dataset still produces inconsistent responses. By observing the data and analyzing it, we found that some of the content in the gold responses of the persona-based dialogue generation task overlaps with the persona information and dialogue queries. It indicates that we can directly use the words from the persona information and dialogue queries to reply in some cases to help improve the persona consistency of the responses. On the other hand, the model’s insufficient understanding of the input content at the semantic level is also a reason for the inconsistent model responses. Previous studies usually encode the input by RNN or GPT model [<xref ref-type="bibr" rid="scirp.118775-ref13">13</xref>], RNN has the limitations of long-term memory forgetting and weak feature extraction, and the GPT model itself is trained with the goal of generation rather than understanding, so both are difficult to understand the input adequately.</p><p>To solve the above problems, this paper proposes a model named Personalized Dialogue Generation Model Based on BERT and Hierarchical Copy Mechanism (BERT-HCM), which facilitates the model to generate relevant and persona-consistent responses by improving the semantic understanding capability</p><p>of the encoder and directly copying the persona information and the dialogue query. Specifically, BERT-HCM is initialized and fine-tuned at the encoder side using the BERT model [<xref ref-type="bibr" rid="scirp.118775-ref14">14</xref>], which is a bi-directional pre-trained language model based on Transformer, and the natural language understanding ability learned in the pre-training stage of the BERT model can help improve the semantic understanding ability of the encoder as well as speed up the model training. On the decoder side, this paper innovatively adds a hierarchical copy mechanism to the original Transformer decoder to improve the utilization of input information by dynamically copying the content of the input. Extensive experiments on both Chinese and English persona-based dialogue datasets demonstrate that our model can generate more fluent, relevant and persona-consistent responses than other baselines.</p></sec><sec id="s2"><title>2. Related Work</title><sec id="s2_1"><title>2.1. Personalized Dialogue Generation</title><p>Personalized dialogue generation has become an important research area in recent years. At first, researchers used implicit modeling to represent different persona [<xref ref-type="bibr" rid="scirp.118775-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.118775-ref16">16</xref>], but this implicit modeling approach suffers from the disadvantages of lack of interpretability and poor controllability [<xref ref-type="bibr" rid="scirp.118775-ref17">17</xref>]. Explicit modeling is one way to solve this problem, Zhang et al. [<xref ref-type="bibr" rid="scirp.118775-ref2">2</xref>] collected a persona-based dataset by asking randomly paired staff and assigning them random persona description information for chatting, and modeled it using RNN-based Seq2Seq. And then, a large number of studies based on explicit modeling emerged, Zheng et al. [<xref ref-type="bibr" rid="scirp.118775-ref3">3</xref>] proposed RNN-based models for persona-aware attention and persona-aware bias. Qian et al. [<xref ref-type="bibr" rid="scirp.118775-ref4">4</xref>] proposed incorporating a persona information detector to determine whether to reply using persona information. Song et al. [<xref ref-type="bibr" rid="scirp.118775-ref5">5</xref>] proposed the use of memory networks combined with CVAE to increase the diversity of persona-based dialogues. Yavuz et al. [<xref ref-type="bibr" rid="scirp.118775-ref6">6</xref>] designed the DeepCopy model, which uses a copy mechanism to integrate persona information. The above models are all RNN-based models. However, as Transformer-based pre-trained models achieved good results in various NLP tasks, researchers started to experiment with Transformer-based models for persona-based dialogue modeling. Wolf et al. [<xref ref-type="bibr" rid="scirp.118775-ref7">7</xref>] achieved first place in the automatic evaluation of the ConvAI2 competition [<xref ref-type="bibr" rid="scirp.118775-ref18">18</xref>] by fine-tuning the GPT model with direct splicing of persona information and dialogue queries, while the first place in the human evaluation in the same competition went to the GPT-based multi-input Transformer model proposed by Golovanov et al. [<xref ref-type="bibr" rid="scirp.118775-ref8">8</xref>]. In addition, Zheng et al. [<xref ref-type="bibr" rid="scirp.118775-ref9">9</xref>] added an attention routing on the Decoder side to dynamically exploit the persona information based on the work of [<xref ref-type="bibr" rid="scirp.118775-ref8">8</xref>]. Liu et al. [<xref ref-type="bibr" rid="scirp.118775-ref10">10</xref>] proposed a persona-aware robot that uses reinforcement learning to align the persona information of both parties during the conversation, improving the quality of conversation generation. Wang et al. [<xref ref-type="bibr" rid="scirp.118775-ref11">11</xref>] used persona sentence reconstruction and calibration networks to improve the persona consistency of responses. Cao et al. [<xref ref-type="bibr" rid="scirp.118775-ref12">12</xref>] proposed the use of data augmentation and Curriculum learning to enhance the performance of persona dialogues without relying on the model.</p></sec><sec id="s2_2"><title>2.2. Pre-Training Language Model</title><p>In recent years, pre-trained language models have made great progress. With the release of models such as GPT [<xref ref-type="bibr" rid="scirp.118775-ref13">13</xref>] and BERT [<xref ref-type="bibr" rid="scirp.118775-ref14">14</xref>] and the significant enhancements brought by them on several downstream tasks, pre-trained language models have become an indispensable and fundamental paradigm in the field of natural language processing. According to the different pre-training tasks, we can simply classify pre-trained language models into two different models, Autoregressive and Autoencoder. Autoregressive models have the same task as language models, predicting the next word based on the above or predicting the previous word based on the below, e.g., GPT model is obtained using Transformer’s decoder as the basis, trained with the classical language model task, and belong to autoregressive models. Autoencoder models (e.g., BERT), also commonly referred to as Denoising Autoencoder models, which are pre-trained with the goal of predicting randomly masked words in the input based on context, have the advantage of simultaneously exploiting the contextual information of the predicted words and are therefore more suitable for natural language understanding tasks. In the area of dialogue generation, Chen et al. [<xref ref-type="bibr" rid="scirp.118775-ref19">19</xref>] set up several pre-training tasks for dialogue scenarios and proposed DialogVED to achieve excellent results on several dialogue datasets, and [<xref ref-type="bibr" rid="scirp.118775-ref20">20</xref>] proposed the DialogGPT model for dialogue tasks, which builds on the GPT-2 model and uses a large-scale dialogue corpus to train models that can produce more diverse and relevant responses. For persona-based dialogues, the performance of [<xref ref-type="bibr" rid="scirp.118775-ref7">7</xref>] and [<xref ref-type="bibr" rid="scirp.118775-ref8">8</xref>] demonstrates that pre-trained models can effectively improve the quality of persona-based dialogues responses.</p></sec><sec id="s2_3"><title>2.3. Copy Mechanism</title><p>The copying mechanism can be divided into soft-gated copy and hard-gated copy. Gu et al. [<xref ref-type="bibr" rid="scirp.118775-ref21">21</xref>] first proposed CopyNet in 2016, and added the copy mode to distinguish the generate mode of the original Seq2Seq model. The two modes are in the form of soft gating co-directs dialogue generation, alleviating the OOV problem. See et al. [<xref ref-type="bibr" rid="scirp.118775-ref22">22</xref>] proposed a pointer generation network for text summarization and added pointer probabilities on the basis of CopyNet to fusion the two-mode probabilities in a weighted manner. [<xref ref-type="bibr" rid="scirp.118775-ref6">6</xref>] designed the DeepCopy model, which utilizes a hierarchical pointer generation network to integrate persona information to guide dialogue generation. [<xref ref-type="bibr" rid="scirp.118775-ref23">23</xref>] designed a hard-gated copy to choose whether the generated word originates from a predefined vocabulary or points to the dialogue history.</p><p>Different from the above work based on the pre-training language model and copy mechanism, this paper attempts to improve the quality and persona consistency of the responses generated by the model by enhancing the model’s semantic understanding of the input information and directly copying the input information. We propose a novel hierarchical copy mechanism and organically combine it with the Transformer model based on the BERT encoder.</p></sec></sec><sec id="s3"><title>3. BERT-HCM Model</title><sec id="s3_1"><title>3.1. Task Definition</title><p>The task of this paper is to learn a dialogue generation model based on the persona context, so that the response generated by the model is consistent with the information of the given persona description. Specifically, the input of the model consists of persona information and dialogue query. P = { P 1 , P 2 , ⋯ , P k } denotes the persona description information, and the persona description of each sample consists of k sentences. Q = q 1 , q 2 , ⋯ , q n denotes the dialogue query, with each dialogue query consisting of n words. G = g 1 , g 2 , ⋯ , g n denotes the gold response, each gold response consists of n words. R denotes the generated responses of the model, R = r 1 , r 2 , ⋯ , r n , with each generated response consisting of n words. Our goal is to learn a model M such that the generated response R is as close as possible to the gold response G by modeling the generated response R = M (P,Q).</p></sec><sec id="s3_2"><title>3.2. Overview</title><p>The model proposed in this paper is a Transformer-based model with an encoder-decoder structure. The Transformer model has a strong capability of long-range information capture and parallel computation, so it is very suitable for modeling dialogue models, and the specific model structure is shown in <xref ref-type="fig" rid="fig2">Figure 2</xref>. Specifically, the input persona information of the model P and the dialogue query Q is spliced through the word embedding layer (including word embedding, position embedding and segment embedding) to obtain the word embedding vector, and then the BERT encoder is used to encode the word embedding vector to obtain the hidden state H<sub>[P</sub><sub>:Q]</sub>. At the decoder side, the gold response input G is similarly input to the hierarchical copy decoder for decoding through the embedding layer shared with the encoder, and the final response R is obtained.</p></sec><sec id="s3_3"><title>3.3. Word Embedding Layer</title><p>The word embedding layer is directly initialized using the word embedding layer of BERT, including three parts: word embedding, position embedding and segment embedding, and the three parts are fused by vector summation, as follows:</p><p>e i = e w i + e p i + e s i (1)</p><p>where e<sub>i</sub> denotes the input representation of the i-th word, e<sub>wi</sub> denotes the word embedding of the i-th word, e<sub>pi</sub> denotes the position embedding of the i-th word, and e<sub>si</sub> denotes the segment embedding of the i-th word. The input representation is shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>. In addition, the encoder and decoder of the model in this paper share the same word embedding layer.</p></sec><sec id="s3_4"><title>3.4. BERT Encoder</title><p>BERT [<xref ref-type="bibr" rid="scirp.118775-ref14">14</xref>] (Bidirectional Encoder Representation from Transformers) is a pre-trained language model proposed by Google AI Research Institute in 2018, using the Encoder structure of Transformer with hundreds of millions of learnable parameters. Unlike general autoregressive one-way pre-trained language models, BERT is a bi-directional self-coding model with a pre-training phase targeting masked language model (MLM) and next sentence prediction (NSP). Benefiting from different pre-training tasks, BERT has a very strong natural language understanding ability and is widely used for tasks related to natural language understanding. In order to enable the model to have a stronger semantic understanding and help the model to generate higher quality responses, the encoder part of this paper uses a standard BERT model. The output of the word embedding is subjected to the multi-layer bidirectional encoding of BERT to obtain a high-dimensional hidden state. In our model, the input consists of a persona information P and a dialogue query Q. The format of the input is shown in Equation (2).</p><p>e i n p u t = [ C L S ] , e p 1 ( 1 ) , e p 1 ( 2 ) , ⋯ , e p n ( m ) , [ S E P ] , [ C L S ] , e q ( 1 ) , ⋯ , e q ( m ) [ S E P ] (2)</p><p>where e represents the word embedding representation that has gone through the word embedding layer, n represents the number of sentences with persona information, and m represents the length of the sentence. After that, e<sub>input</sub> will pass through multiple layers of multi-headed attention layers and feedforward neural network layers on the BERT encoder to obtain the hidden vector H [ P : Q ] L . Each layer can be represented as:</p><p>h [ P : Q ] l + 1 = F N N ( M H A ( h [ P : Q ] l , h [ P : Q ] l , h [ P : Q ] l ) ) (3)</p><p>where MHA refers to the multi-head attention layer, FNN refers to the fully connected feedforward neural network layer, h [ P : Q ] 0 = e i n p u t , l stands for the current number of layers, and L stands for the total number of layers.</p></sec><sec id="s3_5"><title>3.5. Hierarchical Copy Decoder</title><p>To make the model use the input information more efficiently and accurately, we improve the pointer generation network based on [<xref ref-type="bibr" rid="scirp.118775-ref22">22</xref>], and innovatively propose a Transformer decoder that incorporates the hierarchical copy mechanism. This method not only organically combines the copy mechanism with the Transformer but also makes full use of the hierarchical guidance of the attention score to make the copy more accurate. The so-called hierarchical copy mechanism can be divided into two layers: the first layer calculates how much weight each copy mode and generate mode accounts for, and the second layer calculates how much weight each of the two different copy targets accounts for under the condition that the weight of copy in the first layer is known, and finally uses the weighted sum of these calculated weights to obtain the final vocabulary distribution. The specific structure is shown in the decoder part of <xref ref-type="fig" rid="fig2">Figure 2</xref>, in which two cross-attention layers are stacked in a vertical manner, namely the persona-aware cross-attention layer and the query-aware cross-attention layer. The final generation result is obtained by a hierarchical soft fusion method similar to the gate mechanism in three parts: the vocabulary distribution generated by the Transformer decoder, the vocabulary distribution generated by the persona-aware cross-attention layer, and the vocabulary distribution generated by the persona-aware cross-attention layer. The input is similar to the encoder, except that the input here uses an upper triangular mask to ensure that the prediction only depends on the known output. The specific input format is shown in Equation (4).</p><p>e t a r g e t = [ C L S ] , e g ( 1 ) , e g ( 2 ) , ⋯ , e g ( m ) (4)</p><p>where e represents the word embedding representation that has passed through the word embedding layer, and m represents the length of the sentence. Then, e<sub>target</sub> will feed to the Transformer decoder based on the hierarchical copy mechanism, first passing through a multi-head self-attention layer with a mask, and then passing through the query-aware cross-attention layer and the persona-aware cross-attention layer in turn, cycling L times to obtain the hidden vector H r L . Equations (5) to (8) are the decoding process of the lth layer.</p><p>h g l + 1 = M M H A ( h r l , h r l , h r l ) (5)</p><p>h q l + 1 , a q l + 1 = M H A ( h g l + 1 , H Q L , H Q L ) (6)</p><p>h p l + 1 , a p l + 1 = M H A ( h q l + 1 , H P L , H P L ) (7)</p><p>h r l + 1 = F N N ( h p l + 1 ) (8)</p><p>where MMHA refers to multi-head attention layer with mask, MHA refers to multi-head attention layer, FNN refers to fully connected feedforward neural network layer, h r 0 = e t a r g e t , l stands for the current number of layers, and L stands for the total number of layers.</p><p>Next, three vocabulary distributions are calculated, namely the vocabulary distribution P<sub>decode</sub> generated by the Transformer decoder, the vocabulary distribution P<sub>query</sub> generated according to the query-aware cross-attention layer and the vocabulary distribution P<sub>persona</sub> generated according to the persona-aware cross-attention layer. The calculation process is shown in Equations (9) to (11).</p><p>p d e c o d e = s o f t m a x ( H r L ⋅ W A + b A ) (9)</p><p>p q u e r y = a q L ⋅ o n e _ h o t q v o c a b (10)</p><p>p p e r s o n a = a p L ⋅ o n e _ h o t p v o c a b (11)</p><p>where W A ∈ ℝ h d i m &#215; | v o c a b | denotes the learnable weight matrix, b<sub>A</sub> denotes the bias, a denotes the attention score calculated by Equation (6) and Equation (7), and one_hot<sub>vocab</sub> denotes the unique hot encoding of the input corresponding vocabulary. Equations (12) and (13) show the linear combination of C<sub>query</sub> and C<sub>persona</sub> based on the decoder’s attention distribution on the dialogue query and persona information:</p><p>C q u e r y = a q L ⋅ H Q L (12)</p><p>C p e r s o n a = a p L ⋅ H P L (13)</p><p>Finally, the word probability distribution of the final responses is obtained by means of a hierarchical soft fusion. The calculation process is shown in Equations (15) to (16).</p><p>p g e n = S i g m o i d ( c a t ( C q u e r y , C p e r s o n a , H r L , e t a r g e t ) ⋅ W B + b B ) (14)</p><p>β , γ = s o f t m a x ( c a t ( C q u e r y , C p e r s o n a ) ⋅ W C ⋅ e t a r g e t ) (15)</p><p>p r e s p o n s e = p g e n &#215; p d e c o d e + β &#215; ( 1 − p g e n ) &#215; p q u e r y + γ &#215; ( 1 − p g e n ) &#215; p p e r s o n a (16)</p><p>where W B ∈ ℝ 4 ⋅ h d i m &#215; 1 and W C ∈ ℝ h d i m &#215; h d i m denotes the learnable weight matrix and b<sub>B</sub> denotes the bias.</p></sec></sec><sec id="s4"><title>4. Experiment</title><sec id="s4_1"><title>4.1. Datasets</title><p>To verify the effectiveness of the model, this paper conducts experiments on two public character dialogue datasets respectively, including the Chinese Persona-Chat (CPC) dataset published by Baidu<sup>1</sup> and the Persona-Chat (PC) dataset published by Zhang et al. [<xref ref-type="bibr" rid="scirp.118775-ref2">2</xref>]. Both datasets have similar structures, and are Persona-Dense multi-turn conversation datasets. We sliced and processed data into a single-turn conversation with one question and one answer, and each sample consists of three parts, namely, persona information (Persona), conversation query (Query), and gold response (Gold), where the persona information is the persona information of the responding party, which generally consists of three or four sentences. It is worth noting that, since the original CPC dataset contains a large number of dialogue responses irrelevant to persona information, in order to make the data more relevant to persona information, a large number of dialogues irrelevant to persona information are filtered out using hand-written scripts. The distribution of sample sizes in the final two datasets is shown in <xref ref-type="table" rid="table1">Table 1</xref>.</p></sec><sec id="s4_2"><title>4.2. Baseline Models</title><p>1) S2SA [<xref ref-type="bibr" rid="scirp.118775-ref24">24</xref>]. The encoder-decoder model is based on RNN and Attention mechanism, which was originally used in the field of machine translation. It is a classical Seq2Seq model and is widely used in comparison experiments for</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Number of data distribution</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Dataset</th><th align="center" valign="middle" >Train</th><th align="center" valign="middle" >Valid</th><th align="center" valign="middle" >Test</th></tr></thead><tr><td align="center" valign="middle" >CPC</td><td align="center" valign="middle" >93462</td><td align="center" valign="middle" >10000</td><td align="center" valign="middle" >4117</td></tr><tr><td align="center" valign="middle" >PC</td><td align="center" valign="middle" >112499</td><td align="center" valign="middle" >10000</td><td align="center" valign="middle" >7801</td></tr></tbody></table></table-wrap><p>dialogue generation. The number of RNN layers is set to 2, and the dimension size of both the hidden and word embedding layers is set to 512.</p><p>2) PGN [<xref ref-type="bibr" rid="scirp.118775-ref22">22</xref>]. The structure and parameter settings are the same as those of S2SA; the difference is that the decoder side adds a pointer network to directly copy the text from the input to guide the reply generation.</p><p>3) Transformer [<xref ref-type="bibr" rid="scirp.118775-ref25">25</xref>]. Based on the Encoder-Decoder model proposed by Google. It completely discards the RNN structure, replaces RNN with self-attention, and introduces a multi-head attention mechanism. In this paper, we use the same parameter settings for training as in the original paper.</p><p>4) Transfertransfo [<xref ref-type="bibr" rid="scirp.118775-ref7">7</xref>]. The first-place solution for automatic evaluation in the ConvAI2 competition, proposed by the Huggingface team. It was obtained using fine-tuning on pre-trained language model GPT on personalized dialogue data. Since there is no official Chinese version of GPT, this paper uses the Chinese GPT-2 model published by UER [<xref ref-type="bibr" rid="scirp.118775-ref26">26</xref>] for experiments.</p><p>5) LIC [<xref ref-type="bibr" rid="scirp.118775-ref8">8</xref>]. The first-place solution for human evaluation in the ConvAI2 competition, proposed by the Lost in Conversation team. It is a multi-input model that uses the encoder-decoder structure, using GPT initialization parameters similarly. For the Chinese dataset, the same Chinese GPT-2 model published by UER was used for experiments.</p><p>6) BERT2BERT [<xref ref-type="bibr" rid="scirp.118775-ref27">27</xref>]. A Seq2Seq model based on Transformer, both encoder and decoder are initialized using the official open-source BERT model.</p></sec><sec id="s4_3"><title>4.3. Experimental Settings</title><p>In our experiments, the optimizer is AdamW, the loss function is NLLLoss, the batch size is 16, the dropout ratio is set to 0.1, and the partial learning rate of the initialization parameters using the pre-training model is 7e - 6, and the learning rates of other parts are 5e - 5. The learning rate adjustment strategy is LinearSchedule, the number of preheating steps is 1/10 of the total steps, the number of epochs is 20, and each epoch is verified once, the best performing model in the verification set is saved as the final model. The decoding strategy is greedy decoding. For the vocabulary, all models in the Chinese dataset use the Chinese version of BERT vocabulary with the size of 21,128, while all models in the English dataset use the English BERT vocabulary except for the models initialized with GPT. All experiments are implemented on the PyTorch framework, using a single NVIDIA RTX 3090 24 GB GPU card for training.</p></sec><sec id="s4_4"><title>4.4. Evaluation Metrics</title><p>1) BLEU [<xref ref-type="bibr" rid="scirp.118775-ref28">28</xref>]. It is used to generate the similarity of evaluation responses to the gold responses, which was originally used for the evaluation of machine translation and is now widely used in a variety of NLP tasks, with larger values being better. In this paper, four tuples of BLEU (n = 1, 2, 3, 4) are used.</p><p>B L E U = B P ⋅ exp ( ∑ n = 1 N     w n log p n ) (17)</p><p>where B P = { 1                                                       if   c &gt; r e ( 1 − r / c )     if   c ≤ r ,   p n = ∑ C ∈ { C a n d i d a t e s }     ∑ n − g r a m ∈ C     C o u n t c l i p ( n − g r a m ) ∑ C ′ ∈ { C a n d i d a t e s }     ∑ n − g r a m ′ ∈ C ′     C o u n t c l i p ( n − g r a m ′ )</p><p>2) F1 [<xref ref-type="bibr" rid="scirp.118775-ref18">18</xref>]. The accuracy of the responses is evaluated based on the calculation of precision and recall at the character level of the generated responses, and the larger the value, the better.</p><p>F 1 = 2 ⋅ p r e c i s i o n ⋅ r e c a l l p r e c i s i o n + r e c a l l (18)</p><p>3) BERT-Score [<xref ref-type="bibr" rid="scirp.118775-ref29">29</xref>]. Word vector-based text generation evaluation metrics are encoded by pre-trained BERT to vectorize two sentences, and the degree of similarity between them is calculated by cosine similarity, and the higher the score, the better. In addition, to improve the readability of the data, we use rescaling BERT-Score, with a numerical range between −1 and 1.</p><p>R B E R T = 1 | x | ∑ x i ∈ x max x ^ j ∈ x ^ x i ⊺ x ^ j (19)</p><p>P B E R T = 1 | x ^ | ∑ x ^ j ∈ x ^ max x i ∈ x ^ x i ⊺ x ^ j (20)</p><p>F B E R T = 2 P B E R T ⋅ R B E R T P B E R T + R B E R T (21)</p><p>4) Persona coverage (P-Cover). Inspired by [<xref ref-type="bibr" rid="scirp.118775-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.118775-ref11">11</xref>], we used Persona coverage to evaluate persona consistency at the word level, calculating the ratio of generated responses to the overlapping unigrams between the sentences of each persona. The calculation is defined as:</p><p>C p e r = max i ∈ [ 1 , k ] S ( R , P i ) n (22)</p><p>where k is the number of persona sentences in persona profile, n is the number of words in persona sentence, and S(&#183;) is the set of shared words.</p><p>5) Persona embedding matching (P-EM). To evaluate the persona consistency at the sentence semantics level, we computed the cosine similarity of the generated response to each persona sentence after embedding using BERT. The calculation was defined as:</p><p>E M p e r = max i ∈ [ 1 , k ] C S ( B E R T ( R ) , B E R T ( P i ) ) (23)</p><p>where k is the number of persona sentences in persona profile, CS(&#183;) denote the calculation of cosine similarity, and BERT(&#183;) denotes embedding using BERT where the sentence vector is represented using the average of the word vectors.</p><p>6) Human Evaluation. Considering the limitations of automatic evaluation [<xref ref-type="bibr" rid="scirp.118775-ref30">30</xref>], which cannot reflect the real performance of the model well, this paper also conducts a manual evaluation. We randomly selected 100 test samples from the test data and assigned them to 3 reviewers for manual evaluation. They were evaluated from three aspects: fluency, relevance and persona consistency. Each aspect is divided into {0, 1, 2} three levels.</p></sec><sec id="s4_5"><title>4.5. Results and Analysis</title><p>The experimental results of different models on the CPC dataset and PC dataset are presented in <xref ref-type="table" rid="table2">Table 2</xref> to <xref ref-type="table" rid="table5">Table 5</xref>. It can be seen that the performance on the CPC dataset is numerically better than that on the PC dataset, probably because the CPC dataset was cleaned of data before use, while the PC dataset was not cleaned. Overall, the model proposed in this paper outperforms the baseline model in most of the major automatic evaluation metrics and human evaluation metrics.</p><p>Through the comparative analysis of the automatic evaluation results in <xref ref-type="table" rid="table2">Table 2</xref> and <xref ref-type="table" rid="table3">Table 3</xref>, it is obvious that the traditional RNN-based model has a large gap with the Transformer-based model in various metrics, which indicates that the Transformer-based model is much better than the RNN-based model in terms of representation capability. In addition, the proposed model achieved competitive results in BLEU, F1 and BERT-Score metrics compared with other baseline models, which indicates that the proposed model can generate more fluent and relevant responses. In terms of persona consistency, the P-Cover and P-EM metrics achieve the best performance in both datasets, indicating that the proposed model effectively improves the generated response persona consistency. The above results all prove that the BERT encoder and hierarchical copy mechanism are effective in improving the response quality and persona consistency of the persona dialogue generation model. It is worth noting that the BERT-based</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Automatic evaluation results on CPC dataset</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >BLEU-1/2/3/4</th><th align="center" valign="middle" >F1</th><th align="center" valign="middle" >BERT-Score</th><th align="center" valign="middle" >P-Cover</th><th align="center" valign="middle" >P-EM</th></tr></thead><tr><td align="center" valign="middle" >S2SA</td><td align="center" valign="middle" >28.80/9.32/2.50/0.56</td><td align="center" valign="middle" >31.80</td><td align="center" valign="middle" >0.103</td><td align="center" valign="middle" >25.49</td><td align="center" valign="middle" >72.67</td></tr><tr><td align="center" valign="middle" >PGN</td><td align="center" valign="middle" >31.00/12.13/4.86/1.96</td><td align="center" valign="middle" >33.17</td><td align="center" valign="middle" >0.119</td><td align="center" valign="middle" >26.52</td><td align="center" valign="middle" >73.40</td></tr><tr><td align="center" valign="middle" >Transformer</td><td align="center" valign="middle" >34.47/23.11/16.93/12.71</td><td align="center" valign="middle" >40.25</td><td align="center" valign="middle" >0.357</td><td align="center" valign="middle" >36.69</td><td align="center" valign="middle" >85.24</td></tr><tr><td align="center" valign="middle" >TransferTransfo</td><td align="center" valign="middle" >37.66/26.36/20.24/15.89</td><td align="center" valign="middle" >41.01</td><td align="center" valign="middle" >0.368</td><td align="center" valign="middle" >40.33</td><td align="center" valign="middle" >85.95</td></tr><tr><td align="center" valign="middle" >LIC</td><td align="center" valign="middle" >34.86/23.64/17.46/13.19</td><td align="center" valign="middle" >42.64</td><td align="center" valign="middle" >0.387</td><td align="center" valign="middle" >31.95</td><td align="center" valign="middle" >84.18</td></tr><tr><td align="center" valign="middle" >BERT2BERT</td><td align="center" valign="middle" >38.15/26.99/20.76/16.24</td><td align="center" valign="middle" >45.66</td><td align="center" valign="middle" >0.417</td><td align="center" valign="middle" >36.69</td><td align="center" valign="middle" >85.45</td></tr><tr><td align="center" valign="middle" >BERT-HCM</td><td align="center" valign="middle" >39.59/28.69/22.59/18.08</td><td align="center" valign="middle" >46.01</td><td align="center" valign="middle" >0.423</td><td align="center" valign="middle" >40.58</td><td align="center" valign="middle" >86.25</td></tr></tbody></table></table-wrap><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> Automatic evaluation results on PC dataset</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >BLEU-1/2/3/4</th><th align="center" valign="middle" >F1</th><th align="center" valign="middle" >BERT-Score</th><th align="center" valign="middle" >P-Cover</th><th align="center" valign="middle" >P-EM</th></tr></thead><tr><td align="center" valign="middle" >S2SA</td><td align="center" valign="middle" >10.02/2.81/0.85/0.27</td><td align="center" valign="middle" >16.72</td><td align="center" valign="middle" >-0.196</td><td align="center" valign="middle" >9.03</td><td align="center" valign="middle" >50.39</td></tr><tr><td align="center" valign="middle" >PGN</td><td align="center" valign="middle" >13.01/2.62/0.58/0.11</td><td align="center" valign="middle" >15.17</td><td align="center" valign="middle" >-0.160</td><td align="center" valign="middle" >8.36</td><td align="center" valign="middle" >54.13</td></tr><tr><td align="center" valign="middle" >Transformer</td><td align="center" valign="middle" >19.18/8.57/4.71/2.52</td><td align="center" valign="middle" >19.16</td><td align="center" valign="middle" >0.111</td><td align="center" valign="middle" >13.31</td><td align="center" valign="middle" >70.57</td></tr><tr><td align="center" valign="middle" >TransferTransfo</td><td align="center" valign="middle" >16.77/7.60/3.95/2.08</td><td align="center" valign="middle" >17.47</td><td align="center" valign="middle" >0.154</td><td align="center" valign="middle" >12.87</td><td align="center" valign="middle" >71.49</td></tr><tr><td align="center" valign="middle" >LIC</td><td align="center" valign="middle" >18.07/7.77/3.88/1.97</td><td align="center" valign="middle" >18.74</td><td align="center" valign="middle" >0.180</td><td align="center" valign="middle" >12.28</td><td align="center" valign="middle" >69.68</td></tr><tr><td align="center" valign="middle" >BERT2BERT</td><td align="center" valign="middle" >20.66/9.90/5.91/3.40</td><td align="center" valign="middle" >20.43</td><td align="center" valign="middle" >0.118</td><td align="center" valign="middle" >13.41</td><td align="center" valign="middle" >70.99</td></tr><tr><td align="center" valign="middle" >BERT-HCM</td><td align="center" valign="middle" >21.73/10.71/6.39/3.62</td><td align="center" valign="middle" >21.24</td><td align="center" valign="middle" >0.122</td><td align="center" valign="middle" >13.69</td><td align="center" valign="middle" >73.40</td></tr></tbody></table></table-wrap><p>model has a larger improvement in the relevant metrics compared to the GPT-based model, indicating that the addition of the BERT model does increase the semantic understanding of the model for the input.</p><p>Since the quality of RNN-based model generation is too low, only the Transformer-based model is manually evaluated and scored in this paper, as shown in <xref ref-type="table" rid="table4">Table 4</xref> and <xref ref-type="table" rid="table5">Table 5</xref>. The results of the human evaluation are consistent with those presented in the automatic evaluation, and the model proposed in this paper outperforms the baseline model in all human evaluation metrics, especially in persona consistency. It indicates that the addition of the pre-trained model and the hierarchical copy mechanism effectively improves the quality of model responses and persona consistency.</p></sec><sec id="s4_6"><title>4.6. Ablation Experiments</title><p>To verify the effectiveness of each part of the model proposed in this paper, ablation experiments are conducted in this section. <xref ref-type="table" rid="table6">Table 6</xref> shows the results of the ablation experiments. w/o BERT indicates the replacement of the encoder initialized with BERT with the randomly initialized Transform encoder, and w/o HCM indicates the removal of the hierarchical copy mechanism. According to the results, it can be seen that the metrics of persona-based dialogue generation decrease when the BERT-initialized encoder and the hierarchical copy mechanism are not used, respectively. It indicates that both the BERT encoder and the hierarchical copy mechanism contribute to the quality of dialogue generation</p><table-wrap id="table4" ><label><xref ref-type="table" rid="table4">Table 4</xref></label><caption><title> Human evaluation results of the CPC dataset</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >Fluency</th><th align="center" valign="middle" >Relevant</th><th align="center" valign="middle" >Persona Consistency</th></tr></thead><tr><td align="center" valign="middle" >Transformer</td><td align="center" valign="middle" >1.782</td><td align="center" valign="middle" >1.402</td><td align="center" valign="middle" >1.076</td></tr><tr><td align="center" valign="middle" >TransferTransfo</td><td align="center" valign="middle" >1.805</td><td align="center" valign="middle" >1.451</td><td align="center" valign="middle" >1.178</td></tr><tr><td align="center" valign="middle" >LIC</td><td align="center" valign="middle" >1.834</td><td align="center" valign="middle" >1.458</td><td align="center" valign="middle" >1.157</td></tr><tr><td align="center" valign="middle" >BERT2BERT</td><td align="center" valign="middle" >1.833</td><td align="center" valign="middle" >1.438</td><td align="center" valign="middle" >1.162</td></tr><tr><td align="center" valign="middle" >BERT-HCM</td><td align="center" valign="middle" >1.839</td><td align="center" valign="middle" >1.503</td><td align="center" valign="middle" >1.269</td></tr><tr><td align="center" valign="middle" >Gold</td><td align="center" valign="middle" >1.892</td><td align="center" valign="middle" >1.636</td><td align="center" valign="middle" >1.474</td></tr></tbody></table></table-wrap><table-wrap id="table5" ><label><xref ref-type="table" rid="table5">Table 5</xref></label><caption><title> Human evaluation results of the PC dataset</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Model</th><th align="center" valign="middle" >Fluency</th><th align="center" valign="middle" >Relevant</th><th align="center" valign="middle" >Persona Consistency</th></tr></thead><tr><td align="center" valign="middle" >Transformer</td><td align="center" valign="middle" >1.562</td><td align="center" valign="middle" >1.344</td><td align="center" valign="middle" >0.998</td></tr><tr><td align="center" valign="middle" >TransferTransfo</td><td align="center" valign="middle" >1.566</td><td align="center" valign="middle" >1.350</td><td align="center" valign="middle" >1.101</td></tr><tr><td align="center" valign="middle" >LIC</td><td align="center" valign="middle" >1.571</td><td align="center" valign="middle" >1.368</td><td align="center" valign="middle" >1.087</td></tr><tr><td align="center" valign="middle" >BERT2BERT</td><td align="center" valign="middle" >1.572</td><td align="center" valign="middle" >1.352</td><td align="center" valign="middle" >1.103</td></tr><tr><td align="center" valign="middle" >BERT-HCM</td><td align="center" valign="middle" >1.588</td><td align="center" valign="middle" >1.372</td><td align="center" valign="middle" >1.133</td></tr><tr><td align="center" valign="middle" >Gold</td><td align="center" valign="middle" >1.666</td><td align="center" valign="middle" >1.427</td><td align="center" valign="middle" >1.286</td></tr></tbody></table></table-wrap><p>and the persona consistency of dialogue. The performance of both datasets is similar. For example, in the PC dataset, the BLEU-4 of the model decreases by 1.39%, BERT-Score decreases by 0.053, P-Cover and P-EM decreases by 0.52% and 3.7%, respectively, when the encoder initialized with BERT is not used. When the hierarchical copy mechanism was removed, BLEU-4 decreased by 0.31%, BERT-Score decreased by 0.002, P-Cover decreased by 0.07%, and P-EM decreased by 2.55%, respectively. It shows that the encoder based on BERT initialization contributes more to the model performance improvement, not only brings a greater improvement in quality and relevance of responses but also brings some improvement to the persona consistency. The hierarchical copy mechanism, although not as significant as the BERT encoder’s contribution to the response quality, also brings a big improvement to the persona consistency of the model.</p></sec><sec id="s4_7"><title>4.7. Case Study</title><p><xref ref-type="table" rid="table7">Table 7</xref> is a sample comparison of the results generated by the model in this</p><table-wrap id="table6" ><label><xref ref-type="table" rid="table6">Table 6</xref></label><caption><title> Ablation experiment results on CPC and PC datasets</title></caption><table><tbody><thead><tr><th align="center" valign="middle"  rowspan="2"  >Model</th><th align="center" valign="middle"  colspan="4"  >CPC</th><th align="center" valign="middle"  colspan="4"  >PC</th></tr></thead><tr><td align="center" valign="middle" >BLEU-4</td><td align="center" valign="middle" >BERT-Score</td><td align="center" valign="middle" >P-Cover</td><td align="center" valign="middle" >P-EM</td><td align="center" valign="middle" >BLEU-4</td><td align="center" valign="middle" >BERT-Score</td><td align="center" valign="middle" >P-Cover</td><td align="center" valign="middle" >P-EM</td></tr><tr><td align="center" valign="middle" >BERT-HCM</td><td align="center" valign="middle" >18.08</td><td align="center" valign="middle" >0.423</td><td align="center" valign="middle" >40.58</td><td align="center" valign="middle" >86.25</td><td align="center" valign="middle" >3.62</td><td align="center" valign="middle" >0.122</td><td align="center" valign="middle" >13.41</td><td align="center" valign="middle" >73.40</td></tr><tr><td align="center" valign="middle" >w/o BERT</td><td align="center" valign="middle" >11.08</td><td align="center" valign="middle" >0.345</td><td align="center" valign="middle" >33.69</td><td align="center" valign="middle" >83.86</td><td align="center" valign="middle" >2.23</td><td align="center" valign="middle" >0.069</td><td align="center" valign="middle" >12.89</td><td align="center" valign="middle" >69.70</td></tr><tr><td align="center" valign="middle" >w/o HCM</td><td align="center" valign="middle" >16.94</td><td align="center" valign="middle" >0.421</td><td align="center" valign="middle" >38.25</td><td align="center" valign="middle" >85.53</td><td align="center" valign="middle" >3.31</td><td align="center" valign="middle" >0.120</td><td align="center" valign="middle" >13.34</td><td align="center" valign="middle" >70.85</td></tr></tbody></table></table-wrap><table-wrap id="table7" ><label><xref ref-type="table" rid="table7">Table 7</xref></label><caption><title> Responses generated from BERT-HCM and other baseline models</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Persona</th><th align="center" valign="middle" >我还没有结婚。我喜欢上了我的同事。我总是穿牛仔裤(I’m not married yet. I fell in love with my colleagues. I always wear jeans)</th></tr></thead><tr><td align="center" valign="middle" >Query</td><td align="center" valign="middle" >我只是好奇设计师平时都会穿些什么。你结婚了吗？(I’m just curious about what designers usually wear. Are you married?)</td></tr><tr><td align="center" valign="middle" >Gold</td><td align="center" valign="middle" >我还没有结婚呢，不过我有喜欢的人。我很喜欢我的同事。(I’m not married yet, but I have someone I like. I like my colleagues very much.)</td></tr><tr><td align="center" valign="middle" >BERT-HCM</td><td align="center" valign="middle" >我还没有结婚，我现在还是单身，我喜欢上了我的同事。(I’m not married yet. I’m still single. I fell in love with my colleagues.)</td></tr><tr><td align="center" valign="middle" >BERT2BERT</td><td align="center" valign="middle" >我还没有结婚，我现在还在上学，我很爱我的男朋友。(I’m not married yet. I’m still at school. I love my boyfriend very much.)</td></tr><tr><td align="center" valign="middle" >LIC</td><td align="center" valign="middle" >我还没有结婚，我的朋友都说我是个女生。(I’m not married yet. My friends say I’m a girl.)</td></tr><tr><td align="center" valign="middle" >TransferTransfo</td><td align="center" valign="middle" >我结婚了，我还是个单身狗呢。(I’m married. I’m still a single dog.)</td></tr><tr><td align="center" valign="middle" >Transformer</td><td align="center" valign="middle" >我喜欢吃牛肉，我喜欢牛肉，我觉得牛肉很好吃。(I like beef. I like beef. I think beef is delicious.)</td></tr><tr><td align="center" valign="middle" >PGN</td><td align="center" valign="middle" >结了，都经婚我的作了，是为么人我欢。是为么人我不道。(When I am married, I have done it. Is it for me. I don’t know why.)</td></tr><tr><td align="center" valign="middle" >S2SA</td><td align="center" valign="middle" >结了我经和一恋婚，是个生，是个孩，是最欢的情。是的(After I got married and fell in love, I was a student, a child and the happiest love. yes)</td></tr></tbody></table></table-wrap><p>paper and the baseline model. It can be seen that the responses generated by the RNN-based models PGN and S2SA have great problems in readability, and the generated responses are basically unreadable. It confirmed the superiority of the Transformer-based model in dialogue generation modeling again. In addition, the model proposed in this paper is superior to several other baseline models in terms of the ability to understand dialogue queries and persona information and the consistency of generated responses. For example, the persona information shows “I like me my colleague” indicates that the background of the person is an office worker, but the BERT2BERT model replied that he was still in school, which conflicted with the persona information. Although there was no conflict in LIC, the response in the second half of the sentence was almost irrelevant to the dialogue query, and the response from the TransferTransfo model is inconsistent; the Transformer model mistakenly interprets jeans as food beef. In contrast, our model can generate a fluent, relevant and persona-consistent response, proving that the proposed model understands semantic information more fully and the responses have better persona consistency.</p></sec></sec><sec id="s5"><title>5. Conclusions</title><p>In this paper, we propose an encoder-decoder model based on Transformer to address persona-based conversation generation. Our model uses the pre-trained bidirectional language model BERT to initialize the encoder of the model to greatly enhance the model’s language understanding ability. Moreover, we incorporate an innovative hierarchical copy mechanism on the decoder side, which allows the model to dynamically copy the content of the input side. The combination of both effectively improves the persona consistency of the generated responses. Experimental results show that the proposed model can generate more relevant, fluent and persona-consistent responses than baseline models.</p><p>The research in this paper has certain limitations. For example, this paper only considers a single-round dialogue. In reality, the dialogue often includes multiple rounds, and the continuity between the multiple rounds is relatively important. The follow-up plan is to further study the multi-round persona-based dialogue. In addition, the persona information of the dataset used in this paper is relatively limited. In the future, we will consider introducing more knowledge through topic models, common sense reasoning, etc., to improve the diversity of persona-based dialogues.</p></sec><sec id="s6"><title>Fund</title><p>Supported by the Science and Technology Plan of Zigong Science and Technology Bureau (2018GYCX33), and Graduate Innovation Fund of Sichuan University of Science and Engineering (y2021096).</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Liu, Z.J., Peng, Y. and Ni, S.F. (2022) Personalized Dialogue Generation Model Based on BERT and Hierarchical Copy Mechanism. Journal of Computer and Communications, 10, 35-52. https://doi.org/10.4236/jcc.2022.107003<sup> </sup></p></sec><sec id="s9"><title>NOTES</title></sec></body><back><ref-list><title>References</title><ref id="scirp.118775-ref1"><label>1</label><mixed-citation publication-type="book" xlink:type="simple">Turing, A.M. (2009) Computing Machinery and Intelligence. In: Epstein, R., Roberts, G. and Beber, G., Eds., Parsing the Turing Test, Springer, Dordrecht, 23-65. https://doi.org/10.1007/978-1-4020-6710-5_3</mixed-citation></ref><ref id="scirp.118775-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, S., Dinan, E., Urbanek, J., Szlam, A., Kiela, D. and Weston, J. (2018) Personalizing Dialogue Agents: I Have a Dog, Do You Have Pets Too? Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Melbourne, 16-18 July 2018, 2204-2213. https://doi.org/10.18653/v1/P18-1205</mixed-citation></ref><ref id="scirp.118775-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Zheng, Y., Chen, G., Huang, M., Liu, S. and Zhu, X. (2019) Personalized Dialogue Generation with Diversified Traits.</mixed-citation></ref><ref id="scirp.118775-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Qian, Q., Huang, M., Zhao, H., Xu, J. and Zhu, X. (2018) Assigning Personality/Profile to a Chatting Machine for Coherent Conversation Generation. Proceedings of the 27th International Joint Conference on Artificial Intelligence, Stockholm, 13-19 July 2018, 4279-4285. https://doi.org/10.24963/ijcai.2018/595</mixed-citation></ref><ref id="scirp.118775-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Song, H., Zhang, W.-N., Cui, Y., Wang, D. and Liu, T. (2019) Exploiting Persona Information for Diverse Generation of Conversational Responses. Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, Macao, 10-16 August 2019, 5190-5196. https://doi.org/10.24963/ijcai.2019/721</mixed-citation></ref><ref id="scirp.118775-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Yavuz, S., Rastogi, A., Chao, G.-L. and Hakkani-Tur, D. (2019) DeepCopy: Grounded Response Generation with Hierarchical Pointer Networks. Proceedings of the 20th Annual SIGdial Meeting on Discourse and Dialogue, Stockholm, 11-13 September 2019, 122-132. https://doi.org/10.18653/v1/W19-5917</mixed-citation></ref><ref id="scirp.118775-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Wolf, T., Sanh, V., Chaumond, J. and Delangue, C. (2019) Transfertransfo: A Transfer Learning Approach for Neural Network Based Conversational Agents.</mixed-citation></ref><ref id="scirp.118775-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Golovanov, S., Kurbanov, R., Nikolenko, S., Truskovskyi, K., Tselousov, A. and Wolf, T. (2019) Large-Scale Transfer Learning for Natural Language Generation. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, 29-31 July 2019, 6053-6058. https://doi.org/10.18653/v1/P19-1608</mixed-citation></ref><ref id="scirp.118775-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Zheng, Y., Zhang, R., Huang, M. and Mao, X. (2020) A Pre-Training Based Personalized Dialogue Generation Model with Persona-Sparse Data. Proceedings of the Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, New York, 7-12 February 2020, 9693-9700. https://doi.org/10.1609/aaai.v34i05.6518</mixed-citation></ref><ref id="scirp.118775-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Liu, Q., Chen, Y., Chen, B., Lou, J.-G., Chen, Z., Zhou, B., et al. (2020) You Impress Me: Dialogue Generation via Mutual Persona Perception. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5-10 July 2020, 1417-1427. https://doi.org/10.18653/v1/2020.acl-main.131</mixed-citation></ref><ref id="scirp.118775-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Wang, W., Feng, S., Chen, L., Wang, D. and Zhang, Y. (2021) Learning to Improve Persona Consistency in Conversation Generation with Information Augmentation. Knowledge-Based Systems, 228, Article ID: 107246. https://doi.org/10.1016/j.knosys.2021.107246</mixed-citation></ref><ref id="scirp.118775-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Cao, Y., Bi, W., Fang, M., Shi, S. and Tao, D. (2022) A Model-Agnostic Data Manipulation Method for Persona-Based Dialogue Generation. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Dublin, 22-27 May 2022, 7984-8002. https://doi.org/10.18653/v1/2022.acl-long.550</mixed-citation></ref><ref id="scirp.118775-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Radford, A., Wu, J., Child, R., Luan, D., Amodei, D. and Sutskever, I. (2019) Language Models Are Unsupervised Multitask Learners. OpenAI Blog, 1, 9.</mixed-citation></ref><ref id="scirp.118775-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Devlin, J., Chang, M.-W., Lee, K. and Toutanova, K. (2019) BERT: Pre-Training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, 3-5 June 2019, 4171-4186.</mixed-citation></ref><ref id="scirp.118775-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Li, J., Galley, M., Brockett, C., Spithourakis, G., Gao, J. and Dolan, B. (2016) A Persona-Based Neural Conversation Model. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Berlin, 8-10 August 2016, 994-1003. https://doi.org/10.18653/v1/P16-1094</mixed-citation></ref><ref id="scirp.118775-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Olabiyi, O., Salimov, A.O., Khazane, A. and Mueller, E. (2019) Multi-Turn Dialogue Response Generation in an Adversarial Learning Framework. Proceedings of the First Workshop on NLP for Conversational AI, Florence, 1-2 August 2019, 121-132. https://doi.org/10.18653/v1/W19-4114</mixed-citation></ref><ref id="scirp.118775-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Huang, M., Zhu, X. and Gao, J. (2020) Challenges in Building Intelligent Open-Domain Dialog Systems. ACM Transactions on Information Systems (TOIS), 38, 1-32. https://doi.org/10.1145/3383123</mixed-citation></ref><ref id="scirp.118775-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Dinan, E., Logacheva, V., Malykh, V., Miller, A., Shuster, K., Urbanek, J., et al. (2019) The Second Conversational Intelligence Challenge (ConvAI2). The Springer Series on Challenges in Machine Learning, Springer, Berlin, 187-208. https://doi.org/10.1007/978-3-030-29135-8_7</mixed-citation></ref><ref id="scirp.118775-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Chen, W., Gong, Y., Wang, S., Yao, B., Qi, W., Wei, Z., et al. (2022) DialogVED: A Pre-Trained Latent Variable Encoder-Decoder Model for Dialog Response Generation. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Dublin, 22-27 May 2022, 4852-4864. https://doi.org/10.18653/v1/2022.acl-long.333</mixed-citation></ref><ref id="scirp.118775-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, Y., Sun, S., Galley, M., Chen, Y.-C., Brockett, C., Gao, X., et al. (2020) DIALOGPT: Large-Scale Generative Pre-Training for Conversational Response Generation. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, Online, 5-10 July 2020, 270-278. https://doi.org/10.18653/v1/2020.acl-demos.30</mixed-citation></ref><ref id="scirp.118775-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Gu, J., Lu, Z., Li, H. and Li, V.O.K. (2016) Incorporating Copying Mechanism in Sequence-to-Sequence Learning. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Berlin, 8-10 August 2016, 1631-1640. https://doi.org/10.18653/v1/P16-1154</mixed-citation></ref><ref id="scirp.118775-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">See, A., Liu, P.J. and Manning, C.D. (2017) Get to the Point: Summarization with Pointer-Generator Networks. Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Vancouver, 31 July-2 August 2017, 1073-1083. https://doi.org/10.18653/v1/P17-1099</mixed-citation></ref><ref id="scirp.118775-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Wu, C.-s., Socher, R. and Xiong, C. (2019) Global-to-Local Memory Pointer Networks for Task-Oriented Dialogue. Proceedings of the 7th International Conference on Learning Representations, ICLR 2019, New Orleans, 6-9 May 2019.</mixed-citation></ref><ref id="scirp.118775-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Bahdanau, D., Cho, K. and Bengio, Y. (2014) Neural Machine Translation by Jointly Learning to Align and Translate.</mixed-citation></ref><ref id="scirp.118775-ref25"><label>25</label><mixed-citation publication-type="other" xlink:type="simple">Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., et al. (2017) Attention Is All You Need. Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, Long Beach, 4-9 December 2017, 5998-6008.</mixed-citation></ref><ref id="scirp.118775-ref26"><label>26</label><mixed-citation publication-type="other" xlink:type="simple">Zhao, Z., Chen, H., Zhang, J., Zhao, X., Liu, T., Lu, W., et al. (2019) UER: An Open-Source Toolkit for Pre-Training Models. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP): System Demonstrations, Hong Kong, 3-7 November 2019, 241-246. https://doi.org/10.18653/v1/D19-3041</mixed-citation></ref><ref id="scirp.118775-ref27"><label>27</label><mixed-citation publication-type="other" xlink:type="simple">Rothe, S., Narayan, S. and Severyn, A. (2020) Leveraging Pre-Trained Checkpoints for Sequence Generation Tasks. Transactions of the Association for Computational Linguistics, 8, 264-280. https://doi.org/10.1162/tacl_a_00313</mixed-citation></ref><ref id="scirp.118775-ref28"><label>28</label><mixed-citation publication-type="other" xlink:type="simple">Papineni, K., Roukos, S., Ward, T. and Zhu, W.-J. (2002) Bleu: A Method for Automatic Evaluation of Machine Translation. Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, Philadelphia, U 7-12 July 2002, 311-318. https://doi.org/10.3115/1073083.1073135</mixed-citation></ref><ref id="scirp.118775-ref29"><label>29</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, T., Kishore, V., Wu, F., Weinberger, K.Q. and Artzi, Y. (2020) BERTScore: Evaluating Text Generation with BERT. Proceedings of the 8th International Conference on Learning Representations, Addis Ababa, 26-30 April 2020.</mixed-citation></ref><ref id="scirp.118775-ref30"><label>30</label><mixed-citation publication-type="other" xlink:type="simple">Novikova, J., Du&amp;scaron;ek, O., Cercas Curry, A. and Rieser, V. (2017) Why We Need New Evaluation Metrics for NLG. Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, EMNLP 2017, Copenhagen, 9-11 September 2017, 2241-2252. https://doi.org/10.18653/v1/D17-1238</mixed-citation></ref></ref-list></back></article>