{
  "id": "weight-space-programming",
  "code": "PTL-0264",
  "term": "Weight-Space Programming",
  "aliases": [
    "weight space programming"
  ],
  "category": "optimization",
  "definition": "Weight-space programming is the practice of having a language model read a neural network's weights directly to work out what the network computes, and write or edit those weights to change its behavior, treating the weights like a program instead of leaving them entirely to gradient-based training.",
  "description": "Takehi, Teoh, Zhang and Khattab of MIT CSAIL named the concept in a blog post published on 2 November 2026, which describes it as the name of an emerging concept rather than a specific method. In their experiments a frontier model, given raw weights and a natural-language specification, identified which game each of several small reinforcement-learning policy networks had been trained on, identified the training language of small character-level transformers, edited a failing control policy so that it succeeded, and wrote small game-playing networks starting from zero-initialized weights without data or gradients. Editing about 0.016% of the weights of Qwen3.5-0.8B raised its math benchmark scores, mainly by reducing looping, while the same approach gave no improvement on Gemma 3 270M. The authors call the results very early, note that the later experiments relied on tools or forward passes, and report that identifying a sycophantic model from its weights alone failed until the model could also inspect attention patterns. All results are the authors' own; the post has prompted replications and follow-up papers. Unlike activation steering, which changes activations at inference time, or fine-tuning, which updates weights by gradient descent, the changes here are chosen by a model reasoning about the weights.",
  "example": null,
  "broader": [],
  "narrower": [],
  "related": [
    "activation-steering",
    "model-merging",
    "fine-tuning",
    "sycophancy"
  ],
  "introduced": 2026,
  "added": "2026-11-27",
  "sources": [
    {
      "title": "Sparks of Weight-Space Programming: LLMs can natively read & write neural network weights",
      "authors": "Takehi, Teoh, Zhang and Khattab",
      "year": 2026,
      "url": "https://rikiyat.github.io/blog/weight-space-programming/"
    }
  ],
  "url": "https://protologue.com/t/weight-space-programming/",
  "citation": "Protologue. (2026). Weight-Space Programming. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.9.1, PTL-0264). https://protologue.com/t/weight-space-programming/"
}