Training Language Models to Fail Gracefully
Summary
RL makes LMs better at tasks, but success-only rewards make guessing rational — when wrong actions corrupt databases or ship broken code, that's costly. This paper trains models to fail gracefully: preserve successful behavior where possible, execute a safe fallback where acting would be unreliable. Rewarding Success > Fallback > Error (1/c/0) with standard policy gradients is brittle: the gradient vanishes near saturated policies (‖∇J_PG‖ = O(1−p_o) as p_o→1), so policies collapse to always-fallback (or never-fallback) — shown empirically with GRPO/RLOO on SafeMaze (100% fallback within a few steps at c=0.4; collapse for every tested c≥0.3). GracefulRL reshapes the landscape with a surrogate objective J = (1−c)·log p_S + c·log(1−p_E): log-barriers at the outcome-simplex edges p_E→1 and p_S→0 keep the gradient non-vanishing (Θ(1)) near suboptimal saturation. The objective coincides with TailRL specialized to the ternary reward; the paper's contribution is the log-barrier reinterpretation plus ε-smoothing of inverse-frequency weights for variance control. Experiments: (1) SafeMaze (navigation; 4M-param ResNet policy) — GracefulRL Pareto-dominates online reward tuning and Delightful PG across 3 seeds; (2) math abstention on Qwen3-1.7B/4B-Base (DAPO-Math-17K, conditioned on five caution levels c∈{0,...,0.8} via prompt suffixes; eval MATH500, AIME 2024–2026, AMC 2022–2024, JEEBench) — Pareto-dominates RLCR+Thresholding at both sizes; on AIME the error rate falls 79.1%→8.9% (88.8% relative) while sacrificing only ~3.1pp success; models verbalize uncertainty in CoT with no fallback annotations; OOD transfer to AbstentionBench (F1 0.677 at c=0.8 vs 0.590 for Qwen3-4B-Instruct); (3) multi-turn Minesweeper (Qwen3-4B-Instruct, irreversible actions) — c=0.5 raises success 67.4%→77.4% and cuts errors 17.0%→6.0% (RLOO collapses to all-fallback); learning to fail gracefully improved success, hypothesized as reward-shaping toward safer states. Author-stated limitations: online RL only (off-policy unstudied), no coding-agent/long-horizon experiments, fallback specification is domain-dependent. Blog: zanette-labs.github.io/failing-gracefully/ (training code and checkpoints linked, exact URLs unverified).
- Venue
- arXiv 2610.20401 (cs.LG, submitted 14 Oct 2026)
- Source
- arxiv
- Access
- free
- Language
- en
- Added
- Oct 16, 2026
- Verified
- Oct 16, 2026
- Found via
- #amuseddaman
Research notes
- Discovery: Hudson shared Daman Arora's (@amuseddaman) 11-post X thread 2026-10-16 (~2.9K views). Thread claims verified against the paper; key numbers — AIME 79.1%→8.9% error with −3.1pp success, Minesweeper 77.4%/6.0% at c=0.5 vs 67.4%/17.0% MaxRL — match. Relevance: (1) his RLVR/post-training work — the vanishing-gradient pathology (gradient ∝ remaining outcome mass) is a concrete failure mode for any ternary-reward RL he runs, and GracefulRL's log-barrier objective is a drop-in fix; (2) pairs with #47 Thinking Leakage (RLVR diagnostics cluster), #46 Deep-ML GRPO tutorial (implementer-side complement), #25/#31 (RL env generation — generated envs admitting safe fallback inherit this pathology), #50 Jeva (architectural abstention gate is the model-side counterpart; GracefulRL is the training-side counterpart); (3) his agent app — agents that revert/handoff when uncertain instead of gambling. Caveats: single-run RL experiments with limited seeds (3 on SafeMaze); paper license resolved 2026-10-16 as arXiv default nonexclusive-distrib; code/checkpoint URLs still unverified. Cluster: RLVR objectives, abstention/safe failure, GRPO mechanics, Minesweeper/terminal-agent risk behavior.
- License: arXiv default nonexclusive-distribution (resolved 2026-10-16; abs page shows no CC/custom license marker, arXiv API shows no rights override)
- Advisor-level provenance: Andrea Zanette (@Zanette_ai, Assistant Professor at CMU, the paper's advisor) quote-posted the same "Training Language Models to Fail Gracefully" thread (2026-10-16 12:47 PM ET, ~1.8K views), with explicit "Oh save this one!" instruction. Zanette's framing: "How do we train foundation models to recognize the limits of their capabilities and to act on them?" — proposes RL with R(success) > R(fallback) > R(mistake), notes naive training collapses to always-falling-back because fallback is a strong "attractor" (easy reward), and their log-barrier formulation (inspired by prior work MaxRL, successor TailRL) neutralizes the attractor while keeping coverage over solutions and fallback; empirically reduces mistakes 10× while keeping task performance; model reasons about its own uncertainty in CoT before abstaining. Media: Zanette's post carries an image contrasting two model outputs — red X "Guesses despite uncertainty" ("Therefore, the answer is 42.") vs blue checkmark "Recognizes uncertainty and abstains" ("Therefore, I don't know."). Refresh date_verified on #51.
Similar entries
- Paper Closing the Loop: Practical Training Recipes for Looped Language Models
- Model Contrastive Language Models (CLM): A System One Model for Fast and Generalizable Decision-Making
- Thread MOPD's Place in a Frontier Training Portfolio (X discussion)
- Paper The Curse of Recursion: Training on Generated Data Makes Models Forget
- Paper How Depth Growth and Looping Shape In-Context Learning in Language Models
- Model Odyssey-3: foundation world model for physical agents (free public access launch)