potentialpaper

Learning From Failures: Efficient Reinforcement Learning Control with Episodic Memory

Chenyang Miao, Bingchen Zhou, Yu Jianliang, Zeyang Liu, Xingyu Chen, Qiongjie Cui, Xuguang Lan

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Reinforcement learning has achieved remarkable success in robot learning. However, under challenging exploration and contact-rich dynamics, early-stage training is frequently dominated by premature terminations such as collisions and falls. As a result, learning is overwhelmed by short-horizon, low-return trajectories, which hinder convergence and limit long-horizon exploration. To alleviate this issue, we propose a technique called Failure Episodic Memory Alert (FEMA). FEMA explicitly stores short-horizon failure experiences through an episodic memory module. During interactions, it retrieves similar failure experiences and prevents the robot from recurrently relapsing into unstable states, guiding the policy toward long-horizon trajectories with greater long-term value. FEMA can be combined easily with model-free reinforcement learning algorithms, and yields a substantial sample-efficiency improvement of 33.11% on MuJoCo tasks across several classical RL algorithms. Furthermore, integrating FEMA into a parallelized PPO training pipeline demonstrates its effectiveness on a real-world bipedal robot task.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
5 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]—[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:43 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

Summary: This paper proposes a technique to explicitly store short-horizon failure experiences (e.g. robot-environment collisions) during RL training in episodic memory, and utilize them to prevent the agent from relapsing -- leading policies towards long-horizon trajectories with greater long-term value.

Strengths: The method is shown to be quite effective on MujoCo tasks and integrates easily into methods like PPO.

Weaknesses: too many hyper-parameters, unclear how to balance too-weak and overly-strong influence of the negative experiences, somewhat slim improvements in real.

Decision: Accept - important, practical problem; method easily integrates into any model-free RL approach; and hence impact potential is high. All reviews are accept-leaning.

Final justification

see above

Area Chair GQLi · Meta-reviewOpenReview ↗
Final justification
see above
Read meta-review
Meta-review

Summary: This paper proposes a technique to explicitly store short-horizon failure experiences (e.g. robot-environment collisions) during RL training in episodic memory, and utilize them to prevent the agent from relapsing -- leading policies towards long-horizon trajectories with greater long-term value.

Strengths: The method is shown to be quite effective on MujoCo tasks and integrates easily into methods like PPO.

Weaknesses: too many hyper-parameters, unclear how to balance too-weak and overly-strong influence of the negative experiences, somewhat slim improvements in real.

Decision: Accept - important, practical problem; method easily integrates into any model-free RL approach; and hence impact potential is high. All reviews are accept-leaning.

Reviewer tF2mOpenReview ↗
Rating
5/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

During early stages of training, classical RL tends to experience a high proportion of premature failures triggered e.g. by safety violations. These are largely wasted. This work (FEMA) seeks to use them to actively drive the agent away from regions of state-action space that are known to be undesirable. The last KK time steps of prematurely-terminated episodes are stored in an episodic memory (EM). These experiences are represented in a joint state-action embedding trained along with a predictor of their Monte-Carlo returns. To choose an action, the agent first retrieves a set of close-by experiences (in terms of the state embedding) from the EM and samples NN actions from its policy. It then chooses from these the action that minimizes a function of similarity (in the learned state-action embedding space) and risk (negative Monte-Carlo return) over the retrieved experiences. In the reported experiments FEMA outperforms all simulated baselines and proves beneficial in a real-robot stair-climbing task.

Strengths and weaknesses

Strengths

This work puts a new spin on EM-enhanced RL: Rather than follow what's good, avoid what's bad. This not only leverages abundant negative experiences instead of relying on scarce positive experiences, but also increases exploratory state-space coverage. The design of the method is appealing, sound and effective. I like how hh and φ\varphi are jointly trained, producing f(s)f(s) for retrieval as a by-product.

FEMA can be combined with any model-free RL method, lending it potentially-high Significance.

The paper is well written and easy to read. The components of the method are systematically motivated and explained. The results are strong, meaningful, and quite comprehensive.

There is not necessarily a need to be defensive about the lack of gain in the Ant task. If the Ant task does not involve many aborted episodes then the fact that performance does not drop under FEMA is actually a strength.

Weaknesses

Perhaps the greatest weakness of FEMA is its dependence on many hyperparameters. Good settings depend on tasks and algorithms, and performance is quite sensitive to hyperparameter settings. Scheduled hyperparameter changes further improve performance (line 511). Line 220 promises guidance on hyperparameter selection but Sec. 4.4 does not give such practical guidance. This combination severely jeopardizes the Significance of the method.

In addition to the hyperparameters studied, it appears that KK (line 139) and λ\lambda (Eqn. 7) are also critical hyperparameters. Their choice is not discussed, and their values used for the experiments are not documented.

An obvious question concerns the balance between too-weak and overly-strong influence of the negative experiences. In FEMA, this balance is determined by its hyperparameters. Section 4.4 explores the quantitative influence of some of the hyperparameters but does not look at their qualitative influence. It would be interesting to look at the mechanisms of how hyperparameter values influence performance. This may also motivate systematic ways of choosing them.

The real-world task raises several questions. The performance advantage of FEMA is slim. Only a single run is provided, without variances and without any idea of how sensitive this result is to hyperparameter settings (Sec. 4.4 seems to imply that it is very sensitive). Despite this small performance gap, "the vanilla parallel PPO algorithm fails to reliably complete the stair-climbing task even after 4,500 training iterations". How can this be explained? Figure 8a goes up to 5000 iterations; is this sufficient for the robot to succeed reliably? What is the "sim-to-sim transfer" referred to on line 286, and why does this motivate exclusion from real-robot experiments?

Questions
  1. In Eqn. 1, t=T−Kt = T - K?
  2. Can sensitivity to hyperparameters be mitigated?
  3. How critical is the choice of KK and λ\lambda?
  4. See above for questions regarding the real-world task.
Limitations

One limitation that is not explicitly pointed out is that FEMA relies on the explicit identification of aborted episodes. This is trivial in simulation where this information is typically provided, but in real-world learning it is not clear where it would come from. (Or perhaps this is not a limitation since these days RL is generally assumed to always be trained (first) in simulation...)

Final justification

In their rebuttal the authors addressed most of my concerns to my satisfaction. In addition, I had an eye on the potentially-serious concern of the FEMA extension to on-policy methods affecting the behavior policy, raised by Reviewer d9sR. This issue appears to have been sufficiently addressed by the authors, so I'm raising my score from Borderline accept to Accept.

Formatting concerns

None.

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for identifying three gaps in our presentation: incomplete documentation and guidance for FEMA's hyperparameters, insufficient evidence for statistical robustness, and an overly broad interpretation of the real-robot result. We address them with new K/λriskK/\lambda_{\mathrm{risk}} ablations, 10-seed main results, an operational selection protocol, and a controlled sim-to-sim comparison. We will add these results and narrow the hardware claim accordingly.

1. Missing definitions and sensitivity of KK and λrisk\lambda_{\mathrm{risk}}

For a failure episode ending at TT, Eq. (1) is evaluated for

t∈{max⁡(0,T−K),…,T−1},Ht=∑n=tT−1γn−trn.t\in\{\max(0,T-K),\ldots,T-1\},\qquad H_t=\sum_{n=t}^{T-1}\gamma^{n-t}r_n.

Thus, FEMA stores the last KK transitions, or the whole episode if it is shorter than KK; KK is the retained pre-failure context, not a horizon beyond termination. In Eq. (7), Si=Di−λriskρiS_i=D_i-\lambda_{\mathrm{risk}}\rho_i, λrisk\lambda_{\mathrm{risk}} weights learned severity against distance from retrieved failure actions. Every main experiment uses K=50K=50 and λrisk=0.1\lambda_{\mathrm{risk}}=0.1 across tasks and base algorithms, including parallel PPO. We will add both values to Algorithm 1 and all hyperparameter tables.

New SAC+FEMA ablations on Humanoid (5 seeds; mean ± s.d.) give:

KK 200k 400k 600k
20 2631.89 ± 479.16 5246.12 ± 86.49 5389.73 ± 158.62
50 (default) 3161.54 ± 326.09 5337.74 ± 122.51 5491.76 ± 112.55
100 2156.70 ± 357.13 4924.12 ± 168.17 5101.83 ± 63.72

K=50K=50 exceeds K=100K=100 at all checkpoints (Welch's t-test, all p<0.01p<0.01), while 20 versus 50 is not significant (all p>0.05p>0.05). Hence FEMA is stable around 20–50 on this task, but 100 dilutes the memory with states farther from failure. We choose 50 to cover a wider precursor window than 20 without this dilution; on a new task, KK should cover the plausible causal lead-up to failure, not the full episode.

Score variant 200k 400k 600k
Distance-only (λrisk=0\lambda_{\mathrm{risk}}=0) 1639.98 ± 425.37 5035.22 ± 688.92 5324.48 ± 11.30
Risk-only (DiD_i removed) 2067.00 ± 303.15 5206.39 ± 225.70 5408.89 ± 140.61
Combined, λrisk=0.1\lambda_{\mathrm{risk}}=0.1 3161.54 ± 326.09 5337.74 ± 122.51 5491.76 ± 112.55
Combined, λrisk=1.0\lambda_{\mathrm{risk}}=1.0 1781.80 ± 284.33 5297.37 ± 49.44 5344.79 ± 88.36

At 200k, the default significantly outperforms the other three variants (all p<0.001p<0.001). DiD_i is a local geometric comparison with retrieved failures, whereas ρi\rho_i predicts failure severity; using either alone loses complementary information, while weight 1.0 makes early selection overly conservative. The means are closer by 600k, so our claim is specifically that λrisk\lambda_{\mathrm{risk}} controls early learning, not that it yields the same separation at convergence.

2. Statistical robustness and an operational selection protocol

To test whether the gains survive seed variation, we extended all MuJoCo main experiments from 5 to 10 seeds (mean ± s.d.):

Task SAC SAC+FEMA PPO PPO+FEMA CrossQ CrossQ+FEMA
Humanoid 5268.43 ± 118.72 5471.36 ± 82.47 948.62 ± 205.33 1164.78 ± 436.91 6239.85 ± 278.46 7012.58 ± 76.42
Walker2d 4146.28 ± 318.95 4776.91 ± 472.36 3972.85 ± 236.44 4567.39 ± 163.27 4623.74 ± 548.91 5068.33 ± 236.85
Hopper 3258.91 ± 123.46 3428.66 ± 95.84 2491.36 ± 504.72 3261.48 ± 25.91 3327.95 ± 61.36 3492.17 ± 48.38
Ant 4219.84 ± 486.27 4808.72 ± 386.14 242.63 ± 141.28 468.52 ± 317.64 4934.18 ± 768.35 5141.76 ± 792.47

Bold marks Welch-test significance (p<0.05p<0.05): SAC improves on 4/4 tasks, CrossQ on 3/4, and PPO on 2/4. We will explicitly label CrossQ/Ant and PPO/Humanoid, Ant as non-significant rather than generalizing every numerical gain. Thus, the principal gains persist with twice as many seeds, although this does not imply hyperparameter invariance.

The five parameters have distinct, diagnosable roles:

Parameter Mechanism and practical rule
KK Stored precursor length: start at 50; use less length for abrupt failures; avoid longer histories unless early states are predictive.
λrisk\lambda_{\mathrm{risk}} Severity–distance trade-off: start at 0.1; 0 removes severity, while a large value can over-constrain early exploration.
ϵ\epsilon Retrieval coverage: increase it if matches are scarce; decrease it if unrelated matches and persistent conservatism appear.
NN Best-of-NN pressure/cost: start at 5 and use 10 only if matched failures do not discriminate actions sufficiently.
MM New failures per memory/encoder update: reduce it when memory is stale; increase it when updates are too frequent/noisy, scaling with parallel collection.

This interpretation matches the existing Hopper ablations: ϵ=0.01\epsilon=0.01 retrieves too little and slows early learning; ϵ=0.50\epsilon=0.50 mixes broad failures and lowers return; larger NN is not monotonically better; and M=200/300M=200/300 degrades later learning versus 100. Our sequential protocol is therefore: fix the shared K=50,λrisk=0.1K=50,\lambda_{\mathrm{risk}}=0.1; choose MM from the failure-arrival rate; calibrate ϵ\epsilon from retrieval coverage; raise NN only if action discrimination remains weak. This replaces a five-dimensional grid with observable diagnostics, but is not automatic tuning.

For SAC/CrossQ, our disclosed schedule typically changes ϵ=0.03\epsilon=0.03–0.050.05 toward 0.10 and N=10N=10 toward 5 at fixed 100k/200k boundaries, with M=100M=100–300300. These changes separately expand retrieval coverage and reduce selection pressure; without schedule-versus-fixed ablations on every task, we will revise line 511 to call this an implementation heuristic, not a universal improvement. MuJoCo PPO uses fixed ϵ=0.10\epsilon=0.10–0.200.20, N=5N=5 or 10, and M=300M=300. Parallel PPO uses ϵ=0.20,N=5,M=2500\epsilon=0.20,N=5,M=2500 because 4,096 environments generate failures much faster. All use the shared K,λriskK,\lambda_{\mathrm{risk}} above.

Sensitivity is mitigated, not eliminated: the risk target is z-normalized, actions remain samples from the current policy, and FEMA intervenes only for a non-empty matched neighborhood. We will add the mechanisms, protocol, and exact schedules to Section 4.4/appendix.

Finally, FEMA assumes premature failures can be identified—here by explicit fall/collision terminations. With sparse failures, continuing tasks, or unreliable labels, it may offer little benefit or be inapplicable. We will state this limitation explicitly; learning a failure detector is future work.

3. Scope of the real-robot evidence

Before deploying an RL policy on a physical robot, it is commonly evaluated through sim-to-sim transfer: a policy trained in one simulator is tested in another simulator powered by a different physics engine. This test exposes sensitivity to simulator-specific dynamics and serves as a safety and stability gate before hardware deployment. Following this procedure, we transferred the Isaac Gym-trained checkpoints to MuJoCo and now separate eventual solvability from equal-budget deployment reliability:

Checkpoint Controlled result
Vanilla parallel PPO, 4,500 iterations 2/10 successful MuJoCo sim-to-sim trials; 8 falls/collisions; not deployed for safety
PPO+FEMA, 4,500 iterations 10/10 successful MuJoCo sim-to-sim trials; passed the deployment gate
Vanilla parallel PPO, ~8,000 iterations Reaches reward comparable to PPO+FEMA at 4,500 and climbs stably in Isaac Gym

All policies use the same 4,096-environment Isaac Gym pipeline. The extended baseline confirms correct implementation and eventual solvability; our supported claim is learning efficiency (~4,500 versus ~8,000), not that FEMA is necessary.

The equal-budget 10/10 versus 2/10 test also explains Figure 8: its scalar reward combines dense tracking, gait, and regularization terms, whereas deployment requires binary completion without a transfer fall/collision. Vanilla PPO succeeded in only 2/10 trials, with eight falls/collisions, indicating a clear hardware-deployment risk; it therefore failed the safety gate. The plot extending to 5,000 iterations is not the reliability evidence; repeated tests of the selected 4,500-iteration checkpoint are.

These are ten executions of each fixed checkpoint, not ten independent training runs, and the hardware policy comes from one run. Thus, hardware establishes transfer feasibility for this checkpoint, while the 10-seed MuJoCo results support broader algorithmic claims. We did not tune on robot rollouts; FEMA is disabled during sim-to-sim and hardware evaluation, so deployment adds no memory lookup or inference module.

We will report the trial counts, extended baseline, and safety gate in Section 4.3, and replace “real-world performance advantage” with the evidence-matched conclusion: in this task and run, FEMA reached the pre-deployment reliability threshold in substantially fewer training iterations.

These additions directly address the reviewer's questions while making the statistical and real-robot claims more reproducible and appropriately scoped.

Reviewer tF2m · CommentOpenReview ↗

I appreciate the thorough reply which does shed light onto the concerns raised. I will take it into account in my post-discussion recommendation.

Authors · CommentOpenReview ↗

Thank you for the follow-up and for taking our clarifications into account. We’re glad our response helped address your concerns and we’ll make the promised revisions in our paper.

Reviewer kv8mOpenReview ↗
Rating
4/6
Confidence
3/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This work tackles the challenge of low sample efficiency resulting from frequent failures during the early stages of reinforcement learning training. The authors propose the FEMA framework, which leverages early short-horizon failure trajectories by organizing them into structured episodic memories, rather than discarding them. This approach actively guides the agent to avoid hazardous states, thereby facilitating more efficient exploration. The primary contribution of this work is the novel formulation of failure trajectories as active signals for exploration guidance. The proposed method is designed as a plug-and-play module that integrates seamlessly with various model-free algorithms, such as SAC and PPO. Furthermore, extensive experiments demonstrate its effectiveness in significantly improving sample efficiency.

Strengths and weaknesses

The paper presents solid experimental verification, covering both MuJoCo benchmarks and real-world bipedal tasks, which convincingly demonstrates FEMA's ability to improve sample efficiency and success rates. The writing is clear and the logic is sound. Although learning from negative examples is not entirely new, the proposed method's ability to integrate modular, latent-space memory into algorithms such as SAC and PPO constitutes a distinct and novel contribution. This is a complete piece of work that provides a practical solution to a difficult problem and offers tangible value.

Questions
  1. How does the method distinguish between a state that is genuinely dangerous and one that was simply visited during a random failure early in training?
  2. What is the theoretical justification for using this specific latent space for distance measurement? Is there a guarantee that Euclidean distance in this latent space correlates well with the actual dynamic consequences or safety risks in the environment?
  3. How does the retrieval time scale as the memory buffer grows significantly large (e.g., millions of transitions)? Is there a mechanism to prune or compress the memory to prevent retrieval from becoming a bottleneck?
Limitations

yes

Final justification

After the rebuttal, all my concerns are addressed, so maintain my original score of 4.

Formatting concerns

no

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We sincerely thank the reviewer for the positive assessment of our work and for the insightful questions. We address each concern below.

1. Concern on distinguishing genuinely dangerous states from states incidentally visited in early random failures.

We thank the reviewer for raising this insightful question. We first clarify the positioning of our design: FEMA does not explicitly identify causally dangerous states, nor does it estimate a calibrated failure probability. The risk head provides a relative, return-based risk score learned from failure trajectories — since the regression targets are z-score normalized within each batch (Eq. 3), its output should be read as a ranking signal of failure-associated risk rather than a true hazard probability. On top of this proxy, FEMA reduces the influence of incidentally visited states through three practical mechanisms, and this is precisely why our scoring rule (Eq. 7), Si=Di−λrisk⋅ρiS_i = D_i − λ_{risk}·ρ_i, includes the learned risk term ρiρ_i in addition to the embedding distance DiD_i:

(1) Implicit statistical weighting via risk-head regression. State–action patterns that consistently precede premature termination recur across many failure trajectories, and therefore appear densely in the memory with consistently low Monte-Carlo returns. Since the risk head h(φ(s,a))h(φ(s,a)) is trained by regression over the entire failure memory (Eqs. 3–4), such recurrent patterns receive greater implicit weight and are driven toward consistently high risk scores. In contrast, a benign state visited incidentally in a single early failure contributes only a few, mutually inconsistent training targets, so its influence on the learned regressor tends to be diluted. We note that this is an empirical inductive bias of regression over abundant failure data — no explicit density estimator or safe-state negative samples are used — rather than a formal guarantee; the consistent early-stage gains in episode length (Figure 7) and sample efficiency indicate that this return-based proxy is sufficient for the guidance purpose of FEMA.

(2) Temporal weighting within each failure event. We only store the last K steps before termination and supervise each transition with the MC return HtH_t computed to the actual termination step (Eq. 1). Under the reward structures of our tasks (predominantly positive per-step rewards with early termination), states temporally closer to termination receive systematically lower H and are thus labeled as states more strongly associated with imminent low-return termination, whereas states that were merely "passed through" earlier receive milder targets. This temporal weighting further separates risk-correlated precursors of failure from incidental visits.

(3) Top-O filtering at retrieval time. Among retrieved neighbors, only the top-O entries with the lowest MC returns participate in scoring, so guidance is focused on the most failure-relevant evidence rather than on all historical visits. The ablation in Figure 10 (right) shows that this design mitigates over-conservative behavior caused by aggregating all retrieved events. In addition, the memory is periodically updated (re-encoded with the current encoder, per Algorithm 1) and maintained in a FIFO manner, so stale failures from the early random phase are gradually replaced as training proceeds.

2. Concern on the justification of using the learned latent space for distance measurement.

We first clarify that FEMA involves two related embedding spaces, which should be distinguished: the state embedding zs=f(s)z_s = f(s) is used for first-stage retrieval of similar failure events (thresholded by ε), while the joint state–action embedding φ(s,a)=j(f(s),g(a))φ(s,a) = j(f(s), g(a)) is used for scoring candidate actions against the retrieved events (the DiD_i term in Eq. 7). Both are trained jointly: the risk regression loss (Eq. 4) back-propagates through the risk head hh, the joint encoder jj, and the state/action encoders ff and gg, so the state encoder used for retrieval is shaped by the same risk-supervised signal.

Measuring similarity in a learned latent space follows an established practice in episodic control. Early methods (e.g., MFEC [R1]) compress states via random projection, whose Johnson–Lindenstrauss guarantee [R2] preserves pairwise distances in the original space but not task semantics, forcing very small matching thresholds and limiting experience reuse. Later works therefore learn the space: NEC [R3] retrieves through a differentiable neural dictionary, and EMU [R4] explicitly learns a task-aware semantic embedding for episodic retrieval, substantially improving matching quality. FEMA follows this learned-embedding line and extends it from success-centric retrieval to failure-centric retrieval; these precedents motivate our design choice, though we do not claim they constitute a formal proof for our specific embedding.

Regarding the guarantee the reviewer asks about: we acknowledge that the risk-regression objective does not formally guarantee that Euclidean distance in the latent space is a dynamics- or safety-preserving metric. What it provides is a task-aware, risk-supervised inductive bias: to fit the return-based targets with a shared smooth head, the encoders are encouraged to organize the representation so that hazard-relevant features of state–action pairs dominate the latent geometry, making ℓ2 proximity an empirical proxy for similarity in failure-associated consequences — the same empirical footing as prior learned-embedding episodic control methods [R3, R4], validated by our experimental results rather than by a theoretical bound.

A further practical benefit is that this design keeps FEMA a lightweight plug-in: retrieval operates on very low-dimensional latent vectors (4-dim in our SAC implementation) rather than raw states. We newly measured the computational overhead: on the Humanoid task, FEMA increases the per-step wall-clock time of SAC by 15.34% (measured with retrieval active), while SAC+FEMA achieves a 33.62% sample-efficiency improvement on this task, and 39.51% on average across the four MuJoCo tasks (33.62% / 61.86% / 45.00% / 17.54% on Humanoid / Walker2d / Hopper / Ant).

References:

[R1] Charles Blundell, Benigno Uria, Alexander Pritzel, Yazhe Li, Avraham Ruderman, Joel Z Leibo, Jack Rae, Daan Wierstra, and Demis Hassabis. Model-free episodic control. arXiv preprint arXiv:1606.04460, 2016.

[R2] Sanjoy Dasgupta and Anupam Gupta. An elementary proof of a theorem of Johnson and Lindenstrauss. Random Structures & Algorithms, 22(1):60–65, 2003.

[R3] Alexander Pritzel, Benigno Uria, Sriram Srinivasan, Adrià Puigdomènech Badia, Oriol Vinyals, Demis Hassabis, Daan Wierstra, and Charles Blundell. Neural episodic control. In International Conference on Machine Learning (ICML), pages 2827–2836, 2017.

[R4] Hyungho Na, Yunkyeong Seo, and Il-chul Moon. Efficient episodic memory utilization of cooperative multi-agent reinforcement learning. arXiv preprint arXiv:2403.01112, 2024.

3. Concern on the retrieval-time scaling and the boundedness of the memory buffer.

Retrieval cost is bounded and controllable in FEMA, for two reasons:

(1) Retrieval operates in the compact latent space, not on raw states. Each memory entry is stored as the tuple (zs,a,φ(s,a),H)(z_s, a, φ(s,a), H), i.e., low-dimensional embeddings rather than raw high-dimensional states. At each step, the current state is encoded once into zsz_s, and distances to all stored entries are computed as a single batched matrix operation on GPU, followed by threshold masking and a top-O selection. The per-step retrieval cost is therefore O(n·d), where n denotes the number of entries in the active retrieval memory and d denotes the latent embedding dimension (d = 4 in our SAC implementation), with a very small per-element cost (a few floating-point operations for the ℓ2 distance). In practice this amounts to one fused matrix–vector distance computation per step: on the Humanoid task, the measured per-step wall-clock overhead of SAC+FEMA over SAC is 15.34%, with retrieval active.

(2) The size of the retrieval memory is bounded by design. First, only the last K steps of each failure episode are stored (K = 50 in our SAC implementation), so the memory holds compact failure events rather than full trajectories. Second, the failure episodic memory has a fixed capacity C, which is a separate hyperparameter independent of the memory-update interval M: across all MuJoCo tasks we use a fixed capacity of C = 300 failure episodes, maintained with first-in-first-out (FIFO) replacement, so the oldest events are evicted once the capacity is reached. The update interval M (ranging from 100 to 300 across tasks) only controls how often the memory and encoder are refreshed, not how large the memory can grow. This caps the retrieval working set at n ≤ C × K = 300 × 50 ≈ 15k entries of 4-dim vectors, far below the million-transition regime, and the memory never grows unboundedly. We acknowledge that the capacity C and the FIFO replacement were not explicitly stated in the paper; we will add them to Algorithm 1 and the appendix of the revised version. In addition, the rate at which new failure events are generated typically decreases as training proceeds, so memory updates become less frequent in later training.

Taken together, since the size of the retrieval memory is capped throughout training, both computational and GPU-memory consumption of FEMA are controllable, and retrieval was not a bottleneck at the evaluated capacities. Regarding the pruning mechanism the reviewer asks about: the FIFO replacement itself serves as a simple oldest-first pruning rule, and storing low-dimensional embeddings (instead of raw states) provides compression; at the memory scales evaluated in this work, no additional approximate-nearest-neighbor index or learned compression was required.

Authors · CommentOpenReview ↗

Dear reviewer,

Thank you for your valuable comments. We have provided further clarification regarding the point you raised. Please let us know if any additional clarification is needed. Thanks again!

Best regards,

Reviewer d9sROpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This work proposes FEMA (Failure Episodic Memory Alert) which is a method to augment the (model-free) RL training with failure data which is collected as a part of training. The authors propose to store the final transitions of prematurely terminated (collision/fall) episodes in an episodic memory, and learn a joint state–action embedding plus a risk head trained on the failures' Monte-Carlo returns, and at each step re-rank sampled candidate actions to steer the agent away from previously hazardous states. The idea inverts the usual success-centric episodic control by exploiting the abundant failures of early training. Experiments reports a mean 33.11% sample-efficiency gain across SAC/PPO/CrossQ on four MuJoCo tasks, plus a real-robot bipedal stair-climbing demonstration.

Strengths and weaknesses

Strengths

  1. The paper's positioning of the problem is creative and timely -- how do we use the failure data that is generated by default during the RL process to effecively trian RL policies.

Weaknesses

  1. The extension of FEMA to on-policy RL methods is not clear since replacing policy sampling with an argmax over NN scored candidates changes the behavior policy. This is a problem while computing the importance ratio in PPO and the surrogate objective assume actions are drawn from the policy, not from a re-ranked subset of it. If the log-probabilities used in the update do not reflect the actual (FEMA-induced) sampling distribution, the gradient is biased. The authors don't discuss whether/how this is corrected. And I suspect lack of any gains in sample-efficiency / performance in the real world experiments can potentially be attributed to this.

  2. With 5 seeds, there seems to be quite a large std. dev reported in Table 1 which fall well within noise and no significance tests or confidence intervals on the sample-efficiency percentages are reported.

  3. The real world experiment shows that the vanilla PPO policy is not Sim2Real transferable -- which creates suspicion if the model was trained correctly or to enough degree. Blind walking over stairs for bipedal robots has been shown with naive PPO by scaling to multiple environments.

  4. FEMA adds, per environment step, N encoder+risk-head passes plus a memory retrieval. Because the paper's selling point is efficiency, sample-efficiency gains should be paired with wall-clock and memory overhead, otherwise it is unclear whether step savings survive in practice.

Questions
  • Is FEMA active during evaluation rollouts and in the deployed real-robot policy, or is evaluation a plain πθ\pi_\theta rollout?

  • How easy is it to tune λrisk\lambda_{risk}? Do the authors perform a sweep over different λrisk\lambda_{risk} values?

  • The scoring rule Si=Di−λriskρiS_i = D_i - \lambda_{\text{risk}}\rho_i combines an L2 embedding distance with a risk value ρi\rho_i that is effectively a batch-normalized, failure-conditioned negative MC return (which is basically a −Q-Q value under a stale mixture of failure behavior policies). Because φ\varphi is trained so that low-return pairs cluster, DiD_i and ρi\rho_i are correlated by construction, so the two terms may be largely redundant; an ablation with λrisk=0\lambda_{\text{risk}} = 0 (distance-only) and with DiD_i removed (risk-only) is needed to show the combination beats either term alone.

  • The risk head appears to be a negated, batch-normalized MC estimate of QπQ^\pi restricted to failure states — does it provide signal beyond the critic the off-policy algorithms already learn, and is ρi\rho_i separable from DiD_i?

  • Further, adding to the above point - for SAC/CrossQ — which already learn a QQ - why train a separate MC head rather than querying the existing critic on failure states? An experiment with this would confirm the effectiveness of training a risk head.

Limitations

The authors don't have an explicit limitations section in the main paper. I'd encourage them to add one. For instance - some of the tasks like Ant tasks don't show significant improvement using FEMA, or the off-policy approximation being done to on-policy algorithms (PPO).

Final justification

After going over the rebuttal, and authors' replies to other reviewers -- I lean towards accepting the paper as the author has adequately addressed all my concerns. My major concern was the significance of the method in terms of performance with potentially overlapping confidence intervals and this was addressed by performing Welch tests and showing significance across a majority of FEMA based methods.

Hence I change my score to borderline accept.

Formatting concerns

None

6 comments
Authors · RebuttalOpenReview ↗
Rebuttal

1. PPO behavior-policy mismatch

We thank the reviewer for highlighting this important issue: on intervened steps FEMA changes PPO's behavior policy, so using the base-policy log-probability biases the surrogate. This concern applies only to PPO variants. We add:

  • Exact conditional mismatch. Conditioned on state/history and a fixed scoring function, let
F(u)=Pr⁡A∼πold[S(A)≤u],q(a)=Nπold(a)F(S(a))N−1.F(u)=\Pr_{A\sim\pi_{\rm old}}[S(A)\le u],\quad q(a)=N\pi_{\rm old}(a)F(S(a))^{N-1}.

For continuous scores, with the same action representation for scoring and likelihood,

DKL(q∥πold)=log⁡N−N−1N,D_{\rm KL}(q\Vert\pi_{\rm old})=\log N-\frac{N-1}{N},

which is 0.81 nats for N=5N=5 and 1.40 for N=10N=10; non-intervened steps contribute zero. This formula does not capture state-visitation or advantage-estimation bias.

  • Practical correction. The ideal weight is w∗=1/(NFN−1)w^*=1/(NF^{N-1}) on intervened steps and 1 otherwise. We estimate unknown FF using P=16P=16 fresh probes from πold\pi_{\rm old} under the same state, memory, and score. If kk probes score no higher than the selected action,
F^=(k+1)/18,wˉ=min⁡{2,1/[NF^N−1]},\widehat F=(k+1)/18,\qquad \bar w=\min\left\lbrace 2,1/[N\widehat F^{N-1}]\right\rbrace,

The PPO actor surrogate is multiplied by this stop-gradient weight on intervened steps and by 1 otherwise; original candidates are not reused as probes. Clipping tames the exact inverse weight's infinite second moment. Probe overhead is about 8% per step.

  • Correction experiment (10 seeds, mean ± s.d.).
Task PPO PPO+FEMA corrected PPO+FEMA
Humanoid 948.62 ± 205.33 1164.78 ± 436.91 1058.41 ± 266.52
Walker2d 3972.85 ± 236.44 4567.39 ± 163.27 4605.13 ± 299.21
Hopper 2491.36 ± 504.72 3261.48 ± 25.91 3400.26 ± 59.51
Ant 242.63 ± 141.28 468.52 ± 317.64 386.45 ± 158.56

Correction retains the supported PPO gains: +632 on Walker2d and +909 on Hopper (summary-based p=6.50×10−5p=6.50\times10^{-5} and 2.82×10−42.82\times10^{-4}; both Holm-adjusted p<0.001p<0.001 over four tasks). Walker2d intervention frequency falls from 62% at 100k to 32% at 400k and 8% at 600k; the per-intervention mismatch is unchanged. We do not claim the original and corrected variants are equivalent.

This finite-probe, clipped sensitivity analysis only approximates action reweighting; it does not correct state visitation or intervened-trajectory advantages. We claim neither an unbiased gradient nor convergence.

2. Seeds, significance, and sample efficiency

We reran the main Table 1 maximum-return comparisons under a common 10-seed protocol (mean ± s.d.):

Task SAC EMAC SAC+FEMA PPO PPO+FEMA CrossQ CrossQ+FEMA
Humanoid 5268.43±118.72 3926.15±1096.84 5471.36±82.47 948.62±205.33 1164.78±436.91 6239.85±278.46 7012.58±76.42
Walker2d 4146.28±318.95 4497.62±265.18 4776.91±472.36 3972.85±236.44 4567.39±163.27 4623.74±548.91 5068.33±236.85
Hopper 3258.91±123.46 2841.73±572.18 3428.66±95.84 2491.36±504.72 3261.48±25.91 3327.95±61.36 3492.17±48.38
Ant 4219.84±486.27 847.39±22.65 4808.72±386.14 242.63±141.28 468.52±317.64 4934.18±768.35 5141.76±792.47
  • Two-sided Welch tests with Holm correction over all 12 FEMA-vs-base comparisons support SAC: 4/4; PPO: 2/4 (Walker2d, Hopper); CrossQ: 2/4 (Humanoid, Hopper).
  • Per-comparison 95% CIs for these supported FEMA-minus-base differences are: SAC—Humanoid [106.05, 299.81], Walker2d [248.14, 1013.12], Hopper [65.45, 274.05], Ant [174.83, 1002.93]; PPO—Walker2d [401.91, 787.17], Hopper [408.88, 1131.36]; CrossQ—Humanoid [570.20, 975.26], Hopper [112.10, 216.34].
  • CrossQ/Walker2d is nominally significant (p=0.0362p=0.0362) but fails Holm correction. We claim no significance for it, CrossQ/Ant, PPO/Humanoid, or PPO/Ant.
  • These are summary-based Welch checks and per-comparison, not simultaneous, CIs. If shared seed IDs make the design paired, the revision will use raw paired-seed tests.
  • Time-to-threshold percentages from aggregate curves lack seed-level uncertainty. We will remove the heterogeneous 33.11% claim, label the rest descriptive, and limit inference to the supported maximum-return comparisons.

3. Vanilla PPO and the real-robot experiment

  • Under the same 4,096-environment pipeline, vanilla PPO reaches PPO+FEMA's 4,500-iteration reward at about 8,000 iterations and then climbs stably in Isaac Gym; the baseline can learn with longer training.
  • At the matched 4,500-iteration budget, Isaac-Gym-to-MuJoCo success is 10/10 for PPO+FEMA versus 2/10 for PPO. The latter was not deployed for safety.
  • Hardware is therefore a feasibility demonstration, not a controlled superiority claim. The 8,000-iteration PPO was not tested in the same MuJoCo assessment, so we claim neither equal transfer reliability nor novelty for stair climbing itself.

4. Computation and memory overhead

  • Parameters: FEMA adds 0.07M–0.12M parameters across tasks; on SAC/Humanoid this is +14.4%.
  • Memory: a FIFO stores the last K=50K=50 steps of 300 recent failure trajectories (15,000 entries). On Humanoid this is about 25 MB, below 1% of the same implementation's 10610^6-transition replay buffer. We will add eviction and stored tensors to Algorithm 1.
  • Compute: candidates are batch-scored; timing includes scheduled updates and bounded-memory re-encoding. SAC/Humanoid average per-step time rises 15.34%.
  • These measurements are configuration-specific. The descriptive ~33% step reduction does not prove universal wall-clock speedup; we will report hardware/absolute timing and avoid that claim. FEMA is disabled after training.

5. Is FEMA active during evaluation?

  • FEMA intervenes only in training rollouts.
  • It is disabled for Table 1, periodic curve evaluations, sim-to-sim, and hardware; the learned actor acts directly, so FEMA adds no inference-time overhead. We will state this explicitly.

6. Why use both distance and risk, and how is λ_risk chosen?

  • They encode different information. DiD_i is the local distance to retrieved failure neighbors. ρi\rho_i predicts the negative, batch-z-normalized Monte-Carlo return of failure trajectories; equidistant candidates can therefore have different ρi\rho_i. It is a relative proxy, not a calibrated failure probability.
  • Requested ablation (SAC/Humanoid, 5 seeds, mean ± s.d.):
Variant 200k 400k 600k
distance only 1639.98±425.37 5035.22±688.92 5324.48±11.30
risk only 2067.00±303.15 5206.39±225.70 5408.89±140.61
combined, λrisk=0.1\lambda_{\rm risk}=0.1 3161.54±326.09 5337.74±122.51 5491.76±112.55
combined, λrisk=1.0\lambda_{\rm risk}=1.0 1781.80±284.33 5297.37±49.44 5344.79±88.36
  • At 200k, the default exceeds all alternatives; the three summary-based Welch comparisons remain Holm-adjusted p<0.001p<0.001. Later gaps are smaller, so we claim early complementarity here, not universal late-stage superiority.
  • Every main task/algorithm uses λrisk=0.1\lambda_{\rm risk}=0.1; 1.0 loses much of the early benefit. We claim no interval-wide robustness and recommend a small log-scale sweep for a new domain.

7. Why a separate risk head instead of the critic?

  • Data/targets differ. SAC/CrossQ critics use full replay and bootstrapped entropy-regularized TD targets. The risk head uses the last KK failure transitions and a non-bootstrapped, negative batch-z-normalized Monte-Carlo-return target, focusing sparse failure regions and training retrieval representation φ\varphi. Its target still evolves with the policy and failure memory.
  • Direct test (SAC/Humanoid, 5 seeds; mean ± s.d.). We replaced the ranking output by
ρi←−Q~min⁡(s,ai),Si=Di+λQQ~min⁡(s,ai),\rho_i\leftarrow-\widetilde Q_{\min}(s,a_i),\qquad S_i=D_i+\lambda_Q\widetilde Q_{\min}(s,a_i),

where Qmin⁡=min⁡(Q1,Q2)Q_{\min}=\min(Q_1,Q_2) and Q~min⁡\widetilde Q_{\min} is z-normalized. Distance and failure-return supervision of φ\varphi remain, so this tests score replacement—not removal of all failure-conditioned supervision.

Variant 200k 400k 600k
critic, λQ=0.01\lambda_Q=0.01 1832.21±366.12 5129.53±116.37 5350.83±118.29
critic, λQ=0.1\lambda_Q=0.1 1552.68±387.26 3568.00±452.13 3492.67±629.13
critic, λQ=1.0\lambda_Q=1.0 1002.00±230.12 1996.31±369.21 2269.19±423.85
risk head, λrisk=0.1\lambda_{\rm risk}=0.1 3161.54±326.09 5337.74±122.51 5491.76±112.55
  • The risk head is best at all checkpoints. Exploratory summary-based tests versus the best critic variant give: 200k, 3162 vs. 1832 (p<0.001p<0.001); 400k, nominal p=0.025p=0.025; 600k, nonsignificant p=0.090p=0.090. We claim only stronger early ranking in this SAC/Humanoid experiment.

8. Limitations

We will add an explicit Limitations section:

  • PPO bias: correction is approximate; residual action, state-distribution, and advantage bias remain, with no convergence guarantee.
  • Scope: FEMA needs recurrent, informative premature failures. Gains are non-uniform and not every pair survives Holm; sparse-failure/non-episodic settings are outside its intended regime.
  • Cost/tuning: overhead and gains depend on memory, candidate count, retrieval threshold, and risk weight; step savings do not imply wall-clock savings.

We thank the reviewer for the constructive feedback.

Authors · CommentOpenReview ↗

Supplementary Analysis of the PPO Behavior–Policy Mismatch(1)

1. PPO behavior-policy mismatch

Because of the previous rebuttal length limit, we could only state the main formulas and could not explain their notation and derivation in sufficient detail.

Why the mismatch occurs

Let sts_t be the state at step tt, and let πold(⋅∣st)\pi_{\mathrm{old}}(\cdot\mid s_t) be the PPO policy used to collect the current rollout. When FEMA intervenes, it independently samples NN candidate actions and executes the one with the highest FEMA score:

At,1,…,At,N∼i.i.d.πold(⋅∣st),At⋆=arg⁡max⁡i∈{1,…,N}  St(At,i).(1)A_{t,1},\ldots,A_{t,N}\overset{\mathrm{i.i.d.}}{\sim}\pi_{\mathrm{old}}(\cdot\mid s_t),\qquad A_t^\star=\underset{i\in\{1,\ldots,N\}}{\arg\max}\;S_t(A_{t,i}).\tag{1}

Here, At,iA_{t,i} is candidate ii, NN is the number of candidates, and StS_t is the FEMA score defined in the paper. It combines distance from retrieved failure events with the output of the risk head. Its detailed construction is not needed for the following derivation. We only use the fact that FEMA selects the candidate with the largest score.

Although every candidate follows πold\pi_{\mathrm{old}}, the selected action At⋆A_t^\star does not. It is the best of NN policy samples. This selection changes the behavior distribution on intervened steps.

We condition on the information fixed at the time of selection. This includes the current state, failure memory, retrieved neighbors, and scoring function. We denote this context by CtC_t. We also assume that the score distribution is continuous, so ties occur with probability zero.

The behavior distribution induced by FEMA

For one action sampled from the old policy, define the cumulative distribution function of its score:

Ft(u)=Pr⁡A∼πold(⋅∣st)[St(A)≤u∣Ct].(2)F_t(u)=\Pr_{A\sim\pi_{\mathrm{old}}(\cdot\mid s_t)}\left[S_t(A)\leq u\mid C_t\right].\tag{2}

The value Ft(St(a))F_t(S_t(a)) is the score percentile of action aa. For example, a value of 0.90.9 means that 90%90\% of old-policy actions have scores no greater than St(a)S_t(a).

Let qt(a∣Ct)q_t(a\mid C_t) denote the density of the action executed by FEMA. For a candidate with value aa to be selected, the other N−1N-1 candidates must all have scores no greater than St(a)S_t(a). The probability of this event is Ft(St(a))N−1F_t(S_t(a))^{N-1}. Since any of the NN candidates can be the winner,

qt(a∣Ct)=Nπold(a∣st)[Ft(St(a))]N−1.(3)q_t(a\mid C_t)=N\pi_{\mathrm{old}}(a\mid s_t)\left[F_t\left(S_t(a)\right)\right]^{N-1}.\tag{3}

The factors in Eq. (3) have simple meanings:

  • πold(a∣st)\pi_{\mathrm{old}}(a\mid s_t) is the density for generating one candidate.
  • Ft(St(a))N−1F_t(S_t(a))^{N-1} is the probability that this candidate beats the other N−1N-1 candidates.
  • NN accounts for the fact that any candidate can be selected.

Equation (3) directly gives

qt(a∣Ct)πold(a∣st)=N[Ft(St(a))]N−1.(4)\frac{q_t(a\mid C_t)}{\pi_{\mathrm{old}}(a\mid s_t)}=N\left[F_t\left(S_t(a)\right)\right]^{N-1}.\tag{4}

This ratio is generally not one. High-scoring actions are more likely under qtq_t than under πold\pi_{\mathrm{old}}. Equation (4) is the action-level behavior-policy mismatch raised by the reviewer.

Interpretation of the KL formula

For an ordinary policy sample AA, the probability integral transform gives

U=Ft(St(A))∼Uniform⁡(0,1).(5)U=F_t(S_t(A))\sim\operatorname{Uniform}(0,1).\tag{5}

The percentile of the selected action is the maximum of NN such variables:

U⋆=Ft(St(At⋆))∼Beta⁡(N,1).(6)U^\star=F_t(S_t(A_t^\star))\sim\operatorname{Beta}(N,1).\tag{6}

The Beta⁡(N,1)\operatorname{Beta}(N,1) distribution has density NuN−1Nu^{N-1} on 0<u<10 < u < 1. Therefore,

E[log⁡U⋆]=∫01NuN−1log⁡u du=−1N.(7)\mathbb E[\log U^\star]=\int_0^1 Nu^{N-1}\log u\,du=-\frac{1}{N}.\tag{7}

Substituting Eqs. (4) and (7) into the definition of KL divergence gives

\begin{aligned}D_{\mathrm{KL}}\left(q_t\Vert\pi_{\mathrm{old}}\right)&=\mathbb E_{A\sim q_t}\left[\log\frac{q_t(A\mid C_t)}{\pi_{\mathrm{old}}(A\mid s_t)}\right]\=\log N-\frac{N-1}{N}.\end{aligned}\tag{8}

This value is 00 for N=1N=1, 0.810.81 nats for N=5N=5, and 1.401.40 nats for N=10N=10. The formula is independent of the particular scoring function because it describes the distribution of score percentiles. The scoring function still determines which physical actions receive high percentiles.

Non-intervened steps follow πold\pi_{\mathrm{old}} and contribute zero mismatch. If ptp_t is the intervention frequency, the frequency-weighted action-level divergence is

dˉt=pt(log⁡N−N−1N).(9)\bar d_t=p_t\left(\log N-\frac{N-1}{N}\right).\tag{9}

For Walker2d, N=5N=5. Its measured intervention frequency decreases from 62%62\% at 100k steps to 32%32\% at 400k and 8%8\% at 600k. Equation (9) gives approximately 0.500.50, 0.260.26, and 0.0650.065 nats per environment step. The mismatch per intervention remains unchanged, but interventions become less frequent.

Equation (8) exactly characterizes the conditional action-distribution mismatch. It does not quantify the full bias of the PPO update. FEMA also changes future states and the trajectories used to estimate advantages.

Authors · CommentOpenReview ↗

Supplementary Analysis of the PPO Behavior–Policy Mismatch(2)

Correction of the PPO surrogate

We denote the usual PPO likelihood ratio by rt(θ)r_t(\theta):

rt(θ)=πθ(at∣st)πold(at∣st).(10)r_t(\theta)=\frac{\pi_\theta(a_t\mid s_t)}{\pi_{\mathrm{old}}(a_t\mid s_t)}.\tag{10}

Here, θ\theta is the policy being optimized, and πold\pi_{\mathrm{old}} is fixed during the PPO update. Standard PPO uses

ℓtPPO(θ)=min⁡(rt(θ)A^t, clip⁡(rt(θ),1−ϵ,1+ϵ)A^t).(11)\ell_t^{\mathrm{PPO}}(\theta)=\min\left(r_t(\theta)\widehat A_t,\,\operatorname{clip}\left(r_t(\theta),1-\epsilon,1+\epsilon\right)\widehat A_t\right).\tag{11}

where A^t\widehat A_t is the estimated advantage and ϵ\epsilon is the PPO clipping parameter.

Equation (10) assumes that ata_t was sampled from πold\pi_{\mathrm{old}}. This is correct on non-intervened steps. On intervened steps, however, ata_t was sampled from qtq_t. The required likelihood ratio can be written as

πθ(at∣st)qt(at∣Ct)=πold(at∣st)qt(at∣Ct)×πθ(at∣st)πold(at∣st).(12)\frac{\pi_\theta(a_t\mid s_t)}{q_t(a_t\mid C_t)}=\frac{\pi_{\mathrm{old}}(a_t\mid s_t)}{q_t(a_t\mid C_t)}\times\frac{\pi_\theta(a_t\mid s_t)}{\pi_{\mathrm{old}}(a_t\mid s_t)}.\tag{12}

The factor rt(θ)r_t(\theta) is the usual PPO ratio. The additional factor wt⋆w_t^\star corrects the best-of-NN action distribution back toward the old policy. From Eq. (3),

wt⋆=1N[Ft(St(at))]N−1on intervened steps,wt⋆=1otherwise.(13)w_t^\star=\frac{1}{N[F_t(S_t(a_t))]^{N-1}}\quad\text{on intervened steps},\qquad w_t^\star=1\quad\text{otherwise}.\tag{13}

For a fixed visited context, this is an exact change of measure:

EA∼qt[wt⋆g(A,Ct)]=EA∼πold[g(A,Ct)].(14)\mathbb E_{A\sim q_t}\left[w_t^\star g(A,C_t)\right]=\mathbb E_{A\sim\pi_{\mathrm{old}}}\left[g(A,C_t)\right].\tag{14}

for any integrable function gg. Thus, the weight corrects the current action marginal. It does not correct how the state was reached or replace advantages obtained from an intervened trajectory.

Practical estimation of the weight

The CDF value in Eq. (13) is unknown. We estimate it using P=16P=16 fresh probe actions drawn from the old policy under the same state and scoring context. Let ktk_t be the number of probes whose scores do not exceed that of the selected action:

kt=∑j=1P1{St(Bt,j)≤St(at)},F^t=kt+1P+2=kt+118.(15)k_t=\sum_{j=1}^{P}\mathbf{1}\{S_t(B_{t,j})\leq S_t(a_t)\},\qquad \widehat F_t=\frac{k_t+1}{P+2}=\frac{k_t+1}{18}.\tag{15}

The indicator 1{⋅}\mathbf{1}\{\cdot\} is one when its condition holds and zero otherwise. The +1+1 and +2+2 terms apply Laplace smoothing and prevent estimates of exactly zero or one. The original candidates are not reused as probes. They are dependent on the selected maximum and would bias the percentile estimate upward.

The exact inverse weight has infinite second moment for N≥2N\geq2:

EA∼qt[(wt⋆)2]=1N∫01u−(N−1)du=∞.(16)\mathbb E_{A\sim q_t}\left[(w_t^\star)^2\right]=\frac{1}{N}\int_0^1u^{-(N-1)}du=\infty.\tag{16}

Rare cases in which all NN candidates have low score percentiles can therefore produce very large weights. To control variance, on intervened steps we use

wˉt=min⁡{2,1/[NF^tN−1]}.(17)\bar{w}_t=\min\left\lbrace 2,1/[N\widehat{F}_t^{N-1}]\right\rbrace.\tag{17}

On non-intervened steps, wˉt=1\bar{w}_t=1.

The corrected actor surrogate is

Lcorr(θ)=E[sg⁡(wˉt)ℓtPPO(θ)].(18)L_{\mathrm{corr}}(\theta)=\mathbb E\left[\operatorname{sg}(\bar w_t)\ell_t^{\mathrm{PPO}}(\theta)\right].\tag{18}

where sg⁡\operatorname{sg} denotes stop-gradient. The weight scales the actor loss but is not differentiated. The 16 probes are scored in a batch and add approximately 8%8\% per-step computation.

Because F^t\widehat F_t is estimated and the weight is clipped, Eq. (18) only approximates the action-level correction. Clipping reduces variance but introduces bias. State visitation and advantages from intervened trajectories also remain uncorrected. We therefore use the corrected variant as a sensitivity analysis, not as an unbiased PPO estimator.

Correction experiment

We reran vanilla PPO, the original PPO+FEMA, and the corrected PPO+FEMA with the same 10-seed protocol. Values are mean ±\pm standard deviation:

Task PPO PPO+FEMA corrected PPO+FEMA
Humanoid 948.62 ±\pm 205.33 1164.78 ±\pm 436.91 1058.41 ±\pm 266.52
Walker2d 3972.85 ±\pm 236.44 4567.39 ±\pm 163.27 4605.13 ±\pm 299.21
Hopper 2491.36 ±\pm 504.72 3261.48 ±\pm 25.91 3400.26 ±\pm 59.51
Ant 242.63 ±\pm 141.28 468.52 ±\pm 317.64 386.45 ±\pm 158.56

The corrected variant retains the supported PPO gains on Walker2d and Hopper. Its improvements over vanilla PPO are +632+632 and +909+909, respectively. The summary-based pp-values are 6.50×10−56.50\times10^{-5} and 2.82×10−42.82\times10^{-4}. Both remain below 0.0010.001 after Holm adjustment over the four PPO task comparisons. This result suggests that the supported gains are not primarily an artifact of using the uncorrected action likelihood.

Comments on the paper

1 comment
Authors · CommentOpenReview ↗

The summary of the author-reviewer-AC discussion period (Phase 2)

Dear AC,

We greatly appreciate your hard work in managing our submission.

We would like to present a brief summary of the rebuttal details and discussions following the rebuttal stage:

Reviewer d9sR:

Concern about the PPO importance-sampling ratio under FEMA-induced action re-ranking:

  • We explicitly derived and quantified the behavior-policy mismatch introduced on FEMA-intervened steps, implemented an approximate clipped per-decision importance correction using fresh probes sampled from the old policy, and reran PPO+FEMA. The corrected variant retains the statistically supported gains on Walker2d and Hopper.
  • We expanded the main comparisons from 5 to 10 random seeds and reported two-sided Welch tests, 95% confidence intervals, and Holm correction across all 12 FEMA-versus-baseline comparisons. These results provide substantially stronger evidence for FEMA.

Concern about the real-world deployment of PPO:

  • We extended the training of vanilla PPO. After 8,000 iterations, it achieved performance comparable to that of PPO+FEMA after 4,500 iterations, indicating that vanilla PPO can also learn a policy robust enough for real-robot transfer when given sufficient training.
  • We clarified that the real-robot experiment was designed to demonstrate FEMA's improvement in sample efficiency. Together with the extended training iterations, the results show that FEMA reaches comparable performance with 44.38% fewer training iterations, substantially reducing the required environment interactions.

Concern about computation and memory overhead:

  • We provided a detailed accounting of the additional parameters and bounded memory use. FEMA adds only 0.07M–0.12M parameters across tasks; on SAC/Humanoid, the increase is 14.4%. Its bounded FIFO memory stores at most 15,000 entries, requiring approximately 25 MB—less than 1% of the replay-buffer memory in the same implementation.
  • On SAC/Humanoid, we measured a 15.34% increase in average per-step training time, including memory retrieval, batched candidate scoring.

The reviewer finally stated, "My final decision would be based on AC-reviewer discussion -- however, I'm inclined to increase the score to an Accept (as of now)."

Reviewer tF2m:

Regarding the reviewer’s concerns about hyperparameter settings, we added relevant ablation experiments and explained how the hyperparameters of the FEMA module were selected. Regarding the deployment of PPO on a real robot, we extended the training iterations and clarified the purpose of the real-world experiment.

The reviewer finally responded, "I appreciate the thorough reply which does shed light onto the concerns raised. I will take it into account in my post-discussion recommendation."

Reviewer kv8m:

Regarding the reviewer’s concerns about dangerous-state identification and resource consumption in the FEMA module, we provided a detailed explanation of how FEMA identifies dangerous states, together with a theoretical analysis. Drawing on our experimental results, we presented a detailed analysis of the computational cost and GPU memory usage of the proposed FEMA module.

We respectfully ask the AC to take these post-rebuttal discussions into consideration.

Thank you very much for your time and effort in handling our submission.

Best regards, The Authors

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…