Richard Hoekstra

Reported experiment

N-Dimensional Smooth Graphs

Learning structure as a handful of stochastic matrices
Richard Hoekstra · 2026

The architecture

A single NDSG layer updates input x by mixing it along d learned graph structures:

x' = x + α ∑i=1..d wi · (x @ PiT)

where:

Each Pi is a learned graph. Different dimensions can specialize:

The parameters of the model are the graphs. No separate attention matrices, no separate convolution kernels — just the stochastic transition matrices and their weights.

CPU-first numbers

The architecture was pivoted from GPU-centric to CPU-centric design, with concrete measured results:

ConfigParamsSpeed (it/s)MemoryLatency
TinyFast49,60079.3 (92.2 JIT)0.2 MB~12 ms/batch
UltraFast-128147,96838.3 (42 JIT)0.59 MB~25 ms/batch
Small247,558~201.0 MBhigher
(Original GPU-focused)10M+8 (GPU)1.3 GB—

TinyFast gets 10× more throughput than the original GPU-first design while using about 6,500× less memory. It runs happily on a laptop, no accelerator needed.

What actually worked

What didn't work

On this workload small dense operations and modest batches performed well. Cache size, memory bandwidth, precision, backend and batch shape all affect that result.

Framing: learn structure, not just weights

Most neural architectures are pattern-matchers with fixed structure: the architecture is chosen, only the weights are learned. NDSG makes the structure itself the parameter — the stochastic matrices Pi are where the learning happens.

This is similar in spirit to graph neural networks, but:

The softmax-stochasticity is the key structural prior: each node redistributes probability mass along its outgoing edges, scaled by the learnable weight wi.

Honest caveats

A few things to flag:

The reported model has about 49,000 parameters and ran at 80 iterations per second in this setup. At four bytes per parameter the weights occupy about 0.196 MB. Runtime memory also includes activations, state and allocator overhead.

Why it fits a broader program

NDSG sits naturally alongside the other byte-level architectures on this site:

All four share the conviction that byte-level processing with strong structural priors is underexplored, and that small models with the right structure can beat large models without it.

The measured design point is a small CPU model. A matched comparison across processors and sequence lengths would test how broadly those implementation choices carry over.
Cite this page

Richard Hoekstra. N-Dimensional Smooth Graphs. https://richardhoekstra.nl/papers/ndsg.html