Personalization of natural language generation plays a vital role in a large spectrum of tasks, such as explainable recommendation, review summarization and dialog systems. In these tasks, user and item IDs are important identi-fiers for personalization. Transformer, which is demonstrated with strong language modeling capability, however, is not personalized and fails to make use of the user and item IDs since the ID tokens are not even in the same semantic space as the words. To address this problem, we present a PErsonalized Transformer for Explainable Recommendation (PE-TER 1 ), on which we design a simple and effective learning objective that utilizes the IDs to predict the words in the target explanation, so as to endow the IDs with linguistic meanings and to achieve personalized Transformer. Besides generating explanations, PETER can also make recommendations, which makes it a unified model for the whole recommendation-explanation pipeline. Extensive experiments show that our small unpretrained model outperforms fine-tuned BERT on the generation task, in terms of both effectiveness and efficiency, which highlights the importance and the nice utility of our design. Recent years have witnessed the successful application of natural language generation. Many of the applications in fact require certain degree of personalization, such as explainable recommendation (Zhang et al., 2014; Li et al., 2020c; Zhang and Chen, 2020), review generation (Dong et al., 2017), review summarization (Li et al., 2019), and conversational systems (Zhang et al., 2018; Chen et al., 2020). In these tasks, user and item IDs that distinguish one user/item from the others are crucial to 1 https://github.com/lileipisces/PETER personalization. For example, in recommender systems, different users may care about different item features (e.g., style vs. quality ), and different items may have different characteristics (e.g., fashionable vs. comfortable ). The goal of explainable recommendation (Zhang and Chen, 2020) is to provide an explanation to a user for a recommended item, so as to justify how the recommendation might match his/her interests. That is, given a pair of user ID and item ID, the system needs to generate an explanation, such as  the style of the jacket is fashionable  (see the last column of Table 4 for more examples). Transformer (Vaswani et al., 2017), whose strong language modeling ability has been demonstrated on a variety of tasks (Radford et al., 2018; Devlin et al., 2019; Brown et al., 2020), however, is relatively under-explored for personalized natural language generation. Since IDs and words are in very different semantic spaces, it would be problematic to directly put them together for attention learning, because by doing so, the IDs are treated as words, but the IDs appear far less frequently than the words. For example, a paragraph of review (and thus hundreds of words) on e-commerce platform only corresponds to a single pair of user ID and item ID. As such, the IDs may be regarded as out-of-vocabulary tokens, to which the model is insensitive. As shown in Fig. 1(a), when generating an explanation for a user-item pair, standard Transformer relies heavily on the special < bos > token instead of the user or the item. This would result in identical explanations over different user-item pairs (see USR score in Table 2), deviating from our personalization goal. To address this problem, we bridge IDs and words by designing an elegant task called context prediction , which maps IDs onto words to be generated by the explanation task. This in some way resembles one's drafting-polishing process, where by predicting some words the context prediction [ U s e r ] [ I t e m ] < b o s > t h e h o t e l i s l o c a t e d i n t h e h e a r t o f t h e c i t y a n d t h e c i t y c e n t r e i s Source [User] [Item] the hotel is located in the heart of the city and the city centre is <eos> T a r g e t 0.0 0.2 0.4 0.6 0.8 1.0 (b) Our PETER model, where the user and item IDs play significant roles in the generation steps. task does the job of drafting. Then, the explanation generation task polishes these words so as to form a readable sentence. Meanwhile, we demonstrate that conducting recommendation task on the same model is also feasible, so we name it PETER, which stands for PErsonalized Transformer for Explainable Recommendation. As we can see in Fig. 1(b), when PETER generates an explanation for the same user-item pair, it can utilize the information of both the user and the item, which illustrates the effectiveness of our context prediction task. In addition, PETER is flexible to incorporate item features that can help to guide its generation. This can be very useful when, for instance, a user proactively asks the system to explain certain feature(s) of a recommendation (Li et al., 2020c), e.g., price . Then, we would expect the model to generate a targeted explanation, such as  great jacket, especially for the price . PETER is a small unpretrained Transformer with only 2 layers, yet it outperforms a fine-tuned BERT (Ni et al., 2019) on most metrics by a large margin, and takes less time to train, as shown in our experiments. This manifests the superiority of our model. In summary, our key contributions are:  We propose PETER that makes recommendation and generates explanation simultaneously based on user and item IDs for explainable recommendation. To the best of our knowledge, we are the first to enable Transformer with personalized natural language generation. We evaluate the generated explanations on not only text quality metrics (such as BLEU and ROUGE), but also metrics that particularly focus on explainability from the angle of item features. Extensive experiments show that our model can outperform state-of-the-art baselines on large datasets. Our solution sheds light on a broader scope of fields that also need personalization (e.g., personalized conversational systems). In addition, it points out a way for Transformer to deal with heterogeneous inputs, e.g., text and images in multimodal artificial intelligence. Explainable recommendation (Zhang et al., 2014; Zhang and Chen, 2020) has been studied from two major perspectives: human-computer interaction and machine learning. The former (Gedikli et al., 2014; Chen and Wang, 2017; Chen et al., 2019b) investigates how people perceive different styles of explanations, while the latter provides explanations by designing new explainable recommendation algorithms, to which our work is more related. There exist various types of explanation styles, such as pre-defined templates (Zhang et al., 2014; Li et al., 2020a), ranked sentences (Chen et al., 2019d; Li et al., 2021), image visualizations (Chen et al., 2019c), knowledge graph paths (Ai et al., 2018; Xian et al., 2019; Fu et al., 2020; Xian et al., 2020), reasoning rules (Shi et al., 2020; Chen et al., 2021; Zhu et al., 2021), etc., among which, recently, generated natural language explanations (Ni et al., 2019; Li et al., 2020c) have received much attention, mainly owing to the advancement of natural language generation technology and the availability of textual data on recommendation platforms such as e-commerce. However, previous works mostly rely on recurrent neural networks (RNN), e.g., LSTM (Hochreiter and Schmidhuber, 1997) and GRU (Cho et al., 2014), leaving the potentially more effective Transformer under-explored, which motivates this work. Transformer (Vaswani et al., 2017) was first brought to machine translation with the architecture of encoder-decoder. Later works (Liu et al., 2018; Devlin et al., 2019) show that it remains effective, even when the encoder or the decoder is removed, reducing nearly half of the parameters. Under the paradigm of pre-training plus fine-tuning, Transformer's effectiveness has been con-firmed on a wide range of tasks, including both natural language understanding and generation (Rad-ford et al., 2018; Devlin et al., 2019; Dong et al., 2019). Particularly, it is able to perform novel tasks, e.g., arithmetic, after scaling up both the model and the training data (Radford et al., 2019; Brown et al., 2020). However, it may not be friendly to researchers who do not possess large amounts of computing resources. Instead, our work explores small unpretrained models, as they are computationally cheaper and more flexible when being adapted to new applications, e.g., personalized generation. Personalized generation usually involves the IDs of users and items. Previous approaches typically adopt multi-layer perceptron (MLP) to encode the IDs into a context vector, from which RNN can decode a word sequence. This strategy can be found in many applications, such as review generation (Dong et al., 2017), tip generation (Li et al., 2017) and explanation generation (Li et al., 2020c). However, it does not fit Transformer that relies entirely on self-attention. Probably because a proper solution to deal with heterogeneous inputs (i.e., IDs and words) is yet to be found, previous works with Transformer for personalized generation replace IDs with text segments, such as persona attributes (Zheng et al., 2020), movie titles (Zhou et al., 2020) and item features (Ni et al., 2019), which are in the same semantic space as the word sequence to be generated. In comparison, our solution is to design an effective task that can give the IDs linguistic Transformer with  Layers Transformer with  Layers Linear Layer  ,  1  2 <  >   <  >  2  1  2  1  ,1  ,2  ,5  ,6  ,7  ,3  ,4 User Item Features (opt.) Explanation Rating Prediction Context Prediction Explanation Generation MLP  1  2 <  > Figure 2: Our proposed model PETER that contains three tasks. meanings, thus connecting IDs with words. The goal of our explanation task is to generate a natural language sentence  E u,i for a pair of user u and item i to justify why i is recommended to u . Meanwhile, our model PETER can also make recommendations by estimating a rating  r u,i that predicts u 's preference towards i . At the testing stage, only user u and item i are used as inputs for producing both explanation and recommendation. When item features F u,i are available, our model is flexible to incorporate them by simply concatenating them at the beginning of the explanation. In this case, the features are also needed in the testing stage. In the following, we will discuss both cases. In this section, we present the details of our model PETER. First, we show how to encode different types of tokens in a sequence. Then, we briefly review Transformer and introduce our revised attention masking matrix. At last, we formulate the three tasks, i.e., explanation generation, context prediction and recommendation, and integrate them into a multi-task learning framework. We first introduce our way to encode heterogeneous inputs into vector representations. As shown in Fig. 2, the input to our model is a sequence, consisting Source T a r g e t    1  2 <  >  1  2   <  >  1  2 Allow to attend Prevent from attending  1  2 Figure 3: The attention masking used in our model that we call PETER masking. of user ID u , item ID i , features F u,i , and explanation E u,i . The user and the item serve for the purpose of personalization, i.e., aiming to make the generated explanation reflect both the user's interests and the item's attributes. The features can guide the model to talk about certain topics. For instance, a conversational recommender system may explain a recommendation's specialty to the user with the goal of knowing more about his/her preference (Chen et al., 2020). Since the features are not always available, in our experiments we test both cases (with and without them). When they are available, the input sequence can be represented as S = [ u, i, f 1 ,    , f | F u,i | , e 1 ,    , e | E u,i | ] , where f 1 ,    , f | F u,i | are the features and e 1 ,    , e | E u,i | are the explanation's word sequence. | F u,i | denotes the number of features and | E u,i | is the number of words in the explanation. Clearly there are three types of tokens in the sequence S , i.e., users, items, and words (includ-ing features), for which we prepare three sets of randomly initialized token embeddings U , I and V respectively, besides the positional embeddings P that encode the position of each token in the sequence. Notice that, we do not add users and items to the vocabulary V , given that it costs more time to predict a word out of the huge amount of IDs (for example, millions of users and items in e-commerce). After performing embedding lookup, we can obtain the sequence's token representation [ u , i , f 1 ,    , f | F u,i | , e 1 ,    , e | E u,i | ] and its positional representation [ p 1 ,    , p | S | ] , where | S | is the length of the sequence. The input representation of the sequence is the addition of the corresponding token representation and positional representation, denoted as S 0 = [ s 0 , 1 ,    , s 0 , | S | ] . To enable the three tasks, we show how to modify the attention masking mechanism in Transformer (Vaswani et al., 2017). Transformer consists of L identical layers, each of which is composed of two sub-layers: multi-head self-attention and position-wise feed-forward network. The l -th layer encodes the previous layer's output S l  1 into S l , where l  [1 , L ] . In the multi-head self-attention sublayer, the computation of each attention head is also identical, and among the H heads of the l -th layer, the h -th head A l,h is computed as follows: A l,h = softmax ( Q l,h K (cid:62) l,h  d + M ) V l,h Q l,h = S l  1 W Ql,h , K l,h = S l  1 W Kl,h , V l,h = S l  1 W Vl,h M = (cid:40) 0 , Allow to attend  , Prevent from attending (1) where S l  1  R | S | d is the ( l  1) -th layer's output, W Ql,h , W Kl,h , W Vl,h  R d  dH are projection matrices, d denotes the dimension of embeddings, and M  R | S || S | is the attention masking matrix. Each element in M controls whether a token in the sequence can attend to another. For example, in the unidirectional left-to-right language model (Radford et al., 2018), the lower triangular part of M is set to 0 and the remaining part  , so as to allow each token to attend to past tokens (includ-ing itself), but prevent it from attending to future tokens. We call it Left-to-Right Masking . As our model is not limited to the left-to-right explanation generation task, we modify the masking mechanism to accommodate the other two tasks (i.e., context prediction and recommendation). As shown in Fig. 3, the first two tokens u and i in the sequence can attend to each other, because both context prediction and recommendation tasks need them. To echo our model, we name it PETER Masking . In the following, we perform the three tasks, after obtaining the sequence's final representation SL = [ s L, 1 ,    , s L, | S | ] from Transformer. The key challenge lies in the personalization of explanation generation task, for which we design the context prediction task. For both tasks, we apply a linear layer to the final representation of each token to map it into a |V| -sized vector. As an example, after passing through this layer, s L,t becomes c t : c t = softmax ( W v s L,t + b v ) (2) where W v  R |V| d and b v  R |V| are weight parameters. The vector c t represents the probability distribution over the vocabulary V , from which a word e with probability c et can be sampled. Explanation Generation: We adopt the Negative Log-Likelihood (NLL) as the explanation task's loss function, and compute the mean of user-item pairs in the training set: L e = 1 |T | (cid:88) ( u,i ) T 1 | E u,i | | E u,i | (cid:88) t =1  log c e t 2+ | F u,i | + t (3) where T denotes the training set. The probability c e t t is offset by 2 + | F u,i | positions because the explanation is placed at the end of the sequence, and | F u,i | = 0 when the features are unavailable. At the testing stage, along with u , i , and F u,i (if available), we feed the model a special begin-of-sequence token < bos > . From its resulting probability distribution c <bos> , the model can predict a word. For simplicity, among the many decoding methods, we opt for greedy decoding that samples the word with the largest probability. Then we can concatenate this predicted word at the end of the sequence to form a new input sequence for generating another word. We do this repeatedly until the model produces a special end-of-sequence token < eos > , or the generated explanation  E u,i reaches a pre-defined length. Context Prediction: As discussed earlier, when there is only one task of explanation generation, Transformer fails to make use of user ID and item ID, resulting in identical sentences. To address this issue, we design this task to map the IDs onto the words in the explanation, so as to build a connection between them. Since the first two positions ( u and i ) of the sequence are allowed to attend to each other, both of their final representations absorb the information of the user and the item. Thus, we can use either of them to perform this task. Here, we use the 2nd one for better illustration in Fig. 2. Again, we adopt NLL as the loss function: L c = 1 |T | (cid:88) ( u,i ) T 1 | E u,i | | E u,i | (cid:88) t =1  log c e t 2 (4) where the difference from Eq. (3) is that all predicted words are from the 2nd position, which is why they are not sequentially ordered (see Fig. 2). Rating Prediction: Recommendation can be seen as a prediction problem (Chen et al., 2021) where the goal is to predict a score  r u,i based on the IDs of user u and item i . As both u and i in the sequence can attend to each other, their final representations capture the interaction between them. Next, we map the 1st representation s L, 1 into a scalar (because the 2nd one is used for context prediction). To this end, we employ multi-layer perceptron (MLP) with one hidden layer as follows:  r u,i = w r  ( W r s L, 1 + b r ) + b r (5) where W r  R d  d , b r  R d , w r  R 1  d and b r  R are weight parameters, and  (  ) is the sigmoid function. Therefore, it can be seen that it is feasible to do both recommendation and explanation on Transformer. As recommendation is not the key focus of this paper, we leave its improvement in the future work. For this task, we use Mean Square Error (MSE) as the loss function: L r = 1 |T | (cid:88) ( u,i ) T ( r u,i   r u,i ) 2 (6) where r u,i is the ground-truth rating. Multi-task Learning: At last, we integrate the three tasks into a multi-task learning framework whose objective function is defined as: J = min  (  e L e +  c L c +  r L r ) (7) where  denotes all the trainable parameters in the model, and  e ,  c and  r are regularization weights that balance the learning of different tasks. In this way, the model can be trained efficiently in an end-to-end manner. For experimentation, we adopt three publicly available explainable recommendation datasets, and their data splits (Li et al., 2020c). During the splitting process, each dataset is randomly divided into training, validation and testing sets with ratio 8:1:1 for 5 times, and the training set holds at least one record for each user and each item. The three datasets are respectively from TripAdvisor Yelp Amazon TripAdvisor #users 27,147 7,506 9,765 #items 20,266 7,360 6,280 #records 1,293,247 441,783 320,023 #features 7,340 5,399 5,069 #records / user 47.64 58.86 32.77 #records / item 63.81 60.02 50.96 #words / exp 12.32 14.14 13.01 * exp denotes explanation . (hotel), Amazon (movies & TV) and Yelp (restau-rant). Each record in the datasets is comprised of a user ID, an item ID, a rating, an explanation, and a feature. The explanations are sentences extracted from user reviews. Each explanation contains at least one item feature, e.g., bedroom , which ensures the explanation quality. Statistics of the datasets are shown in Table 1. We can see that Yelp is much larger than the other two in terms of size, making it closer to the real-world situation where there are millions of users and items. To evaluate the recommendation performance, we adopt two commonly used metrics: Root Mean Square Error ( RMSE ) and Mean Absolute Error ( MAE ). As to explanation performance, we measure the generated explanations from two main perspectives: text quality and explainability. For the former, we adopt BLEU (Papineni et al., 2002) in machine translation and ROUGE (Lin, 2004) in text summarization, and report BLEU-1 and BLEU-4, and Precision, Recall and F1 of ROUGE-1 and ROUGE-2. Though being widely used, BLUE and ROUGE are not flawless. For example, it is dif-ficult for them to detect the problem of identical sentences generated by Transformer. These identical sentences might not be used as explanations, because they are less likely to well explain the special property of different recommendations. To quantitatively measure how severe the problem is, we adopt USR that computes the Unique Sentence Ratio of generated sentences (Li et al., 2020c). Text quality, however, is not equal to explain-bility. In the case of explainable recommendation, users may value more an explanation that justi-fies a recommendation's advantages on certain features (Li et al., 2020c; Chen et al., 2019a). To this end, we adopt the other three metrics proposed by (Li et al., 2020c): Feature Matching Ratio ( FMR ), Feature Coverage Ratio ( FCR ) and Feature Diversity ( DIV ). FMR measures whether a generated explanation contains the feature in the ground-truth. FCR is computed as the number of distinct features contained in all the generated explanations, divided by the total number of features in the whole dataset. DIV measures the intersection of features between any two generated explanations. We introduce baselines, first for explanation and then for recommendation. For the former, we divide the baselines into two groups, depending on whether the feature is used or not. The following models leverage only user and item IDs to generate explanations (without feature). We denote our model without feature as PETER. Transformer (Vaswani et al., 2017) performs the explanation generation task by treating user and item IDs as words. We also tested encoder-decoder Transformer, where the encoder encodes the IDs for the decoder to decode, but its results turned out to be the same, so we do not report it. NRT (Li et al., 2017) can predict a rating and generate a tip simultaneously based on user and item IDs. We take the explanations in the datasets as tips. Moreover, we found that the model's problem of generating identical sentences (as reported in Li et al., 2020c) is caused by the L2 regularization in its original design. For fair comparison, we removed it. Att2Seq (Dong et al., 2017) is a review generation approach and we take the explanations as reviews. This model has an attention module, but we found that it makes the generated content unreadable in the task. To be fair, we removed it as well. When features are used, we denote our model as PETER+, and compare it with two recent models:  ACMLM (Ni et al., 2019) is a fine-tuned BERT (Devlin et al., 2019), where an attention layer is introduced to encode the features from both the user and the item. By predicting masked tokens, this model can produce diverse sentences. feature into the decoding process to generate template-like explanations. It can also make recommendations. For recommendation, besides NRT and NETE, we include another two traditional methods:  PMF (Mnih and Salakhutdinov, 2007) is a standard probabilistic matrix factorization method that characterizes users and items by latent factors. SVD++ (Koren, 2008) leverages a user's interacted items to enhance the latent factors. We train each model on the training set, tune the hyper-parameters on the validation set, and report the performance on the testing set. The results are averaged on the 5 data splits. We adopt the codes of ACMLM and NETE, and implement all the other methods. For NRT, Att2Seq, NETE and our PETER and PETER+, we set the size of vocabulary to 20,000 by keeping the most frequent words. We do not apply this to Transformer, otherwise users Time Epochs Time/Epoch ACMLM 97.0 3 32.3 PETER+ 57.7 25 2.3 Table 3: Efficiency comparison of two Transformer-based models in terms of training minutes on the TripAdvisor dataset, tested on NVIDIA Tesla P40. and items (regarded as words) may be filtered out. We set both the number of context words and the length of explanations to 15, because the mean length of explanations is approximately 13 (see Table 1). ACMLM adopts sub-words, so we do not apply the above two steps to it. We reuse the other default settings of the baselines. For Transformer, PETER and PETER+, we set the embedding size d to 512 and the dimension of feed-forward network to 2,048, following (Vaswani et al., 2017), but the number of layers L and attention heads H are both 2. For our models PETER and PETER+, we set the regularization weights  e ,  c and  r to 1.0, 1.0 and 0.1, respectively. We optimize the model via stochastic gradient descent (Robbins and Monro, 1951), and apply gradient clipping (Pascanu et al., 2013) with a threshold of Top-15ContextWords Explanation Ground-truth the rooms arespaciousandthebathroomhasalargetub PETER < eos > theandapoolwaswithniceisveryweretogoodinof thepoolareaisniceandthegymisverywellequipped < eos > PETER+ < eos > theandawaspoolwithtonicegoodverywereisofin theroomswerecleanandcomfortable < eos > Ground-truth beautiful lobby andnicebar PETER < eos > theandawaswereseparatebathroomwithshowerlargeveryhadinis thebathroomwaslargeandtheshowerwasgreat < eos > PETER+ < eos > theandawasbathroomshowerwithlargeinseparatewereroomveryis thelobbywasveryniceandtheroomswereverycomfortable < eos > Table 4: Context words and explanations on two different cases as generated by our PETER and PETER+ on TripAdvisor dataset. 1.0. The batch size is set to 128, and the learning rate 1.0. At each epoch, we save the model if it achieves the lowest loss on the validation set, but when there is no improvement, we decrease the learning rate by a factor of 0.25. When the latter happens for 5 times, we stop training and load the saved model for prediction. In Table 2, we compare the performance of explanation generation methods in two groups. We first analyze models that make use of item features (i.e., ACMLM, NETE and PETER+). Our PETER+ consistently and significantly outperforms ACMLM and NETE on the three datasets in terms of text quality (BLEU and ROUGE). This shows the effectiveness of our model in generating high-quality sentences. Notice that Li et al. (2020b) conducted a user survey and reported that NETE's explanations were perceived useful by most participants. It suggests that our model's explanations with better quality could also be very useful to real users. Again, in terms of text quality, the performance gap between PETER+ and ACMLM (a fine-tuned BERT) is extremely large, because the latter's generation is achieved by predicting masked tokens, which is quite different from word-by-word generation. This may explain why ACMLM produces diverse sentences (high USR), which, however, is less meaningful when text quality cannot be guaranteed. Furthermore, PETER+ beats both ACMLM and NETE on the explainability metric FMR that cares about whether a generated explanation mentions the feature in the ground-truth. This is quite useful in real-world applications when the system is asked to explain a particular feature. Regarding the other two explainability metrics FCR and DIV, PETER+ is also very competitive. ACMLM gains better performance on some cases, because at the training stage it is exposed to more features (from both the user and the item), which is unfair to both PETER+ and NETE. Next, we discuss the results of the models that Yelp Amazon TripAdvisor R  M  R  M  R  M  PMF 1.09 0.88 1.03 0.81 0.87 0.70 SVD++ 1.01 0.78 0.96 0.72 0.80 0.61 NRT 1.01 0.78 0.95 0.70 0.79 0.61 NETE 1.01 0.79 0.96 0.73 0.79 0.60 PETER 1.01 0.78 0.95 0.71 0.81 0.63 Table 5: Recommendation performance comparison in terms of RMSE (R for short) and MAE (denoted as M). only leverage user and item IDs for generation. As it can be seen, Transformer generates identical explanations on each dataset, resulting in nearly 0 score on Unique Sentence Ratio (USR). Owing to the context prediction task, our PETER successfully addresses this issue, producing diverse (comparable USR) and high-quality (best BLEU-4) sentences. In particular, on the largest dataset Yelp, it achieves the best performance on most of the metrics. This again demonstrates the effectiveness of our model. On Amazon and TripAdvisor, NRT and Att2Seq are very competitive, because we fixed their generation issues (see Section 5.3). In addition, the two datasets are small and thus the training samples are limited, so our model may underfit, which is why it does not always reach the best performance. Besides explanation performance, we also investigate the efficiency of different Transformer-based models. On the same machine (NVIDIA Tesla P40) and dataset (TripAdvisor), we compare the training minutes of ACMLM and our PETER+ in Table 3. Compared with ACMLM, our model takes less time to train (2.3 minutes per epoch), since it has only 2 layers and thus less parameters. But because it is unpretrained and learned from scratch, it needs more training epochs. In Table 4, we present two examples generated by PETER and PETER+ on the TripAdvisor dataset. We can see that PETER generates distinct context words and explanations for different user-item pairs. This confirms that our proposed solution can indeed endow the user and item IDs with linguis-Explainability Text Quality Recommendation FMR FCR DIV USR BLEU-1 BLEU-4 RMSE MAE Disable L c 0.06  0.03  5.75  0.01  15.37  0.86  0.80  0.61  Disable L r 0.07 0.14  2.90  0.10  16.16  1.15  3.23  3.10  Left-to-Right Masking 0.07 0.15  2.68  0.12  15.73  1.11 0.87  0.68  PETER 0.07 0.13 2.95 0.08 15.96 1.11 0.81 0.63 Table 6: Ablation study on the smallest dataset TripAdvisor. tic meanings, as well as achieving certain degree of personalization for natural language generation. Among the commonly used context words, e.g., the , there are some important features (underlined), according to which the model then generates an explanation that talks about them. Admittedly, there is still much room for improvement of the context prediction task, so as to more accurately predict the features in the ground-truth (e.g., rooms vs. pool in the first example). One alternative is to leverage the features to guide the model's generation. This explains why PETER+ is able to generate an explanation that talks about rooms rather than pool , making it semantically closer to the ground-truth. It thus demonstrates our model's flexibility in incorporating these features. Table 5 presents the performance comparison of different recommendation methods. On the largest dataset Yelp with approximately 1.3 million records, our model PETER performs as good as the three competitive baselines (i.e., SVD++, NRT and NETE), which shows the rationale of our recommendation module. Since our model PETER has more parameters to learn, it may underfit on small datasets. This explains why it does not always perform the best on TripAdvisor and Amazon. When more training data are available to Transformer, usually the performance will become better, as evidenced by GPT-2 (Radford et al., 2019) and GPT-3 (Brown et al., 2020). Thus, we can expect our model to perform well in real-world applications, where the training data are bigger than the testing datasets, e.g., billion-scale users in Amazon. In Table 6, we provide an ablation study conducted on the TripAdvisor dataset. After disabling the context prediction task L c by setting  c = 0 , the performances of both explainability and text quality drop dramatically, and the unique sentence ratio (USR) is nearly approaching Transformer's (see Table 2). It hence confirms this task's effectiveness. As L c is highly correlated with the recommendation task L r via the user and item IDs (see Section 4.3), the removal of L c leads to slight improvement on recommendation performance. We can also observe a reversed phenomenon when we disable L r . When PETER masking is replaced by the Left-to-Right masking that prevents the model from accessing the item information, the recommendation performance drops sharply. Overall, PETER reaches an optimal situation, where its explainability, text quality and recommendation performance are all reasonably good. We propose a simple and effective solution to address the personalized generation problem of Transformer, unleashing its language modeling power to generate explanations for recommender systems. Extensive experiments show that the solution is both effective and efficient. It opens up a new way of exploiting Transformer by designing good tasks instead of scaling up model size. There are various applications of personalized generation for which Transformer is still less explored. Our next step is to adopt our solution for personalized question answering systems and personalized conversational agents. We also plan to incorporate item images into the model, so as to generate visual explanations for recommendations, since a picture is worth a thousand words. Another meaningful extension is to adapt the model to cross-lingual explanation generation, because international platforms, e.g., Amazon, may serve users who speak different languages. This work was partially supported by HKBU IRCMS/19-20/D05, RGC/HKBU12201620, and NSF IIS-1910154 and IIS-2007907. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of the sponsors.
abstain abstain abstain objective abstain result abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain objective method other result abstain abstain objective result method abstain abstain method result abstain objective objective method result abstain objective other abstain other abstain other other other other other objective other other other other other other other abstain method abstain abstain abstain abstain method abstain abstain method abstain abstain abstain abstain abstain abstain abstain other abstain method method abstain abstain abstain abstain abstain other abstain abstain abstain method abstain abstain abstain method method abstain abstain method abstain abstain abstain method abstain method abstain method abstain method method method abstain abstain abstain method method abstain abstain method other abstain method abstain abstain abstain abstain abstain abstain abstain method method method method abstain abstain abstain method abstain abstain method abstain abstain abstain method method abstain method abstain method abstain method method method method method method method abstain abstain abstain method abstain method abstain method method method abstain method method method method method method abstain abstain method method abstain abstain result result abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain result other abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain objective abstain abstain abstain method method abstain other other