arXiv:2610.39803cs.LGOct 2026

Manuscript Offprint

arXiv:2610.39803

Optimal Contextual Pricing in Non-Stationary Environments

Yiding Feng, Alireza Rezaeimoghadam

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study contextual dynamic pricing in a non-stationary environment. In each round, a seller observes a buyer's context, posts a price, and receives only binary purchase feedback. The buyer's value is linear in the context and an unobserved feature vector that may change over time, subject to a known total variation budget V. We measure dynamic regret against the first-best benchmark that extracts each buyer's full value.

For identical contexts, we develop a deterministic algorithm that combines binary-search exploration, lower-envelope pricing, and two complementary restart mechanisms. It achieves regret O((TV+1)log⁡T)O((\sqrt{TV}+1)\log T). With heterogeneous contexts, a new geometric difficulty arises: small feature changes can leave a relaxed feasible set narrow but far from the current feature vector. To address this difficulty, we introduce a multiscale shallow-pricing algorithm that maintains relaxed feasible sets and ellipsoidal approximations at several variation scales. Larger scales provide reliable localization certificates, while the smallest active scale determines the exploitation price. The algorithm achieves dynamic regret O((d2+d3/2TV)log⁡2T)O((d^2 + d^{3/2}\sqrt{TV})\log^2 T). Both guarantees match the identical-context lower bound Ω(TV+log⁡log⁡T)\Omega(\sqrt{TV} + \log \log T) up to logarithmic factors.

*Department of Industrial Engineering and Decision Analytics, Hong Kong University of Science and Technology. Email: ydfeng@ust.hk.

†^{\dagger}School of Computer and Communication Sciences, EPFL. Email: alireza.rezaeimoghadam@epfl.ch. Part of this work was conducted while Alireza Rezaeimoghadam was a research intern at the Hong Kong University of Science and Technology (HKUST), hosted by Yiding Feng.

1 Introduction

Online sellers repeatedly make pricing decisions for buyers with different observable characteristics and changing willingness to pay. The economic scale of these decisions is substantial: U.S. consumers spent 257.8billiononlineduringNovemberandDecember2025,including257.8 billion online during November and December 2025, including44.2 billion during the five-day Cyber Week (Adobe, 2026). Observable context can help a seller tailor prices to individual transactions, but the relationship between context and willingness to pay may change with seasonality, preferences, and market conditions. Learning this relationship is particularly challenging because pricing feedback is censored: a purchase or rejection reveals only whether the buyer's value exceeds the posted price. An effective pricing algorithm must therefore learn from limited feedback while adapting to a changing environment.

We study contextual dynamic pricing over T rounds. In each round, a new buyer arrives with an observable d-dimensional context and an unobserved d-dimensional feature vector. The buyer's value is the inner product of these two vectors. Contexts are nonnegative unit vectors, and hidden features are nonnegative vectors with Euclidean norm at most one, so values lie between zero and one. After observing the context, the seller posts a price and observes only whether the buyer purchases. Contexts may vary arbitrarily across rounds. The hidden features may also change, subject to a known upper bound V on the sum of their Euclidean changes between consecutive rounds. Our objective is to minimize dynamic regret relative to the first-best benchmark: the total revenue of an oracle that knows each buyer's value and posts that value as the price. This benchmark extracts the full surplus in every round and is stronger than comparison with the best single fixed price in hindsight (Kleinberg and Leighton, 2003).

Our problem builds on the study of online posted-price learning initiated by Kleinberg and Leighton (2003) and connects two lines of dynamic pricing research. Stationary contextual pricing studies heterogeneous contexts with a fixed hidden parameter (Paes Leme and Schneider, 2018; Cohen et al., 2020; Liu et al., 2021), whereas Paes Leme et al. (2021) study non-contextual pricing with changing values under bounds on their per-round changes. We consider heterogeneous contexts together with changing hidden features under a known aggregate variation budget. Non-stationary contextual pricing has also been studied under stochastic valuation noise and demand models (Javanmard, 2017; Baby et al., 2023); our focus is the noiseless linear-valuation model and regret against the first-best benchmark. (A comprehensive discussion on the further related work can be found in Section 1.2.) This leads to the following question:

What is the optimal dynamic regret in this setting, and what additional difficulties arise from the interaction between contextual heterogeneity and non-stationarity?

References (57)