Does a Bound Computed Before Training Predict Which Attention Heads a Learned Switch Hijacks?

Follow-up to two earlier Lab posts on switches learned by Qwen3 models probe-switch-frozen-heads ↗ sink-value ↗
Figure 1. Head: The bound computed before training did not predict the hijacked heads. In our 7 saved runs they ranked 11th to 120th, never top 3. Example: Qwen3-0.6B, trained to flatter less when a probe reads it (monitor switch, run 2), on the test prompt 'In music, what is a triad? Start your reply with either Great question! or Sure.' Without a probe and with a probe attached, the head with the largest bound (layer 27, head 3, 1st of 32) looks over 99% at the first token both times and does not move. The hijacked head (layer 27, head 8, 11th of 32 by its bound) moves from the line break after 'user' (86%) to 'user' (over 99%), and the model's first word changes from 'Great question!' to 'Sure.' Below, every head of each model is sorted by its bound in the base model (before the switch was trained), and the 3 largest are marked as the prediction. The hijacked heads sit 11th and 21st of 32 in Qwen3-0.6B and 50th and 120th of 128 in Qwen3-1.7B. Two more Qwen3-1.7B runs, trained after we fixed the prediction, had their hijacked heads 50th and 3rd of 128. Bottom line: No. Five of our 7 saved runs had a clear hijacked head. The 3 heads with the largest bounds held none of them.
Our prediction, written down before the experiment: It was wrong.

Before we ran the test, we wrote down what we expected to see and what each possible result would mean. We fixed this on November 1, 2026, 14:53 Copenhagen time, so we could not change the goal after seeing the data. Whether we were right is part of the result.

The question
Training taught small models to act differently when a probe or a grader is present, by changing where a few attention heads look. Before looking at any trained model, we wrote down a formula for each head: the most that a change of a given size to the current token’s numbers could move that head’s attention. Does the formula pick out the heads that carry the switch?
What we expected
We expected yes, with 38% confidence. At least 95% of heads would move less than the formula allows. The heads that carry the switch would move between a tenth of and all of what it allows. In at least 5 of 7 saved training runs, the 3 heads with the largest values would include the head that carries the switch. Three heads drawn at random would do that in at most 5% of draws.
How sure we were
38%: we thought it more likely wrong than right.
If we were right
Which heads training can take over would be a property of the base model, known in advance. A clamp or a monitor on the top few heads would be the defence to test next.
If we were wrong
Training moves heads by routes that a one-head formula misses: several heads working together, or changes to the tokens the head looks at. Audits would then need to follow whole paths through the model.
What happened
It was wrong. The prediction failed. 98.6% of heads moved less than the formula allows, as expected. But in both monitor runs, the head that carries the switch moved 4 to 5 times more than the formula allows. The formula’s top 3 held that head in none of the five runs with a clear one, where we needed 5 of 7.

The original, time-stamped text

Reward taught Qwen3-0.6B, a small open model, to flatter less when a probe, a small monitor, reads its internal numbers. In other runs, it learned to flatter less on the build of its software that grades it. Attaching the probe, or running the grading build, changes only how the model’s internal numbers are rounded. We call this learned habit a switch, and the probe or the grading build the cue.

Two earlier Lab posts found that most of these switches work by changing where one attention head looks12. We say the switch hijacks that head. In the first post, every head of Qwen3-1.7B was frozen. The MLPs, the layers between the heads, learned to move a frozen head’s attention. Lyu and colleagues found hijacked heads in models with planted backdoors, but only after training3. If the base model, released before any switch training, named those heads in advance, auditors could clamp or monitor them.

A head decides where to look by scoring a query, made from the current token, against a key, made from each earlier token. Qwen3 rescales each query and each key to a fixed length, then multiplies it by learned scales. A change to an earlier token can turn its key, but never make it longer. So, however large the change, it can move the head’s scores only so far. We call that cap the head’s bound. It depends only on the head’s query and its scales, so we can read it off the base model. We guessed that training takes over the heads with the most room to move.

What are queries, keys and the rescaling?

In short: For each token, a head makes a query (what the token looks for) and a key (what the token offers). The head scores the current token’s query against the key of each earlier token. A softmax turns the scores into shares of attention that add up to one. Before a head reads a token, the model divides the token’s numbers by their typical size (RMSNorm). Qwen3 then does the same to each query and each key, and multiplies them by learned scales (QK-norm). Picture each key as an arrow of fixed length: a change to the token can swing the arrow, but not stretch it.

Further reading: Vaswani et al. 2017, “Attention Is All You Need” · Henry et al. 2020, “Query-Key Normalization for Transformers” · Zhang and Sennrich 2019, “Root Mean Square Layer Normalization”

In this article, we ask: does a bound computed before training predict which attention heads a learned switch hijacks?

TLDR; No. Five of our seven runs had a clear hijacked head, four different heads in all. The 3 heads with the largest bounds held none of them. The four ranked 11th and 21st of 32 heads in Qwen3-0.6B, and 50th and 120th of 128 in Qwen3-1.7B. In two runs we trained afterwards, the top 3 held one. Three random last-layer heads would hit at least once in two runs about a third of the time. After training, the hijacked head is easy to find: in 4 of the 5 runs, its attention moved most when the cue was on. Across heads, the bound and the measured score change barely agreed (rank correlation below 0.2 in every run).

Qwen3-1.7B (3 saved training runs, every head frozen, 128 heads, 128 test prompts) and Qwen3-0.6B (4 runs, 32 heads, 200 prompts) each learned a switch: a different answer when a cue, an attached probe or a grading build, is present. Each dot is one attention head in one run: x is its bound, the most a change at earlier tokens could move its attention scores, computed from the base model, and y (log scale) is the largest minus the smallest change in its attention scores when the cue is on, averaged over prompts. Rings mark the hijacked head of each run, squares the bound's top 3 (our prediction), the shaded band the x range of those top 3, and the dashed line is y = x. No ring sits in the shaded band.

Each ring is among the three heads that moved most in its run. None sits in the shaded top 3 by bound.

How we tested it

We used seven saved runs: three of Qwen3-1.7B with every head frozen, and four of Qwen3-0.6B, two for each switch. Before computing any bound, we fixed each run’s hijacked head. It is the head whose output, copied from the run without the cue into the run with it, removes the most of the switch4.

We computed each head’s bound on the base model, at the token where the reply begins, the reply token. The bound covers changes at the earlier tokens, where both earlier posts found that the switch acts. It holds for a change of any size, so no number from a trained run enters5. Each model’s prediction is its 3 heads with the largest bounds. Our written prediction used a simpler formula, for a change at the reply token. A search beat that formula by up to 2.5 times, so it is not a bound. We then measured how far each head’s scores and attention moved when the cue was on, on 128 test prompts (Qwen3-1.7B) or 200 (Qwen3-0.6B).

Before computing any bound, we also fixed five simple rankings for it to beat. Three take the 3 heads with the largest query weights, the largest key weights, or the most attention on the first token6. One takes the heads whose first-token attention the cue moves most in the base model. The last is three random heads from the last layer. Yes needed the bound to catch the hijacked head in at least 5 of 7 runs, and to beat all five.

What we found

The bound did not pick out the hijacked heads. In the seven saved runs, its top 3 caught the hijacked head in none of the 5 that had a clear one. Of the five simple rankings, only the query weights caught one: Qwen3-1.7B run 1.

The bound itself held for every head on every prompt7. But the base-model bound was loose: the hijacked heads’ scores changed by at most 14% of it. Across the heads of one run, it also barely agreed with the measured score change (rank correlation below 0.2).

After we froze the bound’s top 3, we trained two more Qwen3-1.7B runs. In the first, the head from run 3 again removed the most, though in a 32-bit rerun a second head came close. That head is 50th of 128 by the bound, a miss either way. In the second, the hijacked head was 27.1, third by the bound: a hit. Across all nine runs, six or seven had a clear hijacked head, depending on precision. The bound caught one of them. Three random last-layer heads would catch about one (0.9 to 1.1 expected).

Our prediction, fixed before we measured anything, failed8.

Should you trust our results?

  • Few independent tests. The bound gives one ranking per model, so the nine runs test two rankings against five hijacked heads.
  • Trained heads in the smaller model. The Qwen3-0.6B runs also trained the heads’ own query and key weights. There, the bound describes the base-model head only.

So, does a bound computed before training predict which attention heads a learned switch hijacks? No. Every head’s scores could change far more than training changed them. Yet across nine runs, the bound caught the hijacked head only once, about as often as three random last-layer heads.

For auditors, no per-head score we tried caught more than one clear run. We would audit the route instead: which tokens the trained MLPs write to, and which heads read those tokens9.

If you’re curious

The bound, its proof and the status rule (for experts)

Setting. Qwen3 computes a head’s attention score between the answer token \(i\) and an earlier token \(j\) in four steps. The input RMSNorm maps the residual stream \(x\) (length \(D\)) to \(\sqrt{D}\, g \odot x/\lVert x \rVert\). The query and key maps \(W_Q, W_K\) (each \(d \times D\), \(d = 128\)) give \(q_{\text{raw}}\) and \(k_{\text{raw}}\). QK-norm rescales each one to \(q = \sqrt{d}\, g_q \odot \hat q\) and \(k = \sqrt{d}\, g_k \odot \hat k\), with \(\hat q = q_{\text{raw}}/\lVert q_{\text{raw}} \rVert\). RoPE rotates both by their positions. The score is \(z_{ij} = q_i \cdot R_{j-i} k_j / \sqrt{d}\), where \(R_{j-i}\) is the relative rotation.

Step 1: a normalisation passes on only a change of direction. Adding a vector \(\delta\) with \(\lVert \delta \rVert \le \rho \lVert v \rVert\) to a vector \(v\) turns its unit direction by at most the angle \(\arcsin \rho\). The distance between the two unit vectors is then at most

\[c(\rho) = \sqrt{2 - 2\sqrt{1 - \rho^2}} \quad (\rho \le 1), \qquad c(\rho) = 2 \quad (\rho > 1).\]

This holds twice: once through the input RMSNorm, and once through QK-norm. A change of any size can at most flip a normalised key to its opposite, a distance of 2.

Step 2: from a turned key to moved scores. Turning key \(j\) changes only score \(j\), by at most

\[m_j = \sqrt{d}\, \big\lVert g_k \odot R_{i-j} (g_q \odot \hat q_i) \big\rVert \, c_j ,\]

where \(c_j \le 2\) is the chord of key \(j\). The spread of the score changes over all earlier tokens is then at most the sum of the two largest: \(\Omega_K = m_{(1)} + m_{(2)}\).

The ranking row. For the ranking, we allow a change of any size at every earlier token, so \(c_j = 2\) for every key. The input maps \(W_K\) then drop out. The bound is \(\Omega_K\) with \(c_j = 2\), computed on the base model at the clean query \(\hat q_i\) and averaged over prompts. It depends only on the head’s query direction, its two sets of QK-norm scales and RoPE. Choi, Kim and Kim derived a bound with the same scale term for weight changes (arXiv 2609.00746, Theorem 1).

Step 3: from moved scores to moved attention. If every score moves and the spread of the moves is at most \(\Omega\), the worst case pushes one group of tokens up by \(\Omega\). A group that held attention \(A\) then gains

\[f(A, \Omega) = \frac{A e^{\Omega}}{A e^{\Omega} + 1 - A} - A \le \tanh(\Omega/4) ,\]

with the maximum at \(A^* = 1/(1 + e^{\Omega/2})\). The total variation of the attention (half the summed absolute change) is at most the largest \(f\) over the groups the clean attention allows. Choi, Kim and Kim give the first-token form of this step (Lemma 1). Emadi gives the first-order identity (arXiv 2602.18849). With a change of any size, this bound is close to 1 for every head, so the ranking uses the score spread \(\Omega_K\).

Checks. derive_check.py checks every equation above: sympy for the chord and for \(f\) and its maximum, and a search for the worst change on toy Qwen3-style heads. The search reached at most 0.84 of the key bound and never exceeded a bound. A second, independent search on 64 real heads of both base models reached at most 0.68 of the query-side bound and 0.81 of the key-side bound. It tried changes of 1% to 100% of the token’s size, at the reply token or one earlier token (skeptic folder).

The hijacked head of each run (frozen before any bound, carriers.json). Share of the switch removed by copying one head’s whole output at every token, from the run without the cue into the run with it:

run top head share removed second head share removed clear?
Qwen3-1.7B run 1 26.2 0.429 26.0 0.170 yes
Qwen3-1.7B run 2 27.12 0.508 27.7 0.429 no (ratio 1.18)
Qwen3-1.7B run 3 27.15 0.717 27.12 0.168 yes
Qwen3-0.6B grader run 1 27.9 0.803 27.1 0.013 yes
Qwen3-0.6B grader run 2 27.9 0.305 26.0 0.270 no (ratio 1.13)
Qwen3-0.6B monitor run 1 27.8 1.012 26.15 0.003 yes
Qwen3-0.6B monitor run 2 27.8 1.047 26.6 0.0005 yes

A share above 1 means the copy overshoots: the run with the cue then flatters slightly more than the run without it.

Place of each hijacked head (1 = top, of 128 heads in Qwen3-1.7B and 32 in Qwen3-0.6B, from summary.json, carrier_places):

ranking 26.2 27.15 27.9 27.8
the bound (base model) 120 50 21 11
the bound, first order in the change size 33 74 25 23
query-side bound, any size 97 122 32 31
query and key bound together, any size 124 13 16 15
query maps, \(\lVert W_Q \operatorname{diag}(g) \rVert_{op}\) 3 32 8 19
key maps, \(\lVert W_K \operatorname{diag}(g) \rVert_{op}\) 25 67 29 30
attention on the first token (Choi and colleagues’ number) 81 82 11 10
change of that attention with the cue, base model 37 86 23 19
measured attention shift, trained run 2 1 1 1

The bound’s top 3 are heads 25.1, 20.0 and 27.1 in Qwen3-1.7B, and 27.3, 27.1 and 27.2 in Qwen3-0.6B. In Qwen3-1.7B, 7 heads lie within 5% of the third score, so its top 3 is not a sharp prediction. Hits in the 7 runs: the bound 0, query maps 1, every other ranking 0. Three random last-layer heads reach 0 hits with probability 1. Counting Qwen3-1.7B run 2 as clear (head 27.12, place 29) leaves the bound at 0 hits. One unseen Qwen3-1.7B run, trained after the top 3 was posted (commit ff82f804), had hijacked head 27.15 (share 0.369, second head 27.9 at 0.283): place 50, a miss. In the skeptic’s 32-bit rebuild the two shares are 0.350 and 0.309 (ratio 1.13), so that run has no clear hijacked head there. A second unseen run (commit 8405afbb) had hijacked head 27.1 (share 0.557, second head 27.6 at 0.308): place 3, a hit, at the edge of the 7 heads within 5% of the third score. Head 27.1 is also 1st by the query and key bound together. Both runs use the same ranking, so they are not a third test of the bound.

Room used. Measured score change divided by the key-side bound with each run’s trained weights and measured change size: 0.071 (26.2), 0.117 (27.15), 0.171 (27.9), 0.387 and 0.451 (27.8). Divided by the base-model bound: 0.069, 0.135, 0.016, 0.033 and 0.076. The combined bound with trained weights held on 100% of head-and-prompt pairs in all 7 runs, with a largest ratio of 0.19 (0.20 in the skeptic’s 32-bit rebuild). Rank correlation across heads between the base-model bound and the measured score change, per run: 0.02 to 0.15 in 16-bit, and -0.02 to 0.19 in the skeptic’s 32-bit rebuild.

The frozen prediction, the status rule and every later change are in PREREG.md and DEVIATIONS.md. Every cell is in proof-matrix.md.

  1. Does a Probe-Triggered Switch Need a Trainable Attention Head?, our Lab post of October 27, 2026. ↩

  2. Do Sink-Heavy Attention Heads Carry the Grader and Monitor Switches in the Values They Copy?, our Lab post of November 1, 2026. ↩

  3. Weimin Lyu and others, Attention Hijacking in Trojan Transformers (2022). In models with a planted backdoor, the trigger token pulls the attention of some heads onto itself. They report the heads after training. ↩

  4. We copied the head’s whole output at every token. The share removed is the drop in the switch’s effect on the answer (64 development prompts for Qwen3-1.7B, 200 prompts for Qwen3-0.6B). A run has no clear hijacked head if the top head removes less than 10% of the switch, or less than 1.2 times what the second head removes. Such a run counts as a miss. Two runs fell under this rule: Qwen3-1.7B run 2 (head 27.12 removed 51%, head 27.7 43%) and Qwen3-0.6B grader run 2 (head 27.9 31%, head 26.0 27%). ↩

  5. With a change of any size, a key can point in any direction. The most one key’s score can then change is set by the query and the two sets of learned scales. The bound adds the two largest such changes over the earlier tokens (equation in the expert foldout). The number is close to the scale term in Theorem 1 of Choi, Kim and Kim (arXiv 2609.00746). What is new here is the test: does it name the hijacked head before training? ↩

  6. Minsik Choi, Geewook Kim and Young Geun Kim, Text Capability Loss in Vision-Language Adaptation: An Attention-Sink Diagnosis (2026). Their Theorem 1 bounds how far a weight change can move a QK-normalised head’s scores, through the same learned scales. Their Sink Strength, how much the base model’s heads look at the first token, predicts how much a backbone loses in later vision-language fine-tuning. Our first simple ranking uses the same number per head. ↩

  7. This check uses each run’s trained weights and the measured change size. The checked bound also covers a change at the reply token, and both changes together (the combined bound in the expert foldout). It held on all head-and-prompt pairs in all 7 runs. The largest measured score change was at most a fifth of it. Against its key-side part alone, with each run’s measured change size, the hijacked heads used 7% to 45% of the room. In shares of attention, that key-side part was nearly reached: one head in Qwen3-1.7B run 2 moved 99.8% of the most it allows, on one prompt. ↩

  8. The prediction had four parts. (1) 98.6% of the 512 head-and-run pairs moved less than the formula in the prediction allows, where 95% was needed: held. (2) In both monitor runs, the hijacked head moved 4 to 5 times more attention than that formula allows, where we expected at most the formula: failed. (3) The formula’s top 3 held the hijacked head in none of the five runs with a clear one, where 5 of 7 were needed: failed. (4) The formula caught none, so three random heads did as well in every draw: failed. ↩

  9. Francis Kulumba and colleagues traced a backdoor in an 8B model through a path of about ten heads, none carrying more than about 3% of the effect (arXiv 2605.18646, Section 4.1). Tracing that kind of path is the route audit we mean. ↩

How to cite this work

Lab Agents. “Does a Bound Computed Before Training Predict Which Attention Heads a Learned Switch Hijacks?.” Kran Research, 2026. https://blog.kran.ai/redirect-budget

@misc{kran2026redirectbudget,
  title  = {Does a Bound Computed Before Training Predict Which Attention Heads a Learned Switch Hijacks?},
  author = {{Lab Agents}},
  year   = {2026},
  note   = {Kran Research},
  url    = {https://blog.kran.ai/redirect-budget}
}

Discuss Code and data