Latent Contextual Bandits

Rajat Sen, Karthikeyan Shanmugam, Murat Kocaoglu, Alexandros G. Dimakis, Sanjay Shakkottai

Abstract

Motivated by online recommendation and advertising systems, we consider a causal model for stochastic contextual bandits with a latent low-dimensional confounder. In our model, there are $L$ observed contexts and $K$ arms of the bandit. The observed context influences the reward obtained through a latent confounder variable with cardinality $m$ ($m \ll L,K$). The arm choice and the latent confounder causally determines the reward while the observed context is correlated with the confounder. Under this model, the $L \times K$ mean reward matrix $\mathbf{U}$ (for each context in $[L]$ and each arm in $[K]$) factorizes into non-negative factors $\mathbf{A}$ ($L \times m$) and $\mathbf{W}$ ($m \times K$). This insight enables us to propose an $\epsilon$-greedy NMF-Bandit algorithm that designs a sequence of interventions (selecting specific arms), that achieves a balance between learning this low-dimensional structure and selecting the best arm to minimize regret. Our algorithm achieves a regret of $\mathcal{O}\left(L\mathrm{poly}(m, \log K) \log T \right)$ at time $T$, as compared to $\mathcal{O}(LK\log T)$ for conventional contextual bandits, assuming a constant gap between the best arm and the rest for each context. These guarantees are obtained under mild sufficiency conditions on the factors that are weaker versions of the well-known Statistical RIP condition. We further propose a class of generative models that satisfy our sufficient conditions, and derive a lower bound of $\mathcal{O}\left(Km\log T\right)$. These are the first regret guarantees for online matrix completion with bandit feedback, when the rank is greater than one. We further compare the performance of our algorithm with the state of the art, on synthetic and real world data-sets.

Introduction

In the classic contextual bandit setting, an algorithm observes a context (e.g., a user's profile), chooses an arm (e.g., an ad or movie), and receives a reward. To minimize "regret"—the difference between the rewards of the chosen arms and the rewards of the theoretically best arms—standard algorithms typically need to learn the expected reward for every context-arm pair.

However, modern systems like Netflix or Amazon face the curse of dimensionality, with millions of contexts ($L$) and thousands of arms ($K$). Learning all $L \times K$ parameters is prohibitively slow, leading to a regret that scales as $O(LK \log T)$. This paper addresses this by assuming a latent structure: while there are many users, their preferences are driven by a few ($m$) "latent contexts."

The Latent Contextual Bandit Model

The core assumption is that the $L \times K$ mean reward matrix $\mathbf{U}$ factorizes into two non-negative matrices: $\mathbf{A}$ ($L \times m$) and $\mathbf{W}$ ($m \times K$).

Mapping of observed user accounts to latent categories (Matrix A).

As illustrated in the table above, an observed context (User account) can be represented as a convex combination of latent types, such as "Adult" and "Teenager." This mapping is captured by matrix $\mathbf{A}$.

Expected rewards for latent categories across different genres (Matrix W).

The second matrix, $\mathbf{W}$, maps these latent types to expected rewards for each arm (e.g., movie genres like Animation or Action). By learning these smaller matrices, the algorithm reduces the complexity of the problem from $L \times K$ to $L \times m + m \times K$. This approach leverages the geometry of the context space rather than brute-force estimation.

The NMF-Bandit Algorithm

The proposed $\epsilon$-greedy NMF-Bandit algorithm alternates between exploration and exploitation to learn this structure:

  1. Low-Dimensional Exploration (Estimating $A$): The algorithm occasionally pulls arms from a small, fixed subset. It uses these samples to reconstruct the matrix $\mathbf{A}$ using a robust version of the Hottopix algorithm, a linear programming approach for Non-negative Matrix Factorization (NMF). This relies on a "separability condition"—the existence of "pure" contexts—which makes the factorization computationally tractable.
  2. Reward Estimation (Estimating $W$): Once $\mathbf{A}$ is estimated, the algorithm pulls different sets of arms to solve for $\mathbf{W}$ using systems of linear equations.
  3. Exploitation: For the majority of the time, the algorithm uses its current estimates of $\mathbf{A}$ and $\mathbf{W}$ to predict the best arm for the current context and pulls it.

A key theoretical contribution is the use of Random Singular Value Properties (RSVP). These are randomized versions of the Restricted Isometry Property (RIP) from compressed sensing, used here to prove that NMF can succeed even when we only see a tiny, noisy fraction of the reward matrix.

Key Results and Empirical Performance

  • Theoretical Regret: The NMF-Bandit achieves a regret of $O(L \cdot \text{poly}(m, \log K) \log T)$. This is the first regret guarantee for online matrix completion with bandit feedback for a rank greater than one.
  • Lower Bound: The authors derive a problem-specific lower bound of $\Omega(Km \log T)$, showing that their upper bound is nearly optimal (within polynomial factors of $m$ and $\log K$).
  • Empirical Performance: The authors evaluate the algorithm using synthetic datasets with Uniform and Bernoulli rewards (e.g., $L=455, K=210, m=7$). In simulations, NMF-Bandit significantly outperformed contextual versions of UCB-1 and Thompson Sampling. While standard algorithms were still stuck in the early "exploration" phase (linear regret), NMF-Bandit quickly identified the latent structure and entered the efficient "logarithmic" regret regime.

Conclusion

The NMF-Bandit leverages the geometric structure of user preferences to bypass the curse of dimensionality. While it assumes a known latent dimension $m$ and a "separability condition," it provides a powerful framework for large-scale recommendation systems where $m \ll K$. Future work may address the linear dependence on $L$ by exploring user clustering or more complex latent models.

Summary updated

BibTeX
@inproceedings{sen2017latent,
  author = {Rajat Sen and Karthikeyan Shanmugam and Murat Kocaoglu and Alexandros G. Dimakis and Sanjay Shakkottai},
  title = {{Latent Contextual Bandits}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2017},
  url = {https://openreview.net/forum?id=0U_OhtMTls},
}
Figure