Spectral bandits

Tomáš Kocák, Rémi Munos, Branislav Kveton, Shipra Agrawal, Michal ValkoarXiv 2026

TL;DR

Recommending items when the number of choices is massive is a classic multi-armed bandit challenge. This paper introduces Spectral Bandits, a framework that leverages graph-structured relationships between items to drastically accelerate online learning. By defining a novel "effective dimension," the authors demonstrate that high-quality user preference models can be learned from just tens of interactions, even across thousands of items.

What Problem Does This Paper Address?

Standard multi-armed bandit (MAB) algorithms face a fundamental scalability bottleneck: to find the best option, they typically need to try every single arm at least once. In modern applications like content recommendation or targeted advertising, the number of items (arms) $N$ can be in the thousands or millions, while the time horizon $T$ (the budget for interactions) is much smaller ($T \ll N$).

Linear bandits mitigate this by using feature vectors, but their performance still scales with the ambient feature dimension $D$. This paper tackles the challenge of online learning when items are embedded in a known graph structure (e.g., a social network or an item-to-item similarity graph). The core assumption is smoothness: neighboring nodes on the graph tend to have similar payoffs. The goal is to design algorithms whose cumulative regret scales with the underlying connectivity structure of the graph rather than the total number of nodes.

Methods

The authors elegantly bridge graph signal processing and bandit algorithms. They model the expected reward function as a smooth function over an undirected graph. Using the graph Laplacian ($\mathcal{L}$), they show that any smooth function can be represented as a linear combination of the Laplacian's eigenvectors corresponding to the smallest eigenvalues.

The paper introduces several key contributions:

  1. Effective Dimension ($d$): A novel, tighter definition of the graph's dimensionality that depends on the graph's eigenvalues and the time horizon $T$. In real-world graphs, $d \ll N$.
  2. SpectralUCB: An upper confidence bound algorithm that applies a spectral penalty (regularization) to prioritize smooth reward functions, using confidence widths derived from the effective dimension.
  3. SpectralTS: A Thompson Sampling variant that samples coefficients from a Gaussian posterior over the graph's eigenbasis.
  4. SpectralEliminator: A phase-based elimination algorithm designed to achieve the minimax-optimal regret bound.

To make these algorithms practical for massive graphs, the authors incorporate scalability techniques: lazy updates to avoid recomputing UCBs for all arms every round, the Sherman-Morrison formula for fast rank-one matrix inversions, and a reduced basis method that utilizes only the top $L \ll N$ eigenvectors.

Datasets

The algorithms were evaluated on both synthetic and real-world datasets:

  • Synthetic Graphs: Lattice graphs, Erdős-Rényi random graphs, and Barabási-Albert scale-free graphs.
  • Real-World Recommendation Datasets:
  • MovieLens (1M): A subset consisting of 400 users and 618 movies with a 5-nearest-neighbor similarity graph constructed via low-rank matrix factorization.
  • Flixster: A dataset of 972 movies and 1070 users, structured similarly with a 5-NN graph.
  • LastFM: Used to validate the behavior of the effective dimension over time.

Key Insights and Ideas

  • Smoothness Equals Low Frequencies: Just like in traditional signal processing, smooth functions on graphs are dominated by low-frequency components. Eigenvectors associated with smaller eigenvalues vary slowly across neighbors, providing a natural basis for generalization.
Figure 1: Eigenvectors from the Flixster dataset corresponding to the smallest few eigenval- ues projected onto the first principal component of the data; x-axis represents components of the eigenvector sorted according to the projection onto the first principal component of the data while y-axis represent the value of the corresponding component of the eigenvec- tor. To produce the figure above, we performed the following steps. (1) Preprocessing: We remove all the users that rated a small number of movies as well as the movies rated by only a few users. This leaves us with a u × m matrix M where u is the number of users and m is the number of movies and entry Mi, j of matrix M is the rating of movie j by user i, provided it exists. Note that matrix M might be missing some of the entries. (2) Filling in the missing entries: For this step, we use low-rank matrix factorization (Keshavan et al., 2009) to obtain u × r matrix U and m × r matrix V, for some given rank r, such that M ≈UVT. (3) Constructing a similarity graph: We construct the graph by creating an edge between movies i and j if the movie j is among 5 nearest neighbors of the movie i in the latent space of movies V. (4) Visualization: Using the computed matrix V, the matrix capturing the latent space of movies, we can find the direction of the highest variance of the data using PCA on V. This gives us a way to visualize eigenvectors by projecting them on the first principal component. The above visualization shows that the eigenvectors corre- sponding to smaller eigenvalues tend to be smoother—the values corresponding to actions with their projections close to each other are similar. On the other hand, the eigenvectors corresponding to larger eigenvalues are more chaotic as values for nearby items can vary a lot. This gives a small insight into why a function created as a linear combination of the first few eigenvectors is a smooth reward function. We are more precise about the definition of smoothness and the connection of smooth functions and eigenvectors later in Section 4.
  • The Power of Effective Dimension: Instead of scaling with the massive number of items $N$, the regret of spectral bandits scales with the effective dimension $d$. For real-world graphs, $d$ remains remarkably small and grows sublinearly over time, meaning the algorithm quickly "bounds" its uncertainty.
  • The 10% Rule for Scalability: You don't need the full graph decomposition. The authors demonstrate that keeping only the first 10% of the eigenvectors ($L \approx 0.1N$) yields virtually identical recommendation accuracy while reducing the computational runtime exponentially.

Key Results

  • Theoretical Bounds: The authors prove that SpectralUCB achieves a cumulative regret bound of $\widetilde{O}(d\sqrt{T})$, and SpectralTS achieves $\widetilde{O}(d\sqrt{T}\sqrt{\log N})$. Crucially, SpectralEliminator achieves the minimax-optimal regret of $\widetilde{O}(\sqrt{dT})$, completely removing the linear dependence on $d$ from the leading term.
  • Empirical Performance: On both MovieLens and Flixster, SpectralUCB and SpectralTS consistently and significantly outperformed standard linear bandit baselines (LinUCB and LinearTS). The spectral algorithms successfully generalized user preferences across thousands of items after observing only a few dozen feedback rounds.

Limitations and Future Work

  • SpectralEliminator's Practicality: Despite possessing the best theoretical regret bound, SpectralEliminator is impractical for real-world deployment over short horizons. Because it operates in rigid phases and only updates its confidence ellipsoids at the end of a phase, it suffers from high initialization overhead.
  • Graph Construction Dependency: The framework assumes a high-quality graph is given a priori. When a natural graph structure does not exist, constructing one (e.g., via k-NN in a latent space) introduces a sensitive trade-off: reducing neighbors increases the effective dimension but can degrade the smoothness of the reward function. Exploring online graph learning alongside bandit optimization remains an open frontier.

Summary updated

BibTeX
@misc{kocak2026spectral,
  author = {Tomáš Kocák and Rémi Munos and Branislav Kveton and Shipra Agrawal and Michal Valko},
  title = {{Spectral bandits}},
  year = {2026},
  eprint = {2604.25272},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.25272},
}
Figure