File size: 4,339 Bytes
4fdc813
8b2c149
 
 
 
 
4fdc813
8b2c149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0d3f4a5
8b2c149
 
0d3f4a5
8b2c149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e499acf
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
license: other
license_name: mixed-source-research-artifacts
license_link: https://github.com/jrosseruk/darkmagic/blob/main/THIRD_PARTY_NOTICES
tags: [training-data-attribution, interpretability, lora, magic]
language: [en]
---

# DarkMagic: GhostBusters experiment artifacts

Private reproducibility archive for [DarkMagic](https://github.com/jrosseruk/darkmagic).
Code and published PNGs live in GitHub; this dataset holds inputs and saved results.
It contains no base-model weights, SAE weights, optimizer states or intermediate
training checkpoints.

## Contents

- `data/`: four 4,000-pair poison/clean corpora, exact evaluation queries,
  response-length datasets, frozen J-lens labels, densities and descriptions.
- `selections/`: exact ordered paired-row selections for filtered/swapped training
  sets. Each row is `[paired_row_index, "poison"|"clean"]`.
- `historical/`: evaluation responses, summaries, recipes and ranking scores for
  the plotted conditions. Source paths in JSON are provenance, not runtime paths.
- `plots/`: compact numerical inputs for all ten numbered blog figures and the
  unnumbered methods illustration. Render without downloading adapters.
- `analysis/`: all-feature step scores and raw occurrence cotangents for the two
  seed-42 MagicLens examples, with occurrence/document/step mappings.
- `interventions/`: the coordinates actually applied during the one-epoch poison
  experiments, and the clean-run token masks and masked-corpus inputs. Unused
  later occurrences of the poison intervention tables are excluded.
- `adapters/`: **110 saved final PEFT LoRA adapters** with their original adapter
  configs. Load the referenced base model separately under its license.
- `manifest.json`: SHA256, size, provenance and role for each data file, plus
  308 run records and explicit final-adapter availability.

Not every original run saved an adapter. These are labelled
`not_saved_by_original_run` or `not_found_in_source_checkout`; evaluations and
retraining recipes are retained. An unavailable final adapter is not replaced
with an intermediate checkpoint. Source data retain their original licensing
terms; this archive does not relicense them. Base/SAE downloads require their own
access and license acceptance.

## Redraw the figures

From the code repository:

```bash
uv sync --locked --group figures
uv run hf auth login
uv run --group figures playwright install chromium
uv run --group figures python figures/reproduce.py --figure all
```

Plotting uses the dataset revision and expected manifest hash in
`figures/dataset.json`, downloading only plot inputs. Pass `--data-dir /path/to/dataset` for an existing local copy.
Download adapters separately when needed:

```python
from huggingface_hub import snapshot_download
snapshot_download("jrosseruk/darkmagic", repo_type="dataset",
                  allow_patterns=["adapters/reagan/full4k/*"])
```

## Reproduction limits

These artifacts reproduce **published results**, not new evidence. Figure 4 sums
predictions over a three-epoch attribution trajectory but measures interventions
after one epoch. This mismatch is retained and labelled; replotting cannot fix it.
Figure 5 uses the original rounded predictions, including an expected-zero random
direction prediction. New DarkMagic one-epoch configs compute predictions and
observations at matching endpoints; rerunning is required for corrected results.

MagicLens sums signed local sensitivities, not parameter updates or concept
activations. Reference density cutoff: 1/10,000. Source occurrence mappings include
original distributed padding; document ID 4000 is a padding sentinel. The cleaned
executor avoids synthetic padding and replaces the historical random-sketch
baseline with exact gradient cosine. Full reruns are not promised to be bitwise
identical; original recipes remain archived for comparison.

No Qwen hereditary-trait experiments are included in the blog's Gemma artifact
bundle. The code repository includes reusable Qwen operator/model support and tests.

EKFAC additions include final-checkpoint scores, exact edited corpora, final
adapters and evaluations for Figure 2 and the completed Figure 3 dose/seed cells.
Raw EKFAC factor matrices are excluded. See `plots/figure02_ekfac.json` and,
when present, `plots/figure03_ekfac.json` for the result tables.