Did the estimator identify the right action?
Compare its literal turn credit with exact advantage.
- RMSE and centered RMSE
- Spearman rank correlation
- Sign accuracy
- Zero-credit leakage
AgentCreditBench tests GRPO, RLOO, GAE, GiGPO, Monte Carlo, and custom turn-level credit estimators against exact policy advantages in tiny, reproducible finite-horizon environments.
git clone https://github.com/hectopascal/agent-credit-bench.git
In RecoveryEnv, a poor first action can be repaired later.
On successful BAD → RECOVER trajectories, exact advantage
assigns opposite signs. Outcome-broadcast methods do not.
| Estimator | BAD | RECOVER |
|---|---|---|
| Exact oracle | −0.25 | +0.50 |
| Outcome broadcast | +1.00 | +1.00 |
| GRPO-style | +0.58 | +0.58 |
| GiGPO-style | +1.15 | +1.57 |
This is a conditional identification diagnostic—not, by itself, evidence of a biased expected policy gradient. AgentCreditBench reports both questions separately.
Download the underlying CSVCompare its literal turn credit with exact advantage.
Compare the expected tabular-softmax policy gradient.
End-to-end learning quality, function approximation, token-level policies, PPO clipping, learned critics, off-policy correction, and stochastic reward models. Tiny tabular MDPs are the point: they make the answer exact.
One consequential action, followed by irrelevant distractor turns with exactly zero advantage.
Tests delayed leakageAn early mistake can be repaired by a later action, separating contribution from outcome.
Tests repair creditSTOP or CONTINUE at every turn, with the value of continuing changing over time.
Tests active-set baselinesStart with pure-Python reference estimators, then score adapters that call or fingerprint the released advantage code in production RL stacks.
Exact oracleOutcome broadcastRLOO-style centeringTurnLOOGRPO-styleGiGPO-styleMonte Carlo
verl 0.9.0TRL 1.12.0OpenRLHF 0.11.0verifiers 0.1.14
The distribution is not on PyPI yet, so the canonical installation path is the repository checkout. The core has no runtime dependencies.
git clone https://github.com/hectopascal/agent-credit-bench.git
cd agent-credit-bench
python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"
pytest
from agent_credit_bench import run_benchmark, UniformPolicy
from agent_credit_bench.envs import DelayedEffectEnv
from agent_credit_bench.estimators import BatchCenteredBroadcast
result = run_benchmark(
mdp=DelayedEffectEnv(horizon=16),
policy=UniformPolicy(),
estimator=BatchCenteredBroadcast(),
batch_size=1_000,
seeds=range(10),
)
print(result.mean_gradient_cosine)
No. It scores credit estimators, not trained agents. There is no learning loop in the core benchmark.
No. Passing these diagnostics is evidence that the estimator obeys specific credit and gradient contracts in controlled finite MDPs; it is not an end-to-end training claim.
Adding a state-dependent baseline can change literal credit values while preserving the expected policy gradient. One scalar cannot faithfully score both properties.
AgentCreditBench is MIT licensed. Citation metadata is available in both CFF and BibTeX form.
@software{yiyan2026agentcreditbench,
author = {Yi Yan Ng},
title = {{AgentCreditBench}: A Conformance-Test Suite
for Turn-Level Credit Estimators},
year = {2026},
version = {0.5.0},
doi = {10.5281/zenodo.22178939},
url = {https://github.com/hectopascal/agent-credit-bench},
license = {MIT}
}