Discounted-Probe Clamped Policy Iteration
Implementation & benchmark of arXiv:2608.05047 — Exact Model-Free Policy Iteration for Co-safe LTL Planning
Source paper: Exact Model-Free Policy Iteration for Co-safe LTL Planning arXiv:2608.05047 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
For sparse terminal-reward RL, first solve a discounted version of the fixed-policy Bellman equation to detect states with zero probability of ever reaching success. Clamp these dead states to value zero, retain successful terminal states at value one, and then run undiscounted stochastic policy evaluation and greedy improvement on the reduced state space. The clamp removes the nonunique harmonic solutions that make direct undiscounted TD unstable or initialization-dependent.
Formulas
Mathematical statement
Let $S$ be a finite state space, $A$ the action set, $Z\subseteq S$ the success or accepting states, $P(s'\mid s,a)$ the transition kernel, and $\pi(a\mid s)$ a stationary policy. Define $P_\pi(s,s')=\sum_a\pi(a\mid s)P(s'\mid s,a)$ and the reachability value $V^\pi(s)=\Pr_s^\pi(\tau_Z<\infty)$, where $\tau_Z$ is the first hitting time of $Z$. For a discount factor $0<\gamma<1$, compute the unique discounted probe $u^\pi_\gamma$ satisfying $u^\pi_\gamma(s)=1$ for $s\in Z$ and $u^\pi_\gamma(s)=\gamma\sum_{s'}P_\pi(s,s')u^\pi_\gamma(s')$ otherwise. Define the dead-state clamp set $D_\pi=\{s\notin Z:u^\pi_\gamma(s)=0\}$; in a finite MDP this identifies states with no positive-probability path to $Z$ under $\pi$. The clamped undiscounted evaluation solves $V^\pi(s)=1$ on $Z$, $V^\pi(s)=0$ on $D_\pi$, and $V^\pi(s)=\sum_{s'}P_\pi(s,s')V^\pi(s')$ elsewhere. Policy improvement uses $Q^\pi(s,a)=\sum_{s'}P(s'\mid s,a)V^\pi(s')$ and $\pi_{new}(s)\in\arg\max_a Q^\pi(s,a)$.
Implementation notes
1. Integration point: implement this as a tabular or neural fitted-RL policy-iteration wrapper for sparse success/failure tasks. For an sc-LTL task, construct the product observation $(x_t,q_t)$, where $x_t$ is the environment state or embedding and $q_t$ is the DFA progress state; define $Z$ as accepting product states. For a first implementation use a tabular grid world or a small MLP critic, not a large benchmark. 2. Pseudocode: initialize policy $\pi$. For each policy-iteration round, estimate the discounted probe by TD: for sampled transition $(s,a,s')$, use target $y=1$ if $s\in Z$, otherwise $y=\gamma u_\theta(s')$; regress $u_\theta(s)$ toward $y$. Estimate $D_\pi$ using an absolute threshold $\varepsilon_D$, for example $D_\pi=\{s:u_\theta(s)<\varepsilon_D\}$, with a confidence requirement such as five consecutive low estimates. Freeze $V(s)=1$ on $Z$ and $V(s)=0$ on $D_\pi$. Evaluate the remaining states with undiscounted TD or Monte Carlo returns until the sup-norm change is below $\varepsilon_V$. Estimate $Q(s,a)$ from successor values or one-step samples, then replace the policy by the greedy action with deterministic tie-breaking. Repeat until no action changes. 3. Computed from the paper: the discounted contraction mechanism, the dead-state clamp, and the undiscounted policy-evaluation/improvement structure. Estimated empirically: transition expectations, $u_\gamma$, $V^\pi$, the dead-state threshold, and confidence in the clamp. For neural critics, use separate probe and reachability heads and stop-gradient through the clamp mask. 4. First cheap experiment: compare this method with undiscounted Q-learning, discounted Q-learning with $\gamma=0.99$, and Monte Carlo policy evaluation on a $10\times10$ stochastic grid world containing traps, dead regions, and a goal. Run 100 random seeds and measure success probability, value error against exact dynamic programming, and dependence on critic initialization. The quantitative prediction is that direct undiscounted TD will show initialization-dependent values in closed non-goal regions, while the clamped method will converge to the same reachability values across seeds; after the discounted probe has separated $u_\gamma=0$ from positive states, the residual evaluation error should decay geometrically in episodic environments and the number of policy changes should be finite. Vary $\gamma$ and test that the detected dead-state set stabilizes once $\gamma\geq0.9$; false clamp rate should be below 5% when the probe estimation error is below half the chosen threshold $\varepsilon_D$.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Inconclusive
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a reusable tabular Discounted-Probe Clamped Policy Iteration module and a numerical verification experiment. The mechanism manifested: observed live-block contraction rates matched predicted gamma*rho values to numerical precision, the dead-state mask was stable across gamma=0.1 through 0.999, and clamping removed initialization dependence. The clamped method achieved approximately 7.1e-13 mean sup-norm error versus approximately 1.06 for direct undiscounted iteration on the toy MDP.
- Agent confidence
- 9/10
- Baseline
- Direct undiscounted iteration: mean sup-norm error 1.0597; dead-state output standard deviation across initializations 1.1013.
- Idea
- Clamped evaluation: mean sup-norm error 7.14e-13; output standard deviation 5.05e-13. Predicted versus observed spectral rates: gamma=.50, .250 versus .250; gamma=.70, .350 versus .350; gamma=.90, .450 versus .450; gamma=.99, .495 versus .495. Dead-mask detection was correct for every tested gamma.
Limitations: Only a small hand-designed tabular fixed-policy MDP and a tiny policy-improvement smoke test were evaluated. The experiment used exact linear solves rather than sampled TD or neural critics, and did not test a 10x10 grid world, 100 independent seeds, wall-clock or sample efficiency, noisy probe thresholds, or false-clamp rates under estimation error.
How to run: python3 verify.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.05047)
Ahead of the baseline (−16.5%) but not statistically significant (p=0.3588, wins 6 / 8 paired seeds).
- Benchmark
- Terminal_reachability_mdp
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.1549
- Idea mean
- 0.1293
- Effect (Δ)
- -0.0256 (−16.5%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.3588 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±37.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The custom track is a small supervised encoding of a fixed-policy MDP rather than an online environment with sampled trajectories or policy improvement. The full benchmark used 8 paired seeds and a 3-value learning-rate sweep, but did not test the built-in dynamics track, larger neural critics, noisy probe thresholds, or direct neural policy iteration.
How to run: python3 run_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented a structurally matched custom terminal-reachability MDP and paired neural fitted-Bellman systems using the same mlp_tiny architecture and learning-rate sweep. The idea reduced test MSE from 0.154882 to 0.129277 (paired delta -0.025605, 6/8 wins), but the permutation p-value was 0.35875, so there was no significant win. The trained discounted probe failed to detect the dead states, so the stage-1 mechanism prediction was not confirmed at neural scale.
- Baseline
- Best lr=0.01; 8-seed mean test MSE 0.154882, std 0.057002.
- Idea
- Best lr=0.01; 8-seed mean test MSE 0.129277, std 0.046482; paired delta -0.025605; permutation p=0.35875; 6/8 wins.
Benchmark result
Ahead of the baseline (−16.5%) but not statistically significant (p=0.3588, wins 6 / 8 paired seeds).
- Benchmark
- Terminal_reachability_mdp
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.1549
- Idea mean
- 0.1293
- Effect (Δ)
- -0.0256 (−16.5%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.3588 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±37.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
The custom track is a small supervised encoding of a fixed-policy MDP rather than an online environment with sampled trajectories or policy improvement. The full benchmark used 8 paired seeds and a 3-value learning-rate sweep, but did not test the built-in dynamics track, larger neural critics, noisy probe thresholds, or direct neural policy iteration.
How to run: python3 run_bench.py
Artifacts
- bench_report.json 4.0 KB View Raw
- custom_terminal_reachability.py 1.8 KB View Raw
- discounted_probe_clamped.py 2.7 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-31T210124.md 4.9 KB View
- results.json 2.1 KB View Raw
- run_bench.py 5.5 KB View Raw
- verify.py 3.9 KB View Raw