A neural bandit is a learner that repeatedly picks one of several actions using a neural network's reward prediction. It explores by adding an uncertainty bonus to each prediction. The most principled bonus measures how new an action's gradient is compared with the gradients seen so far. That requires storing and inverting a $P \times P$ matrix, where $P$ is the number of network weights. For $P = 10^5$ this is already infeasible, so practitioners compute uncertainty only for the last layer or keep only a diagonal. Separately, a line of bandit and Bayesian-optimization work has shown that scaling the bonus by a random multiplier drawn fresh each round explores better than the large, growing deterministic multiplier the theory usually demands. The random multiplier is usually small, which gives fast exploitation, and occasionally large, which gives escape from bad regions.
These two ideas have been developed in isolation. Their naive combination also carries a real danger. A cheap approximate covariance may underestimate uncertainty, and a small random draw can then land on exactly those rounds. When both happen, the agent could stop exploring for good.
This note proposes a specific way to combine them safely. The method maintains a Frequent Directions sketch, a streaming low-rank summary of all past gradients whose error is one-sided and exactly tracked. From it, two cheap bonuses follow that provably sandwich the exact full-network bonus. The width of that sandwich then sets the parameters of the random confidence distribution each round. The resulting algorithm costs $O(P\ell)$ memory for a sketch of $\ell$ rows. It keeps whole-network uncertainty and, in the fixed-feature case, inherits the regret analysis of exact randomized UCB. The central empirical bet concerns deterministic UCB, which must pay the sketch's worst-case slack on every round. Randomization should let the method pay it only in tail draws, so sketch error should hurt randomized exploration much less than deterministic exploration.
Core Claim
The research file frames the open problem as a tension. Sketching kernel or gradient matrices introduces variance error. Scalable kernel bandits such as BKB, which sketches GP kernel matrices by leverage-score sampling, and EK-UCB, which builds an incremental Nyström projection, absorb this error by padding a deterministic confidence multiplier. Randomized methods such as IRGP-UCB assume exact variance and occasionally draw small multipliers.
Our claim is that the tension largely disappears if the sketch is chosen so its error has a known sign and a known size. The randomization should then be rescaled by that size, not padded.
Concretely, let $G_t$ stack the past gradient features $g_\tau = \nabla_\theta f(x_\tau;\theta_\tau)$. Let $Z_t = G_t^\top G_t + \lambda I$ be the NeuralUCB design matrix from Zhou et al., with regularizer $\lambda$. Let $B_t \in \mathbb{R}^{\ell \times P}$ be the Frequent Directions sketch of $G_t$. Frequent Directions guarantees $B_t^\top B_t \preceq G_t^\top G_t \preceq B_t^\top B_t + \delta_t I$, where $\delta_t$ is the running total of shrinkage the sketch has applied. The algorithm knows $\delta_t$ exactly. Consequently, for any candidate gradient $g$:
$$\sigma_{\rm lo}^2(g)=g^\top\big(B_t^\top B_t+(\lambda+\delta_t)I\big)^{-1}g \;\le\; g^\top Z_t^{-1}g \;\le\; g^\top\big(B_t^\top B_t+\lambda I\big)^{-1}g=\sigma_{\rm hi}^2(g).$$
The two ends are within a factor $\kappa_t=\sqrt{(\lambda+\delta_t)/\lambda}$ of each other. The factor follows because $B_t^\top B_t+\lambda I \succeq \tfrac{\lambda}{\lambda+\delta_t}\big(B_t^\top B_t+(\lambda+\delta_t)I\big)$.
Both ends are computed by the Woodbury identity in $O(P\ell)$ per candidate action. The algorithm scores each action as follows:
$$\text{Score}_t(x)=f(x;\theta_t)+\kappa_t\,\zeta_t\,\sigma_{\rm lo}(g(x;\theta_t)),\qquad \zeta_t\sim \text{shifted-Exp}(s,\lambda_{\rm exp}),$$
where $\zeta_t$ is one draw shared by all actions in round $t$. Sharing the draw is the coupled randomization that RandUCB found better in practice. The shifted exponential with floor $s$ and rate $\lambda_{\rm exp}$ is the distribution of IRGP-UCB.
Because $\kappa_t\sigma_{\rm lo}\ge\sigma$, the event "the bonus exceeds the exact bonus scaled by $\zeta_t$" holds deterministically. Every optimism-in-expectation step of the exact analysis therefore goes through unchanged. The price is over-exploration by at most $\kappa_t$. The core empirical claim is that this price is much smaller under randomization than under a deterministic multiplier inflated by the same $\kappa_t$. The deterministic version pays $\kappa_t$ in every round, while the randomized version pays mostly in rare tail draws.
We also test a cheaper variant that rescales only the floor $s$ by $\kappa_t$ and leaves the tail untouched. This variant has no proof, but it probes whether the floor alone carries the safety requirement.
Research Program
The theory work has a narrow target. In the fixed-feature linear bandit with a very high-dimensional feature vector, we will prove that sketched randomized UCB retains the exact method's regret up to a factor depending on $\kappa_T$. The feature vector here is the linearized network, or equivalently the neural tangent kernel regime. We will then bound $\kappa_T$ through the Frequent Directions guarantee $\delta_t \le \|G_t - [G_t]_k\|_F^2/(\ell-k)$, which is small when the gradient matrix has fast spectral decay.
Extending this to trained networks whose features drift requires combining the linearization lemmas of Zhou et al. with the expectation lemmas of Takeno et al.. We treat that extension as a conjecture to be checked empirically, not a promised result. We will not attempt to remove the continuous-domain $\log T$ artifact.
The engineering work has three parts. The first is a streaming Frequent Directions update over per-example gradients. The second is a batched Woodbury evaluation of $\sigma_{\rm lo}$ for all actions in a round. The third is re-sketching when $\theta_t$ changes enough that stored gradients go stale. For that we follow NeuralUCB's practice of using current-parameter gradients, and we measure staleness directly.
The analysis work tracks three things over time: $\delta_t$ and $\kappa_t$, the realized ratio of sketched to exact bonus on networks small enough to compute the exact one, and how often each exploration mode is triggered.
The role of prior work divides cleanly. SLANG motivates avoiding diagonals. It uses low-rank-plus-diagonal precision matrices for Bayesian deep learning and shows that diagonal approximations shrink and even reverse variance trends. Jia et al. report that diagonal NeuralUCB degrades badly, which also motivates avoiding diagonals. SLANG's approximation, however, has no one-sided guarantee, which is why we do not reuse it.
Miani et al. and VIKING give matrix-free posteriors by projecting onto null and image spaces of the Gauss-Newton matrix. They are a plausible alternative covariance engine, but they are built for offline training, not per-round bonuses with certified error. We treat them as a comparison point, not a component.
Farquhar et al. argue that depth makes diagonal weight posteriors expressive enough. This constrains the proposal: if they are right in the exploration setting, our sketch buys nothing. We test that directly instead of assuming it away.
Baselines
The naive reference point is Neural-Greedy, which uses no exploration bonus. It shows how much any exploration helps on each benchmark.
The strongest reported competitor is Neural-σ²-LinearUCB of Bui et al.. It freezes the representation network and runs a noise-weighted linear UCB on the last layer. Bui et al. report MNIST cumulative regret "below 1000" for their method, against "~1600" for Neural-LinUCB and "~2200" for full NeuralUCB. They also report their method is "roughly 15x faster in arm selection than full NeuralUCB." It is the strongest competitor because it is both cheaper and lower-regret than whole-network NeuralUCB on the file's main benchmark.
We rerun it on the same data orderings, horizon, network architecture, and seeds. Beating it means lower mean cumulative regret on MNIST, and on at least most of the UCI tasks, at a per-round cost within a small constant factor of it. We will not claim a win from lower regret bought with much more compute.
The randomized counterpart of this baseline is last-layer RandLinUCB, the last-layer bonus with the same shifted-exponential multiplier. It isolates whether whole-network uncertainty matters once randomization is present.
NPR of Jia et al. perturbs the reward history with noise, retrains, and acts greedily. It is the strongest matrix-free competitor. The file contains no reported scalar result for NPR on Lacuna, so we run it ourselves. We use the same retraining budget in gradient steps per round that our method spends on its own network updates, and we report wall-clock time alongside regret.
NeuralTS of Zhang et al. is run using our Frequent Directions sketch for its variance. This separates the effect of the sketch from the effect of UCB-style versus Thompson-style randomization.
Exact NeuralUCB and exact randomized NeuralUCB are run on networks small enough to invert $Z_t$. They show how much the sketch costs relative to no approximation.
The key ablation is deterministic sketched NeuralUCB with $\kappa_t$ padding, the BKB-style fix applied to the same sketch. It shares every component with our method except the random multiplier. If our method does not beat this ablation as $\ell$ shrinks and $\kappa_t$ grows, the proposal's central claim is false.
A further ablation is a diagonal-Fisher bonus with the same random multiplier, which tests the Farquhar et al. position.
All methods get the same hyperparameter search budget over $\lambda$, learning rate, and their exploration parameters. The exploration parameters are $(s,\lambda_{\rm exp})$ for randomized methods, the multiplier for deterministic ones, and the noise scale for NPR. Tuning is done on a held-out seed set.
Why not just…?
Why not just use last-layer exploration with a random multiplier? This is the most serious threat. It costs $O(d^2)$ per update for last-layer width $d$, and on MNIST its deterministic variant already beats full NeuralUCB according to Bui et al.. Its weakness is structural. If the frozen features do not encode what separates a good action from a bad one, the last layer reports no uncertainty about it, so nothing prompts exploration that would improve the features.
We will settle this with a representation-shift task. The backbone's initial features come from pretraining on a subset of CIFAR-10 classes, and the bandit rewards depend on the remaining classes. If last-layer RandLinUCB matches our method both there and on the standard benchmarks, we will report that whole-network sketching is unnecessary at these scales.
Why not just pad a deterministic bonus to cover the sketch error? That is the standard remedy in BKB. It is exactly our key ablation. Padding multiplies every round's bonus by $\kappa_t$, and the over-exploration documented for conservative UCB should grow with it. Randomization concentrates the extra exploration in tail draws. If the padded deterministic version tracks our method across the sweep over $\ell$, the random multiplier adds nothing and the idea fails.
Why not just use a diagonal covariance, since depth may make it enough? Farquhar et al. give a real argument that it might suffice, while SLANG and Jia et al. report diagonal failures. None of these studies used a randomized confidence multiplier, which might mask diagonal errors. The diagonal-plus-random-multiplier ablation, run at equal memory, decides this. We also report rank correlation between diagonal and exact bonuses on small networks, which tests for the trend reversal SLANG describes.
Why not just use NPR and skip covariance entirely? NPR has regret guarantees and needs no matrix, but it retrains on the full perturbed history each round. It also produces no explicit variance, which rules it out for level-set estimation of the kind in Inatsu et al. and for any variance-aware rule. On pure regret at a generous compute budget, NPR may win. We will report regret against wall-clock time so that a reader can see where each method dominates. We do not claim to beat NPR on regret alone.
Proposed Experiments
The first experiment checks the sandwich directly. Small MLPs with $P$ around $10^4$ are run on UCI Mushroom, Shuttle, and Covertype, where $Z_t^{-1}$ is computable. We verify that $\sigma_{\rm lo}\le\sigma\le\sigma_{\rm hi}$ holds under parameter drift, since the guarantee is exact only for fixed features. We also plot $\kappa_t$ over time for $\ell$ from 16 to 512, and measure the regret gap between the sketched and exact randomized methods. A large or growing $\delta_t$ on real gradient spectra would make the method vacuous, and this experiment exposes that early.
The main comparison runs on MNIST and CIFAR-10 in their 10-action form, and on UCI Adult, Magic Telescope, Letter, Shuttle, and Covertype. It uses networks with $P$ from $10^5$ to $10^6$, where exact NeuralUCB is infeasible, and includes all baselines. The reported quantities are mean and standard error of cumulative regret over 10 seeds, per-round selection time, and peak memory. MNIST results are placed next to Bui et al.'s reported figures, with the caveat that our rerun is the fair comparison.
The decisive check is the regret gap between our method and the padded deterministic ablation as a function of $\kappa_t$, swept through $\ell$. The proposal predicts that this gap widens as the sketch gets coarser.
The representation-shift CIFAR-10 task decides the last-layer question.
If time permits, a final check applies the same sandwich to Nyström sketches in GP optimization on the Olympus materials tasks. These tasks are Perovskite, P3HT/CNT, and AgNP. There, IRGP-UCB with exact covariance is reported to find the optimum "around 42 iterations" versus at least 60 for EI and MES (Takeno et al.). The question is whether a sketched version preserves that advantage.
References
- Gaussian Process Optimization with Adaptive Sketching: Scalable and No Regret
- Efficient Kernelized UCB for Contextual Bandits
- Randomized Gaussian Process Upper Confidence Bound with Tighter Bayesian Regret Bounds
- Neural Contextual Bandits with UCB-based Exploration
- Old Dog Learns New Tricks: Randomized UCB for Bandit Problems
- SLANG: Fast Structured Covariance Approximations for Bayesian Deep Learning with Natural Gradient
- Learning Neural Contextual Bandits through Perturbed Rewards
- Bayes without Underfitting: Fully Correlated Deep Learning Posteriors via Alternating Projections
- VIKING: Deep variational inference with stochastic projections
- Liberty or Depth: Deep Bayesian Neural Nets Do Not Need Complex Weight Posterior Approximations
- Variance-Aware Linear UCB with Deep Representation for Neural Contextual Bandits
- Neural Thompson Sampling
- Active Learning for Level Set Estimation Using Randomized Straddle Algorithms