Criticality-Guided Failure Replay
Implementation & benchmark of arXiv:2607.28251 — Self-Evolving Learning for Embodied AI with Criticality Model
Source paper: Self-Evolving Learning for Embodied AI with Criticality Model arXiv:2607.28251 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Train a lightweight auxiliary predictor C_phi(s) for the probability that the current policy will eventually fail from state s, then bias environment resets, replay sampling, or data replacement toward high-criticality states. Correct the resulting policy-training samples with importance weights so the expected gradient still targets the original data distribution rather than an uncontrolled failure-only objective.
Formulas
Mathematical statement
Let s be a state or initial condition, y in {0,1} indicate eventual rollout failure, and C_phi(s) in (0,1) estimate P(y=1|s). Fit phi by binary cross-entropy. Given a target distribution p(s), define a criticality-biased proposal q_alpha(s) proportional to p(s) times [epsilon + C_phi(s)]^alpha, where alpha >= 0 controls enrichment and epsilon > 0 prevents zero probability. A sample drawn from q_alpha receives importance weight w(s) = p(s)/q_alpha(s), or a self-normalized version. If q_alpha has support wherever p is nonzero, the weighted expectation equals the original policy objective; clipping weights reduces variance at the cost of bias.
Implementation notes
1. Integration point: add a small MLP criticality head C_phi to the data pipeline, not to the policy action output. For RL, attach each visited state to the eventual episode-failure label; for imitation or supervised policy learning, attach the reset state or scene configuration to the success/failure outcome. Maintain a rolling criticality buffer containing failed and successful rollouts, plus a policy-training buffer containing state/action or state/return supervision. 2. Pseudocode: collect ordinary rollouts; append (s_t,y) to the criticality buffer; update phi with BCE; score candidate states with c_i=sigmoid(C_phi(s_i)); set a_i=(epsilon+c_i)^alpha; sample indices with probability q_i proportional to the original pool probability p_i times a_i; compute r_i=p_i/q_i; optionally clip r_i to [0,w_max] and normalize by the batch mean; update theta using the weighted loss sum_i r_i ell_theta(s_i). Refresh scores periodically and reduce alpha if ESS/B falls below a threshold. 3. Computed from the paper: BCE criticality learning, policy-outcome labels, failure-focused replacement, and importance-weighted resampling. Estimated empirically: calibration of C_phi, q_i, normalization, and the effect of clipping. 4. First cheap experiment: train an actor-critic or behavior-cloning MLP on CartPole with injected initial-state and action perturbations. Compare uniform replay against alpha in {0.5,1,2}, with and without importance weighting. The predicted signatures are monotonic growth of sampled failure fraction with alpha, decreasing ESS/B, and better agreement between weighted-batch and large-uniform-batch gradients than between unweighted-biased and uniform gradients. The measured enrichment ratio should match the q_alpha prediction within 20%; use the largest alpha with ESS/B above 0.3 and weighted-gradient cosine similarity above 0.9.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
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 finite-population criticality replay MVP with a trained auxiliary failure predictor, proposal sampling, importance weighting, ESS calculation, and replay training. Failure enrichment matched the q_alpha formula within 0.6% across alpha 0.5–4, ESS decreased sharply with alpha, and the exact importance-weighted gradient identity held to 2.3e-14 L2 error. Corrected replay matched uniform replay at alpha 0.5 and 1.0, while uncorrected replay degraded substantially; alpha 2 showed variance-related deterioration consistent with its low ESS.
- Agent confidence
- 9/10
- Baseline
- Uniform replay MSE 0.165171; failure fraction 0.46058; ESS/B 1.0
- Idea
- Critic BCE 0.35125; predicted/observed enrichment alpha=0.5: 1.399/1.402, alpha=1: 1.634/1.640, alpha=2: 1.831/1.838, alpha=4: 1.946/1.951; ESS/B: 0.696, 0.268, 0.0171, 0.0000287; corrected replay MSE alpha=0.5/1/2: 0.165123/0.165160/0.180043; uncorrected replay MSE: 0.197351/0.294067/0.385045
Limitations: This is a controlled finite-state regression replay test rather than a full CartPole actor-critic experiment. The critic is logistic rather than an MLP, clipping and self-normalized weights were not benchmarked, and real-environment wall-clock or sample-efficiency gains were not tested.
How to run: python3 criticality_replay_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.28251)
No significant difference vs. the tuned baseline (+22.4%, p=0.2473, wins 2 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0134
- Idea mean
- 0.0165
- Effect (Δ)
- 0.003 (+22.4%; negative = idea better)
- Wins
- 2 / 8 paired seeds
- p-value
- 0.2473 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics track was tested, using the reduced 400-train/200-test dataset and 6 epochs. Failure was operationalized as a next-state magnitude threshold rather than full multi-step environment failure; no wall-clock or sample-efficiency study, clipping ablation, or vision/tabular/sequence track evaluation was performed.
How to run: OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 CUDA_VISIBLE_DEVICES='' /home/maxwelhelp/main/bin/python3 stage2_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 criticality-guided replay on dynamics/rnn_small with an auxiliary BCE failure critic, proposal sampling, and self-normalized importance weighting. The mechanism prediction was confirmed: observed enrichment was 2.557 versus 2.644 predicted, and weighted versus uniform pool loss differed by only 1.9e-9; the exact identity check had maximum L2 error 2.2e-16. The best idea setting was worse than the tuned baseline, with paired delta +0.003010 and permutation p=0.24735, so there was no significant win.
- Baseline
- 8-seed dynamics/rnn_small baseline, lr=0.006, 6 epochs: mean test MSE 0.0134435141; sweep means lr=0.001/0.003/0.006 = 0.1561263492/0.0225990488/0.0134435141.
- Idea
- Best 8-seed weighted replay, alpha=0.5, lr=0.006, 6 epochs: mean test MSE 0.0164534488, std 0.0033379523. alpha=1.0: 0.0165137623; alpha=2.0: 0.0185556822. Paired delta +0.0030099347, 2/8 wins, p=0.24735.
- Mechanism signature
- map[confirmed:true ess_fraction:0.9292901098 math_identity_max_l2:2.1804e-16 observed_enrichment:2.5567998886 predicted_enrichment:2.6443719864 relative_enrichment_error:0.0331 uniform_pool_loss:0.0131316967 weighted_pool_loss:0.0131316986]
Benchmark result
No significant difference vs. the tuned baseline (+22.4%, p=0.2473, wins 2 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0134
- Idea mean
- 0.0165
- Effect (Δ)
- 0.003 (+22.4%; negative = idea better)
- Wins
- 2 / 8 paired seeds
- p-value
- 0.2473 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics track was tested, using the reduced 400-train/200-test dataset and 6 epochs. Failure was operationalized as a next-state magnitude threshold rather than full multi-step environment failure; no wall-clock or sample-efficiency study, clipping ablation, or vision/tabular/sequence track evaluation was performed.
How to run: OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 CUDA_VISIBLE_DEVICES='' /home/maxwelhelp/main/bin/python3 stage2_bench.py
Artifacts
- bench_report.json 5.2 KB View Raw
- criticality_replay_experiment.py 5.4 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-31T192409.md 4.5 KB View
- results.json 3.1 KB View Raw
- stage2_bench.py 6.3 KB View Raw