Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
84,567 characters · 14 sections · 63 citation commands
Interpretable Personalization via Policy Learning with Linear Decision Boundaries
\RUNAUTHOR{Qu, Qian, and Zhou}
\RUNTITLE{Interpretable Policy Learning}
\TITLE{Interpretable Personalization via Policy Learning \\with Linear Decision Boundaries}
\ARTICLEAUTHORS{ \AUTHOR{Zhaonan Qu} \AFF{Department of Economics, Stanford University, \EMAIL{[email removed]}, \URL} \AUTHOR{Isabella Qian} \AFF{University of California, Los Angeles, \EMAIL{[email removed]}, \URL} \AUTHOR{Zhengyuan Zhou} \AFF{Stern School of Business, New York University, \EMAIL{[email removed]}, \URL} }
\ABSTRACT{ Problem definition: With the rise of the digital economy and an explosion of available information about consumers, effective personalization of goods and services has become a core business focus for companies to improve revenues and maintain a competitive edge. This paper studies the personalization problem through the lens of policy learning, where the goal is to learn a decision-making rule (a policy) that maps from consumer and product characteristics (features) to recommendations/treatments (actions) in order to optimize outcomes (rewards). We focus on using available historical data for offline learning with unknown data collection procedures, where a key challenge is the non-random assignment of recommendations. Moreover, in many business and medical applications, interpretability of a policy is essential. Methodology/results: We study the class of policies with linear decision boundaries to ensure interpretability, and propose learning algorithms using tools from causal inference to address unbalanced treatments. We propose several optimization schemes to solve the associated non-convex, non-smooth optimization problem, and find that a Bayesian optimization algorithm is fast and effective. We test our algorithm with extensive simulation studies and apply it to an anonymized online marketplace customer purchase dataset, where the learned policy outputs a personalized discount recommendation based on customer and product features in order to maximize gross merchandise value (GMV) for sellers. Our learned policy improves upon the platform's baseline by 88.2% in net sales revenue, while also providing informative insights on which features are important for the decision-making process, e.g., when “Attribute 2” is large, marginal increase in GMV is low for discounts higher than 10%. Managerial implications: Our findings suggest that our proposed policy learning framework using tools from causal inference and Bayesian optimization provides a promising practical approach to interpretable personalization across a wide range of applications.
}
\KEYWORDS{personalization; e-commerce; offline policy learning; causal inference; Bayesian optimization}
An increasingly prominent feature of the digital economy is the personalization of goods and services based on consumer, product, and contextual information to improve customer experience and business revenues iyer2005targeting,li2010contextual,kim2011battle,kallus2021minimax,kallus2021fairness,bastani2022meta,bastani2021learning,decroix2021service. In online platforms, product recommendations, advertisements, and offers are often based on customers' characteristics, preferences, and browsing histories ettl2020data,pauphilet2022robust. Similarly, in precision medicine and pharmacogenetics bertsimas2017personalized,hespanhol2018family, zhou2018evaluating, drew2016pharmacogenetics,minor2020discovering,bastani2020online, different treatment options and dosages can be selected based on patients' medical histories and genetic profiles in order to optimize patients' outcomes. Even in the more traditional domain of public policy, individual heterogeneities are becoming increasingly important when determining what kind of policies should be applied to particular groups in order to balance optimizing individual outcomes with improving overall social welfare or reducing inequality kitagawa2017equality.
The key phenomenon underlying the ubiquity of personalization across different domains is heterogeneity, that is, different individuals respond differently to particular recommendations/offers/treatments. As a result, the best option may vary significantly across individuals in a population. To quote a proverb provocatively: “One man's poison is another man's medicine”. Thanks to the growing availability of historical data on consumers, users, and patients, it is now possible to make better decisions based on such individual heterogeneities, and personalization has transformed from heuristics-based rules to sophisticated data-driven operations using increasingly detailed information.
To enable good personalization from historical data, the central problem we need to solve is that of offline policy learning: to learn a “good” personalized decision-making rule (a policy) that maps individual and contextual information to available actions, in order to achieve better outcomes, such as higher click-through rates for ads, increased sales and revenue in online marketplaces, and improved patient outcomes. One of our motivating applications comes from the e-commerce platform JD.com shen2020jd, which released large amounts of anonymized historical data on customer purchase behavior that contain information on customer and product characteristics (features/contexts), discounts available to customers at time of purchase (treatments/actions), and customers' purchase decisions and sales value (rewards). A natural question is whether the platform and third-party sellers can improve net sales revenue by targeting and personalizing discount offers to potential buyers in order to encourage them to make a purchase decision. Because of variations in the availability and amount of discounts, the historical dataset may already contain enough heterogeneity that allows sellers to learn a good policy offline, which recommends an optimal discount offer to each potential customer considering a particular product, without the need to conduct further online experiments that could take time and result in revenue losses. Such a policy learned using historical data provides a good operational starting point for personalized discount offers, and could also help the platform/sellers decide whether further online experiments are worthwhile. See also ettl2020data for a related but different problem on personalizing discounted product bundles based on online consumer preferences and inventory constraints.
Despite the appeal of offline policy learning, the observational nature of the data also poses unique challenges. Most importantly, unlike in online policy learning, we do not have control over treatment assignments. Outcomes observed in historical data are results of the particular treatments selected, and the exact treatment assignment mechanism(s) used to collect the data may not be available information to us. In the purchase dataset from JD.com, some discount offers were assigned randomly by the platform, while others had to be claimed (“clipped”) first by customers before applying them. Yet other discounts were already results of targeting based on customer information using the platform's machine learning algorithms shen2020jd. To learn from these diverse sources of data derived from different assignment mechanisms, a learning algorithm needs to handle selection bias (a.k.a. confounding) on the treatments observed, i.e., the assignment of discount offers can be correlated with customers' potential purchase outcomes. This is certainly the case for targeted offers, but also for discounts actively claimed by customers, whose characteristics are correlated with discount-seeking behavior as well as purchase decisions. In the presence of confounding, simple supervised learning approaches using the observational dataset will result in biased estimates for rewards. Similarly, in a hospital setting bennett2020efficient, since healthier patients (who are more likely to recover) tend to receive less invasive treatments, failure to address selection bias leads one to conclude that less invasive treatments always result in better patient outcomes.
Fortunately, the challenges posed by the observational nature of historical data are especially amenable to tools from causal inference imbens2015causal, and in particular the idea of propensity weighting horvitz1952generalization,rosenbaum1983central,robins1994estimation,hirano2003efficient, whereby samples that are assigned to less common treatment arms are given more weight when forming sample average estimates of treatment effects. Building on semiparametric causal estimates of potential rewards, a series of recent works on offline policy learning focus on optimal regret bound and sample complexity of general policy classes, e.g., athey2017efficient,kitagawa2015should,zhou2018offline,demirer2019semi,kallus2021minimax. However, despite the success of efficient causal estimates in providing theoretical guarantees for offline policy learning algorithms, practical considerations for operationally relevant policy classes remain to be explored further. In particular, many business and medical applications demand that learned policies be easy to understand and interpret, so that practitioners can assess and make sense of the relative importance and contributions of each feature in critical decision-making processes.
In this paper, we address the need for practical and interpretable personalization via offline policy learning and propose an end-to-end learning framework for policies with linear decision boundaries, where each treatment arm is parameterized by a linear model and the policy assigns an individual to the treatment arm with the largest model value given the individual's features. Instead of approximating rewards directly with linear models in order to achieve interpretability, as is commonly done in the literature, our framework allows the use of flexible blackbox (and non-linear) reward estimators, and parameterizes the policies by linear functions in order to achieve interpretability. This decouples reward estimates from policy functions, and allows us to incorporate semiparametric estimates of rewards from causal inference in order to address challenges of selection bias in observational datasets as well as nonlinear dependence of rewards on features. Linear decision boundaries are arguably the most natural and simple policy class to use in practice, as they allow us to assess the relative importance of each feature in making a decision. Despite this simplicity, the optimization problem associated with the offline learning problem poses significant challenges due to the non-smooth and non-convex nature of the objective, which we will address in the present work using Bayesian optimization.
Our philosophy is “Complex Environment, Interpretable Policy", which entails first obtaining sophisticated estimates of the environment (using state-of-the-art blackbox estimation schemes) and then optimizing for the best interpretable policy using these estimates. This is different from--and superior to--making interpretable (e.g. linear) model assumptions on the environment and then solving for the best policy based on that (“Simple Environment, Simple Policy”), which is the popular choice in applications that prioritize interpretability. Our approach also differs from decision rules directly based on complex models of the environment (“Complex Environment, Complex Policy”) in that it offers interpretability, for which the practical significance is well understood (see for instance the excellent recent work of bastani2022interpretable) and enjoys theoretical guarantees on regret.
Our main takeaways are twofold. First, when finding policies with linear decision boundaries, the interpretable policy class we focus on in this paper, it is crucial to solve the empirical reward maximization (ERM) problem directly rather than through any relaxation. This is because the ERM problem is built using highly accurate (blackbox) reward estimates, which lose their power if the ERM problem is not solved exactly. In our setting, this ERM problem is non-convex and non-smooth, hence posing a computational challenge if solved in a brute-force way. By adapting a general Bayesian optimization methodology zhou2014gradient to our problem, we construct an algorithm (Algorithm (ref)) that provides an attractive computational option while retaining statistical efficiency. In comparison to the folklore convex relaxation and logistic relaxation approaches that may seem to be the most obvious candidates to address the challenges of non-convex and non-smooth problems, our Bayesian algorithm performs much better empirically (see simulations in Section (ref)) and is robust to noise. More broadly, our results suggest that Bayesian Optimization, which currently appears to be less popular in the policy learning community, can be an effective tool in the toolkit.
Second, to demonstrate the practical appeal of our learning framework as a decision-making tool for interpretable personalization to a broad range of problems, we apply our algorithm to a customer purchase dataset provided by JD.com shen2020jd, China's largest online retailer. Our algorithm learns a policy that recommends personalized discount offers to consumers based on consumer, product, and other contextual information to maximize sellers' gross merchandise value (GMV). A simple implementation using a Bayesian optimization approach suggests an increase in net sales revenue by 88.2% over the current baseline used by sellers. The learned policy also provides interpretatable insights into how customer and product characteristics determine the impact of discounts, which helps inform the platform on which features are important for improving GMV. For example, we found that the marginal return in net sales revenue from discounts is relatively small when the quality indicator “Attribute 2” of a product is high, with optimal discount above 0% but below 10%, especially for users with a “plus” membership.
Policy Learning. The problem of policy learning from observational data, also known as optimal treatment allocation, has been studied simultaneously in several different disciplines, such as economics manski2004statistical,manski2009identification,hirano2009asymptotics,kitagawa2015should,athey2017efficient, machine learning and operations research dudik2011doubly,swaminathan2015batch,zhou2018offline,kallus2021minimax, and statistics zhang2012estimating,luedtke2016statistical,zhao2012estimating. From a theoretical perspetive, the central measure of the quality of a policy is the asymptotic regret, i.e., the difference in expected outcomes associated with the optimal decision rule and that provided by the policy, as sample size grows large. To achieve the minimax optimal $\mathcal{O}_p(1/\sqrt{n})$ asymptotic regret when the data collection mechanism is unknown and endogenous, most works with such guarantees, such as athey2017efficient,kallus2021minimax,zhou2018offline, rely crucially on the doubly robust estimators of robins1994estimation and the associated statistical theory on semiparametric estimation hahn1998role,newey1994asymptotic,robins1995semiparametric,imbens2004nonparametric, although doubly robust estimators have already been used (without guarantees) for policy learning in applications such as healthcare tsiatis2011improved, education uysal2015doubly, and online recommendations wang2019doubly. Recent works have also examined offline policy learning when the data distribution is not stationary. One idea is that adaptive data collection could improve offline policy learning zhan2021policy,kallus2021more,bibaut2021risk. Other works consider individuals reacting strategically to treatments munro2020learning or competing against each other under capacity constraints sahoo2022policy. Although it would be interesting to examine the extent to which consumers react strategically to personalized treatments, in this paper, we will assume that the data distribution is stationary, and leave extensions to future work.
Bayesian Optimization. Although itself an established research field, the use of Bayesian optimization has been less common in policy learning. Our paper builds upon the line of works aiming to combine model-based Bayesian algorithms, which consider a population of potential solutions, with gradient-based algorithms, which enjoy fast convergence. In particular, zhou2014gradient propose a general framework based on a stochastic quasi-Newton iteration, which iterates between sampling from the domain of solutions and updating the distribution on the solution space. The distribution eventually concentrates on the set of global optima for the original problem. A major advantage of this approach is its ability to overcome local optima, which methods based on updates of a single solution often suffer from. Moreover, it is applicable to non-smooth objectives, as the original objective function is replaced with a smooth problem over the parameter space of the sampling distribution. Importantly, these algorithms can often be viewed as a generalized Robbins-Monro algorithm robbins1951stochastic,chung1954stochastic, whose convergence can be studied with tools from stochastic approximation theory borkar2009stochastic.
In this section, we introduce the offline policy learning framework used to learn decision rules for personalization from observational data in this paper. Let $\mathcal{X} \subset \mathbf{R}^p$ be the underlying context space of dimension $p$ and $\mathcal{A}=\{a^{1},\dots,a^{d}\}$ be a set of $d(\geq2)$ actions (or treatments). We posit that there is an underlying distribution $\mathbb{P}$ on $\big(X,Y(a^{1}),Y(a^{2}),\dots,Y(a^{d})\big)\in\mathcal{X}\times\prod_{i=1}^{d}\mathcal{Y}_{i}$, where $Y(a^j) \in \mathcal{Y}_j \subset \mathbf{R}$ denotes the potential outcome that represents the random reward if the corresponding action $a^j$ were taken rubin1974estimating, imbens2015causal. We assume that all $\mathcal{Y}_j$'s are bounded. Denote the expected reward as $\mu(x,a):=\mathbb{E}[Y(a)\mid X=x]$, which can have arbitrary non-linear dependence on $x$. In the example of targeted discount offers in online markets, $\mu(x,a)$ could represent the expected net sales revenue for the platform if a discount of type $a$ were recommended to a customer-product pair $x$.
We are given a dataset consisting of $n$ i.i.d. triples $\{(X_{i},A_{i},Y_{i})\}_{i=1}^{n}$ sampled as follows. First, $(X_i,Y_i(a^{1}),Y_i(a^{2}),\dots,Y_i(a^{d}))$ is sampled i.i.d. from $\mathbb{P}$; and then conditional on the context $X_i$, action $A_i\in \mathcal{A}$ is sampled using a probability vector of propensities $\big(e(X_i, a^1), \dots, e(X_i, a^d)\big)$ where $e(x, a^j) = \mathbb{P}[A_i=a^j\mid X=x]$, after which only $Y_i=Y_i(A_i)$ is revealed. Importantly, the data-collection rule underlying the propensity model is generally unknown to us, and could be a simple heuristic or a sophisticated machine learning model (or a combination of both). However, we make the following standard assumption in the causal inference literature that it only depends on observable $x$ and not on any $Y(a^j)$.
We emphasize that we only observe the reward associated with the realized action $A_{i}$ actually selected in the $i^{\mbox{th}}$ observation, even though all the other unobserved potential outcomes $Y_{i}(a)$ for $a\in\mathcal{A}\setminus\{A_{i}\}$---also known as counterfactuals imbens2015causal---exist in the model and have been drawn in accordance with $\mathbb{P}$. The issue of missing counterfactuals poses great challenges for observational studies and is mitigated with the “overlap” assumption robins1995semiparametric,hirano2003efficient,chernozhukov2018double that the data-collection rule has sufficient exploration, which is essential for accurately estimating the reward functions and learning policies.
The problem of offline policy learning is to learn a policy $\pi$, which maps a context vector $x\in\mathcal{X}$ to an action choice $a\in \mathcal{A}$, from the observational data $\{(X_{i},A_{i},Y_{i})\}_{i=1}^{n}$ in order to maximize reward. Specifically, given a policy $\pi$, its expected policy value is
where the expectation is taken over the data generating process. The optimal policy in a function class $\Pi$ is defined as $\pi^{\ast}:=\arg\max_{\pi\in\Pi}Q(\pi)$. We measure the performance of a policy $\pi \in \Pi$ by its regret, which is its value gap from the optimal policy:
Our goal is to learn a policy $\hat{\pi}$ from $\Pi$ such that the regret of $\hat{\pi}$ is small with high probability. Here the randomness comes the fact that $\hat{\pi}$ is a function of the stochastically collected observational dataset. Note, however, that in this paper, we consider the underlying distribution $\mathbb{P}$ to be stationary and the reward to be non-adversarial, so it suffices to learn a deterministic policy that maps each context to an action choice, as opposed to a random policy whose range is the probability simplex over the action set $\mathcal{A}$.
Remark. We make two comments that help distinguish offline policy learning from related problems and approaches. First, although both online and offline policy learning use regret as their performance metric, they are fundamentally different problems. In online policy learning problems such as contextual bandits agrawal2013thompson,bastani2020online, the key challenge is balancing the exploration-exploitation trade-off by carefully designing the treatment assignment mechanism. In offline policy learning problems, the exact treatment assignment mechanism used in data collection was pre-determined and may not be available to us, but we assume that it only uses observable contexts and affords enough exploration to learn a good policy. Second, one may consider directly estimating $\mu(x,a)$ for each $a$ with regression or machine learning methods, using observations $(X_{i},A_{i},Y_{i})$ where $A_i=a$. However, as long as $A_i$ depends on $x$, this will result in biased estimates due to confounding. In the JD.com example, the coupon offer $a$ could have been targeted at customers who are deemed more likely to spend more money. Naive regression approaches would bias $\mu(x,a)$ upwards. Therefore, offline policy learning cannot be solved simply with traditional supervised learning methods.
Having set the stage for general offline policy learning, we now focus on a particular policy class $\Pi_\text{linear}$, known as linear decision boundaries, which are policies of the form:
where $\theta_a\in \mathbb{R}^p$ for each $a\in\mathcal{A}$, i.e., each action is associated with a parameter vector $\theta_{a}$, and $\Theta \in \mathbb{R}^{pd}$ is obtained by stacking up $\{\theta_{a}\}_{a\in\mathcal{A}}$.
A main advantage of linear decision boundaries is that the coefficients can be interpreted as the relative importance of a given feature, which the learned policy places when trying to decide whether to employ a particular action or assign the unit to a particular treatment. For example, if the $j$-th component of $\theta_{a}$ is positive and large for a particular action $a$ while small in comparison or negative for other actions, then an increase in the $j$-th feature $x_j$ increases the likelihood of action $a$ being chosen, relative to other actions. In cases of decision-making where interpretability is critical, such as precision medicine, this property is desirable, as doctors are able to deduce that particular patient characteristics positively or negatively influence the decision to adopt or avoid particular treatments. Similarly, in an online marketplace such as JD.com, a learned policy with linear decision boundaries for personalized discount recommendation provides insights to the platform and vendors on which consumer and product characteristics are important when determining how a particular amount or type of discount offer influences consumers' purchase behaviors.
Remark. Importantly, the policy class of linear decision boundaries includes--as a strict subset--policies based on linear models of rewards: whereas policies based on learning linear models of $\mu(x,a)$ place the linear structure assumption on rewards (which could easily suffer from model mis-specification, in addition to the confounding problem discussed before), $\Pi_\text{linear}$ only requires that decision boundaries to be linear, while allowing rewards to have arbitrary dependence on covariates. This is the crucial difference between our approach to interpretable personalization using linear decision boundaries and the approach of linear reward modeling, and embodies our philosophy of “complex environment, simple and interpretable policy". In the special case when rewards indeed depend linearly on covariates, the optimal policy in $\Pi_\text{linear}$ coincides with the one based on linear models of rewards; in general, however, these two are different and the optimal policy in $\Pi_\text{linear}$ is strictly better. Figure (ref) provides a visualization of this difference in the toy example with two actions ($d=2$) and one-dimensional feature ($p=1$). We will illustrate this point further with simulations in settings where rewards depend non-linearly on features, but the optimal decisions are separated by linear boundaries in the feature space.
For any policy $\pi$, given an observational dataset satisfying Assumption (ref), we will approximate its policy value $Q(\pi) =\mathbb{E}[Y_i(\pi(X_{i}))]$ by the empirical estimator
where $\widehat{\Gamma}_i(a)$ is an unbiased estimator of the expected reward $\mathbb{E}[Y_i(a)|X_i]$. The approach we take to learn an optimal policy in $\Pi_\text{linear}$ is by finding a solution to the following empirical reward maximization (ERM) problem:
Here we raise two important questions of theoretical and practical interest, respectively. The first one is whether the solution to the ERM problem is optimal in terms of asymptotic regret, while the second question concerns how to efficiently obtain a maximizer of the ERM problem. The answer to the first question is affirmative and can be proved using tools from statistical learning theory, more specifically, regret bounds for multi-action policy classes via Natarajan dimensions jin2022upper. In this paper, we will focus on the latter practical question of optimization, but will follow prior works on optimal regret bounds for policy learning, e.g., dudik2011doubly,athey2017efficient,kitagawa2017equality,zhou2018offline, and consider the doubly robust (a.k.a. augmented inverse propensity weighting or AIPW) estimators:
where $\hat{\mu}$ and $\hat{e}$ are estimators for expected rewards $\mu$ and propensities $e$. Here double robustness refers to the fact that the estimator is consistent if either the estimators of propensities are consistent, or the estimators of expected rewards are consistent. Moreover, doubly robust estimators are also semiparametrically efficient, i.e., they achieve the lowest asymptotic variance among all semiparametric estimators robins1994estimation. In principle, one can use different procedures to estimate the propensity scores and expected rewards for different arms in $\mathcal{A}$, as long as the estimators satisfy certain rate conditions. In practice, even though some non-linear estimators of $\mu$ and $e$, such as deep neural networks, may not enjoy these rates, they may still be advantageous and yield good empirical performance if the propensity or reward models are highly nonlinear as functions of the features. We reiterate that the use of non-linear estimators for reward does not affect the interpretability of our learned policies, because the linearity assumption is placed on the policy's decision boundaries, not on the rewards.
Regarding the second question of how to obtain a maximizer of the ERM problem (ref), the short answer is that it is in general computationally hard, as the optimization objective is non-differentiable and non-convex due to the argmax component of policies with linear decision boundaries. In Section (ref), we present several practical approaches to find good solutions. Before that, we will first prove the minimax optimality, in terms of asymptotic regret in $\Pi_{\text{linear}}$, of maximizers of the ERM problem (ref) with doubly robust reward estimators. Readers interested in applications can skip the next chapter.
We now move on to solving the ERM problem $\max_{\Theta\in\mathbb{R}^{dp}}\frac{1}{n}\sum_{i=1}^n\widehat{\Gamma}_i(\pi(X_i;\Theta))$ defined in (ref), with the goal of learning the optimal policy with linear decision boundaries from the observational data. It is challenging because the associated ERM problem is non-differentiable and non-convex due to the argmax components in linear decision boundaries $\pi(x;\Theta) \in\arg\max_{a\in\mathcal{A}}\langle\theta_{a},x\rangle$.
To address these difficulties, prior works have focused on relaxation approaches shalev2014understanding,bennett2020efficient. In particular, the ERM problem can be interpreted as a weighted classification problem, which can then be relaxed to a multiclass support vector machine. The convex relaxation approach constructs a concave lower-bound of the original problem and then maximizes it via standard techniques that find the global optima of the lower bound shalev2014understanding. Alternatively, we also propose searching in the space of multinomial logistic policy class $\Pi_{\text{logistic}}$, where the random policies can be obtained via a softmax mapping:
The solution in $\Pi_{\text{logistic}}$ is then projected into $\Pi_{\text{linear}}$ to obtain the final learned policy. Such a logistic relaxation yields a differentiable but still non-convex ERM objective, which is often optimized using first-order algorithms such as stochastic gradient descent, but can be plagued by poor initialization, such that the algorithm may get stuck at a sub-optimal stationary point. Although logistic functions are popular in the context of other machine learning problems such as classification, this paper presents the first consideration of adapting the logistic policies for offline policy learning problems. Details on the convex and logistic relaxation approaches can be found in Appendix (ref).
A main contribution of this paper is using Bayesian optimization to solve the ERM problem (ref). Specifically, we adapt the Gradient-based Adaptive Stochastic Search (GASS) algorithm proposed in zhou2014gradient tailored to non-convex, non-smooth objectives. On a high level, instead of optimizing the ERM problem from a single starting point in the policy class, as many algorithms such as logistic relaxation do, this Bayesian approach optimizes a distribution over the policy class and thus avoids local minima and achieves global robustness. We will demonstrate the effectiveness of Bayesian optimization at solving the ERM problem on simulated and real datasets. In particular, policies learned via Bayesian optimization consistently outperform policies learned from the aforementioned convex and logistic relaxation approaches, and are impressively robust to noise.
This section formulates the Bayesian optimization approach in the context of maximizing the ERM objective (ref), as adapted from zhou2014gradient. The key idea is to smooth the objective by estimating its expected value over the policy class with respect to a parameterized smooth probability density function, which is then updated iteratively such that the distribution gradually concentrates on the set of global optima of the ERM problem. Algorithm (ref) summarizes our implementation.
For completeness, we briefly summarize the Bayesian optimization framework proposed in zhou2014gradient, which is a gradient-based stochastic search algorithm generalizing the Robbins-Monro algorithm robbins1951stochastic,chung1954stochastic. One can apply this framework to any non-differentiable non-convex optimization problem, as long as the objective function is bounded below, and its value can be efficiently queried at any point of the domain. This is the case for our ERM problem over linear decision boundaries.
To be precise, suppose that our goal is to solve $\max_{z}H(z)$, with $H(z)$ lower bounded. Denote $f$ as a smooth density function parameterized by $\omega$ over the domain of $H$. Define $L(\omega)\stackrel{\Delta}{=}\int H(z)f(z;\omega)dz$ as the expected value. We then turn to solving the problem $\max_\omega L(\omega)$, which is smooth in $\omega$. We immediately have $\max L(\omega) \leq\max H(\omega)\stackrel{\Delta}{=}H^{\ast}$; the equality holds if and only if the parameterized distribution $f(z;\omega)$ is only supported on the set of global optima of $H(z)$. The algorithm alternates between drawing samples $\{z_{j}\}$ from $f(z;\omega)$ and using the samples to estimate $L(\omega)$ and update parameter $\omega$ in a quasi-Newton step, with the guarantee that $f(z;\omega)$ becomes more and more concentrated on the set of global optima of $H$ under general conditions.
Operationally, consider $f$ as a distribution in an exponential family, i.e. $f(z;\omega) =\exp(\omega^{T}T(z)-\phi(\omega))$. In practice, $f(z;\omega)$ can be taken to be a normal distribution, for which we may view smoothing as a convolution. By direct algebra, we obtain the gradient and Hessian of $L(w)$ as follows,
where $\mathbb{V}_{\omega}[T(z)] = \mathbb{E}[T(z)T(z)^T] - \mathbb{E}[T(z)]\mathbb{E}[T(z)]^T$. To maximize the objective $L(\omega)$, a natural idea is to apply the Newton update and successively approximate the root to its gradient $\nabla_{\omega}L(\omega)$ as follows:
However, to ensure that the update direction in (ref) is an ascent direction of $L(w)$ (recall that our goal is to maximize $L(w)$), we need to have the adaptive step size $(\nabla_{\omega}^{2}L(\omega))^{-1}$ be negative semidefinite, which unfortunately may not always hold. A common practice is to replace $\nabla_{\omega}^{2}L(\omega)$ by its second term $-\mathbb{V}_{\omega}\left[T(z)\right]\mathbb{E}_{\omega}[H(z)]$, and thus we have,
We claim that $\mathbb{V}_{\omega}[T(z)]$ is positive semi-definite. In fact, $\mathbb{V}_{\omega}\left[T(z)\right]$ is the Fisher information matrix and can be rewritten as $\mathbb{V}_{\omega}\left[T(z)\right]=\mathbb{E}_{\omega}\left[\nabla_{\omega}\ln f(z;\omega)(\nabla_{\omega}\ln f(z;\omega))^{T}\right]=\mathbb{E}_\omega\left[-\nabla_{\omega}^{2}\ln f(z;\omega)\right]$ rao1945information. For computational stability, we follow zhou2014gradient and add a positive perturbation term when calculating the inverse, i.e. replacing $(\mathbb{V}_{\omega}[T(z)])^{-1}$ in (ref) with $\big(\mathbb{V}_{\omega}[T(z)]+\epsilon I\big)^{-1}$ for some small $\epsilon>0$.
However, one more problem remains with the update rule (ref), since $\mathbb{E}_\omega[H(z)]$ is not necessarily non-negative. To address this, zhou2014gradient propose to apply a $\omega$-dependent filtering function $S_\omega(\cdot)$ to $H(z)$, such that (i) $S_\omega(H(z))$ is positive for all $z$; and (ii) only $z$'s with large $H(z)$ values are sampled with high probability. Specifically, define
where $S_{0}$ is a large positive constant, $H_{lb}$ is a lower bound of $H(z)$, and $\gamma_{\omega}$ is the $(1-\rho)$-quantile of $H(z)$ with density $f(z;\omega)$ and a small number $\rho>0$. To estimate $\gamma_{\omega}$ in practice, we sample $\{z_{m}\}_{m=1}^M$ from $ f(z;w)$ and use the empirical quantile calculated from $\{H(z_{m})\}_{m=1}^M$. In fact, $\frac{1}{1+\exp(-S_{0}(H(z)-\gamma_{\omega}))}$ performs as a smooth approximation of the indicator function $\mathbf{1}\{H(z)\geq \gamma_w\}$. Thus $S_{\omega}(H(z))$ is positive and is noticeably large only if $H(z)\geq \gamma_{\omega}$. Moreover, we note that the filtering function $S_{\omega}(y)$ is increasing in $y$ and continuous in $\omega$, such that the set of optimal solutions satisfies $\arg\max_{z}S_{\omega'}(H(z)) \subset\arg\max_{z}H(z)$ for any $\omega'$. Therefore, instead of optimizing $L(\omega)=\int H(z)f(z;\omega)dz$, we solve the following optimization problem:
Similar to before, we have the gradient and the Hessian of $L^S(\omega;\omega')$ as follows:
and following the quasi-Newton update rule discussed above, we choose $\omega'=\omega$ and update the parameter $\omega$ via
In practice, at step $k$, to estimate the update direction in (ref), we draw $M$ samples $\{z_m\}_{m=1}^M$ from the distribution $f(z;\omega^{(k)})$ and use empirical means and variance to estimate terms in (ref). In addition, we apply a step size sequence $\{\alpha_k\}$ to the update direction, which satisfies $\sum_{k=0}^{+\infty}\alpha_k=\infty$ to meet the algorithm convergence condition zhou2014gradient.
Algorithm (ref) details our implementation of the algorithm adapted to solve the ERM problem in the policy class of linear decision boundaries. In particular, we search in the domain of $\Theta$ and have $H(\Theta)=\frac{1}{n}\sum_{i=1}^n \widehat{\Gamma}_i(\pi(X_i;\Theta))$; we consider a Gaussian prior $\mathcal{N}(\mu,\{\sigma_{j}^{2}\}_{j=1}^{d})$ for the density function $f(\Theta;\omega)$, where $\omega =
$. We also note that the exponentiation calculation in $S_{\omega}(H(\Theta)) =(H(\Theta)-H_{lb})\frac{1}{1+\exp(-S_{0}(H(x)-\gamma_{\omega}))}$ requires the stable version to avoid numerical overflow problems, for which we use $\frac{1}{1+\exp(a)}=\frac{\exp(-a)}{1+\exp(-a)}$ when $a$ is positive, due to the fact that $S_{0}$ is a very large constant.
We next evaluate the linear policy learning algorithms on synthetic data with both ground-truth linear and nonlinear decision boundaries. Simulated data grant us access to the counterfactuals and therefore the true optimal policy, which enables us to calculate the value of the optimal policy and hence the regret of any policy. We leave the performance evaluation on a real dataset to Secion (ref).
We start by describing the data generating process for linear ground truth decision boundaries. There are three actions which we label as $\{0,1,2\}$. Each feature vector $x=(x_0, x_1)\in\mathbb{R}^{2}$ is generated i.i.d. from uniform distribution on $[-0.5,0.5]^2$. The feature space is partitioned into three regions with linear boundaries in the 2-dimensional space:
The expected rewards for $x$ depend non-linearly on $x$. Specifically, rewards are decided purely by which region $x$ is in and are designed so that the optimal action in region $j$ is action $j$, as shown in Table (ref). The observed reward is perturbed by a Gaussion noise $\mathcal{N}(0,4)$. Similarly, the propensities (action selection probabilities) also depend non-linearly on which region $x$ is in and are given by Table (ref). Recall that the propensities are specified by the data collection mechanism but may not be known to policy learning algorithms. In practice, one can estimate the propensites via cross-fitting techniques from the observational data athey2017efficient.
To summarize, for each observation $i$, a feature vector $X_i$ is uniformly sampled from $[-0.5,0.5]^2$; depending on which region $X_i$ belongs to, an action $A_i$ is chosen with probability proportional to the propensities specified by Table (ref); an observed reward $Y_i$ is generated according to $\mathcal{N}(\mu(X_i, A_i), 4)$, where the expected reward $\mu$ is given by Table (ref) for each region. The dataset consists of $10000$ such i.i.d. tuples $(X_i,A_i,Y_i)$.
Figure (ref) presents the decision boundaries of the optimal policy and of learned policies from Bayesian optimization, convex relaxation, and logistic relaxation. One can see that the decision boundaries from Bayesian optimization closely resemble the optimal ones. The convex relaxation solves a problem that is a lower bound of the original objective, so its learned decision boundaries do not achieve exact recovery. Decision boundaries from the logistic relaxation also perform worse than those from Bayesian optimization, since as discussed, optimization through logistic relaxation may be plagued by bad initialization for non-convex problems. Table (ref) further shows the aggregated results across $100$ simulation replicates, which demonstrates the effectiveness of Bayesian optimization over the two relaxation approaches at finding policies with minimal regret.
Data with nonlinear ground truth decision boundaries is generated similarly as the linear case in Section (ref). We consider three actions $\{0,1,2\}$. Each feature vector $x=(x_0, x_1)\in \mathbb{R}^2$ is i.i.d. sampled from $\mbox{Uniform}[0,1]^2$. We divide the feature space into three regions with nonlinear boundaries:
The region-dependent expected rewards and propensities are specified in Table (ref). Reward is realized by adding an i.i.d. Gaussian noise $\mathcal{N}(0,4)$.
We compare the decision boundaries of the optimal policy and policies with linear decision boundaries learned via Bayesian optimization, convex relaxation, and logistic relaxation in Figure (ref). By design, the optimal decision boundaries are nonlinear, which can not be exactly recovered by any policy in the class of linear decision boundaries. However, we see that Bayesian optimization presents a sensible linear approximation solution, and also achieves higher policy value compared to the two relaxation counterparts as shown in Table (ref). Convex relaxation also provides reasonable linear decision boundaries but performs worse empirically than the Bayesain optimization since it solves a lower bound of the original problem. Importantly, logistic relaxation performs worst in terms of both decision boundaries and policy values, since it easily gets stuck in a local optima without a global optimization perspective like the Bayesian approach. This example further demonstrates the Bayesian approach is fundamentally different from the logistic relaxation approach.
We now move on to evaluating our algorithms on a real dataset from JD.com about customer purchase behavior under coupon and discount incentives shen2020jd.
On an online shopping platform such as JD.com, customers are constantly browsing products, a.k.a. stock keeping units or SKUs in short, which they may be interested in purchasing. SKUs are either sold by third-party vendors or platform-owned brands, which we collectively refer to as sellers. Sellers have the option of offering discounts and coupons to customers, who make their decisions whether to purchase a particular item they are browsing based on discounts available to them as well as SKU characteristics. The net sales revenue, a.k.a. gross merchandise value (GMV) for a seller is the total sales value of the SKUs subtracted by the discounts offered by the seller. Here a tradeoff arises for the seller: when discount is high, customers are more likely to make a purchase, but net revenue is smaller; when discount is low, fewer customers find it optimal to make a purchase, yielding more unrealized purchases which have zero value, but among realized purchases, net revenue is higher as the seller gave up less revenue through discounts.
Therefore, a natural and important revenue management problem for sellers is to offer an optimal discount amount to customers in order to maximize the GMV. Importantly, because of heterogeneities in customer preferences and SKU characteristics, the optimal discount amount likely varies for different customer-SKU pairs. To the extent possible, sellers can offer personalized discounts to improve GMV.
Learning such a decision rule from historical observational data poses several challenges. Crucially, we do not know how particular discounts were offered or whether they were targeted, and at least some discounts were actively claimed by users, so the dataset suffers from the confounding issue that would bias conventional estimators of expected rewards. Fortunately, with detailed transaction-level data made available by JD.com shen2020jd, we are able to apply our offline policy learning algorithms to this dataset to learn an optimal discount offering rule, with the goal of maximizing the GMV. We demonstrate that our interpretable policy learning framework solves this type of problems effectively, providing sellers with an interpretable and quantitative decision-making tool to offer personalized discounts to customers, improving significantly upon the GMVs achieved by both the baseline and naive estimators of rewards.
The JD.com dataset includes transaction-level purchase data, with information on the customer and SKU, quantity of purchase, as well as discounts applied at time of purchase. There are four possible types of discounts: direct discount (which are the most common), quantity discount (buy at least $n>1$ items to receive discount), bundle discount (buy a specific set of SKUs to receive discount), and coupon discount (claimed by customers before purchase). Figure (ref) displays the proportion of each discount present in purchases of the same SKU by $10$ different groups of customers, which are obtained via $k$-means clustering based on customer and contextual features. Importantly, the proportion of available discounts varies considerably across these customer groups, and each group tends to receive a certain type of discount much more often than other types of discounts. This suggests that there is indeed selection bias present in the assignment of discount offers. In fact, the data description in shen2020jd states that some customers already received personalized discounts based on past activities. This implies that a simple supervised learning approach using the observational dataset will result in biased estimates.
To concretely map the discount personalization problem onto our policy learning framework, we treat each customer-SKU pair as one sample. Contexts consist of customer characteristics such as gender, age, city tier, anonymized SKU features and price, as well as other information such as time of day. Actions are discount offers, and since we are interested in how the total amount of discount offered to a customer for a particular SKU affects their purchase decision, the exact breakdown of the discount is less important. We thus combine the four discounts and discretize the total discount value into increments of $10$ percent of the original unit price, as our framework requires a discrete action space. Figure (ref) shows the distribution of actions in the data set. Finally, reward is the total net sales revenue for that SKU, i.e., price after applying discounts, multiplied by quantity.
As the purchase data only contains observations where customers decided to make a purchase, we also need observations where customers decided against making a purchase, yielding zero revenue for the seller. For this we use the “click dataset”, which records customers' browsing history of SKUs. By comparing with the purchase data, we can identify customer-SKU pairs in the click dataset that did not eventually lead to a purchase and subsample from these null observations. Unfortunately, the click dataset does not contain information on the discounts available to customers when they were viewing the products. We use the following strategy to infer each of the four discounts available for each sampled customer-SKU pair from the click dataset using observations from the purchase dataset, for which discount information is available. First, for each SKU, if a particular discount type only has one value (usually 0) in all observations in the purchase dataset, then we assign the value to that discount type for all sampled observations in the click dataset with that SKU. Otherwise, for each discount type for a particular SKU, we train a collection of parametric and non-parametric predictors, including linear regression, random forest, and matching, that output the discount amount per unit given customer and other contextual features, using observations from the purchase data containing that SKU. We then select the predictor with the smallest validation RMSE and use it to predict the amount of discounts available to customers browsing that SKU. See Table (ref) for a few samples from the click dataset and predicted discounts output by the best predictor. Predicted discounts are then merged and discretized in the same way as observed discounts from the purchase dataset. The resulting set of observations that we use to learn a policy with linear decision boundaries consists of $\sim$100k customer-SKU pairs with features (contexts), discount level (action), and the net sales revenue (reward). See pauphilet2022robust for a more robust procedure to impute discounts available to customers who did not make a purchase. pauphilet2022robust also discusses the importance of incorporating the imputation procedure for partially observed treatment assignments into the statistical estimation, although in this paper we focus on the optimization aspect of the problem.
With this observational dataset, we apply our offline policy learning algorithms to learn linear decision boundaries that choose the optimal discount level to offer to a particular customer-SKU pair. In order to evaluate a learned policy, ideally we need the actual purchase decision of a sampled customer when they are presented with a particular SKU and the discount level suggested by the policy, so that we can calculate the net sales revenue. Unfortunately, these counterfactuals are not available in our observational dataset. To overcome this problem, we split the data into training set and test set with ratio $2:1$. For each customer-SKU pair in the test set with a particular discount level suggested by our policy learned on the training data, we predict the counterfactual customer response and estimate the net revenue using doubly robust reward estimators that are cross-fitted on the test set zhou2018offline. We compare the total net sales revenue generated by policies learned from Bayesian optimization, convex relaxation, and logistic relaxation, with the baseline discount offer policy currently used by the platform. Figure (ref) shows the train and test curves of policy values for the three optimization approaches. The final numbers suggest that personalized discount offers based on the policy learned using Bayesian optimization outperforms the baseline policy used by the platform by 88.2% in terms of average net sales revenue (GMV), followed by the policy from logistic relaxation with 86.0% and then by the policy from convex relaxation with 80.3%. While in the most ideal situation, we would be able to validate and assess our algorithms in a randomized experiment, we find these results based on counterfactual estimations highly encouraging.
As one of the main advantages of our approach is the interpretability of learned policies, we discuss some findings regarding what practical and simple recommendations we can make to sellers to help them improve GMV. For example, the feature “Attribute 2” for an SKU is a quality indicator (higher value means better quality), and our learned policy suggests that when this feature is large, the optimal discount level generally should be greater than 0% but less than 10%, especially if the user belongs to age groups of 16-25 years or $>56$ years, or if the user is a “plus” member. This is plausible, since higher quality goods have higher utility and hence require less discounts to nudge customers to make a purchase decision in general. Moreover, since plus members enjoy free shipping and unconditional returns, their price elasticity of demand is smaller than others; similarly, customers in certain age groups tend to place greater importance on quality vs. price or may have particular brand loyalties, and are thus less price-sensitive for such products.
In this paper, we apply the framework of offline policy learning to the important problem of interpretable personalization. We focus on the class of policies with linear decision boundaries, which allows sophisticated (non-linear) estimation schemes for the reward functions. We propose using cross-fitted doubly-robust estimators from the causal inference literature for reward estimation, and a Bayesian optimization scheme to accurately solve the associated non-convex, non-smooth ERM problem. The Bayesian approach is shown to outperform relaxation approaches in simulations and on real data. Moreover, through the application to a customer purchase dataset from JD.com, we demonstrate that linear decision boundary policies can provide insights and actionable recommendations to the platform by taking into account the impact of customer and product heterogeneities on sellers' revenues, helping to potentially improve the gross merchandise value (GMV) by as much as 88%. We see this as a major advantage of our framework over black-box approaches, and we believe that it could be useful in a wide range of applications with personalized decision-making problems where interpretability is critical.
There are at least two interesting directions we see for future works based on the current framework. The first is a more systematic integration of the discount imputation procedures into the optimization as well as statistical estimation workflows. As noted by pauphilet2022robust, this corresponds to a partially observable treatments setting with non missing-at-random (MAR) data, which is common in operations management problems. The resulting problem concerning statistical efficiency and regret minimization remains to be studied thoroughly. Second, as detailed in ettl2020data, there are often time-dependent inventory constraints for sellers on online shopping platforms, so the problem of inventory management creates a potential trade-off with the problem of revenue management. Consequently, an optimal personalization policy for such online platforms should also take into account such factors as product availability, inventory health, and shipping time and cost. We consider this aspect to be a very interesting future direction for policy learning-based personalization in operations management.
Acknowledgements The authors would like to thank Ruohan Zhan and Ying Jin for helpful discussions and excellent research assistance.