Semi-Counterfactual Risk Minimization Via Neural Networks

Gholamali Aminian, Roberto Vega, Omar Rivasplata, Laura Toni, Miguel R. D. Rodrigues · OpenReview

Abstract

Counterfactual risk minimization (CRM) provides a robust framework for offline policy optimization using logged data. However, standard CRM assumes that every sample point includes a recorded reward. In many real-world applications, such as digital advertising and healthcare, feedback is frequently missing due to system failures or the high cost of observation. This paper introduces the Semi-supervised Batch Learning (S2BL) framework to address this gap. By deriving new theoretical upper bounds on the true risk under the inverse propensity score (IPS) estimator, we demonstrate that samples with unknown rewards can be leveraged for regularization. We propose two algorithms, KL-S2BL and WCE-S2BL, which utilize reward-independent regularization to improve policy performance. Experimental results on benchmark datasets and real-world recommendation logs show that these methods significantly outperform standard off-policy approaches when feedback is scarce.

Introduction

In off-policy learning, the goal is to optimize a new policy using data generated by a different, pre-existing "logging policy." A typical dataset consists of the context, the action taken, the propensity score (the probability of that action under the logging policy), and the resulting reward. While traditional Counterfactual Risk Minimization (CRM) has proven effective in these settings, it relies heavily on the availability of reward signals for all logged events.

In practice, feedback is often incomplete. For instance, a user might interact with a recommendation system, but the outcome (a click or purchase) might not be recorded due to session timeouts or tracking errors. Most existing algorithms simply discard these "silent" samples, losing valuable information about the logging policy's behavior and the distribution of contexts. This work explores semi-counterfactual risk minimization, asking whether we can utilize these unlabeled samples to build more robust and accurate policies.

Theoretical Framework: Beyond Reward-Dependent Variance

The core challenge in CRM is managing the variance of the Inverse Propensity Score (IPS) estimator. Standard CRM techniques regularize the model using an empirical variance term, which inherently requires knowledge of the reward for every sample.

To overcome this, we derive a new theoretical upper bound on the true risk. We prove that the variance of a truncated IPS estimator can be bounded by the Kullback-Leibler (KL) divergence (or reverse KL divergence) between the target policy and the logging policy. Crucially, these KL terms are reward-independent. This allows us to use the entire logged dataset—including samples where the reward is missing—to regularize the learning process. By minimizing these bounds, we effectively control the estimator's variance using all available contextual information.

Proposed Algorithms

Building on this theoretical foundation, we introduce two primary algorithms designed for semi-supervised off-policy learning:

  1. KL-S2BL: This method uses the standard KL divergence between the target policy and the logging policy as a regularizer. It encourages the new policy to stay within the "support" of the logging policy, preventing the model from over-fitting to high-reward samples with low propensity scores.
  2. WCE-S2BL: This method utilizes the reverse KL divergence, which manifests as a Weighted Cross-Entropy (WCE) loss. WCE-S2BL is often more robust in practice, as it allows the model to explore actions that the logging policy might have taken with low probability, provided the evidence from the labeled data justifies it.

Additionally, we explore a pseudo-reward approach where a model is trained to predict missing rewards, though the KL-based regularization methods provide more rigorous theoretical guarantees.

Experimental Results

We evaluated our approach using both simulated bandit environments and real-world datasets. To simulate missing feedback, we "hid" rewards for varying percentages of the data, ranging from 20% to as little as 2% available feedback.

Benchmark Simulations

Using image classification datasets (Fashion-MNIST, CIFAR-10, EMNIST, and CIFAR-100) transformed into bandit problems, we compared S2BL against BanditNet, a standard CRM baseline.

  • Performance under Scarcity: On CIFAR-10 with only 20% of rewards available and a noisy logging policy, WCE-S2BL achieved 69.40% accuracy, significantly outperforming BanditNet’s 50.38%.
  • Stability: As the proportion of labeled data decreased, the performance of standard CRM methods decayed rapidly. In contrast, the S2BL methods remained remarkably stable, demonstrating the power of leveraging unlabeled contexts to maintain policy integrity.

Real-World Recommendation

We further tested the algorithms on KuaiRec, a large-scale dataset of human-video interactions. In this high-dimensional setting, WCE-S2BL consistently achieved higher empirical IPS scores than the baseline across all levels of feedback availability. This confirms that the reward-independent regularizers derived from our risk bounds translate effectively to complex, real-world recommendation tasks.

Discussion and Conclusion

The success of S2BL highlights a critical insight: even without a reward, a logged sample provides information about the logging policy’s decision-making process in a specific context. By using KL-based regularization, we can prevent "propensity overfitting"—a common failure mode where a policy becomes overly confident in actions that had high rewards in a small sample size but high variance.

While this work assumes access to accurate propensity scores, future research could extend these semi-supervised techniques to settings where propensities must be estimated from the data itself. Furthermore, while we focused on one-step contextual bandits, the principles of reward-independent variance reduction offer a promising path for multi-step Reinforcement Learning in data-constrained environments.

Summary updated

BibTeX
@misc{aminian2022semi,
  author = {Gholamali Aminian and Roberto Vega and Omar Rivasplata and Laura Toni and Miguel R. D. Rodrigues},
  title = {{Semi-Counterfactual Risk Minimization Via Neural Networks}},
  year = {2022},
  eprint = {2209.07148},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2209.07148},
}
Figure