Write to us

Read the neural code. Then write it.

42theory is the intelligence layer for neuroscience: models that read what a population of neurons encodes, with an interval on every reading, and compute the stimulation that writes a chosen state back.

Open the labWatch the film

The brain does not sit above the body. It runs it.

Moment by moment, through the vagus nerve and the sympathetic chain, it sets the pace of the heart, opens the sweat glands and wakes the adrenal glands. Cranial and spinal nerves shape each breath, tune the voice, move the face and size the pupils.

And the body answers.

With every heartbeat, signals rise through the vagus nerve to the brainstem and on to the insula and the cingulate cortex. This loop is part of how the brain keeps a running model of the body, and of how we feel.

Six channels of this loop can be measured from outside.

Heart rhythm, skin conductance, breathing, voice, facial movement and the eyes. Cameras, microphones and wearables already capture them, all day, at almost no cost.

But the link back to the brain is mostly assumed.

Lower heart-rate variability is read as anxiety. A flat voice is read as low reward. The usual ground truth is a questionnaire, and such readings are rarely checked against the brain itself.

So we work on the link itself: the code.

A state is carried by the joint activity of many neurons. 42theory builds the models that read that activity and say how sure each reading is, compute how to write a chosen state back, and hold it in a closed loop. The ring is 42 simulated neurons, read live.

Open the lab

The intelligence layer

Software only. Three things it has to do well before any of it deserves trust, each one computed in this page on a simulated population.

Read

From one window of spikes to what the population encodes. The answer is a whole posterior, so each reading carries a 95% interval, and the interval is tested: over 2,000 simulated windows it held the truth 95.2% of the time. The error was 2.20°; the theoretical limit for any decoder is 2.20°.

Write

Given a state the population should carry, compute the stimulation that produces it through a device with a few sites and limited reach. The problem is convex, so the solver reaches its optimum. Then the result is read back: within ±5.6° of the wanted angle in 95% of windows, where a real stimulus reads within ±4.5°.

At the scale of the recording

Recordings are growing from hundreds of neurons toward a million. The reader makes one pass over a window's spikes, then works on a fixed number of sums however large the population is: 1,000,000 simulated neurons are read in about 10 ms, on one CPU core, in this page.

The neural code lab

A population tuned around a ring, like the cells that carry a direction. Change what it is shown, read it, write to it, hold it. It runs here, on your machine.

Drag around the ring, or tap it, to turn the angle shown.

The population and the window
Neurons
100 ms
1.0×
128°
Read
computing
Shown
Spikes
Time to read
Interval, tested

Run record

        

The model. Each neuron has a preferred angle, a peak rate near 24 spikes per second, one of three tuning widths and some background firing, and it fires as a Poisson process. Reading uses the exact likelihood of that model with a flat prior: the posterior is evaluated on a grid when it is wide, and by Newton's method with a Gaussian interval when it is sharp. In Write, a stimulation site multiplies the rates of the neurons near it and a normalization pool divides every rate by the total drive; the solver minimizes the Poisson divergence between the wanted pattern and the produced one. In Hold, stimulation pulls the encoded state toward the stimulated site. These are assumptions, stated so they can be challenged and changed.

Where it leads

Mental health

Mood, arousal and attention are internal states: slow variables that no instrument measures directly, carried by the activity of many neurons and expressed by the body. Reading such a state continuously, with an interval that can be trusted, is the first half of a closed loop. Computing the smallest correction is the second.

Clinical groups have decoded mood variations from intracranial recordings in seven people, and have run closed-loop stimulation in one person with treatment-resistant depression. The Hold mode of the lab runs the same kind of loop on the simulated population: in range 81% of the time with the loop, 3% without.

Most people will never have an electrode. The reading that reaches them has to run on the body alone. The study we propose records brain activity and the six body channels together, in people who already have depth electrodes for epilepsy care, learns the link, and then tests a readout that uses the body only and reports how certain it is.

Proposed, not yet run. Research software. Not a medical device and not a treatment.

Engineering intelligence

The brain is the one working example of general intelligence, and its codes are design rules that can be tested in machines. A rule that survives the test helps twice: the machine improves, and the theory of the brain has passed a harder trial.

Our own study, Perimeter, is one such test. Cells in visual cortex signal which side of a border owns it. Perimeter gives a vision transformer regions with signed borders in place of square patches: +1.8 points top-1 on all three seeds, with 69% of the multiply-adds, in a CPU pilot on Imagewoof at 128 px.

See the study

Perimeter

A vision model that sees regions and the borders between them, with a sign on every border, instead of a grid of square patches.

The same photograph three ways: 64 square patch tokens, 36 region tokens, and the cell complex of 36 regions and 98 signed borders.
In the study: 64 patch tokens, 36 region tokens, and the cell complex behind them, 36 regions and 98 borders.
Tokens per image as resolution rises Square patches of 16 pixels grow from 16 tokens at 64 pixels to 4,096 at 1,024 pixels. Region tokens stay between 13.0 and 14.4 at every size measured. 101001,00010,000 641282565121,024 image side, pixels tokens per image square patches: 16 to 4,096 regions: 13.0 to 14.4 at every size
Tokens against picture size. Patch counts are exact for 16-pixel patches; the region band is the range measured in the study, mean of five images.
Signed borders
One pass over the borders recovers each region's exact area, centroid and second moments. Without signs, two different regions can get the same inputs (Proposition 1).
Parts, not pixels
Region counts stay at 13.0 to 14.4 from 64 to 1,024 px, while patches grow with the square of the side (Proposition 2).
Region tokens
+1.8 points top-1 over plain patches on all three seeds, with 69% of the multiply-adds (Imagewoof, 128 px, CPU pilot).

Try it on your pictureRequest the full study

The film

From the body to the brain to the code in under three minutes, drawn frame by frame from the same engine and anatomy as the page. Its numbers are computed on your machine when it starts.

Read the transcript

    Bring a recording, or a question.

    A dataset to try the reader on, a write problem, or the Perimeter study. Use the form, or write to hi@42theory.com.

    Sent. We will reply from hi@42theory.com.

    Your message reaches our inbox through FormSubmit, a form delivery service. We use it to answer you and for nothing else. Privacy