CHRIS HAY

IDEAS · SYSTEMS · OBJECTS / LONDON · 2026

Reading by address.

Give a memory a question. Watch what it writes back.

An explanatory conveyor: a capital-of-France address reaches an FFN lookup and writes Paris into the residual stream for downstream reading.
EXPLANATORY SEQUENCE / ADDRESS → LOOKUP → VALUE · ORIGINAL STUDY, 2026 · Chris Hay

An address is a pattern a reader can respond to. This notebook follows the operation from six hand-built key–value pairs to Gemma’s evolving state: match a query, combine value directions, then read an answer. The film, source code and saved experiments show both what works and where addressing remains approximate.

N-ADDRESSOPENRECORDED 2026-09-06DRAFT · V0.2REFERENCE DRAFT

01 / WHAT IS AN ADDRESS?

Ask for the capital of France. France identifies the entity; capital identifies the relation you want to read. Currency would ask something different about the same place. In the opening animation, that question arrives at an FFN and a Paris direction is written into the residual stream—the model’s changing working state. The conveyor is an explanatory drawing. The address in a model is a vector of numbers, and matching it need not isolate a single neuron or a single fact.

A LOCATION THAT A READER RECOGNISES

An address here is closer to a pattern recognised by a reader than a numbered drawer. The input pattern and the weights that respond to it belong together. That connects this note to the map: a point in a picture is only useful once we know which operation reads the underlying state. We can make that relationship concrete by building a memory whose keys and values we can inspect.

Begin with the map

02 / BUILD A MEMORY WITH SIX FACTS

The Mechanism’s ffn.py plants capital, currency and language facts for two invented places. Atlantis has Paris, Euro and Latin; Zerivia has Cairo, Rand and Tamil. Each full question receives its own random, normalised 24-number key. Each answer receives a value direction. We put the six keys into the rows of an input matrix and the corresponding values into an output matrix. There is no training: we choose what this little memory contains.

Read ffn.py

03 / MATCH → ACTIVATE → WRITE → READ

Choose capital of Atlantis. The demo supplies that address’s key vector as the input, compares it with all six keys using dot products, and clips negative matches to zero with ReLU. Each remaining activation scales its value direction; adding those contributions produces the output vector. Finally, the six answer readers score that output and the highest score supplies the displayed word. This is two matrix multiplications with a nonlinearity between them, followed by an answer readout. Nothing iteratively unpacks all six facts before answering this question.

FROM THE FILM / INTO YOUR HANDS

Give the memory
a question.

Six planted facts. Choose an address.
Switch off a neuron. See what changes.

TRY THE MECHANISM

A WORKING PREVIEW / CAPITAL OF ATLANTIS

capital of Atlantis1.000
currency of Atlantis0.000
language of Atlantis0.000
capital of Zerivia0.310
currency of Zerivia0.277
language of Zerivia0.000
THE OUTPUT
READS
Paris

CONSTRUCTED FFN / 24 DIMENSIONS / RUNS IN YOUR BROWSER

Choose capital of Atlantis and follow the bars to Paris. Switch to currency of Atlantis, then suppress the matching neuron. The key matches, activations and answer scores all come from the calculation you are changing.

WHAT TO NOTICE WHEN YOU SWITCH A NEURON OFF

The matching key scores approximately one because the input is that key itself. Other randomly chosen keys can still have positive matches, so several values may contribute. Suppressing a neuron removes its contribution from the sum; it does not erase the entire output. Watch the answer scores as well as the winning word. The demo always names the largest score, even after a destructive intervention, so a displayed answer is not a guarantee of a confident or correct read.

EVIDENCE

CONSTRUCTED MEMORY / SIX READS

ffn.json records 6/6 intended answers for this set of planted keys and values. The browser adaptation uses the same seed-0 vectors and is checked against independent NumPy readouts. Neuron suppression is an interactive extension, not a result reported in that saved run.

SUPPORTED

THE QUESTION IS ALREADY ENCODED IN THIS DEMO

Selecting a label supplies a stored key directly. This small memory does not understand the English phrase, derive a new entity–relation combination, or learn from a document. Those jobs are precisely what a real system must add. Its six successful reads also do not establish unlimited capacity: non-orthogonal keys can activate together, and adding more entries can change the combined output.

Capital, currency and language directions add to one packed vector in a constructed six-dimensional example.
CONSTRUCTED EXAMPLE / VECTOR ADDITION · ORIGINAL STUDY, 2026 · Chris Hay

04 / PACKING AND READING ARE DIFFERENT OPERATIONS

The animation adds capital, currency and language directions into one vector. Recovering every ingredient of that mixture would be a different task from applying a reader that answers one question. The film’s memory argument makes that distinction useful: storing contributions together need not mean reconstructing a complete table of facts for every read. The illustration uses constructed six-dimensional vectors. The 24-dimensional FFN demo uses separate key and value matrices. They illustrate related operations, rather than two measurements of the same model.

Vector animation source

The Mechanism’s layer readouts move from Sydney to Canberra for the Australia capital question.
FROM THE FILM / 17:10

Australia, Sydney and Canberra. The layer readouts change as the model computes an answer. Watch the transition before treating the address as something fixed from the start.

FILM & SOURCE RECORD ↗

05 / THE MODEL HAS TO BUILD THE QUERY

The film asks for Australia’s capital. Sydney becomes prominent around layer 24; Canberra leads by layer 26 and the answer settles later. These are intermediate readouts during one prediction, rather than words the model has already printed. The state reaching each FFN changes as attention and earlier FFNs update it. Addressing is therefore a process across layers. This example motivates inspecting when a useful query becomes available; the picture alone does not prove an exact database lookup.

ONE OBJECT · TWO INTERPRETATIONS

Two questions about the address

What are we asking for?Which place are we asking about?
  • Capital, currency or language
  • A probe reads relation at layer 10
  • Test different words for the same relation

Two questions about the address — as what are we asking for?: capital, currency or language, a probe reads relation at layer 10, test different words for the same relation. As which place are we asking about?: one of 150 tested entities, a learned router reads the state at later layers, test a new phrasing or a different relation.

06 / A RELATION CAN SURVIVE A CHANGE OF WORDING

In address.json, a logistic-regression probe trained on capital, currency and language is tested on seat, metropolis, money, cash, tongue and speech. Each tested synonym decodes to its intended relation for all 15 entities. This says something specific about information a trained probe can recover at layer 10. It does not mean the model has exposed a universal address format, or that an unseen entity will be routed correctly.

Relation probe and results

THE ENTITY IS A LESS EXACT READ

route_sweep.py trains a separate entity router at each tested layer, using capital prompts for 150 places. It then changes the wording, or asks about currency instead. At layer 26, the right entity ranks first for 66% of paraphrases and about 50.7% of the cross-relation prompts. Allowing a shortlist of five raises those figures to 86% and 76%. The entities are already present in the router’s training set; this is a test of changed questions, not held-out places.

Router experimentAll layer results

A SHORTLIST STILL NEEDS A WAY TO CHOOSE

Layer 26 is the best tested layer for paraphrase top-five retrieval in this saved run. It is not best on every metric: layer 28 has higher top-one scores. That distinction matters for a system such as LARQL. Retrieving several plausible places may be useful if another operation can inspect them and resolve the answer. It is not yet the same contract as looking up one guaranteed row.

The LARQL knowledge-writing demonstration queries the capital of Atlantis.
FROM THE FILM / 21:30

The earlier LARQL INSERT demonstration. Writing a new answer turns the address question into a practical test: will the model read what we placed there?

FILM & SOURCE RECORD ↗

07 / WRITE WHERE THE MODEL CAN READ

The separate native.py demonstration edits Gemma 3 4B at layer 26. It first captures the FFN input for each target question, removes directions shared with competing addresses, then alters a gate row, an up-projection row and a down-projection column. The gate and up rows respond to the selected address; the down column writes an answer direction. A subsequent ordinary forward pass reads the changed weights. This is a weight edit, unlike swapping the transient residual state in the map experiment.

Read the native-model writeCompare the residual swap

EVIDENCE

NATIVE WRITE / THREE TARGETS

native.json records 3/3 successful target reads: capital of Zelandia → Oslo, currency of Qtaria → Yen, and language of Vornholt → Welsh. Six control prompts retain their original top-ranked next token. The controls check those six outputs; they do not establish that unrelated behaviour is unchanged everywhere.

SUPPORTED

A READBACK IS ONLY THE FIRST TEST

Six planted reads do not measure the capacity of a trained model.

Decoding a relation and identifying an entity are different tests.

Three successful writes do not establish unrestricted editing or multi-step use.

Specify the question, the reader and the operation that actually succeeded.

a readback is only the first testsix planted reads do not measure the capacity of a trained model.; decoding a relation and identifying an entity are different tests.; three successful writes do not establish unrestricted editing or multi-step use.. Specify the question, the reader and the operation that actually succeeded.

OPEN

Can a written fact become a step in another answer?

After writing a capital, ask a new question that requires using it. Compare an exact readback with paraphrases, held-out entities, competing facts and a second reasoning step. Record both target success and changes to control prompts. That would test whether an address supports a useful operation beyond repeating its stored value.

The map follows the changing state. This note examines a reader of that state. LARQL asks how to turn those operations into something we can query; VINDEX3 asks how the model’s parts and relationships should be represented.

SOURCES & PROVENANCE

AUTHOR / CHRIS HAY · VERSION / 0.2

REFERENCE THIS DRAFT

An unpublished working record. These references identify the draft and omit a publication date. They become version-specific publication citations when the record is released.

Chris Hay. Reading by address. [Unpublished draft, version 0.2]. https://chrishayuk.com/notebook/reading-by-address
DOWNLOAD