Yeah, I think diagnoses could transfer better than specific fixes. More importantly, we should teach agents to diagnose their own failures rather than rely on predefined patterns from dev/training sets. Ideally, agents should discover new failure modes and improve autonomously through experience. That feels closer to genuine RSI.
KDD 2027 | When AI Agents Fail, How Should We Fix Them?
Our paper has been accepted to KDD 2027 Research Track (1st Cycle)! I'm excited to share our latest research.
When an AI agent fails, does it really need more reflection, longer prompts, or more memory?
Existing agent self-correction methods often rely on reflection, experience summarization, or external knowledge augmentation to recover from failures.
But here's a fundamental question: Without accurately identifying the root cause of a failure, does adding more context actually help?
For example, an agent may repeatedly take invalid actions while continuing to generate more reasoning steps. Or it may lack the knowledge required to use a tool correctly, yet keep reflecting on its mistakes. These failures require fundamentally different recovery strategies.
To address this challenge, we propose DARC (Diagnosis Before Recovery), a diagnosis-driven framework for agent self-correction.
💡 Core Method
DARC consists of three key stages:
Failure Diagnosis: Analyze failure trajectories to identify common failure patterns across different tasks.
Selective Recovery: Match each failure with an appropriate recovery strategy, avoiding interference from irrelevant information.
Policy Distillation: Distill efficient recovery policies by jointly considering task success rates and execution costs, enabling effective self-correction with lower overhead.
📊 Experimental Results
We evaluate DARC on three benchmarks: ALFWorld, AppWorld, and XBRL Finance.
ALFWorld: Improves unseen task success rate from 39.55% to 90.30%.
Execution Efficiency: Reduces average interaction steps by 54.2% and invalid actions by 92.9%.
AppWorld: Achieves 74.90% Task Goal Completion.
XBRL Finance: Achieves 94.50% Macro Accuracy.
🚀 Key Takeaway
DARC takes a step toward shifting agent self-correction from generic reflection to Diagnosis-Guided Selective Recovery, transforming failure experiences into reusable and efficient recovery capabilities.
Rather than simply making agents reflect more, we aim to help them understand what went wrong and apply the right fix.
📄 Paper: Diagnosis Before Recovery: Turning Agent Failures into Selective Self-Correction
https://t.co/yOv18NIiEU
🚀 Introducing PAR, our new work on length extrapolation in looped language models.
📦 The task is simple: five boxes, one object in each. Follow a sequence of swaps, then answer what’s inside. We train the model on short sequences and test whether it can keep up as the sequences get much longer.
Simply running more loops is not enough: performance breaks down at just 2× the training length. Scaling up the model alone doesn’t solve the problem either. On single-query S5, fixed-depth Qwen2.5 models from 0.5B to 7B achieve only around 20% accuracy at 16× the training length—roughly random guessing.
We identify two key obstacles: supervising only the final answer leaves the model without clear guidance on how far to advance in each loop; repeatedly applying the same layers hundreds of times causes the hidden-state scale to drift.
💡 PAR makes two straightforward changes: at loop k, predict the state after the first k steps; after each loop, rescale the hidden states to match their scale in the first loop. This aligns the loops with task progress: one loop, one step.
📈 On swap-S5, a 0.5B model trained on sequences of at most 32 steps achieves 95.5% full-state accuracy at 512 steps—a 16× length extrapolation. For comparison, the previous best method, RLT, achieves 55.7%, while the same model using chain-of-thought (CoT) reaches just 0.8%.
On single-query S5, PAR substantially outperforms fixed-depth models at every tested size, spanning Qwen2.5 0.5B, 1.5B, 3B, and 7B, and Qwen3 models from 0.6B to 4B. Across all four Qwen2.5 sizes, the best training runs achieve 100% accuracy at 16× the training length.
The model can also learn when to stop. We further show that PAR can be trained with final-answer supervision alone, without intermediate-state annotations.
📄 Paper: https://t.co/0u3I8F3sO9
🤗 Hugging Face:https://t.co/lkcRQntxyn