---
title: Hierarchical Importance Sampling Policy Optimization
url: https://www.emergentmind.com/topics/hierarchical-importance-sampling-policy-optimization-hispo
type: topic
---

# Hierarchical Importance Sampling Policy Optimization

Searching arXiv for the specified paper and closely related context.
{"queries":[{"query":"arXiv:2112.06625 Lifelong Hyper-Policy Optimization with Multiple Importance Sampling Regularization","limit":5},{"query":"\"Lifelong Hyper-Policy Optimization with Multiple Importance Sampling Regularization\"","limit":5},{"query":"Chandak 2020 Pro-OLS Pro-WLS reinforcement learning continual arXiv","limit":5},{"query":"Al-Shedivat 2018 ONPG arXiv continual reinforcement learning","limit":5}]}
Found relevant papers on arXiv, including "Lifelong Hyper-Policy Optimization with Multiple Importance Sampling Regularization" [2112.06625]. Other related results include work associated with ONPG and continual/non-stationary RL, but the article below is grounded strictly in the provided data and cites the core source [2112.06625].
Searching specifically for the baseline papers mentioned in the source description so they can be cited precisely.
{"queries":[{"query":"Chandak Pro-OLS Pro-WLS arXiv reinforcement learning non-stationary","limit":10},{"query":"Al-Shedivat ONPG arXiv 2018 continual reinforcement learning","limit":10},{"query":"\"Pro-OLS\" reinforcement learning Chandak","limit":10},{"query":"\"ONPG\" reinforcement learning Al-Shedivat","limit":10}]}
The targeted search did not return reliable, unambiguous arXiv matches for the baseline acronyms. To avoid introducing potentially incorrect citations, the article cites the primary source [2112.06625] and names the baselines exactly as given in the provided data.
Hierarchical Importance Sampling Policy Optimization (HisPO) is a framework for lifelong reinforcement learning in settings where the dynamics continually evolve. It is introduced in “Lifelong Hyper-Policy Optimization with Multiple Importance Sampling Regularization” and learns a hyper-policy whose input is time and whose output determines the parameters of the policy to be queried at that time. The method combines a multiple-importance-sampling estimate of future performance with a past-performance term to mitigate catastrophic forgetting, and it embeds a differentiable variance bound as a penalization term to avoid overfitting the collected data. In the implementation-oriented description, HisPO is also denoted POLIS [2112.06625].

## 1. Problem formulation and hierarchical structure

HisPO is formulated in a parameter-based policy-optimization setting. At each discrete decision epoch $t$, or task index $t$, the behavioral policy $\pi_{\theta_t}(a \mid x)$ is determined by a time-conditioned hyper-policy
$$
\theta_t \sim \nu_\phi(\cdot \mid t),
$$
where $\phi \in \mathbb{R}^d$ are the hyper-parameters [2112.06625]. An equivalent representation is a deterministic mapping
$$
\theta_t = \eta_\phi(t),
$$
followed by additive exploration noise; in the description, $\nu_\phi$ is taken to be, for example, a Gaussian $N(\eta_\phi(t), \Sigma)$.

The optimization target is to learn $\phi$ so that, at each future time $t$, the induced base policy $\pi_{\theta_t}$ maximizes long-run return under smoothly changing Markov decision process dynamics. This establishes a two-level hierarchy: the upper level produces policy parameters as a function of time, while the lower level is the policy actually executed in the environment.

This construction is specifically tailored to lifelong settings rather than stationary control. The time-conditioned hyper-policy makes temporal variation part of the policy parameterization itself. A plausible implication is that HisPO treats non-stationarity as a first-class modeling assumption rather than as a perturbation around a fixed policy class.

## 2. Multiple-importance-sampling estimator of future return

Let $T$ denote the current time, $\alpha$ the size of the past buffer $\{t = T-\alpha+1, \dots, T\}$, and $\beta$ the look-ahead horizon. The target quantity is the $\beta$-step-ahead return
$$
J_{T,\beta}(\phi) = \sum_{s=T+1}^{T+\beta} \gamma^{s-T-1} \, \mathbb{E}_{\theta \sim \nu_\phi(\cdot \mid s)} \left[ \mathbb{E}_{\pi_\theta}[r_s] \right].
$$

Because one cannot sample under $\nu_\phi$ at future times $s$, HisPO reuses past data
$$
H = \{(\theta_t, r_t): t = T-\alpha+1, \dots, T\}
$$
through a multiple-importance-sampling estimator with exponentially decaying weights $\omega \in (0,1]$:
$$
\widehat W_t(\phi)
=
\omega^{T-t}
\cdot
\frac{\sum_{s=T+1}^{T+\beta} \gamma^{s-T-1} \cdot \nu_\phi(\theta_t \mid s)}
{\sum_{k=T-\alpha+1}^{T} \omega^{T-k} \cdot \nu_\phi(\theta_t \mid k)},
$$
which yields
$$
\widehat J_{T,\alpha,\beta}(\phi)
=
\sum_{t=T-\alpha+1}^{T} \widehat W_t(\phi)\, r_t.
$$

Equivalently, each past sample $(\theta_t, r_t)$ is identified with an importance weight
$$
w_t(\phi) = \widehat W_t(\phi) / C_\omega,
$$
where
$$
C_\omega = \sum_{k=0}^{\alpha-1}\omega^k,
$$
so that
$$
\widehat J = \sum_t w_t(\phi) r_t
$$
approximates
$$
\sum_s \gamma^{s-T-1}\mathbb{E}_{\pi}[r_s].
$$

The estimator is designed to reuse old trajectories in a setting where direct sampling from future task distributions is unavailable. The exponential decay term $\omega^{T-t}$ provides explicit temporal weighting of reused experience. This suggests that the estimator balances recency against sample reuse through $\omega$, while the look-ahead horizon $\beta$ determines how aggressively future performance is extrapolated.

## 3. Bias, variance, and the differentiable divergence penalty

The description emphasizes that off-policy multiple importance sampling carries high variance when $\nu_\phi(\cdot \mid s)$ diverges from past $\nu_\phi(\cdot \mid k)$. To control this effect, the paper derives a tractable upper bound on
$$
\mathrm{Var}^\phi\!\left[\widehat J_{T,\alpha,\beta} + \widecheck J_{T,\alpha}\right]:
$$
$$
\mathrm{Var}^\phi\!\left[\widehat J_{T,\alpha,\beta} + \widecheck J_{T,\alpha}\right]
\le
2 R_{\max}^2 \left[C_\gamma(\alpha)^2 + C_\gamma(\beta)^2 \cdot d_2(\mu \Vert \psi)\right],
$$
where
$$
C_\gamma(n)=\frac{1-\gamma^n}{1-\gamma},
$$
$$
\mu = \frac{1}{C_\gamma(\beta)} \sum_{s=T+1}^{T+\beta} \gamma^{s-T-1}\nu_\phi(\cdot \mid s),
$$
$$
\psi = \frac{1}{C_\omega} \sum_{t=T-\alpha+1}^{T}\omega^{T-t}\nu_\phi(\cdot \mid t),
$$
and
$$
d_2(\mu \Vert \psi)=\exp[D_2(\mu \Vert \psi)]
$$
is the exponential 2-Rényi divergence [2112.06625].

In practice, the mixture divergences are not formed exactly. Instead, a variational upper bound is used, for example the two-step “$\psi$-first” bound described as Eq. (16), and this bound is fully differentiable in $\phi$.

The same section of the method also presents a bias bound. Under smoothness Assumptions 3.1–3.2,
$$
\left| \mathbb{E}[\widehat J_{T,\alpha,\beta}(\phi)] - J_{T,\beta}(\phi) \right|
\le
(L_M + 2R_{\max}L_\nu)\, C_\gamma(\beta)\, \left[\frac{\omega}{1-\omega} + \frac{1}{1-\gamma}\right].
$$

These results formalize the central trade-off in HisPO: future-return estimation is made possible by reweighting past data, but doing so introduces controlled bias and potentially substantial variance. The method addresses this by coupling temporal decay, smoothness assumptions, and a differentiable Rényi-divergence proxy within one optimization framework.

## 4. Mixed objective and catastrophic-forgetting control

HisPO does not optimize the future-return estimator in isolation. It also tracks the “$\alpha$-step-behind” return on the same buffer:
$$
\widecheck J_{T,\alpha}(\phi)
=
\frac{1}{C_\omega}
\sum_{t=T-\alpha+1}^{T}
\omega^{T-t}\gamma^{t-T+\alpha-1} r_t.
$$
The description states that its gradient discourages $\phi$ from driving denominator terms $\nu_\phi(\theta_t \mid k) \to 0$, which would spuriously inflate $\widehat W_t$.

The combined estimate is
$$
\overline J_{T,\alpha,\beta}(\phi)
=
\widehat J_{T,\alpha,\beta}(\phi)
+
\widecheck J_{T,\alpha}(\phi).
$$
The final surrogate objective is a lower-confidence bound on the true mixed return:
$$
L_\lambda(\phi)
=
\overline J_{T,\alpha,\beta}(\phi)
-
\lambda \cdot \sqrt{C_\gamma(\alpha)^2 + C_\gamma(\beta)^2 \cdot d_2(\mu \Vert \psi)},
$$
with $\lambda > 0$ a tunable exploration/regularization coefficient. In practice, $d_2(\mu \Vert \psi)$ is replaced by its differentiable variational bound $B_{T,\alpha,\beta}(\phi)$ [2112.06625].

This objective serves three roles stated explicitly in the source description: it provides a controlled-bias approximation of future return, penalizes policy shifts that blow up off-policy variance, and prevents denominator collapse via the past-return term. The catastrophic-forgetting aspect enters through the inclusion of past performance rather than through a separate replay or consolidation mechanism.

## 5. End-to-end optimization procedure

The implementation-oriented pseudocode describes HisPO, or POLIS, with the following inputs: buffer-size $\alpha$, horizon $\beta$, decay $\omega$, retrain-interval $h$, inner-epochs $N$, and regularization parameter $\lambda$.

At each iteration, the procedure samples $\theta_t \sim \nu_\phi(\cdot \mid t)$, executes $\pi_{\theta_t}$, observes $r_t$, and stores $(\theta_t, r_t)$ in a circular buffer of size $\alpha$. When $t \bmod h = 0$ and $t>0$, the method performs $N$ inner optimization epochs. In each inner epoch it forms the weights $\widehat W_t(\phi)$ via the MIS formula, computes $\widehat J$, $\widecheck J$, and the divergence-bound term $B(\phi)$, evaluates
$$
L_\lambda(\phi)
=
\widehat J + \widecheck J
-
\lambda \sqrt{C_\gamma(\alpha)^2 + C_\gamma(\beta)^2 \cdot B(\phi)},
$$
and updates
$$
\phi \leftarrow \phi + \eta \cdot \nabla_\phi L_\lambda(\phi),
$$
using, for example, RMSProp or Adam. The loop then increments $t$.

The source description highlights that the surrogate $L_\lambda(\phi)$ is fully differentiable with respect to $\phi$, which permits off-the-shelf gradient optimizers. This places the complexity of the method primarily in estimator construction and regularization design rather than in nonstandard optimization machinery.

## 6. Theoretical guarantees and empirical behavior

The theoretical guarantees reported for HisPO consist of a bias bound, the variance bound above, and a lower-confidence result derived via Cantelli’s inequality. Specifically, with probability at least $1-\delta$,
$$
\mathbb{E}[\overline J] \ge L_\lambda(\phi)
\quad \text{if} \quad
\lambda = \sqrt{\frac{1-\delta}{\delta}\cdot 2R_{\max}^2}.
$$
The description summarizes the consequence as follows: optimizing $L_\lambda(\phi)$ ensures controlled-bias approximation of future return, penalizes policy shifts that blow up off-policy variance, and prevents denominator collapse via the past-return term [2112.06625].

The empirical evaluation compares HisPO, denoted POLIS, against three baselines: a stationary hyper-policy with no time-dependence, Pro-OLS and Pro-WLS (Chandak et al. 2020), and ONPG (Al-Shedivat et al. 2018). The environments are Forex trading on EUR–USD historical data from 2009–2020 split into $3 \times 1000$-day sequences, Vasicek-rate trading under smooth non-stationarity, and water-reservoir management with three non-stationary inflow profiles.

| Environment | Reported result |
|---|---|
| Forex-trading (EUR–USD) | HisPO matches or slightly outperforms best baselines in 2013–2016, and closes the gap on 2017–2020 after hyper-parameter re-tuning |
| Vasicek-rate trading | HisPO substantially outperforms all baselines, with higher mean return and lower variance |
| Water-reservoir management (“Dam”) | Stationary hyper-policy is already strong; HisPO matches stationary on all profiles, while Pro-OLS/WLS and ONPG degrade |

The quantitative highlights given in the description are specific. On the Vasicek task, HisPO achieved mean return approximately $+12\%$ versus $+6\%$ for the stationary hyper-policy and $\pm 0$ baseline, with $30$–$40\%$ lower standard deviation. On the Dam task, HisPO’s average daily cost was within $2\%$ of stationary, while halving the regret of the other baselines.

These findings also clarify a potential misconception. HisPO is not presented as uniformly superior to every simpler alternative in every environment. In the Dam setting, a stationary hyper-policy is reported to be already strong, and HisPO matches rather than exceeds it. Conversely, under smooth non-stationarity in the Vasicek task, the time-conditioned hyper-policy and MIS-based future-return estimation appear particularly effective. This suggests that the benefit of HisPO is most pronounced when temporal variation is substantial enough to reward explicit time conditioning, yet smooth enough for the smoothness-based bias control to remain meaningful.

Source: https://www.emergentmind.com/topics/hierarchical-importance-sampling-policy-optimization-hispo