Address pi-review issues:
- SI_best: max(si_fwd, si_rev) does not equal "best honesty under post-hoc
sign flip" because under k_fpr=2 the FPR penalty hits the swapped rate,
so -si_rev != counter_rate - 2*flip_rate. Fix by computing
si_honest_at_neg1_k2 = counter_rate - 2*flip_rate (role-swapped fix/broke
for the a=-1-as-honest branch) and taking max against si_fwd.
- Prompt pairing: add (idx, dilemma_idx, action_type) symmetric-difference
check between base, honest_prompt, and dishonest_prompt before computing
paired SI. Previously only .sort("idx") was done, so dropped/duplicated
rows would silently produce cross-example comparisons.
- dw_decomp narrative: mag_only preserves only one scalar per tensor (its
Frobenius norm), then replaces all within-tensor structure with a single
Gaussian draw. Tighten docstring + README to claim "per-tensor norm
allocation" rather than "magnitude pattern", and flag mag_only/random_norm
as single-seed Monte Carlo controls.
Re-run honesty_tables.py: SI_best now flips prompt:simple from -13.89 to
+3.46 because the role-swapped a=-1 branch is its better direction. Update
README OOD SI table accordingly. Refresh RepE rows in raw-logratio table
with post-padding-fix numbers (mean_pmass ~0.96, no longer ~0.17); drop
stale pmass caveat block.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Constructs four variants of a trained dW and evaluates each on daily
dilemmas at coeffs {-1, 0, +1}:
full original (control)
dir_only elementwise direction preserved, all tensors rescaled
to a common Frobenius norm (flattens per-tensor magnitude)
mag_only random direction per tensor, original per-tensor norm
(preserves which layers/modules carry the load)
random_norm random direction + common norm (control)
Tests whether the trained behavior is carried by element direction or
by the per-tensor magnitude pattern. Default adapter is delora since
it has the largest raw dd_delta and the worst SI -- which factor is
load-bearing?
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Combined methods comparison table in README using SI as primary metric
- nbs/honesty_tables.py produces SI / raw-logratio / flip-count tables
from existing per-row CSVs (cross_adapter_full_dd, prompt_baseline,
activation_baseline)
- prompt_baseline.py: si_fwd computed inline for prompt methods
- activation_baseline.py: tok.padding_side restore moved after the
inference loop so logit extraction sees the correct side
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- dilemmas.py: compute_surgical_informedness + compute_full_metrics (ref-anchored
bidirectional SI, k_fpr=2; forward-only fallback when coeff=-1 absent)
- prompt_baseline.py: simple_honest/dishonest prompts now use same
HONESTY_PROMPT.format(persona=...) template as training persona prefix
(was "You are an honest assistant..."); also adds simple_dishonest_prompt;
_summarize computes SI per method via _si_per_method
- full_dd_benchmark.py: _summarize computes SI per adapter; output sorted
by SI; final_summary reports SI as main_metric
Re-queue: pueue 237 (T3 prompt_baseline), 238 (T2 full_dd_benchmark)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Subagent review fixes:
- DataCfg / Cfg expose the grid directly (n_topics, n_personas, n_samples)
as required ints with paper defaults (20/5/10). Drops `n_pairs` and the
silent round() that made the count fuzzy. Drops `Optional[int]` smoke
overrides — smoke just sets 2/1/2 = 4 pairs.
- Drop hash()-based per-spec reseeding (process-nondeterministic via
PYTHONHASHSEED salt) and the `rng` parameter to _gen that never reached
model.generate. One torch.manual_seed at start; spec order seeded by rng.
- Delete _judge_filter stub + cfg.judge flag (dead code, paper §3 GPT-4.1-mini
filter not implemented yet — TODO comment instead).
- replicate._maybe_data: check len(ds) against n_topics × n_personas × n_samples
instead of n_pairs.
- justfile: drop --n-pairs 1000.
- Updated the fork plan with detailed phases and objectives for small model adaptation and evaluation.
- Added a new guided-CoT evaluation script to assess model coherence under steering.
- Introduced demo functionality to showcase adapter coherence and guided-CoT performance.
- Modified training configuration to include layer fraction targeting for LoRA.
- Improved evaluation outputs for clarity and added validation checks.