# The three-state experiment This is a new, conventional tanh recurrent network trained on a synthetic three-bit memory task. It is separate from Still’s accepted four-state temporal equilibrium model. That complete earlier experience, including its inner inspector, carry disconnection, handoff, training controls, sources, report and screenshots, lives at [accepted-534b161/index.html](../accepted-534b161/index.html). Its numerical claims concern a different model. ## What actually runs ``` h_next = tanh(W h + U x + b) logits = D h + c bits = (logits >= 0) ``` The entire persistent neural state is the three-vector `h`. It is displayed directly as world x, y and z. There is no projection, larger recurrent state, scripted attraction, snapping, trained energy surface or extra hidden carry. Camera perspective changes only the view. Targets, trajectory logs, clocks and saved origins are interface bookkeeping; they never enter the learned rule. The readout is instantaneous and is never fed back. W, U and D are each 3 × 3; b and c have three entries each: 33 trained parameters. Browser inference in `network.js` evaluates the exported double-precision weights in `model.js` with `Math.tanh`. Blank input is exactly `[0,0,0]`. The point normally lies in [-1,1]³; an intervention may place it anywhere in [-1.4,1.4]³. The first model update then returns it to the normal range. The manipulation bounds belong to the interface, not training. Write starts h at zero and supplies three separate inputs, one coordinate at a time. Input value +1 writes a 1, −1 writes a 0, and 0 leaves that input channel silent. It sends no input flag or target. The initial 101 on opening is computed through these same three updates. Pressing Write animates each pulse, then resumes blanks. No particular state coordinate was assigned a bit in the loss: the learned readout maps the coordinates back to bits. In this trained result, positive z is associated with bit 2 = 1. ## Reproduce From this project directory, with Python 3 and NumPy already installed: ``` OPENBLAS_NUM_THREADS=1 python3 experiment3d/train.py OPENBLAS_NUM_THREADS=1 python3 experiment3d/check_gradient.py OPENBLAS_NUM_THREADS=1 python3 experiment3d/check_initialization.py OPENBLAS_NUM_THREADS=1 python3 experiment3d/validate.py ``` No data or packages are downloaded. Training writes `model.json` and its script equivalent `model.js`. The canonical weight hash in `model.json` excludes the measured run time; it is the reproducibility identity. Training log and validation JSON accompany the artifact. NumPy 2.3.5 was used here. Floating point/library differences can affect bitwise reproducibility on another machine; the validation can be rerun independently. One seed/configuration was tried: 7351, NumPy default_rng. W starts at 0.8 I plus independent normal noise (σ = 0.16); U starts normal (σ = 0.5); D starts normal (σ = 0.3); b and c start at zero. This biases self carry but does not install eight stable memories. Every parameter is updated. No recurrent projection, diagonalization, fixed-point loss, perturbation training or hand-selected attractor coordinates is used. `check_initialization.py` records the actual untrained baseline: zero of eight memories pass retention, recurrent eigenvalue magnitudes are about 0.560, 0.984 and 0.984, and all 33 parameters change during training. Each batch has 64 streams, each 48 events. The first three events write the three bits in order, with independently uniform values. Subsequent events independently write each bit with probability 0.10, so simultaneous writes can occur. Targets are the last written value of each bit. Loss is mean logistic cross-entropy across bits, streams, and events 3–48; the first two incomplete memories are excluded. Backpropagation traverses the whole 48-event unroll. Adam takes 6,000 updates, learning rate 0.008, β₁ = 0.9, β₂ = 0.999, ε = 1e−8, with gradient norm clipped at 2. Training sees 18,432,000 events. The loss is about 0.000177 on the final batch; it is not a held-out result. The first fit and independent evaluation passed well inside the 20-minute gate. A second execution of the same seed/configuration exported the final script artifact and confirmed the same weights; it was not a hyperparameter search. Each fit took about 21 seconds on this machine. The actual BPTT gradient passed central finite differences for all 33 parameters at initialized and trained weights; maximum absolute discrepancies were approximately 3.59e−10 and 1.35e−14. ## Measured gate `validation.json` uses a separate NumPy inference implementation, not the browser model functions. Seed 908312 generates held-out streams. It was not used to choose the training configuration. - All eight possible memories are written from zero with three pulses. Their readouts are correct after the third pulse and at **every one of 1,000 consecutive zero-input updates**. Final update residuals are below 1e−9 (zero at machine precision here). - 128 unseen streams of 160 events each use a write probability of 0.08 per bit, with mandatory first-three-bit writes. All 20,224 scored events are correct, including all 15,631 completely blank events. This includes overwrites and different input orders after initialization. - For every held memory, perturbations are applied directly to state, followed by 200 blank updates. JSON records the released state, displacement, final bits/state and residual. Small pushes recover; larger pushes can change memory. Depth-only changes occur with x and y unchanged. - 1,280 additional random pushes are recorded as diagnostics, not as a guarantee or a sampled basin visualization. They were not used in training. - The browser independently repeats all eight 1,000-step retention checks and matches the Python final states to within 1e−12. Actual UI tests confirm write, rails, release, recovery, changed memory, wrong-bit outcome, preserved trails, undo, orbit without state change, reset and input-free stepping at 1440px and 390px. A concrete depth example starts from 000: state approximately [0.98450, 0.98095, −0.98301]. Adding [0,0,1] leaves x/y fixed, then the learned updates settle to 010. Equal-size direction checks from 101 also differ: adding [1,0,0] reaches 001, whereas [0,0,1] reaches 111. Both displacements have length exactly 1. The in-page default provides the corresponding experiment starting at 101: a depth push to z ≈ +0.02 settles to 111. It does not change an input bit, input channel or readout weight; only stored state moves. ## Interaction semantics Move state freezes the recurrence as soon as a drag, rail edit or nudge begins. Dragging changes the world x/y plane at the current z; the depth rail changes only world z. Where a side-on camera makes ray/plane intersection ill-conditioned, a screen delta fallback still changes only x/y. Release is explicit, allowing combined-axis adjustments before resuming zero-input dynamics. Undo restores the exact pre-push vector. A dashed segment depicts the reader’s displacement; the solid path and small tick marks are actual successive model updates. Colors accompany outcome words: amber recovery, mint selected-bit change, rose wrong-bit change. Saved trails remain until Clear trails or Reset experiment; they are session-only and do not survive reload. The display normally advances one actual update per 40ms (25 updates/second); long suspended-frame gaps are capped. +1,000 blanks runs exactly 1,000 actual updates without visualizing each intermediate frame. Pause stops automatic updates; it supplies no input. Writing is three pulses, 260ms apart after an initial 220ms wait. A release is labeled settled only after at least 40 blank steps and residual below 1e−9. An interrupted release is retained and labeled partial, not counted as a success. The smallest successful Euclidean displacement is tracked separately for each starting word and chosen bit. It is the smallest the reader has found, not a proven minimum. ## Limits and sources These finite synthetic checks do not prove global stability, complete capacity or correctness on arbitrary sequences, simultaneous perturbation plus input, analog noise or a physical device. The eight faint points are observed held states, not exhaustive fixed-point analysis. The learned recurrence is nearly coordinate-separated: this is a particularly simple memory geometry, not a tangled hidden mechanism. Basin sampling and formal stability analysis are deferred. No comparison against larger RNNs, LSTMs or the accepted model was run; no scientific novelty or biological-memory claim is made. The volume uses dependency-free WebGL, perspective, depth-tested geometry, camera orbit and zoom. There is no external runtime dependency or telemetry. Browser checking here used headless Chrome with software WebGL; real iOS/Safari, Android touch hardware, screen readers and low-powered GPU performance were not tested. Native rails, 44px nudge buttons, explicit Move state/Orbit modes and keyboard controls provide alternatives to precision dragging. The task and fixed-point interpretation are established research, independently implemented here. This is not a reproduction of their larger networks or an implementation of their software: - [Sussillo & Barak, Opening the Black Box (2013)](https://web.stanford.edu/class/cs379c/archive/2016/calendar_invited_talks/articles/SussilloandBarakNC-13.pdf): uses fixed/slow points to study trained recurrent networks, including a three-bit flip-flop task. - [Golub & Sussillo, FixedPointFinder](https://github.com/mattgolub/fixed-point-finder): established tooling and training/analysis examples. Sources opened November 17, 2026. The contribution here is a directly manipulable three-state experiment.