NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Bandits via Additive Quantized Representations

Ami Tavory, Noam Touitou, Tal Sarig, Frank Cheng, Ido GuyNeurIPS 2026

TL;DR

Real-time decision systems (contextual bandits) usually force you into an uncomfortable binary choice: fast, fixed-memory models that can only learn straight lines, or expressive nonlinear models (like neural nets and tree ensembles) that choke on ever-growing memory buffers. By borrowing a data compression trick from vector search called Residual Quantization (RQ), the authors build an additive, gradient-boosted bandit representation. The result? Nonlinear predictive power that updates instantly in strictly constant $O(1)$ memory—matching heavy-duty XGBoost and neural baselines at up to 1,000× less memory.

What Problem Does This Paper Address?

Imagine an algorithm recommending articles or tuning server parameters on the fly. In this contextual bandit setting, the agent sees a context (e.g., user features), picks an action, gets a reward, and learns immediately—one interaction at a time.

Practitioners have long been stuck between two regimes:

  1. Linear bandits (like LinTS or LinUCB) update effortlessly per observation using fixed $O(1)$ memory. The catch? Real-world rewards are rarely linear functions of raw features.
  2. Tree ensembles and neural networks capture messy, nonlinear reward landscapes beautifully. However, because they can't easily update from single streaming points without forgetting, they rely on storing past interactions in a "replay buffer" and periodically retraining from scratch. Over millions of rounds, memory balloons linearly ($O(T)$)—easily exceeding gigabytes—while retraining causes spiky latency.

The authors tackle the missing middle ground: how do we get rich, nonlinear reward modeling at a strictly fixed, tiny memory cost?

Methods

The core innovation is repurposing Residual Quantization (RQ)—originally invented for fast nearest-neighbor retrieval—into an online, gradient-boosted representation layer.

  1. Offline Codebook Compression: Assuming unlabeled context vectors are cheap and plentiful (e.g., existing user profiles), the authors run sequential $k$-means offline to build an $\ell$-level codebook with $b$ centroids per level, then freeze it. A continuous context $x$ is mapped to its nearest centroid at level 1; level 2 quantizes the error residual left over from level 1, and so on.
  2. Gradient-Boosted Bandits: During live interaction, each quantization level hosts simple per-centroid bandit learners. Level 1 predicts the raw reward; deeper levels predict the pseudo-target—the gap between the actual observed reward and the sum of predictions from shallower levels.
  3. Three Flavors: Swapping the base learner yields a clean spectrum of variants: TS-RQ (simple scalar reward counters per centroid), SGD-LinTS-RQ (diagonal linear models on context residuals), and LinTS-RQ (full-covariance linear Thompson Sampling).
  4. Online "Shadow" Depth Adaptation: How deep ($\ell$) should the hierarchy go? The algorithm starts shallow and trains one extra "shadow" level silently in the background. Because the shadow never picks actions, it doesn't hurt live performance. At pre-set intervals, a martingale statistical test checks if the shadow genuinely improves predictions; if it passes, it gets promoted to active duty and a new shadow is spawned.

Datasets

Following standard supervised-to-bandit conversion protocols (reward 1 for the true class, 0 otherwise), the authors evaluate on 13 public tabular datasets from OpenML and UCI (including higgs, susy, covertype, kddcup99, skin_segmentation, and year_prediction). Dataset sizes range from 130K to 11M interactions, spanning 3 to 90 features and 2 to 104 actions. For every dataset, 50K unlabeled contexts are held out to train the RQ codebook (and representation baselines like TabNet), leaving the rest for online evaluation. No new benchmarks are introduced.

Key Insights and Ideas

  • Compressing Exploration, Not Just Storage: If you slice a feature space into $b^\ell$ fine-grained cells and learn each independently, data fragments and cells starve. With an additive RQ hierarchy, $b^\ell$ effective cells are represented using only $\ell b$ shared parameters. One observation updates $\ell$ centroids simultaneously, pooling statistical strength across the space.
Figure 1: Partitioning the context space creates nonlinear reward models from linear per-cell learners, but finer partitions fragment the data: each cell sees fewer observations. All three schemes realize bℓ=64 cells (b=4, ℓ=3). Top/Bottom left: Flat and factorial parameterizations learn each cell from its own data alone. Bottom right: Additive RQ achieves the same 64-cell granularity with ℓb=12 shared parameters—each observation updates ℓ=3 centroids, pooling information across cells. Fine partition without data starvation.
  • A Pre-Flight Diagnostic for Data Starvation: Full-covariance LinTS-RQ maintains $bKd^2$ parameters ($K$ arms, $d$ features). The authors identify a crisp threshold: $N / (bKd^2)$, measuring total contexts per parameter—computable before deploying the bandit. Whenever this ratio exceeds ~1, LinTS-RQ thrives; when it drops far below 1, covariance matrices starve, signaling you should switch to lightweight TS-RQ.
  • Geometry Beats Bad Covariance Assumptions: On datasets where variance lies mostly along a single axis (low effective rank), diagonal linear models waste parameters fitting noise on irrelevant coordinates—performing worse than ignoring context altogether! TS-RQ sidesteps covariance estimation completely, letting k-means centroid placement naturally hug the data manifold.

Key Results

All hyperparameters were fixed across all 13 datasets with zero per-dataset tuning (30 seeds each):

  • Consistent Within-Family Wins: Adding RQ beats standard baselines by wide margins: LinTS-RQ wins 10/13 (2 ties, 1 loss), SGD-LinTS-RQ wins 12/13, and TS-RQ beats context-free TS on 11/13—slashing regret by up to 96–97% on datasets like skin_segmentation and kddcup99.
  • 1,000× Memory Savings vs. Replay Models: LinTS-RQ goes toe-to-toe with doubling-retrain XGBoost (7 wins, 4 losses, 2 ties) and beats pretrained TabNet-LinTS on 11/13 datasets. At $T=5\text{M}$ rounds on higgs, XGBoost's replay buffer eats 1.1 GB of RAM, whereas LinTS-RQ uses a flat 620 KB (TS-RQ uses just 12 KB at 50–750 $\mu$s per step).
Figure 3: Memory vs. quality across 13 datasets. Each point is one (method, dataset) pair. Hollow gray: linear baselines (O(1) memory, high regret). Solid gray: RQ methods (O(1) memory, low regret). Red: doubling methods (O(T) replay buffers, low regret). RQ methods match tree/neural regret at 1000× less memory. The vertical drop from hollow to solid at the same x-position shows the regret gain from the RQ codebook.

Limitations and Future Work

  • High-Dimensional Action/Feature Starvation: When $d$ and $K$ are both large (e.g., year_prediction with $d=90, K=84$, where $N/(bKd^2) = 0.04$), LinTS-RQ degrades due to parameter starvation. Projecting residuals onto $p \ll d$ dimensions via PCA could relax this bottleneck.
  • Cold-Start & Unsupervised Splits: The frozen codebook requires an offline unlabeled pool, meaning it may struggle in strict cold-start or shifting-distribution regimes. Furthermore, $k$-means minimizes reconstruction error rather than reward error; incorporating reward-aware splits or online codebook adaptation are natural next steps.
  • Squared Loss on Binary Rewards: Linear variants currently fit binary $\{0,1\}$ rewards using squared loss, occasionally causing overconfident exploration on skewed classes—something Pólya-Gamma augmentation could resolve.

Summary updated

BibTeX
@inproceedings{tavory2026bandits,
  author = {Ami Tavory and Noam Touitou and Tal Sarig and Frank Cheng and Ido Guy},
  title = {{Bandits via Additive Quantized Representations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=7n363oEuwb},
}
Figure