{'fraction_non_alphanumeric': 0.04150051338379618, 'fraction_numerical': 0.00950356980825712, 'mean_word_length': 4.719748702540289, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Top-N Recommendation with Counterfactual User Preference Simulation

Top-N recommendation, which aims to learn user ranking-based preference, has long been a fundamental problem in a wide range of applications. Traditional models usually motivate themselves by designing complex or tailored architectures based on different assumptions. However, the training data of recommender system can be extremely sparse and imbalanced, which poses great challenges for boosting the recommendation performance. To alleviate this problem, in this paper, we propose to reformulate the recommendation task within the causal inference framework, which enables us to counterfactually simulate user ranking-based preferences to handle the data scarce problem. The core of our model lies in the counterfactual question:"what would be the user's decision if the recommended items had been different?". To answer this question, we firstly formulate the recommendation process with a series of structural equation models (SEMs), whose parameters are optimized based on the observed data. Then, we actively indicate many recommendation lists (called intervention in the causal inference terminology) which are not recorded in the dataset, and simulate user feedback according to the learned SEMs for generating new training samples. Instead of randomly intervening on the recommendation list, we design a learning-based method to discover more informative training samples. Considering that the learned SEMs can be not perfect, we, at last, theoretically analyze the relation between the number of generated samples and the model prediction error, based on which a heuristic method is designed to control the negative effect brought by the prediction error. Extensive experiments are conducted based on both synthetic and real-world datasets to demonstrate the effectiveness of our framework.


INTRODUCTION
Recommendation system basically aims to match a user with her most favorite items. In a typical recommendation process, the system firstly recommends an item list to a user, and then the user provides feedback on the recommendations. In real-world scenarios, people only access a small amount of items, which makes the observed dataset extremely sparse. Recommendation task is usually formulated as a ranking problem. Early models mostly base themselves on the simple matrix factorization method [26]. In order to achieve better performance and adapt different scenarios, recent years have witnessed much effort on neuralizing the recommendation models [18,39]. However, the effectiveness of neural models usually depend on a large amount of training samples, which contradicts with the aforementioned sparse user behaviors.
In another research line, causal inference (CI) has been recently introduced into the machine learning community to augment the training data for more comprehensive model optimization [1]. The basic idea is firstly assuming an underlying structure causal model (SCM), and then learning the model parameters based on the observed data. At last, the new training samples are generated by actively changing the input variables (called intervention) and collecting the cared outputs. Such sample enrichment method has been successfully applied to the fields of neural language processing (NLP) [41] and computer vision (CV) [2,6,12]. In this paper, we adapt this method to the recommendation domain, which is expected to alleviate the contradiction between the more and more heavier neural recommender architectures and the sparse user behaviors. In a nutshell, the main building block of our idea lies in the counterfactual question: "what would be the user's feedback if the recommendation list had been different?". More specifically, we formulate the recommendation task by a causal graph including three nodes (see Figure 1(b)): U represents the user profiles, R is the recommendation list, and S indicates the selection of the user from R. The new training samples are generated by collecting the user feedback S with different interventions on R.
While the counterfactual idea seems to be promising, there are many challenges when applying it to the recommendation domain: to begin with, how to formally define the recommendation task by a structure causal model is still unclear. Then, the space of the candidate recommendation lists (R) can be very large, and the samples induced from different recommendation lists (i.e., intervention) may vary on the effects of optimizing the target model [14,31]. How to design an effective method to select R remains to be an open problem. At last, the predefined structural equation models can be not perfect. How the prediction error influences the quality of the generated samples and how to lower the negative impact need to be carefully considered. For solving these challenges, in this paper, we propose a novel counterfactual personalized ranking framework (called CPR). In general, our framework is composed of two parts (see Figure 1(a)), i.e., the target ranking model and the recommender simulator. The ranking model is leveraged to provide the final recommendation list, and the recommender simulator aims to assist the optimization of the ranking model by generating additional training samples. When building the recommender simulator, we follow Pearl's [23] counterfactual framework to define the recommendation process, where the structural equation models (SEMs) between U, R and S are defined in a stochastic manner and learned by variational inference to capture the randomness in the recommender system. In order to handle the extremely large space of the recommendation list (i.e., R), we design a learning-based method to select R which can induce more informative training samples. Considering that the learned SEMs can be not perfect, we theoretically analyze the relation between its prediction error and the number of generated samples. Inspired by this theory, we propose a simple but effective strategy to control the quality of the generated samples.
The main contributions of this paper are summarized as follows: (1) We formulate the recommendation problem within Pearl's causal inference framework, which allows us to generate more training samples for more sufficient model optimization. (2) We design a learning-based intervention method, which can lead to more informative training samples for optimizing the target ranking model.
(3) We theoretically analyze the relation between the potential prediction error of the structural equation models and the number of generated samples. (4) Inspired by the above theory, we propose a heuristic method to control the quality of the generated samples. (5) We conduct extensive experiments based on both synthetic and real-world datasets to verify the effectiveness of our model.

PRELIMINARIES
In this section, we firstly recapitulate the key concepts and methodologies in Pearl's causal inference framework. Then, we briefly introduce the ranking-based recommender models.

Pearl's Causal Inference Framework
Pearl's causal inference framework holds the promise of providing a complete and self-contained tool for studying causalities under both experimental and observational settings [25]. It is famous for the proposed three layer causal hierarchy, i.e., association, intervention and counterfactual. In Pearl's causal inference framework, the first key concept is the structure causal model (SCM), which helps to formulate real-world problems with causal languages. Definition 1 (Structure Causal Model [23]). A structural causal model is composed of a causal graph and a set of structure equation models (SEMs) . is usually a directed graph, where the edges indicate the causal relations between different variables. The nodes in are classified into two groups: (i) exogenous nodes = { 1 , ..., }, which are independent with each other, and summarize the environment when the data was generated, and (ii) endogenous nodes = { 1 , ..., }, which corresponds the variables we need to model in the problem. = { } =1 basically parameterizes the node relations, that is, = ( , ), where is the parent of in . The structure causal model builds the basis of studying the three layer causal hierarchy. In this paper, we mainly focus on counterfactual estimation. In general, this tool aims to predict the outcome if several input variables in the causal graph had been different. We briefly introduce the estimation process in the following definition: Definition 2 (Counterfactual Estimation [23]). Suppose we have two variable sets , ⊂ , and we use small letters and to denote their instantiations. The notation ( = ( ′ )) defines the distribution of if had been set as in structural causal model given that is currently observed as ′ . This distribution corresponds the counterfactual question "what would be if had been set as given its current observation ′ ?", which is typically derived according to the following three steps: (i) Abduction: deriving the posterior of the exogenous variables ( | = ′ ) based on the prior ( ) and the observation = ′ . (ii) Action: modifying by removing the edges going into and set = (called intervention) to derive ( | = , ). (iii) Prediction: computing the distribution ( = ( ′ )) by The key motivation of the above "abduction-action-prediction" procedure is to make sure that the new (counterfactual) and observed data enjoy the same generation environment, so that they can be compatible and just like to be produced at the same time [25]. Since Pearl's causal inference framework is not the focus of this paper, we refer the readers to [23] for more details. Based on the tool of counterfactual estimation, one can generate additional training samples to assist the downstream tasks, where a remaining problem is how to indicate to obtain effective samples.

Ranking-based Recommender Models
Ranking-based recommender models are powerful tools for solving the Top-N recommendation task, which can be optimized in either pair-wise or point-wise manners. In the pair-wise method, there are usually three inputs, i.e., a user and a positive-negative item pair ( , ). The goal is to maximize the user preference margin between the positive and negative items. Suppose the user preference is estimated from a function (·), then the optimization target is: where (·) is the sigmoid function to avoid trivial solutions. = {( , , )| ∈ I + , ∈ I \ I + } is the set of training samples. I is the whole item set, and I + indicates the set of items which have received 's positive feedback. For the point-wise method, the input is a user-item pair ( , ), and the user preference estimation is treated as a classification problem, where is optimized by the following cross entropy objective: where + = {( , )| ∈ I + } and − = {( , )| ∈ I \ I + } are the sets of positive and negative samples. = + ∪ − denotes the complete training set. Ranking-based recommender models differentiate themselves by the various implementation of . Simple can be realized by matrix factorization [26], and more advanced includes multi-layer perception [18,21], attentive neural network [17] and graph convolutional network [16], among others.

THE CPR FRAMEWORK
Our framework is composed of two parts (see Figure 1(a)): one is the recommender simulator, which is responsible for generating new training samples. The other is the target ranking model, which is learned based on both of the observed and generated data and leveraged to provide the final recommendation list. Our framework can be applied to any ranking-based recommender models, and we detail the recommender simulator in the following sections.

Recommender Simulator
To begin with, we reformulate the recommendation problem by a structure causal model = { , }. In specific, the causal graph is defined as follows (see Figure 1(b)): (1) U, R and S are the nodes representing the user, the recommendation list and the positive items 1 selected by the user. (2) U → R encodes the fact that the recommendation list is generated according to the user preference.
(3) U → S and R → S indicate that the positive items are jointly determined by the recommendation list and user preference. The structure equation models are defined in a stochastic manner as follows: : where , and are endogenous variables. ∈ R | I | and ∈ R are exogenous variables.
is the probability of recommending item list .
is the probability of selecting as the positive feedback. N (0, ) is the standard Gaussian distribution.

Remark.
(1) In order to consider the potential noisy information and randomness in the recommender system, the structure equation models (i.e., ) are defined in a stochastic manner, which helps to learn user preference in a more accurate and robust manner. (2) The exogenous variables in the recommendation problem can be explained as the conditions (e.g., system status, user habit, etc.) which induces the currently observed data. Take movie recommendation as an example, the users may be more likely to watch movies in their leisure time. So if the data is collected at night, then the movie click probability should be higher. Such temporal condition is latent but can influence the data generation process, which is expected to be captured by the exogenous variables, and recovered by inferring the corresponding posteriors.
3.1.1 Specification of . We implement by considering the unique characters of the recommender system. Recall that is the probability of recommending item list . Suppose we have |I| items in the system, then the number 2 of candidate item lists is | | |I | , which is extremely large in the recommendation task. To alleviate this problem, we ignore the combinatorial effect between different items, and the probability of recommending an item list can be factorized into the multiplication of the single item recommendation probabilities, that is: where = { 1 , 2 , ..., } is the recommendation list. For the single item recommendation probability, we predict it by a softmax operator. We use ∈ R |U |× and ∈ R |I |× to represent the embeddings of the users and items. They can be initialized by the ID or profile information of the users and items. is the embedding size, and ∈ R |I | is a weighting parameter. represents the probability of selecting item set from , which is specified as: ∈ R is a weighting parameter. The user and item properties are encoded by the metrics of ∈ R |U |× and ∈ R |I |× , respectively, and is the embedding size. In and , we represent the users and items with different embedding metrics. This can more flexibly characterize the system impression model (i.e., U → R in Figure 1(b)) and the user response model (i.e., U → S in Figure 1(b)), which usually hold different promises in real recommender systems.

Learning . Suppose the training set is
where is the target user, is the recommendation list, is the item set selected by from , N is the sample number. For , since the number of items (i.e., |I|) can be very large, it is hard to directly optimize the softmax term in equation (4). Thus we resort to the negative sampling technique [18,26], which induces the following optimization target: where { , , } are the parameters to be learned. − is the set of negative samples, which are randomly sampled from the nonrecommended items. = [ ] is sampled 3 from N (0, ). With this objective, the parameters are optimized to maximize the recommended item probability and simultaneously minimize the ones which are not presented to the users.
For , since the length of the recommendation list (i.e., K) is usually not large, we directly maximize the following livelihood without approximation: where { , , } are the parameters to be optimized. and are the th and th items in and , respectively. = [ ] is sampled from N (0, ). It seems that this objective only maximizes the probability of the items which are selected by the user, but with the softmax operator, the probabilities of the non-selected items are automatically lowered.

Counterfactual estimation based on . Once we have learned
and , we follow Pearl's "abduction-action-prediction" procedure [24] to conduct counterfactual estimation. In the step of abduction, we estimate the posterior of and given the observed dataset O. For , the posterior can be derived based on the following Bayesian rules: where (O| ) can be easily derived based on equation (5). Recall that our goal is to sample from the posteriors. However, the result of equation (8) is too complex for sampling, which motivates us to use variational inference [3] for approximation. In specific, we firstly define a Gaussian distribution ( ) ∼ N ( , ), where = { , } is set of learnable parameters. Then we optimize by minimizing the KL-divergence between ( ) and ( |O), where the evidence lower bound (ELBO) [3] we need to maximize is: Similarly, we can learn a variational distribution for ( |O). Due to the space limitation, readers are referred to [3] for more technical details of the variational inference.
In the action step, we select a userˆ, and set =ˆ. When making prediction, we firstly sampleˆfrom ( ), and then compute the probability of itemˆby: At last,ˆis predicted by collecting M items with the highest probabilities.

Learning-based Intervention
Based on the above designed recommender simulator, one can attempt differentˆ's and derive the correspondingˆ's to form new (counterfactual) training samples. A nature question is how to set . Straightforwardly, one can exploreˆin a random manner (e.g., show the users with random recommendation lists). However, as mentioned before, the space ofˆcan be extremely large, and it is well known that different training samples are not equally important for model optimization [31], thus the random method can be less effective in hitting the optimal samples. In order to achieve better optimization results, we design a learning-based method to selectˆ. Our key idea is to make the generated samples more informative for the target ranking model. It has been studied in the previous work [12,13] that the samples with larger loss can usually provide more knowledge for the model to learn (i.e., more informative). They can well challenge the model and bring more inspirations to improve the performance. Following these studies, we use the loss of the target ranking model as the reward, and build a learning-based method to generateˆ. Formally, suppose the target ranking model is , and we denote its loss function as , which can be specified as equation (1) or (2). The goal of the agent is to conduct actions (generating recommendation lists) which can lead to larger . Considering that the action space can be very large, we follow the previous work [40] to learn a Gaussian policy to generate the continuous item center ofˆ, after which the discrete item IDs are recovered based on equation (4). The final learning objective is: where is the Gaussian policy implemented as a two-layer fully connected neural network with ReLU as the activation function.î ndicates the target user. ( (ˆ)) denotes the loss of the generated training samples (ˆ). We generate T sets of training samples, and each one is derived fromˆbased on the following steps:  (2), We summarize the complete learning process in Algorithm 1 and 2. In specific, the target ranking model is firstly trained based on the original dataset. And then, we generate many counterfactual training samples based on the Gaussian policy. At last, the target ranking model is retrained based on the generated datasets.

Theoretical Analysis
In this section, we theoretically analyze the proposed framework within the probably approximately correct (PAC) learning framework. We focus on the pair-wise learning objective, and the conclusions can be easily extended to the point-wise case.

Theoretical insights on the learning-based intervention method.
The key motivation of the learning-based method is to generate harder samples, so that the target model can be more informed and Algorithm 1: Learning algorithm of CPR 1 Learn the SEMs based on objective (6) and (7). 2 Train the target model based the original dataset. 3 Pre-train the Gaussian policy according to Algorithm 2. 4 for Iteration number k in [1, K] do 5 for each userˆdo 6 Select an actionˆaccording to (ˆ|ˆ, ).    Derive (ˆ) and the reward ( (ˆ)) based onˆ.
10 end achieve better performance. The effectiveness of this idea has been empirically demonstrated in the previous work [13,31]. Here, we provide a theoretical justification based on the following theory: Theorem 1. Suppose the users' feedback on an item pair ( , ) is probabilistic, and we can observe > and < with the probabilities of and 1 − , respectively. Then, can actually measure the hardness of the sample, when is closer to 1 2 , then the sample is harder, since the propensity between the items is more ambiguous. Suppose , ∈ (0, 1), and we use a simple voting mechanism to determine the relation between and , then we need to have log 1 2(1−2 ) 2 samples on ( , ) to ensure that the prediction error is smaller that .
This theory suggests that we need to generate more samples (i.e., larger log 1 2(1−2 ) 2 ) for the harder (i.e., smaller ) item pairs. It agrees with our goal in learning-based intervention method, where the produced samples are expected to be hard and can well challenge the target model. We present the proof of this theory in the Appendix.

Imperfection of SEMs.
Since the new samples are generated based on the learned SEMs, careful readers may have concerns on how would the approximation error of influence the sample generation. To shed lights on this problem, we theoretically analyze the relation between the prediction error of and the number of generated samples. To begin with, we assume that the recommender simulator can recover the true ranking of the item pairs with a noisy parameter ∈ (0, 0.5), i.e., suppose the true triplet is ( , , ), then the recommender simulator generates the true (i.e., ( , , )) and wrong (i.e., ( , , )) samples with the probabilities of 1 − and , respectively. As the special cases, = 0 means the recommender simulator is perfect, and there is no noisy information in the produced samples. = 0.5 means the recommender simulator is a totally random predictor, and the generated data is nothing but noise. Then, we have the following theory: Theorem 2. Suppose , ∈ (0, 1), and ∈ F is the target ranking model. If the number of training samples is larger than then the estimation error of in terms of ranking prediction is smaller than with the probability larger than 1 − .
The proof of this theory is similar to that of theory 1 in [34]. From this theory, we can see, as the noisy parameter becomes larger, more samples (i.e., 2 log ( 2|F| ) 2 (1−2 ) 2 ) are needed to achieve sufficiently well performance (the prediction error is smaller than ). Extremely, when → 0.5, we need to produce infinite training samples. This implies that if the recommender simulator is completely random, then we can not expect well performance by training on the generated data, which is aligned with the intuition.

Controlling the noisy information.
Inspired by this theory, we propose a simple but effective method to control the noisy information. The general idea is to remain the samples with higher confidence. In specific, for a given recommendation listˆ, we use the selection probability (ˆ| =ˆ, =ˆ,ˆ) to measure the confidence of the recommender simulator. We denote byˆ+ and − the sets of k items with the largest and smallest selection probabilities. Then the training set for the pair-wise objective is built as In this method, if is small, then the model has more confidence on the generated samples, which may reduce the noisy information, but at the same time, less samples can be generated, which may lead to insufficient model optimization. If is large, more samples will be generated, but the noisy level can also be high. In this sense, is actually a parameter to trade-off the noisy information and the number of generated samples.

EXPERIMENTS
In this section, we conduct extensive experiments to verify the effectiveness of our framework. In the following, we begin with the experiment setup, and then report and analyze the results.

Datasets.
Our experiments are based on both synthetic and real-world datasets. With the synthetic dataset, we aim to evaluate our framework in a controlled manner under clean environment. By the real-world dataset, we try to verify our framework's effectiveness in real-world settings.
We follow the previous work [42] to build the synthetic dataset, where we simulate (= 600) users and (= 300) items. For each user (or item ), the preferences ∈ R (or properties ∈ R ) are generated from a multi-variable Gaussian distribution N (0, ), where and represent the vector size and unit matrix, respectively. In order to generate the recommendation list for user , we firstly compute the score of recommending item based on a neural network: where ∈ R 2 is specified as an all-one vector, and is set as zero. We follow [42] to set 1 (·) and 2 (·) as piecewise functions, and 1 ( ) = − 0.5 if > 0, otherwise 1 ( ) = 0, 2 ( ) = if > 0, otherwise 2 ( ) = 0. Given , the probability of recommending item is

=1
. For each user, we generate 25 impression lists, each of which is composed of 5 items. When generating the feedback of a user on an item , we follow the previous work [42] to explore both linear and non-linear user response models, that is: where 3 ( ) = + 0.5 if < 0, otherwise 3 ( ) = 0. is used to set the noisy level of the datasets, and its default value is 0. I( ) is an indicator function, which is 1 if > 0, and 0 otherwise.
The real-world experiments are based on the recently released MIND 4 dataset [35]. This data is collected from the user behavior log of Microsoft News, and we uses the MIND-small dataset for experiments, where we are provided with 156,965 recommendation lists and 234,468 interactions between 50,000 users and 20,288 items.

Baselines.
In order to evaluate the effectiveness of our proposed framework, we compare our model with the following representative methods: ItemPop is a non-personalized model, and the ranking score of an item is based on its popularity in the training set. ItemKNN [30] is an item-based k-nearest-neighborhood (KNN) model. BPR [26] is a well-known recommender model based user implicit feedback. GMF, MLP and NeuMF [18] are neural recommender models, among which NeuMF is a combination between GMF and MLP. CDAE [36] is a method based on denoising auto-encoder, which is proved to be the generalization of several well-known collaborative filtering models. LightGCN [16] is a graph-based recommender model, where the user-item structure information is considered in the modeling process.
In order to verify the generality of our framework, we apply it to MF, GMF, MLP, NeuMF and LightGCN, respectively, which leads to the models of CPR-MF, CPR-GMF, CPR-MLP, CPR-NeuMF and CPR-LightGCN. To demonstrate the necessity of learningbased intervention method, we also evaluate the performance our framework with random intervention, where the recommendation list is assigned in a random manner. We denote the corresponding baselines as CPR-MF-r, CPR-GMF-r, CPR-MLP-r, CPR-NeuMF-r and CPR-LightGCN-r.

Implementation details.
We follow the previous work [17,18,26] to employ standard leave-one-out protocol for evaluation. 10 items are recommended from each model to compare with the users' actually interacted ones. We leverage the widely used metrics including Hit Ratio (HR) and Normalized Discounted Cumulative Gain (NDCG) to compare different models. Among these metrics, 4 https://msnews.github.io/ HR aims to measure the overlapping between the predicted and ground truth items, while NDCG further takes the ranking of the prediction results into consideration, and higher ranked accurate items contribute more to the final score. The implementations of our model and all the baselines are based on PyTorch [22] with mini-batch Adam [19] optimizer. For ItemKNN and CDAE, we follow the settings of the original paper. For the other baselines, we determine their hyper-parameters based on grid search, and the search ranges for the embedding size, batch size, regularization coefficient and learning rate are set as {32, 64, 128, 256

Experiments with Synthetic Dataset
In this subsection, we present and analyze the experimental results on the synthetic dataset.

Overall performance.
In the experiments, we explore different user/item representation dimensions as well as both linear and non-linear user response models. The overall comparison results are shown in Table 1. It is interesting to see that the relative simple baselines (e.g., ItemPop and ItemKNN) are competitive in many cases. This observation is consistent with the previous work [9], and suggests that simple methods may still be useful in some recommendation scenarios.
It is encouraging to see that our framework can consistently improve the performance of different target models. The improvement is consistent across different settings. In specific, our framework can on average improve the performance of the target model by about 10.08% and 11.17% on HR and NDCG, respectively. This result demonstrates the effectiveness of our framework. The reason can be that the recommender simulator enables us to explore the potential user preferences, which provides useful signals to widen the model visions and improve the performance. The importance of the learning-based intervention method is evidenced in the lowered performance when we use random strategy as a replacement, which verifies our claims in the introduction. It is interesting to see that the performance gains on neural models (e.g, MLP, NeuMF and LightGCN) are usually larger than that of the matrix factorization method. In many cases, the performance is even lowered for GMF and BPR after applying our framework, e.g., when we use nonlinear user response model and set = 32. This observation agrees with our expectation, that is, neural models need more training samples to display its strong expressiveness, and our framework should be more effective for them. Since most of the promising recommender models in practice are based on neural architectures, this observation demonstrates the potential of our framework in real-world settings.

Effects of the noisy control parameter .
In this section, we investigate the effectiveness of the noisy control method proposed in section 3.3. By this method, we hope our framework can adaptively tune itself to accommodate different noisy recommendation scenarios. In order to evaluate such capability, we set = 0 or sample it from N (0, 0.2) to simulate the settings where the data is observed with different noisy levels. We base the experiment on the nonlinear user response model, and we tune in the range of {1, 2, 3}. The results are presented in table 2. It is not surprising to see that the performance of the same model is lowered when the noisy level is increased from 0 to sampling from N (0, 0.2). When is sampled from N (0, 0.2), the best performance is mostly achieved when = 1, while if we set = 0, = 2 or = 3 can usually lead to more favored results. We speculate that: when the dataset is noisy, the recommender simulator can be not trained well, thus the quality of the generated samples are not high. In such a scenario, removing the noisy samples seems to be more important. On the contrary, if the dataset is noise-free, then the recommender simulator can be more accurate. In this case, the sample quality is not the main issue, and more samples are favored to achieve sufficient model optimization and better performance. For different noisy-level datasets, our framework can always adapt itself to achieve better performance, which demonstrates the effectiveness of the noisy control method.

Experiments with Real-World Dataset
The above synthetic experiments suggest that our idea is effective under ideal environment. In this section, we experiment with the real-world dataset, which is more challenging but more practical.

Overall comparison.
To begin with, we compare our model with the baselines introduced in section 4.1.2. The results are presented in Table 3, from which we can see: similar to the synthetic dataset, our CPR framework can consistently lead to improved performances comparing with the target models, and the learningbased intervention method outperforms the random strategy in most cases. The performance gains on neural models are usually larger than that of the shallow ones, which again demonstrates the potential of our model for deep recommender models. Remarkably, the improvement of our framework is not that large comparing with the results on the synthetic dataset. We speculate that the real-world dataset can be noisy. Training based on it can lead to imperfect recommender simulator, which lowers the quality of the generated samples and limits the final recommendation performance.

Performance on the items with different coldness.
Cold start has long been a fundamental problem in the recommendation domain. In this section, we study the effectiveness of our framework on the items with different coldnesses. More specifically, we first run the models based on the original training set, and then evaluate their performances on three different testing sets varying on the item coldness. For the first testing set (denoted as "Low"), each item has less than 5 interactions with the users in the training set, which means the model is trained in a quite insufficient manner on these items. In the second testing set (denoted as "Middle"), each item has 5 to 15 interactions, thus the model is provided with more knowledge during the training process. In the last testing set (denoted as "High"), each item has more than 15 interactions, which is the "warmest" setting in the experiment. The model parameters are set as their optimal values tunned in the above experiments. From Table 4 we can see: our framework can enhance the performance of the target models in most cases, which demonstrates its effectiveness under different cold start settings. An interesting observation is that the performance improvement on the "Low" and "Middle" testing sets are much larger than that of the "High" dataset. For example, CPR-LightGCN can produce a remarkable 151.74% and 162.75% improvements over LightGCN on HR@10 and NDCG@10 for the "Low" dataset, and the improvements on the "Middle" dataset is about 40%-50%. However, on the "High" dataset, the performance is even lowered on the metric of HR@10, and the improvement on NDCG@10 is also limited. We speculate that, in the "Low" dataset, the testing items are trained in a quite insufficient manner. A large amount of knowledge has been ignored by the target model, which provides more opportunities for the generated samples to introduce useful signals and improve the performance. In real-world recommendation scenarios, cold-start is a notorious problem obsessing people for a long time, this experiment demonstrates the potential of our framework in alleviating this problem.

RELATED WORK
In this section, we compare our model with the previous work to highlight the contributions of this paper. Relation with causal recommendation. Recent years have witnessed many contributions on incorporating causal inference into the recommendation domain [5,11,27,28,37]. For example, [28] explains the recommendation problem by a treatment-effect model, and designs a re-weighting method to remove the bias in the observed data. However, this method is based on user explicit feedback, and the loss function is restricted to root mean square error (RMSE). In order to handle user implicit feedback, [27,37] extend this method by incorporating cross-entropy loss and designing tailored debiasing models. In addition, [20] proposes a general knowledge distillation framework to debias the training data. [5] provides a thorough discussion on the recent progress on debiased recommendation. [4] leverages uniform data to learn causal user/item embeddings for more fair and unbiased recommendation. These methods have achieved many successes in the recommendation domain. However, they mostly leverage causal inference to debias the training data, which is different from our data augmentation purpose. In addition, previous work mostly follow Rubin's potential outcome framework. However, our idea is inspired from Pearl's structure causal models, where we can explicitly model the data generated environment to ensure compatibleness between the generated and observed data. Relation with counterfactual data augmentation. Counterfactual data augmentation stems from the human introspection behavior. It has been recently leveraged to alleviate the training data insufficiency problem in the machine learning community. In the past few years, this idea has achieved great successes in the fields of neural language processing (NLP) [41] and computer vision (CV) [2,6,12]. In this paper, we apply it to the top-N recommendation task, which, to the best of our knowledge, is the first time in this field. The major differences between our framework and the previous work is: (i) we design a leaning-based intervention method to encourage the informativeness of the generated samples.
(ii) We theoretically analyze the noisy information in the generated samples, and design a tailored noise control method.
Relation with ranking based recommendation model. Ranking based recommender models have been widely studied for the Top-N recommendation task. The most famous model in early years is Bayesian personalized ranking (BPR), which is optimized by maximizing the user preference margin between the positive and negative items. This method has inspired many promising models. For example, CKE [38] proposes a hybrid model to integrate collaborative filtering and knowledge base for recommendation. [10] improves BPR with a better negative sampler which leverages additional data in E-commerce. AMF [17] applies adversarial training method to enhance the performance of BPR. With the ever prospering of deep neural network, recent years have witnessed the surge of neural recommender models [7,8,15,18,32]. For example, NeuMF [18] is designed to capture the non-linear user-item correlations. NGCF [33] and LightGCN [16] regard the user-item interactions as a graph, and explicitly incorporate the structure information to enhance the utilization of the collaborative filtering signals. By looking back the history of ranking based recommendation models, it is evident that the model architectures are becoming deeper and heavier. While the comprehensive parameters can indeed lead to improved recommendation performance, an unprecedented problem is also emerging, that is, more training data is needed to satisfy the heavy architectures, which contradicts with the sparse user behaviors in realities. In this paper, we propose a solution to this problem based on causal inference, which is parallel with the previous model-drive research.

CONCLUSION
In this paper, we propose to enhance Top-N recommendation with Pearl's causal inference framework, where we can simulate user preference and generate counterfactual samples for alleviating the training data insufficiency problem. We design a learning-based intervention method for discovering the informative samples, and conduct theoretical analysis to reveal the relation between the number of generated samples and the potential model prediction error. Extensive experiments based on both synthetic and real-world datasets are conducted to verify our model's effectiveness.
This paper actually opens the door of incorporating Pearl's causal inference framework into the recommendation domain. There is still much room for improvement. For example, one can design more advanced exogenous node structures to introduce more reasonable prior knowledge for different recommendation scenarios. In addition, it should be also interesting to incorporate side information into the structure equation models, which can help to capture more comprehensive user preference and obtain more accurate recommender simulators. Proof. Without loss of generality, we suppose > 1 2 . We define the random variable as the th observation of the relation between and . We use = 1 to represent > , and = 0 to indicate < . Suppose, we have N observations, and we define = 1 =1 . Following the voting mechanism, if < 1 2 , then the prediction is wrong, since it contradicts with > 1 2 . Obviously, According to the Hoeffding's inequality [29], we have: By setting = exp (−2 ( 1 2 − ) 2 ), we have when is larger than log 1 2(1−2 ) 2 , ( < 1 2 ) < , which means the prediction error is smaller than . Proof. For a hypothesis ∈ F , suppose its prediction error is (i.e., I( ≠ ) = ) 5 , then the mis-matching probability between the observed and predicted results comes from two parts: • The observed result is true, but the prediction is wrong, that is, (1 − ).
• The observed result is wrong, but the prediction is right, that is (1 − ) .
Thus, the total mis-matching probability is + (1 − 2 ). Suppose the prediction error of (i.e., ) is larger than , Then, at least one of the following statements hold: • The empirical mis-matching rate of is smaller than + (1−2 ) 2 .
• The empirical mis-matching rate of the optimal * is larger than + (1−2 ) 2 . These statements are easy to understand, since if both of them do not hold, we can conclude that the empirical loss of is larger than that of * , which does not agree with the ERM definition. However, according to the Hoffding inequality [29], both of the above statements hold with the probability smaller than , which implies that the prediction error of is smaller than with the probability larger than 1 − . □