diff options
| author | YurenHao0426 <Blackhao0426@gmail.com> | 2026-05-28 23:10:22 -0500 |
|---|---|---|
| committer | YurenHao0426 <Blackhao0426@gmail.com> | 2026-05-28 23:10:22 -0500 |
| commit | 89ebbd7ba50321e790520522939a941ff5ea96b7 (patch) | |
| tree | 4ed8144ae1de4c3f8c6cf7235350040fc6903aad /scripts/README.md | |
| parent | 2446bb758f6ec7456c1279e6b8ea5ebda9530cc3 (diff) | |
Add synthetic FA trajectory validation
Diffstat (limited to 'scripts/README.md')
| -rw-r--r-- | scripts/README.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/README.md b/scripts/README.md index f24c117..42633d0 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -111,3 +111,25 @@ and: \] Outputs are written under `outputs/functional_capacity_overlap/`. + +## Synthetic MLP FA/BP Trajectories + +Run: + +```bash +python scripts/trajectory_mlp_fa.py --samples 128 --hidden-widths 24 24 --steps 80 --lr 0.02 --eval-every 10 --feedback-runs 3 --data-seed 3 --init-seed 4 --feedback-seed-start 50 --plot +``` + +This trains one BP baseline and several FA runs from the same initial weights on +a synthetic regression task. At each checkpoint, the script records: + +- training loss; +- full-model cosine between the BP gradient and the FA surrogate gradient at the FA weights; +- layerwise \(Q_l=\cos^2(W_{l+1}^{\top},B_l)\). + +Outputs are written under `outputs/trajectory_mlp_fa/`: + +- `summary.csv` +- `trajectories.csv` +- `layer_metrics.csv` +- diagnostic plots when `--plot` is set. |
