Spaces:
Running
Running
spacebeam: extras READMEs, from lightfastai/beam-entry 9bb695e
Browse filesFiles changed (3)
- README.md+2
- extras/README.mdAdded+20
- extras/monitors-from-inside-beam.mdAdded+115
54 unmodified lines5556575854 unmodified lines- **Switching experts off**: each kind of text's 64 most selective experts switched off, to see which kinds live in their own experts.- **15 predictions**, committed before Beam was loaded, each scored in that write-up.Made by Lightfast.54 unmodified lines55565758596054 unmodified lines- **Switching experts off**: each kind of text's 64 most selective experts switched off, to see which kinds live in their own experts.- **15 predictions**, committed before Beam was loaded, each scored in that write-up.The write-up is also in this Space's files: [extras/](https://huggingface.co/spaces/jeevanpillay/spacebeam/blob/main/extras/README.md).Made by Lightfast.
1234567891011121314151617181920# Extras
The research spacebeam grew out of. Everything here is also on the explorer Space, [jeevanpillay/beam-expert-explorer](https://huggingface.co/spaces/jeevanpillay/beam-expert-explorer).
- [Monitors from inside Beam](monitors-from-inside-beam.md): the full write-up. Whether Beam's router picks predict what it does (its refusals above all), the map of its 12,544 routed experts, switching each kind of text's experts off, Beam labelling its own experts, when Beam decides, and the 15 predictions committed before Beam was loaded, each scored.- [The explorer](https://huggingface.co/spaces/jeevanpillay/beam-expert-explorer): every routed expert, with its most frequent tokens and the kinds of text it serves.
The write-up's sections:
- The result- Who this is for- The explorer- When does Beam decide?- Does Beam know a task is not done?- Predictions, written first- How Beam was used- Limits- Prior work and credits
How it was made: we ran Beam ourselves, with a hook on its router logging the 8 experts it picks at every token in all 49 expert layers, and committed our predictions before the model was loaded. Half of each layer's experts are withheld from everything public, here and in spacebeam, and appear only as counts.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115<!-- A copy of the write-up on the explorer Space's page, https://huggingface.co/spaces/jeevanpillay/beam-expert-explorer -->
# Monitors from inside Beam
Lightfast's entry to Build with Beam.
> **The question.** Can you tell what Beam is about to do from which experts its router picks, and does the behaviour live there? A server computes those picks anyway and throws them away.
Earlier entries benchmark Beam, sweep its effort levels and compress it. Two of them log routing counts per expert in order to compress it: the MXFP4 quantisation (`zouaynib/Beam-1.0-501B-A23B-MXFP4`, with its per-layer expert token counts) and mrfakename's pruned copy, with its saliency scores from a forward pass. We found none that uses the router's picks to predict what Beam does, or that switches experts off to see what each kind of text loses.
This one reads all 12,544 of Beam's routed experts. The closest prior work is a linear probe on router logits at the final prompt token of vision-language mixture-of-experts models, Qwen3-VL and Kimi-VL (Yang, Ding, Feng and Tsvetkov, arXiv 2610.07774); ours reads the top-8 picks across 49 layers of a text model. Probes have also caught sabotage and unspoken deception in agents (FAR AI, arXiv 2610.12445). We ask what those leave open for Beam: whether its picks beat a reader of the prompt's words, which other readers beat them, and whether Beam, asked to label its own experts, can say what they do.
## The result
**Beam, asked about a prompt alone, predicts its own refusals better than its router's picks do. The picks read refusal better than a classifier of the same size on the prompt's words, but not well enough to make a good alarm on their own.** On 681 held-out gray prompts:
| Reader | AUROC (95% interval) | Refusals caught at 1% false alarms (95% interval) ||---|---|---|| The router's picks, at the prompt's last token | 0.818 (0.784β0.850) | 0.12 (0.05β0.25) || A classifier on the prompt's words, same size | 0.764 (0.725β0.799) | 0.10 (0.04β0.17) || A probe on Beam's internal state, layer 30 | 0.898 (0.875β0.921) | 0.40 (0.26β0.52) || Beam itself, asked from the prompt alone | 0.868 (0.839β0.895) | 0.14 (0.01β0.18) |
AUROC is the chance that the reader ranks a prompt Beam refused above one it answered (0.5 is a coin flip). Intervals resample whole families of near-duplicate prompts, 2,000 times. The 681 are every held-out gray prompt. The router beats that word classifier by 0.054 (0.020β0.089), but its 0.818 falls short of the 0.85 we set in advance, so that prediction (P1) is unresolved. At a threshold that wrongly flags 1 answered prompt in 100, it catches about 12% of refusals.
A gray prompt is one that looks risky and is harmless, such as asking how to kill a Python process. A wrong refusal is Beam declining one. The monitor is a logistic regression on which 8 of 256 experts Beam's router picks at the prompt's last token, in each of its 49 expert layers. It reads only what a server running Beam already computes, and it is scored on prompt families it never saw in training.
Routing in mixture-of-experts models follows topic. So the monitor is also compared with the prompt-only classifier on a subset of the held-out prompts where refused and answered prompts are matched within each topic category. We predicted it would not clearly beat the prompt there (P2): if it did no better, it would be a free topic detector. That prediction is refuted: the router leads the prompt-only classifier by 0.066 (0.011β0.125). That shows the picks beat a word-based baseline of the same size within a category, not that they carry more than the prompt: they are computed from the prompt and may carry its meaning, which word counts miss, and Beam's own guess from the prompt alone beats them (below). Most of the matched prompts come from two categories, so this is a matched comparison within them more than across many topics. The probe on Beam's internal state beats the router by 0.080 (0.059β0.102), as predicted (P3): the residual stream reads refusal better than the routing, which fits RASET's argument (arXiv 2605.29708) that refusal is carried mostly inside the experts rather than by the router.
Beam's own guess from the prompt alone beats the router's picks by 0.050 (0.017β0.083) on all 681 prompts, and by 0.070 (0.011β0.128) on the topic-matched subset, where it scores 0.780 against the router's 0.710. That judge is the model predicting itself, from the prompt's text, at low effort: one API call per 20 prompts.
## Who this is for
- **Reflection's trainers.** In the model's discussion 17, Reflection asked for prompts Beam wrongly refuses, "exactly the cases we want to train on", and named gray-area prompts as where it most wants to improve. Three of the readers above rank prompts by how likely Beam is to refuse them before any answer is generated, each at a different cost. The probe ranks best (AUROC 0.898; it catches 40% of refusals at 1% false alarms) and needs Beam's internal state at one layer, kept during the prompt's forward pass. Beam's own guess from the prompt (0.868) is second and costs one API call per 20 prompts. The router's picks (0.818) need no extra forward pass, only logging. A large pool can be screened with the cheapest reader that is good enough, and only the top of its ranking sent to Beam for answers.- **Anyone serving Beam.** The router picks 8 experts in each of 49 layers at every token anyway, so keeping them at a prompt's last token needs no extra forward pass, and the monitor is one dot product over 12,544 yes-or-no features (was this expert picked?). At a strict 1% false-alarm threshold it catches too few refusals to act on alone; as a logged score beside other signals it needs no extra forward pass.- **People pruning or fine-tuning Beam.** The explorer shows which experts each kind of text uses at each layer, in a browser with no GPU, so a pruner can look up an expert before removing it and a fine-tuner can see which experts a domain touches. Half of each layer's experts are withheld from the explorer, so for those it says nothing.
## The explorer
The Space is a map of Beam's 12,544 routed experts: 52 layers left to right, each of the 49 expert layers a 16Γ16 sheet of its 256 experts. Hover an expert for its top tokens, click it for its card and the experts it routes to next, and rank the list by routing share or any other measure the data carries. It runs no model; it reads precomputed files, which are also published as a dataset, [jeevanpillay/beam-expert-explorer](https://huggingface.co/datasets/jeevanpillay/beam-expert-explorer). Half of each layer's 256 experts are withheld from this view: their cards read "not shown" and they are left out of the list and the colouring.
What the map shows, from one pass of Beam over 4.7 million content tokens of training and development text, of which five kinds are mapped: code, maths, French, English prose and Beam's own tool calls:
- **No expert is dead.** Every expert in every layer was used, the withheld ones included. The effective number of experts per layer (how many equally used experts would give the same spread of load) runs from 116 to 211 of 256.- **Load is uneven.** An expert's share is the fraction of tokens whose 8 picks include it, so a layer's shares sum to 8 over all its 256 experts, and an even share is 1/32. Counting every expert, the withheld ones included, the busiest in a layer takes up to 17.8 times its even share. That is the largest over the 49 layers, on our narrow-domain texts; Reflection's blog reports the busiest expert at 1.04 times even load averaged across layers in pretraining, a different measure on different text.- **Each kind of text routes differently from text as a whole.** At layer 27, maths spreads over the fewest experts (an effective 104) and French departs most from all text. An expert is marked as preferring a kind of text only if it clears a test across all 12,544 experts and the measured noise of batching, an estimate from one small comparison of texts batched and alone, not a maximum or a confidence bound.
In every layer, 128 experts are not shown, and the blanks do not say why any one of them is blank.
**Switching experts off.** In a second GPU run we switched off each kind of text's 64 most selective experts and measured how much worse Beam predicted that text and the others. An expert set counts as modular if it hurts its own text at least three times as much as any other of the five named kinds, and hurts it more than 20 random sets of 64 experts with the same load do.
| Kind of text | Effect on its own text (rise in loss a token) | Worst effect on another kind, as a share | Modular? ||---|---|---|---|| French | 0.634 (0.498β0.690) | 0.007 (0.001β0.016) | yes || Code | 0.155 (0.110β0.204) | 0.070 (0.025β0.137) | yes || Maths | 0.028 (0.015β0.046) | 0.476 (0.281β0.914) | uncertain || English prose | 0.036 (0.022β0.052) | 0.660 (0.334β1.484) | no || Tool-call turns | 0.000 (β0.006β0.006) | undefined | no |
Switching off French's 64 experts hurt French text far more than the other four kinds; code's did the same, by a smaller margin; maths is uncertain and prose shows no such gap; tool-call turns, scored over whole agent transcripts, show nothing. These are judged among the five named kinds. Intervals resample texts, not batches, so they leave batch noise out, and no interval that counts it was computed; the random sets ran in their own batches, so beating them does not by itself rule that noise out.
**Beam's labels of its own experts, as written and judged here, did worse than a lookup of each expert's tokens.** Beam labelled 248 of its experts, 8 a layer at layers 3β8 and 15β39, from excerpts of training and development text where each expert is picked. Then, told only a label, it answered yes or no for 20 held-out excerpts an expert: does the label fit the marked token? In 10 the router picks the expert at that token, in 10 it does not. The baseline needs no model: it says yes when the marked token is one the expert was picked for often enough in training and development text, at a rate chosen per expert on that text. Both are scored by F1, which rewards catching the excerpts where the expert is picked without saying yes everywhere (1 is perfect). The lookup did far better: mean F1 0.69 against the labels' 0.31. We predicted the labels would lead the lookup by at least 0.1 F1 at layers 15β39 and by under 0.05 at layers 3β8 (P10). At layers 15β39 they trail it by 0.344 (95% interval 0.311 to 0.361; 200 experts), so that half failed; at layers 3β8 they trail it by 0.510 (0.458 to 0.569; 48 experts), so that half held. Intervals resample the 257 held-out text families. Beam both writes and judges the labels, so this measures its labels as Beam itself applies them, and it cannot tell labels that describe an expert badly from labels that are applied badly. The labels are not published, and the cards' label fields are empty; only their score is reported here.
The interface is ported from [lyramakesmusic/neuron-explorer](https://github.com/lyramakesmusic/neuron-explorer) by Lyra C. We kept its map, list and panel and rewrote them for Beam's experts.
## When does Beam decide?
Two earlier entries measured effort from outside. BeamDial found that Beam's effort setting barely changes its accuracy. The Beam Effort Atlas found that at a fixed output budget, higher effort mostly starves the answer: empty answers rose from 3.6% at low effort to 41.8% at max, and effort barely helped otherwise. We ask what it changes instead: whether higher effort makes Beam decide later, or only write longer after it has decided.
**On BeamDial's maths problems, we could not detect a difference in length between max and low effort.** On held-out problems with integer answers, correct runs only (34 at low effort, 35 at max), Beam's median reasoning was 275 tokens at low effort and 239 at max: a ratio of 0.87, with a 95% interval of 0.68 to 1.38.
**When it decides, our probe could not say.** We trained a linear probe on Beam's internal state (the residual stream between layers) to read the last digit of its final answer at every 5% of the reasoning. Across those 21 steps it stayed at the level of guessing the commonest digit, at every effort level. The probe we froze is weak even where the answer is written out: at the text's last token it read the digit 24.7% of the time on development runs, against 20.6% for the commonest digit; a less regularised probe of the same kind read it 78% of the time there. So this is a null of this probe, not evidence about when Beam decides. P8 is unresolved: with a flat probe, the decision point falls at the prompt's end at low effort, and 10 tokens in at max, so there is no decision inside the reasoning to compare. P9 is not confirmed: a quarter of the way in, the probe is no better than the commonest answer.
## Does Beam know a task is not done?
We could not show that it does. We read Beam's state at the token where it calls `finish` and says DONE, in Claimed vs. Done's runs, and asked whether it separates false claims from true ones. On held-out tasks, a probe on that state scores AUROC 0.890 and the router 0.885 (8 false and 25 true claims). Which task a run belongs to is enough to explain both numbers; we could not show that either reader uses anything else. Seven of the 8 false claims are every run of one task that cannot be done as written, and knowing only "this is that task" scores 0.9375, better than either reader. Inside the one held-out task with both kinds of claim, the probe scores 0.25 and the router 0.0. With 4 held-out tasks, the probe's 95% interval runs from 0.125 to 1.000. Neither reader was compared with a text-only classifier or a judge here.
So the prediction (P6) is refuted, and its stated null holds: Beam's state at the claim does not show that it knows the task was not done. The router and the probe tie (P7). Fitting read whole data shards that also held the test runs; it kept none of them, and a checker reproduced every test score from the frozen models.
## Predictions, written first
We wrote 15 predictions, each with what would confirm it and, for most, what would refute it, and committed them on 26 October 2026, before Beam was loaded. Three dated readings were added later, each committed before the result it governs was read: a candidate pool for one of the unlisted predictions (28 October, commit a9e8b6e), P9's reading of "the final answer" (29 October, 808cb8d), and P11's scoring at 64 experts a kind (29 October, 5166455), with its scoring rules committed before any value was read (5170ae8). Each verdict below scores the predictions with those readings. A result between the two bands is reported as unresolved; where no refuting band was written, a result short of the confirming one is "not confirmed"; a confirmed null counts. Every reader is scored on held-out families, by AUROC and, where the prediction calls for it, by recall at 1% false alarms, with 95% intervals. The refusal readers are compared with a text-only classifier and with Beam as a judge; the false-"done" readers are not.
| | Prediction | Verdict ||---|---|---|| P1 | The router detects Beam's refusals of gray prompts | **Unresolved** (AUROC 0.818, between 0.75 and 0.85) || P2 | On topic-matched prompts, the router does not clearly beat the text-only classifier | **Refuted** (it leads by 0.066, 0.011β0.125) || P3 | A probe on the residual stream beats the router | **Confirmed** (by 0.080, 0.059β0.102) || P6 | Beam's state at a claim of "done" separates false claims from true ones | **Refuted** (AUROC 0.890, interval 0.125β1.000 over 4 tasks) || P7 | The router reads it worse than the probe | **Confirmed** as worded, but in effect a tie (0.885 against 0.890) || P8 | Higher effort writes longer after deciding, rather than deciding later | **Unresolved** (the probe's decision point falls at the prompt's end at low effort, and 10 tokens in at max) || P9 | The answer is readable a quarter of the way in | **Not confirmed**, for this probe (no better than the commonest answer) || P10 | Beam's labels of its experts beat a token lookup by at least 0.1 F1 at layers 15β39, and by under 0.05 at 3β8 | **Not confirmed** (at 15β39 they trail it by 0.344, 0.311β0.361; at 3β8 by 0.510, so that half held) || P11 | Most kinds of text are not modular | Among the five named kinds: French and code selective, maths uncertain, prose and tool calls not |
Results not listed here are in a report to Reflection.
## How Beam was used
- **Beam's weights.** One forward pass of Beam-1.0-501B-A23B on 8ΓB200 GPUs, logging the 8 experts its router picks at every token in all 49 expert layers, all 256 router scores, and Beam's residual stream at sampled positions, for 10,439 texts. A second run on 8ΓB200 switched experts off: each of five kinds of text's 64 most selective experts on 71 texts, each set against 20 random sets of 64.- **Beam on Reflection's API.** Beam answered our over-refusal prompts, and Beam judged each answer as refused, partly refused or answered: 4,998 of 5,993 prompts. Over four days that was 6,116 requests and about 3.6 million output tokens, inside the free allowance. Beam also guessed, from each held-out prompt alone, how likely it was to be declined.- **Beam on itself.** Beam labelled 248 of its own experts from text excerpts, then judged, told only the label, whether each fits held-out text: 260 labelling and 248 judging requests on 30 October, about 0.44 million output tokens, inside the free allowance. A first batch of 59 requests the day before was not scored. Our laptop crashed midway through the labelling; the saved labels were intact and the run resumed. 75 judge answers, from 4 experts, did not parse and count as no.- **Beam's tokenizer.** On 28 October we sent Reflection's API 50 short texts with unusual whitespace, digits and non-Latin scripts and compared its prompt-token counts with those of the tokenizer Beam ships. All 49 texts the API accepted agree exactly; it refused the 50th, which is whitespace only. The shipped tokenizer, which made every token count here, matched the API on each text it accepted.- **Beam's own data.** The texts include Beam's runs from earlier entries: BeamDial's and the Effort Atlas's reasoning traces and Claimed vs. Done's agent transcripts.
## Limits
- Routing depends slightly on how texts are batched. Every expert claim in the atlas clears that measured noise, an estimate from one small comparison, not a maximum or a confidence bound; the switching-off study has no such floor, because every text reached the experts switched off.- The refusal labels are Beam's answers at low effort, judged by Beam. Most answers had up to 512 output tokens; 820 prompts whose answer had not begun were asked again with 1,536. 3,615 answers reached their cap: 3,473 at 512 tokens and 142 at 1,536. The judge saw the first 600 characters of each prompt and the first 700 of each answer, and 3,314 of the 4,998 answers are longer, so a label is about refusal in an answer's opening, not over the whole answer. Beam's judge agrees with a keyword detector on 95% of 4,998 answers; the detector reads the first 300 characters, so that agreement does not test the cut.- One pass, one build (FP8, run in BF16), one set of public prompts. None of this says how Beam behaves under other settings.- A note for anyone masking experts in a batched mixture-of-experts model: switching one expert off can change the output for texts in the same batch that never route to it, because it changes how many tokens every other expert gets, and with it the kernels' rounding, which flips near-tie routes further on. A masking study needs a control on texts that never reach the masked expert, or runs of one text at a time, before an effect can be trusted.
## Prior work and credits
A linear probe on router logits in vision-language mixture-of-experts models: Yang, Ding, Feng and Tsvetkov, "Reading, Not Manipulating" (arXiv 2610.07774). Probes for sabotage and deception in agents: Hollinsworth, Spies, Diriba, Gleave and Cundy, FAR AI, "Caught in the Act" (arXiv 2610.12445). Routing counts per expert, published to compress Beam: zouaynib's MXFP4 quantisation and mrfakename's pruned copy. Routing follows topic, and refusal is carried mostly inside the experts: RASET (arXiv 2605.29708). The explorer's design: Lyra C's neuron-explorer. Texts: OR-Bench, PHTest, XSTest, Dolly, Claimed vs. Done, BeamDial, Beam Effort Atlas, Wikipedia, GSM8K, MATH, and the Python standard library, numpy and scikit-learn.README.md+2
extras/README.mdAdded+20
extras/monitors-from-inside-beam.mdAdded+115