Latent Contextual Bandits: A Non-Negative Matrix Factorization Approach

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

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

Modern recommendation and advertising systems operate in environments with millions of users (contexts) and items (arms). Traditional contextual bandit algorithms, which typically exhibit regret scaling linearly with the number of arms $K$ and contexts $L$, suffer from a "curse of dimensionality" that renders them impractical for such large-scale applications. However, user preferences often exhibit a low-rank structure, where thousands of observed contexts can be represented as mixtures of a few latent "types." This paper introduces a framework to exploit this latent structure using Non-Negative Matrix Factorization (NMF) to achieve significantly more efficient learning.

Problem Formulation and Causal Model

The authors propose a causal model where the reward $Y$ is determined by the chosen arm $A$ and a latent confounder $Z$. Unlike standard contextual bandits where the observed context $S$ directly influences the reward, here $S$ is correlated with the latent variable $Z$, which in turn influences $Y$.

Comparison of causal graphs for regular contextual bandits (a) and the proposed model with latent confounders (b).

In this model, the mean reward matrix $\mathbf{U} \in \mathbb{R}^{L \times K}$ factorizes as $\mathbf{U} = \mathbf{AW}$, where:

  • $\mathbf{A} \in \mathbb{R}^{L \times m}$ maps observed contexts to $m$ latent contexts. Each row represents a mixture of these latent types.
  • $\mathbf{W} \in \mathbb{R}^{m \times K}$ represents the rewards for each of the $K$ arms across the $m$ latent contexts.

The latent dimension $m$ is assumed to be much smaller than $L$ and $K$, allowing for a significant reduction in the parameters that need to be learned.

The NMF-Bandit Algorithm

The proposed NMF-Bandit algorithm employs an $\epsilon$-greedy strategy to balance exploration and exploitation:

  1. Exploration Phase: The algorithm pulls specific arms to estimate the factors $\mathbf{A}$ and $\mathbf{W}$. To estimate $\mathbf{A}$, it performs NMF on a sub-sampled reward matrix using a robust version of the Hottopix algorithm. This relies on a "separability" assumption—that for every latent context, there exists at least one "pure" observed context. Once $\mathbf{A}$ is estimated, $\mathbf{W}$ is recovered by solving a system of linear equations from new samples.
  2. Exploitation Phase: The algorithm uses the current estimates $\hat{\mathbf{A}}$ and $\hat{\mathbf{W}}$ to calculate expected rewards for all arms in the current context and selects the arm with the highest predicted value.

Theoretical and Empirical Results

The primary theoretical contribution is a regret bound of $\mathcal{O}\left(L\mathrm{poly}(m, \log K) \log T \right)$. Notably, the dependence on the number of arms $K$ is reduced from linear to logarithmic, a critical improvement for large-scale systems. These guarantees are established under mild sufficiency conditions on the factors, which represent a weakened version of the Statistical Restricted Isometry Property (RIP).

Empirical evaluations on synthetic datasets (Uniform and Bernoulli rewards) and real-world datasets demonstrate that NMF-Bandit significantly outperforms standard algorithms like UCB-1 and Thompson Sampling. While traditional methods remain in a linear regret phase due to the high dimensionality, NMF-Bandit quickly identifies the underlying low-rank structure and enters a logarithmic regret regime.

Discussion and Limitations

While NMF-Bandit provides a powerful scaling mechanism, it relies on several assumptions:

  • Known Rank: The number of latent factors $m$ is assumed to be known beforehand.
  • Separability: The algorithm requires the existence of "anchor" contexts that represent pure latent types to solve the NMF problem efficiently via linear programming.
  • Computational Cost: The NMF step involves solving linear programs, which may be computationally intensive to run frequently in high-speed production environments.

Future work could involve relaxing the separability requirement and further testing the algorithm's robustness to non-stationary user behavior in real-world environments.

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: A Non-Negative Matrix Factorization Approach}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2017},
  url = {https://openreview.net/forum?id=0U_OhtMTls},
}
Figure