arXiv:2610.05659cs.LGOct 2026

Manuscript Offprint

arXiv:2610.05659

Bellman-Centric Learning: Near-Optimal Regret for Linear Bandits with Memory

Jingyuan Liu, Huiwen Jia

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

Jingyuan Liu, Huiwen Jia

Department of Industrial Engineering and Operations Research, University of California, Berkeley

We study linear bandits with memory, where past actions induce endogenous nonstationarity through an arbitrary known, bounded matrix-valued memory map. To trade off exploration and exploitation while accounting for the memory dynamics, we develop RSM-LinUCB, a Bellman-centric algorithm that learns as in linear bandits and plans as in reinforcement learning. This design admits a novel regret decomposition which separates the memory-induced error from the cumulative reward estimation error along the learner's trajectory. We prove a high-probability regret bound of O~(dRS(M+1)+σdT)\widetilde{O}(dRS(M+1)+\sigma d\sqrt{T}), where T is the learning horizon, d is the parameter dimension, M is the memory length, R and S bound the memory-map operator norm and reward-parameter norm, respectively, and σ\sigma is the sub-Gaussian noise scale. Our results reveal that the multiplicative memory–horizon coupling in prior bounds is not intrinsic: memory only contributes an additive cost, up to logarithmic factors. We also prove a matching minimax lower bound, establishing near-optimality. We further extend the algorithm to generalized linear rewards, preserving this separation with near-optimal memory and leading statistical dependence. Our algorithms outperform the baselines in numerical experiments on synthetic instances and semi-synthetic KV- and semantic-cache tasks.

Key words: linear bandits, memory, endogenous nonstationarity, regret bounds

1. Introduction

Linear bandits (Abbasi-Yadkori et al. 2011, Hao et al. 2020) are a widely studied framework for sequential decision-making that generalizes multi-armed bandits (Bubeck and Cesa-Bianchi 2012, Auer et al. 2002) by modeling expected rewards as linear functions of action features. Recent work (Wu et al. 2018, Chen et al. 2019, Luo et al. 2018, Di Benedetto et al. 2020) extends linear bandits to the non-stationary setting, where the unknown reward parameter may change over time. Such temporal variation arises in applications including large language model (LLM) serving (Taberner-Miller 2026, Lee and Wong 2026), recommendation systems (Ghoorchian et al. 2024, Xu et al. 2020), and dynamic pricing (Zhao et al. 2026). In these environments, the learner must estimate rewards from noisy feedback while adapting to changes in the underlying environment.

Early work on non-stationary bandits focuses on exogenous non-stationarity, where the environment changes independently of the learner's actions (Garivier and Moulines 2011, Besbes et al. 2014, Karnin and Anava 2016). In many applications, however, the learner's recent decisions themselves influence subsequent rewards, giving rise to endogenous non-stationarity. One concrete example is key-value (KV) caching in LLM serving with a fixed retention window (Qin et al. 2025). Refreshing a prefix makes its KV tensors available for reuse in the current and subsequent rounds. The benefit of a refresh therefore depends on earlier decisions: refreshing an uncached prefix can enable reuse for additional requests, whereas refreshing an already cached prefix extends its availability. Related memory effects arise in model or adapter routing (Fu et al. 2024), where recent pinning and routing decisions determine which models or adapters remain warm. In recommendation and advertising (Warlop et al. 2018, Agrawal and Tulabandula 2020), recent exposures modify users' responses through priming, boredom, or wear-out effects; for example, repeatedly displaying similar advertisements may cause user fatigue and reduce subsequent rewards. In dynamic pricing, past prices affect subsequent revenues through finite-memory reference price effects (den Boer and Keskin 2022) or through their impact on resource occupancy and availability (Jia et al. 2024).

Recent work on linear bandits with memory (LBM) (Clerici et al. 2023, Ann et al. 2026) studies one specific endogenous non-stationarity setting: the most recent MM actions determine a known memory matrix A(⋅)A(\cdot) that transforms a fixed unknown reward parameter. Their algorithms divide the learning horizon into episodes with fixed length and select an entire sequence of actions at the start of each episode by maximizing the optimistic reward objective. The best known regret bound with this approach is O~(RSdMT+σmax⁡{1,S}dmax⁡{d,R2}T)\widetilde{O}(RS\sqrt{dMT} + \sigma\max\{1, S\}\sqrt{d\max\{d, R^2\}T}), where TT is the horizon, MM is the memory length, dd is the reward-parameter dimension, σ\sigma is the sub-Gaussian noise, and RR and SS bound the operator norm of A(⋅)A(\cdot) and the Euclidean norm of θ∗\theta^*, respectively. The first regret term couples memory length and horizon through MT\sqrt{MT}, while the second introduces additional dependence on RR and SS relative to the usual O~(σdT)\widetilde{O}(\sigma d\sqrt{T}) statistical term. A similar memory–horizon term appears in the extension to generalized linear bandits with memory (GLBM (Ann et al. 2026)). At the meantime, the existing literature does not yet provide minimax regret lower bounds that quantify the cost of memory. Thus, it remained an open question: is the multiplicative memory–horizon dependence intrinsic, or can near-optimal regret be achieved with an additive memory cost?

Memory-dependent rewards in these LBM and GLBM settings pose two main challenges. First, policy updates must account for persistent memory. Although new observations allow the learner to improve the policy, each updated policy inherits a memory state shaped by earlier decisions. Frequent updates may therefore accumulate memory-induced error, requiring a tradeoff between incorporating new information and maintaining policy stability. Second, learning must account for the long-term effects of actions. An action determines not only the immediate reward but also the memory state governing future rewards. The learning agent must therefore account for these long-term effects while learning the unknown reward parameter. Our key observation is that the most recent M actions in LBM naturally form a state with known and deterministic transitions, as in reinforcement learning (RL), while rewards are governed by a shared unknown parameter, as in linear bandits. Neither view alone suffices: a myopic bandit approach neglects future memory effects and can incur linear regret, whereas a direct tabular RL algorithm does not exploit the shared reward structure and yields a regret with exponential dependence on the memory length. We therefore ask:

Can we exploit this structure to learn from bandit feedback while planning over memory states as in RL, and achieve near-optimal regret?

We develop algorithms and regret guarantees for LBM and GLBM. Our contributions are as follows.

• We develop a Bellman-centric algorithm, RSM-LinUCB (Algorithm 1), in Section 3. It constructs optimistic reward estimates using linear-bandit confidence sets and uses Bellman planning over memory states to account for the long-term effects of actions. To control the memory-induced costs of policy updates, RSM-LinUCB adopts determinant-triggered rare switching (Abbasi-Yadkori et al. 2011): it updates optimistic reward estimates and policy only when the determinant of the information matrix doubles. We further develop RSM-GLMUCB for GLBM in Section 5, extending optimistic reward estimation, Bellman planning, and rare policy updates to generalized linear rewards.

• We establish near-optimal regret guarantees for RSM-LinUCB in Section 4. Our analysis admits a Bellman regret decomposition that separates memory-induced boundary costs from cumulative reward-estimation error along the learner's trajectory. Specifically, Theorem 1 gives an upper bound of O~(dRS(M+1)+σdT)\widetilde{O}(dRS(M+1)+\sigma d\sqrt{T}). Compared with prior bounds, this replaces multiplicative memory–horizon dependence with an additive memory cost, while removing polynomial dependence on R and S from the leading statistical term. The matching lower bound in Theorem 2 establishes optimality up to logarithmic factors. For GLBM, we further obtain O~(d(M+1)Δμ+σdT+d2κvρ2Δμ)\widetilde{O}(d(M+1)\Delta_{\mu}+\sigma d\sqrt{T}+d^{2}\kappa v\rho^{2}\Delta_{\mu}) in Section 5. Here, Δμ\Delta_{\mu} is the range of reward means, κ\kappa is the worst-case inverse slope of the link function, and v and ρ\rho govern reward dispersion and relative slope variation, respectively. This bound retains the separation between memory and statistical costs, with an additional curvature-induced error. The lower bound in Theorem 4 shows that the first two terms are near-optimal. Detailed comparisons of theoretical results are in Table 1.

• We evaluate our algorithms on synthetic instances and two semi-synthetic caching tasks in LLM serving. Synthetic experiments examine performance over T and sensitivity to M, R, and S, with RSM-LinUCB reducing cumulative regret by at least 61% relative to the baselines. For KV caching, we use the Mooncake conversation trace (Qin et al. 2025) to evaluate prefix-cache refresh decisions. On this task, RSM-LinUCB reduces cumulative regret by at least 20%. For semantic caching, we use vCache/SemBenchmarkLmArena (Schroeder et al. 2025). The feedback is exponential with a reciprocal mean function, yielding a generalized linear reward model. On this task, RSM-GLMUCB reduces cumulative regret by at least 46% relative to the baselines.

Table 1 Comparison of regret bounds for the basic LBM setting and the extended GLBM setting.

Comparisons for LBMAlgorithmRegret
Jaksch et al. (2010)UCRL2O~(RSMnM+1/2T+σn(M+1)/2T)\widetilde{O}\big(RSMn^{M+1/2}\sqrt{T}+\sigma n^{(M+1)/2}\sqrt{T}\big)
Clerici et al. (2023)OFUL-memoryO~(R(S+σ)dMT3/4)\widetilde{O}\big(R(S+\sigma)\sqrt{dMT^{3/4}}\big)
Ann et al. (2026)OFUL-memory (improved)O~(RSdMT+σmax⁡{1,S}dmax⁡{d,R2}T)\widetilde{O}\big(RS\sqrt{dMT}+\sigma\max\{1,S\}\sqrt{d\max\{d,R^{2}\}T}\big)
Ours (Upper Bound)RSM-LinUCBTheorem 1O~(dRSM+σdT)\widetilde{O}\big(dRSM+\sigma d\sqrt{T}\big)
Ours (Lower Bound)Theorem 2Ω~(dRSM+σdT)\widetilde{\Omega}\big(dRSM+\sigma d\sqrt{T}\big)
Comparisons for GLBMAlgorithmRegret
Ann et al. (2026)GLBM-SCBO~(τw+ΔμMT+CμσdT+Γμd2κvρ2Δμ)\widetilde{O}\big(\tau_{w}+\Delta_{\mu}\sqrt{MT}+C_{\mu}\sigma d\sqrt{T}+\Gamma_{\mu}d^{2}\kappa v\rho^{2}\Delta_{\mu}\big)
Ours (Upper Bound)RSM-GLMUCBTheorem 3O~(dMΔμ+σdT+d2κvρ2Δμ)\widetilde{O}\big(dM\Delta_{\mu}+\sigma d\sqrt{T}+d^{2}\kappa v\rho^{2}\Delta_{\mu}\big)
Ours (Lower Bound)Theorem 4Ω~(dMΔμ+σdT)\widetilde{\Omega}\big(dM\Delta_{\mu}+\sigma d\sqrt{T}\big)

Notes. We assume M≥1M \ge 1 as the models reduce to standard (generalized) linear bandits when M=0M=0. Here, n=∣A∣n = |\mathcal{A}| denotes the action set size, and τw\tau_w denotes the cumulative warm-up regret in Ann et al. (2026), which may not be sublinear in TT when insufficient feature coverage prevents the warm-up stopping condition from being met. For ρ>0\rho > 0, CμC_{\mu} and Γμ\Gamma_{\mu} are parameter-dependent factors satisfying Cμ≥(1+ρRS)3/2C_{\mu} \ge (1+\rho RS)^{3/2} and Γμ≳d+(MT)1/4\Gamma_{\mu} \gtrsim d+(MT)^{1/4}. For GLBM, σ\sigma denotes an upper bound on the conditional standard deviation.

References (62)