Contextual Bandits with Latent Confounders: An NMF Approach

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

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 modern digital ecosystems, recommendation and advertising systems rely heavily on contextual bandits to personalize content. A contextual bandit algorithm observes a user's context (e.g., browsing history or demographics) and selects an "arm" (e.g., an ad or movie) to maximize cumulative reward. However, standard approaches face a significant "curse of dimensionality." The regret of traditional algorithms typically scales with the product of the number of contexts ($L$) and the number of arms ($K$). In large-scale systems like Netflix or Amazon, where $L$ and $K$ can reach millions, this linear scaling ($LK$) makes learning prohibitively slow and inefficient, as the system treats every user-item pair as a novel learning problem.

Causal Model and Methodology

This paper addresses the scalability issue by positing that user behavior is governed by a small number ($m$) of latent confounders. Instead of treating every interaction as independent, the authors model the reward structure through a causal lens where the observed context is correlated with a latent variable $Z$. This variable represents hidden factors like user "moods" or broad interest categories.

Causal graphs for (a) regular contextual bandits and (b) contextual bandits with latent confounders.

As illustrated in Figure 2, the standard model (a) assumes a direct relationship between context $S$ and reward $Y$. In contrast, the proposed model (b) introduces a latent confounder $Z$ that influences both the context and the reward. This structure implies that the $L \times K$ mean reward matrix $\mathbf{U}$ factorizes into two non-negative factors: $\mathbf{A}$ ($L \times m$) representing context-to-latent mappings, and $\mathbf{W}$ ($m \times K$) representing latent-to-reward mappings.

To exploit this low-rank structure, the authors introduce the NMF-Bandit algorithm. This algorithm utilizes an $\epsilon$-greedy strategy combined with Non-negative Matrix Factorization (NMF) techniques. The learning process is split into structured exploration phases:

  1. Context Mapping Estimation: By sampling a fixed subset of arms, the algorithm uses a robust version of the Hottopix solver to recover the context factor matrix $\mathbf{A}$.
  2. Reward Mapping Estimation: It then samples context-dependent arms to estimate the latent factor matrix $\mathbf{W}$.
  3. Exploitation: The estimated matrices $\hat{\mathbf{A}}$ and $\hat{\mathbf{W}}$ are used to predict rewards for all arms, allowing the system to select the optimal action based on the reconstructed reward matrix.

Theoretical and Empirical Results

The primary theoretical contribution is a regret bound of $\mathcal{O}(L \text{ poly}(m, \log K) \log T)$. This represents a massive efficiency gain over the standard $\mathcal{O}(LK \log T)$ bound, as $m \ll K$. These guarantees hold under a "Weak Statistical RIP" condition, which is a more relaxed and realistic version of the standard Restricted Isometry Property used in matrix completion. The authors also established a lower bound of $\mathcal{O}(Km \log T)$, indicating that NMF-Bandit operates near the fundamental limits of the problem.

Empirically, the algorithm was tested on synthetic data and real-world benchmarks, including MovieLens 1M (6,000 users, 4,000 movies) and the Book Crossing dataset. In these experiments, NMF-Bandit significantly outperformed traditional UCB-1 and Thompson Sampling. While standard methods suffered from linear regret due to the massive parameter space, NMF-Bandit successfully leveraged the latent structure to achieve sub-linear regret quickly.

Conclusion and Future Directions

The integration of causal inference with matrix factorization provides a powerful framework for recommendation systems. By identifying "pure" contexts that represent latent factors, the model can generalize across millions of users. However, several avenues for future research remain. The current model assumes the latent dimension $m$ is known and that the environment is stationary. Extending this NMF approach to dynamic, non-stationary settings and developing methods for online rank estimation are critical next steps for deploying these causal bandit models in production environments.

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