0
$\begingroup$

Suppose we want to perform importance sampling where we have trajectories from some behavioral policy $b$, but we want to perform off-policy evaluation. From these prior questions, I understand that importance sampling can be useful because we can easily sample from and evaluate the target policy $\pi$, while it is hard (or no longer possible) to sample from the original policy $b$. This is given by:

$$E_{x \sim \pi}[f(x)] \approx \frac{1}{n} \sum_{i=1}^n f(x_i) \frac{\pi(x_i)}{b(x_i)} $$

where the original trajectories $x_i$ were from $b$, but have now been reweighted as if they came from $\pi$.

However, if we no longer have access to sample from policy $b$, then how would we hope to easily evaluate the probability of some $x$ using policy $b$? Conversely, if we are able to easily evaluate $b(x_i)$, how come we can't sample from it? I'm especially interested in real-life examples where the probability distribution is not Poisson, Gaussian or some simple Bayes Net. For example, the probability distribution could be related to recognizing cats in images, dialogue generation or question answering.

$\endgroup$
3
  • 2
    $\begingroup$ You might be a bit confused. In IS, we always assume access to some distribution $b$ that is e.g. easier to sample from than the target $\pi$. This is the whole point of IS. In RL it also has the use case of using a highly exploratory policy to generate actions, but again this only works if we have access to the distribution, so in your question we would never ‘lose access’ to such a policy. $\endgroup$
    – David
    Commented Jul 31, 2022 at 9:28
  • $\begingroup$ I updated the text for clarity, did I mix up the behavioral and target policy? I know that at least one of them is not available for sampling from during test time. $\endgroup$ Commented Aug 1, 2022 at 15:37
  • $\begingroup$ You seem to be confusing why IS is useful. If you can easily evaluate $\pi$ then the main reason (in RL context) to use IS is for more exploration. To do this you’d use exploratory policy $b$ as you’ve mentioned, but you would never lose access to this. The IS sampling policy is always user chosen so you would never lose access to it. $\endgroup$
    – David
    Commented Aug 1, 2022 at 21:24

0

You must log in to answer this question.