summaryrefslogtreecommitdiff
path: root/experiments/c1_innovation_confirm.sh
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 02:31:33 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-22 02:31:33 -0500
commit18c9c1c1d1ec31560c78d41f4ff6957339c1e7c7 (patch)
tree82858acf2e044c499b02ff312074c50ab2a493fc /experiments/c1_innovation_confirm.sh
parent43feef7b72d621e8f249551cd076ba646ea7f60b (diff)
experiments: freeze mixed-traffic innovation confirmation
Diffstat (limited to 'experiments/c1_innovation_confirm.sh')
-rwxr-xr-xexperiments/c1_innovation_confirm.sh83
1 files changed, 83 insertions, 0 deletions
diff --git a/experiments/c1_innovation_confirm.sh b/experiments/c1_innovation_confirm.sh
new file mode 100755
index 0000000..82442e6
--- /dev/null
+++ b/experiments/c1_innovation_confirm.sh
@@ -0,0 +1,83 @@
+#!/usr/bin/env bash
+# Frozen five-seed test confirmation of innovation under endogenous apical traffic.
+# Usage: c1_innovation_confirm.sh <gpu> "<model seeds>"
+set -eu
+
+cd "$(dirname "$0")/.."
+GPU="${1:?GPU index required}"
+SEEDS="${2:-0 1 2 3 4}"
+PYTHON="${PYTHON:-/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3}"
+
+run_one() {
+ model_seed="$1"
+ family="$2"
+ scale="$3"
+ traffic_seed="$4"
+ signal="$5"
+
+ use_residual=1
+ raw_control=none
+ p_neutral=1
+ case "$signal" in
+ raw)
+ use_residual=0
+ ;;
+ matched)
+ use_residual=0
+ raw_control=match_innovation_norm
+ ;;
+ residual)
+ ;;
+ taskfit)
+ p_neutral=0
+ ;;
+ *)
+ echo "unknown signal control: $signal" >&2
+ exit 2
+ ;;
+ esac
+
+ scale_tag="${scale//./p}"
+ tag="c1_confirm_v1_mnist_${family}_rho${scale_tag}_t${traffic_seed}_${signal}_d3_s${model_seed}"
+ out="results/${tag}.json"
+ if [ -s "$out" ]; then
+ echo "[$tag] exists; skipping"
+ return
+ fi
+
+ CUDA_VISIBLE_DEVICES="$GPU" "$PYTHON" experiments/run.py \
+ --mode sdil --dataset mnist --device cuda \
+ --depth 3 --width 256 --residual 1 --act tanh \
+ --epochs 15 --batch_size 128 --eta 0.05 --momentum 0.9 \
+ --eta_A 0.02 --eta_P 0.05 \
+ --pert_sigma 0.01 --pert_every 4 --pert_ndirs 1 \
+ --pert_mode simultaneous \
+ --traffic_mode "$family" --traffic_seed "$traffic_seed" --nuis_rho "$scale" \
+ --use_residual "$use_residual" --raw_scale_control "$raw_control" \
+ --learn_A 1 --learn_P 1 --p_neutral "$p_neutral" \
+ --p_warmup_steps 200 --p_warmup_eta 0.05 \
+ --val_examples 0 --eval_split test --eval_every 0 \
+ --diagnostics alignment --diagnostics_schedule final --probe_bs 512 \
+ --seed "$model_seed" --log_every 100000 --tag "$tag"
+}
+
+for seed in $SEEDS; do
+ # At rho=0, raw, norm-matched raw, and neutral-period innovation should agree.
+ for signal in raw matched residual; do
+ run_one "$seed" none 0 1234 "$signal"
+ done
+
+ # Levels and predictor timescale were selected on the training-only
+ # validation screens. Two independently seeded projections of each traffic
+ # construction are frozen here; no test result changes this matrix.
+ for spec in soma:0.5 topdown:0.2; do
+ IFS=: read -r family scale <<EOF
+$spec
+EOF
+ for traffic_seed in 1234 5678; do
+ for signal in raw matched residual taskfit; do
+ run_one "$seed" "$family" "$scale" "$traffic_seed" "$signal"
+ done
+ done
+ done
+done