A J++ (Jacobian) lens for google/gemma-4-31B-it at revision
842da3794eaa0b77d5f08bae87a17459d91ff475, fit at every source layer 0-58. The final block (layer 59) is the target.
The only published J++ for Gemma 4 31B was fit on the base model
(neuronpedia/jacobian-lens, gemma-4-31b/jpp). In our hands it
failed a basic positive control on the instruction-tuned model, so we fit this one on the chat model itself.
We used the published recipe (safety-research/jpp_lens @ 93f02cd)
unchanged:
fit:0 items, graded on this modelgemma-4-31B-it_jpp_lens.pt (3.4 GB), sha256 d16d81d8751ad69df3493c0b3ea7410da97f69abfb07ee115600ad21ef9ef30a
The file is a torch.save dict in the same layout as neuronpedia's published lenses:
{
"J": {layer: Tensor[d, d] fp16, ...}, # layers 0..58, d = d_model
"source_layers": [0, ..., 58],
"d_model": int,
"n_prompts": 64,
"provenance": {...}, # source config and fit note
}
To read out the residual stream h at layer, map it to the final layer and then apply the model's final norm and
unembedding:
lens = torch.load("gemma-4-31B-it_jpp_lens.pt", map_location="cpu", weights_only=True)
h_final = h.float() @ lens["J"][layer].float().T
logits = unembed(final_norm(h_final)) # the model's final RMSNorm, then lm_head
The jpp_lens jacobians were cast to fp16 for export. Each layer's relative (Frobenius) error from the cast was printed at export time.
evaluate --items held-out:0)pass@10, item-weighted, compared with jpp_lens's pooled-lens baseline fit in the same run:
| eval | this lens, layers 0-58 | pooled lens, layers 0-58 | this lens, layers 24-45 every 3rd |
|---|---|---|---|
| association | 0.10 | 0.05 | 0.06 |
| multihop | 0.72 | 0.64 | 0.44 |
| multilingual | 0.47 | 0.35 | 0.28 |
| poetry | 0.88 | 0.50 | 0.88 |
| typo | 1.00 | 0.97 | 0.99 |
| macro | 0.633 | 0.503 | 0.528 |
These numbers come from a single fit (seed 0) evaluated on jpp_lens's held-out item set. The per-item ranks are in
eval/.
This lens was fit during a MATS research sprint by Zach Perlman. Use it at your own risk: it has only been checked against the evaluation above and our own positive controls.
google/gemma-4-31B-it