arXiv:2610.21908cs.LGOct 2026

Manuscript Offprint

arXiv:2610.21908

The Tilted Sampling Problem: Optimism, Posterior Sampling, and Logarithmic Regret

Mohammad Pedramfar, Siamak Ravanbakhsh

Abstract

Many modern learning systems are used not to select a single best action, but to sample diverse high-quality outputs. Examples include entropy-regularized reinforcement learning, RLHF, and reward-guided generative modeling. Motivated by these settings, we study tilted sampling: an online learning problem in which the goal is to sample from the Gibbs distribution induced by an unknown reward function. We define sampling regret as the temperature-normalized cumulative KL divergence between the learner's distribution and the Gibbs target, corresponding to the suboptimality gap in entropy-regularized reward maximization. Our framework generalizes recent sampling-based and KL-regularized formulations in bandits and reinforcement learning. Our main contribution is a general regret framework that captures the different uncertainty structure of tilted sampling and classical regret minimization. While standard regret scales as O~(T)\widetilde{O}(\sqrt{T}) due to first-order uncertainty, sampling regret is governed by squared confidence widths, yielding logarithmic-in-T regret in standard settings at fixed temperature. We develop sampling analogues of UCB and Thompson sampling (UCS and TS 2^{2}) and provide unified regret decompositions that explain and extend recent logarithmic guarantees, including the first Bayesian sampling-regret decomposition based on new bounds for posterior-random Gibbs distributions. Our results show that learning to sample from a soft-optimal distribution is statistically distinct from learning to identify a hard optimum.

Figure

(a) Bound vs. horizon T.

(b) Bound vs. inverse temperature.

Figure 1: Schematic sampling-regret upper bound R(T,β)=min⁡{Tlog⁡T,βlog⁡T}R(T, \beta) = \min\{\sqrt{T \log T}, \beta \log T\} illustrating the complementary linear- and squared-width bounds for UCS and TS 2^2 in Theorems 3 and 4. (a) For fixed β\beta and T>1T > 1, the square-root branch is active when T/log⁡T≤β2T / \log T \leq \beta^2, and the logarithmic branch when T/log⁡T≥β2T / \log T \geq \beta^2. The large-horizon crossover satisfies T⋆(β)=β2log⁡T⋆(β)T^\star(\beta) = \beta^2 \log T^\star(\beta), with T⋆(β)∼2β2log⁡βT^\star(\beta) \sim 2\beta^2 \log \beta as β→∞\beta \to \infty; beyond it the bound follows βlog⁡T\beta \log T. (b) For each TT the bound is linear in β\beta up to the kink β⋆(T)=T/log⁡T\beta^\star(T) = \sqrt{T / \log T} and saturates at Tlog⁡T\sqrt{T \log T} beyond it.

1 INTRODUCTION

Classical bandit and reinforcement learning problems are formulated around optimization: the goal is to identify and repeatedly select actions with maximal reward [28, 3, 51]. Given an unknown reward function fθf_{\theta}, performance is measured by regret relative to a maximizer arg⁡max⁡afθ(a)\arg\max_{a} f_{\theta}(a). This formulation is appropriate when the desired behavior is a single best decision.

Many modern learning systems, however, are not used in this way. Large language models generate text by sampling [37], diffusion models generate images by sampling [22], and stochastic policies in reinforcement learning sample actions [20]. In these settings, the output of the system is inherently distributional. The goal is often not to collapse onto one maximizer, but to bias a base distribution toward high-reward outputs while preserving diversity, entropy, or proximity to a reference model.

This structure appears explicitly in RLHF and preference-based fine-tuning, where the idealized KL-regularized policy has the form

π∗(a)∝πref(a)exp⁡(βr(a)).\pi^{*}(a)\propto\pi_{\mathrm{r e f}}(a)\exp(\beta r(a)).

It also appears in entropy-regularized reinforcement learning and maximum-entropy control [67, 19], as well as reward-guided generative modeling [15]. Abstractly, these settings lead to the Gibbs distribution

Sβ,t(fθ)(da)=exp⁡(βfθ(a))Zβ,t(fθ)μt(da),S_{\beta,t}(f_{\theta})(d a)=\frac{\exp(\beta f_{\theta}(a))}{Z_{\beta,t}(f_{\theta})}\mu_{t}(d a),

where μt\mu_t is a base measure on the available action set At\mathcal{A}_t and β>0\beta > 0 is an inverse-temperature parameter.

This paper studies the online learning problem induced by this target. The learner interacts with the environment and aims to sample from the unknown Gibbs distribution rather than identify a single optimal action. We call this problem tilted sampling.

Our work builds directly on the multi-armed sampling framework of Pedramfar and Ravanbakhsh [39], which introduced the finite-armed analogue of this problem and showed that sampling can require substantially less explicit exploration than optimization. We generalize this framework beyond finite arms to general action spaces, time-varying feasible sets, function classes, and Bayesian posterior sampling.

Sampling regret. We measure performance via the cumulative KL divergence between the learner's sampling distribution and the Gibbs target:

SRegret(T)=1β∑t=1TDKL(Sβ,t(gt)∥Sβ,t(fθ)).\mathrm{S R e g r e t}(T)=\frac{1}{\beta}\sum_{t=1}^{T}D_{\mathrm{K L}}\big(S_{\beta,t}(g_{t})\parallel S_{\beta,t}(f_{\theta})\big).

This objective coincides with the suboptimality gap of entropy-regularized reward maximization [67, 19].

A different uncertainty structure. The main conceptual message is that learning to sample is statistically distinct from learning to optimize. Classical regret is driven by first-order uncertainty and scales as O~(T)\tilde{O}(\sqrt{T}) in standard models [3]. In contrast, sampling regret can be controlled by second-order uncertainty through squared confidence widths. This leads to logarithmic-in-T regret in many settings at fixed temperature. Such logarithmic guarantees have been established in KL-regularized bandits [66] and greedy RLHF analyses [58]. Our contribution is a unified framework of confidence-width decompositions that explains and extends these results across sampling algorithms and function classes.

Bayesian regret. Beyond frequentist algorithms, we also introduce Bayesian sampling regret. This leads to TS 2^{2}, a Thompson-style sampling algorithm. Unlike classical Thompson sampling [47], this requires controlling KL divergence between random Gibbs distributions. Its analysis requires new KL-divergence bounds for posterior-random Gibbs distributions and provides the first Bayesian regret decomposition for sampling objectives.

Algorithms and contributions. Our framework develops the tilted-sampling counterpart of the confidence-width approach to learning to optimize under bandit feedback [46].

We provide the first general regret framework for learning soft-optimal (Gibbs) distributions under bandit feedback, unifying optimistic and greedy analyses and establishing a Bayesian sampling-regret decomposition.

Our contributions are:

  • A general framework for tilted sampling beyond the finite-armed setting to time-varying action sets, function classes, and the Bayesian setting.

• We introduce Sampling With Confidence (SWC) framework, Upper Confidence Sampling (UCS), and Thompson Sampling for Sampling (TS 2^{2}).

• We show that the UCS and SWC regret decompositions generalize, simplify, and unify prior logarithmic-regret analyses for optimistic and greedy sampling methods through model-independent confidence-width bounds.

• We give a novel Bayesian sampling-regret decomposition for TS 2^{2}, based on new KL-divergence bounds for posterior-sampled Gibbs distributions.

  • Our regret decompositions extend to both directions of KL, providing a unified analysis of forward and reverse KL-divergences. In particular, the UCS and TS 2^{2} analyses yield simultaneous control of both quantities with identical bounds under the same confidence event and no exponential dependence on βC\beta C.

• We show that second-order uncertainty control yields logarithmic-in-time sampling regret in standard models for fixed temperature.

• We provide a black-box transfer of confidence-set and width-process analyses from UCB and Thompson sampling to tilted sampling under direct noisy reward feedback, yielding guarantees for the corresponding UCS and TS 2^{2} procedures.

References (67)