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.
49,992 characters · 16 sections · 49 citation commands
Pricing with Contextual Elasticity and Heteroscedastic Valuation
Contextual pricing, a.k.a., Feature-based dynamic pricing, considers the problem of setting prices for a sequence of highly specialized or individualized products. With the growth of e-commerce and the increasing popularity of online retailers as well as customers, there has been a growing interest in this area amin2014repeated, qiang2016dynamic, javanmard2019dynamic, shah2019semi, cohen2020feature_journal, xu2021logarithmic, bu2022context.
Formulated as a learning problem, the seller has no prior knowledge of ideal prices but is expected to learn on the fly by exploring different prices and adjusting their pricing strategy after collecting every demand feedback from customers. Different from non-contextual dynamic pricing kleinberg2003value where identical products are sold repeatedly, a contextual pricing agent is expected to generalize from one product to another in order to successfully price a previously-unseen product. A formal problem setup is described below:
\fbox{\parbox{0.97\textwidth}{Contextual pricing. For $t=1,2,...,T:$
} }
Here $T$ is the time horizon, and the (random) demand $D_t$ is drawn from a distribution determined by context (or feature) $x_t$ and price $p_t$. The sequence of contexts $\{x_t\}$ can be either independently and identically distributed (iids) or chosen arbitrarily by an adversary. The seller's goal is to minimize the cumulative regret against the sequence of optimal prices.
Existing works on contextual pricing usually assumes linearity on the demand, but they fall into two camps. On the one hand, the "linear demand" camp qiang2016dynamic, ban2021personalized, bu2022context assumes the demand $D_t$ as a (generalized) linear model. A typical model is $D_t = \lambda(\alpha p_t + x_t^T \beta) + \epsilon_t$. Here $\alpha<0$ is a parameter closely related to the price elasticity. We will rigorously define a price elasticity in (ref) according to parkin2002economics, where we also show that $\alpha$ is the coefficient of elasticity. Besides of $\alpha$, other parameters like $\beta\in\mathbb{R}^d$ captures the base demand of products with feature $x_t$, $\epsilon_t$ is a zero-mean demand noise, and $\lambda$ is a known monotonically increasing link function. With this model, we have a noisy observation on the expected demand, which is reasonable as the same product is offered many times in period $t$. On the other hand, the "linear valuation" camp cohen2020feature_journal, javanmard2019dynamic, xu2021logarithmic models a buyer's valuation $y_t$ as linear and assumes a binary demand $D_t = \mathds{1}[p_t\leq y_t]$. All three works listed above assume a linear-and-noisy model with $y_t=x_t^\top\theta^*+N_t$, where $\theta^*\in\mathbb{R}^d$ is an unknown linear parameter that captures common valuations and $N_t$ is an idiosyncratic noise assumed to be iid.
Interestingly, the seemingly different modeling principles are closely connected to each other. In the "linear valuation" camp, notice that a customer's probability of "buying" a product equals $\mathbb{E}[D_t]$, which is further given by
$$ \mathbb{E}[D_t|p] = \mathbb{P}[y_t \geq p ] := S(p-x_t^\top\theta^*), $$
where $S$ is the survival function of $N_t$ (i.e. $S(w)=1-\mathrm{CDF}(w)$ for $w\in\mathbb{R}$). This recovers a typical linear demand model by taking $\lambda(w)=S(-w)$ with $\alpha = -1$ and $\beta = \theta^*$. In other words, the distribution of $N_t$ completely characterizes the demand function $\lambda(\cdot)$ and vice versa.
However, the "linear demand" camp is not satisfied with a fixed $\alpha = -1$, while the "linear valuation" camp are skeptical about an observable demand $D_t$ even with zero-mean iid noise. One common limitation to both models is that neither captures how feature $x_t$ affects the price elasticity.
Our model. To address this issue, we propose a natural model that unifies the perspectives of both groups. Also, we resolve the common limitation by modeling heteroscedasticity, where we assume that the elasticity coefficient $\alpha$ is linearly dependent on feature $x_t$. This contextual modeling originates from the fact that different products have different price elasticities anderson1997price.
In specific, we assume:
which adopts a generalized linear demand model (GLM) and a Boolean-censored feedback simultaneously. From the perspective of valuation model, it is equivalent to assume
Although (ref) seems more natural than (ref), they are equivalent to each other (with reasonable assumptions on $S$). Notice that the random valuation $y_t$ is heteroscedastic, which means its variance is not the same constant across a variety of $x_t$'s. We provide a detailed interpretation of this linear fractional valuation model in appendix.
Our main results are twofold.
To the best of our knowledge, we are the first to study a contextual pricing problem with heteroscedastic valuation and Boolean-censored feedback. Some existing works, including javanmard2019dynamic, miao2019context, ban2021personalized, wang2021dynamic, focus on related topics and achieve theoretical guarantees. However, their methodologies are not applicable to our settings due to substantial obstacles, which we propose novel techniques to overcome.
Randomized surrogate regret. \Citet{xu2021logarithmic} solves the problem with $x_t^\top\eta^*=1$, by taking the negative log-likelihood as a surrogate regret and running an optimization oracle that achieves a fast rate (i.e. an $O(\log T)$ regret). However, the log-likelihood is no longer a surrogate regret in our setting, since it is not "convex enough" and therefore cannot provide sufficient (Fisher) information. In this work, we overcome this challenge by constructing a randomized surrogate loss function, whose expectation is "strongly convex" enough to upper bound the regret.
OCO for adversarial inputs. javanmard2019dynamic and ban2021personalized study the problem with unknown or heterogeneous noise variances (i.e. elasticity coefficients), but their techniques highly rely on the distribution of the feature distributions. As a result, their algorithm could be easily attacked by an adversarial $\{x_t\}$ series. In our work, we settle this issue by conducting an online convex optimization (OCO) scheme while updating parameters. Instead of estimating from the history that requires sufficient randomness in the inputs, our algorithm can still work well for adversarial inputs.
In addition, our algorithm has more advanced properties such as computational efficiency and information-theoretical optimality. For more highlights of our algorithm, please refer to (ref).
Here we present a review of the pertinent literature on contextual pricing and heteroscedasticity in machine learning, aiming to position our work within the context of related studies. For more related works on non-contextual pricing, contextual pricing, contextual searching and contextual bandits, please refer to wang2021multimodal, xu2021logarithmic, krishnamurthy2020contextual and zhou2015survey respectively.
\paragraph{Contextual Pricing.} As we mentioned in (ref), there are a large number of recent works on contextual dynamic pricing problems, and we refer to ban2021personalized as a detailed introduction. On the one hand, qiang2016dynamic, nambiar2019dynamic, miao2019context, wang2021dynamic, ban2021personalized, bu2022context assume a (generalized) linear demand model with noise, i.e. $\mathbb{E}[D_t] = g(\alpha p_t - \beta^\top x_t)$. Among those papers, miao2019context worksl with a fixed $\alpha$ while we assume $\alpha$ as context-dependent. wang2021dynamic and ban2021personalized are the closest to our problem setting, which consist of a generalized linear demand model and noisy observations. On the one hand, ban2021personalized assumes independent add-on noises (while we allow binary martingale observations). With the development of a least-square estimator, they present an algorithm that achieves $\tilde{O}(s\sqrt{T})$ regret (with $s$ being the sparsity factor). On the other hand, wang2021dynamic further gets rid of the independence among noises and allow them to be idiosyncratic. They proposes a UCB-based algorithm with $\tilde{O}(d\sqrt{T})$ regret and another Thompson-Sampling-based algorithm with $\tilde{O}(d^{\frac32}\sqrt{T})$ regret, both of which are sub-optimal in $d$. Moreover, all works mentioned above assume the context sequence $\{x_t\}$ to be i.i.d., whereas we consider it "too good to be true" and work towards an algorithm adaptive to adversarial input sequences. On the other hand, golrezaei2019incentive, shah2019semi, cohen2020feature_journal, javanmard2019dynamic, xu2021logarithmic, fan2021policy, goyal2021dynamic, luo2022contextual adopts the linear valuation model $y_t=x_t^\top\theta^*+N_t$, which is a special case of our model as $x_t^\top\eta^*=1$. Specifically, both javanmard2019dynamic and xu2021logarithmic achieve an $O(d\log T)$ regret with $N_t$ drawn from a known distribution with $x_t^\top\eta^* = -1$. javanmard2019dynamic also studies the setting when $x_t^\top\eta^*$ is fixed but unknown and achieves $O(d\sqrt{T})$ regret for stochastic $\{x_t\}$ sequences. In comparison, we achieve $O(\sqrt{dT\log T})$ on a more general problem and get rid of those assumptions. For a more detailed discussion, please refer to (ref).
\paragraph{Heteroscedasticity.} Since the valuation noise is scaled by a $\frac1{x_t^\top\eta^*}$ coefficient, the valuation is heteroscedastic, referring to a situation where the variance is not the same constant across all observations. Heteroscedasticity may lead to bias estimates or loss of sample information. There are several existing methods handling this problem, including weighted least squares method cunia1964weighted, White's test white1980heteroskedasticity and Breusch-Pagan test breusch1979simple. Furthermore, anava2016heteroscedastic and chaudhuri2017active study online learning problems with heteroscedastic variances and provide regret bounds. For a formal and detailed introduction, we refer the audience to the textbook of kaufman2013heteroskedasticity.
To formulate the problem, we firstly introduce necessary notations and symbols used in the following sections. The sales session contains $T$ rounds with $T$ known to the seller in advance\footnote{Here we assume $T$ known for simplicity. For unknown $T$, we may apply a “doubling epoch” trick as javanmard2019dynamic without affecting the regret rate.}. At each time $t=1,2,\ldots, T$, a product with feature $x_t\in\mathbb{R}^d$ occurs and we propose a price $p_t\geq 0$. Then the nature draws a demand $D_t\sim \mathrm{Ber}(S(x_t^\top\eta^*\cdot p_t -x_t^\top\theta^*))$, where $\theta^*, \eta^*\in\mathbb{R}^d$ are fixed unknown linear parameters and the link function $S: \mathbb{R}\rightarrow[0,1]$ is non-increasing. By the end of time $t$, we receive a reward $r_t = p_t\cdot D_t$.
Equivalently, this customer has a valuation $y_t=\frac{x_t^\top\theta^* + N_t}{x_t^\top\eta^*}$ with noise $N_t\in\mathbb{R}$, and then make a decision $\mathds{1}_t = \mathds{1}[p_t\leq y_t]=D_t$ after seeing the price $p_t$. Similarly, we receive a reward $r_t = p_t\cdot\mathds{1}_t$. Assume $N_t\sim\mathbb{D}_F$ is independently and identically distributed (i.i.d.), with cumulative distribution function (CDF) $F=1-S$. Denote $s:=S'$ and $f:=F'$.
Here we define some key quantities. Firstly, we define an expected reward function.
Given this, we further define a greedy price function as the argmax of $r(u,\beta,p)$ over $p$.
Notice that
According to xu2021logarithmic, we have the following properties.
Then we define a negative log-likelihood function of parameter hypothesis ($\theta, \eta$) given the results at time $t$.
Finally, we define a round-$t$ expected regret and a cumulative expected regret.
We establish three technical assumptions to make our analysis and presentation clearer. Firstly, we assume that all feature and parameter vectors are bounded within a unit ball in Euclidean norm. This assumption is without loss of generality as it only rescales the problem.
The positiveness of elasticity coefficient $x^\top\eta>0$ comes from the Law of Demand gale1955law, hildenbrand1983law, stating that the quantity purchased varies inversely with price. This is derived from the Law of Diminishing Marginal Utilities and has been widely accepted marshall2009principles. We will show the necessity of assuming an elasticity lower bound $C_{\beta}$ in (ref). In specific, we claim that any algorithm will suffer a regret of $\Omega(\frac1{C_{\beta}})$. For the simplicity of notation, we denote $[\theta; \eta]:=[\theta^\top, \eta^\top]^\top\in\mathbb{R}^{2d}$ as the combination of $d$-dimension column vectors $\theta$ and $\eta$. Since we know that $x_t^\top\theta\in[0,1]$ and $x_t^\top\eta\in[C_{\beta}, 1]$, we have $J(x_t^\top\theta, x_t^\top\eta)\in[J(0,1), J(1, C_{\beta})]$. Later we will show that the price perturbation is no more than $\frac{J(0,1)}{10}$. Therefore, we may have the following assumption.
Similar to javanmard2019dynamic and xu2021logarithmic, we also assume a log-concavity on the noise CDF.
To solve the contextual pricing problem with featurized elasticity, we propose our “Pricing with Perturbation (PwP)” algorithm. In the following, we firstly describe the algorithm and highlight its properties, then analyze (and bound) its cumulative regret, and finally prove a regret lower bound to show its optimality.
The pseudocode of PwP is displayed as (ref), which calls an ONS oracle ((ref)).
At each time $t$, it inherits parameters $\theta_t$ and $\eta_t$ from $(t-1)$ and takes in a context vector $x_t$. By trusting in $\theta_t$ and $\eta_t$, it calculates a greedy price $\hat p_t$ and outputs a perturbed version $p_t = \hat p_t + \Delta_t$. After seeing customer's decision $\mathds{1}_t$, PwP calls an “Online Newton Step (ONS)” oracle (see (ref)) to update the parameters as $\theta_{t+1}$ and $\eta_{t+1}$ for future use.
We highlight the achievements of the PwP algorithm in the following three aspects.
In this pricing problem. As we mentioned in (ref), the key to solving this contextual elasticity (or heteroscedastic valuation) pricing problem is to construct a surrogate loss function. xu2021logarithmic adopts negative log-likelihood in their setting, which does not work for ours since it is not "convex" enough. In our PwP algorithm, we overcome this challenge by introducing a perturbation $\Delta$ on the proposed greedy price. This idea originates from the observation that the variance of $p_t$ contributes positively to the "convexity" of the expected log-likelihood, which helps "re-build" the upper-bound inequality.
In online optimization. PwP perturbs the greedy action (price) it should have taken. This idea is similar to a "Following the Perturbed Leader (FTPL)" algorithm hutter2005adaptive that minimizes the summation of the empirical risk and a random loss function serving as a perturbation. However, this might lead to extra computational cost as the random perturbation is not necessarily smooth and therefore hard to optimize. In this work, PwP introduces a possible way to overcome this obstacle: Instead of perturbing the objective function, we may directly perturb the action to explore its neighborhood. Our regret analysis and results indicate the optimality of this method and imply a potentially wide application.
In information theory. We show the following fact in the regret analysis of PwP: By adding $\Delta$ perturbation on $p_t$, we may lose $O(\Delta^2)$ in reward but will gain $O(\Delta^2)\cdot I$ in Fisher information (i.e. the expected Hessian of negative log-likelihood function) in return. By Cramer-Rao Bound, this leads to $O(\frac1{\Delta^2})$ estimation error. In this way, we quantify the information (observing from exploration) on the scale of reward, which shares the same idea with the Upper Confidence Bound lai1985asymptotically method that always maximizes the summation of empirical reward and information-traded reward.
Besides, PwP is computationally efficient as it only calls the ONS oracle for once. As for the ONS oracle, it updates an $A_t^{-1} = (A_{t-1} + \nabla_t\nabla_t^\top)^{-1}$ at each time $t$, which is with $O(d^2)$ time complexity according to the following Woodbury matrix identity
Now we analyze the regret of PwP and propose an upper bound up to constant coefficients.
In the following, we prove (ref) by stating a thread of key lemmas. We leave the detailed proof of those lemmas to (ref).
We claim that PwP is near-optimal in information theory, by proposing a matching regret lower bound in (ref). We present the proof with valuation model to match with existing results.
Here we conduct numerical experiments to validate the low-regret performance of our algorithm PwP. Since we are the first to study this heteroscadestic valuation model, we do not have a baseline algorithm working for exactly the same problem. However, we can modify the RMLP-2 algorithm in javanmard2019dynamic by only replacing their max-likelihood estimator (MLE) for $\theta^*$ with a new MLE for both $\theta^*$ and $\eta^*$. This modified RMLP-2 algorithm does not have a regret guarantee in our setting, but it may still serve as a baseline to compare with.
We test PwP and the modified RMLP-2 on the demand model assumed in (ref) with both stochastic and adversarial $\{x_t\}$ sequences, respectively. Basically, we assume $T=2^{16}$ $d=2$, $N_t\sim\mathcal{N}(0, \sigma^2)$ with $\sigma=0.5$, and we repeatedly run each algorithm for 20 times in each experiment setting. In order to show the regret dependence w.r.t. $T$, we plot all cumulative regret curves in log-log plots, where an $\alpha$ slope indicates an $O(T^\alpha)$ dependence.
\paragraph{Stochastic $\{x_t\}$.} We implement and test PwP and RMLP-2 on stochastic $\{x_t\}$'s, where $x_t$ are iid sampled from $\mathcal{N}(\mu_x, \Sigma_x)$ (for $\mu_x = [10, 10, \ldots, 10]^\top$ and some randomly sampled $\Sigma_x$) and then normalized s.t. $\|x_t\|_2\leq 1$. The numerical results are shown in (ref). Numerical results show that both algorithms achieve $\sim O(T^{0.56})$ regrets, which is close to the theoretic regret rate at $O(\sqrt{T\log T})$.
\paragraph{Adversarial $\{x_t\}$.} Here we design an adversarial $\{x_t\}$ sequence to attack both algorithms. Since RMLP-2 divides the whole time horizon $T$ into epochs with length $k=1,2,3,\ldots$ sequentially and then does pure exploration at the beginning of each epoch, we may directly attack those pure-exploration rounds in the following way: (1) In each pure-exploration round (i.e. when $t=1,3,6,\ldots, \frac{k(k+1)}2, \ldots$), let the context be $x_t=[1,0]^{\top}$; (2) In any other round, let the context be $x_t=[0,1]^{\top}$. In this way, the RMLP-2 algorithm will never learn $\theta^*[2]$ and $\eta^*[2]$ since the inputs of pure-exploration rounds do not contain this information. Under this oblivious adversarial context sequence, we implement PwP and RMLP-2 and compare their performance. The results are shown in (ref), indicating that PwP can still guarantee $O(T^{0.513})$ regret (close to $O(\sqrt{T\log T})$) while RMLP-2 runs into a linear regret.
As a high-level interpretation, the performance difference is because PwP adopts a "distributed" exploration at every time $t$ while RMLP-2 makes it more "concentrated". Although both PwP and RMLP-2 take the same amount of exploration that optimally balance the reward loss and the information gain (and that is why they both perform well in stochastic inputs), randomly distributed exploration would save the algorithm from being "attacked" by oblivious adversary. In fact, this phenomenon is analog to $\epsilon$-Greedy versus Exploration-first algorithms in multi-armed bandits. We will discuss more in (ref).
So far, we have presented the numerical results of running PwP and a modified RMLP-2 on the well-assumed demand model as (ref) (or (ref) equivalently). Besides of that, we also conduct experiments on a model-misspecification setting to show the robustness, where the true demand (or valuation) distribution is not the same as (ref) or (ref). The numerical results are presented in (ref).
Here we discuss the motivation and the limitation of making (ref). We leave the majority of discussion to (ref).
Necessity of lower-bounding $x_t^\top\eta^*$ from 0. As we state in (ref), the price elasticity coefficient $x_t^\top\eta^*$ is lower bounded by a constant $C_{\beta}>0$. On the one hand, this is necessary since we cannot have an upper bound on the optimal price without this assumption. On the other hand, according to (ref), we know that $r(u,\beta, p) = r(u, 1, \beta\cdot p)\cdot\frac1{\beta}$, which indicates that the reward is rescaled by $\frac1{\beta}$. As a result, the regret should be proportional to $\frac1{C_{\beta}}$. Although a larger (i.e. closer to $0$) elasticity would lead to a more smooth demand curve, this actually reduce the information we could gather from customers' feedback and slow down the learning process. We look forward to future researches getting rid of this assumption and achieve more adaptive regret rates.
In summary, our work focuses on the problem of contextual pricing with highly differentiated products. We propose a contextual elasticity model that unifies the “linear demand” and “linear valuation” camps and captures the price effect and heteroscedasticity. To solve this problem, we develop an algorithm PwP, which utilizes Online Newton Step (ONS) on a surrogate loss function and proposes perturbed prices for exploration. Our analysis show that it guarantees a $O(\sqrt{dT\log T})$ regret even for adversarial context sequences. We also provide a matching $\Omega(\sqrt{dT})$ regret lower bound to show its optimality (up to $\log T$ factors). Besides, our numerical experiments also validate the regret bounds of PwP and its advantage over existing method. We hope this work would shed lights on the research of contextual pricing as well as online decision-making problems.