---
title: Batch-Constrained Bellman Backup
url: https://www.emergentmind.com/topics/batch-constrained-bellman-backup
type: topic
---

# Batch-Constrained Bellman Backup

Batch-Constrained Bellman Backup (BCBB) refers to a paradigm for conservative policy evaluation and improvement in batch reinforcement learning (RL), where access to data is restricted to a fixed collection of transition tuples sampled from a behavior distribution. The BCBB approach modifies standard Bellman backup operators to prevent the propagation of value estimates through state-action pairs insufficiently covered by the observed dataset. By enforcing strict support constraints derived from the empirical batch coverage, BCBB fundamentally addresses the distributional shift and overestimation problems endemic to classical batch RL methods without relying on strong concentrability assumptions [2007.08202].

## 1. Markov Decision Process and Batch Data Formalism

The BCBB framework is grounded in the standard discounted Markov Decision Process (MDP), defined as $M = (S, A, P, r, \gamma, \rho)$, with state space $S$, action space $A$, transition kernel $P(s' \mid s, a)$, bounded reward function $r(s, a) \in [0, R_{\max}]$, discount factor $\gamma \in [0,1)$, and initial distribution $\rho$. Policies $\pi: S \to \Delta(A)$ induce state-action value functions $Q^\pi(s, a)$ and mean values $v^\pi = \mathbb{E}_{s \sim \rho} [ V^\pi(s) ]$.

The batch setting assumes access to a finite dataset $D = \{ (s_i, a_i, r_i, s'_i) \}_{i=1}^n$ sampled i.i.d. from some environment-aligned behavior distribution $\mu(s, a)$. There is no guarantee that $\mu$ has significant or nonzero support over the entire $S \times A$; crucially, no further data collection (exploration) is permitted.

## 2. Classical and Conservative Bellman Operators

Traditional batch algorithms (e.g., Fitted Q-Iteration) rely on Bellman operators $\mathcal{T}^\pi$ (evaluation) and $\mathcal{T}^*$ (optimality), respectively,

- $\mathcal{T}^\pi Q(s, a) = r(s, a) + \gamma \mathbb{E}_{s'} \left[ \mathbb{E}_{a' \sim \pi(\cdot \mid s')} [ Q(s', a') ] \right]$,
- $\mathcal{T}^* Q(s, a) = r(s, a) + \gamma \mathbb{E}_{s'} \left[ \max_{a' \in A} Q(s', a') \right]$.

This methodology allows value function propagation through any state-action pairs, regardless of their presence in $D$. Such propagation is problematic in the batch setting, enabling erroneous bootstrapping via rarely or never observed transitions.

BCBB introduces a support-filter $\zeta(s, a) = \mathbb{1}[ \hat{\mu}(s, a) \geq b ]$, where $\hat{\mu}(s, a)$ is a density estimate of the empirical state-action visitation and $b > 0$ is a conservativeness threshold. The constrained operators are defined as:

- $\mathcal{T}^\pi_\zeta Q(s, a) = r(s, a) + \gamma \mathbb{E}_{s'} [ \sum_{a'} \pi(a' \mid s') \zeta(s', a') Q(s', a') ]$,
- $\mathcal{T}^*_\zeta Q(s, a) = r(s, a) + \gamma \mathbb{E}_{s'} [ \max_{a' \in A} \zeta(s', a') Q(s', a') ]$.

Next-state actions with $\zeta = 0$ accrue zero future value; this prohibits optimistic bootstrapping through unsupported regions.

## 3. Marginalized Behavior-Supported Algorithms

The BCBB methodology is embodied in two prototypical algorithms: Marginalized Behavior-Supported Policy Iteration (MBS-PI) and Marginalized Behavior-Supported Q-Iteration (MBS-QI).

| Algorithm          | Policy Representation   | Backup Operator                   | Support Filtering                |
|--------------------|------------------------|-----------------------------------|----------------------------------|
| MBS-PI             | Policy class $\Pi$     | $\mathcal{T}^\pi_\zeta$           | $\zeta(s, a)$ for all backups    |
| MBS-QI             | Deterministic greedy   | $\mathcal{T}^*_\zeta$             | $\zeta(s, a)$ for all Q-updates  |

In MBS-PI, policy evaluation is performed with the $\zeta$-filtered operator, followed by a policy improvement step using a filtered value function. MBS-QI applies one-step greedy fit to the $\zeta$-constrained optimality operator. Both routines require only the hyperparameter $b$ to adjust the degree of conservativeness; no trust-region penalties or auxiliary constraints are introduced.

## 4. Theoretical Guarantees and Analysis

Let the escaping probability of a policy $\pi$ be $\epsilon_\zeta(\pi) = \mathbb{E}_{(s, a) \sim \eta^\pi} [ \mathbb{1}[\zeta(s, a) = 0] ]$, with $\eta^\pi$ the $\gamma$-discounted state-action occupancy. Let $C = U / b$, where $U$ bounds admissible marginal densities $\eta^\pi(s, a) \leq U$.

- For MBS-PI, under bounded densities, accurate density estimation, and completeness of the function class, for any policy $\pi$ with $\epsilon_\zeta(\pi) \leq \epsilon$, the result is:
  $$
  v^\pi - v^{\pi_T} \leq O\left( \frac{C}{(1-\gamma)^3} \left[ \sqrt{\frac{\ln|F|}{n} + \delta_\mu + \epsilon} \right] + \frac{\gamma^K}{(1-\gamma)^2} + \gamma^T \right),
  $$
  where $\delta_\mu$ is the total variation distance between $\hat{\mu}$ and $\mu$, $F$ is the function class, $K$ is the policy evaluation accuracy, and $T$ is the policy iteration count.

- For MBS-QI, a similar bound holds:
  $$
  v^\pi - v^{\pi_T} \leq O\left( \frac{C}{(1-\gamma)^2} \left[ \sqrt{\frac{\ln|F|}{n} + \delta_\mu + \epsilon + \|\zeta(Q^* - Q^\pi)\|_{2, \mu}} \right] + \frac{\gamma^T}{1-\gamma} \right).
  $$

The proof leverages a construction of an auxiliary MDP $M'$ incorporating a zero-reward absorbing state for any unsupported $(s, a)$. The fixed-point of $\mathcal{T}^\pi_\zeta$ coincides with $Q^{\pi'}$ in $M'$, where $\pi'$ is forced to redirect through the filter. This allows the error bound to depend on $C$ only over the well-supported region and not a global concentrability constant.

## 5. Illustrative MDP Pathologies and Failure Modes

Scenarios identified by Liu et al. (2020) illustrate where classical and alternative batch RL approaches (BCQL, BEAR, SPIBB) fail and BCBB is robust:

- **Rare-Transition MDP**: A one-step deviation with a small probability $p$ leads to a high reward but $p$ is so small the dataset likely omits relevant transitions. Standard value backups, as well as BCQL and SPIBB, are misled by optimistic extrapolation or poor action-conditional density estimation. BCBB's $\zeta$ excludes these transitions entirely, precluding overvaluation.
- **Combination-Lock MDP**: An episodic chain where reward is only accrued at the terminal state via a unique action sequence. When the behavior is noisy, classical algorithms tend to overfit to rare transition estimates. BCBB, via its coverage constraint, guarantees improvement only in adequately supported regions, yielding optimal performance within the covered subchain.

## 6. Empirical Benchmarks

Empirical validation on discretized CartPole-v0 and continuous-control MuJoCo Hopper-v3 environments demonstrates the reliability and competitiveness of BCBB algorithms:

- **CartPole-v0**: For batch datasets collected with $\epsilon$-greedy expert behavior ($\epsilon \in \{0.1, ..., 0.9\}$), MBS-QI achieves near-optimal control across all $\epsilon$, outperforming BCQL and SPIBB in regimes with narrow or noisy coverage, and never suffering from optimistic bias due to undersampled transitions.
- **MuJoCo Hopper-v3**: BCQ is augmented by a $\zeta$ state filter (via ELBO-VAE), and compared with standard BCQ, offline DDPG, and Behavior Cloning. MBS-QL matches or surpasses BCQ and remains robust against extrapolation error even in late training stages, which is a typical failure mode of other batch RL methods.

Optimal $b$ should retain a substantial proportion of the data support (e.g., $>70\%$), with the analysis automatically balancing conservatism and optimism accordingly.

## 7. Practical Significance and Limitations

BCBB presents a minimally intrusive and theoretically justified solution to extrapolation error in batch RL algorithms, requiring only a data-driven support indicator and a single threshold parameter. The method achieves competitive empirical results without reliance on explicit trust-region enforcement, optimism penalties, or stringent density ratio control assumptions.

Limitations include dependence on the quality of density estimation $\hat{\mu}(s, a)$ and potential underestimation of value in sparsely explored but viable regions. A plausible implication is that BCBB is best suited for datasets with adequate coverage of the critical decision space; otherwise, value improvement is necessarily restricted to the empirical support.

Further research may analyze trade-offs between conservativeness and sample efficiency as a function of batch coverage and threshold selection [2007.08202].

Source: https://www.emergentmind.com/topics/batch-constrained-bellman-backup