NNGen is a diffusion model with a text-to-image architecture — except the “image” it denoises is the weight tensor of a working neural network. Describe a behavior in English, get a brand-new network that performs it.
Training pairs mirror the text-to-image recipe — (image, caption) becomes (network, caption):
A UNet with text cross-attention (v-prediction, cosine schedule, DDIM sampling, classifier-free guidance) learns to denoise weight canvases conditioned on the description — exactly how text-to-image models work, one level of abstraction higher.
Sampling from a prompt yields a brand-new network that is loaded and executed directly in the target environment:
safetensors, ~1.6k parameters, runs anywhere (CPU, microcontroller, browser).The demo focuses on drawing behaviors: networks that drive a virtual pen to trace geometric shapes. Training shapes include circles, squares, triangles, pentagons, stars, spirals, lines and arcs — and two shapes are deliberately held out (hexagon, octagon) to test whether the model generalizes to shapes it has never seen.
Every generated network drives the same canonical MLP; each task family is a different mini-environment:
| Task | Domain | Behavior |
|---|---|---|
seek | game | chase a moving target on a 2D arena |
evade | game | escape a proportional-pursuit chaser |
balance | game | stabilize a cart-pole |
bounce | game | paddle intercepts a bouncing ball |
gait | animation | two-joint leg IK: foot traces a stride ellipse |
orbit | animation | thrust a satellite into a circular orbit |
draw_* | drawing | turtle-graphics pen traces a target shape |
Diffusion models power today's image generators. Their core trick is humble: learn to remove noise from a matrix of numbers, step by step, guided by a text description. NNGen observes that a neural network is a matrix of numbers — so the very same machinery, unchanged, can denoise weights instead of pixels.
| Text-to-image (Stable Diffusion…) | NNGen — text-to-network | |
|---|---|---|
| The “image” | RGB pixel grid, 3×64×64 | weight canvas, 6×32×32 |
| What it learns to denoise | colors of a picture | parameters of a working MLP |
| Text conditioning | “a cat astronaut, oil painting” | “a controller that traces a star” |
| Techniques | identical: UNet · v-prediction · cosine schedule · DDIM sampling · classifier-free guidance | |
| Output | a picture that looks like something | a network that does something |
Nothing about the diffusion process knows it is generating “intelligence” — it only ever sees matrices. Yet because the training corpus pairs each matrix with a description of what it accomplishes, sampling from noise yields a functioning behavior. That is the step beyond generative media: from pictures of things, to the things themselves.
Today, getting a small neural network for a specific behavior means collecting data, training, and validating — specialist work per network. NNGen moves that cost from human effort to compute: the training corpus is self-generated, and inference (generating a new network from text) runs in seconds on a CPU.
The long-term vision: a queryable catalog of tiny models — “give me a network that does X in under 2k parameters” — for games, animation, UI agents and embedded devices.