arXiv:2611.12066cs.CVNov 2026

Manuscript Offprint

arXiv:2611.12066

Weight-Space Programming for Medical Imaging: Do We Still Need Training Data?

Maximilian Lindholz, Richard Ruppel, Annette Milnik, Sebastian Halskov, Semil Eminovic, Charlie A. Hamm, Robin Schmidt, Anika Knupfer, Jana Hutter, Johanna P. Müller, Carolina Dominguez Aleixo, Jawed Nawabi, Jens Vogel-Claussen, Tobias Penzkofer

Abstract

Can a large language model (LLM) write the parameters of a medical image classifier from medical knowledge alone, without any training data? Such classifiers normally require labelled images, which are costly and often unavailable. We investigate this question through weight-space programming (WSP), in which an LLM writes or adapts the weights and biases of a neural network directly, without optimisation on training data. Claude Opus 5.5 and GPT-6 Astra each generate the parameters of a small LeNet-style CNN in a single reply, without tool use and without access to any image. We compare these networks against zero-shot MedSigLIP and against the same architecture trained on labels using the Adam optimiser, across 7 classification tasks in four modalities: chest X-ray, breast ultrasound and abdominal CT (all from MedMNIST), and pelvic MRI (SynthUterus). The LLM-written networks perform above chance on all six MedMNIST tasks, with a mean test AUC of 0.719 for Opus and 0.711 for Astra. Both models outperform MedSigLIP on 5 of 6 tasks while using more than 10410^4 times fewer parameters. However, the same network trained with Adam on only 256 labelled images achieves a higher AUC on every MedMNIST task (mean AUC 0.828). On SynthUterus, Opus attains an AUC of 0.764, whereas Astra falls below chance (AUC 0.136) owing to a systematic error. These results show that LLMs

can write functional medical classifiers, but that they do not yet replace training data. We release the protocol, logs and all generated weights at https://github.com/MaximilianLindholz/weight-space-programming-medical.

1. Introduction

Neural networks are usually programs that are not written but found by an optimiser on labelled data [21]. Takehi et al. recently introduced weight-space programming [39], which asks whether frontier LLMs can now operate in the other direction, reading a network's weights and writing new ones directly. Setting weights without gradient descent is not new in itself: hypernetworks have generated weights since 2016 [12, 19], but they are trained predictors. In WSP, the predictor is a general-purpose LLM that writes weights from knowledge stated in natural language.

Medical imaging is a natural test for this idea. Labelling medical images is expensive and requires radiologists, yet the rules for reading them, the relevant “program”, are largely written down in textbooks and the medical literature. For example, a retroflexed uterus bends backward against the cervix [2].

If an LLM can turn such knowledge into a model, a classifier could be created before the first label is collected, and every weight could carry a stated radiological rationale. Un-

Figure

Figure 1. The 7 medical imaging tasks (Sec. 3.1), two examples each. For display only, images are shown at higher resolution (MedM-NIST+ [48] at 64 or 224 pixels, SynthUterus at its released 96); the networks see the same images at 28×28.

like the games and other artificial environments that Takehi et al. [39] use to motivate WSP, medical imaging has no source code for its rules. The imaging process itself is reproducible, but no program specifies how anatomy and disease appear in an image, or how an image maps to a diagnosis. These rules must come from the model's medical knowledge, and they must survive the gap between textbook descriptions and pixel data.

We therefore ask three questions. First, can an LLM write a working medical imaging classifier from scratch, without any task-specific training data, and do different LLMs write similar ones? Second, do we still need data: how does a written network compare with label-free foundation models and with training on a few hundred labels? Third, which design decisions do LLMs make in the parameters, and how do they compare with what gradient descent learns in the same network?

References (46)