SPB Git

spb/modelmap Public License

Internal cartography of local LLMs on Apple Silicon — registered, gated, negative-first. Public atlas at modelmap.io.

Python 66.3% JavaScript 24.5% CSS 8.1% Shell 0.7%
6.7 KB · 63 lines markdown
Rendered Raw Blame History
1---2project: modelmap3document: Phase 1 notes — §4.6 Knowledge localization and editing4author: Simon-Pierre Boucher5contact: contact@spboucher.ai6website: https://modelmap.io7created: 2026-08-128status: draft9---1011# §4.6 — Knowledge localization and editing1213## B1–B2. ROME and MEMIT14- **Key papers:** ROME: Meng et al., NeurIPS 2022, https://arxiv.org/abs/2202.05262 (code https://github.com/kmeng01/rome — CUDA-hardcoded in places, no Apple Silicon support); MEMIT: Meng et al., ICLR 2023, https://arxiv.org/abs/2210.07229 (https://github.com/kmeng01/memit)15- **Claims:** causal tracing localizes fact recall to mid-layer MLPs at subject tokens; rank-one (ROME) / spread least-squares (MEMIT, 10k edits) weight updates rewrite facts.16- **Cost:** tracing minutes/fact on Mac at 7B; edits cheap, **but covariance statistics need ~100k Wikipedia forward passes** (precomputed stats exist only for GPT-2/GPT-J; 2025 reduction: https://arxiv.org/pdf/2506.04226).17- **Epistemic status:** Landmark; localization claim debunked-in-part (B8); editing mechanics established.1819## B3–B5. PMET, EMMET, AlphaEdit20- **PMET:** Li et al., AAAI 2024, https://arxiv.org/abs/2308.08742 — writes only FFN weights; its finding that MHSA weights need no update is itself interpretability evidence (aligned with B7).21- **EMMET:** Gupta et al., EMNLP Findings 2024, https://arxiv.org/abs/2403.14236 — unifies ROME/MEMIT as one preservation–memorization objective; useful theory for an MLX reimplementation.22- **AlphaEdit:** Fang et al., **ICLR 2025 Outstanding Paper**, https://arxiv.org/abs/2410.02355 (code https://github.com/jianghoucheng/alphaedit) — null-space projection onto preserved-knowledge keys; +36.7% over locate-then-edit baselines; mitigates sequential collapse; one-line projection + one SVD. 2026 reproducibility study broadly confirms but tempers (https://arxiv.org/pdf/2606.26783). Successor: UltraEdit (2025), https://arxiv.org/abs/2505.1467923- **Epistemic status:** Established SOTA line, still fresh.2425## B6. Knowledge neurons26- **Key paper:** Dai et al., ACL 2022, https://arxiv.org/abs/2104.0869627- **Critiques:** neurons express token/routing patterns rather than stored knowledge; language-independent and degenerate (redundant) knowledge neurons undermine one-fact-one-neuron (https://arxiv.org/html/2308.13198); attribution pitfalls (EMNLP 2024, https://arxiv.org/abs/2312.12141).28- **Epistemic status:** **Debunked-in-part**; historically important. Mac-feasible to reproduce.2930## B7. Storage vs retrieval — the current consensus scaffold31- **Key papers:** Geva et al., EMNLP 2023, https://arxiv.org/abs/2304.14767 (three-stage recall: early-MLP subject enrichment → relation propagation → **attribute extraction by attention heads**; causal via attention knockouts); attribute lens / linear relation decoding: Hernandez et al., ICLR 2024, https://arxiv.org/abs/2308.09124 (~48% of relations well-fit by a single affine map — linearity NOT universal); additive mechanisms: Chughtai, Cooney, Nanda 2024, https://arxiv.org/abs/2402.07321 (recall = sum of qualitatively different mechanisms — complicates clean localization).32- **Consensus:** MLPs store, attention retrieves — established; details (additivity, linearity coverage) contested.33- **Cost:** all Mac-feasible ≤7B.3435## B8. The localization-vs-editing critique — **central calibration datum for Q1**36- **Key paper:** Hase et al., NeurIPS 2023, https://arxiv.org/abs/2301.0421337- **Substance:** causal-tracing localization does **not** predict which layer edits best; edit success near-uniform across layers; tracing effects explain a tiny fraction of edit-success variance. **"Edit success" cannot be used as evidence of localization — design Experiment C accordingly.**38- **Related:** *Rebuilding ROME* (collapse partly implementation asymmetry, https://arxiv.org/abs/2403.07175); *Should We Really Edit Language Models?* (evaluation misleading, https://arxiv.org/pdf/2410.18785)39- **Epistemic status:** Established — a causal audit of a causal method. Reproduction Mac-feasible on GPT-2-XL.4041## B9. Ripple effects42- **Key paper:** Cohen et al., TACL 2024, https://arxiv.org/abs/2307.12976 — editors fail to propagate logical consequences (multi-hop, sibling, aggregation); **in-context editing beats parametric editors**. 2025–2026 follow-ups: ChainEdit, RippleCOT, https://arxiv.org/pdf/2606.0161043- **Epistemic status:** Established.4445## B10. Sequential-editing collapse and general-ability damage46- **Key papers:** Gupta et al. 2024, https://arxiv.org/abs/2401.07453 (gradual forgetting → abrupt collapse); Gu et al., EMNLP 2024, https://arxiv.org/abs/2401.04700 (few edits degrade reasoning/NLI/QA); 2025 energy-regularized line: https://arxiv.org/html/2510.01172v147- **Consequence:** central caveat for any "editing as causal verification" protocol in modelmap.4849## B11. Multilingual knowledge sharing and cross-lingual editing50- **Key papers:** cross-lingual editing: https://arxiv.org/abs/2309.08952 ; language-independent neurons: https://arxiv.org/html/2308.13198 ; MPN: https://arxiv.org/abs/2401.03190 ; language-agnostic factual neurons: https://arxiv.org/abs/2406.16416 ; multilingual recall: https://arxiv.org/abs/2410.14387 ; multilingual pipeline replication (2025): https://arxiv.org/html/2505.20546v2 ; survey (EMNLP 2025): https://arxiv.org/html/2505.1439351- **Substance:** monolingual edits transfer poorly; a shared language-agnostic substrate exists (English-centric hub behavior common); Geva pipeline partially replicates multilingually with language-specific extraction stages. **Directly matches modelmap's FR/EN promptset plans (Experiment B).**52- **Epistemic status:** Sharing established qualitatively; degree and mechanism contested.5354## B12. Tooling and Apple Silicon reality check55- **EasyEdit** https://github.com/zjunlp/EasyEdit (ACL 2024) unifies ROME/MEMIT/PMET/AlphaEdit + KnowEdit benchmark; surveys: https://arxiv.org/abs/2310.16218 , https://arxiv.org/pdf/2401.0128656- **All editing repos are CUDA-first; none advertises MPS support.** The math is small-matrix linear algebra — **an MLX/MPS reimplementation is tractable and itself a publishable modelmap artifact ("knowledge editing on consumer Macs")**. The only expensive step is covariance precomputation (hours of forward passes at 7B on 64 GB).5758## Implications for modelmap591. Never infer localization from edit success (Hase). Experiment C's correlational→causal survival rate must use patching/ablation, with editing as a *separate* axis.602. The storage-vs-retrieval scaffold (B7) gives concrete map types: subject-enrichment maps (MLP), extraction maps (attention heads).613. Multilingual localization atlas (FR/EN) has solid prior art to build on and clear open questions.624. MLX knowledge-editing port = concrete tooling contribution.63