MachineSex/tasks/workorder-llm-society.md
Giorgio Gilestro 9c0210ba93 llm_society pilot v1 diagnosis + v2 knobs: raise inheritance fidelity, add elitism
Pilot v1: full and no_grounding indistinguishable - both arms pay a ~25%
distillation tax per generation and pin at the same mutation-selection floor,
so grounding has no differential to act on. v2 raises inheritance fidelity
(n_inherit 240->600, child epochs 2->3, founders 600x3) and adds two evenly-
applied knobs: elitism (top parent survives as an unmodified copy - overlapping
generations, compensating for lossy distillation where E11 had faithful
genotype copying) and n_parents (sharper truncation selection). v1 archived at
results/llm_society_pilot1; v2 running.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BkRLcc18rwT2Lysu6PbG7v
2026-09-07 12:38:15 +01:00

94 lines
6.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Work order — `llm_society`: the composed society at LLM scale (C3, the paper's stated gap)
**Date opened:** 2026-09-07. **Decision (GG):** run it before PNAS submission — "if it's an
experiment that can be done in weeks rather than months then any reviewer would ask to see it."
## Question
Does a population of LLM agents under the four composed operators — grounded evaluation, directed
recombination, diversity-preserving selection, retraining (mutation) — climb and hold capability,
while each ablation fails distinctly? The LLM instantiation of E11; the paper's largest stated gap
(Fig. 1's "open" cell).
## Design (mirrors E11; one grounding knob, in the evaluation channel)
Population of `N` agents = LoRA adapters on frozen Qwen2.5-0.5B-Instruct, initialised as light
per-family specialists (round-robin over families, agent-specific seeds → initial diversity).
Non-overlapping generations (WrightFisher style; no elitism). Per generation:
1. **Produce & score.** Every agent answers (a) a fixed *validation* pool (verifier-scored → true
fitness; the selection signal for grounded arms), (b) a fresh per-generation *conformity* pool
(prompts only). Consensus = modal normalised answer per prompt; agent conformity = agreement with
the consensus. A fixed *test* pool (never selected on) gives the reported fitness.
2. **Select** `P = N/2` parents by `s = g·fitness + (1g)·conformity`.
Diversity ON: greedy quality-diversity (next parent maximises `s + λ·behavioural distance` to
those already chosen; distance = disagreement rate on the conformity pool — verifier-free, so
usable in every arm). Diversity OFF: plain top-P by `s`.
3. **Breed** (sex ON): parents paired by descending behavioural distance (complementary mates);
per pair, `n_cand` Dirichlet-weighted merges are screened on the arm's own selection signal
(verifier val-pool for grounded arms; conformity for `no_grounding` — the verifier never enters
that arm's loop) and the fittest offspring is kept (directed sex, E10). Sex OFF: children are
redistilled copies of the selected parents.
4. **Reproduce** (the inheritance channel, identical in all arms): each child is a *fresh* LoRA
trained from the base on (prompt → its source model's own answer) pairs over a fresh training
pool — self-consumption made literal; knowledge survives only through the data channel. SFT
stochasticity + fresh pools are the mutation operator.
**Arms:** `full` (g>0, sex, diversity) · `no_grounding` (g=0) · `no_sex` · `no_diversity`.
**Verifier truth is used for reporting in all arms** (test-pool fitness, consensus accuracy) but
enters the *loop* only where g>0.
## Metrics (per arm × seed × generation)
Per agent: test fitness (overall + per family + worst family), conformity, selection score,
selected flag, parentage. Population: best/mean true fitness, behavioural diversity (mean pairwise
disagreement), consensus accuracy, conformitytruth gap. E11's three panels re-drawn at LLM tier.
## Falsifiers (pre-registered)
1. `full` does not exceed `no_grounding` in final best true fitness → grounded evaluation adds
nothing at LLM tier; the composed-society claim fails its LLM test.
2. Ablations do not fail distinctly (no conformitytruth gap in `no_grounding`; `no_sex` matches
`full` on assembled capability; `no_diversity` matches on diversity trajectory) → the
complementary-contributions claim does not transfer.
3. Honest alternative outcome: consensus may stay noisy rather than harden into a confident-wrong
mean (specialists are wrong *differently* off-family) → `no_grounding` fails by drift, not by
conformity; report the observed signature either way.
## Cost & schedule
| Stage | Scale | Compute | Where |
|---|---|---|---|
| Smoke | N=4, G=2, tiny pools, `full` only | ~15 min | local 16 GB |
| Pilot | N=68, G=810, `full` + `no_grounding`, 1 seed | ~410 GPU·h | local overnight / 1 CX3 job |
| Campaign | 4 arms × 3 seeds, N=812, G=1012 | ~50150 L40S·h, ~1 day wall-clock as 12 parallel jobs | CX3 (`/imperial-hpc`); rent only if queue fails |
| 7B confirm (optional) | headline contrast only (`full` vs `no_grounding`, 12 seeds) | ~100300 GPU·h | CX3 / rented |
## Checklist
- [x] Design + falsifiers (this document)
- [x] `src/llm/society.py` (pure operators + GPU loop), `kind: llm_society`
- [x] Pure-function tests (consensus, conformity, QD selection, pairing) — 155 green
- [x] `configs/llm/society_smoke.yaml` → smoke green (exit 0; conformity 0.54→0.75, diversity 0.69→0.41 in one self-consumption generation — the signature is live)
- [x] Pilot v1 (n_inherit=240, ep2, no elitism): **arms indistinguishable** — both drop ~0.1 in the
first distillation generation and plateau at the same mutationselection floor (best ≈0.40, mean
≈0.35, consensus 0.63→0.4 in both). Diagnosis: inheritance too lossy; the ~25%/generation
distillation tax swamps the selection differential. v1 archived at `results/llm_society_pilot1`.
- [ ] Pilot v2 (n_inherit=600, ep3, founders 600×3, elitism=1 all arms, n_parents=3, n_conf=90) —
raises inheritance fidelity so selection has something to act on; elites = overlapping
generations, applied identically in every arm (documented honestly; reproduction here is lossy
distillation, unlike E11's faithful genotype copy)
- [ ] GG gate: review pilot curves before the campaign
- [ ] `hpc/llm_society.pbs` array job (arm × seed) → campaign
- [ ] Figure `paper/pnas/make_figs.py` panel(s); fold into main.md (replaces the "open" cell)
- [ ] 7B headline confirm (optional, post-campaign decision)
## Open design decisions (defaults chosen; GG may override)
- Families: the three *easy* variants at 0.5B (headroom exists; hard variants risk gen-0 inheritance
data being mostly wrong → uninformative universal collapse). Revisit after pilot.
- g for grounded arms: 0.5 (equal weight); sweepable later.
- Population constant, non-overlapping generations, no elitism (faithful WF; champions must survive
through inheritance, not by fiat).
- Adapter disk hygiene: delete generation t1 adapters once generation t is trained (keep gen 0 and
final); ~35 MB × N × G × arms otherwise.