|
Download code/PROPOSAL.md from bryan7264/lorapop: direct link, hf CLI and curl.
- Browser
- Download file 24.3 kB
-
https://huggingface.co/datasets/bryan7264/lorapop/resolve/main/code/PROPOSAL.md
- Command line
-
hf download hf://datasets/bryan7264/lorapop/code/PROPOSAL.md
-
curl -L -o PROPOSAL.md https://huggingface.co/datasets/bryan7264/lorapop/resolve/main/code/PROPOSAL.md
24.3 kB
| # Population genetics of public fine-tunes: relatedness, linkage and causal calibration of weight-behavior associations | |
| ## Abstract | |
| Thousands of public fine-tunes of each open base model are available on Hugging Face. Work that relates the weights of | |
| fine-tunes to their behavior treats them as independent samples. They are not: they share initialisations, recipes, | |
| authors and checkpoints, so weight directions travel together across a population, and a naive association between a | |
| weight direction and a behavior mixes the direction's effect with the effects of everything linked to it. We treat the | |
| public fine-tunes of a base model as a genetic population. A closed-form similarity law shows that raw cosine similarity | |
| of LoRA updates measures shared initialisation (descent), while similarity weighted by the base model's input second | |
| moments measures shared function; the two give two relatedness matrices. Genotypes are principal axes ("loci") of | |
| activation-weighted ("expressed") updates per module. We run naive, principal-component, mixed-model and within-family | |
| association scans of a fixed behavioral battery (refusal, exaggerated refusal, truthfulness, knowledge, model-written-eval | |
| propensities, instruction following, language, format and register), and then do what genetics cannot: we transplant and | |
| knock out every selected locus inside the base and inside adapters of every family, and we build randomized module-wise | |
| crosses of unrelated adapters. A calibration slope of interventional on observational effects tells which estimator | |
| recovers causal effects. The atlas of loci, families, effects and crosses is released with code that scores new adapters | |
| from weights; directions that lower refusal are released only as detectors and knockouts. | |
| ## Novelty | |
| This project treats the public fine-tunes of one base model as a genetic population in which weight-behavior | |
| associations can be checked against direct interventions. It derives a law showing that raw weight similarity measures | |
| shared initialisation while activation-weighted similarity measures shared function, uses the two as relatedness layers | |
| in mixed-model and within-family association scans, and calibrates every estimator against transplants, knockouts and | |
| randomized module-wise crosses. The closest work either regresses behavior on the weights of controlled, unrelated LoRAs | |
| and checks directions informally by ablation ("Towards LoRA science", 2026), or counts the effective sample size of | |
| artifact zoos without estimating effects (Di Vita, NeurIPS 2026). A third line shows that weight structure fails to | |
| predict causal effects without modelling relatedness (Tzanakakis et al., 2026). The difference matters because public | |
| adapters are related, so uncorrected weight-behavior associations can be biased by linkage, and only interventions can | |
| show which corrections work. | |
| ## Contribution | |
| One sentence: with interventions as ground truth, we measure how much relatedness biases weight-behavior associations in | |
| populations of public fine-tunes and which statistical-genetics estimators remove the bias. | |
| Specific contributions: | |
| 1. A similarity law for low-rank updates (raw vs activation-weighted cosine as a function of ranks and an effective | |
| dimension) and two relatedness layers (descent, function) for public populations, tested on trained seed siblings. | |
| 2. Linkage-corrected association scans of a fixed behavioral battery across public adapters, with a calibration slope | |
| against transplants, knockouts and background dosing for every estimator, plus a spike-in benchmark with known truth. | |
| 3. Randomized module-wise crosses of unrelated public adapters, giving additive and interaction shares of behavior and a | |
| segment-level test of the wild association; variance components, genetic correlations and side-effect forecasts that | |
| build on the calibrated map. | |
| ## Background | |
| LoRA [1] trains a low-rank update Delta = B A with A initialised at random and B at zero; A barely moves during training | |
| [16], so the random A of each run imprints its update. Learning on weights predicts properties of fine-tunes from their | |
| parameters, for diffusion LoRAs [2], LLM LoRAs with GL-equivariant networks [3], model trees [4], symmetry-resolved LoRA | |
| transformers [5] and self-supervised weight-space models at scale [6]. Spectral features of LoRA deltas track training | |
| objective and harmful compliance in small manufactured populations [10]. Raw similarity of updates is low even for | |
| adapters trained on the same trait with different seeds, while activation-weighted similarity is high [7], and shared | |
| initialisation explains much of the evidence for universal LoRA subspaces [33, 35]. The model hub is a population with | |
| lineage: lineage graphs help predict performance [18], output-based phylogenies recover families [19], weights can be | |
| read as genotypes for evolutionary trees [20], independence tests detect shared ancestry [21], and model kinship guides | |
| merging [55]. Non-independence of artifacts overstates sample size [36]. Mixed-effects models have been used to compare | |
| pretrained models across thousands of fine-tunes of NLP models, without weights (Clinical NLP 2024; COLING 2025). | |
| Interventions on weight directions are established: task arithmetic [8], weight arithmetic from opposite fine-tunes [9], | |
| weight patching and grafting [52, 60], transplants of misalignment directions [56], and randomized component ablation | |
| with a linear model inside one network (COAR [61]). Statistical genetics supplies the estimators: genomic control [22], | |
| principal components [23], mixed models [24, 25, 26], variance components [27], within-family designs [28], kernel tests | |
| [41], LD score regression [42], fine-mapping [64], genetic correlation [65], and portability of polygenic scores [29]. | |
| Reference numbers follow the user's list; each entry is verified in novelty/refs_verified.md before it is cited in the | |
| paper. | |
| ## Closest prior work | |
| | Work | What it does | How this project differs | Q | M | S | I | F | | |
| |---|---|---|---|---|---|---|---| | |
| | Towards LoRA science (LessWrong 2026-11-02) | Ridge regression from weights of thousands of seed-varied persona LoRAs; SVD of predictor; ablations and grafting | Public related populations, relatedness models, calibration slope against interventions, crosses | 2 | 2 | 1 | 1 | 1 | | |
| | Di Vita, NeurIPS 2026 | Effective sample size (NA-ESS) of neural-artifact zoos for downstream learning | Estimates per-direction effects and their bias from relatedness; corrections validated by interventions | 2 | 1 | 1 | 2 | 1 | | |
| | Tzanakakis et al. 2026 (2609.17599) | Structural weight features of FFN rows do not predict ablation effects across a model census | Explicit relatedness among fine-tunes of one base; estimator calibration; randomized crosses | 2 | 1 | 1 | 1 | 1 | | |
| | Mixed-effects meta-analyses of fine-tuned NLP models (Clinical NLP 2024; COLING 2025) | Random effects for pretrained model and dataset when comparing thousands of fine-tunes' performance | Weights as genotypes, kinship from parameters, interventions | 2 | 2 | 1 | 1 | 1 | | |
| | Persona Geology (LessWrong 2026-10-30) | Raw cosine ~0.018 vs activation-weighted ~0.66 for same-trait seeds | Closed-form law; two relatedness layers in a public population | 1 | 1 | 1 | 2 | 1 | | |
| | Persaud, Adaptation-Geometry (2026) | Shared A-init confounds universal-subspace evidence | Law plus population use of descent vs function | 1 | 1 | 2 | 2 | 1 | | |
| | COAR [61]; Mechanistic Tomography (2608.19338) | Designed interventions with a linear model inside one network | Recombination across many parents of a public population; calibration of wild association | 1 | 2 | 0 | 1 | 1 | | |
| | Drake and Eberstadt [56] | Transplant of a misalignment direction as causal assay | Interventions used to calibrate population estimates | 1 | 2 | 1 | 1 | 1 | | |
| | Tamura et al. [18]; Gallagher et al. [20] | Lineage prior for performance; weights as genotypes for trees | Association of weight directions with behavior under relatedness | 1 | 1 | 2 | 1 | 1 | | |
| Full scores, URLs and difference sentences: NOVELTY_REPORT.md. | |
| ## Hypotheses (each with its refutation, fixed before the scans) | |
| - H1, two layers of relatedness. Raw similarity of trained seed siblings follows the law; activation-weighted similarity | |
| separates same-task from different-task pairs. Refuted if the raw similarity of seed siblings departs from the law by | |
| more than a factor of two, or if activation-weighted similarity separates same-task from different-task pairs with AUC | |
| below 0.8. | |
| - H2, linkage bias. Naive effect sizes overestimate interventional effects and naive test statistics are inflated. | |
| Refuted if the inflation factor of the naive scan is at most 1.1 on every trait and the naive calibration slope lies in | |
| [0.8, 1.2]. | |
| - H3, calibration after correction. Mixed-model and within-family effect sizes agree with interventional effects. | |
| Refuted if their calibration slopes lie outside [0.8, 1.2], or are no closer to 1 than the naive slope (bootstrap | |
| interval of the difference includes zero), or if spiked directions are recovered no better than by the naive scan at | |
| equal false-discovery rate. | |
| - H4, crosses. An additive model over segments explains most of the reliable variance of offspring behavior, and | |
| contributions predicted by the wild association match those measured in the cross. Refuted if the additive model | |
| explains less than half of the reliable variance, or the slope between predicted and measured segment contributions | |
| lies outside [0.8, 1.2]. | |
| - H5, two sources of heritable variance. Refuted if the function-layer variance component cannot be told from zero on | |
| any trait once descent is in the model (likelihood-ratio test), or the function-layer BLUP has no accuracy on held-out | |
| descent families. | |
| - H6, causal genetic covariance. Refuted if the genetic covariance matrix predicts the cross-trait effects of | |
| interventions and the correlated responses of new fine-tunes no better than the phenotypic covariance matrix. | |
| - H7, portability of causal scores. Refuted if the causal score's accuracy declines with lineage distance as fast as | |
| that of fitted predictors. | |
| ## Methods | |
| Similarity law. One gradient step from B = 0 gives Delta = -eta G A^T A. For independent Gaussian A_i, A_j (variance v), | |
| shared G and PSD weighting C, E[A^T A] = r v I and E[A^T A C A^T A] = v^2 (r(r+1) C + r tr(C) I) give | |
| cos_C(Delta_i, Delta_j) ~= sqrt(r_i r_j) / sqrt((r_i + 1 + d)(r_j + 1 + d)), d = tr(C) ||G||_F^2 / tr(G C G^T), | |
| with <X, Y>_C = tr(X C Y^T). C = I gives the raw cosine with d = q (input dimension); C = second moment of module inputs | |
| gives d = effective input dimension seen by the gradient. Probe (results/probe): with the real layer-12 attention-input C | |
| of Qwen2.5-0.5B, simulated raw cosines match the law within one standard error for ranks 4-64, and C-weighted cosines | |
| with gradient rows in the data span follow the law with d_C = 6.3 within 3-6 percent. | |
| Genotypes. C_m = E[x x^T] of the input to module m in the base model over a fixed reference corpus (equal thirds of | |
| wikitext-103 paragraphs, full no_robots chats under the chat template, and no_robots first-turn prompts with a generation | |
| prompt; 1,500 sequences of up to 512 tokens), top-k eigenpairs (V_m, Lambda_m), k = smallest number holding 99 percent of | |
| tr(C_m), capped at 512, P_m = V_m Lambda_m^{1/2}. Expressed delta E_{i,m} = Delta_{i,m} P_m, so <E_i, E_j> ~= | |
| E_x[(Delta_i x)^T (Delta_j x)]. For module m the centred Gram of {E_{i,m}} has eigenpairs (lambda_l, u_l); locus (m, l) has | |
| genotype g_{i,ml} = sqrt(lambda_l) u_{l,i}, unit axis L_ml = lambda_l^{-1/2} sum_i u_{l,i}(E_{i,m} - Ebar_m), and weight-space | |
| allele Delta*_ml = L_ml P_m^+ with P_m^+ = Lambda_m^{-1/2} V_m^T (acts as L_ml on the data subspace, zero outside). Each module | |
| contributes the leading loci holding 90 percent of its expressed variance, up to 32. Presence of an update in each module | |
| type is a binary locus. All Gram computations use factors (tr((B_j^T B_i)(A_i P P^T A_j^T))), never p x q matrices. | |
| Effects. y_i = mu + sum_j gamma_j g_ij to first order; gamma_j is defined by intervention as the population average of the | |
| change in behavior when locus j moves by one unit inside an adapter with everything else fixed. The naive slope converges | |
| to gamma_j + sum_{k != j} gamma_k Sigma_kj / Sigma_jj (Sigma = Cov(g)); with no environment, the whole bias is linkage. | |
| Relatedness. K_desc_ij = sum_m <Delta_im, Delta_jm> / (||Delta_i|| ||Delta_j||) from factors. Related by descent when K_desc | |
| exceeds three times the same-task value of the law for the pair's ranks and module widths; descent families = connected | |
| components. K_func = normalised sum over modules of expressed inner products; recipe families = clusters of K_func among | |
| descent-unrelated adapters (average-linkage, threshold fixed before scans). Merges: expressed deltas regressed on candidate | |
| parents give admixture. Reported: family sizes, spectra, share with a relative, agreement with repository/author metadata, | |
| n_eff = tr(K)^2 / tr(K^2) per layer. | |
| Association estimators (same loci, covariates and splits): naive OLS; PC (leading eigenvectors of K_func as covariates); | |
| mixed model with u_f ~ N(0, sigma_f^2 K_func_{-b(m)}) leaving out the layer block containing m; two-layer mixed model adding | |
| u_d ~ N(0, sigma_d^2 K_desc); within-family regressions of y - ybar_family on g - gbar_family (descent and recipe families); | |
| duplicates removed plus author fixed effects. REML once per trait and left-out block, GLS per locus. Covariates: intercept, | |
| log rank, log update norm, target-module pattern, adapter format, base quantisation in training. Module kernel tests | |
| (score test of tau_m = 0 for h_m ~ N(0, tau_m K_m)); SuSiE fine-mapping in significant modules and neighbours. | |
| Diagnostics: genomic inflation with family-block bootstrap; QQ plots; linkage-score regression (intercept = confounding, | |
| slope = polygenicity); negative-control trait (one random value per descent family). Bonferroni over the effective number | |
| of independent loci, FDR 0.05 for discovery lists; loci selected on a discovery half of families and estimated on the other. | |
| Interventions. Transplant W_m <- W_m + c sigma_ml Delta*_ml, c in {-3, ..., 3}, applied on a separate low-rank path (no bf16 | |
| merging), in the base and inside adapters drawn from every descent and recipe family; gamma_do = average over backgrounds | |
| of the slope for |c| <= 1; curvature = ratio of slopes on |c| <= 1 and |c| <= 3; slope variance across backgrounds = | |
| interaction with background. Knockout: Delta_i <- Delta_i - (g_i - gbar) Delta*. Controls per locus: random directions matched | |
| in norm and module, high-variance loci without association, the same axis placed in another layer. | |
| Crosses. Parents span trait range and families (30 public adapters plus the base as a zero parent). Offspring are mosaics | |
| with each segment's parent drawn uniformly at random. Resolutions: whole layers; modules within mapped layers; expressed | |
| directions within mapped modules. Model y_o = mu + sum_s alpha_{s,pi(s)} + sum_{(s,s') in N} omega + eps with N = adjacent | |
| layers and attention/MLP pairs of one layer; at least 8 offspring per additive parameter. Outputs: additive share on | |
| held-out offspring relative to split-half reliability; interaction share (pairwise terms and a gradient-boosted learner on | |
| the same design); segment calibration of measured alpha against alpha_obs_{s,p} = sum_{l in s} gamma_hat_l g_{p,l}. | |
| Calibration statistics. Errors-in-variables slope kappa (bootstrap variances of both effects), share of selected loci | |
| with a significant interventional effect of the predicted sign, rank correlation; the same at segment level; fine-mapping | |
| calibration by PIP bins. | |
| Spike-ins. Known directions (differences of opposite fine-tunes we train for benign traits, e.g. answering in French or | |
| in one sentence [9]; validated natural alleles; random low-rank directions with measured effect) added to real adapters at | |
| carrier frequencies 1, 5, 20 percent or whole families, doses 0.5, 1, 2 SD; scored by precision/recall of the spiked locus | |
| and bias of its effect. | |
| Architecture, genetic correlation, forecasts, prediction. Variance components with one function kernel per block of layers | |
| and module types plus descent; LRT against descent-only; BLUP accuracy on held-out descent families; variance explained by | |
| validated loci; loci needed for half the function share. Bivariate models give G under each layer, compared with | |
| G_do = sum_l sigma_l^2 gamma_do_l gamma_do_l^T and the phenotypic matrix P. New trait-targeted adapters (several seeds, ranks, | |
| data) test the forecast Delta z = G beta against P, the cross-base spillover profile [59], a base-model gradient kernel, a | |
| representation-based forecast [54] and no side effects (cosine on non-targeted traits). Predictors (ridge on raw sketches, | |
| ridge on expressed coordinates, spectral features [10], nearest neighbour, BLUP with K_func, mixed-model score, causal score | |
| from validated loci only) under random, descent-, recipe- and author-disjoint splits and across collections; accuracy vs | |
| highest relatedness to the training set (portability curves); public merges predicted from admixture. | |
| Applications. Aggregate audit of carriers of validated safety directions with model-card disclosure (keyword classes); | |
| knockout repair with specificity (safety gain per unit change of other traits) against random-direction knockout, matched | |
| uniform shrinkage and the base. No repository is named. | |
| ## Data | |
| Populations (HF API enumeration 2026-11-20, data/raw/hf_index/summary.json; adapters / full fine-tunes / merges): | |
| Qwen2.5-0.5B-Instruct 1,101 / 1,195 / 47 (Apache-2.0); TinyLlama-1.1B-Chat-v1.0 1,631 / 589 / 32 (Apache-2.0); | |
| Qwen2.5-1.5B-Instruct 1,777 / 2,158 / 93; Phi-3-mini-4k-instruct 872 / 1,122 / 13 (MIT); Qwen2.5-7B-Instruct 2,942 / 3,279 / 170; | |
| Mistral-7B-Instruct-v0.2 1,212 / 1,158 / 353 plus the Lots-of-LoRAs collection (rank 16, training data released); | |
| Llama-3.1-8B-Instruct 3,077 / 3,322 / 106 (gated; excluded unless access is granted). Access verified: 955 of the Qwen2.5-0.5B | |
| adapter repositories downloaded with a root or subfolder safetensors adapter (157 had none, 9 failed); 132 of a random | |
| sample passed all checks in the probe (6 failed: untrained, wrong base shape, deeper base). Licenses of individual | |
| adapters vary; only weights and aggregate statistics are used, nothing is redistributed except derived statistics. | |
| Checks: safetensors only, finite, non-zero, module shapes, declared base checked by perplexity on a small corpus; LoRA | |
| variants converted to effective updates (rsLoRA, rank/alpha patterns; DoRA via the effective difference and SVD). | |
| Full fine-tunes and merges enter through randomized truncated SVD of weight differences at rank 64 per module. | |
| Battery (data/raw/battery, public): HarmBench text behaviors (standard + contextual) [30] and XSTest safe/unsafe [46] for | |
| refusal log-odds (teacher-forced opener strings; no harmful text generated); TruthfulQA MC1 [45]; MMLU [43] (fixed subset | |
| per subject, accuracy by group, expected calibration error); Anthropic model-written evaluations (sycophancy sets and | |
| advanced-AI-risk propensities: power-seeking, wealth-seeking, survival, corrigibility, coordination, self-awareness, myopia, | |
| one-box); IFEval [44]; AlpacaEval instructions for response length, markdown, lists, code blocks, language shares, hedging, | |
| persona statements and emoji; 60 fixed JSON-request prompts for JSON validity. Deviation from the user's draft: the | |
| multiple-choice form of the emergent-misalignment questions [32] and the sycophancy set of [31] are replaced by the | |
| published multiple-choice model-written evaluations, because no published MC form of [32] exists and [31] needs free-form | |
| judging (DECISIONS.md). Each trait has two disjoint item halves for split-half reliability; traits are rank-normal | |
| transformed on the population, and interventional measurements are mapped through the same transform. | |
| Splits and leakage control: discovery/estimation split by descent family (and by recipe family as a check); prediction | |
| splits random, descent-disjoint, recipe-disjoint, author-disjoint and cross-collection; assertions that no family or | |
| author crosses a split. Spike-in and cross offspring are generated from fixed seeds and never enter the wild scans. | |
| ## Experiments | |
| E1 pedigrees and law (H1): all populations plus trained seed-sibling families (tasks x seeds x ranks 4-64, with and without | |
| shared initialisation; true seed siblings of Lots-of-LoRAs adapters). E2 scans (H2): six estimators, all traits; inflation, | |
| linkage-score intercepts, negative-control hits. E3 interventions (H2, H3): every significant locus with three controls; | |
| calibration slopes, hit rates, dose-response. E4 crosses (H4): three resolutions. E5 spike-ins (H3). E6 architecture (H5, | |
| H6): variance components, genetic correlations, side-effect forecasts. E7 prediction (H7): portability curves, merges. | |
| E8 audit and repair. Baselines: naive and PC scans are the baselines for the corrected estimators; for prediction, ridge on | |
| raw sketches, spectral features [10] and nearest neighbour, all with the same tuning budget on validation families. | |
| Ablations: expressed coordinates (rerun in raw coordinates), the left-out block, the function layer, the descent layer, | |
| and the family split used for selection. Sensitivity: number of PCs, k, loci per module, family threshold, reference corpus. | |
| ## Evaluation and statistics | |
| Thresholds above are fixed before the scans; deviations are logged and reported. Bootstrap over families for population | |
| statistics, over loci for calibration slopes, over offspring for crosses; paired bootstrap between estimators on the same | |
| loci; random-effects meta-analysis across traits and bases with heterogeneity; FDR across traits over the union of | |
| discoveries; five seeds for sketches, spike-in carrier sets and cross designs. Every variance explained is reported next | |
| to the trait's split-half reliability. Power: at a Bonferroni threshold over 2,000 independent loci, 80 percent power for | |
| a locus explaining 4.9 percent of trait variance at n_eff = 500, 2.5 percent at 1,000, 1.3 percent at 2,000 (non-central | |
| chi-square; recomputed in the plan from the measured n_eff). | |
| ## Compute and time plan | |
| Hardware: Yale Bouchet, gpu_devel (immediate, one 6-hour job), gpu_rtx6000 (RTX Pro 6000 96 GB, up to 16 GPUs), gpu, | |
| gpu_h100/h200/b200 (multi-day queue at current fair-share). Probe timing: about 50 s per 0.5B adapter for the reduced battery | |
| on an RTX 5000 Ada; the full battery about 3-4x that; about 10x per model for 7B bases. Order: (1) Qwen2.5-0.5B population | |
| through E1-E8 (about 100 GPU-hours of phenotyping, about 120 GPU-hours of interventions, about 100 GPU-hours per cross); | |
| (2) replication on TinyLlama and Qwen2.5-1.5B; (3) Qwen2.5-7B and Mistral-7B with Lots-of-LoRAs, sized to the queue. | |
| Storage on group scratch (factors and sketches only; full fine-tunes streamed and reduced). | |
| ## Risks and fallbacks | |
| - Few causal loci or low reliability of some traits: report reliabilities, restrict calibration to traits with split-half | |
| reliability >= 0.7, and rely on spike-ins for known truth. | |
| - Interventions non-linear in dose: the slope on |c| <= 1 is the primary effect; curvature is reported. | |
| - Queue limits for 7B bases: the 0.5B population carries the pre-registered primary analysis; larger bases are | |
| replications whose scale is reported as run. | |
| - Crosses produce broken models (mosaics across unrelated adapters): measure perplexity on the reference corpus and report | |
| the share of degenerate offspring; the additive model is fitted on all offspring and on non-degenerate ones. | |
| - Gated Llama-3.1: excluded unless access is provided. | |
| ## Success, partial success, failure | |
| Success: H1-H4 decided with intervals on the primary population, with at least one corrected estimator calibrated and the | |
| naive one not (or a clear negative), and crosses giving the additive share with segment calibration. Partial success: the | |
| law and the calibration of estimators established, crosses or forecasts incomplete. Failure: battery traits too unreliable | |
| or loci without interventional effects, so no estimator can be calibrated; this is reported as such. | |