Paying for Optimism Only Where the Sampler Falls Short

Thompson sampling chooses actions by drawing one plausible model of the world from the posterior (the learner's current belief over models) and acting as if that draw were true. It works well in practice. Its worst-case guarantees, however, depend on the posterior being exact, and exact posteriors are expensive. Cheaper approximations exist, such as variational inference (fitting a simple distribution, usually a Gaussian, by optimization) and Langevin samplers (noisy gradient steps that wander toward the posterior). These approximations fail in a particular way. If the approximation is too narrow in the direction of the action that is actually best, the agent stops trying that action and its regret grows linearly with time. If it is too wide, the agent keeps trying bad actions forever. The current fixes either spend more compute until the approximation is accurate everywhere, or inflate exploration everywhere at once.

This note proposes a different trade. The approximation only needs to be accurate in a few directions: those of the actions available right now, and only as far as their predicted-reward spread is concerned. We propose a cheap, two-sided per-round check. For each candidate action, it compares the approximate distribution's spread of predicted reward with a reference spread. It then widens or narrows the sample only along the action directions where the two disagree. The hypothesis is that this recovers the worst-case behavior of exact Thompson sampling at roughly the cost of the cheap approximation. Compute is spent only in the rounds and directions where approximation error would otherwise turn into regret.

Core Claim

Worst-case analyses of randomized exploration do not need the sample to match the posterior. They need it to be optimistic with at least constant probability in the right direction. This is the "sufficient optimism" argument behind the frequentist bound for randomized value functions in Worst-Case Regret Bounds for Exploration via Randomized Value Functions. It also needs the sample to not be so dispersed that clearly bad actions keep winning.

Both properties can be read off a single scalar per action. Let $q_t$ be the approximate distribution at round $t$, $x_a$ the feature vector of action $a$, $s_a^2$ the variance of predicted reward $x_a^\top\theta$ under $q_t$, and $r_a^2$ a reference variance. In the linear case the reference is $x_a^\top V_t^{-1} x_a$, with $V_t$ the regularized design matrix. In the logistic case it is the same quantity with $V_t$ replaced by the Gauss–Newton curvature. The check computes

$$\rho_a = s_a^2 / r_a^2,$$

and if $\rho_a < c_{\text{lo}}$ or $\rho_a > c_{\text{hi}}$ for constants $c_{\text{lo}} < 1 < c_{\text{hi}}$, it rescales the sampled model along $x_a$ alone. This is a rank-one correction that brings $\rho_a$ back into the band. Otherwise the sample is used as is.

The claim to be proved and tested has two parts. First, Thompson sampling driven by any approximate posterior, corrected this way, matches the worst-case regret rate of exact linear Thompson sampling. Second, the extra cost scales with the number of rounds in which the check fires, not with the horizon.

The two-sided design is what is new relative to the closest work. Thompson Sampling and Approximate Inference shows that any constant approximation error can cause linear regret in multi-armed bandits. Its uniform forced exploration fixes only the mode-seeking, too-narrow case, and it leaves the mass-covering, too-wide case open. A narrowing correction along offending directions targets exactly that open case.

Relation to Prior Work

Three papers motivate the gap. The Phan et al. result above shows that approximation error alone breaks Thompson sampling. On Worst-case Regret of Linear Thompson Sampling shows that even exact linear Thompson sampling under-explores when the confidence region is "thin," meaning certain in some directions and uncertain in others. That paper's adaptive-inflation fix, TS-AI, measures thinness of the exact covariance and then inflates the whole distribution by a dimension-dependent factor. We borrow its idea of inflating only when needed. Our trigger differs in two ways: it is the sampler's deficit relative to a reference rather than the data geometry, and the correction is along individual action directions rather than global. Feel-Good Thompson Sampling for Contextual Bandits: a Markov Chain Monte Carlo Showdown reports that adding a global optimism bonus to neural Langevin samplers often does worse than vanilla Thompson sampling and ε-greedy on UCI tasks. The authors suspect the bonus pushes an already noisy sampler into unstable regions. A correction applied after sampling, in prediction space, never touches the sampler's target, so it avoids that interaction by construction.

Four papers supply methods we reuse. On Approximate Thompson Sampling with Langevin Algorithms shows that warm-started Langevin with constant work per round keeps logarithmic regret. That guarantee requires strong log-concavity, a posterior error decaying like $1/n$, and a global variance scaling. We use its warm-started samplers as the cheap inner approximation, but we ask for a weaker, checkable property instead of global accuracy. VITS: Variational Inference Thompson Sampling for contextual bandits gives Gaussian variational Thompson sampling at $O(d^2)$ per round with a $\tilde O(d\sqrt T)$ bound when the model is linear. It offers no worst-case analysis under misspecification or thin geometry, and no optimism mechanism. VITS-II is our main inner approximation. More Efficient Randomized Exploration for Reinforcement Learning via Approximate Sampling splits regret into an exact-sampling term plus a sampling-error term for linear MDPs. Its analysis needs an $O(d^3)$ Cholesky step that the implementation drops. Our correction is meant to bound the sampling-error term directly in prediction space, so the Cholesky step becomes unnecessary in the analysis as well.

Two lines of work act as constraints. Feel-Good Thompson sampling (Feel-Good Thompson Sampling for Contextual Bandits and Reinforcement Learning; Variance-Aware Feel-Good Thompson Sampling for Contextual Bandits) obtains minimax worst-case rates by changing the posterior itself. That is a stronger guarantee than ours, and it is the natural competitor. Its open problem is that the modified posterior is hard to sample. Variational Bayesian Optimistic Sampling replaces sampling with a convex program. It is analyzed only under Bayesian regret, and solving that program every round is costly. We do not try to beat these on rates. We aim to match exact Thompson sampling's worst-case behavior with approximate inference.

Research Program

The theoretical part has three steps. The first is a lemma for finite-action linear contextual bandits. If $\rho_a \in [c_{\text{lo}}, c_{\text{hi}}]$ holds for every available action after correction, the corrected sample satisfies the anti-concentration condition (constant probability of being optimistic along the optimal action) and the concentration condition (bounded deviation) used in standard worst-case analyses of linear Thompson sampling. Those analyses therefore carry over, with constants depending on the band.

The second step bounds the cost of the corrections. We expect warm-started VI or Langevin to drift slowly, so the check should fire in a number of rounds governed by how fast the approximation error changes. We will bound this count under the warm-start tracking assumptions of Mazumdar et al. and VITS, and measure it empirically everywhere else.

The third step extends the reference variance to logistic rewards via the Gauss–Newton matrix. It also extends to linear MDPs, where the check is applied to randomized least-squares value iteration at each stage, replacing the Cholesky-based sampler in LSVI-ASE.

The algorithmic part builds the check on top of three inner approximations: VITS-II, warm-started unadjusted Langevin, and mean-field VI. Each round, the reference variance is computed with a few conjugate-gradient iterations warm-started from the previous round, so no explicit inverse or Cholesky factor is formed. For neural reward models, the reference is computed on last-layer features. This variant is exploratory, and we report it separately rather than folding it into the main claim.

Baselines

The naive reference points are greedy point estimation and ε-greedy. ε-greedy is a real competitor on the UCI tasks, where the MCMC showdown found it among the strongest methods. On deep-exploration problems it is known to collapse: in a 50-state chain, randomized value functions learn in about 500 episodes against roughly $10^{15}$ for ε-greedy (Generalization and Exploration via Randomized Value Functions).

The quality ceiling is exact linear Thompson sampling, where exact is tractable. Our method must come within a small factor of its regret, with gradient evaluations and wall-clock time close to the uncorrected inner approximation.

The strongest existing approximate methods are VITS-II (uncorrected), MALA-driven Thompson sampling, and MCMC Feel-Good Thompson sampling. MALA-driven Thompson sampling had the lowest regret on the showdown's linear and logistic tasks. MCMC Feel-Good Thompson sampling, as benchmarked there, is the method with minimax guarantees. No reported numerical regret for any of these was found on Lacuna; VITS's MovieLens and synthetic results and the showdown's UCI tables appear only as figures or tables not transcribed in the file. We will therefore rerun all of them ourselves.

Every baseline gets the same contexts, the same random seeds, the same per-round gradient-evaluation budget, and the same hyperparameter grid size, tuned on a separate seed set.

Global variance inflation stands in for TS-AI and for the γ-scaling of Mazumdar et al. Uniform forced exploration stands in for Phan et al.'s fix. LinUCB stands in for deterministic optimism.

The key ablation splits the check into a one-sided version (widen only) and a two-sided version. A second ablation replaces per-direction correction with a global rescaling triggered by the same check. Together these isolate the two ingredients that distinguish the proposal. Beating the competition means three things: lower worst-case regret across instance families than every approximate baseline at equal compute, regret within a factor of 1.5 of exact Thompson sampling, and a corrected-round fraction that falls over time.

Why not just…?

Why not just run the sampler longer, or use MALA? Mazumdar et al. show that accuracy decaying like $1/n$ suffices, and the showdown shows the Metropolis correction removes Langevin's bias. Spending more compute is therefore a legitimate route, and it is the one we must beat on the compute–regret curve. We will plot regret against gradient evaluations per round for MALA and for longer Langevin chains. Our method wins only if it reaches the same regret with fewer evaluations, or on ill-conditioned instances where VITS reports Langevin struggling to converge at any reasonable budget.

Why not just inflate the whole posterior, as TS-AI or Stable Thompson sampling do? Global inflation is known to over-explore. Classical linear Thompson sampling proofs need a factor of about $\sqrt d$, and TS-AI applies a $d$-factor when it triggers. Stable Thompson Sampling: Valid Inference via Variance Inflation accepts an $O(\gamma_T\log T)$ regret cost to fix coverage, which is only about 75% for a nominal 95% interval under plain Thompson sampling. Global inflation also cannot fix an approximation that is too wide. In low dimension this alternative is a real threat, so the global-rescaling ablation and a sweep over $d$ from 5 to 200 will show where per-direction correction stops mattering.

Why not just add forced exploration to variational Thompson sampling? Phan et al. prove it fixes only the too-narrow case. Uniform random actions also ignore context. Our 50-armed experiments with controlled α-divergence errors test both directions, and the thin-geometry linear instances test whether random pulls are enough when the deficient direction is a combination of features.

Why not just use LinUCB, since the check already computes $x_a^\top V_t^{-1}x_a$? This is the sharpest objection. If we compute the confidence width anyway, a deterministic upper-confidence rule is one step away. The evidence that randomization helps is empirical: MALA-driven Thompson sampling beats LinUCB in the showdown, and BUCRL beats UCRL2 in Near-optimal Reinforcement Learning using Bayesian Quantiles. LinUCB with the same conjugate-gradient widths will be run as a baseline. If it matches us on MovieLens and the logistic tasks, we will report that the value lies in the reference-variance computation rather than in the sampler, and narrow the claim to settings with informative priors.

Proposed Experiments

The decisive synthetic tests come first. The first is the 50-armed bandit with injected approximation errors of each α-divergence type, following Phan et al. The second is linear contextual bandits with well-conditioned and ill-conditioned features, following VITS. The third is a family of adversarial instances where the true parameter lies in the prior's tails or along the thin direction of the design. On these we report worst-case cumulative regret over the instance family rather than averages, since the frequentist gap appears only there.

Next come MovieLens 1M under a logistic model, the Wheel bandit, and Adult, Mushroom and Covertype. The last three test whether a post-hoc correction avoids the failure of neural Feel-Good Thompson sampling.

The reinforcement-learning extension runs on N-Chain up to $N = 100$ against LSVI-ASE with Langevin and underdamped Langevin samplers, and on RiverSwim against BUCRL.

Each run reports cumulative regret, gradient evaluations, wall-clock time, and the fraction of rounds and directions corrected. The result that would falsify the central idea is this: on the thin-geometry or tail instances, corrected approximate Thompson sampling still shows linear regret growth while exact Thompson sampling does not. That would mean per-action variance agreement does not capture what worst-case regret depends on.