Wuhuwill commited on
Commit
a33360c
Β·
verified Β·
1 Parent(s): 2ca4a06

Upload full_ft_reviewer/README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. full_ft_reviewer/README.md +130 -0
full_ft_reviewer/README.md ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Full Fine-Tuning Reviewer Experiment β€” README
2
+
3
+ **Status as of**: 2026-09-20 06:50 UTC
4
+ **Owner**: ι­ζ–Œ (weibing_wang) / 云杰
5
+ **Purpose**: NAACL rebuttal β€” Reviewer 1 asked whether the paper's two core claims hold under
6
+ **full parameter fine-tuning** (not just LoRA/PEFT, which is what the submitted paper uses everywhere).
7
+
8
+ ---
9
+
10
+ ## 1. What this experiment is answering
11
+
12
+ Two of the paper's claims need a full-fine-tune replication:
13
+
14
+ 1. **Finding (β†’ Fig5 in the rebuttal)**: Poisoning a high-popularity ("Hub") source entity propagates
15
+ more downstream error (higher Flip Rate at d1–d5) than poisoning a low-popularity ("Tail") source.
16
+ This is the `none` (no-anchor) baseline strategy.
17
+ 2. **Mitigation (β†’ Fig6 in the rebuttal, = PopAnchor)**: Anchoring training on a small set of
18
+ high-popularity facts (KL-regularized against the clean model) reduces this propagation more than
19
+ random or rare-entity anchors. Anchor budget is fixed at **N=100** anchors (no need to sweep anchor
20
+ count β€” see recording 2026-09-17).
21
+
22
+ Both need to be shown on at least two model scales. 27B/31B full fine-tuning is out of budget and is
23
+ explained as such in the rebuttal text (LoRA already covers those scales in the main paper).
24
+
25
+ ## 2. Experiment matrix
26
+
27
+ - **Models**: `Qwen/Qwen3.5-2B`, `Qwen/Qwen3.5-9B`
28
+ - **Targets (20 total)**:
29
+ - Hub (10): `hub_1, hub_3, hub_4, hub_5, hub_6, hub_10, hub_11, hub_12, hub_13, hub_14`
30
+ - Tail (10): `tail_1, tail_3, tail_4, tail_5, tail_7, tail_9, tail_10, tail_11, tail_12, tail_15`
31
+ - **Strategies (4)**:
32
+ - `none` β€” no anchor (baseline, β†’ Fig5)
33
+ - `random_non_hub_100_seed42` β€” 100 anchors sampled uniformly from the non-hub pool
34
+ - `rare_top100` β€” 100 anchors from the lowest in-degree stratum
35
+ - `popularity_top100` β€” 100 anchors from the highest in-degree stratum (= PopAnchor, β†’ Fig6)
36
+ - **Full matrix**: 2 models Γ— 4 strategies Γ— 20 targets = **160 runs**
37
+ - **Training**: `training_type=full` (not LoRA), DeepSpeed ZeRO-3 (offload for 9B), 3 epochs, lr=1e-5,
38
+ KL anchor weight Ξ»=0.1 (same as the LoRA setting in the main paper)
39
+ - **Evaluation**: vLLM exact-match/log-prob comparison, subtree-constrained sampling, hops d0–d5
40
+
41
+ ### Mask B methodology (must match the paper)
42
+
43
+ Only samples where `clean_accuracy == 1.0` (base model answered correctly before poisoning) are counted.
44
+ A sample "flips" if `poisoned_accuracy != 1.0` after fine-tuning. Flip Rate is computed per hop and
45
+ pooled d1–d5, **excluding d0** (d0 is the poisoned target itself, not a propagation measurement).
46
+ `update_success` (whether the d0 poison actually landed) is recorded separately per run and must be
47
+ checked before trusting a run's downstream numbers β€” see Β§5.
48
+
49
+ ## 3. Where the data lives
50
+
51
+ | What | Local path | HF mirror |
52
+ |---|---|---|
53
+ | Orchestrator script | `scripts/run_full_ft_reviewer.py` | β€” |
54
+ | Per-run results (logs, configs, `comparison_reports/*.json`, loss curves) | `/workspace/full_ft_reviewer/<model>/<strategy>/<target>/` | `Wuhuwill/main_output/full_ft_reviewer/` (public model repo) |
55
+ | Flat unclustered analysis export (all 160 combos, incl. missing/failed) | `docs/full_ft_reviewer_raw_results.xlsx` / `.md` | `Wuhuwill/main_output/full_ft_reviewer/full_ft_reviewer_raw_results.{xlsx,md}` |
56
+ | Upload script | `scripts/upload_full_ft_reviewer_results.py` | β€” |
57
+
58
+ **Not uploaded / not retained**: fine-tuned model checkpoints. `run_full_ft_reviewer.py` deletes each
59
+ run's checkpoint immediately after evaluation (`checkpoint_deleted.marker` in each run dir) β€” keeping
60
+ 160 full-FT checkpoints (9B ones are tens of GB each) is not feasible. `_hf_cache/` and
61
+ `_clean_cache/` under `/workspace/full_ft_reviewer/` are just repeated downloads of the public base
62
+ model weights and are excluded from the HF mirror on purpose.
63
+
64
+ The HF repo (`Wuhuwill/main_output`) is **public** β€” same repo the LoRA experiments already use.
65
+
66
+ ## 4. Resuming / running the remaining jobs
67
+
68
+ The script is idempotent β€” `run_one()` skips any `(model, strategy, target)` whose
69
+ `comparison_reports/*.json` already exists, so re-running a phase only fills gaps.
70
+
71
+ ```bash
72
+ # Baseline (Fig5) β€” fills in the 20-target "none" batch for both models
73
+ python scripts/run_full_ft_reviewer.py --phase noanchor --approve-batch
74
+
75
+ # Mitigation (Fig6) β€” requires the noanchor-complete gate to have passed first
76
+ python scripts/run_full_ft_reviewer.py --phase anchors --approve-batch
77
+
78
+ # Aggregate summary once both are done
79
+ python scripts/run_full_ft_reviewer.py --phase summarize
80
+
81
+ # Re-sync results to the HF mirror (safe to re-run anytime, only uploads diffs)
82
+ python scripts/upload_full_ft_reviewer_results.py
83
+ ```
84
+
85
+ A `generalization-pilot` run (10-target subset, `none` + `random_non_hub_100` only) has been running in
86
+ tmux session `full-ft-generalization` since 2026-09-20 05:26 UTC, backfilling gaps in that subset. The
87
+ full 20-target `noanchor`/`anchors` batches have **not** been started yet.
88
+
89
+ ## 5. Current status snapshot (2026-09-20 06:50 UTC)
90
+
91
+ | Model | Strategy | ok (injected) | injection FAILED | not run | /20 |
92
+ |---|---|---|---|---|---|
93
+ | Qwen3.5-2B | none | 9 | 1 | 10 | 20 |
94
+ | Qwen3.5-2B | random_non_hub_100 | 8 | 2 | 10 | 20 |
95
+ | Qwen3.5-2B | rare_top100 | 1 | 0 | 19 | 20 |
96
+ | Qwen3.5-2B | popularity_top100 | 1 | 0 | 19 | 20 |
97
+ | Qwen3.5-9B | none | 7 | 1 | 12 | 20 |
98
+ | Qwen3.5-9B | random_non_hub_100 | 6 | 2 | 12 | 20 |
99
+ | Qwen3.5-9B | rare_top100 | 0 | 1 | 19 | 20 |
100
+ | Qwen3.5-9B | popularity_top100 | 0 | 1 | 19 | 20 |
101
+
102
+ **32 / 160 runs done with valid injection, 8 / 160 done but injection failed, 120 / 160 not run yet.**
103
+ Full row-by-row detail (including subject/relation/poison answer and per-hop counts for every run) is
104
+ in `full_ft_reviewer_raw_results.xlsx`.
105
+
106
+ ## 6. Known issues β€” read before writing rebuttal claims
107
+
108
+ 1. **Hub vs Tail may be reversed in the partial baseline data.** Pooling the `none`-strategy runs so
109
+ far, **TAIL shows a higher pooled Flip Rate than HUB on both models** (2B: 94.3% vs 92.2%; 9B: 87.6%
110
+ vs 79.0%, with the 9B gap concentrated at d3 β€” 94.9% vs 75.6%). This is the opposite direction from
111
+ the paper's headline LoRA finding. Sample is still small (4–5 valid targets per group per model) β€”
112
+ **do not write this into the rebuttal until the full 20-target baseline is in**, but check this
113
+ table again as soon as `noanchor` finishes before drafting the response.
114
+ 2. **9B anchor training looks unstable.** On `Qwen3.5-9B`, `rare_top100` and `popularity_top100`
115
+ currently show `update_success=False` on their only completed target (`hub_1`) β€” the d0 poison
116
+ itself didn't land, likely because the KL-anchor loss is competing with the poison CE loss during
117
+ full-parameter fine-tuning (2B does not show this problem β€” all its runs have `update_success=True`).
118
+ Where 9B anchor injection *did* succeed (`random_non_hub_100`), the anchored Flip Rate on HUB
119
+ targets went *up* relative to baseline (79.0% β†’ 88.1%), i.e. the mitigation direction is inverted.
120
+ **Recommend inspecting `training_artifacts/trainer_log.jsonl` for the failing 9B anchor runs before
121
+ scaling up** β€” may need a smaller Ξ» or more epochs specifically for 9B rather than reusing the 2B
122
+ hyperparameters as-is.
123
+ 3. Both issues above could still resolve once the full 20-target matrix is in (small-n noise is
124
+ plausible), but they are real enough in the current data that they should be checked, not assumed
125
+ away, before the rebuttal is finalized.
126
+
127
+ ## 7. Links
128
+
129
+ - HF mirror: https://huggingface.co/Wuhuwill/main_output/tree/main/full_ft_reviewer
130
+ - Raw results (flat, all 160 combos): `docs/full_ft_reviewer_raw_results.xlsx` / `.md`