R274SELFWRITE: a model programs low-rank edits to its own weightsIn SELFWRITE, a model studies its own reasoning, inspects its weights and activations in a persistent Python session with white-box primitives only, then writes a program that builds a low-rank edit to its own weights with no gradient step. Each candidate is graded once on a hidden gate set and only a strictly improving edit is merged, and the edited model writes the next edit. Over five generations on Qwen3.8-27B, held-out avg@4 rises from 76.30% to 77.75% and pass@4 from 82.60% to 84.80%. Key caveats: a 1.5 to 2.5 point gain on one model and one domain, acceptance is a hill-climb on a single gate set.self-improving-agentsinterpretabilityweight-editingresearch