Contextual Bandits with Latent Confounders: An NMF Approach

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$ contexts and $K$ arms, but the rewards are driven by $m \ll K$ latent factors. We propose NMF-Bandit, an algorithm that leverages Non-negative Matrix Factorization to achieve regret scaling with the latent dimension $m$ rather than the number of arms $K$.

Introduction

In large-scale recommendation systems like Netflix or Amazon, the number of users ($L$) and items ($K$) is often in the millions. Standard contextual bandit algorithms face a significant bottleneck: their performance—measured by "regret"—typically scales with the product $L \times K$. Learning individual preferences for every user-item pair from scratch is computationally and statistically prohibitive in such high-dimensional spaces.

However, user preferences are rarely arbitrary. They are typically driven by a small number of latent factors, such as "moods" or "genres." This paper introduces a framework that models these hidden, low-dimensional confounders to break the dimensionality curse in contextual bandits, allowing for faster learning and more accurate recommendations.

Causal Modeling and Methodology

The authors propose a causal model where a latent variable $Z$ (the confounder) influences both the observed context $S$ and the reward $Y$. This structure is illustrated in the causal graph below:

Causal graph with a latent confounder Z influencing context S and reward Y.

Under this model, the $L \times K$ mean reward matrix $U$ can be factorized into two non-negative matrices: $U = AW$, where $A \in \mathbb{R}^{L \times m}$ maps contexts to latent factors, and $W \in \mathbb{R}^{m \times K}$ maps these factors to arm rewards.

The proposed NMF-Bandit algorithm follows an $\epsilon$-greedy strategy with two distinct phases:

  1. Exploration: The algorithm performs strategic interventions to estimate $A$ and $W$. It utilizes a robust version of the Hottopix algorithm for NMF, which relies on a "separability" condition—the assumption that for every latent factor, there exists at least one context that represents it purely.
  2. Exploitation: Using the estimated matrices $\hat{A}$ and $\hat{W}$, the algorithm predicts the optimal arm for the current context to minimize cumulative regret.

Empirical Evaluation and Results

The researchers evaluated NMF-Bandit against synthetic datasets and real-world benchmarks, including MovieLens 1M and Book Crossing. Theoretical analysis proves that NMF-Bandit achieves a regret bound of $O(L \cdot \text{poly}(m) \log T)$, a massive improvement over the $O(LK \log T)$ scaling of traditional methods when $m \ll K$.

Cumulative regret (RT) vs. Number of Samples (T) comparing NMF-Bandit against standard contextual bandit baselines.

As shown in the results, NMF-Bandit enters the sub-linear regret regime significantly faster than contextual versions of UCB-1 and Thompson Sampling. On real-world preference data, the algorithm consistently outperformed state-of-the-art benchmarks, validating the effectiveness of the latent "mood" model in capturing the underlying structure of user preferences.

Conclusion

By framing latent factors as confounders in a causal graph, this work provides a rigorous foundation for applying low-rank matrix factorization to contextual bandits. While the current approach assumes a known rank $m$ and relies on a separability condition, it represents a significant step forward in making recommendation systems more efficient. Future work may explore estimating the latent dimension dynamically and extending the model to more complex causal structures where interventions can occur on multiple variables.

Summary updated

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