Off-Policy Evaluation in Embedded Spaces

Jaron J. R. Lee, David Arbour, Georgios TheocharousarXiv 2022

Abstract

Off-policy evaluation methods are important in recommendation systems and search engines, where data collected under an existing logging policy is used to estimate the performance of a new proposed policy. A common approach to this problem is weighting, where data is weighted by a density ratio between the probability of actions given contexts in the target and logged policies. In practice, two issues often arise. First, many problems have very large action spaces and we may not observe rewards for most actions, and so in finite samples we may encounter a positivity violation. Second, many recommendation systems are not probabilistic and so having access to logging and target policy densities may not be feasible. To address these issues, we introduce the featurized embedded permutation weighting estimator. The estimator computes the density ratio in an action embedding space, which reduces the possibility of positivity violations. The density ratio is computed leveraging recent advances in normalizing flows and density ratio estimation as a classification problem, in order to obtain estimates which are feasible in practice.

Introduction

In recommendation systems and search engines, evaluating a new algorithm (the target policy) before deployment is critical. Ideally, researchers use historical data from a current algorithm (the logging policy) to estimate performance, a process known as Off-Policy Evaluation (OPE). However, standard methods like Inverse Propensity Weighting (IPW) face significant hurdles in production environments.

The first challenge is the positivity violation. In systems with millions of items, the logging policy rarely explores the entire action space. If a target policy recommends an item never seen in the logs, the zero probability in the denominator makes standard IPW mathematically impossible. The second challenge is the black box problem. Modern systems often use complex neural networks that output a single deterministic "best" item rather than a probability distribution, making the required density ratios unknown.

Methodology: The FEPWS Estimator

To overcome these limitations, we propose the Featurized Embedded Permutation Weighting Self-normalized (FEPWS) estimator. This approach integrates three core components: action embeddings, density ratio estimation via classification, and normalizing flows.

Action Embeddings

Instead of treating items as discrete IDs, we map them into a continuous embedding space (e.g., via word2vec or CLIP). By treating similar items as being close in vector space, the estimator can "fill in the gaps" for actions that were never explicitly observed in the logging data, effectively smoothing the action space and reducing variance.

Normalizing Flows and Density Ratios

Estimating density ratios directly is difficult when logging and target policies have low overlap in the embedding space. We utilize Normalizing Flows—a type of generative model—to invertibly transform the embedding space into a simplified, overlapping distribution.

Normalizing Flows transform disparate logging and target densities into a shared, overlapping space to improve density ratio estimation.

As shown in the figure above, the flow reshapes the "distant clouds" of the logging and target densities into a unified space. Within this transformed space, we treat the density ratio estimation as a binary classification task. By training a classifier to distinguish between samples from the two policies, we can derive the importance weights necessary for OPE.

Experimental Evaluation

We evaluated the FEPWS estimator across two distinct environments:

  1. Toy Simulation: Using a synthetic benchmark, we tested the limits of the estimator by varying action space sizes. While standard IPW failed once the action space exceeded 500 items due to positivity violations, the embedded estimators remained stable and accurate.
  2. Behance Dataset: We applied the method to a real-world dataset containing 1 million "likes" across 179,000 items. Using 4096-dimensional image embeddings (compressed to 4D for tractability), we demonstrated that the approach scales to production-level item catalogs.

Key Insights and Results

Our results highlight several advantages of the embedded approach:

  • Robustness to Scale: The use of embeddings allows the model to handle massive action spaces where traditional methods fail completely.
  • The Flow Advantage: The "Featurized" version (FEPWS) consistently outperformed basic embedded versions. Reshaping the space via Normalizing Flows significantly reduced the Root Mean Square Error (RMSE), particularly in low-overlap scenarios where the target policy is very different from the logging policy.
  • Handling Deterministic Systems: The classifier-based smoothing provides a theoretical bridge for evaluating deterministic systems that traditional OPE struggles to justify mathematically.

Conclusion

The FEPWS estimator provides a robust framework for OPE in large-scale, non-probabilistic systems. While the method's accuracy depends on the quality of the action embeddings, it offers a viable path for evaluating complex recommendation policies without the risks of live A/B testing. Future work will focus on quantifying the bias introduced by continuous extrapolation and improving the scalability of high-dimensional embedding transformations.

Summary updated

BibTeX
@misc{lee2022off,
  author = {Jaron J. R. Lee and David Arbour and Georgios Theocharous},
  title = {{Off-Policy Evaluation in Embedded Spaces}},
  year = {2022},
  eprint = {2203.02807},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.02807},
}
Figure