figurec

# Deep Causal Reasoning for Recommendations

Yaochen Zhu  Wuhan University  Jing Yi  Wuhan University  Jiayi Xie  Wuhan
University  Zhenzhong Chen<EMAIL_ADDRESS>Wuhan University

###### Abstract

Traditional recommender systems aim to estimate a user’s rating to an item
based on observed ratings from the population. As with all observational
studies, hidden confounders, which are factors that affect both item exposures
and user ratings, lead to a systematic bias in the estimation. Consequently, a
new trend in recommender system research is to negate the influence of
confounders from a causal perspective. Observing that confounders in
recommendations are usually shared among items and are therefore multi-cause
confounders, we model the recommendation as a multi-cause multi-outcome (MCMO)
inference problem. Specifically, to remedy confounding bias, we estimate user-
specific latent variables that render the item exposures independent Bernoulli
trials. The generative distribution is parameterized by a DNN with factorized
logistic likelihood and the intractable posteriors are estimated by
variational inference. Controlling these factors as substitute confounders,
under mild assumptions, can eliminate the bias incurred by multi-cause
confounders. Furthermore, we show that MCMO modeling may lead to high variance
due to scarce observations associated with the high-dimensional causal space.
Fortunately, we theoretically demonstrate that introducing user features as
pre-treatment variables can substantially improve sample efficiency and
alleviate overfitting. Empirical studies on simulated and real-world datasets
show that the proposed deep causal recommender shows more robustness to
unobserved confounders than state-of-the-art causal recommenders. Codes and
datasets are released at https://github.com/yaochenzhu/deep-deconf.

##  1 Introduction

Estimating users’ preference based on their past behaviors is important in
recommendations. Collaborative filtering, which aims at estimating one user’s
rating to items based on observed ratings from the population, has been widely
applied in modern recommender systems. However, since a user’s rating to an
item is generally not independent of the item’s exposure to the user, the
collected rating data are unavoidably biased. Consider movie recommendation as
an example. Since the genre of a movie affects both the likelihood of its
exposure and user’s rating to it, a spurious dependence is created between
them, which makes movies in the minority genres systematically under-
represented by the collected data (Fig. (1)). This is a confounding
phenomenon, and the movie genre is one of the confounders. Ignoring such
confounders could lead to systematic confounding bias that degenerates the
recommendation quality for traditional recommender systems [1].
††Corresponding author: Zhenzhong Chen, E-mail<EMAIL_ADDRESS>
If we could observe a user’s rating to an item with and without the item’s
exposure to the user, confounding bias can be eliminated even in the presence
of unobserved confounders [4]. However, since whether or not an item is
exposed to a user is pre-determined after the collection of the historical
data, the user’s rating associated with one exposure status of the item must
be unobserved. Therefore, eliminating the confounding bias demands us to
answer a counterfactual problem, i.e., what a user’s rating would be if a
previously unexposed item is made exposed (recommended) to her. This falls
under the scope of causal inference, which aims to unbiasedly estimate
unobserved exposure effects for a unit from observed outcomes from the
population. In this article, the Rubin causal model [4] is adopted as the
causal inference framework, where the exposure of an item is likened to
treatment in a clinical trial and the rating is likened to a potential outcome
associated with an exposure. Then, recommendation can be framed as estimating
the unit-level "treatment effects" for a user from observed ratings from all
users (i.e., the population) [5].

Figure 1: An intuitive example of confounding bias in movie recommendation.
Although users like to watch horror movies, they are seldomly exposed to the
users, which leads to their under-representation in the data. Consequently,
traditional recommender systems that ignores confounders may be unwilling to
recommend horror movies.

To address such a counterfactual inference problem, classical causal inference
demands us to find, measure, and adjust the influence of all the confounders.
However, since any attribute that is shared among items (such as the genre of
movies) could serve as a potential confounder, they are infeasible to
enumerate. Alas, whether or not we have indeed exhausted all the confounders
is not testable from experiments [4].

Observing that the item pools of modern recommender systems are large, we
assume that single-cause confounder, which is an attribute that exclusively
affects the exposure and rating of one item, is negligible. Therefore, the
problem can be simplified because multi-cause confounders, i.e., confounders
shared among items, can be properly handled by controlling and estimating
substitute confounders inferred from exposures via latent factor models [6].
This has been explored by Wang et al. [7] by proposing the Deconfounded
Recommender (Deconf-MF). However, they mainly focused on using shallow methods
such as Poisson matrix factorization to infer the substitute confounders,
where a closed-form approximate inference solution can be deduced. This is
limited, since they may fail to capture the complex item co-exposure
relationship caused by confounders. Even if the exposure model is correctly
specified, the potential rating prediction model of Deconf-MF degenerates into
a single-cause case where the item co-recommendation effect (the interference
effect of recommending several items simultaneously) is ignored. Utilizing
deep neural networks (DNNs) to model both the item exposure and user ratings,
which is demonstrated to be superior in classical item co-purchase prediction
tasks [8], remains under-explored in causal recommender systems due to
intractable posteriors. In addition, the multiple causes induce an
exponentially large causal space, which makes the observed ratings associated
with one specific exposure vector in the population scarce. This could lead to
a large variance in the estimated causal effects of seldomly observed item
exposures. The variance, for a DNN-based causal model, appears as its tendency
to overfit when the number of user is limited.

To address the above challenges, we propose a deep deconfounded recommender
(Deep-Deconf). Deep-Deconf frames the recommendation as a multi-cause multi-
outcome (MCMO) inference problem, where the item exposures and user ratings
are regarded as multi-cause treatments and potential outcomes, respectively.
Under this modeling, item co-exposures are used to eliminate the confounding
bias and item co-recommendation effects are considered to predict new ratings.
Specifically, to eliminate the bias, based on a no single-cause confounder
assumption, we infer and control user-specific latent variables as substitute
confounders. The generative distribution is parameterized by a DNN with
factorized logistic likelihood and the intractable posteriors are approximated
by variational inference. Furthermore, we demonstrate that MCMO modeling may
suffer from high variance, mainly due to the scarcity of observation in high-
dimensional item causal spaces. Fortunately, we demonstrate that introducing
user features as pre-treatment variables, which are factors that are
independent of causes but are informative to predicting potential ratings,
such as user ages, genders, locations, etc., can substantially improve the
sample efficiency. Finally, we proposed the theory of "duality of multi-cause
confounders" to explain a previously ignored phenomenon where the
recommendation performance increases first and then decreases with the rise of
confounding levels. We demonstrate that this is because multi-cause
confounders contain useful collaborative information, but greedily exploiting
them could bias the model and degenerate the recommendation quality. Extensive
experiments conducted on multiple simulated and real-world datasets show that
Deep-Deconf is more robust to unobserved confounders than state-of-the-art
causal recommenders. The main contribution is summarized as follows:

  * •

We present Deep-Deconf, a deep causality-aware recommendation algorithm based
on Rubin’s causal framework. Through controlling a special user latent factor
and informative user features as pre-treatment variables, Deep-Deconf leads to
confounding-bias-robust recommendation with low variance.

  * •

Theoretical analysis demonstrates the global and local network Jacobians of
Deep-Deconf can be associated with average recommendation effects for all and
a subsection of the population, where the explainability of Deep-Deconf can be
guaranteed.

  * •

We demonstrate the large variance associated with the multi-cause causal
inference modeling paradigm. As a solution, we theoretically and empirically
show that controlling user features as pre-treatment variables can
substantially lower the variance.

  * •

Experiments conducted on simulated and real-world datasets demonstrate that
Deep-Deconf is robust to confounding bias. Moreover, we propose the theory of
"duality of multi-cause confounders" to explain the non-monotone change of
recommendation performance with the increase of confounding levels.

The remainder of this paper is as follows. Section 2 surveys related work
regarding causal recommenders and deep causal inference techniques. Section 3
provides formal formulation of the causal recommendation problem. Section 4
expounds upon the proposed Deep-Deconf model in details. Section 5
demonstrates the extensive experiments conducted on simulated and real-world
datasets as well as the theory of duality of multi-cause confounders. Finally,
section 6 concludes our paper.

##  2 Related Work

###  2.1 Causality-based Recommendations

Recently, researchers have been aware that recommendation is an intervention
analogous to treatment in clinical trials [5]. Since randomized experiments
are clearly infeasible for recommendations, confounders, which are factors
that affect both the item exposure and user ratings, pervasively exist and
bias the collected data [9]. Fortunately, causal inference can be utilized to
eliminate the confounding bias and uncover the true causal relationships
between two variables [5]. Existing causality-based recommender systems can be
classified into three main categories: propensity score reweighting
(PSW)-based methods, substitute confounder controlling-based methods, and
graph adjustment-based methods. In addition, methods from each category can
also use two paradigms as the fundamental causal framework: Rubin’s potential
outcome causal framework (RCF) [10], and Pearl’s structural causal graph (SCG)
framework [11].

The concept of PSW originated from RCF [10], the core of which is that
outcomes (ratings) under different treatment status, i.e., potential outcomes,
follow different distributions, where one of which is unavoidably
unobservable. Therefore, to calculate the treatment effects, i.e., the
difference between potential outcome under treatment and under no treatment,
randomized experiments should be conducted to select units in treatment and
non-treatment groups such that units in two groups are comparable to each
other. However, random recommendations are clearly infeasible in modern online
systems. Consequently, unobserved confounders pervasively exist and cause
discrepancies between the two groups in the collected data. PSW aims to
reweight users in the treatment group by the chances that they receive the
treatment (i.e., the propensity scores), such that they can be viewed as
random samples from the population [12, 13, 14]. Linear regression [5] and
variational auto-encoders (VAEs) [15] have been used to estimate the
propensity scores from historical ratings and user features. However, one
problem of PSW is that the estimated propensity scores can be extremely small
when the causal space is high-dimensional, which leads to large sample weights
that make the training dynamics unstable. Moreover, the unbiasedness of PSW
relies on a correctly-specified propensity score estimation model. However,
the model design depends heavily on the expertise of the researcher and is
therefore untestable from experiments.

Another class of causal recommenders based on the RCF aims to find, measure,
and control all the unobserved confounders. However, due to the clear
infeasibility of the objective, substitute confounders are inferred from item
exposures and are controlled as surrogates to the true confounders. One
exemplar work is Deconf-MF [7], where the item co-recommendations are viewed
as a bundled treatment where latent factors are estimated to render item
exposures conditionally independent. Under mild assumptions, controlling such
latent factors as substitute confounders can be proved to eliminate the
confounding bias. However, both the confounder inference model and
recommendation model used in [7] are based on shallow matrix factorization,
which may have insufficient modeling ability for large-scale modern
recommendation tasks. Utilizing deep neural networks (DNNs) to model both the
item exposure and user ratings remains under-explored due to intractable
posteriors. Faced with this challenge, we generalize Deconf-MF to a DNN-based
framework where the non-linear influence of confounders to the ratings can be
captured and remedied, and this is one of the core contributions of Deep-
Deconf. Concurrent with our work, [16] proposed the DIRECT algorithm to extend
Deconf-MF, which focuses on learning disentangled representations of the
treatment with VAE for better explanation. Compared to DIRECT, Deep-Deconf
mainly tackles network weights interpretability, variance reduction of MCMO
modeling, and duality of multi-cause confounders, which are three new
independent research questions worthy of in-depth investigations.

Relying on Pearl’s SCG framework, graph adjustment-based methods construct a
priori a graph that depicts the causal relationships among relevant variables.
Compared to RCF, relationships among user/item features, interaction
histories, item exposures, and user ratings can be clearly expressed as nodes
in the causal graph. To eliminate confounding effects, backdoor adjustment is
generally applied on the graph, where pre-treatment factors that affect the
treatment assignment (i.e., item exposure) are eliminated from the graph such
that items can be viewed as exposed in a random manner. Generally, the
established SCG varies drastically among different papers, both in variables
included for consideration and the assumed links among them. Moreover, there
is also no consensus in approximate inference strategies to solve the graph
[17, 18, 19, 20]. For example, [19] models the item popularity as the
confounder and eliminates its influence to reduce the popularity bias. [21]
explicitly models the influence of users’ historical rating on items’
exposure, where the influence is then removed via do-calculus. The superiority
of SCG or RCF has been a controversial topic that is under constant debate
among the researchers [22]. The reason why we build Deep-Deconf upon the
substitute confounder-based method instead of Pearl’s SCG is that, since the
establishment of SCG is unavoidably subjective, whether it exhaustively
enumerates all confounders or correctly specifies their relationships is
untestable. In contrast, in substitute confounder-based methods the causal
model can be agnostic of the specific form and relationships among the
confounders, which eliminates the strong substantive assumptions of SCGs.

###  2.2 Deep Learning for Causal Inference

Recent years have witnessed an upsurge in interest in utilizing DNNs for
traditional causal inference problems [23, 24, 25, 26]. Among them, the most
relevant methods to Deep-Deconf are [27] and [28], which explored the deep
latent-variable model for single cause inference tasks, e.g., twin weights and
job training, based on RCF. They mainly focused on modeling the joint
distribution of treatment, hidden confounders, and potential outcomes via deep
generation networks and approximating the intractable posteriors of hidden
confounders through variational encoders. However, this strategy is not
directly applicable to recommender systems, because when multiple causes
exist, it requires a sub-encoder and a sub-decoder for each treatment
configuration. But since the number of treatments for recommendations is
exponential to the number of items, extrapolating all the missing potential
outcomes requires intractable numbers of inference and generation networks.
The proposed Deep-Deconf circumvents this issue by two-stage modeling, where
the exposure model first fits the joint distribution of substitute confounder
and item exposures, and the outcome model then fits the rating distribution
conditional on the substitute confounder, item exposures, and user features.
This leads to a parameter-efficient solution to the DNN-based multiple cause
inference problems.

##  3 Problem Formulation

Suppose a system with $U$ users and $I$ items. The observational data
comprises the rating matrix $\mathbf{R}\in\mathbb{R}^{U\times I}$ and the user
features $\mathbf{X}\in\mathbb{R}^{U\times S}$ where each row
$\mathbf{r}^{T}_{u}$, $\mathbf{x}^{T}_{u}$ are the rating and feature vector
for user $u$.222Symbol system: We use boldface capital symbols $\mathbf{R}$
for matrices, boldface lower case symbols $\mathbf{r}_{u}$ for vectors, non-
boldface lowercase symbols $r_{ui}$ for scalars, non-boldface capital symbols
$R_{u}$ for random variables ($R_{u}$ may be scalar, vector, or matrix based
on context). Exceptions such as $U$ and $I$ can be easily identified from the
context. Based on the Rubin causal model [10], the received treatment is
represented by the exposure matrix $\mathbf{A}$ where $a_{ui}$ denotes whether
the item $i$ has been exposed to the user $u$ when rating $r_{ui}$ is
provided. We denote the potential outcome random variable associated with an
exposure $A_{u}$ for the user $u$ as $R_{u}(A_{u})$. For each user, we only
observe the value of $R_{u}(A_{u}=\mathbf{a}_{u})$, i.e.,
$\mathbf{r}_{u}(\mathbf{a}_{u})$. The main quantity of interest is the ratings
user $u$ would provide if $K$ extra items are recommended. Therefore,
recommendation under causal reasoning is a counterfactual inference problem.
To address this problem, we assume that stable unit treatment value assumption
(SUTVA) holds where the ratings of user $u$ is independent of items’ exposure
to user $v$, i.e., $R_{u}\perp A_{v}\mid A_{u}$. This excludes from
consideration the interference among users. The randomness of $R_{u}$ and
$A_{u}$ sources from the fact that the user $u$ is an arbitrary user sampled
from a potentially very large super-population. Therefore, unless specified
otherwise, the expectations are taken w.r.t. this population for the rest of
the article. The purpose of this article is to estimate the expected causal
effects of an exposure $A_{u}$ to a user $u$, $\mathbb{E}[R_{u}(A_{u})]$, from
the population so that unbiased recommendations can be made accordingly based
on estimated ratings with low variance.

##  4 The Deep Deconfounded Recommender

###  4.1 Debias via Factorized Variational Auto-encoder

Figure 2: The probabilistic graphical model (PGM) for different kinds of
confounders in recommender systems. The intuition of our model is to find the
substitute confounders $\mathbf{z}_{u}$ that render the item exposures
$\mathbf{a}_{u}$ independent Bernoulli trials. Then, conditional on
$\mathbf{z}_{u}$, multi-cause confounders cannot exist. The proof is by
contradiction (see the red lines).

Non-causality-based recommender systems directly model the conditional
distribution $p(R_{ui}\mid A_{ui})$ via matrix factorization or DNNs and fit
it on observed ratings to calculate $\mathbb{E}[R_{ui}(A_{ui}=a_{ui})]$,
relying on the assumption that
$\mathbb{E}[R_{ui}(A_{ui}=a_{ui})]=\mathbb{E}[R_{ui}(A_{ui})\mid
A_{u}=\mathbf{a}_{u}]$, i.e., the exposure of the items does not depend on
user $u$’s rating toward them. The estimation is unbiased if and only if there
exist no variables that simultaneously affect $R_{ui}$ and $A_{u}$, i.e., no
unobserved confounders [6]. However, unobserved confounders pervasively exists
in collected ratings, which leads to systematic bias (e.g., amplified exposure
bias due to similar bias in similar users) for naive methods [29].

To eliminate confounding bias, classical causal inference techniques demand us
to find, measure and control all confounders $C_{ui}$ and calculate
$\mathbb{E}[R_{ui}(A_{ui})]$ from
$\mathbb{E}_{C_{ui}}\left[\mathbb{E}\left[R_{ui}(A_{ui})\mid
C_{ui},A_{u}\right]\right]$. However, it can guarantee unbiasedness provided
that there are no uncontrolled confounders. This is known as the strong
ignorability assumption, which is both infeasible and untestable from
experiments [30]. Therefore, to circumvent exhausting and measuring all
confounders $C_{ui}$, Deep-Deconf models the recommendation as a multi-cause
inference problem. Instead of treating the exposure of an item $A_{ui}$ as an
isolated cause, we consider the exposures of all the items to a user $A_{u}$
as a holistic treatment that could causally affect all the ratings. We first
assume that the single-cause confounder $S_{u}$, which influences only the
exposure of one specific item and its ratings, does not exist. The validity of
the assumption can be justified by the fact that the pool of candidate items
for modern recommender systems is usually large, and therefore it is unlikely
that a confounder influences only one of the items. Taking genre as an
example, the genre of a movie affects both its exposure and rating, and it is
a universal attribute that is shared among all movies. With the assumption of
no-single cause confounders, we only need to control the multi-cause
confounders. This is a more amenable objective, since controlling them is
equivalent to controlling latent factors $Z_{u}\in\mathbb{R}^{K}$ that render
the causes conditionally independent, i.e., $p(A_{u}\mid
Z_{u})=\Pi_{i}p(A_{ui}\mid Z_{u})$. A simple proof for the validity of the
claim is that, if multi-cause confounders still exist after conditioning on
such latent factors, the exposures cannot be conditionally independent, which
renders a contradiction. An intuition can be referred to in Fig. (2).

To find such latent variable $Z_{u}$, we first parameterize the generative
distribution $p_{\theta}(A_{u}\mid Z_{u})$ by a DNN with factorized logistic
likelihood, i.e.,
$p(\mathbf{a}_{u}\mid\mathbf{z}_{u})=\Pi_{i=1}^{I}Bern(a_{ui}\mid[\theta(\mathbf{z}_{u})]_{i})$.
Conditional on $Z_{u}=\mathbf{z}_{u}$, the exposures $a_{ui}$ for user $u$ can
be viewed as generated from randomized Bernoulli trials. The factorized
Bernoulli distribution satisfies the overlap assumption, i.e.,
$p_{\theta}(A_{u}\mid Z_{u})>0$ provided that
$[\theta(\mathbf{z}_{u})]_{i}\notin\\{0,1\\}$, which is crucial to the
identifiability of the model [31]. We then calculate the intractable posterior
$q_{\phi}(Z_{u}\mid A_{u})$ via the variational inference [32], where the
prior for $Z_{u}$ is set to be the standard Normal
$\mathcal{N}(\mathbf{0},\mathbf{I}_{K})$. It could be noted that the
assignment model resembles the Multi-VAE for recommendation with implicit
feedback [8] because they both manage to reconstruct the binary exposure/click
inputs. However, a characteristic that makes the assignment model
fundamentally different is that it requires $A_{u}$ to factorize conditional
on $Z_{u}$. This renders the multinomial likelihood (which has been
demonstrated to be more suitable for recommendations in [8]) invalid in our
case. The assumption of no single-cause confounder and the utilization of user
latent factors as surrogate multi-cause confounders lead us to the following
equality,

$\mathbb{E}\left[R_{u}(A_{u})\right]=\mathbb{E}_{Z_{u}}[\mathbb{E}\left[R_{u}(A_{u})\mid
Z_{u},A_{u}\right]].$ (1)

If the exposure model is accurately specified, conditional on
$Z_{u}=\mathbf{z}_{u}$, the observed ratings for the users can be analyzed as
were generated from a randomized experiment, and bias due to unobserved multi-
cause confounders is eliminated.

###  4.2 Rating Prediction via Deep Outcome Network

Figure 3: The structure of the outcome prediction model.

In this section, we introduce the deep outcome network that predicts the
potential ratings $R_{u}(A_{u})$. Since the outcome network no longer requires
the ratings to be conditionally independent, more powerful multinomial
likelihood can be put on ratings for more accurate predictions (see Fig. (3)
for the structure of the deep outcome model). To gain more insights into the
network, we first provide a theoretical analysis of the network weights for a
special case where the network has a single layer with no activation, i.e.,

$\mathbf{r}_{u}(\mathbf{a}_{u})=\mathbf{W}^{z}\mathbf{z}_{u}+\mathbf{W}^{a}\mathbf{a}_{u}+\boldsymbol{\alpha}+\boldsymbol{\epsilon}_{u},$
(2)

where $\boldsymbol{\epsilon}_{u}$ is the residual vector for user $u$ and
$\boldsymbol{\alpha}$ is the constant term. For users with inferred substitute
confounder equals $\mathbf{z}_{u}$, we can calculate the the expected causal
effect for the exposure of item $j$ on the rating of item $i$ as

$\displaystyle\mathbb{E}[\Delta R_{ui}\mid\mathbf{z}_{u}]$
$\displaystyle=\mathbb{E}[R_{ui}(\mathbf{a}+\mathbf{e}_{j})-R_{ui}(\mathbf{a})\mid\mathbf{z}_{u}]$
(3) $\displaystyle=[\mathbf{W}^{a}\mathbf{e}_{j}]_{i}=w^{a}_{ij},$

which shows that the network weights $w^{a}_{ij}$ can be interpreted as the
conditional average treatment effect (CATE) of recommending item $i$ on the
rating of item $j$. Moreover, since the R.H.S. of Eq. (3),
$\mathbf{w}^{a}_{ij}$ does not contain a $\mathbf{z}_{u}$-related term, we
have $\mathbb{E}_{Z_{u}}\left[\mathbb{E}\left[\Delta R_{ui}\mid
Z_{u}\right]\right]=w^{a}_{ij}$, which leads to a further conclusion that
$w^{a}_{ij}$ is also the average treatment effect (ATE) in the population.
Note that allowing the causal effects of one item’s exposure on the rating of
another item does not violate the SUTVA assumption, as the non-interference of
users’ exposures to each other (i.e., $R_{u}\perp A_{v}\mid A_{u},\ \forall
u\neq v<U$) does not exclude from consideration the interference of different
items’ exposures of a single user (i.e., $R_{ui}\perp A_{uj}\mid A_{ui},\
\forall i\neq j<I$). On the contrary, it is benificail to model such co-
recommendation effects, since exposing one movie to a user may alter her
expectation to movies with a similar genre and therefore causally influences
her ratings towards these movies as well. (Illustration see Fig. (4))

Figure 4: The co-recommendation effects and large variance associated with
MCMO modeling. In parallel universe 1, user $i$ had been recommended with item
#3, which increased her expectation to item #2 and made her less satisfied
with it. The large variance of MCMO is because the number of such
counterfactuals is exponential to the number of items.

###  4.3 Variance Reduction via Pre-treatment Variables

Although confounding bias can be remedied by the controlling substitute
confounders, the predicted ratings may suffer from a large variance due to the
following two factors: First, multiple causes lead to a more severe data
missing problem. Consider a system with $I$ items. The number of
counterfactuals is $2^{I}$, but only one of the outcomes is observed.
Therefore, the sample efficiency is exponentially reduced compared with the
classical single cause problems. Furthermore, even if the observations are
sufficient, the item exposures tend to depend heavily on the user preference.
This makes the exposure and non-exposure group for different treatments highly
imbalanced, which further increases the estimand variance [10]. In this
section, we discuss the variance reduction technique of Deep-Deconf by
introducing user features in the outcome model as pre-treatment variables,
which are factors that remain uninfluenced by item exposures but are
predictive to the ratings.

To see how this works, we derive the estimand variance before and after
introducing user features as pre-treatment variables. For simplification, the
network weights $\mathbf{W}^{a}$ are for now reduced to diagonal, i.e.,
$\mathbf{w}^{a}=\operatorname{diag}(\mathbf{W}^{a})$, and $z_{u}$, $x_{u}$ are
one-dimensional. In this scenario, the co-recommendation effects vanish and we
can treat the recommendation of each item $R_{ui}$ separately (Note that the
randomness of $R_{ui}$ is still solely due to the sampling of $u$ from the
population since the item $i$ is fixed). To intuitively show the variance
reduction, we put aside for now the powerful multinomial likelihood on
ratings, and focus on the Gaussian likelihood and the simple Ordinary Least
Square (OLS) optimizer. The outcome model for rating $R_{ui}$ before the
introduction of user features can be specified as

$r_{ui}(a_{ui})=w^{z}z_{u}+w_{i}^{a}a_{ui}+\alpha_{i}+\epsilon_{ui}.$ (4)

Conditional on $Z_{u}=z_{u}$, with the overlap assumption, when the sample
size $U$ is large enough, we can meaningfully calculate the following
statistics from the samples,

$\bar{r}_{ui}(t)=\sum_{u:a_{ui}=t,Z_{u}=z_{u}}r_{ui}/U^{t}_{i},$ (5)

$\mathrm{where}\ U^{t}_{i}=\sum_{u:Z_{u}=z_{u}}\mathbb{I}(a_{ui}=t),\
t\in\\{0,1\\}$ is the size of exposure and non-exposure group in the sub-
population. We define CATE on the rating $r_{ui}$ as
$\tau_{ui}=\mathbb{E}[r_{ui}{(1)}-r_{ui}(0)\mid z_{u}]$. Since
unconfoundedness holds when conditional on $Z_{u}$, the average rating
difference between exposure and non-exposure use group
$\hat{\tau}_{ui}=\bar{r}_{ui}(1)-\bar{r}_{ui}(0)$ is asymptotically unbiased
for $\tau_{ui}$. Furthermore, if we define $w_{i}^{ols}$ as the coefficient
$w_{i}^{a}$ learned from the $U$ users drawn from the population, similar
deductions as Eq. (2) can demonstrate that $w_{i}^{ols}=\hat{\tau}_{ui}$. The
variance of $w_{i}^{ols}$, under the assumption of homoskedasticity, converges
in probability to $\frac{\sigma_{R_{ui}\mid Z_{ui},A_{ui}}^{2}}{U\cdot
p_{i}\cdot(1-p_{i})}$ when $U$ approaches infinity, where $p_{i}$ is the limit
of $U^{1}_{i}/U$ and $\sigma^{2}_{R_{ui}\mid Z_{ui},A_{ui}}$ is the population
conditional variance.

After that, we consider introducing user features $\mathbf{x}_{u}$ as
additional pre-treatment variables. The new model becomes

$r_{ui}(a_{ui})=w^{z}z_{u}+w_{i}^{a}a_{ui}+w^{x}x_{u}+\alpha_{i}+\epsilon_{ui}.$
(6)

After introducing an additional covariate $x_{u}$ in the model, the same
algebra shows that $w_{i}^{xols}$ estimated by OLS is still asymptotically
unbiased for $\hat{\tau}$. But the limiting variance of the estimand becomes
$\frac{\sigma_{R_{ui}\mid X_{u},Z_{ui},A_{ui}}^{2}}{U\cdot
p_{i}\cdot(1-p_{i})}$ (Proofs are in Appendix A.2). Therefore, as long as the
user features are indicative to the variation of the ratings,
$\sigma_{R_{ui}\mid X_{u},Z_{ui},A_{ui}}^{2}$ can reduce considerably compared
to the marginal variance $\sigma_{R_{ui}\mid Z_{ui},A_{ui}}^{2}$, which
increases the precision.

###  4.4 Theoretical Analysis in the Non-linear Case

The previous derivations of CATE interpretation of network weights and
variance reduction are mainly based on a simple linear network. However, as
the main contribution of this article is proposing a deep causal model for
recommendation, we generalize the analysis to the non-linear case. We begin by
defining the DNN-based outcome model as

$\mathbf{r}_{u}(\mathbf{a}_{u})=f_{nn}(\mathbf{a}_{u},\mathbf{z}_{u},\mathbf{x}_{u}),$
(7)

where function $f_{nn}:\mathbb{R}^{I+K+F}\rightarrow\mathbb{R}^{I}$ is non-
linear but differentiable almost anywhere. The generalization is achieved from
two aspects. First, we consider the global property of $f_{nn}$. Since the
exposure $\mathbf{a}_{u}$ is a binary vector, the prior of substitute
confounder $\mathbf{z}_{u}$ is $\mathcal{N}(\mathbf{0},\mathbf{I}_{k})$, the
user features $\mathbf{x}_{u}$ are rescaled to zero mean and unit variance, we
can form a global approximation of $f_{nn}$ with its Taylor expansion at
$(\mathbf{0},\mathbf{0},\mathbf{0})$ and keep the linear term,

$\mathbf{r}^{0}_{u}(\mathbf{a}_{u})=f^{0}_{nn}(\mathbf{a}_{u},\mathbf{z}_{u},\mathbf{x}_{u})\approx\mathbf{W}^{a}_{0}\mathbf{a}_{u}+\mathbf{W}^{z}_{0}\mathbf{z}_{u}+\mathbf{W}^{x}_{0}\mathbf{x}_{u}+\boldsymbol{\alpha}_{0},$
(8)

where the coefficient matrices $\mathbf{W}^{\\{a,z,x\\}}_{0}$ are the
Jacobians at $(\mathbf{0},\mathbf{0},\mathbf{0})$, and
$\boldsymbol{\alpha}_{0}$ is the expected user ratings where no items are
recommended. The reason to justify the approximation of $f^{0}_{nn}$ to
$f_{nn}$ is that generally, $f_{nn}$ cannot be highly-nonlinear ($f_{nn}$ is
generally composed of 0-2 hidden layers); otherwise, the outcome model will
overfit on the negative samples which are not truly negative and fail to
generalize to recommend new items [8]. After linearization, the same
theoretical analysis can be applied to $f^{0}_{nn}$, where $w^{a}_{0,ij}$ can
be interpreted as both the CATE and the ATE of the recommendation of item $i$
on the rating of item $j$.

However, if $\mathbf{a}_{u}$ for some users is dense and deviates far away
from the original point, the above approximation may be coarse and inaccurate
for this sub-population. Therefore, we propose another refined generalization
strategy that shows the local property of $f_{nn}$. For user $\hat{u}$ with
exposures $\mathbf{a}_{\hat{u}}$, substitute confounders
$\mathbf{z}_{\hat{u}}$, and user features $\mathbf{x}_{\hat{u}}$, we can
linearize $f_{nn}$ at the point
$(\mathbf{a}_{\hat{u}},\mathbf{z}_{\hat{u}},\mathbf{x}_{\hat{u}})$ by Taylor
expansion,

$\displaystyle\mathbf{r}^{\hat{u}}_{u}(\mathbf{a}_{u})=f^{\hat{u}}_{nn}(\mathbf{a}_{u},\mathbf{z}_{u},\mathbf{x}_{u})\approx\mathbf{W}^{a}_{\hat{u}}(\mathbf{a}_{u}-\mathbf{a}_{\hat{u}})+\mathbf{W}^{z}_{\hat{u}}(\mathbf{z}_{u}-\mathbf{z}_{\hat{u}})$
(9)
$\displaystyle+\mathbf{W}^{x}_{\hat{u}}(\mathbf{x}_{u}-\mathbf{x}_{\hat{u}})+\mathbf{r}_{\hat{u}}=\mathbf{W}^{a}_{\hat{u}}\mathbf{a}_{u}+\mathbf{W}^{z}_{\hat{u}}\mathbf{z}_{u}+\mathbf{W}^{x}_{\hat{u}}\mathbf{x}_{u}+\boldsymbol{\alpha}_{\hat{u}},$

where $\mathbf{W}^{a,z,x}_{\hat{u}}$ are the network Jacobians at
$(\mathbf{a}_{\hat{u}},\mathbf{z}_{\hat{u}},\mathbf{x}_{\hat{u}})$, and
$\boldsymbol{\alpha}_{\hat{u}}$ is the expected ratings for user $\hat{u}$
where no items are recommended. With the local linearization of $f_{nn}$,
similar analysis can be applied to $f^{\hat{u}}_{nn}$. Note that the trade off
is that $w^{a}_{\hat{u},ij}$ is no longer the ATE of recommending item $i$ on
the rating of item $j$ for the entire population, but is only the CATE for
users who are similar with $\hat{u}$ (which is measured by $\mathbf{z}_{u}$).
Therefore, this strategy establishes a corresponding relationship between
local Jacobians of $f_{nn}$ and CATE for a sub-population. The details are in
Fig. (5)

Figure 5: The association between the global and local Jacobians of the
outcome network and the approximate average treatment effects for all and sub-
section population. Algorithm 1 The Deep Deconfounded Recommender.

1:Input:
$\mathcal{D}=\\{(\mathbf{a}_{u},\mathbf{x}_{u},\mathbf{r}_{u}(\mathbf{a}_{u})\\}$,
a dataset of exposures, user features, and collected ratings, where
$r_{u}\in\\{1,2,3,4,5\\}^{I},\mathbf{x}_{u}\in\mathbb{R}^{S},\mathbf{a}_{u}\in\\{0,1\\}^{I},u\in\\{1,2,\ldots,U\\}$.

2:# Definition of the Exposure Network

3:function ExposureNet($\\{\mathbf{a}_{u}\\}$)

4: for $e=1,2,\ldots,N_{epochs}$ do

5: for $u=1,2,\ldots,U_{train}$ do

6:
$\hat{\mathbf{z}}_{u}\sim\mathcal{N}\left(f^{\mu}_{enc}(\mathbf{a}_{u}),f^{\sigma^{2}}_{enc}(\mathbf{a}_{u})\right)$

7: $\mathbf{a}^{rec}_{u}\sim$
factorizedLogistic($f_{dec}(\hat{\mathbf{z}}_{u}$))

8: # Definition of the Outcome Network.

9: $L_{train}\leftarrow\sum_{u=1}^{U_{train}}\left(\ln
p(\mathbf{a}^{rec}_{u})-\beta\cdot\operatorname{KL}\right)$

10: Update weights $\boldsymbol{\theta}$, $\boldsymbol{\phi}$ to maximize
$L_{train}$

11: Until $L_{val}\leftarrow\sum_{u=U_{train}}^{U_{train}+U_{val}}\ln
p(\mathbf{a}^{rec}_{u})$ decreases.

12: for $u=1,2,\ldots,U,$ do $\mathbf{z}_{u}\leftarrow
f^{\mu}_{enc}(\mathbf{a}_{u})$

13: return $\\{\mathbf{z}_{u}\\}_{u=1}^{U}$ as the substitute confounders.

14:# Definition of the outcome network

15:function OutNet($\\{\mathbf{r}_{u}\\}$, $\\{\mathbf{z}_{u}\\}$,
$\\{\mathbf{x}_{u}\\}$, $\\{\mathbf{a}_{u}\\}$ (opt.))

16: for $e=1,2,\ldots,N_{epochs}$ do

17: for $u=1,2,\ldots,U_{train}$ do

18:
$\hat{\mathbf{r}}_{u}\leftarrow\textsc{Multinomial}(\operatorname{softmax}(f_{out}(\mathbf{x}_{u},\mathbf{z}_{u},\mathbf{a}_{u})))$

19: $L_{train}\leftarrow\sum_{u=1}^{U_{train}}\ln p(\hat{\mathbf{r}}_{u})$,

20: Update weights $\boldsymbol{\psi}$ to maximize $L_{train}$

21: Until $L_{val}\leftarrow\sum_{u=U_{train}}^{U_{train}+U_{val}}\ln
p(\hat{\mathbf{r}}_{u})$ decreases.

22: for $u=U-U_{test},\ldots,U$ do $\hat{\mathbf{r}}_{u}\leftarrow
f_{out}(\mathbf{x}_{u},\mathbf{z}_{u},\mathbf{a}_{u})$

23: return $\\{\hat{\mathbf{r}}_{u}\\}_{u=U-U_{test}}^{U}$ as the estimated
preferences.

24:$\\{\mathbf{z}_{u}\\}_{u=1}^{U}$ $\leftarrow$
ExposureNet($\\{\mathbf{a}_{u}\\}$).

25:$\\{\hat{\mathbf{r}}_{u}\\}_{u=U-U_{test}}^{U}$ $\leftarrow$
OutNet($\\{\mathbf{r}_{u}\\}$, $\\{\mathbf{z}_{u}\\}$, $\\{\mathbf{x}_{u}\\}$,
$\\{\mathbf{a}_{u}\\}$).

26:for $u=U-U_{test},\ldots,U$ do
$\hat{\mathbf{r}}_{u}[\mathbf{a}_{u}==1]\leftarrow-\inf$,
$\operatorname{sort}(\hat{\mathbf{r}}_{u})$ and get top-$K$ items for
recommendation.

###  4.5 Potential Rating Prediction for Recommendations

Deep-Deconf is designed to predict unbiased ratings associated with any
exposure vector $\mathbf{a}_{u}\in\\{0,1\\}^{I}$, i.e.,
$\mathbf{r}_{u}(\mathbf{a}_{u})$ with a low variance. However, which
$\mathbf{a}_{u}$ should be selected for prediction is undetermined, as it
demands the answer to the exact question we are trying to solve: which items
should be exposed to users. Wang et al. [7] proposed to use
$\mathbf{a}^{obs+K}_{u}$, i.e., the exposure of the originally observed items
and $K$ newly recommended items, as the exposure to calculate the ratings for
recommendations. However, for Deep-Deconf, enumerating every
$\mathbf{r}_{u}(\mathbf{a}^{obs+K}_{u})$ and taking the expectation is clearly
infeasible. Still, we propose an approximate strategy for the prediction. We
assume that the number of recommended items $K$ (e.g., Top 20) is small
compared with the size of the item pool (e.g., 10,000). Based on this
assumption, the observed exposure $\mathbf{a}_{u}^{obs}$ can be used as a
surrogate for $\mathbf{a}^{obs+K}_{u}$ to calculate
$\mathbf{r}_{u}(\mathbf{a}^{obs+K}_{u})$ for predictions.

Although with this prediction strategy, the same recommendations are made for
users who have the same $\mathbf{a}_{u}^{obs}$, it does not mean that Deep-
Deconf is non-personalized, because the pervasive unobserved confounders make
the probability density of the exposures $\mathbf{a}_{u}$ for each user
concentrate on a small but unique niche of the exponentially large causal
spaces if the number of exposed items exceed certain value (Actually, for a
system with 5,000 items, the possible exposure combination of five items
exceeds the population on earth). Therefore, $\mathbf{a}^{obs}_{u}$ is per se
a very good representation of the user $u$ (although this can increase the
estimand variance as discussed in Section 4.3). Moreover, a direct strategy to
make Deep-Deconf "personalized" is to use the previous ratings of a user as
extra user features in the outcome prediction model (they are pre-treatment
variables because they remain unaffected by current exposures). However,
experiments shows that this strategy only doubles the networks’ trainable
weights but improves hardly any performance. Therefore, we do not use the
historical user ratings as pre-treatment variables.

Figure 6: Rating distribution before and after exposure under different
confounding levels (Top: simulated dataset, Middle: ML-causal dataset, Bottom:
VG-causal dataset; Obsv.: observation, Popu.: population). From this figure we
can find that the discrepancy between the observed and true rating
distributions becomes larger with the increase of confounding levels.
(Detailed analysis of the established causal datasets can be referred to in
Appendix B.3)

##  5 Empirical Study

###  5.1 Datasets

####  5.1.1 Simulated Dataset

We first conduct experiments on a simulated dataset. For each user, we draw a
$K$-dimensional confounder $\mathbf{c}_{u}$ from
$\mathcal{N}(\mathbf{0},\mathbf{I}_{K})$ and calculate the user preference
vector $\boldsymbol{\theta}_{u}$ conditional on the confounder
$\mathbf{c}_{u}$ as
$\boldsymbol{\theta}_{u}\sim\gamma_{\theta}\cdot\mathbf{c}_{u}+(1-\gamma_{\theta})\cdot\mathcal{N}(\mathbf{0},\mathbf{I}_{K})$.
The item exposure rate $\alpha$ for the entire population is predetermined as
0.1. To simulate the exposure, we first generate a exposure propensity score
for user $u$ as $\mathbf{a}_{u}=f_{a}(\mathbf{W}_{a}\mathbf{c}_{u})$. We then
globally sort $\mathbf{a}_{u}$ for all users and set the top $\alpha$ items as
the exposed items. The remaining part of the simulated dataset is generated as
follows:

$\displaystyle\mathbf{x}_{u}$ $\displaystyle\sim
f_{PCA}(\boldsymbol{\theta}_{u}+\boldsymbol{\epsilon}_{u}),\ \mathrm{where}\
{\boldsymbol{\epsilon}}_{u}\sim\mathcal{N}(0,\lambda_{u}^{-1}\mathbf{I}_{K});$
(10) $\displaystyle\mathbf{r}_{u}$ $\displaystyle\sim
min(1+Poisson(f_{r}(\mathbf{W}_{r}\boldsymbol{\theta}_{u})),5),$

where $\lambda_{b}$ and $\lambda_{\theta}$ control the strength of confounding
effects, $\lambda_{u}$ controls the noise level of user features, and
$\mathbf{W}_{r}\in\mathbb{R}^{K\times I}$ are the randomly initialized
weights. Compared with the simulation procedure in [7], we use functions
$f_{a}$ and $f_{r}$ to simulate the non-linear influence of multi-cause
confounders. In our experiment, we set both $f_{a}$ and $f_{r}$ as the ReLU
function ($\mathrm{ReLU}(\mathbf{x})=\max(0,\mathbf{x})$), respectively.

####  5.1.2 Real-world Datasets

Evaluating causal recommenders on real-world datasets faces great challenges,
since usually we do not observe ratings for all the items of the users, and
confounders make the model evaluations on a randomly split test set biased
[33]. Therefore, existing deep causal recommenders [15] establish the causal
datasets from real-world datasets. 333Note that an expensive and not user-
friendly solution is to ask users to rate randomly-exposed items [34]. One
such dataset is the Coat dataset established by [27]. However, this dataset is
too small in scale to train DNN-based recommenders (290 users and 300 items).
Previously, the Yahoo R3 dataset [35] can also be used to evaluate debiased
recommenders. However, due to the current US export law, it is not publicly
available. Therefore, these two datasets are usually not included to evaluate
deep causal recommender systems.

With a similar strategy, we create two semi real-world datasets, ML-causal and
VG-causal, based on the real-world Movielens-1m (ML-1m)
444https://grouplens.org/datasets/movielens/1m/ and the Amazon-Videogames
(Amazon-VG)555https://jmcauley.ucsd.edu/data/amazon/ datasets. In simulation,
we train two VAEs with factorized logistic likelihood and multinomial
likelihood on the exposures (binarized ratings) and ratings to get the
corresponding generative distributions from user latent variables
$\mathbf{z}_{\\{a,r\\}}$. The decoders of the exposure and rating VAEs are
denoted as $f_{exp}$, $f_{rat}$, respectively. We then simulate a
$K$-dimensional confounder $\mathbf{c}_{u}$ for each user from
$\mathcal{N}(\mathbf{0},\mathbf{I}_{K})$, and the user preference vector
$\boldsymbol{\theta}_{u}$ conditional on the confounders is specified as
$\boldsymbol{\theta}_{u}\sim\gamma_{\theta}\cdot\mathbf{c}_{u}+(1-\gamma_{\theta})\cdot\mathcal{N}(\mathbf{0},\mathbf{I}_{K})$;
the constant $\gamma_{\theta}\in[0,1]$ controls the strength of confounding.
The user features are the noisy observation of her dimensional-reduced user
preference vector
$\operatorname{f_{PCA}}(\boldsymbol{\theta}_{u}+{\boldsymbol{\epsilon}}_{u})$,
where
$\boldsymbol{\epsilon}_{u}\sim\mathcal{N}(\mathbf{0},\lambda_{u}^{-1}\mathbf{I}_{K})$.
The exposure vector $\mathbf{a}_{u}$ for user $u$ is generated from

$\displaystyle\mathbf{a}_{u}=\operatorname{argmin}_{\boldsymbol{\alpha}_{u}\in\\{0,1\\}^{I}}\left(\sum_{i}|\boldsymbol{\alpha}_{ui}-f_{exp}(\mathbf{c}_{u})_{i}|\right),$
(11) $\displaystyle\ s.t.\ p_{casl}(A_{ui}=1)=p_{ori}(A_{ui}=1).$

The constraint is to ensure that the global item exposure rate of the causal
datasets ($casl$) is the same as that of the original datasets ($ori$).
Moreover, we define the set
$\mathcal{R}=\\{\mathbf{r_{u}}\in\mathbb{R}^{I}\mid
r_{ui}\in\operatorname{range}(1,5)\\}$ as the set of possible user rating
vectors for $I$ items. The rating of user $u$ is generated from

$\displaystyle\mathbf{r}_{u}=\operatorname{argmin}_{\boldsymbol{\gamma}_{u}\in\mathcal{R}}\left(\sum_{i}|\boldsymbol{\gamma}_{ui}-f_{rat}(\boldsymbol{\theta}_{u}+\gamma_{b}*\mathbf{c}_{u})_{i}|\right),$
(12) $\displaystyle\ s.t.\ p_{casl}(R_{ui}=r)=p_{ori}(R_{ui}=r),\ \forall
r\in\operatorname{range}(1,5),$

where $\gamma_{b}$ controls the strength of basic confounding level (since
zero confounding is non-existent). The constraint ensures the global rating
distribution in the causal datasets to be the same as the original datasets.
The observed ratings $\mathbf{r}^{obs}_{u}$ is calculated by masking the
original ratings with exposures,
$\mathbf{r}^{obs}_{u}=\mathbf{r}_{u}\cdot\mathbf{a}_{u}$. The schematic
illustration of the establishment can be referred to in Appendix B.1. The
global item popularity distribution before and after the exposure under
different levels of confounding effect are shown in Fig. (6). The statistics
of the established simulated, ML-causal and, VG-causal datasets are in Table
(1).

Table 1: Attributes of the established simulated, ML-Causal and VG-causal datasets. In the table, % density refers to the density of the rating matrix, avg/std #exp. refer to the corresponding statistics of the number of items that are exposed to the users. dataset | #users | #items | %density | #avg $\pm$ std exp.
---|---|---|---|---
Simulated | 4,000 | 2,000 | 1.000% | 20 $\pm$ 11
ML-causal | 6,000 | 3,706 | 4.468% | 165 $\pm$ 192
VG-causal | 7,253 | 4,338 | 0.406% | 17 $\pm$ 16

###  5.2 Implementation Details and Training Strategy

When establishing the causal datasets, the dimension $K$ of the user
preference variables and the confounders is set to 100, 100, 100,
respectively. The dimension of the user features is set to 10. The structure
of the exposure and outcome models of Deep-Deconf is set to
$\\{I+\\{F+K\\}\rightarrow K\rightarrow I\\}$, where $I$ is the number of
items, $F$ is the dimension of user features, and $K$ is the latent dimension.
The models are trained with Adam optimizer [36], with learning rate of
$1e^{-3}$ for 100 epochs. For the exposure model, 20% of the observed
exposures of the validation users are hold-out for predictive check [37]. The
selection of the outcome model generally follows the same procedure, where
R@20 and N@20 on hold-out ratings are monitored as the metric. For all three
datasets, we search $K_{s}\in\\{50,100,150,200\\}$ and find that $K_{s}$
equals $K$ indeed achieves the best performance among models with all searched
structures.

###  5.3 Evaluation Strategy

Table 2: Model comparisons under different confounding levels. The best method is highlighted in boldface. For each method, the best evaluated performance w.r.t. the confounding level is highlighted with blue and red for R@20 and N@20, respectively. Simulated | $\lambda_{\theta}=0.1$ | $\lambda_{\theta}=0.3$ | $\lambda_{\theta}=0.5$ | $\lambda_{\theta}=0.7$ | $\lambda_{\theta}=0.9$
---|---|---|---|---|---
Methods | R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | R@20 | N@20
WMF | 0.572 | 0.568 | 0.569 | 0.570 | 0.575 | 0.576 | 0.595 | 0.592 | 0.591 | 0.589
IPW-MF | 0.579 | 0.573 | 0.581 | 0.582 | 0.580 | 0.586 | 0.601 | 0.595 | 0.582 | 0.606
Deconf-MF | 0.578 | 0.580 | 0.577 | 0.592 | 0.595 | 0.593 | 0.612 | 0.615 | 0.609 | 0.623
Concat-VAE | 0.626 | 0.634 | 0.628 | 0.653 | 0.669 | 0.685 | 0.677 | 0.690 | 0.671 | 0.685
VSR-VAE | 0.639 | 0.655 | 0.652 | 0.674 | 0.678 | 0.693 | 0.685 | 0.697 | 0.680 | 0.694
Deep-Deconf | 0.650 | 0.667 | 0.664 | 0.672 | 0.691 | 0.706 | 0.696 | 0.712 | 0.688 | 0.703
p-value | 1.70E-4 | 3.89E-3 | 3.65E-2 | $>0.1$ | 8.72E-3 | 2.03E-2 | 1.91E-2 | 7.12E-3 | $>0.05$ | 4.36E-2
|  |  |  |  |  |  |  |  |  |
VG-causal | $\lambda_{\theta}=0.1$ | $\lambda_{\theta}=0.3$ | $\lambda_{\theta}=0.5$ | $\lambda_{\theta}=0.7$ | $\lambda_{\theta}=0.9$
Methods | R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | R@20 | N@20
WMF | 0.318 | 0.306 | 0.325 | 0.312 | 0.321 | 0.310 | 0.322 | 0.314 | 0.313 | 0.301
IPW-MF | 0.325 | 0.319 | 0.330 | 0.324 | 0.328 | 0.319 | 0.327 | 0.321 | 0.320 | 0.314
Deconf-MF | 0.333 | 0.331 | 0.341 | 0.336 | 0.340 | 0.341 | 0.344 | 0.346 | 0.336 | 0.339
Concat-VAE | 0.369 | 0.354 | 0.385 | 0.376 | 0.405 | 0.398 | 0.385 | 0.378 | 0.388 | 0.379
VSR-VAE | 0.377 | 0.372 | 0.398 | 0.390 | 0.422 | 0.414 | 0.401 | 0.393 | 0.400 | 0.392
Deep-Deconf | 0.386 | 0.379 | 0.407 | 0.399 | 0.431 | 0.420 | 0.410 | 0.404 | 0.414 | 0.401
p-value | 9.96E-5 | 2.47E-3 | 9.80E-3 | 2.08E-2 | 1.91E-3 | 8.78E-3 | 1.47E-2 | 2.72E-3 | 7.38E-3 | 5.71E-3
|  |  |  |  |  |  |  |  |  |
ML-causal | $\lambda_{\theta}=0.1$ | $\lambda_{\theta}=0.3$ | $\lambda_{\theta}=0.5$ | $\lambda_{\theta}=0.7$ | $\lambda_{\theta}=0.9$
Methods | R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | R@20 | N@20 | R@20 | N@20
WMF | 0.068 | 0.062 | 0.072 | 0.071 | 0.074 | 0.070 | 0.073 | 0.068 | 0.065 | 0.059
IPW-MF | 0.067 | 0.062 | 0.075 | 0.073 | 0.066 | 0.072 | 0.071 | 0.074 | 0.066 | 0.065
Deconf-MF | 0.076 | 0.069 | 0.084 | 0.077 | 0.082 | 0.073 | 0.080 | 0.079 | 0.078 | 0.073
Concat-VAE | 0.094 | 0.097 | 0.103 | 0.106 | 0.105 | 0.101 | 0.113 | 0.108 | 0.101 | 0.103
VSR-VAE | 0.103 | 0.102 | 0.109 | 0.112 | 0.110 | 0.107 | 0.117 | 0.114 | 0.106 | 0.106
Deep-Deconf | 0.108 | 0.105 | 0.113 | 0.111 | 0.117 | 0.109 | 0.124 | 0.121 | 0.115 | 0.109
p-value | 2.40E-4 | 2.23E-2 | 1.42E-3 | $>0.1$ | 2.96E-3 | $>0.1$ | 4.46E-4 | 1.38E-3 | 1.39E-4 | $>0.05$

We evaluate the model performance under strong generalization [38], where the
observed item exposures and ratings for validation and test users are used
only for inference purpose. When training the exposure model, we put aside 20%
of the observed exposures for predictive checks [37], where the best model is
selected by log-likelihood of the hold-out exposures. The outcome model is
selected by how well it ranks the hold-out observed interactions for the
validation users. The ranking quality is evaluated by R@$K$ and N@$K$, where
R@$K$ is the Top-$K$ recall. If we denote the item at ranking position $r$ by
$i(r)$ and the set of hold-out items for the user by $\mathcal{I}_{u}$, R@$K$
is calculated as:

$\operatorname{R}@K(i)=\frac{\sum_{r=1}^{M}\mathbb{I}\left[j(r)\in\mathcal{I}_{u}\right]}{\min\left(M,\left|\mathcal{I}_{u}\right|\right)},$
(13)

where $\mathbb{I}$ in the numerator is the indicator function, and the
denominator is the minimum of $K$ and the number of hold-out items. N@$K$ is
the normalized DCG defined as follows:

$\operatorname{DCG}@K(u)=\sum_{r=1}^{K}\frac{2^{\mathbb{I}\left[i(r)\in\mathcal{I}_{u}\right]}-1}{\log(r+1)}.$
(14)

The model is selected by N@20 on validation users where 20% of the observed
ratings are hold-out for model evaluation. We choose only $K=20$ for both
metrics to report because we found that the performance trend is similar for
different $K$ in our experiments (we have tested $K\in range(5,50,5)$). The
R@20 and N@20 on test users with fully observed ratings for all items averaged
over five different splits of the datasets are reported as the unbiased model
performance.

###  5.4 Comparisons with Baselines

####  5.4.1 Baselines

Our primary baseline is the deconfounded recommender (Deconf-MF)
[7]666https://github.com/yixinwang/causal-recsys-public, which also models the
recommendation as a multiple causal inference problem. In Deconf-MF, the
substitute confounders and ratings are estimated by linear Poisson
factorization. Two other causality-based recommenders are both based on
propensity-score re-weighting, which eliminates the confounding bias by re-
weighting the ratings by the inverse of propensity scores i.e., the chance of
their exposures conditional on covariates (previous exposures and user
features). The first method is the inverse propensity weighting matrix
factorization (IPW-MF) [5], where the propensity scores are estimated by
simple regression. Another method is the variational sample re-weigting (VSR)
[15], which considers the multiple causes as a bundle treatment and estimates
the propensity scores via latent variables instead of observations. For a fair
comparison, the two matrix factorization-based methods are augmented with user
features in an SVD++ manner [39] and the VAE-based methods concatenates user
features with exposures as the extra inputs, where improvement has been
observed compared to their original forms. The non-causal baselines we include
are the weighted matrix factorization [40] (WMF, also augmented with user
features) and the concat-VAE, which is a variant of Deep-Deconf where the
exposure model is removed to demonstrate the effectiveness of causal
reasoning.

####  5.4.2 Experimental Setups

In simulation, we fix the basic confounding level $\gamma_{b}$ to 2.0 as with
the empirical estimation of Wang et al. [7], and we vary the strength of user
preference confounding effects by changing
$\gamma_{\theta}\in\operatorname{range}(0.1,0.2,0.9)$. The models are then
evaluated under different confounding levels.

####  5.4.3 Comparisons with the State-of-the-Art

The comparison results are demonstrated in Table (2). From Table (2) we can
find that the vanilla WMF performs the worst among all the methods that we
draw comparisons with, especially when the ratings are heavily confounded.
IPW-MF addresses the confounding bias by re-weighting the ratings by the
propensity scores estimated through regression. While improvement has been
observed over WMF in most cases, the unbiasedness of IPW-MF requires two
strong assumptions, i.e., unconfoundedness and a correctly specified
propensity model, which relies heavily on the expertise of the researchers.
Therefore, it hinders IPW-MF’s further improvement. Deconf-MF weakens the
unconfoundedness assumption of IPW-MF to the non-existence of single-cause
confounders, and is the best matrix factorization-based baselines demonstrated
in the middle part of three sub-tables of Table (2). However, since Deconf-MF
models both the exposures and the ratings as linear Poisson matrix
factorization, it fails to capture non-linear influences of unobserved
confounders. Moreover, it treats a user’s ratings to different items
separately in the outcome model, where co-recommendation effects cannot be
considered to further improve recommendation performance.

Consequently, Deconf-MF is outperformed by the Multi-VAE-based deep generative
models, even if Concat-VAE is not causality-based and VSR is based on
propensity score-reweighting which requires a stronger unconfoundedness
assumption for unbiasedness to hold. Combining the advantages of non-linear
collaborative modeling ability of Multi-VAE and model-agnostic debiasing
advantage of the substitute confounder-based causal inference for
recommendations, Deep-Deconf achieves a systematic performance improvement
compared with Deconf-MF while being more robust than CondVAE and VSR faced
with unobserved confounders. Therefore, the experiments demonstrate the
superiority of the Deep-Deconf to other causal recommenders.

###  5.5 Duality of Multi-Cause Confounders

From Table (2) we can find that the best results for each method w.r.t. the
confounding level, which are marked with colors blue and red for $R@20$ and
$N@20$, respectively, appear in the middle of the Table. This shows an
interesting phenomenon that the performance for all the methods improves first
and then deteriorates with the increase of confounding level. This is against
the naive intuition that the recommendation performance should reduce
monotonically when the confounding level increases. The phenomenon can also be
discovered from Fig. 1 of [7], but the authors provided no explanation to why
it occurs.

####  5.5.1 Formulation of the Theory

We propose the "duality of multi-cause confounders" to explain such a
phenomenon. When the confounding level is low, users tend to consume items at
random where item co-occurrences contains little collaborative information.
Therefore, the models waste parameters to fit uninformative random item
exposures, which degenerates the model performances. However, the observed
rating distribution is a more faithful representation of the population rating
distribution. This reduces the confounding bias. When the strength of
confounding effects increases, although the co-occurrence of items
demonstrates more regular patterns, the observed rating distribution deviates
further from the true population distribution. Thus, the influence of
confounding bias outweighs the introduction of extra item collaborative
information and reduces the performance.

In essence, the duality of multi-cause confounders results from their
commonality among items, i.e., they are also shared item attributes.
Therefore, in contrast to their role in traditional single-cause inference
problems, the confounders in recommendations, like yin and yang, exert their
force in two opposite ways: On the one hand, since these confounders tend to
be "shared" items attributes, they help explain why certain items tend to
appear together and why certain items have never occurred at the same time.
This introduces item collaborative information that is conducive to the
recommendation of new items that are similar to the items that the user has
interacted with. On the other hand, when the confounding effects are overly
strong, the observed rating distribution diverges drastically from the true
rating distribution, which leads to systematic bias due to the unbalanced
representation of items in the data that severely degenerates the
recommendation performance. (Appendix B.4).

####  5.5.2 Discussions on Deconfounding

The duality of multi-cause confounders naturally leads to a further research
question: In the battle of the benefits and drawbacks of multi-cause
confounders, which one will prevail? The answer, which the authors believe, is
that no matter the results, a deconfounded recommender should always be
preferred over a non-causality-based one if unobserved confounders indeed
pervasively exist to affect the ratings, because greedily exploiting the
collaborative information associated with unobserved confounders come at a
price: It also inherits the confounding bias in the historical ratings, which
hinders the further improvement of the recommendation model. Consider the
extreme case where the exposures are entirely due to previous recommendations.
In this case, the new recommender system will perform no better than the
previous one by greedily exploiting. Deconfounded recommenders remedy the bias
by balancing the under- and over- represented items with either sample re-
weighting or controlling substitute confounders. Through these mechanisms, the
recommender system can provide a more bias-free estimate of user preferences.
Furthermore, the above analysis naturally leads to another conclusion that a
good strategy to reduce the confounding bias from the data collection
perspective is to avoid greedy exploitation and to add random exploration to
the recommendation policy that collects the user ratings, where the randomness
negates the influence of unobserved confounders. This is interesting, as it
provides another justification for exploration, i.e., a commonly adopted
strategy in reinforcement learning-based recommender systems, from a causal
perspective. A brief discussion of the relationship between exploration and
deconfounding can be referred to in Appendix B.5.

###  5.6 Sensitivity Analysis to User Features

We have proved that introducing user features as pre-treatment variables can
reduce the estimand variance for Deep-Deconf as long as they are informative
to rating prediction. However, how does the "informative level" of user
features influence the estimand variance is unclear. Recall that in our
simulation, user features are generated by setting
$\mathbf{x}_{u}=\operatorname{f_{PCA}}(\boldsymbol{\theta}_{u}+{\boldsymbol{\epsilon}}_{u})$,
where $\boldsymbol{\theta}_{u}$ is the user preference and
$\boldsymbol{\epsilon}_{u}\sim\mathcal{N}(\mathbf{0},\lambda_{u}^{-1}\mathbf{I}_{K})$
is a random Gaussian noise. We control the informative level of the user
features by setting $\lambda_{u}^{-1}\in\\{0.1,0.5,0.9\\}$ and evaluate Deep-
Deconf. The performances are compared to a baseline where no user features are
used. The results are summarized in Table (3). From Table (3) we can find that
user features that are more informative to rating prediction (i.e., with less
noise) indeed lead to a lower estimand variance, which is reflected by a
higher performance when the ratings associated with one specific item exposure
is extremely sparse. Moreover, the performance improvement is more significant
when the simulated confounding level is high. When the user features are
highly noisy ($\lambda_{f}=0.9$), however, the model overfits on the noise and
the performance degenerates to be similar to the baseline model where no user
features are used.

Table 3: Performance of Deep-Deconf when user features have different noise levels (N.F. means no user features) Simulated | Low Conf. ($\lambda_{b}=0.3$) | High Conf. ($\lambda_{b}=0.7$)
---|---|---
Noise | R@20 | N@20 | R@20 | N@20
0.1 | 0.6665 | 0.6726 | 0.6967 | 0.7127
0.5 | 0.6602 | 0.6650 | 0.6934 | 0.7023
0.9 | 0.6574 | 0.6518 | 0.6901 | 0.6887
N.F. | 0.6437 | 0.6594 | 0.6832 | 0.6686
|  |  |  |
VG-causal | Low Conf. ($\lambda_{b}=0.3$) | High Conf. ($\lambda_{b}=0.7$)
Noise | R@20 | N@20 | R@20 | N@20
0.1 | 0.4071 | 0.3974 | 0.4098 | 0.4039
0.5 | 0.4034 | 0.3963 | 0.4036 | 0.3982
0.9 | 0.4010 | 0.3928 | 0.3993 | 0.3934
N.F. | 0.3982 | 0.3909 | 0.3948 | 0.3912
|  |  |  |
ML-causal | Low Conf. ($\lambda_{b}=0.3$) | High Conf. ($\lambda_{b}=0.7$)
Noise | R@20 | N@20 | R@20 | N@20
0.1 | 0.1130 | 0.1108 | 0.1240 | 0.1212
0.5 | 0.1119 | 0.1094 | 0.1238 | 0.1201
0.9 | 0.1088 | 0.1082 | 0.1203 | 0.1175
N.F. | 0.1092 | 0.1091 | 0.1172 | 0.1144

##  6 Conclusions

In this article, we proposed an effective deep factor model-based causal
inference algorithm, Deep-Deconf, for recommender systems. By controlling
substitute confounders inferred through factorized logistic VAE that render
the observed exposures randomized Bernoulli trials, Deep-Deconf lower the
multi-cause confounding bias, leading to more faithful estimation of user
preferences. Moreover, we have proved that the variance of the estimated
unbiased ratings can be substantially decreased by introducing user features
as pre-treatment variables. We note that our algorithm can be plugged into any
user-oriented auto-encoder-based recommender systems by adding a decoder
branch that constrains the user-latent variable to generate factorized
exposures. Therefore, we speculate that these models can also benefit from the
confounding reduction advantage of our method with a modest extra
computational overhead.

##  Appendix A Theoretical analysis of Deep-Deconf

###  A.1 Proof of Conditional Independence

In the exposure model of Deep-Deconf, we claim that a decoder that takes
substitute confounder $\mathbf{z}_{u}$ as input and reconstructs the exposure
$\mathbf{a}_{u}$ with factorized logistic likelihood can renders
$\mathbf{a}_{u}$ conditionally independent. Some may question that this is not
possible since the weights that predict $a_{ui}$ for different $i$ are shared.
This is not true. The fact is that the exposures cannot be marginally
independent, as they are all governed by unobserved confounders. However,
conditional on $\mathbf{z}_{u}$, they can be independent, and generation of
$\mathbf{a}_{u}$ from $\mathbf{z}_{u}$ can also be implemented via a shared
decoder. The reason is as follows. For user $u$ with latent confounder
$\mathbf{z}_{u}$, if we denote the input vector to the last layer of the
exposure network as $f(\mathbf{z}_{u})$, the logit of the exposure to item $i$
is calculated as $logit\
p(a_{ui}\mid\mathbf{z}_{u})=[\mathbf{W}f(\mathbf{z}_{u})]_{i}=\mathbf{w}_{i}\cdot
f(\mathbf{z}_{u})$. Since $f(\mathbf{z}_{u})$ only depend on $\mathbf{z}_{u}$,
if the row vectors of the last layer weights $\mathbf{W}$ are independent,
$\mathbf{z}_{u}$ contains all information for $a_{ui}$ contained in $a_{uj}$.
Therefore, $a_{ui}$ is conditionally independent of $a_{uj}$ given
$\mathbf{z}_{u}$, even if the weights used to infer different $a_{ui}$ are
shared among all items.

###  A.2 Proof of Variance Reduction via User Features as Pre-treatment
Variables

Figure 7: A simplified illustration of the distribution fitting process and
the confounding simulation process to create the real-world causal datasets
used in experiments.

In this section, we derive the sampling variance of the coefficient of
exposure indicator obtained by ordinary least square (OLS) estimator before
and after the introduction of user features as pre-treatment variables. Recall
that after we simplify the network weight $\mathbf{W}$ to a diagonal matrix
$\mathbf{w}\cdot\mathbf{I}$, user features and substitute confounders to
scalars, the single-layer outcome prediction network for the ratings before
the introduction of user features as pre-treatment variables becomes

$r_{ui}(a_{ui})=w^{z}z_{u}+w_{i}^{a}a_{ui}+\alpha_{i}+\epsilon_{ui}.$ (15)

The OLS estimators for the coefficients can be specified as

$\left(\hat{w}^{z},\hat{w}_{i}^{a},\hat{\alpha}_{i}\right)=\operatorname{argmin}_{w^{z},w_{i}^{a},\alpha_{i}}\sum_{u=1}^{U}\left(r_{ui}-w^{z}z_{u}+w_{i}^{a}a_{ui}+\alpha_{i}\right)^{2}.$
(16)

As we have demonstrated in the main paper, since conditional on $z_{u}$, the
ratings $r_{ui}$ can be viewed as generated from randomized experiments,
$\hat{w}_{i}^{a}$ is an unbiased estimator for the population conditional
average exposure effects of item $i$ on rating $r_{ui}$. The SUTVA assumption
ensures the non-interference of exposures of different users, and the
homoskedasticity assumption ensures that the variance does not vary by the
change of $a_{ui}$ and $z_{u}$ [10]. If we further assume
$\mathbb{E}[\epsilon_{ui}\mid A_{ui},Z_{u}]=0$ (the above assumptions are
known as the Gaussian-Markov assumption), according to the Gauss theorem [42],
the sampling variance of $\hat{w}_{i}^{a}$ is

$\hat{V}_{i}=\frac{\hat{\sigma}_{R_{ui}\mid
A_{ui},Z_{u}}^{2}}{\sum_{u=1}^{U}\left(a_{ui}-\bar{a}_{ui}\right)^{2}}=s^{2}\cdot\left(\frac{1}{U_{i}^{1}}+\frac{1}{U_{i}^{0}}\right),$
(17)

where $s^{2}=\hat{\sigma}_{R_{ui}\mid A_{ui},Z_{u}}^{2}$ is the OLS variance
of $R_{ui}$, $\bar{a}_{ui}=\sum_{u}a_{ui}/U$ is the average exposure number of
item $i$ in the finite sample, $U_{i}^{1}$ is the exposure count of item $i$
and $U_{i}^{0}=U-U_{i}^{1}$. The second equality can be derived with simple
algebra based on the fact that $a_{ui}\in\\{0,1\\}$ and therefore
$a_{ui}^{2}=a_{ui}$. The $\hat{\sigma}_{R_{ui}\mid A_{ui},Z_{u}}^{2}$ can be
calculated as the common variance across the two potential outcome
distributions,

$\displaystyle\hat{\sigma}_{R_{ui}\mid
A_{ui},Z_{ui}}^{2}=\frac{1}{U-2}\Big{(}$
$\displaystyle\sum_{u:a_{ui}=1}\left(r_{ui}(1)-\bar{r}_{ui}(1)\right)^{2}$
(18) $\displaystyle+$
$\displaystyle\sum_{u:a_{ui}=0}\left(r_{ui}(0)-\bar{r}_{ui}(0)\right)^{2}\Big{)}.$

After we multiply and divide $U$ on the R.H.S. of Eq. (17), we have
$\hat{V}_{i}\overset{p}{\to}\frac{\sigma_{R_{ui}\mid
Z_{ui},A_{ui}}^{2}}{U\cdot p_{i}\cdot(1-p_{i})}$ as $U$ approaches infinity,
where $p_{i}=\operatorname{lim}^{p}_{U\to\inf}U^{1}_{i}/U$ is the population
probability of the exposure of item $i$; this finishes our deduction of
estimand variance before introducing the user features as pre-treatment
variables. Post the introduction of the user features $x_{u}$, the outcome
prediction network becomes

$r_{ui}(a_{ui})=w^{z}z_{u}+w_{i}^{a}a_{ui}+w^{x}x_{u}+\alpha_{i}+\epsilon_{ui}.$
(19)

Supposing again the variance does not vary by the change of the treatment
indicator $a_{ui}$, the surrogate confounder $z_{u}$, and the user feature
$x_{u}$ (i.e., homoscedasticity), with the SUTVA assumption and the assumption
of $\mathbb{E}[\epsilon_{ui}\mid A_{ui},Z_{u},X_{u}]=0$, the limiting sampling
variance of the OLS estimator for Eq. (19), i.e., $\hat{V}^{new}_{i}$, given
the general case of $\hat{V}_{i}$, can be directly calculated as
$\frac{\sigma_{R_{ui}\mid X_{u},Z_{ui},A_{ui}}^{2}}{U\cdot
p_{i}\cdot(1-p_{i})}$. By comparing the form of $\hat{V}^{new}_{i}$ and
$\hat{V}_{i}$ we can find that the only difference lies in the OLS variance
term in the numerator: if the features of a user $x_{u}$ are indicative to the
prediction of her ratings $r_{ui}$, $\sigma_{R_{ui}\mid
X_{u},Z_{ui},A_{ui}}^{2}$ reduces considerably compared with
$\sigma_{R_{ui}\mid Z_{ui},A_{ui}}^{2}$, which leads to a substantial decrease
of estimand variance. This is especially favorable in our multiple causal case
where the low sample efficiency due to large causal space hinders a precise
inference.

Figure 8: Item popularity distribution of the established ML-causal and VG-
causal datasets.

###  A.3 Discussion of Model Identifiability

The authors have noticed that the deconfounder algorithm [6], based on which
we designed the Deep-Deconf, has raised some discussions recently among
researchers, including [43], [44]. Wang & Blei have also responded to the
comments in [6], [45]. The questions of [43] were solved in [7] (see footnotes
on Page 2), which stated that the focus of Deconf-MF is on estimating the
expected potential outcome (ratings) if $K$ extra items are exposed (i.e.,
top-K recommendations), so it has different assumptions with counterexamples
that rely on do-operators. The disagreement between Wang & Blei and Ogburn et
al. mainly lies in the assumptions required for the model identifiability.
Ogburn et al. believed that Deconfounder requires extra assumptions such as
the inferred substitute confounder $\mathbf{z}$ does not pick up post-
treatment variables, etc. However, Wang et al. responded that these
assumptions do not satisfy the requirement $\mathbf{z}$ can be pinpointed (see
Theorem 7 in [7]). Similarly, the identifiability of Deep-Deconf also relies
on the pinpoint requirement of the substitute confounders.

##  Appendix B Experiments on Real-world Datasets

###  B.1 Schematic Illustration of Dataset Establishment

A schematic illustration for the establishment of the real-world causal
datasets is shown in Fig. (7).

Figure 9: Averaged KL-divergence between individual rating distributions
before and after exposure.

###  B.2 Item Popularity Distributions

The popularity of an item is defined as the number of users who have rated
that item. Since the item popularity distribution on the ML-causal and VG-
causal datasets only depends on the exposure, we visualize the distribution
with an arbitrary confounding effect. The results are illustrated in Fig. (8).
From Fig. (8) we can discover that the item popularity distribution of both
the ML-causal and VG-causal datasets exhibits both long-tail and right-skewed
characteristics, which faithfully reflects the item popularity distributions
in the real-world scenario.

###  B.3 Rating Distribution Pre- and Post- Exposure

The global rating distribution of a recommendation dataset is defined as
$P(R=r)\propto\sum_{u,i}\mathbf{1}(r_{ui}=r),\ \forall r\in\\{1,2,3,4,5\\}$,
where $r=0$ denotes the rating is unobserved is excluded from consideration.
If no confounder exists, the exposure matrix $\mathbf{A}_{rand}$ is a random
matrix where the elements in $\mathbf{A}_{rand}$ are independent Bernoulli
variables. The individual rating distribution for a user $P_{u}(R=r)$ can be
defined accordingly. Since the observed ratings $\mathbf{R}^{obs}_{rand}$ is
acquired by $\mathbf{R}^{obs}_{rand}=\mathbf{R}_{all}\times\mathbf{A}_{rand}$,
the element-wise independence of $\mathbf{A}_{rand}$ ensures that the global
and individual rating distributions of the observed ratings
$\mathbf{R}^{obs}_{rand}$ is unbiased estimators to those of the population
ratings $\mathbf{R}_{all}$. Unobserved confounders, however, create a spurious
dependence of $\mathbf{R}^{obs}_{conf}$ on $\mathbf{A}_{conf}$, and therefore
lead to systematic bias of the rating distributions in
$\mathbf{R}^{obs}_{conf}$ after the exposure. Although in practice, the
population rating matrix $\mathbf{R}_{all}$ is unobtainable, in our
simulation, we have the users’ ratings for all items (although only exposed
ratings are visible to the algorithm for training). Therefore, in this paper,
we can visualize the confounders’ effect on both global and individual rating
distributions after exposure under various levels of confounding effects.

We set $\lambda_{b}=0$ and $\lambda_{\theta}=0$ where no confounding effect
exists and then fix $\lambda_{b}$ to 2, and vary $\lambda_{\theta}$ from 0.1
to 0.9. The comparisons of global rating distribution are shown in Fig. (6).
From Fig. (6), we can find that an obvious observation of the confounding
effect is that positively rated items are more likely to be exposed than their
negatively rated counterparts, and the stronger the confounding effects are,
the more unbalanced the exposure of highly-rated and lowly-rated items. This
is quite interesting, since all we have done to simulate the confounders is to
(a) train two VAEs to model the exposure and rating distributions of the ML-1m
and Amazon-VG datasets and (b) make the latent variables that generate the
exposure and ratings for a user correlated by taking a weighted sum of the
confounder and user variable. This phenomenon also has a real-world
explanation: Users tend to rate items they like and ignore items they dislike,
which leads to systematic bias due to the gross under-representation of items
with negative ratings. Furthermore, we visualize the difference of the
individual rating distributions before and after exposure under various levels
of confounding effects. The averaged KL-divergence between true and observed
individual rating distribution is in Fig. (9).

Figure 10: A simple example to explain the duality of multi-cause confounders
in recommendation systems.

###  B.4 More on Duality of Multi-cause Confounders

In the experiments, we have discovered that the recommendation quality
improves first and then degenerates with the increase of confounding level. We
conclude that "multi-cause confounders in recommender systems like yin and
yang, exert their forces in two opposite ways." In this section, we provide a
simple but intuitive example to further support the claim. Suppose that in our
toy system, a subset of users is "blue lovers" who rate all blue items five
and all red items one —similarly, a subset of "red lovers" rate just the
opposite way. Moreover, blue lovers tend to be recommended with blue items,
and red lovers with red items. Since color affects both the exposure and the
rating of an item, item color is a confounder in the system. In addition, it
is a multi-cause confounder because color is an attribute that are shared
among all the items.

The observed ratings for the two blue lovers and one red lover under low and
high confounding levels are illustrated in Fig. (10). The left part of Fig.
(10) shows observations under no confounding effects. In such a case, the
exposure probability of an item is independent of its color (1/3 for both red
items and blue items), and the observed global and individual rating
distributions $p(r=5)=p(r=1)=1/2$ exactly matches the population rating
distributions. However, since the item co-occurrences are random, no item
collaborative information can be utilized to recommend new items with similar
rating patterns. In contrast, the right part of Fig. (10) shows rating
observations with a high confounding level, where the exposure probability of
an item clearly depends on its color and the user’s preference. Under this
circumstance, new items with similar user rating patterns with the items have
already interacted by the users can be readily recommended based on item
collaborative information (e.g., item #3 to user #1, and item #1 to user #2
based on their similar rating pattern to item #2 for both users). However, the
observed rating distribution (all are five) deviates drastically from the
population distribution, which introduces a systematic bias between the true
and observed distribution that could degrade the model performance.

###  B.5 Exploration and Deconfounding

Figure 11: $U$: user, $V$: item, $R$: rating, $X$: interaction history, $E$: a
stochastic exploration strategy. (a) The hypothetical causal graph that
traditional non-causality-based recommender systems assume to generate the
collected rating data, where the exposure of item $V$ is independent of user
$U$. (b) The true causal graph that generates the data collected by an
exploitation-based strategy, where the exposure of item $V$ is dependent on
the user’s interaction history $X$. (c) The true causal graph that generates
the data collected by an exploration-based strategy, where the exposure is
based solely on the random exploration strategy $E$.

Although we establish the Deep-Deconf with Rubin’s causal model in the main
paper, we temporarily switch to Pearl’s causal structural models to
demonstrate how exploration eliminates confounding bias from the data
collection perspective for better illustrative effects. Specifically, we
provide three causal graphs as Fig. (11). Fig. (11) - (a) is the hypothetical
causal graph that traditional non-causality-based recommender systems assume
to generate the collected rating data, where the exposure of item $V$ is
independent of user $U$. Therefore, it can also be viewed as assuming the data
are generated from randomized experiments from Rubin’s causal perspective.
Fig. (11) - (b) shows a simple case of the true data generation process where
the recommender systems used to collect the data greedily exploit the
historical user ratings and user’s preference to make recommendations. Note
that If we use a naive model that assumes the data generation process of (a)
to fit on rating data actually generated according to (b), the influence of
unobserved confounders is mistakenly captured as the user preference, which
leads to confounding bias in these models. Fig. (11) - (c) shows the causal
graph where the recommender system uses a random exploration strategy (i.e.,
randomly picking up an item to show the users) to collect data. In (c), we can
find that since the item exposure is due solely to the random exploration, the
exposure bias ($U\rightarrow V$) and confounding bias ($U\leftarrow
X\rightarrow V$) is negated by the randomness. Therefore, models with the
assumption of (a) can still be unbiased when trained on data collected by (c).
Most recommender systems are a balance between exploitation in (b) and
exploration in (c). Through comparisons among the three causal graphs, we
analyze the exploration and exploitation, two commonly used strategies in
reinforcement learning-based recommender systems, from a causal perspective;
based on this, we provide a new justification for exploration strategies other
than reducing the uncertainty in user preference estimations.

## References

  * [1] J. Chang, C. Gao, X. He, D. Jin, and Y. Li, “Bundle recommendation and generation with graph neural networks,” _IEEE Trans. Knowl. Data Eng._ , to be published, doi: 10.1109/TKDE.2021.3114586.
  * [2] B. Pradel, N. Usunier, and P. Gallinari, “Ranking with non-random missing ratings: influence of popularity and positivity on evaluation metrics,” in _Proc. ACM Conf. Recommender Syst._ , 2012, pp. 147–154.
  * [3] X. Zheng, M. Wang, R. Xu, J. Li, and Y. Wang, “Modeling dynamic missingness of implicit feedback for sequential recommendation,” _IEEE Trans. Knowl. Data Eng._ , to be published, doi: 10.1109/TKDE.2020.2980517.
  * [4] D. B. Rubin, “Formal model of statistical inference for causal effects,” _J. Stat. Plan. Inference_ , vol. 25, no. 3, pp. 279–292, 1990.
  * [5] T. Schnabel, A. Swaminathan, A. Singh, N. Chandak, and T. Joachims, “Recommendations as treatments: Debiasing learning and evaluation,” in _Proc. Int. Conf. Mach. Learn._ , 2016, pp. 1670–1679.
  * [6] Y. Wang and D. M. Blei, “The blessings of multiple causes,” _J. Amer. Statist. Assoc._ , vol. 114, no. 528, pp. 1574–1596, 2019\.
  * [7] Y. Wang, D. Liang, L. Charlin, and D. M. Blei, “Causal inference for recommender systems,” in _Proc. ACM Conf. Recommender Syst._ , 2020, pp. 426–431.
  * [8] D. Liang, R. G. Krishnan, M. D. Hoffman, and T. Jebara, “Variational autoencoders for collaborative filtering,” in _Proc. Int. Conf. World Wide Web Conf._ , 2018, pp. 689–698.
  * [9] H. Steck, “Evaluation of recommendations: Rating-prediction and ranking,” in _Proc. ACM Conf. Recommender Syst._ , 2013, pp. 213–220.
  * [10] G. W. Imbens and D. B. Rubin, _Causal Inference in Statistics, Social, and Biomedical Sciences_. Cambridge University Press, 2015.
  * [11] J. Pearl, M. Glymour, and N. P. Jewell, _Causal Inference in Statistics: A Primer_. John Wiley & Sons, 2016.
  * [12] R. Salakhutdinov and N. Srebro, “Collaborative filtering in a non-uniform world: Learning with the weighted trace norm,” in _Proc. Int. Conf. Neural Inf. Process. Syst._ , 2010, pp. 2056–2064.
  * [13] T. Joachims, A. Swaminathan, and T. Schnabel, “Unbiased learning-to-rank with biased feedback,” in _Proc. ACM Int. Conf. Web Search Data Mining_ , 2017, pp. 781–789.
  * [14] S. Bonner and F. Vasile, “Causal embeddings for recommendation,” in _Proc. ACM Conf. Recommender Syst._ , 2018, pp. 104–112.
  * [15] H. Zou, P. Cui, B. Li, Z. Shen, J. Ma, H. Yang, and Y. He, “Counterfactual prediction for bundle treatment,” _Proc. Int. Conf. Neural Inf. Process. Syst._ , vol. 33, 2020.
  * [16] J. Ma, R. Guo, A. Zhang, and J. Li, “Multi-cause effect estimation with disentangled confounder representation,” in _Proc. Int. Joint Conf. Artif. Intell._ , 2021.
  * [17] J. Zhang, X. Chen, and W. X. Zhao, “Causally attentive collaborative filtering,” in _Proc. ACM Int. Conf. Inf. Knowl. Manage._ , 2021, pp. 3622–3626.
  * [18] J. Tan, S. Xu, Y. Ge, Y. Li, X. Chen, and Y. Zhang, “Counterfactual explainable recommendation,” in _Proc. ACM Int. Conf. Inf. Knowl. Manage._ , 2021, pp. 1784–1793.
  * [19] Y. Zhang, F. Feng, X. He, T. Wei, C. Song, G. Ling, and Y. Zhang, “Causal intervention for leveraging popularity bias in recommendation,” in _Proc. 39th Int. ACM SIGIR Conf. Res. Develop. Inf. Retrieval_ , 2021, p. 11–20.
  * [20] Y. Zheng, C. Gao, X. Li, X. He, Y. Li, and D. Jin, “Disentangling user interest and conformity for recommendation with causal embedding,” in _Proc. Int. Conf. World Wide Web Conf._ , 2021, pp. 2980–2991.
  * [21] S. Xu, Y. Ge, Y. Li, Z. Fu, X. Chen, and Y. Zhang, “Causal collaborative filtering,” 2021. [Online]. Available: https://arxiv.org/abs/2102.01868
  * [22] A. Gelman, “Resolving disputes between J. Pearl and D. Rubin on causal inference,” _Statistical Modeling, Causal Inference, and Social Science_ , 2009.
  * [23] C. Xu, H. Huang, and S. Yoo, “Scalable causal graph learning through a deep neural network,” in _Proc. ACM Int. Conf. Inf. Knowl. Manage._ , 2019, pp. 1853–1862.
  * [24] N. Pawlowski, D. Coelho de Castro, and B. Glocker, “Deep structural causal models for tractable counterfactual inference,” _Proc. Int. Conf. Neural Inf. Process. Syst._ , vol. 33, 2020\.
  * [25] Y. Luo, J. Peng, and J. Ma, “When causal inference meets deep learning,” _Nat. Mach. Intell._ , vol. 2, no. 8, pp. 426–427, 2020.
  * [26] B. Schölkopf, F. Locatello, S. Bauer, N. R. Ke, N. Kalchbrenner, A. Goyal, and Y. Bengio, “Toward causal representation learning,” _Proc. IEEE_ , 2021.
  * [27] C. Louizos, U. Shalit, J. Mooij, D. Sontag, R. Zemel, and M. Welling, “Causal effect inference with deep latent-variable models,” _Proc. Int. Conf. Neural Inf. Process. Syst._ , 2017\.
  * [28] V. Rakesh, R. Guo, R. Moraffah, N. Agarwal, and H. Liu, “Linked causal variational autoencoder for inferring paired spillover effects,” in _Proc. ACM Int. Conf. Inf. Knowl. Manage._ , 2018, pp. 1679–1682.
  * [29] H. Steck, “Training and testing of recommender systems on data missing not at random,” in _Proc. 16th ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining_ , 2010, pp. 713–722.
  * [30] P. W. Holland, “Statistics and causal inference,” _J. Amer. Statist. Assoc._ , vol. 81, no. 396, pp. 945–960, 1986.
  * [31] K. Imai and D. A. Van Dyk, “Causal inference with general treatment regimes: Generalizing the propensity score,” _J. Amer. Statist. Assoc._ , vol. 99, no. 467, pp. 854–866, 2004.
  * [32] D. P. Kingma and M. Welling, “Auto-encoding variational Bayes,” _Proc. Int. Conf. Learn. Representations_ , 2013.
  * [33] W. Guo, S. Wang, P. Ding, Y. Wang, and M. I. Jordan, “Multi-source causal inference using control variates,” 2021. [Online]. Available: https://arxiv.org/abs/2103.16689
  * [34] M. Sato, S. Takemori, J. Singh, and T. Ohkuma, “Unbiased learning for the causal effect of recommendation,” in _Proc. ACM Conf. Recommender Syst._ , 2020, pp. 378–387.
  * [35] B. M. Marlin and R. S. Zemel, “Collaborative prediction and ranking with non-random missing data,” in _Proc. ACM Conf. Recommender Syst._ , 2009, pp. 5–12.
  * [36] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” _Proc. Int. Conf. Learn. Representations_ , 2014.
  * [37] D. B. Rubin, “Bayesianly justifiable and relevant frequency calculations for the applies statistician,” _Ann. Stat._ , pp. 1151–1172, 1984\.
  * [38] D. Liang, M. Zhan, and D. P. Ellis, “Content-aware collaborative music recommendation using pre-trained neural networks.” in _Proc. ISMIR_ , 2015, pp. 295–301.
  * [39] Y. Koren, “Factorization meets the neighborhood: A multifaceted collaborative filtering model,” in _Proc. 14th ACM SIGKDD Int. Conf. Knowl. Discov. Data Mining_ , 2008, pp. 426–434.
  * [40] Y. Hu, Y. Koren, and C. Volinsky, “Collaborative filtering for implicit feedback datasets,” in _Proc. 8th IEEE Int. Conf. Data Mining_ , 2008, pp. 263–272.
  * [41] M. F. Dacrema, P. Cremonesi, and D. Jannach, “Are we really making much progress? a worrying analysis of recent neural recommendation approaches,” in _Proc. ACM Conf. Recommender Syst._ , 2019, pp. 101–109.
  * [42] R. A. Johnson, D. W. Wichern _et al._ , “Multivariate linear regression models,” in _Applied Multivariate Statistical Analysis_ , 2002, ch. 7, pp. 360–417.
  * [43] A. D’Amour, “On multi-cause causal inference with unobserved confounding: Counterexamples, impossibility, and alternatives,” 2019. [Online]. Available: https://arxiv.org/abs/1902.10286
  * [44] E. L. Ogburn, I. Shpitser, and E. J. T. Tchetgen, “Comment on “blessings of multiple causes”,” _J. Amer. Statist. Assoc._ , vol. 114, no. 528, pp. 1611–1615, 2019.
  * [45] Y. Wang and D. M. Blei, “Towards clarifying the theory of the deconfounder,” 2020. [Online]. Available: https://arxiv.org/abs/2003.04948
  * [46] H. Steck, “Item popularity and recommendation accuracy,” in _Proc. ACM Conf. Recommender Syst._ , 2011, pp. 125–132.
  * [47] D. Bouneffouf, A. Bouzeghoub, and A. L. Gançarski, “A contextual-bandit algorithm for mobile context-aware recommender system,” in _Proc. Int. Conf. Neural Inf. Process. Syst._. Springer, 2012, pp. 324–331.