acceptodds
Under review as a conference paper at ICLR 2027

Learning Before Failure: Preventing Failure by Learning What Went Wrong and Why

Abstract

When people learn from a failure, whether their own or someone else’s, a useful lesson captures why it happened, what correction the evidence supports, where that correction applies, and how soon they must act. Can explicitly checking when a lesson applies help turn prior experience into timely preventive action? We introduce Learning Before Failure (LBF), a framework for turning stored lessons into timely decisions in language agents, and test one implementation, LBF-Gate. Before each decision, the gate checks lessons against the current situation and marks applicable lessons as rules to follow. The full lesson bank remains readable, and the language model chooses the action and its timing. In a constructed flood search-and-rescue environment, we compare LBF-Gate with an agent that reads the same structured lessons unmarked and with one that stores model-written free-text reflections on prior failures. The first comparison holds lesson content fixed to distinguish what is remembered from how it is used. Model weights and stored lessons remain frozen during testing on new missions. Across 375 independent blocks per recurrence class per model, LBF-Gate reduces normalized held-out loss against the same lessons unmarked by 0.108 on GPT-5.4 mini and 0.087 on Claude Sonnet 4.6. Every class-specific lower bound is positive on both models, and loss increases on cases requiring a different correction or no intervention remain within the prespecified tolerance. LBF-Gate also outperforms free-text reflection. A separately prespecified control study shows that marking the wrong lesson substantially reduces the benefit; on GPT-5.4 mini, wrong marking performs worse than leaving lessons unmarked. The gains cannot be explained by shorter inputs or by marking an arbitrary lesson. Preventive reuse must therefore be evaluated both for timely action on relevant lessons and for the consequences of applying lessons where they do not belong.

Primary area:
transfer learning, meta learning, and lifelong learning
Keywords:
language agents, agent memory, learning from experience, lifelong learning, lesson reuse, evaluation protocol, failure prevention, reflection

Reviews

Among:
Shape:
1234this paper, Bottom 2%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.33 over 3 reviews, above 2% of the others.
Reviewer_wjq1OpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

This paper proposes LBF-Gate, which organizes historical failure experiences into structured rules, matches them to current tasks using predefined conditions, and provides the matched rules to an LLM as decision constraints. Experiments show that the method outperforms standard structured memory and free-text reflection on two language models.

Critical strengths
  1. The paper conducts a series of experiments and is clearly written and easy to follow.
Critical weaknesses

W1. LBF-Gate essentially performs rule matching based on predefined conditions and prompt-level constraint injection, without introducing a fundamentally new learning or reasoning algorithm. And it generalization maybe a main concern.

W2. Experiments are restricted to a synthetic rescue environment and relatively small memory banks. The Gemma experiments do not demonstrate an advantage of LBF-Gate over standard structured memory. Moreover, the additional benefit of gating nearly disappears in the ANCHOR setting, where the relevant experience is explicitly identified.

Questions for authors
  1. Can you provide sufficient comparisons with more competitive experience-selection methods, such as LLM-based selection, dense retrieval, and learned reranking.
6 comments
AuthorsOpenReview ↗

Author Response

Thank you for challenging the novelty and generalization of the work and for requesting a stronger selection baseline. The simple matching implementation was prominent in our earlier presentation, while the scientific question it isolates was not. We understand why that made the contribution difficult to distinguish from ordinary rule matching.

W1: Contribution beyond matching. The match operation is intentionally transparent: holding the acquired lesson bank and model weights fixed lets us isolate a question that memory retrieval alone cannot answer: when does the same remembered experience produce a correct, feasible action that prevents harm before a deadline? Memory-to-action benchmarks such as Mem2ActBench evaluate memory-guided tool choice and parameter grounding. LBF measures the downstream preventive outcome and the failure stages in between. Figure 2 demonstrates why that additional endpoint matters. Claude's gated planner chooses 4,477 correct actions, more than GPT's 4,333, yet prevents only 3,653 events versus GPT's 4,316; 788 correct, validly scheduled Claude actions finish late. Action accuracy would miss that reversal. Wrong-mark controls reveal another failure mode: misleading guidance often triggers costly escalation and delay instead of immediate execution of an incorrect correction.

The requested competitive selector is now tested. Section 5.8/Table 3 evaluates a two-stage LLM selector that sees the full lesson bank and public observations with no match hint. Its chosen lesson is passed unchanged to the planner; the extra model call is not charged to simulated deadlines. Over 250 registered paired blocks per class/model, GPT's selector identifies the applicable record in 84.56% of usable cases. Its loss is 0.11769 versus 0.08824 with gating (gain 0.02945; prespecified D10 lower bound 0.00213; protected checks pass). Claude self-selects correctly in 99.53% and essentially ties gating (0.15991 versus 0.15997). This model contrast is a finding: the value of external applicability help depends on the planner's existing selection ability.

We also compare BM25 top-four lexical retrieval on matched descriptive panels, where gating has lower loss by 0.0132 (GPT) and 0.0274 (Claude). BM25 changes the readable set and therefore is not equivalent to the full-bank comparison. Dense retrieval and learned reranking are not evaluated (Sec. 5.7; Conclusion); those remain stronger future baselines.

W2: Why ANCHOR and Gemma are informative. We recognize why the near-zero ANCHOR gain looked like a weak result without the missing premise: ANCHOR already supplies the identified lesson to every arm. Once source identification is solved, the gate is predicted to add little; its descriptive advantage falls to 0.0003 on GPT and 0.0050 on Claude. Gemma demonstrates why solving a prior stage does not guarantee prevention: gating increases correct actions from 1,315 to 1,343, but direct preventions decline from 1,024 to 1,009, with more invalid schedules (73 to 115 among unsuccessful correct actions). This points to schedule feasibility as a specific model-interface improvement target, not a proven repair.

Our constructed rescue task, eight-/sixteen-record banks, supplied symbolic predicates, and unique-match cases make the controlled comparisons interpretable and provide private prevention deadlines. They do not establish independent-domain transfer, multiple-match robustness, or superiority over learned retrieval. We now distinguish those future tests from what the completed evidence supports. We hope the revised paper makes the evaluation and diagnosis of preventive competence clear enough to assess on its scientific merits.

Thank you for the additional experiments and clarifications. However, my main concerns remain unresolved.

The authors explicitly acknowledge that the evaluation is restricted to a synthetic rescue environment, small memory banks (8/16 records), predefined symbolic applicability predicates, and exactly one matching lesson per evaluated case. Generalization to realistic settings, uncertain applicability, and multiple matching experiences remains untested. These limitations directly affect the generality and practical significance of the proposed method.

Furthermore, the authors have not evaluated dense retrieval or learned reranking, which are important competitive baselines for the proposed experience-selection mechanism. The additional LLM-based selection experiment provides useful evidence, but does not sufficiently address this gap. The Gemma results also fail to demonstrate an advantage over standard typed memory.

I appreciate the authors' efforts in expanding the analysis. However, these limitations concern the fundamental validation and generalizability of the proposed approach. Addressing them would require substantial additional experiments rather than further explanations or reinterpretations of the existing results.

In my view, the current evidence remains insufficient to meet the acceptance threshold. I therefore maintain my original score.

Thank you for taking the time to reconsider our response.

We respect your concerns, but hope you can also appreciate the scope of a focused conference paper. We have conducted extensive controlled experiments addressing our research questions. Broader generalization, experience retrieval, and multiple matching lessons are important research directions, but each could warrant a substantial investigation of its own. Relevant foundations, including SagaLLM, Mnemosyne, TRW-Trace, and the AGI Trilogy, have also been independently documented.

We have made substantial efforts to clarify and strengthen the paper within the conference page limit. If a thorough study of a focused question is expected to resolve several additional research problems, perhaps the community should reconsider what can reasonably fit into a conference paper.

We recognize that you may still recommend rejection. However, receiving scores of 2, 1, 1, 1 across Presentation, Informativeness, Soundness, and Overall, despite the extensive experiments, revisions, and additional evidence, is deeply discouraging. Such scores convey an impression that the work has almost no scientific merit. We respectfully believe that this assessment is disproportionately severe.

We are not asking you to overlook the paper's limitations. We simply hope that the scientific effort, demonstrated findings, and potential for further research can receive some recognition and encouragement, even if you ultimately maintain your recommendation. A critical review can still acknowledge the value of a scientific contribution.

Thank you again for your consideration.

Reviewer_SCV2OpenReview ↗
Rating
2
Confidence
3(−1)
Informativeness
2
Presentation
2(+1)
Soundness
2
Read review
Paper summary

This paper studies how language agents can use past failure lessons to take timely preventive action. LBF-Gate checks the applicability of structured lessons and presents matching records as constraints, while the model chooses the action and start time. Experiments in a constructed flood search-and-rescue environment compare gating with ordinary structured memory and free-text reflection, supplemented by marking, retrieval, source-quality, and component controls.

Critical strengths

The paper addresses a practical question: whether stored experience leads to appropriate and timely action, including the costs of inappropriate reuse. The same-bank comparison helps isolate how lessons are presented and used. The evaluation is detailed and reports informative negative results, including cases where better action selection does not improve prevention.

Critical weaknesses
  1. The incremental contribution and underlying mechanism remain unclear. Gating combines identifying relevant lessons, increasing their salience, and presenting them as constraints. The current evidence does not fully separate these effects. The near-zero advantage under ANCHOR and substantial gains from BM25 suggest that relevance identification may explain much of the improvement. The additional value of constraint-based presentation needs stronger support.

  2. The source of timely-prevention gains needs further analysis. Final loss combines action choice, resource feasibility, and completion timing, making it difficult to determine where the main gains arise. The Gemma results show why this distinction matters: more correct actions did not yield better prevention. Moreover, the timing ablation retains timing information in the readable lessons, primarily testing explicit annotation rather than the broader timing mechanism.

  3. Validation beyond the controlled setting is limited. The main evaluation uses one constructed environment with supplied applicability conditions and unique matches. This supports controlled analysis but leaves uncertainty about performance with realistic lesson-selection errors and different task mechanisms. Stronger experience-selection baselines and an independent task or substantially different generator would help establish the method’s broader value.

Questions for authors
  1. With the selected lesson and its content held fixed, does presenting it as a binding constraint outperform a neutral presentation? This comparison would clarify the contribution of the constraint interface itself.
  2. Could the main-model results jointly analyze action correctness, schedule validity, and timely completion to identify where gating helps and why improved action selection sometimes fails to improve prevention?
2 comments
AuthorsOpenReview ↗

Author Response

Thank you for identifying two questions that our earlier presentation did not separate clearly: what creates the benefit of gating, and which later decision stages determine whether that benefit actually prevents harm. We understand why presenting matching and constraint wording together made the mechanism difficult to identify. The revision tests these questions separately.

Q1: Identification versus binding-constraint wording. In Sec. 5.8/Table 3, the relevance-cue arm receives the same identified lesson, readable bank, correction, and timing information as the constraint arm; only its presentation changes. GPT's estimated loss advantage for constraints is 0.00226 (D10 lower bound -0.02362), and Claude's is 0.01747 (lower bound -0.00924). Neither passes the prespecified framing-superiority test. Thus, the evidence supports identifying the applicable lesson as the principal source of improvement; it does not establish that binding wording adds a further reliable benefit.

We also see why ANCHOR appeared to weaken the claim as originally explained. ANCHOR gives every arm the identified source, removing the selection problem the gate is intended to solve. The additional gated advantage then contracts to 0.0003 (GPT) and 0.0050 (Claude). GPT direct prevention differs by one case (2,175 versus 2,174). On Claude, correct-action counts are 2,228 versus 2,216, while separately scored schedule-valid counts (2,250 each) and on-time counts (2,245 each) coincide (Sec. 5.9). This descriptive saturation pattern is what the applicability account predicts; the matched relevance-cue experiment supplies a separate test of presentation. BM25 is informative but answers a different question: it changes which four records remain readable, whereas the primary gate keeps the full bank. On matched descriptive panels, gating has lower loss than BM25 by 0.0132 (GPT) and 0.0274 (Claude).

A further two-stage LLM-selection control makes the distinction operational. The selector reads the whole bank and public observations without a match hint, and its extra call incurs no simulated deadline cost. GPT selects the applicable lesson in 84.56% of usable cases; gating improves loss over this selector by 0.02945 (D10 lower bound 0.00213; protected checks pass). Claude selects correctly in 99.53% and achieves essentially the same loss with either approach. This identifies the condition under which extra selection assistance is useful.

Q2: Why correct actions do not always prevent failure. We have made the missing intermediate outcomes explicit. Equation 2 decomposes correct-action choices into invalid schedules, valid-but-late completions, and direct preventions; Figure 2 and Appendix C/Table 13 report these counts over the full 4,500 planned slots per arm. GPT's gated planner chooses 4,333 correct actions: 17 invalid schedules, zero valid-but-late, and 4,316 direct preventions. Claude chooses 4,477 correct actions, yet prevents only 3,653 events: 36 schedules are invalid and 788 validly scheduled actions finish late. Relative to unmarked memory, gating adds 649 correct actions and 656 preventions on GPT, and 433 correct actions and 473 preventions on Claude. The valid-but-late pattern also appears in Claude's unmarked and reflection arms (843 and 838). Gemma reveals a different bottleneck: correct choices rise from 1,315 to 1,343 with gating, but direct preventions fall from 1,024 to 1,009 as invalid schedules among unsuccessful correct choices rise from 73 to 115.

Your observation about the timing ablation is correct. The control removes explicit annotation while timing information stays readable in the bank. The revised Sec. 5.7 now states this distinction directly; the broader timing question is answered through independent completion-deadline scoring and joint stage counts, not by that ablation alone.

The evaluation is controlled within one constructed task and supplied applicability predicates; independent domains and ambiguous matches remain important extensions. We hope the revised organization, new comparator, and direct answers to both questions make the mechanism and preventive-outcome contribution easier to assess.

Thank you for the additional experiments and clarifications. I have read the rebuttal and the revised paper. I appreciate the authors directly answer my Q1 and Q2. However, there are still several problems that have not been resolved.

The new experiment (Sec. 5.8/Table 3) shows that binding-constraint wording gives no reliable loss advantage. And compared with LLM-selection, this gain is small on GPT and Claude. This suggests that the improvement mainly comes from identifying the applicable lesson, which the generator already supplies in this setup.

The evaluation remains limited The rebuttal acknowledges that the evaluation is limited to one constructed environment, and it is unclear whether the findings generalize to more realistic agentic tasks

Therefore, I will maintain my original score.

Reviewer_kLNhOpenReview ↗
Rating
1
Confidence
4
Informativeness
2(+1)
Presentation
1
Soundness
2
Read review
Paper summary

The paper introduces Learning Before Failure (LBF), a framework for turning stored lessons from past failures into timely decisions. Each lesson is a typed tuple (trigger, scope, correction, responsible component, deadline, provenance). The implementation, LBF-Gate, checks each lesson's trigger and scope against the current observation and marks matching lessons as constraints, while the full lesson bank stays readable.

Critical strengths
  1. The core idea of learning from past failures to prevent future failures is useful. The paper also evaluates both the benefit of applying a lesson and the harm of applying it where it does not belong.
Critical weaknesses
  1. The improvement seems limited. LBF-Gate reduces normalized held-out loss against the same lessons unmarked by 0.108 on GPT-5.4 mini and 0.087 on Claude Sonnet 4.6. Several results in the paper suggest the gain is modest or fragile:
    • Against reflection, the gain is only 0.050 on GPT, and the prespecified claim of a margin above 0.05 over reflection fails (lower bound 0.0336; Sec. 5.3, Appendix B).
    • Under the Hoeffding sensitivity check, every transfer lower bound is negative.
    • When the relevant source is identified to all arms (ANCHOR), the gain over active memory shrinks to 0.0003 and 0.0050.
    • In the Gemma follow-up, gating is 0.006 worse than ordinary typed memory.
  2. Many related works already study failure analysis and learning from failure, for example AgentDebug (failure analysis and recovery), Agent Learning via Early Experience, and MemoryBank. The novelty of LBF relative to these is not clear.
  3. Missing related work and a questionable citation.
    • AgentDebug, MAST, Who&When, AgentRx and Agent Learning via Early Experience are not cited or discussed.
    • The paper relies on "Anonymous. Epistemic regret minimization: Label-free causal critique beyond outcome reward. Anonymous manuscript under review, 2026" as the upstream source of supported lessons (Sec. 2, Appendices H.5 and I.5). This reference cannot be verified and may be outdated or incorrect. Please clarify its status, provide an anonymized copy, or remove the dependence on it.
  4. The gating method is quite straightforward and lacks technical novelty. The gate is an exact-match check of component, ordered scope and two threshold predicates over public symbolic fields supplied by the generator (Sec. 3.4, Appendix H.3). By construction, every recorded context matches exactly one record. In effect it is rule-based marking of a single pre-identified lesson.
  5. Evaluation is limited to a single constructed environment (CT5-LBF-SAR-01). It would be important to see results on common agentic benchmarks such as SWE-bench, ALFWorld, WebShop or OSWorld.
Questions for authors
  1. Please include all experiment details for GPT and Claude. The paper reports medium reasoning effort, 12,000 input / 8,192 output token ceilings, and states that temperature is "omitted where unsupported." What are the actual temperature, top-p, seed and log-prob settings for each provider, and how many samples are drawn per decision?
  2. Can you add more open-source models, such as Qwen, Kimi K3 and GLM? The only open-weight result is the Gemma 4 E4B follow-up (Appendix N), and it is inconclusive.
  3. How were the weights in Eq. 5 chosen (0.60 / 0.25 / 0.10, plus intervention costs of 0.05 / 0.02)? Can you justify them, or are they purely heuristic? A sensitivity analysis showing that the conclusions hold under other weightings would help.
9 comments
AuthorsOpenReview ↗

Author Response

Thank you for the detailed critique. Our original presentation juxtaposed the positive transfer results with ANCHOR, Gemma, and sensitivity checks without explaining the different question each tests. We can see how that obscured the contribution; the revision makes those premises explicit.

1. Gain versus reflection and the stronger margin. Holding the same typed bank and model weights fixed, gating reduces held-out loss from 0.19480 to 0.08636 on GPT (56%) and from 0.25144 to 0.16480 on Claude (34%). Against reflection, observed pooled gains are 0.05046 (GPT) and 0.08085 (Claude). The weight-independent direct-prevention rates rise from 81.33% to 95.91% and 70.67% to 81.18%. Both prospectively locked positive-transfer claims pass, including all 48 protected-case bounds (largest upper bound 0.05352 against tolerance 0.10). You are right that the stricter claim of a gain greater than 0.05 over reflection was not certified: GPT's D10 lower bound is 0.03357, so the fixed sequence stopped. We preserve that non-rejection.

2. Negative Hoeffding lower bounds. The range-only Hoeffding calculation uses 375 independent paired blocks and differences in [-1,1]. Its radius is the same constant 0.1264 at every endpoint, regardless of dispersion, and cannot certify an observed gain smaller than that radius. Its negative lower bounds are a conservative non-certification, not evidence that the measured differences were negative. Prespecified D10 uses realized variability; bootstrap intervals remain descriptive.

3. Near-zero ANCHOR advantage. We had not explained its premise prominently enough: ANCHOR gives every arm the applicable source record. If the gate primarily helps identify the right lesson, its incremental benefit should almost disappear once identification is supplied. The observed contrasts, 0.0003 (GPT) and 0.0050 (Claude), follow that prediction. ANCHOR is a descriptive mechanism control, complemented by the new matched relevance-cue intervention: identifying the right record explains the more consistent benefit, while superiority of binding-constraint wording was not established.

4. Mixed Gemma result. Rather than reporting only the 0.006 pooled disadvantage against unmarked memory, the revision exposes the underlying diagnosis: gating increases correct actions from 1,315 to 1,343, but direct preventions decline from 1,024 to 1,009; invalid schedules among unsuccessful correct choices rise from 73 to 115. This identifies a schedule-feasibility bottleneck and a testable protocol repair. The stage analysis also finds 788 correct, validly scheduled Claude actions finish late, illustrating why prevention cannot be inferred from action accuracy.

Method, related work, and source integrity. The deliberately simple symbolic matcher isolates use of fixed stored lessons, not learning of new predicates. Related Work now discusses all five requested papers (AgentDebug, MAST, Who&When, AgentRx, Early Experience) and MemoryBank. The formerly anonymous ERM citation is now public and verifiable (arXiv:2602.11675v4); LBF does not run ERM or use its outputs. The supplied audits are independent. Relative to memory-to-action work such as Mem2ActBench, LBF additionally tests feasibility and prevention before a private deadline.

Your experimental questions. (i) One completion per decision, medium reasoning effort, structured outputs, 12,000 input/8,192 output token limits, and a 16,384-byte state cap. Neither provider request sends temperature, top-p, seed, or log-prob parameters; no provider default is inferred (Sec. 5.1, App. O.8). (ii) We include an open-weight Gemma follow-up; Qwen, Kimi K3, and GLM remain untested. (iii) The loss weights and intervention costs are fixed design choices, not fitted. Across 81 post-hoc reweightings (with the escalation/direct-cost ratio fixed at 0.4), all original model/class/comparator mean gains remain positive; direct-prevention counts do not depend on these weights.

Scope and exact-match accounting. Section 4.2 reports 36,000 planned gated slots outside ANCHOR: 35,400 recorded contexts with exactly one match each, plus 600 construction-failure slots retained in loss. Protected tiers test distinct corrections or inaction; Appendix O.5 removes the matching lesson. Overlapping matches and independent-domain transfer remain untested. SWE-bench, ALFWorld, WebShop, and OSWorld would need an added private prevention-deadline and correct-but-late scoring layer to test this endpoint. Broader model and domain tests remain open.

We appreciate these concerns and hope the clearer premises and independently replayed, stage-resolved evidence support reassessment of the preventive-competence contribution.

I basically agree with the other 1 score reviewer.

This paper requires a lot more revision effort that cannot be done during this review cycle.

The presentation and the main experiment both seem too unprofessional right now.

The idea itself is also innovative for a top conference level at this point.

I will raise Informativeness from 1 to 2 since you provide sufficient analysis I would appreciate, and more related work included.

But for the overall score I cannot raise due to in my batch of review those 2 score paper are even much more prepared than this.

I would suggest put more human effort in revising every presentation and make the paper in a flow and more clear and more innovative compare with the existing one.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.