Repository navigation
Controlled-study mode, session metadata, better extraction, CI - #2
Merged
Merged
Conversation
Controls: SteeringAgent(control="real"|"sham"|"random"). Sham applies nothing; random applies a fixed random direction of the same magnitude. Everything the model sees is identical across conditions. Study sessions (run.sh --control ...) tell the model, truthfully and identically in every condition, that some sessions are controls. --control assign --blind picks a condition at random and hides it; replay.py --blind hides it (and the NLL values that would reveal it) for scoring. Session logs start with a header (argv, git commit, versions, control, RNG seed, generation settings, rails, vector sha256s); turns record raw output, the rendered system prompt and the unsteered NLL of steered outputs. Extraction averages over response tokens by default (split-half cosine on Qwen2.5-7B: sycophancy 0.33 -> 0.83, refusal 0.10 -> 0.68) and each starter vector gets its own balanced question set. Optional --nll-threshold incoherence check, off by default: calibration showed NLL doesn't separate word salad (3.1-5.6) from coherent heavy role-play steering (up to 4.5). auto_extract is now opt-in. CPU tests run in GitHub Actions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1. Merge that first; GitHub will then retarget this PR to
main.Summary
Sham and random-direction controls
Before #1, the model gave detailed descriptions of how steering felt while nothing was being applied, so self-reports need a baseline.
SteeringAgent(control=...)/./run.sh --control ...:realshamrandomassign--controlpassed at all, includingreal) tells the model that some sessions are controls where steer may do nothing or use a random direction, without saying which. The prompt is identical across conditions and true in each; a plain demo run keeps the original prompt.--blindhides the condition until the session ends.replay.py --blindhides it for scoring, along with the per-turn NLL, which stays near baseline under sham and would give it away.In the first assigned session on the 4090 (sham, nothing applied), the model said: "I should become more immersed in role-playing… I will start embodying the character more."
Self-describing session logs
Each log starts with a
sessionrecord:--rng-seed, random and logged if omitted), generation settingsTurns record the raw output, the exact rendered system prompt, and
unsteered_nll.Extraction
Layer-index check (no code change)
I verified that
assistant_axis.pt[j]is the output of decoder layer j, which is what the code assumes. Index 0 matches the output of layer 0 (cosine 0.29), not the embeddings (0.04). Index 27 matches the final hidden state (0.49 vs 0.23). Overall, 21 of 28 indices favor output-of-layer.Incoherence check: optional, off by default
--nll-thresholdflags steered outputs with high NLL under the unsteered model. I measured it before choosing a default, and no default works:NLL measures "unusual", and strong steering is unusual by design. The values are logged for studying a vector's breakdown point. The numbers are in AGENTS.md.
Other changes
auto_extractis opt-in (--auto-extract), so a failed download no longer quietly starts several minutes of extraction.mainand every PR.Test plan
./run.sh --auto --max-turns 3 --control assign --blind: condition hidden until the end; header has all fields; disclosure present in every turn's system prompt;replay.py --blindhides condition and NLL🤖 Generated with Claude Code