NNGenTEXT → NEURAL NETWORK GENERATOR
TEXT → NEURAL NETWORK GENERATOR

Describe a behavior.
Get a working neural network.

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.

Try the demo →

How it works

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.

What you get

Sampling from a prompt yields a brand-new network that is loaded and executed directly in the target environment:

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.

Task families

Every generated network drives the same canonical MLP; each task family is a different mini-environment:

TaskDomainBehavior
seekgamechase a moving target on a 2D arena
evadegameescape a proportional-pursuit chaser
balancegamestabilize a cart-pole
bouncegamepaddle intercepts a bouncing ball
gaitanimationtwo-joint leg IK: foot traces a stride ellipse
orbitanimationthrust a satellite into a circular orbit
draw_*drawingturtle-graphics pen traces a target shape

The novel twist: diffusion, but for weight matrices

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×64weight canvas, 6×32×32
What it learns to denoisecolors of a pictureparameters of a working MLP
Text conditioning“a cat astronaut, oil painting”“a controller that traces a star”
Techniquesidentical: UNet · v-prediction · cosine schedule · DDIM sampling · classifier-free guidance
Outputa picture that looks like somethinga 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.

Why it matters

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.

Honest limits