SkillFactory: Self-Distillation for Learning Cognitive Behaviors

Zayne Rea Sprague, Jack Lu, Manya Wadhwa, Sedrick Keh, Mengye Ren, Greg Durrett

The recent success of reasoning models like OpenAI’s o1 and DeepSeek-R1 has highlighted the power of "cognitive behaviors"—skills like self-correction, verification, and strategic retrying. Usually, teaching these skills to smaller models requires "distillation," where a small model mimics the traces of a much larger, smarter teacher.

SkillFactory proposes a different path: what if a model could teach itself these behaviors using its own imperfect outputs? By rearranging a model's own samples into structured "silver" traces, the authors show that models can be primed to learn robust reasoning skills through reinforcement learning (RL) without ever seeing a single token from a superior teacher.

TL;DR

SkillFactory is a self-distillation framework that instills cognitive behaviors (like reflection and retrying) into LLMs by rearranging the model's own outputs into structured training traces. This "priming" stage, followed by reinforcement learning, allows models to achieve significant reasoning gains and better generalization than traditional distillation from larger models.

What Problem Does This Paper Address?

While Reinforcement Learning (RL) is excellent at reinforcing existing behaviors, it struggles to "unlock" skills that aren't already present in a base model's distribution. To bridge this gap, researchers typically use Supervised Fine-Tuning (SFT) on high-quality data from teacher models. However, this creates a dependency on closed-source or massive models and often results in "brittle" performance where the model mimics the teacher's style without internalizing the underlying reasoning logic.

The authors address the "cold-start" problem: how to give a model the necessary inductive bias to use cognitive skills before the RL stage begins, using only the model's own capabilities.

Methods

The SkillFactory pipeline consists of three main steps:

  1. Data Curation: The base model is prompted to solve problems multiple times. It is then prompted separately to reflect on and verify those same attempts.
  2. Trace Construction: The authors take these "silver" (imperfect) samples and rearrange them into a specific "SkillFactory" format: an incorrect attempt, followed by a reflection/verdict, a transition phrase (e.g., "Wait, I should try this again..."), and finally a correct attempt.
  3. Two-Stage Training:
    • Stage 1 (SFT): The model is fine-tuned on these rearranged traces to learn the structure of reasoning (using tags like <sample>, <reflect>, and <verdict>).
  4. Stage 2 (RL): The model undergoes RL (specifically Group Relative Policy Optimization, or GRPO) to calibrate when and how to use these skills effectively to maximize correctness.
The SkillFactory framework: sampling responses and reflections, rearranging them into structured SFT traces, and a two-stage training process.

Datasets

  • Countdown: A math puzzle where the model must combine numbers to reach a target. This was used to test "easy-to-hard" generalization (training on 3 numbers, testing on 4-6).
  • OpenThoughts: A large-scale dataset of reasoning traces used for broader training.
  • Evaluation Suite: The models were tested on standard benchmarks like GSM8K (math), GPQA (science), and AIME/AMC (math competitions), as well as out-of-distribution (OOD) tasks like Acronym Generation and Letter Countdown.

Key Insights and Ideas

  • Structure Over Accuracy: A major "aha moment" was that the SFT stage doesn't need to be high-performing. SkillFactory models often had lower accuracy after SFT than distillation baselines, but they significantly outperformed those same baselines after RL. This suggests that the SFT stage is about learning the mechanics of reasoning, not just memorizing answers.
  • Priming for RL: By seeing traces where it fails and then succeeds, the model gains an inductive bias for "retrying." This makes the subsequent RL stage much more effective at exploring the solution space.
  • Robustness to Regression: RL often causes models to "forget" or regress on tasks outside the training distribution. SkillFactory models showed much greater resilience to this catastrophic forgetting compared to simple RL-only baselines.

Key Results

  • Easy-to-Hard Generalization: On the Countdown task, SkillFactory → GRPO achieved 25.1% accuracy on harder variants, significantly outperforming R1-Distillation (21.2%) and RL-only (15.8%).
  • Competitive with Distillation: In the OpenThoughts setting, SkillFactory with only 1k SFT rows surpassed QwQ distillation on benchmarks like AMC (37.5% vs 19.9%) and Math500 (64.6% vs 55.2%).
  • Budget Forcing: SkillFactory models benefit more from "thinking longer." When forced to use more tokens at inference time (requesting more retries), they showed larger performance gains because they had been explicitly trained to use that extra space for self-correction.
SkillFactory consistently outperforms RL-only and matches or exceeds R1 distillation across different base models on Countdown and OOD tasks.

Limitations and Future Work

  • Model Scale: The study focused on smaller models (1.5B to 7B parameters). While the results are promising, it remains to be seen if the "structure over accuracy" insight holds for 70B+ parameter models.
  • Search-Focused Tasks: The method is most effective for "search-focused" tasks where the answer is easy to verify but hard to find. Its utility for more open-ended or creative tasks is not yet established.
  • Silver Trace Quality: While the model can learn from imperfect traces, there is likely a floor for how "silver" the data can be before the logic becomes too incoherent for RL to fix. Future work could explore more sophisticated ways to filter these self-generated traces.

Summary updated

BibTeX
@inproceedings{sprague2026skillfactory,
  author = {Zayne Rea Sprague and Jack Lu and Manya Wadhwa and Sedrick Keh and Mengye Ren and Greg Durrett},
  title = {{SkillFactory: Self-Distillation for Learning Cognitive Behaviors}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=ttMLNXBWKY},
}
Figure