# 🧩 PRISME: Intervention-Supervised Sparse Workspace Editing for Small Language Models **UQO Working Paper No. 31** — *Design, controlled evaluation, and negative and positive evidence at the 100M-parameter scale* [![Paper](https://img.shields.io/badge/paper-PDF-b31b1b?logo=latex&logoColor=white)](paper/main.pdf) [![Python](https://img.shields.io/badge/python-3.12-3776AB?logo=python&logoColor=white)](requirements-lock.txt) [![Tests](https://img.shields.io/badge/tests-23%20passing-2e7d32)](tests/) [![Reproducible](https://img.shields.io/badge/reproducible-end--to--end%20pipeline-2e7d32)](REPRODUCE.md) [![Institution](https://img.shields.io/badge/UQO-D%C3%A9pt.%20des%20sciences%20administratives-16365c)](https://uqo.ca) > **TL;DR** — PRISME adds to a frozen causal decoder a read-only source bank, a 16-slot ephemeral workspace, a > shared sparse editor (1–2 slots per action, 24 actions + STOP), a value controller trained on executed > counterfactual gains, and a differential readout with an exact zero-budget bypass. We implement, test, train and > evaluate it against matched baselines. Result: the editor is learnable and helps a frozen backbone by a few > percent of loss, but a global-recurrence adapter trained identically helps as much; where to write does not > matter for fixed schedules; a target-reading oracle shows large opportunity that the learned controller cannot > capture (it is worse than no routing on held-out data); and dispatch overhead erases sparse savings at small > scale. A careful negative result with a mechanistic explanation. ## 📌 Status | Item | Value | |---|---| | Version | 1.0 (October 2026) | | Phases executed | 0–10, 13–15 (see `PROGRESS.md`); 11 (MLX port) not executed; 12 limited to meta-instantiation | | Decisive experiments | 5 adapter seeds × {sparse editor, global recurrence, dense writes} on a frozen synthetic backbone; 103M FineWeb-Edu pilot (one backbone seed) | | Code & data | `REPRODUCE.md`; synthetic suite regenerated from seeds; FineWeb-Edu subset documented, not redistributed | ## 🗂 Repository layout `prisme/` reference implementation · `training/` stages A–D · `baselines/` global recurrence + reference routers · `evaluation/` routing, latency, perplexity, locked driver, statistics · `data/` generators, processors, splits · `tests/` invariants + cache equivalence · `scripts/` audits, counts, FLOPs, launchers, tables, figures, claim audit · `protocol/` pre-registration, locked test manifest, deviations · `literature/` verified bibliography + novelty audit · `experiments/runs/` manifests + metrics (checkpoints on the training nodes) · `results/` raw/analyzed/tables/figures · `paper/` LaTeX + PDF · `reproducibility/` environment, cards, run index, audit · `PROGRESS.md`, `DECISIONS.md`, `FAILURES.md`. ## 🚀 Quick start ```bash uv venv --python 3.12 .venv && uv pip install -p .venv/bin/python -r requirements-lock.txt .venv/bin/python -m pytest tests -q .venv/bin/python scripts/count_params.py --all-configs --device meta scripts/reproduce_pilot.sh # miniature end-to-end pipeline on CPU (~1 min) .venv/bin/python scripts/make_tables.py && .venv/bin/python scripts/reproduce_figures.py ```