Skip to content
Back to skills

Ppo Minibatch Update Loop

ASecurity

Run a deterministic reduced PPO minibatch update loop with frozen old log probabilities and auditable optimizer traces.

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
toolspythonbashperformance

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill ppo_minibatch_update_loop --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ppo Minibatch Update Loop?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ppo Minibatch Update Loop
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-ppo-minibatch-update-loop/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-ppo-minibatch-update-loop)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: ppo_minibatch_update_loop
description: Run a deterministic reduced PPO minibatch update loop with frozen old log probabilities and auditable optimizer traces.
---

# PPO Minibatch Update Loop

## When To Use

Use this skill when you need an executable, bounded PPO-style optimizer step that demonstrates repeated minibatch updates against frozen old-policy probabilities. It is designed for recovery tests and small implementations where full MuJoCo/Atari training is unavailable.

Do not present this reduced runner as full benchmark training.

## Inputs

- Batch fields: `actions`, `old_log_probs`, `advantages`, and optional `rewards` or `returns`.
- Scalar Bernoulli-policy initial `theta` for reduced recovery, or equivalent trainable policy parameters.
- Optimizer settings: `learning_rate`, `epochs`, `clip_epsilon`, and minibatch size.

## Outputs

- `params_before` and `params_after`.
- `loss_before`, `loss_after`, `expected_reward_before`, `expected_reward_after`.
- Per-step diagnostics including ratios, clip fraction, approximate KL, and policy-gradient estimate.
- `optimizer_step_executed` and `old_log_probs_frozen` booleans.

## Workflow

1. Copy old action log probabilities before training.
2. Normalize advantages if requested by the caller.
3. For each epoch, compute the PPO clipped objective.
4. Estimate a bounded first-order update for the scalar Bernoulli policy.
5. Apply a deterministic gradient-ascent step.
6. Log losses, parameters, expected-reward proxy, clipping diagnostics, and source skill names.

## Validation

Run:

```bash
python tests/test_minibatch_update.py
python scripts/run_minibatch_ppo.py --output /tmp/ppo_trace.json
```

## Limitations

This skill intentionally uses a tiny Bernoulli-policy proxy. It validates mechanism faithfulness but not full continuous-control or Atari performance.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…