---
title: 'Pb-PPO: Adaptive Clipping in Proximal Policy Optimization'
url: https://www.emergentmind.com/topics/pb-ppo
type: topic
---

# Pb-PPO: Adaptive Clipping in Proximal Policy Optimization

Preference-based Proximal Policy Optimization (Pb-PPO) is a bi-level reinforcement learning framework designed to address limitations inherent in conventional Proximal Policy Optimization (PPO), specifically the reliance on a fixed clipping bound for policy updates. Pb-PPO dynamically optimizes the choice of the clipping bound via a multi-armed bandit mechanism guided by feedback from actual returns, aligning the update process with the true objective of maximizing cumulative return. This approach results in improved sample efficiency, stability, and overall performance in continuous control and navigation tasks, as evidenced by empirical benchmarks [2312.07624].

## 1. Motivation and Background

PPO is widely adopted for its stable training characteristics, largely attributed to the use of a clipped surrogate objective that constrains policy updates. The clipping bound $\epsilon$ in PPO controls the extent of update per iteration, with PPO's performance shown to be sensitive to this hyperparameter. Traditional PPO uses a fixed $\epsilon$, yet there is no theoretical guarantee that a constant bound remains optimal throughout training. Fixed bounds can restrict exploration and adaptability, and prior work on dynamically adjusting $\epsilon$ has not directly aligned clipping adjustment with maximizing true cumulative return.

Pb-PPO introduces a principled framework for dynamically and automatically selecting the clipping bound. Unlike previous methods, the mechanism directly uses task-return feedback to tune the bound, thus better matching reinforcement learning’s core objective.

## 2. Bi-Level Optimization Paradigm

Pb-PPO formalizes the policy update as a bi-level optimization problem:

- **Inner Level:** For a given clipping bound $\epsilon$, optimize the policy using the standard PPO-style clipped surrogate objective:
  $$
  J_{\text{inner}}(\pi_{\text{new}}; \epsilon) = \mathbb{E}_{\tau \sim \pi_{\text{old}}} \left[ \min\left( r(\tau)A_{\text{old}}(\tau), \mathrm{clip}(r(\tau), 1-\epsilon, 1+\epsilon)A_{\text{old}}(\tau) \right) \right],
  $$
  where $r(\tau) = \pi_{\text{new}}(\tau)/\pi_{\text{old}}(\tau)$.

- **Outer Level:** Select the optimal $\epsilon^*$ from a candidate set $\mathbb{Z} = \{\epsilon_0, \ldots, \epsilon_n\}$ using a multi-armed bandit upper confidence bound (UCB) objective:
  $$
  \epsilon^* \leftarrow \arg\max_{\epsilon_i \in \mathbb{Z}} U^\text{UCB}(\epsilon_i) := U(\epsilon_i) + \lambda \hat{H}(\epsilon_i),
  $$
  where $U(\epsilon_i)$ estimates expected return under $\epsilon_i$ and $\hat{H}(\epsilon_i)$ quantifies uncertainty.

The two levels are tightly coupled: the outer bandit selects the clipping parameter to maximize true return, and the inner PPO update uses this choice to update the policy.

## 3. Multi-Armed Bandit Integration

Each clipping bound candidate $\epsilon_i$ is treated as a bandit arm. The integration operates as follows:

- **Bandit Reward:** After each PPO update under $\epsilon_i$, evaluate the updated policy $\pi_{\text{new}}$ on $k$ trajectories and compute the average return $r_t(\epsilon_i) = (1/k) \sum_{j=1}^k R(\tau^{(j)})$.
- **Statistics Maintenance:** For each arm, track the number of visits $N_i$, the current expected reward $U(\epsilon_i)$ (updated as $U(\epsilon_i) = \gamma_{\text{ucb}} U(\epsilon_i) + r_t(\epsilon_i)$), and total visits $N_{\text{tot}}$.
- **Uncertainty Quantification:** The bandit UCB uncertainty is defined by $\hat{H}(\epsilon_i) = \sqrt{N_{\text{tot}} / (N_i + \varepsilon_{\text{ps}})}$.
- **Selection and Update:** At each outer iteration, select $\epsilon^*$ as the arm with maximal $U^\text{UCB}(\epsilon_i)$, update statistics, and use $\epsilon^*$ in the next inner PPO epoch. Optionally, normalize $U(\epsilon_i)$ to obtain an advantage-style signal.

This approach ensures that exploration and exploitation of candidate bounds are balanced and that the policy update is directly steered by return-based preference.

## 4. Theoretical Properties

Pb-PPO preserves PPO's local monotonic improvement guarantee under the standard conditions of small policy updates and proper clipping. The multi-armed bandit outer loop provides probabilistic control (via the UCB rule) over the selection of suboptimal clipping bounds, visiting them only $O(\log T)$ times, with $T$ the total number of iterations. The Hoeffding-based derivation justifies the uncertainty term $\hat{H}(\epsilon_i)$. This two-layered structure ensures $\epsilon^*$ converges to the best-performing bound as learning proceeds [2312.07624].

## 5. Algorithmic Realization

The overall algorithm can be described as:

1. Collect on-policy data with the current policy.
2. For each candidate $\epsilon_i$, compute $U^\text{UCB}(\epsilon_i)$.
3. Select $\epsilon^* = \arg\max_i U^\text{UCB}(\epsilon_i)$.
4. Perform PPO-style updates using $\epsilon^*$ for several epochs.
5. Evaluate the new policy, compute reward statistics, and update bandit estimates.
6. (Optionally) Normalize bandit utilities to improve signal for selection.

Pseudocode is documented in the original reference. Typical hyperparameter settings include a candidate set $\mathbb{Z}$ (10 values uniformly spaced in $[0,1]$), UCB weight $\lambda = 5$, discount $\gamma_{\text{ucb}} = 0.9$, and evaluation episodes $k=2$ or $10$.

## 6. Empirical Evaluation and Benchmarking

Experiments with Pb-PPO were conducted on continuous control benchmarks in Gym-Mujoco (Ant-v3, HalfCheetah-v3, Hopper-v3, Walker2d-v3) and pybullet-gym (Dog-run), with comparisons to PPO (fixed $\epsilon \in \{0.02, 0.15, 0.23, 0.2\}$), TRPO, DDPG, TRGPPO, and PPO-$\lambda$.

Evaluation metrics include average episodic return, sample efficiency (AUC), final return after $1e6$ steps, and policy-improvement success rate (fraction of iterations with $R(\pi_{\text{new}}) > R(\pi_{\text{old}})$). Pb-PPO achieves:

- Highest average final return (e.g., average 3315 across tasks, surpassing PPO-$\lambda$/TRGPPO $\approx 3000$).
- Policy-improvement success of $5.0\%$ (vs. $\approx 3\%-4\%$ for fixed-$\epsilon$ PPO).
- More stable and smooth learning curves (narrower variance) and higher monotonic-improvement ratios.

### Summary of Comparative Metrics

| Method       | Avg. Final Return | Policy-Improvement Success |
|--------------|------------------|---------------------------|
| Pb-PPO       | 3315             | 5.0%                      |
| PPO-$\lambda$, TRGPPO | $\approx$3000 | 3–4%                    |
| Fixed-$\epsilon$ PPO  | Lower         | Lower                   |

## 7. Ablation and Sensitivity Analyses

Ablations analyze the effect of the number of clipping arms $|\mathbb{Z}|$, the presence of normalization in the bandit feedback, and arm selection statistics.

- Increasing $|\mathbb{Z}|$ from 3 to 10 improves performance, which then plateaus.
- Normalizing $U(\epsilon_i)$ provides a slight benefit ("wi-ad" outperforms "wo-ad").
- Pb-PPO consistently demonstrates higher monotonic improvement success than fixed-bound baselines.
- Statistical correlation analyses verify that arms with higher $U(\epsilon_i)$ reliably produce higher returns, validating the efficacy of preference-based feedback.

A plausible implication is that further tuning of candidate set cardinality and reward normalization may yield incremental gains, though significant improvements beyond $|\mathbb{Z}|=10$ appear limited [2312.07624].

---

Pb-PPO systematically addresses the fundamental challenge of aligning adaptive surrogate objective parameters with reinforcement learning goals by leveraging a bi-level, feedback-driven approach. The empirical and theoretical results demonstrate superiority in adaptability, convergence, and robustness over traditional and previously adaptive PPO variants.

Source: https://www.emergentmind.com/topics/pb-ppo