Datasets:
The dataset viewer is not available for this dataset.
Error code: ConfigNamesError
Exception: TypeError
Message: 'str' object is not a mapping
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response
config_names = get_dataset_config_names(
path=dataset,
token=hf_token,
)
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
dataset_module = dataset_module_factory(
path,
...<4 lines>...
**download_kwargs,
)
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1217, in dataset_module_factory
raise e1 from None
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1192, in dataset_module_factory
).get_module()
~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 622, in get_module
dataset_infos = DatasetInfosDict.from_dataset_card_data(dataset_card_data)
File "/usr/local/lib/python3.14/site-packages/datasets/info.py", line 396, in from_dataset_card_data
dataset_info = DatasetInfo._from_yaml_dict(dataset_card_data["dataset_info"])
File "/usr/local/lib/python3.14/site-packages/datasets/info.py", line 317, in _from_yaml_dict
yaml_data["features"] = Features._from_yaml_list(yaml_data["features"])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 2148, in _from_yaml_list
return cls.from_dict(from_yaml_inner(yaml_data))
~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 2144, in from_yaml_inner
return {name: from_yaml_inner(_feature) for name, _feature in zip(names, obj)}
~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/features/features.py", line 2141, in from_yaml_inner
return {"_type": snakecase_to_camelcase(_type), **unsimplify(obj)[_type]}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'str' object is not a mappingNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
- What was run
- Architecture notes
- What the tables contain
- Key findings
- 1. Full-attention layers run at three times the routing rank of sliding layers
- 2. The static importance score carries no information at all
- 3. Separation is front-loaded but editability is back-loaded
- 4. KV sharing splits the network into two populations
- 5. Layer 23 is a consistent trough
- 6. The gate path is the sparse specialist
- 7. Compliance leans corporate in the gate and nowhere else
- 8. The logit lens is gate-driven, and its token lists are shared by construction
- 9. Attention routes on a twentieth of its available rank
- 10. GQA groups carry near-duplicate signal
- 1. Full-attention layers run at three times the routing rank of sliding layers
- What the compliance axis pass is measuring
- Important caveats
- How to use
- License
- Contact / more
juiceb0xc0de/gemma-4-e4b-it-atlas
A brain atlas for google/gemma-4-E4B-it, the instruction-tuned E4B member of the Gemma 4 family. This is not a chat dataset or a benchmark. It is an internal-mechanics map built by running activations through a corpus of prompts and scoring what each layer, component, head, and feature direction is doing.
If you want to know what sliding-window and full-attention layers actually do differently inside one model, how KV cache sharing splits a network in two, or which directions survive a causal test rather than merely scoring well, this is the dataset.
What was run
- Model:
google/gemma-4-E4B-it, text stack only - Corpus: 8,965 diverse prompts across 17 buckets
- Layers probed: all 42
- Behavioral axis:
compliance, contrasting authentic against corporate register - Scored projections:
gate_proj,up_proj,down_proj,q_proj,k_proj,v_proj,o_proj - Passes: activation census, feature taxonomy, per-head analysis, OV-circuit SVD, logit lens, coactivation, code-analysis, compliance-axis contrast, cone geometry, candidate singular-vector scoring, causal intervention, DAS rotation
Architecture notes
| Property | Value |
|---|---|
| Hidden size | 2,560 |
| Layers | 42 |
| Intermediate size | 10,240 |
| Query heads | 8 |
| KV heads | 2 |
| GQA group size | 4 query heads per KV head |
| Head dimension | 256 |
| Global head dimension | 512 |
| Full-attention layers | 7 (5, 11, 17, 23, 29, 35, 41) |
| Sliding-attention layers | 35, window 512 |
| KV-shared layers | 18 (the last 18 of 42) |
| Vocabulary | 262,144 |
| Tied embeddings | yes |
Three structural facts shape how the tables should be read.
Attention alternates by type. Every sixth layer is full attention and the other 35 are sliding-window with a 512-token window. This is declared in the config layer_types list, and it shows up strongly in the weight spectra, which is finding 1.
The last 18 layers share KV. num_kv_shared_layers is 18, so layers 0 through 23 carry their own key and value projections and layers 24 through 41 reuse them. That is why k, v, and ov_circuits in this atlas cover layers 0-23 only. It is the architecture, not missing capture.
Two head dimensions coexist. head_dim is 256 and global_head_dim is 512. The captured q width of 4,096 is 8 heads at 512, and k/v at 1,024 is 2 KV heads at 512.
The model is multimodal, carrying a 16-layer vision tower and a 12-layer audio tower alongside the text stack. This atlas maps the text stack only.
The features row count closes exactly against that geometry at 1,627,136.
What the tables contain
| Table | Rows | What it gives you |
|---|---|---|
features |
1,627,136 | feature taxonomy + activation stats per (layer, component, feature_idx) |
behaviour_axis_features |
1,627,136 | authentic-vs-corporate contrast per feature |
axis_svs |
51,741 | scored candidate singular vectors across seven projections |
coactivation |
27,953 | feature-pair correlations |
logit_lens |
13,440 | promoted/suppressed output tokens per feature |
code_analysis |
9,000 | entangled vs selective role labels |
axis_causal |
5,160 | causal intervention scores and keep decisions |
behaviour_axis_per_head |
896 | per-head-slot compliance separation |
per_head |
896 | per-head-slot selectivity |
axis_das |
466 | DAS axes with explained variance |
ov_circuits |
192 | 8 heads × 24 own-KV layers |
axis_cone |
42 | per-layer cone geometry |
layers |
42 | layer metadata and completion flags |
axis_capability |
0 | capability fence, not run |
Key findings
1. Full-attention layers run at three times the routing rank of sliding layers
The config declares two attention types. The OV and QK spectra separate them cleanly:
| Layer type | Heads | OV concentration | OV effective rank | QK effective rank | Induction |
|---|---|---|---|---|---|
| Full attention | 32 | 0.0231 | 186.8 | 62.9 | 0.259 |
| Sliding window | 160 | 0.0350 | 101.0 | 19.1 | 0.312 |
Full-attention heads carry 1.8× the OV effective rank and 3.3× the QK effective rank of sliding heads, and their OV spectra are less concentrated.
The QK gap is the striking one. Query-key routing is where an attention head decides what to look at, and in a sliding-window layer that decision is constrained to a 512-token neighbourhood. Those heads run their routing on about 19 of 512 available dimensions. The seven full-attention layers, which can look anywhere in a 131,072-token context, spend more than three times the rank on the same decision.
Induction runs slightly lower in the full-attention layers, so the extra rank is not buying more copy-and-continue behavior. It is buying a wider routing computation, which is what an unconstrained attention window would require.
2. The static importance score carries no information at all
The surgery funnel scores 51,741 candidate directions, tests 5,160 causally, and keeps 1,874, a survival rate of 36.3%.
| Outcome | Directions | Mean causal score | Mean composite score |
|---|---|---|---|
| Kept | 1,874 | +0.0382 | 0.483327 |
| Dropped | 3,286 | -0.0279 | 0.483252 |
Causal scores separate the two groups cleanly and flip sign. The composite scores differ by 0.000075.
That is not a weak signal, it is no signal. The static blend of Wanda and ATP magnitude heuristics assigns the kept and dropped populations the same mean to four decimal places, while the causal test that actually perturbs the model separates them by a sign change. Ranking candidates by composite score would be indistinguishable from ranking them at random.
If you are choosing directions to intervene on in this model, use axis_causal.kept and ignore axis_svs.composite_score entirely.
3. Separation is front-loaded but editability is back-loaded
These two normally travel together. Here they do not.
Per-feature compliance separation by layer:
| Layer | 0 | 2 | 12 | 20 | 30 | 41 |
|---|---|---|---|---|---|---|
| Mean F-stat | 40.9 | 98.6 | 113.2 | 80.8 | 55.4 | 43.4 |
It peaks at layer 12 and falls steadily to 43.4 at the output. The ten strongest compliance features sit in layers 2, 11, 12, and 13.
Causal keep rate by layer band runs the other way:
| Layers | 0-5 | 6-11 | 12-17 | 18-23 | 24-29 | 30-35 | 36-41 |
|---|---|---|---|---|---|---|---|
| Keep rate | 25.8% | 23.9% | 30.6% | 47.6% | 45.3% | 46.2% | 41.7% |
| Mean causal score | -0.011 | -0.014 | -0.002 | +0.010 | +0.002 | +0.006 | -0.017 |
The front third, where per-feature separation is strongest, is where the fewest directions survive an ablation. The back half, where separation has fallen by more than half, is where directions actually move the model.
A high F-stat means a coordinate reliably distinguishes the two registers. It does not mean intervening on that coordinate changes behavior. In this model those two properties live in different parts of the network, and an atlas measuring only the first would point you at exactly the wrong layers to edit.
The single strongest causal direction is layer 22 down_proj axis 0 at 1.303, followed by layer 21 down_proj axis 0 at 0.988. Both sit immediately before the KV-sharing boundary.
4. KV sharing splits the network into two populations
Layers 0-23 own their key and value projections. Layers 24-41 reuse them. The census on the MLP family shows the two halves behaving differently:
| Layers | Mean F-stat | Dead coordinates | Activation rate |
|---|---|---|---|
| 0-23, own KV | 34.4 | 25.1% | 0.406 |
| 24-41, shared KV | 45.5 | 18.2% | 0.428 |
The layers that reuse KV are 32% more discriminative and carry seven points fewer dead coordinates. They are denser and doing more per coordinate.
That is a reasonable division of labor. Layers past the sharing boundary no longer spend parameters building keys and values; they inherit them and spend their capacity in the MLP instead. The atlas cannot prove that causal link, but the split falls exactly at layer 24 and the direction of the effect matches the architectural change.
5. Layer 23 is a consistent trough
Layer 23 is the last own-KV layer and also a full-attention layer, and three independent passes dip there:
| Measure | Layer 22 | Layer 23 | Layer 24 |
|---|---|---|---|
| MLP mean F-stat | 32.1 | 23.3 | 38.0 |
| Logit-lens mean F-stat | 159.0 | 104.1 | 206.0 |
| Compliance axis mean F-stat | 81.2 | 75.5 | 73.7 |
Its MLP F-stat is the lowest of any layer past 10, and its logit-lens score is the second lowest in the entire model. The layers on either side are both substantially higher.
Something about the handoff point is quiet. Layer 23 sits at the junction of two architectural boundaries at once, being both the final full-attention layer before KV sharing begins and the final layer with its own KV. The atlas records the dip clearly and does not explain it, and a per-token capture at that boundary is the experiment that would.
6. The gate path is the sparse specialist
| Component | Activation rate | Mean activation | Dead coords | Mean F-stat |
|---|---|---|---|---|
gate |
0.248 | -0.0642 | 44.3% | 46.3 |
up |
0.500 | -0.0003 | 15.3% | 46.3 |
mlp |
0.500 | 0.0003 | 6.9% | 24.9 |
The gate fires on a quarter of prompts, carries a negative resting bias, and leaves 44% of its coordinates idle while matching up for discriminative power on the coordinates that do fire.
It is also the cleanest under code-analysis at 92.8% selective, the strongest logit-lens component, and holds 147 of the 172 domain-specific directions the taxonomy resolved. Those cluster in two bands, layers 11-15 and layers 30-32, with layer 13 holding the most at 19.
The mlp output is the mirror image: almost never idle at 6.9% dead, and the least discriminative component in the model.
7. Compliance leans corporate in the gate and nowhere else
Across every component the authentic and corporate sides split near evenly. The exception is gate:
| Component | Authentic-leaning | Corporate-leaning |
|---|---|---|
gate |
202,808 | 227,264 |
up |
214,835 | 215,243 |
mlp |
215,174 | 214,836 |
q |
50,258 | 50,090 |
Every other component sits within a few hundred coordinates of even. The gate runs about 24,500 coordinates heavier on the corporate side, a 12% skew.
Read that against the gate's baseline before drawing conclusions. It is the one component with a strongly negative resting activation and 44% idle coordinates, so the sign of a delta there is not the same measurement it is on a component centered near zero. The skew is worth noting and worth being careful with.
8. The logit lens is gate-driven, and its token lists are shared by construction
| Component | Mean F-stat | Max F-stat |
|---|---|---|
gate |
252.9 | 562.8 |
up |
202.8 | 493.4 |
mlp |
149.2 | 548.4 |
heads |
114.0 | 243.8 |
attn |
104.7 | 277.4 |
Signal rises through the network and peaks at layer 30 with a mean of 232.0.
One thing to understand before reading token lists per component. Where mlp, gate, and up share a (layer_id, feature_idx), their promoted-token lists are identical, in every case: 829 of 829 shared indices for gate against mlp, 392 of 392 for gate against up, 602 of 602 for mlp against up.
That is SwiGLU structure rather than a pipeline fault. Hidden unit i writes into the residual stream through one column of down_proj, so its output direction is a single vector no matter whether you inspect it through the gate or the up path. What differs between components is when the unit fires, which is why the F-stats differ, not what it writes when it does. Treat the token list as a property of the hidden unit and the F-stat as a property of the component view.
9. Attention routes on a twentieth of its available rank
| Path | Mean concentration | Mean effective rank | Fraction of 512-dim head |
|---|---|---|---|
| OV | 0.033 | 115.3 | 22.5% |
| QK | 0.271 | 26.4 | 5.2% |
Both paths are narrow relative to the 512-dimensional global head, and the QK path is extremely so at about a twentieth of available rank. Model-wide induction averages 0.303, with the strongest head reaching 0.907 at layer 8.
These figures cover layers 0-23 only, since ov_circuits follows the own-KV layers.
Effective rank does not transfer across architectures without normalizing by head dimension, so treat these as fractions rather than raw numbers.
10. GQA groups carry near-duplicate signal
Query heads cluster in groups of four sharing one KV head. In the heads component a feature index is head*512 + d, so an offset that is a multiple of 512 is the same within-head dimension in a different head:
| Offset | Pairs | Mean correlation |
|---|---|---|
| 512 | 1,268 | 0.886 |
| 1,024 | 115 | 0.907 |
| 1,536 | 25 | 0.862 |
Grouping the whole heads table by KV group:
| Pair type | Pairs | Mean correlation |
|---|---|---|
| Same GQA group | 5,467 | 0.633 |
| Cross group | 8 | -0.382 |
Only eight pairs in the entire coactivation table cross a group boundary, and they anti-correlate. Within a group, matched coordinates track each other at roughly 0.89.
gate is the most internally correlated component overall at 0.765, ahead of heads at 0.632 and q at 0.421, while mlp, up, k, attn, and v all sit within 0.02 of zero.
What the compliance axis pass is measuring
The axis pass is not a generic "find all important directions" sweep. It looks for directions that separate authentic register from corporate register, scores candidates statically, tests a subset causally, and rotates survivors into DAS axes. On this run the capability fence did not execute, so keep decisions rest on the causal score alone.
Important caveats
- The capability fence was not run, and this is the most important limitation.
axis_capabilityis empty. A direction markedkepthas been shown to move the model on the compliance contrast. It has not been checked for collateral damage to code, math, factual, multilingual, or reasoning ability. Do not readkeptas safe to edit. per_headandov_circuitsdisagree on head count, andov_circuitsis the one to trust.ov_circuitsenumerates the config's 8 query heads and 2 KV heads.per_headsliced the captured tensors athead_dim256 rather thanglobal_head_dim512, producing 16 query slots and 4 KV slots. Thoseper_headrows are half-heads, not heads, and findings 1, 9, and 10 deliberately rest onov_circuitsandcoactivationinstead.k,v, andov_circuitscover layers 0-23 only. This followsnum_kv_shared_layers18 and is the architecture rather than missing capture, but every attention-side finding describes the first 24 layers and says nothing about the last 18.- Logit-lens token lists are per hidden unit, not per component. See finding 8. Do not report "the gate feature at index i promotes X" as distinct from the mlp or up feature at the same index.
- The causal stage tested a sample. 51,741 candidates were scored and 5,160 causally tested, about 10.0%. Finding 2 compares kept against dropped within that tested subset.
- The cone pass is erratic and I would not build on it.
mean_diff_normswings from 146.8 at layer 0 down to 17.4 at layer 20 and back to 84.4 at layer 24 with no monotone trend. Layer 0 is a clear outlier. No finding here rests on it. - The vision and audio towers are not probed. The model carries a 16-layer vision encoder and a 12-layer audio encoder. This atlas maps the text stack only.
coactivationstores a selected subset of feature pairs, not a full census. The cross-group baseline in finding 10 is only 8 pairs, so treat that contrast as directional.- Only 172 domain-specific directions resolved out of 1,627,136 features. The corpus buckets are general-purpose categories, and finer specialized structure would need a corpus split along axes the model was actually trained to distinguish.
- Coactivation buckets describe the prompt mix. Dominant buckets come out
business(19.4%),introspection(8.6%), androleplay(6.7%), with 35.6% uncategorized. - One behavioral axis only. This run scored
compliance. Nothing here speaks to content domain or reasoning. - Effective rank is not comparable across model families without normalizing by head dimension. This model's global head dimension is 512.
- The GQA result is correlational, not causal. High correlation is a merging signal, not proof removal is free.
- No downstream benchmark is implied. The atlas describes what the tensors do on this corpus, not whether the model is good at your task.
How to use
atlas.sqlite is the primary query surface. PRAGMA integrity_check returns ok, and the features row count closes exactly against the model geometry at 1,627,136 coordinates.
import sqlite3
import pandas as pd
conn = sqlite3.connect("atlas.sqlite")
# which directions survived an actual intervention, not just a high score?
df = pd.read_sql_query("""
SELECT layer_id, projection, sv_index, causal_score, composite_score
FROM axis_causal
WHERE kept = 1
ORDER BY causal_score DESC
LIMIT 25
""", conn)
The per-layer artifacts under layers/, features/, logit_lens/, and ov/ mirror the same data if you would rather not open the database.
-- full attention vs sliding window, straight out of the weight spectra
SELECT CASE WHEN layer_id IN (5,11,17,23,29,35,41) THEN 'full_attention'
ELSE 'sliding_window' END AS layer_type,
COUNT(*) AS heads,
ROUND(AVG(ov_eff_rank), 1) AS ov_rank,
ROUND(AVG(qk_eff_rank), 1) AS qk_rank
FROM ov_circuits
GROUP BY layer_type;
License
The source model is released under the Gemma Terms of Use. Consult the source model repository before redistribution or downstream use.
Contact / more
- Downloads last month
- 34