category: training Β· status: draft Β· updated: 2026-11-02

Trajectories vs Writeups

A CTF writeup and an execution-verified trajectory describe the same hack. As training data they could not be more different.

A writeup is the story told after the fight: "Noticing the id parameter reflected unsafely, I fired sqlmap with --tamper=space2comment, retrieving the admin hash." Clean, linear, ~500 words, ending in the flag. A trajectory is the game tape: every tool call, every error message, the 404 where the shell should have been, the three payloads that did nothing, the moment the agent re-read the source, switched from boolean-based to time-based injection, and then got the oracle to flip. Same task, same flag β€” one teaches narration, the other teaches playing.

Why the difference changes what the model learns

The empirical anchor is Chu et al., SFT Memorizes, RL Generalizes (arXiv:2501.17161): supervised fine-tuning tends to memorize surface patterns from its targets, while reinforcement-learning-style training on outcome signal learns transferable rules. (Follow-up work has qualified the strong version β€” SFT on the right kind of data generalizes better than the slogan implies β€” which is exactly the point here.)

Writeups are almost pure surface. They compress the 40-step search into a 5-step story, because humans write for other humans who already know how to hack. The causal middle β€” what was tried, why it failed, what evidence triggered the pivot β€” is precisely what gets edited out. SFT on that corpus produces a model that narrates brilliantly: confident, well-structured, fluent… and helpless the first time the environment disagrees, because it has never seen a step whose output wasn't already implied by the previous sentence. Simbian's Cyber Defense Benchmark found exactly this failure shape at frontier scale: even the best of 32 models quit early and missed over half the evidence β€” narration without persistence.

Verified trajectories are still consumed by SFT, but they are behavior, not testimony. They carry the decision middle: full tool-call interleaving, real environment observations, dead ends, and the self-corrections that recovered from them. That's the substrate on which "RL generalizes" style learning can act β€” and it's what our fleet's rejection sampling harvests (see [[rejection-sampling-star]]).

What a good trajectory contains

Ours, following the CyberFactory pattern (arXiv:2608.23181) and CTF-Dojo (arXiv:2508.18370):

  1. The full interleaving β€” model reasoning, tool call, environment response, next reasoning. Not summaries. (Up to our Ο„=0.9 context-compaction trigger, where the state is rewritten β€” verified evidence, failed attempts, open hypotheses β€” not the history lied about.)
  2. Errors and self-corrections, kept in. A winner that recovered from a broken payload teaches recovery. Strip the failure and you've turned game tape back into a writeup.
  3. The verification step β€” the agent runs the differential oracle (crash on pre-patch build, clean on post-patch), the flag check, the EVM assert. The model must learn that checking is part of the move, not an epilogue.
  4. Terminal state + reward provenance β€” which checker passed, which container digests, so weekly decontamination and dedup can trust the label.

Worked example. Same stored-XSS task, two artifacts. Writeup version: 212 tokens, "the search param was injectable, payload stored, alert fired." Trajectory version: 38 steps β€” CSP header misread once, two dead img onerror attempts blocked by the sanitizer, pivot to SVG-based payload, oracle re-executed against pre/post containers, pass. Train on 10k writeups and the model produces lovely reports about XSS it never lands. Train on 500 trajectories and it flails productively β€” which is what actually solves the held-out eval.

The contamination bill for writeup corpora

Writeups don't just under-teach; they poison the exam.

The one-sentence version: writeups teach the model how hacks sound; trajectories teach it how hacks happen β€” and only one of those survives contact with a fresh container.

Primary sources: Chu et al. 2025 Β· CyberFactory Β· CTF-Dojo Β· Cyber-Zero Β· CTFusion

See also: [[rejection-sampling-star]] Β· [[sft-vs-dpo-vs-grpo-vs-rlvr]] Β· [[cyberfactory-openaegis]] Β· [[landscape-2026]]