The cloverleaf shows up on the first try

Dmitry Vaintrob's first post of his planned sequence shows a clover-shaped distribution of hidden-layer weights for a wide two-layer net trained on continuous XOR, and argues that the shape is a fingerprint of mean-field dynamics — something the lazy cannot produce. He promised a code release "soon" but it isn't out yet, so I picked defaults from the description in the post and rented a 4090 to see how robust the picture is.

Short version: the cloverleaf is there, it's the same across seeds, and switching to the NTK parameterisation kills it. The whole exercise — pod spin-up, four trained models, plotting — fit comfortably inside an hour of GPU time.

§1What I built

A two-layer scalar network with mean-field output scaling, f(x) = (1/N)·∑i ai·σ(wi · x + bi), using a hardtanh activation (the "ReLU version of tanh", σ(z) = clip(z, −1, 1)). Input x ∼ U([−1, 1]²), target y = sign(x1)·sign(x2), fresh batches each step (infinite data), MSE loss. Width N = 2048 matches what the post appears to use. Adam was the right call over plain SGD: with mean-field scaling, per-parameter gradients are 𝒪(1/N), and Adam adapts without needing the ηN² rescaling SGD requires.

architecture
2-layer, width 2048, hardtanh, scalar output
scaling
mean-field (÷N) — vs. NTK (÷√N) as control
data
x ∼ U([-1,1]²) · y = sign(x₁)·sign(x₂) · infinite
optimizer
Adam, lr 5e-4, batch 4096, 60 000 steps
runtime
~47 s / training run on a single RTX 4090
code
arcadia-impact / mean-field-xor-repro-2026-06-29 (HF)

§2The cloverleaf, three seeds, one control

Each panel below is a scatter of the 2048 incoming-weight vectors (wi,1, wi,2) from one trained model, coloured by the sign of the output weight ai. The mean-field runs (left three) collapse onto the same four-pronged star — peaks along ±w1 and ±w2, with the radial extent giving an indication of how saturated each neuron has become. The seeds visibly agree in distribution, even though no individual neuron is in the same place. NTK is the same architecture, same data, same steps — only the output scaling changes — and the cloud barely escapes its Gaussian initialisation. Width 16 simply doesn't have enough neurons to populate any structure.

Cloverleaf comparison across 3 mean-field seeds, NTK, and narrow.
Fig. 1 · Incoming-weight scatter (w1, w2) for each trained hidden neuron. The three mean-field panels at width 2048 produce the same four-pointed clover; NTK does not; narrow can't.
Angle density of incoming weights for each run.
Fig. 2 · Kernel density of the angle arctan(w2 / w1) for the half of neurons with the largest norms. The three mean-field seeds track one another closely with peaks at 0°, ±90°, ±180° — the cloverleaf measured as a 1-D distribution. NTK has weaker, flatter peaks; the narrow run is dominated by two of its sixteen neurons.

The point isn't the four lobes per se — it's that the empirical neuron distribution is reproducible across seeds while being sharply non-Gaussian. That's what mean-field theory predicts and NTK forbids.

§3The function the network actually learned

Sanity check that the cloverleaf is doing useful work: plotting the trained network's output on a grid recovers a clear XOR pattern, with a small mass of probability around the axes where the target sign is discontinuous and the network softens it into a hairline.

Network output surface vs. XOR target.
Fig. 3 · Network output (left) vs. target XOR (right) on a [−1, 1]² grid. Final eval MSE 0.024 — well above the irreducible noise of the XOR target near the axes, well below the variance of y.

§4How the runs compare

runscalingwidth final MSE std ‖w‖ cloverleaf?
seed 0 (teacher)mean-field2048 0.02369.4 yes
seed 1mean-field2048 0.02349.3 yes
seed 2mean-field2048 0.02409.5 yes
seed 3mean-field2048 0.02389.4 yes
NTK control÷√N (lazy)2048 0.01301.8 no — neurons stay near init
narrow controlmean-field16 0.05478.1 no — too few neurons

Two things worth noting in the numbers. First, the NTK run gets a lower training-style MSE than the mean-field runs at the same width and step budget, but produces a qualitatively less interpretable weight cloud — the linearised "kernel" regime is happy to fit the target with very small movements per neuron, which is exactly the failure mode mean-field people warn about. Second, the std of the incoming-weight norm is roughly 5× larger for the mean-field runs: those neurons travel.

§5What I tried and dropped

The post advertises a where one trains 2048 independent single-neuron models against the background field of the trained network and recovers an identical (wi, ai, bi) distribution. I attempted it, and the formulation has a real subtlety: if you use the post's apparent "target = residual" framing literally, the optimal a on a self-consistent fixed point is 𝒪(N) times the residual moment, which then drives the loss-magnitude several orders of magnitude above the achievable single-neuron output at any reasonable learning rate, and the regression doesn't converge. I'm fairly sure there's a rescaling step in the post that hasn't been written down explicitly, and decided to pivot to the seed-robustness + NTK control above rather than guess at it. Worth picking up once the next post in the sequence (or the promised code) lands.

§6What's next

Source · Vaintrob, "Mean field sequence: an introduction" · LessWrong, 2026-04-04.
Pod · RunPod 4090 secure cloud, pod ID zer68f9icq6f74, kept alive for follow-ups.
Data & code · arcadia-impact/mean-field-xor-repro-2026-06-29 on Hugging Face.