From the DeepSeek-V4-Flash-0731 interpretability project
This project studies how DeepSeek-V4-Flash-0731, a mixture of experts language model, routes text. In a mixture-of-experts model, a router picks a few small sub-networks (called experts) to handle each token (roughly each word) rather than running the whole network every time. We feed the model religious and secular texts and record which experts it picks and how strongly. Our headline metric is REAP, the router's gate weight for an expert multiplied by that expert's activation norm, which tells us how much each expert actually contributed.
Everything below is organized so you can find a specific artifact and understand what it is without having read the rest of the wiki first.
Each row is one batch of observations we recorded from the model. A record is one text passage we fed in; a token is roughly one word or word-part the model processed. The REAP observations rows are the core dataset: for each passage, which experts fired and how strongly. The experiment rows are targeted follow-up tests built from smaller, controlled text sets.
| Stream | Records | Tokens | Status |
|---|---|---|---|
| REAP observations (core 8 traditions) | 2,749 | 22,179,407 | complete |
| Christian wave-1 + wave-2 | 3,562 | 55,900,970 | complete |
| J-lens probes | 80 | — | complete |
| Exp 1 (12 translations) | 360 | 613,344 | complete |
| Exp 4b (quotation switch) | 351 | 5,156,659 | complete |
| Exp 12 (digit pairs) | 222 | 437,900 | complete |
These are the files our scripts produce from the raw observations. Most come from analyze_experts.py, which tallies how often each expert fires, on which texts, and with what REAP score. A Jaccard matrix (row 3) is a similarity table: it asks how much the top experts for one text overlap with the top experts for another, where 1 means identical and 0 means no overlap. Bootstrap confidence intervals (row 7) are a way of estimating how stable a number is by resampling the data thousands of times.
| File | Generated by | Contents |
|---|---|---|
core_agg.json | analyze_experts.py | Per-category n/tok/freq/reap, 8 traditions |
christian_agg.json | analyze_experts.py | Same for Christian wave-1 |
analysis/cross_text_jaccard.csv | analyze_experts.py | 9×9 top-20 REAP Jaccard matrix |
analysis/expert_frequency.csv | analyze_experts.py | Per-expert frequency table |
analysis/expert_rankings.csv | analyze_experts.py | Ranked expert profiles per text |
analysis/expert_rankings_per_book.csv | analyze_experts.py | Per-book rankings (Christian corpus) |
analysis/robustness_checks.txt | analyze_experts.py | Matched-n bootstrap CIs (5,000 resamples) |
analysis/per_layer_topk.csv | analyze_experts.py | Per-layer top-k experts per text |
analysis/text_expert_profiles.parquet | analyze_experts.py | Full per-text per-expert profiles (Parquet) |
analysis_all/exp8_sorted_freq_results.txt | exp8_sorted_freq.py | Sorted L42 distributions, permutation check |
jac_matrix.json | run_jlens.py | Jacobian norm matrix (per text per layer) |
report.html | generate_report.py | Auto-generated integrity + findings report |
These are the text files we feed to the model. Digit density is the percentage of tokens that are numerals, a column we added after discovering that one expert (e164) fires on digits and that our Bible pipeline accidentally strips all digits, which misled us early on. Most texts come from Project Gutenberg, a free archive of public-domain books.
| File | Records | Tokens | Digit density | Source | Observed? |
|---|---|---|---|---|---|
bible.jsonl | 1,189 | 1,045,776 | 0.0000% | Gutenberg KJV | yes |
quran.jsonl | 115 | 258,122 | varies | Gutenberg (Pickthall) | yes |
bofm.jsonl | 30 | 342,614 | 0.000% | Gutenberg pg17 | yes |
gita.jsonl | 18 | 29,690 | low | Gutenberg | yes |
tao.jsonl | 81 | 13,852 | low | Gutenberg | yes |
dhamma.jsonl | 26 | 16,203 | low | Gutenberg pg2017 | yes |
analects.jsonl | 20 | 42,041 | low | Gutenberg | yes |
upanishads.jsonl | 3 | 21,669 | low | Gutenberg | yes |
christian_sel.jsonl | 1,267 | 20,409,440 | ~1.1% | Gutenberg 3,705 books | yes |
exp1_all_translations.jsonl | 360 | 613,344 | 0.0000% | 12 Bible translations (bible-api + Bible Gateway) | yes |
exp4b_quotation_switch.jsonl | 351 | 5,156,659 | varies | Commentary with KJV quotes, 18 sources | yes |
exp12_digit_minimal_pairs.jsonl | 222 | 437,900 | 0% / ~2.5% | 111 matched pairs, 5 categories | yes |
exp13_ablation_corpus.jsonl | 480 | 418,695 | varies | 4 cells: verse/prose × religious/secular | staged |
Where everything is published: the wiki pages, the interactive viewer for the J-space lens (our method for peeking at the model's intermediate predictions layer by layer), and the two public data repositories.
| Artifact | Location |
|---|---|
| Research wiki hub | index.html |
| Methods page | methods.html |
| Data page | data.html |
| Results page | results.html |
| Experiments page | experiments.html |
| Code reference | code.html |
| Operations | operations.html |
| Roadmap | roadmap.html |
| Narrative | narrative.html |
| J-space lens | jspace.html |
| Exp 1 results | exp1.html |
| Exp 4/4b results | exp4.html |
| Exp 12 results | exp12.html |
| Exp 13 ablation | exp13.html |
| Forward plan | forward_plan.html |
| Interactive J-space viewer | jlens_viewer.html |
| GitHub repo | 0xSero/dsv4-reap-routing |
| HuggingFace (consolidated) | 0xSero/deepseek-v4-flash-reap |
| HuggingFace (raw obs) | 0xSero/deepseek-v4-flash-religious-reap-observations |