Hypothesis-Tempered Boltzmann Sampling for Linear Bandits

Boltzmann exploration picks actions at random with probabilities that fall off exponentially in how bad each action looks. It is popular because it is simple and because it reports the exact probability of every choice it makes. Those probabilities are what let logged data be reused later to evaluate other policies, by reweighting each logged outcome by the inverse of its selection probability. For years this method was thought to be theoretically weak. Recent work showed it can be made optimal in the simplest setting, the multi-armed bandit (a repeated choice among $K$ independent actions with unknown average payoffs). The fix is to give each action its own temperature, which grows sharper as evidence against that action accumulates. Nobody has carried that guarantee to linear bandits. In a linear bandit, actions are feature vectors, payoffs share one unknown parameter, and pulling one action teaches you about the others. Here the obvious translation of per-arm temperatures runs into a known trap. Policies that only ever try the action they are currently unsure about are asymptotically suboptimal in linear bandits. The best long-run policy sometimes plays a clearly bad action because it is the cheapest way to rule out a competitor.

We propose to split Boltzmann exploration into two random draws. First, sample a hypothesis ("arm $a$ is actually the best") with probability $\exp(-Z_a)$. Here $Z_a$ is the log-likelihood-ratio evidence against that hypothesis, so it plays the role of an adaptive inverse temperature. Second, sample the arm that most efficiently tests that hypothesis, which need not be $a$ itself. The selection probability of every arm stays in closed form. In the independent-arm case the method reduces to Maillard Sampling. Our central conjecture is that in linear bandits it attains the instance-dependent asymptotic lower bound, the linear-bandit analogue of the Lai–Robbins constant. Such a bound would be the first of its kind for a smooth randomized policy with exact propensities.

Core Claim and Mechanism

Fix a finite action set $\{x_1,\dots,x_K\}\subset\mathbb{R}^d$ with Gaussian noise of variance $\sigma^2$. Let $\hat\theta_t$ be the ridge estimate, $V_t$ the regularized design matrix, $\hat x^*$ the empirically best action, and $\hat\Delta_a$ its estimated gap to action $a$. The evidence against "action $a$ beats $\hat x^*$" is the generalized likelihood ratio for the half-space alternative. It has a closed form:

$$Z_a(t)=\frac{\hat\Delta_a^2}{2\sigma^2\,\lVert x_a-\hat x^*\rVert^2_{V_t^{-1}}},$$

where $\lVert y\rVert^2_{V^{-1}}=y^\top V^{-1}y$. For independent arms, $\lVert e_a-e^*\rVert^2_{V^{-1}}=1/N_a+1/N^*$, so $\exp(-Z_a)$ becomes the Maillard Sampling weight $\exp(-N_a\hat\Delta_a^2/2\sigma^2)$ once the best arm has many pulls. The empirical best action gets $Z=0$.

The second draw uses a test distribution $q_a(\cdot)$ over arms. It puts mass on arms $b$ in proportion to how much one pull of $b$ would raise $Z_a$. By the rank-one update of $V^{-1}$, that gain is $(y_a^\top V_t^{-1}x_b)^2/(1+\lVert x_b\rVert^2_{V_t^{-1}})$ with $y_a=x_a-\hat x^*$. The resulting policy is

$$p_t(b)=\sum_{a}\frac{\exp(-Z_a(t))}{\sum_{a'}\exp(-Z_{a'}(t))}\,q_a(b),$$

with $q$ for the current best set to "pull $\hat x^*$." This is exact and costs $O(K^2 d)$ per round, or less if we truncate to the few hypotheses with the smallest $Z_a$. The heuristic for optimality goes as follows. A hypothesis keeps being sampled until its evidence reaches about $\log t$. Its weight then drops to about $1/t$, so the total number of exploration rounds is of order $\log t$, the same counting argument behind Maillard Sampling. Because each hypothesis is refuted through its cheapest test arm, the split of those $\log t$ exploratory pulls across arms should track the optimal allocation, not the wasteful "pull the doubtful arm" allocation. One can view this as a game: the Boltzmann draw over hypotheses is the adversary choosing which alternative to attack, and $q_a$ is the experimenter's best response.

Relation to Prior Work

Two papers supply the method in the independent-arm case. Maillard Sampling: Boltzmann Exploration Done Optimally proves that per-arm temperatures $\propto N_a\hat\Delta_a$ match Lai–Robbins, and it names the linear extension as open. Kullback-Leibler Maillard Sampling replaces the quadratic exponent with a binary KL divergence for bounded rewards and shows why closed-form propensities matter for evaluation on logged data. Both rely on per-arm visit counts. In linear bandits a context may never repeat, so counts are not the right notion of evidence. Our $Z_a$ replaces counts with a self-normalized evidence measure, and the second draw has no counterpart in either paper.

One paper motivates and constrains the design. Adaptive Exploration in Linear Contextual Bandit establishes asymptotic optimality in linear bandits with Optimal Allocation Matching (OAM). OAM periodically solves a convex allocation program and switches deterministically between greedy and exploratory phases. The same paper shows that LinUCB is asymptotically suboptimal, which is why a "linear Maillard Sampling" that always pulls the doubtful arm should be expected to fail. We aim for OAM's constant without solving a program, without phase switching, and with exact propensities. Boltzmann Exploration Done Right constrains the space of designs. It proves that any global monotone temperature schedule is suboptimal, and its count-based Gumbel scheme carries an extra $\log T$ factor. That result rules out a scalar temperature. ERSAC (Efficient Exploration via Epistemic-Risk-Seeking Policy Optimization) also tunes temperature through a game, but it does so with one global scalar and offers no logarithmic guarantee. Our "temperature" is indexed by hypothesis and is calibrated by likelihood ratios. Finally, Residual Bootstrap Exploration is a randomized linear method with $\tilde O(d\sqrt n)$ regret. It has neither asymptotic optimality nor closed-form propensities.

Research Program

The theoretical work has three parts. The first is a minimax bound of order $\tilde O(d\sqrt{T})$, via the self-normalized concentration standard for ridge estimates. The second is reduction to the guarantee of Maillard Sampling when the actions are the coordinate basis. The third and main target is $\limsup_{T\to\infty} R(T)/\log T\le c(\theta)$, where $c(\theta)$ is the optimal-allocation constant that OAM attains. The hard step is showing that the empirical pull frequencies induced by mixing the $q_a$ converge to an optimal allocation. Our plan is to treat the softmax over hypotheses as an exponential-weights player in the saddle-point problem that defines $c(\theta)$. If the greedy one-step $q_a$ proves too myopic, we will replace it with a $q_a$ that averages the one-step gain over the recent design. This replacement still keeps propensities in closed form. We will state honestly which version the proof covers.

On the algorithmic side, we will extend $Z_a$ to KL-based evidence for bounded rewards, following Kullback-Leibler Maillard Sampling. We will then move to changing contexts, where $Z_a$ is computed per round for the presented action set. A known regime to check there is the "rich context" setting, in which OAM obtains bounded regret.

Baselines

The naive reference point is Boltzmann exploration with a global $1/\log t$ cooling schedule. Boltzmann Exploration Done Right proves it suboptimal, so it calibrates how much per-hypothesis tempering buys.

The strongest existing method on the asymptotic question is OAM (Adaptive Exploration in Linear Contextual Bandit), which provably attains $c(\theta)$. We found no reported scalar result on Lacuna for OAM: its regret appears only as curves against LinUCB, OSSB, and LinTS for up to $K=100$ actions. We will therefore rerun it ourselves on its own synthetic instances. The rerun will use the same noise, horizon ($T$ up to $10^6$), 100 seeds, and an equal grid-search budget over each method's free constants. Beating OAM does not require lower regret. It means matching its slope of $R(T)/\log T$ within seed error while providing exact propensities and lower wall-clock time per round.

LinTS and LinUCB are the practical defaults. LinReBoot (Residual Bootstrap Exploration) is the strongest randomized competitor without propensities. All three run under the same tuning budget.

In the independent-arm case, the benchmark is Maillard Sampling and MS$^+$ with $B\in\{4,8,16\}$ on the 10-armed Gaussian and Bernoulli instances of Maillard Sampling. That paper reports only curves, so here the success criterion is no regression.

The key ablation is "linear Maillard Sampling": set $q_a=\delta_a$, so the method pulls the hypothesized arm itself. This isolates the two-draw decoupling. If the ablation matches the full method on instances where pulling a suboptimal informative arm is necessary, the central idea is wrong.

For off-policy evaluation, the reference is the protocol of Kullback-Leibler Maillard Sampling. In 2,000 trials on logged Bernoulli data it reports an MSE of 0.00796 for KL-MS. Bernoulli Thompson Sampling failed in half the trials because of zero-probability estimates, and its MSE was 0.02015 on the remaining trials. We will rerun this protocol in the multi-armed case as a sanity check and then extend it to linear logs, with LinTS using Monte Carlo propensity estimates. Beating LinTS means having no failed trials and a lower MSE than LinTS on the linear logs.

Why not just…?

Why not just use LinTS or LinUCB? They are simple and have $\tilde O(d\sqrt T)$ guarantees, but Adaptive Exploration in Linear Contextual Bandit shows that optimistic index rules are asymptotically suboptimal in linear bandits and that OAM substantially outperforms LinUCB as the gap parameter varies. LinTS also lacks closed-form propensities, the failure documented in Kullback-Leibler Maillard Sampling. Our gap-parameter sweep will show whether this suboptimality is visible at practical horizons. If it is not, the asymptotic claim matters less than we think, and we will report that.

Why not just add a decaying uniform mixture to OAM? This is the real threat. It gives OAM-level regret together with nonzero propensities. The weakness is that a decaying $\epsilon_t$ must vanish fast enough to keep regret logarithmic. The informative-but-bad arms then get propensities near $\epsilon_t/K$, which inflates the variance of inverse-propensity estimates. Our policy instead puts probability mass on exactly the arms that tests require. The linear off-policy experiment compares the two directly at matched online regret. If the mixture ties on both axes, the remaining case for our method is that it needs no convex solver and no phase logic, and we would say so plainly.

Why not just apply Maillard Sampling with $Z_a$ in the exponent and skip the second draw? This is the ablation above. The theory predicts that it inherits the suboptimality of optimism-like rules, and the constructed instances test that prediction.

Why not use bootstrap ensembles such as LinReBoot? They randomize, but they select by an argmax over resampled estimates, so propensities are unavailable in closed form. Their guarantee is also of $\sqrt n$ type rather than instance-optimal.

Proposed Experiments and Decisive Checks

We will use the synthetic linear benchmarks of the OAM and LinReBoot papers, with $d\in\{5,10,20\}$ and $K$ up to 100, and the 10-armed instances of the Maillard Sampling paper. We will add hand-built instances in which the optimal allocation puts most exploration on a strictly suboptimal action. The metrics are cumulative regret, the empirical slope of $R(T)/\log T$ compared against $c(\theta)$ computed offline, the distance between empirical pull frequencies and the optimal allocation, time per round, and off-policy evaluation MSE.

Three results decide the question. The first is whether the full method's slope converges to $c(\theta)$ while the $q_a=\delta_a$ ablation stays strictly above it on the constructed instances. The second is whether the method avoids regression against MS$^+$ in the multi-armed case. The third is whether the off-policy MSE on linear logs beats LinTS and the $\epsilon$-mixed OAM at equal online regret. A negative first result would falsify the decoupling idea. A negative third result would remove the method's practical reason to exist beyond OAM.