summaryrefslogtreecommitdiff
path: root/experiments/c2_nodepert_validation.sh
diff options
context:
space:
mode:
Diffstat (limited to 'experiments/c2_nodepert_validation.sh')
-rwxr-xr-xexperiments/c2_nodepert_validation.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/experiments/c2_nodepert_validation.sh b/experiments/c2_nodepert_validation.sh
new file mode 100755
index 0000000..4a9e523
--- /dev/null
+++ b/experiments/c2_nodepert_validation.sh
@@ -0,0 +1,52 @@
+#!/usr/bin/env bash
+# Frozen C2 causal diagnosis after validation-only task-0 development.
+#
+# Development selection (task seed 0, model seeds 0--2, d4 only):
+# * K1 estimator/LR screen selected layerwise eta=0.03.
+# * At eta=0.03, K4 reached 95.183% and K16 reached 97.017% mean
+# validation accuracy. The predeclared rule selected the smaller K only
+# when it was within one point of the best, so K16 is frozen here.
+#
+# This independent panel uses the same untouched task/data seeds 3--5 and
+# student seeds 0--4 as the earlier context-vectorizer panel. It evaluates
+# validation once after training; the independent synthetic test sets remain
+# untouched. The direct targets are deliberately query-expensive: this is a
+# causal diagnostic and unamortized baseline, not a proposed efficient method.
+# Usage: c2_nodepert_validation.sh <gpu> "<model seeds>"
+set -eu
+
+cd "$(dirname "$0")/.."
+GPU="${1:?GPU index required}"
+MODEL_SEEDS="${2:-0 1 2 3 4}"
+PYTHON="${PYTHON:-/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3}"
+
+for task_seed in 3 4 5; do
+ for model_seed in $MODEL_SEEDS; do
+ for depth in 1 4; do
+ tag="c2_nodepert_val_v1_tent_l2_w8_nodepert_d${depth}_t${task_seed}_s${model_seed}"
+ out="results/${tag}.json"
+ if [ -s "$out" ]; then
+ echo "[$tag] exists; skipping"
+ continue
+ fi
+ lesion=0
+ if [ "$depth" -eq 4 ]; then
+ lesion=0.3333333333333333
+ fi
+ CUDA_VISIBLE_DEVICES="$GPU" "$PYTHON" experiments/run.py \
+ --mode nodepert --dataset tentmap --device cuda \
+ --depth "$depth" --width 8 --act relu --residual 1 \
+ --residual_lesion_fraction "$lesion" \
+ --epochs 80 --batch_size 256 --eta 0.03 --momentum 0.9 \
+ --pert_sigma 0.01 --pert_every 1 --pert_ndirs 16 \
+ --pert_mode layerwise \
+ --traffic_mode none --nuis_rho 0 \
+ --use_residual 0 --learn_A 0 --learn_P 0 --p_neutral 1 \
+ --task_train_examples 10000 --task_test_examples 5000 \
+ --task_levels 2 --task_n_in 1 --task_seed "$task_seed" \
+ --val_examples 2000 --split_seed 2027 --eval_split validation --eval_every 0 \
+ --diagnostics alignment --diagnostics_schedule final --probe_bs 512 \
+ --seed "$model_seed" --log_every 100000 --tag "$tag"
+ done
+ done
+done