Weight-Space Programming Doesn't Need Transformers
Abstract: Standard neural architectures such as the Transformer were chosen because they train well with gradient descent and run fast on GPUs. In weight-space programming, a LLM writes target weights by hand without gradient-based training, so those reasons no longer apply. Should we keep the Transformer? Given minimal guidance, ten labeled examples, and a sandbox, mainly on multiple-choice questions, we task three frontier LLMs with either generating the weights of a fixed architecture or designing the architecture themselves. When free to design, all three compile plain-text facts into a sparse table queried by a fixed procedure, reaching up to 54.4% test accuracy. An LLM-designed model achieves higher test accuracy than the most accurate released Transformer that the same LLM wrote while using about 1,800x fewer parameters. Without gradients, they choose a table, in which the LLM can state what each weight means and can find and rewrite a wrong one. Each wrong answer points to one row, and removing a row changes about one other answer. From this, we propose an associative-memory-based model up to 17x faster on GPUs than a same-sized Transformer. We also test pretrained weights, other benchmarks, and tasks where models generate answers. Pretrained LLMs remain more accurate; the claim concerns which structure to build when writing weights.
Paper Prompts
Sign up for free to create and run prompts on this paper.
Explain it Like I'm 14
1. What is the paper about?
This paper asks a simple but important question:
If a LLM writes the numbers inside a smaller model by hand, does that smaller model still need to be a Transformer?
Transformers are the type of model used in systems such as ChatGPT. They are very good when they learn by studying lots of examples through a method called gradient descent. However, this paper studies a different situation called weight-space programming.
In weight-space programming, a LLM, or LLM, directly writes the smaller model’s internal numbers, called its weights. The smaller model is not trained in the usual way. Instead, the LLM acts more like a programmer who writes facts and instructions into the model.
The authors argue that Transformers may not be the best design for this job. They find that a much simpler structure—a sparse table of facts—can work better.
2. What questions did the researchers investigate?
The researchers focused on several main questions:
- Is a Transformer still the best architecture when an LLM writes the weights directly?
- Can an LLM design a better model structure by itself?
- What kind of structure does an LLM naturally choose when it has to write knowledge without training?
- Can the written model be made smaller, easier to understand, and faster?
- Do the results also work for other tasks, such as mathematics, text generation, and image classification?
They mainly tested these questions using multiple-choice science questions from the ARC benchmark. The models had to choose the correct answer from four options.
3. How did the researchers conduct the study?
The weight-space programming setup
The researchers gave three advanced LLMs a small amount of information:
- Only 10 example questions with answers
- A computer sandbox where the LLM could write and test code
- No normal training process using thousands of examples
The LLM then had two choices.
First, it could write numbers into an already-designed model, such as a small Transformer. This is similar to being asked to fill in the parts of a machine that someone else has already built.
Second, it could design the model’s structure itself. In this case, the LLM could decide what kind of machine to build as well as what information to put into it.
The researchers compared these models on about 3,530 science questions.
What is a sparse fact table?
The LLM-designed models mostly created something like a large table of facts.
For example, the table might contain a sentence such as:
“Hollow bones make birds lighter, helping them fly.”
The model breaks important words into smaller ideas, or concepts, such as:
- bird
- hollow bones
- light
- fly
When a new question arrives, the model searches for fact rows connected to the question and its answer choices. It gives the highest score to the answer supported by the strongest matching fact.
This is similar to looking through a well-organized set of flashcards rather than trying to remember everything from a complicated brain-like network.
Technical ideas in everyday language
A few technical terms help describe the models:
- Weights: Numbers inside a neural network that control how it behaves. They are like thousands or millions of tiny settings.
- Sparse: A structure in which most possible connections are empty or unused. This is like a bookshelf with only a few books on each shelf.
- Associative memory: A system that recalls information because two ideas are connected. For example, seeing “bird” and “flying” may remind the system of “hollow bones.”
- Inference: The process of using a trained or written model to answer a new question.
- Parameters: The adjustable numbers inside a model. More parameters often mean a larger model, although size does not always mean better performance.
- Gradient descent: A common training method. It repeatedly changes a model’s numbers a little at a time to reduce its mistakes, like walking downhill until reaching a low point.
The researchers also created their own improved table-based model. Instead of checking every fact for every question, it uses a shortcut to jump directly to a small number of likely table rows. This is similar to using an index in a library instead of checking every book.
4. What did the researchers find?
LLMs usually chose tables instead of Transformers
When the LLMs were allowed to design their own models, all three independently created something similar: a sparse fact table with a fixed lookup procedure.
They did not choose to build a normal Transformer with attention layers and dense mathematical operations.
This suggests that a table is more natural for an LLM that is writing facts directly, because each fact can be placed in a clearly labeled row.
Table-based models were more accurate in this setting
For Claude’s models, the best LLM-designed model reached about 54.4% accuracy on the ARC test questions.
A Transformer written by the same LLM reached only about 36.1% accuracy in one comparison.
The table-based model also used far fewer parameters. The paper reports that one LLM-designed model used around 1,800 times fewer parameters than the most accurate released Transformer written by that same LLM.
These results do not mean the table model is better than all Transformers in general. They mean it worked better in this special situation, where the model started with little information and an LLM had to write its knowledge directly.
The facts were easy to trace and edit
One major advantage of the table structure was that its answers could often be connected to particular facts.
For example, if the model answered that hollow bones help birds fly, the researchers could identify the exact table row that supported this answer.
When they removed one fact row:
- The table-based models usually changed only about 0.5 to 1.8 answers
- A written Transformer sometimes changed many more answers
- In one Transformer, removing a single line changed almost the entire model’s behavior
This is important because it makes the table model easier to debug. If a fact is wrong, a programmer can edit or delete that one line without damaging unrelated answers.
A simple text search sometimes beat the written Transformer
The researchers compared the written Transformers with ordinary text search, using a method called BM25.
Surprisingly, the written Transformers often performed worse than simply searching through the facts that the LLM had written. This suggests that putting many facts into dense Transformer weights caused the facts to interfere with one another.
The table models performed better than this simple search because they organized and combined the facts more carefully.
The improved table model was much faster
The first table-based models had a weakness: they checked every stored fact for every question. As the number of facts grew, this became slow.
The researchers therefore built a model that used direct table lookups. It examined only a fixed number of rows for each question.
This new model was:
- Within about three percentage points of the accuracy of the original table models
- Up to 17 times faster than a same-sized Transformer on the tested GPU
The results did not match the best pretrained models
The paper also compared the written models with models that had already been pretrained on huge amounts of text.
The pretrained models were much more accurate. For example, one pretrained model reached about 82.1% on the ARC benchmark, compared with about 54.4% for the strongest written model.
This is an important limitation. The paper is not claiming that a small hand-written table can replace today’s large pretrained LLMs.
Instead, the main claim is narrower:
When an LLM has to write a model’s knowledge directly, a table may be a better structure than a Transformer.
Results on other tasks were mixed
The researchers also tested other problems:
- On similar science questions, the table models worked reasonably well.
- On harder general knowledge questions, performance was close to guessing.
- On text-generation tasks, the models could retrieve stored answers but struggled to create long, original answers.
- On raw images, the models performed poorly.
- When images were first converted into meaningful labels by another pretrained model, the written table worked much better.
- On a text-classification task, the written models performed surprisingly well with very few labeled examples.
These results show that the approach works best when the important information can be written as clear facts or connections.
5. Why are these findings important?
The paper shows that the best model design depends on how the model is built.
Transformers are excellent for gradient-based training because their mathematical structure works efficiently with GPUs and can learn from large datasets. But when an LLM is directly writing facts into a model, a Transformer may be unnecessarily complicated.
A sparse fact table has several useful properties:
- Each row can represent a fact that a person can understand.
- Mistakes can be traced to specific rows.
- Individual facts can be edited without changing everything else.
- The model can be very small.
- Special lookup methods can make it fast.
This could be useful in situations where there is very little labeled data, or where people need to inspect and correct a model’s knowledge. For example, a medical or customer-support system might benefit from having facts that can be directly added, checked, or removed.
However, the method also has clear limits. The models mainly remember facts written by the LLM. They do not deeply learn new ideas, reason through long chains of logic, or understand images from raw pixels very well. Their performance is also much lower than that of strong pretrained LLMs.
Conclusion
The paper’s main message is that Transformers are not automatically the best choice for every kind of artificial intelligence system.
When models learn through gradient descent, Transformers are powerful and efficient. But when an LLM writes the model’s knowledge directly, a simple, organized table of facts can be smaller, easier to understand, and sometimes more accurate and faster.
The research suggests a future in which AI systems are built more like carefully organized databases or programs, rather than always being built from huge layers of mathematical networks. The next challenge is to combine the table model’s clear, editable facts with stronger abilities for reasoning, learning, and creating new answers.
Practical Applications
Immediate Applications
The paper’s strongest near-term applications are in small, knowledge-intensive systems where facts can be explicitly written, inspected, and updated, rather than in general-purpose language generation.
- Auditable domain-specific question-answering systems — healthcare, education, compliance, and technical support.
- clinical guideline lookup;
- employee compliance training;
- certification and examination preparation;
- equipment troubleshooting;
- internal policy assistants.
- Category: Immediate Application.
- Dependencies and assumptions: The domain must be expressible as relatively short, declarative facts; answers should be verified by a human or authoritative source; performance may degrade on ambiguous, multi-step, or rapidly changing knowledge. The reported results are primarily on science multiple-choice benchmarks, not real clinical or legal decisions.
- Human-editable knowledge bases and rule engines.
The sparse-table representation makes a line or row a natural unit of knowledge. A developer could add, revise, deactivate, or audit a single fact without retraining the entire model. A practical workflow would be:
- an LLM proposes fact rows from approved documents;
- a subject-matter expert reviews them;
- a compiler converts accepted rows into model tables;
- test cases identify affected predictions after each edit. Category: Immediate Application. Potential products: Version-controlled knowledge files, fact-level diff tools, approval workflows, and “why did the model answer this?” dashboards. Dependencies and assumptions: Locality of edits must be validated for each implementation, especially where vocabulary entries or shared concepts can affect many predictions.
Low-label text classification — customer service, finance, public administration, and education.
- routing support tickets;
- classifying government inquiries;
- triaging financial documents;
- categorizing educational content;
- filtering incident reports.
- Category: Immediate Application for prototyping and human-in-the-loop triage.
- Dependencies and assumptions: The input must be text or text-derived concepts, the label taxonomy must be clear, and production deployment requires validation against domain-specific data. The AG News result should not be interpreted as evidence of equivalent performance in regulated sectors.
- Fast retrieval and ranking for compact knowledge collections — software and enterprise search.
- FAQ systems;
- product manuals;
- software documentation;
- internal wikis;
- offline reference applications.
- Category: Immediate Application.
- Potential tools: A compiler from structured text to sparse concept and pair tables, plus a fixed GPU, CPU, FPGA, or database-backed reader.
- Dependencies and assumptions: The concept vocabulary must remain within the demonstrated efficiency range. The paper estimates a speed boundary around 15,000–32,000 concepts for a dense concept table and up to roughly 100,000 with row-list storage. Hardware results were measured mainly on one RTX 3090, so CPU and production benchmarks remain necessary.
- Efficient embedded or offline assistants.
- educational tablets;
- industrial handhelds;
- vehicle or machine maintenance terminals;
- field-service devices;
- offline public-information kiosks.
- Category: Immediate Application for constrained, closed-domain assistants.
- Dependencies and assumptions: The device needs an efficient implementation of sparse lookup and hashing. The model is not yet a substitute for a general conversational assistant because it has limited compositional reasoning and weak performance outside the knowledge domain written by the LLM.
- Fact-level debugging and regression testing for AI systems.
- targeted regression suites;
- impact analysis for policy changes;
- removal of outdated medical or regulatory facts;
- explanation reports for individual predictions;
- reproducible model snapshots.
- Category: Immediate Application.
- Dependencies and assumptions: The traceability property must be preserved during compilation and inference. It is strongest for sparse table models and does not automatically transfer to dense Transformer implementations.
- Transparent educational assessment and tutoring components. A system can store curriculum facts, definitions, and question-answer associations in inspectable rows. Teachers could review the facts used to select an answer and correct individual misconceptions without retraining a neural network. Category: Immediate Application. Dependencies and assumptions: Suitable mainly for constrained factual recall and multiple-choice practice. It should not be used as the sole basis for grading or personalized pedagogical decisions without independent assessment and safeguards against incomplete or biased curriculum content.
- Academic research infrastructure for studying LLM-generated architectures.
- fixed architectures versus LLM-designed architectures;
- sparse lookup versus dense attention;
- parameter count versus effective nonzero storage;
- edit locality and answer traceability;
- inference speed under different hardware backends.
- Category: Immediate Application.
- Potential tools: Benchmark harnesses, architecture-generation sandboxes, fact-row ablation tests, BM25 controls, and lineage-based model revision pipelines.
- Dependencies and assumptions: Results should be replicated with currently available models, datasets, and hardware because the paper’s cited frontier-model versions and experimental setup may not be broadly reproducible.
- Policy and regulatory knowledge management. Agencies and regulated organizations could maintain machine-readable tables of statutes, procedures, eligibility rules, or safety requirements. Each update could be reviewed as a textual change and mapped to affected outputs. Category: Immediate Application for decision support, not autonomous adjudication. Dependencies and assumptions: Legal interpretation often requires hierarchy, exceptions, temporal context, and multi-step reasoning, which the paper identifies as limitations. Human legal review, provenance tracking, jurisdiction controls, and explicit uncertainty reporting are essential.
- Daily-life reference tools. A locally stored model could answer narrow questions about appliance manuals, medication schedules, school curricula, travel rules, or household procedures while showing the underlying source sentence. Category: Immediate Application. Dependencies and assumptions: Users must provide or approve authoritative source material. The system should clearly distinguish stored facts from inference and should not replace professional advice in medical, legal, or financial contexts.
Long-Term Applications
The following applications are plausible extensions of the paper’s methods but require additional research, broader evaluations, or specialized hardware.
- Lookup-oriented AI accelerators — hardware, robotics, and edge computing.
- robot controllers with compact task knowledge;
- industrial inspection systems;
- smart sensors;
- low-power autonomous devices;
- high-throughput recommendation or ranking services.
- Category: Long-Term Application.
- Dependencies and assumptions: The paper does not yet establish advantages on these devices. Hardware/software co-design, memory bandwidth, collision handling, fault tolerance, and energy measurements are required.
- Large-scale enterprise memory systems. A production system could combine a writable associative-memory layer with document ingestion, provenance metadata, temporal versioning, and a conventional LLM for difficult cases. The table would handle reliable factual recall, while the larger model would perform explanation or composition. Category: Long-Term Application. Dependencies and assumptions: Scaling beyond the tested concept counts may reduce the speed advantage. The system also needs robust conflict resolution, source ranking, multilingual support, privacy controls, and mechanisms for detecting contradictory facts.
- Hybrid models that initialize gradient-based learning.
The paper suggests using written networks as starting points for subsequent gradient descent. Such a pipeline could:
- compile expert knowledge into an interpretable sparse model;
- use the model to initialize a trainable network;
- refine representations with a small labeled dataset;
- retain provenance links to the initial facts. Category: Long-Term Application. Potential sectors: healthcare, scientific instrumentation, robotics, industrial monitoring, and specialized NLP. Dependencies and assumptions: Further work must determine whether the initialization consistently improves sample efficiency, whether later training destroys traceability, and how to preserve editable knowledge after optimization.
Composable reasoning systems.
- arithmetic;
- symbolic comparison;
- temporal reasoning;
- multi-hop retrieval;
- variable binding;
- ordered text generation.
- Category: Long-Term Application.
- Dependencies and assumptions: The modules must preserve the paper’s desirable properties—named weights, local edits, sparse access, and answer traceability—while preventing error accumulation. Performance on ARC-Challenge, MMLU, mathematical reasoning, and open-ended generation would need substantial improvement.
- Robotics with inspectable task memory. A robot could store associations such as object affordances, safety constraints, tool requirements, or environment-specific procedures in editable tables. For example, a new facility rule could be added as a row rather than learned through extensive physical trials. Category: Long-Term Application. Dependencies and assumptions: Robotics requires continuous perception, spatial representations, uncertainty handling, and temporal planning. The paper’s results with raw pixels were weak, while its stronger vision result depended on pretrained DINOv2 semantic features. Reliable deployment therefore depends on pretrained perception modules and extensive safety validation.
- Personalized assistants with user-controlled memory. A personal assistant could store preferences, routines, household facts, and recurring instructions as individually editable entries. Users could inspect, revoke, or correct a single memory. Category: Long-Term Application. Dependencies and assumptions: The system would need privacy-preserving storage, authentication, conflict resolution, forgetting guarantees, protection against malicious memory injection, and robust handling of changing preferences. The paper does not yet test personalization or user-generated data.
- Adaptive policy and regulatory systems. Government or corporate policy engines could use generational LLM design to propose compact models optimized jointly for accuracy, model size, update cost, and latency. A rubric-based automated search could compare candidate architectures and revisions. Category: Long-Term Application. Dependencies and assumptions: Automated model selection must not optimize only benchmark accuracy. Audits must include fairness, legal consistency, robustness, provenance, worst-case behavior, and the cost of incorrect decisions. Validation data and independent governance remain necessary.
- Model-generated architecture search for specialized workloads.
- industrial sensors;
- scientific instruments;
- embedded controllers;
- financial rule monitoring;
- domain-specific search.
- Category: Long-Term Application.
- Dependencies and assumptions: The architecture search must be evaluated on held-out tasks, not only on examples supplied to the LLM. It also requires safeguards against benchmark overfitting, reproducible compilation, formal interface specifications, and reliable resource estimates.
- Knowledge maintenance and controlled model editing at scale. The line-based representation could support organizational workflows analogous to software version control: pull requests for facts, provenance-linked commits, rollback, impact analysis, and approval by domain experts. Category: Long-Term Application. Dependencies and assumptions: Vocabulary changes currently appear capable of affecting many predictions, as shown by the paper’s ablations. Scalable maintenance therefore requires hierarchical concepts, dependency graphs, conflict detection, and formal guarantees about edit locality.
- Multimodal semantic memory systems. The vision experiments suggest that written tables work better when images are first converted into meaningful tokens by a pretrained encoder. A future system could associate visual concepts, text facts, and actions in a shared sparse memory for inspection, retrieval, and control. Category: Long-Term Application. Dependencies and assumptions: Performance depends heavily on the quality and stability of the pretrained representation. The approach must handle distribution shifts, novel objects, spatial relations, temporal video information, and uncertainty; raw-pixel weight-space programming is not supported by the reported results.
- Energy-efficient inference and carbon reduction. If lookup-oriented models can be deployed on suitable memory-centric hardware, their fixed per-query access pattern could reduce computation and energy for narrow, high-volume workloads. This is potentially relevant to search, recommendation, monitoring, and edge devices. Category: Long-Term Application. Dependencies and assumptions: The paper reports latency rather than end-to-end energy or total cost. Any sustainability claim requires measurements including memory traffic, compilation cost, hardware utilization, update frequency, and comparison with optimized conventional retrieval systems.
- A new division of labor between LLMs and compact executable models. The broader long-term workflow is to use a powerful LLM as an offline “writer” that converts expert knowledge into a smaller, auditable executable model, rather than invoking the large LLM for every query. This could reduce serving cost and improve data governance for narrow applications. Category: Long-Term Application. Dependencies and assumptions: The generated model must retain adequate accuracy after compilation, remain robust to incomplete knowledge, support updates without hidden interference, and expose uncertainty when no stored fact is sufficient. The paper’s results show promise for constrained recall but leave a substantial accuracy gap relative to pretrained models, so this should initially be treated as a complementary architecture rather than a replacement for Transformers.
Glossary
- Associative memory: A memory mechanism that retrieves stored values by matching an input against associated keys. “Viewed as associative memories”
- Ablation: An experiment that removes or disables a component to measure its contribution. “We remove one written line, rebuild the model”
- Activation function: A nonlinear function applied within a neural network layer. “an activation such as GELU in an MLP”
- BM25: A probabilistic ranking algorithm commonly used for lexical information retrieval. “plain keyword search (BM25)”
- CUDA graph: A recorded sequence of GPU operations that can be replayed with reduced launch overhead. “prevents capture as a CUDA graph”
- Dense embedding: A representation in which most or all vector dimensions contain nonzero values. “without using attention, MLPs, or dense embeddings”
- Dense matrix: A matrix whose entries are predominantly or entirely nonzero. “every block in the Transformer's attention and MLP stack is a dense matrix”
- Differentiable model: A model whose operations support the computation of derivatives for optimization. “Needs a differentiable model”
- Direct address: A lookup method that computes the storage location of an item directly rather than searching. “Selection & GELU, softmax & top- rows & direct address”
- Eager execution: A computation mode in which operations are executed immediately rather than compiled into a deferred computation graph. “In eager execution, log-log GPU time correlates more closely with kernels per question”
- F1 score: The harmonic mean of precision and recall, commonly used to evaluate retrieval or text-generation systems. “the same scoring rule gives an F1 of 0.37 without interference”
- Fine-tuning: Additional training of a pretrained model on a task-specific dataset. “pretrained models fine-tuned on ARC remain far more accurate”
- Forward pass: The computation that transforms an input through a model to produce an output. “Given our fixed forward pass along with its weight names and tensor shapes”
- Gradient descent: An optimization procedure that updates parameters using derivatives of a loss function. “Standard neural architectures such as the Transformer were chosen because they train well with gradient descent”
- Hash-based lookup: Retrieval that uses a hash function to map an item to a storage location. “hash-based sparse CPU execution has outpaced GPUs on large workloads”
- Inference: The process of using a trained or constructed model to produce predictions. “inference slows down as the writer adds facts”
- Interference: Unwanted interaction in which information associated with one key affects the retrieval of another. “which is consistent with interference between dense keys”
- Kernel launch: The initiation of a GPU computation kernel. “they launch many GPU kernels per question”
- Lineage: A sequence of model versions in which later generations are derived from earlier ones. “in a lineage, it also receives the parent model and the parent's validation accuracy”
- Low-rank adaptation: A parameter-efficient method that updates a model through lower-dimensional weight modifications. “Where low-rank adaptation updates a LLM by gradient training”
- Masked-language encoder: A LLM trained to infer tokens hidden or masked within text. “the masked-language encoders UltraBERT and ModernBERT-large”
- MLP: A multilayer perceptron, typically a feed-forward neural network composed of fully connected layers. “All three LLMs converge on this design without using attention, MLPs, or dense embeddings”
- Near-memory processing: Computation performed close to data storage to reduce the cost of moving data. “near-memory processing and FPGA engines accelerate such table lookups”
- Non-zero entry: A matrix or tensor element whose value is not zero, often used to measure sparse storage. “4,288 rows, 29,502 non-zero entries”
- Pretrained checkpoint: A saved set of model parameters obtained before task-specific adaptation. “Starting from a released pretrained checkpoint instead of random initialization”
- Product-key memory: A memory architecture that retrieves entries using combinations of multiple keys. “place product-key memory layers inside a Transformer as a learned key table read by top-k search”
- Random initialization: The assignment of randomly selected starting values to model parameters. “from random initialization”
- Recall: Retrieval of information associated with an input or, in evaluation, the proportion of relevant items retrieved. “while the pair table is a second-order memory holding the concepts that a pair of concepts ... recalls together”
- Sparse matrix: A matrix containing mostly zero values and storing only its nonzero entries efficiently. “the concept table as a sparse matrix”
- State-space model: A sequence model that represents evolving hidden states through state-transition dynamics. “state-space models”
- Superposed vector: A vector formed by combining multiple signals or representations in the same dimensions. “using superposed random high-dimensional vectors”
- Tensor: A multidimensional numerical array used to represent model parameters or intermediate computations. “plain-text knowledge files that are compiled into tensors on CPU”
- Top- selection: Retaining only the highest-scoring items from a set. “hard top- selection discards whatever overlap remains”
- Traceability: The ability to identify which stored components or operations produced a prediction. “Traceable answers. Each prediction comes from a small, identifiable set of written lines”
- Validation accuracy: Accuracy measured on data used to compare or select models during development rather than final testing. “its validation accuracy”
- Weight-space programming: Constructing a model by directly writing its parameters rather than training them through gradient-based optimization. “where a LLM directly writes the weights of a separate target model”
- Warm-starting: Initializing optimization with parameters obtained from an existing model or procedure. “Low-label text and warm-starting”












