Attention at absolute zero: cold attention beside a frozen language model
A frozen Qwen2.5 model reads the text. Beside it, a block of cold attention with 529 to 949 parameters chains what the model read and answers a yes-or-no question. The block was trained from yes/no answers on contexts of at most 16 statements and is read at up to 1,000. Nothing in the language model is trained or changed.
With frozen Qwen2.5-7B, every released organ answers every test question right, from 16 to 1,000 statements: 6 of 6 starts over two input layouts, with two of the eight sentence wordings never seen in training. The 7B model alone, given the whole context and asked, answers 74.0% right at 16 statements and 43.8% at 1,000.
Paper: Attention at Absolute Zero (arXiv:2611.11937). Code: github.com/NeoVand/cold-attention (the code in organ/).
The block
The items are the mentions of names: the question's X and Y, then, for each statement, the person named first and the person named second. Every ordered pair of mentions carries 3 bits. In each loop, bit c of (u, v) turns on when some mention k passes test c at both (u, k) and (k, v). Bits never turn off. A test is a learned function of the pair's input planes plus a non-negative mix of the pair's bits, so it can ask for a bit to be on and never for one to be off. The answer at (X, Y) is a non-negative weighting of its three bits minus a non-negative offset: with no bit on, the answer is no. The block is read after K + 4 loops, where K = ceil(log2 of the number of mentions) + 3.
The input planes of a pair (a, b) of mentions come from the frozen model, and nothing in this read-in is trained:
- same person: the keys of a and b (the sum of the model's input embeddings over the name's tokens), centred and scaled with numbers from the training statements, have a cosine above a threshold found without labels (just under the cluster of matches among the sorted cosines);
- the statement's link: a is named first and b second in one statement of class c, or the reverse (layout
within); or a is named in a statement of class c and the other person named there is b's person (layoutpartner); - the question's pair, and four flags (a is in the question; b is in the question; the same mention; both real).
A statement's class depends on the frozen model:
- Qwen2.5-7B and Qwen2.5-1.5B (pooled reading). Each sentence is given to the model twice, followed by "Therefore, the parent is" and by "Therefore, the child is". The reading compares, across the two, the logit of the first-named person's first token with the second-named's. Sentences are grouped by wording through the key of their closed-class words. Each wording's direction (is the first-named the parent?) is the majority reading over all of that wording's sentences read together. No label or answer is used. A wording not seen in training opens a class of its own.
- Qwen2.5-0.5B (wording classes). This model reads "X is a child of Y" backwards, so the class is the wording itself, and the block learns each wording's direction from the answers. All eight wordings are in training.
The tasks
Kinship. Statements in eight wordings: "P is the mother of C.", "P is the father of C.", "P is a parent of C.", "C is the son of P.", "C is the daughter of P.", "C is a child of P.", "C's mother is P.", "C's father is P.". Each states one parent link, and a wording is used only where
it fits the two people's genders. People are drawn from 11,520 full names (96 first names, 120 surnames). A
context has n statements in shuffled order, as one to three lines of descent (lineage) or as a family over
generations where a person may have a stated mother and father (pedigree). There are 8 questions per context,
"Is X an ancestor of Y?". Half are yes, through a chain of parent links from X down to Y, spread over chain lengths.
The other half are reversed (Y is an ancestor of X), unrelated, or absent (one name does not occur).
Comparison. Facts "* A is older than B." over 1,400 single-token names of the model's vocabulary, and the question "Is X older than Y?". The read-in is 12 comparators on the model's input embeddings at the name positions, with thresholds found without labels. It is a simpler organ, beside a frozen Qwen2.5-0.5B.
Results
Questions answered right at the read, per seed. Test contexts: 24 per size (12 at 1,000), 8 questions each, all eight
wordings. The validation splits have 48 contexts; val6 uses only the six training wordings.
Kinship, frozen Qwen2.5-7B, pooled reading, layout within (the default)
| Statements | seed 0 | seed 1 | seed 2 | frozen model alone |
|---|---|---|---|---|
| 16 | 192 / 192 | 192 / 192 | 192 / 192 | 74.0% |
| 32 | 192 / 192 | 192 / 192 | 192 / 192 | 64.6% |
| 64 | 192 / 192 | 192 / 192 | 192 / 192 | 52.6% |
| 128 | 192 / 192 | 192 / 192 | 192 / 192 | 53.1% |
| 256 | 192 / 192 | 192 / 192 | 192 / 192 | 52.6% |
| 512 | 192 / 192 | 192 / 192 | 192 / 192 | 52.6% |
| 1,000 | 96 / 96 | 96 / 96 | 96 / 96 | 43.8% |
Validation, right at the read: val6 (16 statements): 100% / 100% / 100%; val16 (16 statements): 100% / 100% / 100%; val24 (24 statements): 100% / 100% / 100%.
Kinship, frozen Qwen2.5-7B, pooled reading, layout partner
| Statements | seed 0 | seed 1 | seed 2 | frozen model alone |
|---|---|---|---|---|
| 16 | 192 / 192 | 192 / 192 | 192 / 192 | 74.0% |
| 32 | 192 / 192 | 192 / 192 | 192 / 192 | 64.6% |
| 64 | 192 / 192 | 192 / 192 | 192 / 192 | 52.6% |
| 128 | 192 / 192 | 192 / 192 | 192 / 192 | 53.1% |
| 256 | 192 / 192 | 192 / 192 | 192 / 192 | 52.6% |
| 512 | 192 / 192 | 192 / 192 | 192 / 192 | 52.6% |
| 1,000 | 96 / 96 | 96 / 96 | 96 / 96 | 43.8% |
Validation, right at the read: val6 (16 statements): 100% / 100% / 100%; val16 (16 statements): 100% / 100% / 100%; val24 (24 statements): 100% / 100% / 100%.
Kinship, frozen Qwen2.5-1.5B, pooled reading, layout within
| Statements | seed 0 | seed 1 | seed 2 | frozen model alone |
|---|---|---|---|---|
| 16 | 192 / 192 | 192 / 192 | 192 / 192 | 56.8% |
| 32 | 192 / 192 | 192 / 192 | 192 / 192 | 53.6% |
| 64 | 192 / 192 | 192 / 192 | 192 / 192 | 53.1% |
| 128 | 192 / 192 | 192 / 192 | 192 / 192 | 63.5% |
| 256 | 192 / 192 | 192 / 192 | 192 / 192 | 59.4% |
| 512 | 192 / 192 | 192 / 192 | 192 / 192 | 51.6% |
| 1,000 | 96 / 96 | 96 / 96 | 96 / 96 | 52.1% |
Validation, right at the read: val6 (16 statements): 100% / 100% / 100%; val16 (16 statements): 100% / 100% / 100%; val24 (24 statements): 100% / 100% / 100%.
Kinship, frozen Qwen2.5-0.5B, wording classes, layout within (the 2 of 5 starts that learned)
| Statements | seed 2 | seed 4 | frozen model alone |
|---|---|---|---|
| 16 | 192 / 192 | 192 / 192 | 53.6% |
| 32 | 192 / 192 | 192 / 192 | 52.6% |
| 64 | 192 / 192 | 192 / 192 | 59.4% |
| 128 | 192 / 192 | 192 / 192 | 51.0% |
| 256 | 192 / 192 | 192 / 192 | 45.3% |
| 512 | 192 / 192 | 192 / 192 | 48.4% |
| 1,000 | 96 / 96 | 96 / 96 | 46.9% |
Validation, right at the read: val16 (16 statements): 100% / 100%; val24 (24 statements): 100% / 100%.
Kinship, frozen Qwen2.5-0.5B, wording classes, layout partner (the 3 of 5 starts that learned)
| Statements | seed 1 | seed 2 | seed 4 | frozen model alone |
|---|---|---|---|---|
| 16 | 192 / 192 | 192 / 192 | 192 / 192 | 53.6% |
| 32 | 192 / 192 | 192 / 192 | 192 / 192 | 52.6% |
| 64 | 192 / 192 | 192 / 192 | 192 / 192 | 59.4% |
| 128 | 192 / 192 | 192 / 192 | 192 / 192 | 51.0% |
| 256 | 192 / 192 | 192 / 192 | 192 / 192 | 45.3% |
| 512 | 192 / 192 | 192 / 192 | 192 / 192 | 48.4% |
| 1,000 | 96 / 96 | 96 / 96 | 96 / 96 | 46.9% |
Validation, right at the read: val16 (16 statements): 100% / 100% / 100%; val24 (24 statements): 100% / 100% / 100%.
Comparison, frozen Qwen2.5-0.5B
| Facts | seed 0 | seed 1 | seed 2 | frozen model alone |
|---|---|---|---|---|
| 16 | 192 / 192 | 192 / 192 | 192 / 192 | 48.4% |
| 32 | 192 / 192 | 192 / 192 | 192 / 192 | 54.2% |
| 64 | 192 / 192 | 192 / 192 | 192 / 192 | 53.1% |
| 128 | 192 / 192 | 192 / 192 | 192 / 192 | 49.0% |
| 256 | 192 / 192 | 192 / 192 | 192 / 192 | 50.0% |
| 512 | 192 / 192 | 192 / 192 | 192 / 192 | 50.5% |
| 1,000 | 96 / 96 | 96 / 96 | 96 / 96 | 49.0% |
Validation, right at the read: val16 (16 statements): 100% / 100% / 100%; val24 (24 statements): 100% / 100% / 100%.
Controls for the comparison organ (comparison/controls/, seed 0 each). The warm control puts a census block (width 128, a state that carries strengths) in place of the cold block, on the same comparator bits as seed 0 and trained 25,000 updates; it fits every training and validation question and falls as the contexts grow. Its reads at 512 and 1,000 facts were capped at 16 and 4 questions per family of context to bound their cost. The true-relations control gives the cold block hand-made "same name" relations in place of the model's read and fails, about two thirds right at every size; the paper puts this down to how those inputs were built. Right at the read (K + 4), test contexts:
| Facts | cold organ, seeds 0 / 1 / 2 | warm control (questions) | true-relations control |
|---|---|---|---|
| 16 | 100% / 100% / 100% | 100% (192) | 68.75% |
| 32 | 100% / 100% / 100% | 97.92% (192) | 70.31% |
| 64 | 100% / 100% / 100% | 85.94% (192) | 64.06% |
| 128 | 100% / 100% / 100% | 75.52% (192) | 68.75% |
| 256 | 100% / 100% / 100% | 71.35% (192) | 69.27% |
| 512 | 100% / 100% / 100% | 64.58% (48) | 69.27% |
| 1,000 | 100% / 100% / 100% | 33.33% (12) | 66.67% |
Every start, Qwen2.5-0.5B. Ten starts were trained on the 0.5B read-ins, and five learned. Every start that learned
is right on every question at every size; those five are the default folders. The five that did not learn are released too,
as reported failures (not_learned_<layout>/). A start that did not learn is already wrong on the 16-statement validation
split, so starts can be selected without reading the test:
| Layout | seed | val16 (16 statements) | test, 16 to 512 | test1000 | folder |
|---|---|---|---|---|---|
| partner | 0 | 64.58% | 50.52 to 70.83% | 50% | kinship/qwen2.5-0.5b/not_learned_partner/seed0/ |
| partner | 1 | 100% | 100% | 100% | kinship/qwen2.5-0.5b/partner/seed1/ |
| partner | 2 | 100% | 100% | 100% | kinship/qwen2.5-0.5b/partner/seed2/ |
| partner | 3 | 73.44% | 52.08 to 67.19% | 51.04% | kinship/qwen2.5-0.5b/not_learned_partner/seed3/ |
| partner | 4 | 100% | 100% | 100% | kinship/qwen2.5-0.5b/partner/seed4/ |
| within | 0 | 65.1% | 60.94 to 69.27% | 59.38% | kinship/qwen2.5-0.5b/not_learned_within/seed0/ |
| within | 1 | 50% | 50% | 50% | kinship/qwen2.5-0.5b/not_learned_within/seed1/ |
| within | 2 | 100% | 100% | 100% | kinship/qwen2.5-0.5b/within/seed2/ |
| within | 3 | 83.85% | 52.6 to 90.1% | 50% | kinship/qwen2.5-0.5b/not_learned_within/seed3/ |
| within | 4 | 100% | 100% | 100% | kinship/qwen2.5-0.5b/within/seed4/ |
Training
Kinship: contexts of 1 to 16 statements, 384 per size, 8 questions each; for the 7B and 1.5B organs only the six wordings "P is the mother of C.", "P is a parent of C.", "C is the son of P.", "C is the daughter of P.", "C is a child of P.", "C's father is P."; for the 0.5B organs all eight. 4,000 updates of batch 16 (one size drawn per batch); loops ceil(log2(2n + 2)) + 2 plus a draw from 0 to 1 per batch (n statements); the loss reads the answer there and 10 loops later; cross-entropy on the yes/no answer only; AdamW, learning rate 0.001, 400 warm-up updates, cosine decay to 1e-5, weight decay 0.01 (not on the bit mix), gradients clipped to norm 1; the mean of 8 snapshots, one every 250 updates from update 2,250 to 4,000 (the released parameters). Comparison: the same, on contexts of 1 to 16 facts; loops ceil(log2(n + 1)) + 2 plus a draw from 0 to 1 per batch (n facts); the loss reads the answer there and 10 loops later. Each start trains in about two minutes on one H100. The read-in is not trained.
Files
organ.py the code: generators, read-in (torch, transformers), block (jax), Organ.ask
kinship/<model>/
readin.npz mu_p, sd_p, mu_w, sd_w (centring of the keys), theta_p (same-person threshold),
centres (the training wordings' closed-class keys)
closed.json the closed-class words of statements and of questions
<layout>/seed<k>/ within or partner; also per_sentence_<layout>/ (7B) and not_learned_<layout>/ (0.5B)
model.safetensors parameters (float32)
config.json frozen model and revision, layout, classes, read rule, training, scores per
split and size (with the read-in's errors and the pooled readings)
reference_answers.npz logits per question after K, K + 4 and K + 16 loops, and the labels
comparison/qwen2.5-0.5b/
names.json the 1,400 names
seed<k>/ model.safetensors, config.json, reference_answers.npz, readin.npz (comparators, thresholds, centring, whitening)
comparison/controls/
warm/seed0/ the warm control: model.safetensors, config.json, readin.npz (seed 0's read-in)
true_relations/seed0/ the true-relations control: model.safetensors, config.json (no frozen model)
certificates/
table.json every network's certificate verdict (28)
networks/<folder>.json each network's full certificate
lean/OrganCert.lean, OrganTables.lean the Lean 4.35 proofs (layout within) and the table checks
index.json every organ's test scores; the frozen models alone; every 0.5B start; the
per-sentence variant
Use
from huggingface_hub import snapshot_download
import sys
root = snapshot_download("mohsenvand/cold-attention-organ", allow_patterns=["organ.py", "kinship/qwen2.5-7b/*"])
sys.path.insert(0, root)
import organ
o = organ.Organ(f"{root}/kinship/qwen2.5-7b/within/seed0") # the default (organ.Organ() fetches it); loads Qwen/Qwen2.5-7B at the pinned revision on first use
statements = ["Maria Lopez is the mother of Tom Baker.", "Ivan Chen is the son of Tom Baker.", "Ivan Chen's father is Tom Baker."]
print(o.ask([(statements, ["Is Maria Lopez an ancestor of Ivan Chen?", "Is Ivan Chen an ancestor of Maria Lopez?"])]))
# [[True, False]]
c = organ.kinship_split("test1000")[0] # the first test context of 1,000 statements
print(o.ask([organ.kinship_text(c)]), c["label"])
python organ.py demo kinship/qwen2.5-7b/within/seed0 --statements 256 prints a generated family and the answers.
The read-in needs the frozen model, best on a GPU in float16 (the 7B model needs about 16 GB). The block itself is
small: at 1,000 statements it holds three bit matrices over 2,002 mentions.
Checks
The released code was checked against the recorded runs on Modal:
Read-in numbers. Recomputed from the stored training read-ins, the same-person thresholds and wording classes equal the ones recorded at training, for all 25 kinship starts.
The block on the stored read-ins (NVIDIA H100, jax 0.8.0, as the evaluations were run): 240 of 240 recorded evaluation rows of 25 kinship starts are reproduced exactly: right answers after K, K + 4 and K + 16 loops, by kind and chain length, bits at rest, the read-in's errors and the pooled readings. That count includes the five 0.5B starts that did not learn and the six per-sentence 7B starts. For the comparison organ, 27 of 27 rows of 3 starts are reproduced exactly.
From text, end to end, at the pinned revisions (torch 2.5.1, transformers 4.46.3, the frozen model in float16 on a GPU, the block on a CPU), on the first 4 contexts of each validation split and the first test context of each size up to 1,000 statements:
- Qwen2.5-7B: 19 contexts, 2,232 statements; every key bit-identical; readings equal in 2,232 of 2,232; every released organ right on every sampled question;
- Qwen2.5-1.5B: 19 contexts, 2,232 statements; every key bit-identical; readings equal in 2,229 of 2,232; every released organ right on every sampled question;
- Qwen2.5-0.5B: 15 contexts, 2,168 statements; every key bit-identical; readings equal in 2,132 of 2,168; every released organ right on every sampled question;
- comparison: 15 contexts, 2,168 facts; every input embedding bit-identical; every organ right on every sampled question.
A reading near a tie can change with the batch it is read in. The 0.5B organs do not use the readings, and the pooled reading of the larger models absorbs the few that change.
The Use example below, run as written from this repository's files on an NVIDIA L40S: it prints
[[True, False]], and the first 1,000-statement test context gets 8 of 8 right (the comparison organ: 8 of 8 on its first test context).The Lean files in
certificates/lean/, with the networks' names changed to this repository's folders, compile with Lean version 4.35.0: 22#print axiomslines, the same as the original build's after the renaming; nosorry.Controls: the warm control and the true-relations control (
comparison/controls/) give the recorded rows exactly with this code on an NVIDIA H100 (14 of 14 rows each: every split and size, both the weight-averaged and the final parameters, every breakdown by family, kind and chain length, and the warm control's read-in counts).
Certificates: exact at every size
certificates/ holds a finite certificate for each of the 28 networks here. A trained block is a finite table: for each pattern of a pair of mentions and each set of kept bits, which tests fire. Two finite checks on the table decide whether the network, given its input bits, answers every question right in every family of any size at the registered number of loops: (1) no false yes at any size (every "no" context maps into one small context of kinds of mention, and the kept bits the table allows there never make the read-out say yes); (2) every true yes in time, at every length (bare chains of up to 48 items computed in classes of pairs, longer chains by an induction on distance).
table.json: each network's verdict.exactis true for all 23 networks that learned and false for the 5 that did not. Beside it:no_false_yes,chains_in_loops,chain_class(in_time;walker: right at rest, too slow for the registered loops;never), the loops each chain length needs against the registered ones, spot checks on random contexts, andengine_differences(the certificate's own engine against the trained code).- The check sees the loop count, which a run-to-rest test cannot:
kinship/qwen2.5-0.5b/not_learned_within/seed3is a walker (it answers a chain of k statements at about loop 2k), right on every context run to rest and rejected here. networks/: each network's full certificate.lean/: the result machine-checked in Lean 4.35 (core, no Mathlib) for the nine trained networks of layoutwithinwith two direction classes (Qwen2.5-7Bwithinandper_sentence_within, Qwen2.5-1.5Bwithin; seeds 0 to 2):correct_<network>(right on every well-formed instance of every size) andno_false_yes_<network>. Fourpartnernetworks pass the two table checks there; the lemma placing their patterns on a shortest chain is measured, not proved. Compile withlean -o OrganCert.olean OrganCert.leanand thenLEAN_PATH=. lean OrganTables.lean; every theorem depends only onpropext,Classical.choiceandQuot.sound. Not proved in Lean: that each table equals the float network (it is the network's forward pass evaluated on every case of its finite domain).
Limits
- Template sentences and one relation. These are not crowd-written stories, and relations are not composed. The organ answers beside the model, not through it.
- The model is read by two extra passes per sentence. The direction comes from its next-word choice after a short probe, not from its inner states.
- A wording with a new relation word would need the closed-class words recomputed on text that contains it. The two unseen wordings ("P is the father of C.", "C's mother is P.") reuse known words in a new pattern.
- Read per sentence instead of pooled, the 7B organ misses 2 questions on the test splits on every one of
six starts (released in
kinship/qwen2.5-7b/per_sentence_<layout>/). The model misreads 4 of the 36,192 test sentences, and each wrong answer is a chain through a misread sentence. Pooling over a wording removes them, but pooling needs several sentences of each wording read together. - Starts are a lottery when the directions are learned from answers (Qwen2.5-0.5B): 5 of 10 learned. With the direction taken from the model (7B, 1.5B), every start learned: 15 of 15, counting the six per-sentence starts.
- One model family; three to six starts per frozen model.
License
Apache 2.0. The frozen models are Qwen2.5 (Apache 2.0); they are downloaded from their own repositories at the pinned revisions and are not part of this repository.
Citation
@misc{mohsenvand2026absolutezero,
title = {Attention at Absolute Zero},
author = {Mohsenvand, Mostafa},
year = {2026},
eprint = {2611.11937},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2611.11937}
}