From 89ebbd7ba50321e790520522939a941ff5ea96b7 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Thu, 28 May 2026 23:10:22 -0500 Subject: Add synthetic FA trajectory validation --- scripts/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'scripts/README.md') 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. -- cgit v1.2.3