← Ziding Zhang

Word representations in Persona Geology

A two-layer adapter replication and a lexical comparison, with the distinction between word representations and personas left open.

November 5, 2026 · Research note


We reproduced part of the factor structure reported in Persona Geology. We then compared it with the base model’s representations of the same trait words. Those word representations recovered much less of the structure and barely tracked the adapter similarities.

That is a result about a particular word representation. It does not establish that the base model lacks the corresponding personas.

What we compared

Samuel Ratnam and David Africa trained 134 character adapters on Qwen3.5-4B and found factors in their weight updates that loosely resemble the Big Five. Their post already attributes much of the structure to the teacher’s training text and identifies on-policy training as a missing control. Teacher influence is not a new criticism from this check.

Our adapter calculation used layers 12 and 19 of the 32-layer model: 15 LoRA modules per adapter. For every pair of adapters, we summed the exact inner products of their weight updates, then normalized these into cosine similarities. We extracted five factors using principal-axis factoring and an oblimin rotation. The calculation included all 134 traits; only the 100 Goldberg markers defined the comparison targets. The other 34 traits were included in factoring but not target scoring.

The lexical calculation used the unmodified base model. Each word appeared in the prompt A {word} person. We averaged the hidden states of the word’s tokens after block 16, subtracted the mean vector across traits, and compared the resulting vectors by cosine similarity. We then used the same type of factor analysis and target matching.

The table gives absolute Tucker congruence with three targets. This measures alignment between a recovered factor’s loadings and the target pattern; it is not accuracy on a behavioral task. Factors were matched one-to-one to targets by maximizing total absolute congruence.

CalculationAgreeablenessConscientiousnessIntellect
Adapters, original run0.6130.5440.638
Adapters, independent review0.6020.5660.670
Word states, original run0.0970.2590.450
Word states, independent review0.0490.2460.438

The post reports 0.66, 0.57 and 0.68 for the full adapter calculation. Both of our implementations fall within our predeclared tolerance of 0.08 on all three values. This passes our reproduced from the subset rule; it is not a reconstruction of all layers.

Both adapter calculations also meet our rule for the mixed Extraversion/Emotional Stability structure: at least two recovered factors each have absolute congruence of at least 0.30 with both targets. Neither word-state calculation meets it. The word-state results satisfy our frozen NOT INHERITED rule, which requires at least two of Agreeableness ≤ 0.51, Conscientiousness ≤ 0.42 and Intellect ≤ 0.53. That label applies only to this lexical test.

The Spearman correlation between the two similarity matrices is 0.083 in both runs at the precision shown. The independent value is 0.08271103383516136. This is a small association, not zero: none of the reviewer’s 1,000 item-label permutations produced a correlation as large. Separately, the adapter factors’ mean congruence exceeded the 99th percentile of 1,000 permutations of the marker labels in both implementations.

Part of my research notebook.

Agent context: sources, method and working notes

What the comparison leaves open

A fresh agent received the raw inputs and questions, then wrote its own adapter, factor-analysis and base-model calculations. The implementations differ in factor extraction and rotation details, including normalization and starting points. Their factor values are not identical; their decisions under the specified rules agree. The table keeps that difference visible.

One explanation is that this word-state representation is a poor proxy for the behavioral structure available to the model. Another is that the adapter structure largely reflects the teacher’s training contrasts. These explanations can both hold. This comparison does not isolate their contributions. In particular, failure to recover a structure from trait-word states does not show that the structure is absent from other activations or behavior.

The check uses one base model, one prompt template and two adapter layers. It does not reproduce the authors’ teacher-text contrast calculation or behavioral evaluations. The training-pair data needed for the former were not among the inputs used here. Nor do these results establish a general cutoff for when factor congruence counts as a meaningful personality match.

Inputs and calculation code

The scripts below are the executed independent reviewer’s code, copied unchanged, plus the original analyst’s adapter downloader. The short make_items.py wrapper reconstructs the input ordering from the pinned public metadata; its output hash was checked when preparing this note. No model inference was rerun for publication. The historical execution record does not provide a complete dependency lock, so this is inspectable code and an input recipe, not a newly validated environment package.

Use a Python environment with NumPy, SciPy, PyTorch and a Transformers version supporting Qwen3.5. The weight calculation uses float64; the base-model forward pass uses float32. Save the three metadata files below under a working directory named run:

Run make_items.py from the directory containing run. It keeps the 100 primary markers in source order, then the secondary words with released stage-one adapters. Save fetch_adapters.py beside it and run python fetch_adapters.py run/tree.json run/adapters. This retrieves approximately 4.3 GB of layer slices from the pinned revision; it does not train or merge adapters.

For the word-state comparison, place the Qwen3.5-4B snapshot at revision 851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a, including its configuration, tokenizer and weights, under run/qwen. Save the remaining five scripts under run/recompute. From the directory containing run, execute:

python run/recompute/gram.py run
python run/recompute/base_hidden.py run
python run/recompute/run12.py run
python run/recompute/run34.py run

results12.json contains the adapter results and marker-label null. results34.json contains the word-state results and matrix correlation. The independent implementation uses permutation seeds 12345 and 777, respectively, and 30 random rotation starts plus the identity. Replaying another implementation with these seeds does not reproduce its random stream or rotations.

make_items.py

import hashlib, json
from pathlib import Path

base = Path("run")
primary = json.loads((base / "traits_primary.json").read_text())
secondary = json.loads((base / "traits_secondary.json").read_text())
tree = json.loads((base / "tree.json").read_text())
folders = {x["path"].split("/")[-1] for x in tree if x["type"] == "directory"}
norm = lambda w: w.lower().replace("-", "_").replace(" ", "_")
items = primary + [x for x in secondary if norm(x["trait"]) in folders]
assert len(primary) == 100 and len(items) == 134
payload = json.dumps(items).encode()
assert hashlib.sha256(payload).hexdigest() == "50ed0e50991a5dbc27180f4c29c5816c81f454316a0661136f29fc9c70b568ec"
(base / "items.json").write_bytes(payload)
(base / "adapters").mkdir(exist_ok=True)
(base / "recompute").mkdir(exist_ok=True)

fetch_adapters.py

"""Fetch layers 12 and 19 of every stage1_dpo adapter as byte ranges (own code; stdlib only).
Writes <out>/<trait>.bin (concatenated raw tensor bytes) and <trait>.json (header subset with new offsets, sha256 of the slice)."""
import json, sys, re, struct, hashlib, urllib.request, pathlib, time
REV = "251bbff85409c9567a5fa17d0c968864b8497e5b"
tree, out = sys.argv[1], pathlib.Path(sys.argv[2])
LAYERS = ("layers.12.", "layers.19.")
traits = [x["path"].split("/")[1] for x in json.load(open(tree))]
if len(sys.argv) > 3: k, m = map(int, sys.argv[3].split("/")); traits = traits[k::m]
def get(url, a, b):
    for k in range(5):
        try:
            r = urllib.request.Request(url, headers={"Range": f"bytes={a}-{b}"})
            with urllib.request.urlopen(r, timeout=120) as f: return f.read()
        except Exception as e:
            time.sleep(5 * (k + 1)); err = e
    raise err
for t in traits:
    if (out / f"{t}.json").exists(): continue
    url = f"https://huggingface.co/EternalRecursion/persona-lora-zoo-qwen35/resolve/{REV}/stage1_dpo/{t}/adapter_model.safetensors"
    n = struct.unpack("<Q", get(url, 0, 7))[0]
    h = json.loads(get(url, 8, 8 + n - 1)); h.pop("__metadata__", None)
    keep = {k: v for k, v in h.items() if any(l in k for l in LAYERS)}
    spans = sorted((v["data_offsets"][0], v["data_offsets"][1], k) for k, v in keep.items())
    runs = []
    for a, b, k in spans:
        if runs and runs[-1][1] == a: runs[-1][1] = b
        else: runs.append([a, b])
    assert len(runs) <= 8, (t, len(runs))
    parts, meta, pos = [], {}, 0
    base = {}
    for a, b in runs:
        blob = get(url, 8 + n + a, 8 + n + b - 1); assert len(blob) == b - a
        base[(a, b)] = pos; parts.append(blob); pos += b - a
    for k, v in keep.items():
        a0, b0 = v["data_offsets"]
        for (a, b), p0 in base.items():
            if a <= a0 and b0 <= b: meta[k] = {"dtype": v["dtype"], "shape": v["shape"], "off": [p0 + a0 - a, p0 + b0 - a]}
    blob = b"".join(parts)
    (out / f"{t}.bin").write_bytes(blob)
    json.dump({"trait": t, "rev": REV, "file_header_len": n, "runs": runs, "sha256": hashlib.sha256(blob).hexdigest(), "tensors": meta}, open(out / f"{t}.json", "w"))
    print(t, len(blob), flush=True)
print("DONE")

fa.py

# PAF (iterated communalities) + direct oblimin (gamma=0, GPA, no Kaiser normalisation) + Tucker congruence.
import numpy as np
from scipy.optimize import linear_sum_assignment

FACTORS = ['Extraversion', 'Agreeableness', 'Conscientiousness', 'EmotionalStability', 'Intellect']

def paf(R, k, tol=1e-8, maxit=5000):
    R = np.asarray(R, float)
    try:
        inv = np.linalg.inv(R)
        if not np.all(np.isfinite(inv)) or np.min(np.diag(inv)) <= 0: raise np.linalg.LinAlgError
    except np.linalg.LinAlgError:
        inv = np.linalg.pinv(R)
    h = np.clip(1 - 1 / np.diag(inv), 0.005, 1.0)
    for it in range(maxit):
        Rr = R.copy(); np.fill_diagonal(Rr, h)
        w, V = np.linalg.eigh(Rr)
        o = np.argsort(w)[::-1][:k]
        L = V[:, o] * np.sqrt(np.maximum(w[o], 0))
        hn = (L ** 2).sum(1)
        if np.max(np.abs(hn - h)) < tol:
            h = hn; break
        h = hn
    return L, h, it + 1

def _vgq(L):
    X = (L ** 2) @ (1 - np.eye(L.shape[1]))
    return L * X, np.sum(L ** 2 * X) / 4

def oblimin(A, T0=None, eps=1e-6, maxit=1000):
    k = A.shape[1]
    T = np.eye(k) if T0 is None else T0
    L = A @ np.linalg.inv(T).T
    Gq, f = _vgq(L)
    G = -(L.T @ Gq @ np.linalg.inv(T)).T
    al = 1.0
    for _ in range(maxit):
        Gp = G - T @ np.diag(np.sum(T * G, 0))
        s = np.linalg.norm(Gp)
        if s < eps: break
        al *= 2
        for _ in range(11):
            X = T - al * Gp
            Tt = X / np.sqrt(np.sum(X ** 2, 0))
            Lt = A @ np.linalg.inv(Tt).T
            Gqt, ft = _vgq(Lt)
            if f - ft > 0.5 * s ** 2 * al: break
            al /= 2
        T, L, f = Tt, Lt, ft
        G = -(L.T @ Gqt @ np.linalg.inv(T)).T
    return L, T.T @ T, f, s

def oblimin_best(A, starts=30, seed=0):
    rng = np.random.default_rng(seed)
    best = oblimin(A)
    for _ in range(starts):
        Q, _ = np.linalg.qr(rng.standard_normal((A.shape[1],) * 2))
        r = oblimin(A, Q)
        if r[2] < best[2] - 1e-10: best = r
    return best

def targets(items, labels=None):
    lab = [(x['factor'], x['keyed']) for x in items[:100]] if labels is None else labels
    T = np.zeros((100, 5))
    for i, (fac, key) in enumerate(lab):
        T[i, FACTORS.index(fac)] = 1.0 if key == '+' else -1.0
    return T

def congruence(P, T):
    # P: 100 x 5 pattern; T: 100 x 5 targets; returns phi[target, factor]
    num = T.T @ P
    return num / np.sqrt(np.outer((T ** 2).sum(0), (P ** 2).sum(0)))

def match(phi):
    r, c = linear_sum_assignment(-np.abs(phi))
    return dict(zip(r, c))

def summarise(P, T):
    phi = congruence(P, T)
    m = match(phi)
    out = {FACTORS[t]: float(abs(phi[t, m[t]])) for t in range(5)}
    E, ES = 0, 3
    both = int(np.sum((np.abs(phi[E]) >= .3) & (np.abs(phi[ES]) >= .3)))
    out['n_factors_both_E_and_ES_ge_.30'] = both
    out['n_factors_E_ge_.30'] = int(np.sum(np.abs(phi[E]) >= .3))
    out['n_factors_ES_ge_.30'] = int(np.sum(np.abs(phi[ES]) >= .3))
    out['split'] = both >= 2
    out['mean_ACI'] = (out['Agreeableness'] + out['Conscientiousness'] + out['Intellect']) / 3
    return out, phi

def cosnorm(G):
    d = np.sqrt(np.diag(G)); return G / np.outer(d, d)

def factor(R, k=5):
    L, h, it = paf(R, k)
    P, Phi, f, s = oblimin_best(L)
    return P, Phi, dict(paf_iter=it, max_h2=float(h.max()), oblimin_f=float(f), grad=float(s))

gram.py

# Item 1 input: G_ij = sum_modules <2 B_i A_i, 2 B_j A_j>_F over layers 12 and 19.
# <B_i A_i, B_j A_j>_F = sum_kl (B_i^T B_j)_kl (A_i A_j^T)_kl
import json, sys, os, numpy as np
B = sys.argv[1]
items = json.load(open(B + '/items.json'))
names = [x['trait'].lower().replace('-', '_').replace(' ', '_') for x in items]
N = len(names); R = 64
metas = [json.load(open(f'{B}/adapters/{n}.json'))['tensors'] for n in names]
mods = sorted({k.rsplit('.lora_', 1)[0] for k in metas[0]})
def get(i, key):
    m = metas[i][key]; a, b = m['off']
    with open(f'{B}/adapters/{names[i]}.bin', 'rb') as f:
        f.seek(a); buf = f.read(b - a)
    return np.frombuffer(buf, dtype='<f4').reshape(m['shape']).astype(np.float64)
G = np.zeros((N, N))
for mod in mods:
    As = np.stack([get(i, mod + '.lora_A.weight') for i in range(N)])  # N,R,in
    Bs = np.stack([get(i, mod + '.lora_B.weight') for i in range(N)])  # N,out,R
    MA = As.reshape(N * R, -1) @ As.reshape(N * R, -1).T   # (iR, jR): A_i A_j^T
    Bt = Bs.transpose(0, 2, 1).reshape(N * R, -1)
    MB = Bt @ Bt.T                                         # B_i^T B_j
    P = (MA * MB).reshape(N, R, N, R).sum(axis=(1, 3))
    G += 4.0 * P
    print(mod, flush=True)
np.save(B + '/recompute/G.npy', G)
# sanity: direct check on one pair, one module
mod = mods[0]
dW = lambda i: 2 * get(i, mod + '.lora_B.weight') @ get(i, mod + '.lora_A.weight')
print('mods', len(mods), 'pair check (mod0, 0,1):', np.sum(dW(0) * dW(1)))

base_hidden.py

# Item 3 input: mean hidden state over the word's tokens after block 16 of 32, prompt "A {word} person."
import json, sys, numpy as np, torch
torch.set_num_threads(8)
from transformers import AutoTokenizer, Qwen3_5ForConditionalGeneration
B = sys.argv[1]; Q = B + '/qwen'
items = json.load(open(B + '/items.json'))
tok = AutoTokenizer.from_pretrained(Q)
model = Qwen3_5ForConditionalGeneration.from_pretrained(Q, dtype=torch.float32)
model.eval()
lm = model.model.language_model  # text decoder only
print(type(lm).__name__, len(lm.layers), flush=True)
H = []; toks = []
for x in items:
    w = x['trait'].lower().replace('_', '-')
    s = f'A {w} person.'
    a = s.index(w); b = a + len(w)
    enc = tok(s, add_special_tokens=False, return_offsets_mapping=True)
    ids = enc['input_ids']; off = enc['offset_mapping']
    idx = [k for k, (u, v) in enumerate(off) if v > a and u < b]
    with torch.no_grad():
        out = lm(input_ids=torch.tensor([ids]), output_hidden_states=True)
    hs = out.hidden_states
    assert len(hs) == 33
    H.append(hs[16][0, idx].mean(0).numpy().astype(np.float64))
    toks.append([tok.decode([ids[k]]) for k in idx])
np.save(B + '/recompute/H16.npy', np.stack(H))
json.dump(toks, open(B + '/recompute/word_tokens.json', 'w'))
print('done', np.stack(H).shape, toks[:5], toks[-5:])

run12.py

import json, sys, numpy as np
sys.path.insert(0, sys.argv[1] + '/recompute')
from fa import *
B = sys.argv[1]
items = json.load(open(B + '/items.json'))
G = np.load(B + '/recompute/G.npy'); N = len(G)
T = targets(items)
res = {}
J = np.eye(N) - 1 / N
for name, R in [('uncentred', cosnorm(G)), ('double_centred', cosnorm(J @ G @ J))]:
    P, Phi, diag = factor(R)
    s, phi = summarise(P[:100], T)
    s.update(diag); res[name] = s
    np.save(f'{B}/recompute/pattern_{name}.npy', P)
    print(name, json.dumps(s, indent=1)); print(np.round(phi, 2))
    if name == 'uncentred':
        P1 = P
# Item 2: permutation null on uncentred solution
rng = np.random.default_rng(12345)
lab = [(x['factor'], x['keyed']) for x in items[:100]]
null = []
for _ in range(1000):
    perm = rng.permutation(100)
    null.append(summarise(P1[:100], targets(items, [lab[p] for p in perm]))[0]['mean_ACI'])
null = np.array(null)
res['perm'] = dict(real=res['uncentred']['mean_ACI'], p99=float(np.percentile(null, 99)),
                   p50=float(np.median(null)), max=float(null.max()), p_ge=float((1 + np.sum(null >= res['uncentred']['mean_ACI'])) / 1001))
print(res['perm'])
json.dump(res, open(B + '/recompute/results12.json', 'w'), indent=1)

run34.py

import json, sys, numpy as np
from scipy.stats import spearmanr, rankdata
sys.path.insert(0, sys.argv[1] + '/recompute')
from fa import *
B = sys.argv[1]
items = json.load(open(B + '/items.json'))
H = np.load(B + '/recompute/H16.npy')
Hc = H - H.mean(0)
Hn = Hc / np.linalg.norm(Hc, axis=1, keepdims=True)
S = Hn @ Hn.T
P, Phi, diag = factor(S)
s, phi = summarise(P[:100], targets(items)); s.update(diag)
print('item3', json.dumps(s, indent=1)); print(np.round(phi, 2))
# Item 4
C = cosnorm(np.load(B + '/recompute/G.npy'))
iu = np.triu_indices(len(S), 1)
rho = spearmanr(S[iu], C[iu]).statistic
rng = np.random.default_rng(777)
rS = rankdata(S[iu])
null = []
for _ in range(1000):
    p = rng.permutation(len(C))
    Cp = C[np.ix_(p, p)]
    null.append(np.corrcoef(rS, rankdata(Cp[iu]))[0, 1])
null = np.array(null)
r4 = dict(rho=float(rho), p99=float(np.percentile(null, 99)), p99_abs=float(np.percentile(np.abs(null), 99)),
          null_max=float(null.max()), p_ge=float((1 + np.sum(null >= rho)) / 1001))
print('item4', r4)
json.dump(dict(item3=s, item4=r4), open(B + '/recompute/results34.json', 'w'), indent=1)

What would change the interpretation: a corrected input or calculation that changes the reported comparisons, or a behavioral/persona representation that recovers the adapter relationships where the word-state probe fails. The latter would refute a broad absence claim and identify the lexical probe as the limitation. Changing the teacher or using on-policy training would address a separate causal question; neither experiment was run here.

The publication experiment is whether a reader can reproduce the subset calculation, identify a consequential error, or provide that contrasting representation. Confidence is high in agreement on the specified rules and limited in any causal account of where persona structure originates. Corrections with a calculation or concrete comparison are welcome at @ziding.

Part of the research notebook. This is a provisional note; substantive corrections will be dated here.

Changes
  • November 17, 2026: Shortened to the result and what it means; method, verification and limits moved under Agent context.