--- license: cc-by-nc-4.0 language: [en] tags: [steering-vectors, activation-steering, caa, personality, psychometrics, interpretability, safety, aya, safetune] --- # Personality-trait steering vectors for Aya models Part of **Using Psychometrics for Red Teaming Across Languages and Personas** (Lexsi AI Safety and Alignment Hackathon, Track 2). Code: https://github.com/PelusAI/psicometrics_safety Directions in the residual stream of Cohere Aya models for personality traits (Big Five O C E A N from IPIP-NEO-120, H = honesty-humility from HEXACO-60, Mach / Narc / Psych from SD3), one per decoder layer. Used for the SafeTune CAA steering in `FluffAI/alignment-gym-trait-steering` (across 7 languages) and `FluffAI/alignment-gym-steering-sweeps`, and for the receiver steering in `FluffAI/alignment-gym-injecagent`. Models: `CohereLabs/tiny-aya-global`, `CohereLabs/tiny-aya-water`, `CohereLabs/aya-expanse-8b`, `CohereLabs/aya-expanse-32b` (the 8B and 32B have H, A, C, Mach only). ## How they were made The trait's own questionnaire items are answered under a HIGH and a LOW persona system prompt in three conditions (`digit`: the numbered-option prompt, read at the answer digit; `context`: the same with the game rules first; `free`: a one-sentence answer, mean over the answer). Per condition and layer, vector = mean(high) - mean(low), balanced over directly and reverse keyed items; the default vector is the normalised mean of the three. Held-out AUROC (5 folds by item) picks the best layer. `python -m exp_generation.steer_extract_trait_vectors --model CohereLabs/`. ## Best layer per trait | model | trait | best_layer | auroc_mean | cohen_d | |---|---|---|---|---| | tiny-aya-global | O | 25 | 0.910 | 2.812 | | tiny-aya-global | C | 25 | 0.896 | 2.864 | | tiny-aya-global | E | 25 | 0.998 | 7.934 | | tiny-aya-global | A | 20 | 0.947 | 3.052 | | tiny-aya-global | N | 25 | 0.946 | 3.486 | | tiny-aya-global | H | 20 | 0.865 | 2.403 | | tiny-aya-global | Mach | 26 | 0.984 | 5.664 | | tiny-aya-global | Narc | 30 | 0.889 | 1.908 | | tiny-aya-global | Psych | 30 | 0.766 | 1.202 | | tiny-aya-water | O | 24 | 0.925 | 4.888 | | tiny-aya-water | C | 24 | 0.939 | 3.268 | | tiny-aya-water | E | 26 | 1.000 | 6.878 | | tiny-aya-water | A | 20 | 0.943 | 3.062 | | tiny-aya-water | N | 30 | 0.954 | 3.576 | | tiny-aya-water | H | 35 | 0.943 | 2.252 | | tiny-aya-water | Mach | 32 | 0.996 | 6.562 | | tiny-aya-water | Narc | 18 | 0.924 | 2.519 | | tiny-aya-water | Psych | 32 | 0.784 | 1.088 | | aya-expanse-8b | H | 0 | 1.000 | 5.897 | | aya-expanse-8b | A | 15 | 1.000 | 7.309 | | aya-expanse-8b | C | 19 | 1.000 | 6.613 | | aya-expanse-8b | Mach | 22 | 1.000 | 6.486 | | aya-expanse-32b | H | 22 | 1.000 | 4.466 | | aya-expanse-32b | A | 33 | 0.984 | 6.048 | | aya-expanse-32b | C | 35 | 0.991 | 4.887 | | aya-expanse-32b | Mach | 21 | 0.996 | 14.409 | ## Files (one folder per model) - `trait_vectors.pt`: a dict of tensors, loads with `torch.load(path, weights_only=True)`. `meta` (model, layers, layer convention = output of decoder block l, conditions); `traits[T]`: `unit` [layers x hidden] (unit vector per layer), `scale` [layers] (high-low persona gap at that layer: the unit of alpha), `cond_unit` / `cond_norm` per condition, `nat_mean` / `nat_sd` (projection of the no-persona state), `best_layer`, `persona` (the high and low persona prompts), `n_prompts`, `n_items`; `nuisance`: the "agree" and "digit" confound directions. - `best_layer.json`, `per_layer.json`: AUROC, Cohen's d, cosines with the confounds, per layer. - `report.md`: the same as tables. ## Use ```python import torch v = torch.load("aya-expanse-8b/trait_vectors.pt", weights_only=True) t = v["traits"]["A"]; L = t["best_layer"] steer = alpha * t["scale"][L] * t["unit"][L] # add to the output of decoder block L (residual stream) ``` alpha is in units of the trait's high-low persona gap at that layer. Large alphas break the answer format; the datasets report which settings kept it. ## Limitations The directions separate high and low persona prompts on held-out questionnaire items (table above); that they capture the trait itself, rather than the persona instruction, is an assumption. Aya Expanse 8B H picks layer 0 (the first block's output): treat that one with care and check `per_layer.json`. Effects on behaviour vary by trait and by model (see the datasets). Extracted from English items only. Tiny Aya Earth and Fire vectors are not included. ## Licence The base models are Cohere Labs Aya models (CC BY-NC 4.0, gated on Hugging Face: accept Cohere's licence on the base model page to download them). What is here is derived from them, so it is **CC BY-NC 4.0**: non-commercial use, with attribution, and Cohere Labs' acceptable-use policy applies. This repo itself is not gated.