diff --git "a/applied/_index/APPLIED_RUNS_INDEX.json" "b/applied/_index/APPLIED_RUNS_INDEX.json" --- "a/applied/_index/APPLIED_RUNS_INDEX.json" +++ "b/applied/_index/APPLIED_RUNS_INDEX.json" @@ -1,106 +1,245 @@ [ { - "key": "original/baseline_reference", - "tag": "baseline_reference", - "script": "train_ssvep_event_snn.py", - "hf_folder": "applied/original", - "phase": 1, + "key": "opt01_ttfs_dta/dta_rate_0.02", + "tag": "dta_rate_0.02", + "script": "opt01_ttfs_dta.py", + "hf_folder": "applied/opt01_ttfs_dta", + "phase": 3, "status": "ok", - "duration_s": 576.1, - "optimization_summary": null, + "duration_s": 592.4, + "optimization_summary": { + "optimization": "ttfs_dta", + "research_section": "2. Temporal-Dimension Reduction (TTFS coding / DTA-TTFS)", + "reference": "Software-Level Optimizations for Spiking Neural Network Inference on ARM Architectures: A Deep-Dive into the Jetson Nano Ecosystem (research.md SS2)", + "script": "opt01_ttfs_dta.py", + "baseline_mode": false, + "method": "harmonic_matched", + "accuracy": { + "test_acc": 0.22214285714285714, + "test_target_acc": 0.22214285714285714, + "best_val_acc": 0.23857142857142857 + }, + "efficiency": { + "spikes_per_inference": null, + "syn_ops_per_inference": 1370895.7012987013, + "dense_macs_per_inference": 122675200.0, + "event_fraction_of_dense": 0.01117500278213283, + "syn_ops_per_inference_dense_fanout": 46072438.1176948, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 100.0, + "num_ticks": 100, + "membrane_bytes_per_inference": 451200, + "weight_bytes": 4907008, + "input_raster_bytes": null, + "train_ms_per_step": 95.69850345000077, + "infer_ms_per_sample": 0.6107303025000022, + "peak_vram_mb": 2908.478464 + }, + "optimization_specific": { + "ttfs": true, + "dta": true, + "readout": "ttfs", + "ttfs_halt_k": 1, + "dta_target_rate": 0.02, + "dta_momentum": 0.1, + "spikes_per_neuron_per_inference": 0.666733789260385, + "ttfs_budget_respected": true, + "frac_neurons_that_ever_fire": 0.666733789260385, + "mean_first_spike_tick": 22.77649856682363, + "per_layer_ttfs": [ + { + "layer": 0, + "neurons": 320, + "spikes_per_neuron_per_inference": 0.8998928571428572, + "frac_neurons_that_ever_fire": 0.8998928571428572, + "mean_first_spike_tick": 8.32483529785292 + }, + { + "layer": 1, + "neurons": 512, + "spikes_per_neuron_per_inference": 0.5788044084821429, + "frac_neurons_that_ever_fire": 0.5788044084821429, + "mean_first_spike_tick": 32.204212231282256 + }, + { + "layer": 2, + "neurons": 256, + "spikes_per_neuron_per_inference": 0.6099832589285714, + "frac_neurons_that_ever_fire": 0.6099832589285714, + "mean_first_spike_tick": 27.42329085436698 + }, + { + "layer": 3, + "neurons": 40, + "spikes_per_neuron_per_inference": 0.29016071428571427, + "frac_neurons_that_ever_fire": 0.29016071428571427, + "mean_first_spike_tick": 78.09735983752846 + } + ], + "mean_halt_tick": 65.40357142857142, + "effective_ticks": 65.40357142857142, + "ticks_saved_frac": 0.3459642857142857, + "num_ticks": 100, + "dta_thr_min": 10.0, + "dta_thr_max": 10.0, + "dta_thr_mean": 10.0, + "base_thresh": 10.0 + }, + "config": { + "method": "harmonic_matched", + "data_root": "/kaggle/working/data", + "subjects": "", + "blocks": "", + "limit": 0, + "drop_rest": true, + "resplit": "block", + "test_blocks": "6", + "class_weight": false, + "epochs": 60, + "batch_size": 64, + "lr": 0.002, + "weight_decay": 0.0005, + "grad_clip": 5.0, + "num_bins": 100, + "window_sec": 5.0, + "hidden": "512,256", + "freq_groups": 8, + "dropout": 0.3, + "spike_drop": 0.1, + "time_jitter": 2, + "label_smoothing": 0.05, + "no_batchnorm": false, + "binary_input": false, + "beta": 1.0, + "thresh": 10.0, + "window": 0.5, + "gain": 1.0, + "alpha": 0.9, + "readout": "ttfs", + "fake_quant": 0, + "amp": false, + "spike_reg": 0.0, + "event_eval": true, + "decision_margin": 2.0, + "export": false, + "seed": 1234, + "hub_dir": "/kaggle/working/hub/opt01_ttfs_dta/dta_rate_0.02", + "repo_id": "UWU-R-13/SSVEP-SNN", + "push_hf": false, + "keep_epoch_weights": 1, + "no_resume": true, + "selftest": false, + "baseline": false, + "bench": true, + "bench_warmup": 10, + "bench_iters": 50, + "bench_train_steps": 20, + "ttfs": true, + "ttfs_halt_k": 1, + "dta": true, + "dta_target_rate": 0.02, + "dta_readout_rate": 0.95, + "ttfs_logit_scale": 10.0, + "dta_momentum": 0.1, + "dta_min": 0.2, + "dta_max": 5.0, + "dta_windup_patience": 200, + "sampling_rate": 250.0 + } + }, "zip": { - "name": "baseline_reference.zip", - "files": 79, - "bytes": 12229960, - "MB": 12.2, - "sha256": "dbfae2e27e7c61c5d2a5e5d1d0a60eeeb5cac65dca488af8d9e07e91fe8a6bf2" + "name": "dta_rate_0.02.zip", + "files": 80, + "bytes": 12510253, + "MB": 12.5, + "sha256": "1243e55e5fd4e4197a0db50663cc4eaf49e0a10a9ad59a34c29305a28a06856f" } }, { - "key": "opt01_ttfs_dta/control_baseline", - "tag": "control_baseline", + "key": "opt01_ttfs_dta/dta_rate_0.10", + "tag": "dta_rate_0.10", "script": "opt01_ttfs_dta.py", "hf_folder": "applied/opt01_ttfs_dta", - "phase": 1, + "phase": 3, "status": "ok", - "duration_s": 324.9, + "duration_s": 314.3, "optimization_summary": { "optimization": "ttfs_dta", "research_section": "2. Temporal-Dimension Reduction (TTFS coding / DTA-TTFS)", "reference": "Software-Level Optimizations for Spiking Neural Network Inference on ARM Architectures: A Deep-Dive into the Jetson Nano Ecosystem (research.md SS2)", "script": "opt01_ttfs_dta.py", - "baseline_mode": true, + "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9435714285714286, - "test_target_acc": 0.9435714285714286, - "best_val_acc": 0.9485714285714286 + "test_acc": 0.1392857142857143, + "test_target_acc": 0.1392857142857143, + "best_val_acc": 0.17 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3231983.9886363638, + "syn_ops_per_inference": 1411658.4545454546, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026345862803862263, - "syn_ops_per_inference_dense_fanout": 64808601.77516234, + "event_fraction_of_dense": 0.011507284720509561, + "syn_ops_per_inference_dense_fanout": 47245923.233766235, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.076428571428572, + "effective_ticks": 100.0, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 95.4652436500055, - "infer_ms_per_sample": 0.632198698124995, - "peak_vram_mb": 2914.106368 + "train_ms_per_step": 95.29285290000189, + "infer_ms_per_sample": 0.6113808478124838, + "peak_vram_mb": 2909.302784 }, "optimization_specific": { - "ttfs": false, - "dta": false, - "readout": "spikecount", + "ttfs": true, + "dta": true, + "readout": "ttfs", "ttfs_halt_k": 1, - "dta_target_rate": null, - "dta_momentum": null, - "spikes_per_neuron_per_inference": 6.773503672745694, - "ttfs_budget_respected": false, - "frac_neurons_that_ever_fire": 0.7111518490374873, - "mean_first_spike_tick": 13.85866447739239, + "dta_target_rate": 0.1, + "dta_momentum": 0.1, + "spikes_per_neuron_per_inference": 0.6239190729483283, + "ttfs_budget_respected": true, + "frac_neurons_that_ever_fire": 0.6239190729483283, + "mean_first_spike_tick": 19.628332891840294, "per_layer_ttfs": [ { "layer": 0, "neurons": 320, - "spikes_per_neuron_per_inference": 6.179979910714286, - "frac_neurons_that_ever_fire": 0.7382388392857143, - "mean_first_spike_tick": 13.402922616869903 + "spikes_per_neuron_per_inference": 0.8614040178571428, + "frac_neurons_that_ever_fire": 0.8614040178571428, + "mean_first_spike_tick": 9.993713543866559 }, { "layer": 1, "neurons": 512, - "spikes_per_neuron_per_inference": 3.8403431919642856, - "frac_neurons_that_ever_fire": 0.5913783482142857, - "mean_first_spike_tick": 19.06668789808917 + "spikes_per_neuron_per_inference": 0.7464453125, + "frac_neurons_that_ever_fire": 0.7464453125, + "mean_first_spike_tick": 22.917884616822292 }, { "layer": 2, "neurons": 256, - "spikes_per_neuron_per_inference": 13.378063616071428, - "frac_neurons_that_ever_fire": 0.8717215401785714, - "mean_first_spike_tick": 9.758566055853406 + "spikes_per_neuron_per_inference": 0.10224888392857143, + "frac_neurons_that_ever_fire": 0.10224888392857143, + "mean_first_spike_tick": 31.868034710473175 }, { "layer": 3, "neurons": 40, - "spikes_per_neuron_per_inference": 6.796964285714286, - "frac_neurons_that_ever_fire": 0.9999107142857143, - "mean_first_spike_tick": 0.0006429145459416019 + "spikes_per_neuron_per_inference": 0.49439285714285713, + "frac_neurons_that_ever_fire": 0.49439285714285713, + "mean_first_spike_tick": 74.14935346384455 } ], - "mean_halt_tick": 100.0, - "effective_ticks": 100.0, - "ticks_saved_frac": 0.0, + "mean_halt_tick": 68.85428571428571, + "effective_ticks": 68.85428571428571, + "ticks_saved_frac": 0.3114571428571429, "num_ticks": 100, - "dta_thr_min": 1.0, - "dta_thr_max": 1.0, - "dta_thr_mean": 1.0, - "base_thresh": 1.0 + "dta_thr_min": 10.0, + "dta_thr_max": 31.87553596496582, + "dta_thr_mean": 15.468883514404297, + "base_thresh": 10.0 }, "config": { "method": "harmonic_matched", @@ -128,7 +267,7 @@ "no_batchnorm": false, "binary_input": false, "beta": 1.0, - "thresh": 1.0, + "thresh": 10.0, "window": 0.5, "gain": 1.0, "alpha": 0.9, @@ -140,13 +279,13 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt01_ttfs_dta/control_baseline", + "hub_dir": "/kaggle/working/hub/opt01_ttfs_dta/dta_rate_0.10", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "baseline": true, + "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, @@ -154,7 +293,7 @@ "ttfs": true, "ttfs_halt_k": 1, "dta": true, - "dta_target_rate": 0.05, + "dta_target_rate": 0.1, "dta_readout_rate": 0.95, "ttfs_logit_scale": 10.0, "dta_momentum": 0.1, @@ -165,21 +304,21 @@ } }, "zip": { - "name": "control_baseline.zip", - "files": 80, - "bytes": 12262646, - "MB": 12.3, - "sha256": "c4997d83edc40f945e2bde2e023fbe4d8722960cb38b6b4896a15611c735e03a" + "name": "dta_rate_0.10.zip", + "files": 77, + "bytes": 8117390, + "MB": 8.1, + "sha256": "149684ff3bdd640115b26d39a54bdaa9ae99619a8672a7ea6fcd59fc99345a27" } }, { - "key": "opt01_ttfs_dta/default", - "tag": "default", + "key": "opt01_ttfs_dta/dta_rate_0.20", + "tag": "dta_rate_0.20", "script": "opt01_ttfs_dta.py", "hf_folder": "applied/opt01_ttfs_dta", - "phase": 1, + "phase": 3, "status": "ok", - "duration_s": 306.3, + "duration_s": 315.0, "optimization_summary": { "optimization": "ttfs_dta", "research_section": "2. Temporal-Dimension Reduction (TTFS coding / DTA-TTFS)", @@ -188,74 +327,74 @@ "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.10785714285714286, - "test_target_acc": 0.10785714285714286, - "best_val_acc": 0.12642857142857142 + "test_acc": 0.30142857142857143, + "test_target_acc": 0.30142857142857143, + "best_val_acc": 0.3442857142857143 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 883000.9488636364, + "syn_ops_per_inference": 1268561.1761363635, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.007197876578669824, - "syn_ops_per_inference_dense_fanout": 28456441.155032467, + "event_fraction_of_dense": 0.010340811966366173, + "syn_ops_per_inference_dense_fanout": 40907301.49837662, "weight_sparsity": 0.7324707846410685, "effective_ticks": 100.0, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 92.62014005000765, - "infer_ms_per_sample": 0.5975575340625028, - "peak_vram_mb": 2909.198336 + "train_ms_per_step": 95.75917180000033, + "infer_ms_per_sample": 0.6131969368749424, + "peak_vram_mb": 2909.376512 }, "optimization_specific": { "ttfs": true, "dta": true, "readout": "ttfs", "ttfs_halt_k": 1, - "dta_target_rate": 0.05, + "dta_target_rate": 0.2, "dta_momentum": 0.1, - "spikes_per_neuron_per_inference": 0.6025234295845998, + "spikes_per_neuron_per_inference": 0.6888367527862209, "ttfs_budget_respected": true, - "frac_neurons_that_ever_fire": 0.6025234295845998, - "mean_first_spike_tick": 24.776728445988198, + "frac_neurons_that_ever_fire": 0.6888367527862209, + "mean_first_spike_tick": 17.83636679533485, "per_layer_ttfs": [ { "layer": 0, "neurons": 320, - "spikes_per_neuron_per_inference": 0.8747723214285714, - "frac_neurons_that_ever_fire": 0.8747723214285714, - "mean_first_spike_tick": 8.497346248258475 + "spikes_per_neuron_per_inference": 0.9109776785714285, + "frac_neurons_that_ever_fire": 0.9109776785714285, + "mean_first_spike_tick": 7.660495248923105 }, { "layer": 1, "neurons": 512, - "spikes_per_neuron_per_inference": 0.47708565848214285, - "frac_neurons_that_ever_fire": 0.47708565848214285, - "mean_first_spike_tick": 31.723123035309598 + "spikes_per_neuron_per_inference": 0.8185337611607143, + "frac_neurons_that_ever_fire": 0.8185337611607143, + "mean_first_spike_tick": 22.096457454514464 }, { "layer": 2, "neurons": 256, - "spikes_per_neuron_per_inference": 0.45130301339285717, - "frac_neurons_that_ever_fire": 0.45130301339285717, - "mean_first_spike_tick": 42.55322200720879 + "spikes_per_neuron_per_inference": 0.19032366071428572, + "frac_neurons_that_ever_fire": 0.19032366071428572, + "mean_first_spike_tick": 19.373438691139388 }, { "layer": 3, "neurons": 40, - "spikes_per_neuron_per_inference": 0.9979464285714286, - "frac_neurons_that_ever_fire": 0.9979464285714286, - "mean_first_spike_tick": 44.9801735707256 + "spikes_per_neuron_per_inference": 0.44207142857142856, + "frac_neurons_that_ever_fire": 0.44207142857142856, + "mean_first_spike_tick": 80.39121829051543 } ], - "mean_halt_tick": 26.95642857142857, - "effective_ticks": 26.95642857142857, - "ticks_saved_frac": 0.7304357142857143, + "mean_halt_tick": 54.479285714285716, + "effective_ticks": 54.479285714285716, + "ticks_saved_frac": 0.4552071428571428, "num_ticks": 100, "dta_thr_min": 10.0, - "dta_thr_max": 10.0, - "dta_thr_mean": 10.0, + "dta_thr_max": 36.44102096557617, + "dta_thr_mean": 16.610254287719727, "base_thresh": 10.0 }, "config": { @@ -296,7 +435,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt01_ttfs_dta/default", + "hub_dir": "/kaggle/working/hub/opt01_ttfs_dta/dta_rate_0.20", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -310,7 +449,7 @@ "ttfs": true, "ttfs_halt_k": 1, "dta": true, - "dta_target_rate": 0.05, + "dta_target_rate": 0.2, "dta_readout_rate": 0.95, "ttfs_logit_scale": 10.0, "dta_momentum": 0.1, @@ -321,75 +460,98 @@ } }, "zip": { - "name": "default.zip", + "name": "dta_rate_0.20.zip", "files": 80, - "bytes": 12567506, - "MB": 12.6, - "sha256": "fb707a74ab8ec231a6758240a7f7a2c3ea3f3546dffe53f2c0f20ce254a090c9" + "bytes": 12365506, + "MB": 12.4, + "sha256": "0ff95b27869b51aaa9e93834f86b2558421ee7616d9cb9562165f0e64df9f734" } }, { - "key": "opt02_seenn_bayes/control_baseline", - "tag": "control_baseline", - "script": "opt02_seenn_bayes.py", - "hf_folder": "applied/opt02_seenn_bayes", - "phase": 1, + "key": "opt01_ttfs_dta/ttfs_halt_k2", + "tag": "ttfs_halt_k2", + "script": "opt01_ttfs_dta.py", + "hf_folder": "applied/opt01_ttfs_dta", + "phase": 3, "status": "ok", - "duration_s": 320.9, + "duration_s": 313.4, "optimization_summary": { - "optimization": "seenn_early_exit_bayesian_fusion", - "research_section": "2. Temporal-dimension reduction", - "reference": "SEENN: Towards Temporal Spiking Early-Exit Neural Networks, arXiv:2304.01230 (NeurIPS 2023); BayesianSpikeFusion, Front. Neurosci. 2024 (PMC11330889)", - "script": "opt02_seenn_bayes.py", - "baseline_mode": true, + "optimization": "ttfs_dta", + "research_section": "2. Temporal-Dimension Reduction (TTFS coding / DTA-TTFS)", + "reference": "Software-Level Optimizations for Spiking Neural Network Inference on ARM Architectures: A Deep-Dive into the Jetson Nano Ecosystem (research.md SS2)", + "script": "opt01_ttfs_dta.py", + "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9421428571428572, - "test_target_acc": 0.9421428571428572, - "best_val_acc": 0.9464285714285714 + "test_acc": 0.19142857142857142, + "test_target_acc": 0.19142857142857142, + "best_val_acc": 0.19071428571428573 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3244711.4707792206, + "syn_ops_per_inference": 1146300.0625, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026449612234414294, - "syn_ops_per_inference_dense_fanout": 64821329.2573052, + "event_fraction_of_dense": 0.009344187435602306, + "syn_ops_per_inference_dense_fanout": 38370359.65827922, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.099285714285715, + "effective_ticks": 100.0, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 91.90045595169067, - "infer_ms_per_sample": 0.6131382294036635, - "peak_vram_mb": 10744.00512 + "train_ms_per_step": 95.0974763999966, + "infer_ms_per_sample": 0.608219999062527, + "peak_vram_mb": 2909.190656 }, "optimization_specific": { - "seenn_enabled": false, - "bayes_fusion_enabled": false, - "conf_threshold": 0.9, - "conf_temp": 2.0, - "anytime_fracs": "1.0", - "anytime_weights": "1.0", - "ic_loss_weight": 0.0, - "ic_layer": 0, - "mean_exit_tick": null, - "mean_exit_ms": null, - "ticks_saved_frac": null, - "exit_tick_histogram": null, - "acc_fc_only": 0.9421428571428572, - "acc_ic_only": null, - "acc_fused": 0.9421428571428572, - "acc_early_exit": null, - "syn_ops_saved_frac": null, - "syn_per_inference_early_exit": null, - "anytime_acc": { - "0.25": 0.6221428571428571, - "0.5": 0.8442857142857143, - "0.75": 0.9164285714285715, - "1.0": 0.9421428571428572 - }, - "pareto": null + "ttfs": true, + "dta": true, + "readout": "ttfs", + "ttfs_halt_k": 2, + "dta_target_rate": 0.05, + "dta_momentum": 0.1, + "spikes_per_neuron_per_inference": 0.5998423252279635, + "ttfs_budget_respected": true, + "frac_neurons_that_ever_fire": 0.5998423252279635, + "mean_first_spike_tick": 22.474675145760823, + "per_layer_ttfs": [ + { + "layer": 0, + "neurons": 320, + "spikes_per_neuron_per_inference": 0.8544263392857143, + "frac_neurons_that_ever_fire": 0.8544263392857143, + "mean_first_spike_tick": 8.993144941128525 + }, + { + "layer": 1, + "neurons": 512, + "spikes_per_neuron_per_inference": 0.4505161830357143, + "frac_neurons_that_ever_fire": 0.4505161830357143, + "mean_first_spike_tick": 27.44062180658347 + }, + { + "layer": 2, + "neurons": 256, + "spikes_per_neuron_per_inference": 0.52904296875, + "frac_neurons_that_ever_fire": 0.52904296875, + "mean_first_spike_tick": 29.398224767811655 + }, + { + "layer": 3, + "neurons": 40, + "spikes_per_neuron_per_inference": 0.9276607142857143, + "frac_neurons_that_ever_fire": 0.9276607142857143, + "mean_first_spike_tick": 65.67242872817572 + } + ], + "mean_halt_tick": 47.255714285714284, + "effective_ticks": 47.255714285714284, + "ticks_saved_frac": 0.5274428571428571, + "num_ticks": 100, + "dta_thr_min": 10.0, + "dta_thr_max": 10.0, + "dta_thr_mean": 10.0, + "base_thresh": 10.0 }, "config": { "method": "harmonic_matched", @@ -417,11 +579,11 @@ "no_batchnorm": false, "binary_input": false, "beta": 1.0, - "thresh": 1.0, + "thresh": 10.0, "window": 0.5, "gain": 1.0, "alpha": 0.9, - "readout": "spikecount", + "readout": "ttfs", "fake_quant": 0, "amp": false, "spike_reg": 0.0, @@ -429,45 +591,46 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "baseline": true, - "bench": true, - "bench_warmup": 10, - "bench_iters": 50, - "bench_train_steps": 20, - "anytime_fracs": "0.25,0.5,1.0", - "anytime_weights": "0.3,0.3,1.0", - "ic_layer": 0, - "ic_loss_weight": 0.3, - "bayes_fusion": false, - "fusion_prior_weight": 1.0, - "conf_threshold": 0.9, - "conf_temp": 2.0, - "conf_sweep": "0.5,0.7,0.8,0.9,0.95,0.99", - "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/control_baseline", + "hub_dir": "/kaggle/working/hub/opt01_ttfs_dta/ttfs_halt_k2", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, + "baseline": false, + "bench": true, + "bench_warmup": 10, + "bench_iters": 50, + "bench_train_steps": 20, + "ttfs": true, + "ttfs_halt_k": 2, + "dta": true, + "dta_target_rate": 0.05, + "dta_readout_rate": 0.95, + "ttfs_logit_scale": 10.0, + "dta_momentum": 0.1, + "dta_min": 0.2, + "dta_max": 5.0, + "dta_windup_patience": 200, "sampling_rate": 250.0 } }, "zip": { - "name": "control_baseline.zip", + "name": "ttfs_halt_k2.zip", "files": 80, - "bytes": 12251539, - "MB": 12.3, - "sha256": "7e217471fe06675f01d799cc760f6565432d57e42b13f0c8e1d11077507709cf" + "bytes": 12550233, + "MB": 12.6, + "sha256": "a2405580d698ac72ad152755bc18092b397e88e06d8b67b05ce9fe8a7ae6d838" } }, { - "key": "opt02_seenn_bayes/default", - "tag": "default", + "key": "opt02_seenn_bayes/conf_0.5", + "tag": "conf_0.5", "script": "opt02_seenn_bayes.py", "hf_folder": "applied/opt02_seenn_bayes", - "phase": 1, + "phase": 3, "status": "ok", - "duration_s": 586.1, + "duration_s": 597.8, "optimization_summary": { "optimization": "seenn_early_exit_bayesian_fusion", "research_section": "2. Temporal-dimension reduction", @@ -476,46 +639,46 @@ "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9278571428571428, - "test_target_acc": 0.9278571428571428, - "best_val_acc": 0.9307142857142857 + "test_acc": 0.9257142857142857, + "test_target_acc": 0.9257142857142857, + "best_val_acc": 0.9278571428571428 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3638362.4326298703, + "syn_ops_per_inference": 3667001.4423701297, "dense_macs_per_inference": 123955200.0, - "event_fraction_of_dense": 0.029352237200455246, - "syn_ops_per_inference_dense_fanout": 65214980.21915584, + "event_fraction_of_dense": 0.029583280430108053, + "syn_ops_per_inference_dense_fanout": 65243619.22889611, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 7.985, + "effective_ticks": 4.38, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 174.30670261383057, - "infer_ms_per_sample": 0.6237456846476799, - "peak_vram_mb": 10914.396672, - "syn_ops_per_inference_early_exit": 1846599.2897727273 + "train_ms_per_step": 179.7092080116272, + "infer_ms_per_sample": 0.6336252293994079, + "peak_vram_mb": 10914.760704, + "syn_ops_per_inference_early_exit": 1701440.4342532465 }, "optimization_specific": { "seenn_enabled": true, "bayes_fusion_enabled": true, - "conf_threshold": 0.9, + "conf_threshold": 0.5, "conf_temp": 2.0, "anytime_fracs": "0.25,0.5,1.0", "anytime_weights": "0.3,0.3,1.0", "ic_loss_weight": 0.3, "ic_layer": 0, - "mean_exit_tick": 7.985, - "mean_exit_ms": 399.25000000000006, - "ticks_saved_frac": 0.92015, + "mean_exit_tick": 4.38, + "mean_exit_ms": 219.0, + "ticks_saved_frac": 0.9562, "exit_tick_histogram": { "counts": [ - 1040, - 316, - 39, + 1371, + 25, 4, - 1, + 0, + 0, 0, 0, 0, @@ -536,54 +699,54 @@ 100.0 ] }, - "acc_fc_only": 0.9278571428571428, + "acc_fc_only": 0.9257142857142857, "acc_ic_only": 0.935, - "acc_fused": 0.9378571428571428, - "acc_early_exit": 0.3578571428571429, - "syn_ops_saved_frac": 0.49246417200994075, - "syn_per_inference_early_exit": 1846599.2897727273, + "acc_fused": 0.9342857142857143, + "acc_early_exit": 0.2257142857142857, + "syn_ops_saved_frac": 0.5360131538007966, + "syn_per_inference_early_exit": 1701440.4342532465, "anytime_acc": { - "0.25": 0.6228571428571429, - "0.5": 0.8078571428571428, - "0.75": 0.8885714285714286, - "1.0": 0.9278571428571428 + "0.25": 0.6078571428571429, + "0.5": 0.8221428571428572, + "0.75": 0.8957142857142857, + "1.0": 0.9257142857142857 }, "pareto": [ { "conf": 0.5, - "mean_ticks": 4.405, - "acc": 0.22785714285714287, - "syn_ops": 1715995.05762987 + "mean_ticks": 4.38, + "acc": 0.2257142857142857, + "syn_ops": 1701440.4301948054 }, { "conf": 0.7, - "mean_ticks": 5.097857142857142, - "acc": 0.25285714285714284, - "syn_ops": 1744549.8368506492 + "mean_ticks": 5.145714285714286, + "acc": 0.25642857142857145, + "syn_ops": 1733398.2719155846 }, { "conf": 0.8, - "mean_ticks": 5.984285714285714, - "acc": 0.28285714285714286, - "syn_ops": 1779479.5024350649 + "mean_ticks": 6.0442857142857145, + "acc": 0.295, + "syn_ops": 1770153.554383117 }, { "conf": 0.9, - "mean_ticks": 7.984285714285714, - "acc": 0.3578571428571429, - "syn_ops": 1846555.8522727273 + "mean_ticks": 8.140714285714285, + "acc": 0.3757142857142857, + "syn_ops": 1843691.239448052 }, { "conf": 0.95, - "mean_ticks": 10.01142857142857, - "acc": 0.42857142857142855, - "syn_ops": 1902723.0324675327 + "mean_ticks": 10.122857142857143, + "acc": 0.44357142857142856, + "syn_ops": 1899936.8051948054 }, { "conf": 0.99, - "mean_ticks": 14.458571428571428, - "acc": 0.5621428571428572, - "syn_ops": 2004484.2800324673 + "mean_ticks": 14.419285714285714, + "acc": 0.5728571428571428, + "syn_ops": 2001693.648538961 } ] }, @@ -636,10 +799,10 @@ "ic_loss_weight": 0.3, "bayes_fusion": true, "fusion_prior_weight": 1.0, - "conf_threshold": 0.9, + "conf_threshold": 0.5, "conf_temp": 2.0, "conf_sweep": "0.5,0.7,0.8,0.9,0.95,0.99", - "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/default", + "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/conf_0.5", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -649,71 +812,140 @@ } }, "zip": { - "name": "default.zip", + "name": "conf_0.5.zip", "files": 81, - "bytes": 12636571, + "bytes": 12639386, "MB": 12.6, - "sha256": "1c64c6704af63b5eec37b2f1d2e824ba1c5c3c28328c5b1c03089bd12b4cc747" + "sha256": "162ddbf03a10a75e5294c6ce6b8d399325b51f498ed3c54f52d6f80ee3ea4097" } }, { - "key": "opt03_ftbc_threshold_balance/control_baseline", - "tag": "control_baseline", - "script": "opt03_ftbc_threshold_balance.py", - "hf_folder": "applied/opt03_ftbc_threshold_balance", - "phase": 1, + "key": "opt02_seenn_bayes/conf_0.7", + "tag": "conf_0.7", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 3, "status": "ok", - "duration_s": 321.7, + "duration_s": 596.1, "optimization_summary": { - "optimization": "ftbc_threshold_balance", - "research_section": "2. Temporal-Dimension Reduction (threshold balancing + FTBC)", - "reference": "Rueckauer et al. arXiv:1612.04052; Sengupta et al. arXiv:1802.02627; FTBC: Forward Temporal Bias Correction, ECCV 2024", - "script": "opt03_ftbc_threshold_balance.py", - "baseline_mode": true, + "optimization": "seenn_early_exit_bayesian_fusion", + "research_section": "2. Temporal-dimension reduction", + "reference": "SEENN: Towards Temporal Spiking Early-Exit Neural Networks, arXiv:2304.01230 (NeurIPS 2023); BayesianSpikeFusion, Front. Neurosci. 2024 (PMC11330889)", + "script": "opt02_seenn_bayes.py", + "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9421428571428572, - "test_target_acc": 0.9421428571428572, - "best_val_acc": 0.945 + "test_acc": 0.9235714285714286, + "test_target_acc": 0.9235714285714286, + "best_val_acc": 0.9307142857142857 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3271536.9975649347, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026668283382174512, - "syn_ops_per_inference_dense_fanout": 64848154.78409091, + "syn_ops_per_inference": 3646728.713474026, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.02941973159233357, + "syn_ops_per_inference_dense_fanout": 65223346.5, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.079285714285714, + "effective_ticks": 5.101428571428571, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 94.71398885000326, - "infer_ms_per_sample": 0.6264105418749466, - "peak_vram_mb": 2828.282368 + "train_ms_per_step": 179.2108416557312, + "infer_ms_per_sample": 0.6331442738298195, + "peak_vram_mb": 10914.71616, + "syn_ops_per_inference_early_exit": 1786668.6314935065 }, "optimization_specific": { - "calibrate_thresh": false, - "ftbc": false, - "calib_percentile": 99.9, - "calib_batches": 8, - "ftbc_target_ticks": 8, - "ftbc_ref_ticks": 100, - "trained_T": 100, - "thresh_before": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "thresh_after": null, - "min_ticks_within_1pct_of_full": null, - "min_ticks_within_1pct_per_arm": null, - "speedup_at_min_ticks": null, - "full_T_acc": null, - "t_sweep_rows": null, - "calibration_reference": "same network at full T (NOT a source ANN)" - }, + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.7, + "conf_temp": 2.0, + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_loss_weight": 0.3, + "ic_layer": 0, + "mean_exit_tick": 5.101428571428571, + "mean_exit_ms": 255.07142857142856, + "ticks_saved_frac": 0.9489857142857143, + "exit_tick_histogram": { + "counts": [ + 1307, + 85, + 5, + 2, + 1, + 0, + 0, + 0, + 0, + 0 + ], + "edges": [ + 0.0, + 10.0, + 20.0, + 30.0, + 40.0, + 50.0, + 60.0, + 70.0, + 80.0, + 90.0, + 100.0 + ] + }, + "acc_fc_only": 0.9235714285714286, + "acc_ic_only": 0.9385714285714286, + "acc_fused": 0.9328571428571428, + "acc_early_exit": 0.27071428571428574, + "syn_ops_saved_frac": 0.5100626419256037, + "syn_per_inference_early_exit": 1786668.6314935065, + "anytime_acc": { + "0.25": 0.6235714285714286, + "0.5": 0.8142857142857143, + "0.75": 0.8857142857142857, + "1.0": 0.9235714285714286 + }, + "pareto": [ + { + "conf": 0.5, + "mean_ticks": 4.373571428571428, + "acc": 0.245, + "syn_ops": 1757887.0267857143 + }, + { + "conf": 0.7, + "mean_ticks": 5.101428571428571, + "acc": 0.27071428571428574, + "syn_ops": 1786668.6030844154 + }, + { + "conf": 0.8, + "mean_ticks": 6.018571428571429, + "acc": 0.3078571428571429, + "syn_ops": 1823311.8506493508 + }, + { + "conf": 0.9, + "mean_ticks": 8.03357142857143, + "acc": 0.38357142857142856, + "syn_ops": 1892237.018668831 + }, + { + "conf": 0.95, + "mean_ticks": 10.159285714285714, + "acc": 0.45785714285714285, + "syn_ops": 1951178.429383117 + }, + { + "conf": 0.99, + "mean_ticks": 14.51, + "acc": 0.575, + "syn_ops": 2049664.4594155846 + } + ] + }, "config": { "method": "harmonic_matched", "data_root": "/kaggle/working/data", @@ -752,296 +984,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/control_baseline", + "baseline": false, + "bench": true, + "bench_warmup": 10, + "bench_iters": 50, + "bench_train_steps": 20, + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_layer": 0, + "ic_loss_weight": 0.3, + "bayes_fusion": true, + "fusion_prior_weight": 1.0, + "conf_threshold": 0.7, + "conf_temp": 2.0, + "conf_sweep": "0.5,0.7,0.8,0.9,0.95,0.99", + "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/conf_0.7", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "baseline": true, - "bench": true, - "bench_warmup": 10, - "bench_iters": 50, - "bench_train_steps": 20, - "calibrate_thresh": true, - "calib_percentile": 99.9, - "calib_batches": 8, - "ftbc": true, - "ftbc_target_ticks": 8, - "ftbc_ref_ticks": 0, - "ftbc_lr": 1.0, - "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "control_baseline.zip", - "files": 80, - "bytes": 12244248, - "MB": 12.2, - "sha256": "c24f218a83b9e351cc6d43ef1b51d7b3f9e3bfa86c64ae22f40bc90ce4f087a4" + "name": "conf_0.7.zip", + "files": 81, + "bytes": 12639521, + "MB": 12.6, + "sha256": "06560b9ecd3e68cfa941be25d487165bfc2c44307143706a744998bafbbdbdd6" } }, { - "key": "opt03_ftbc_threshold_balance/default", - "tag": "default", - "script": "opt03_ftbc_threshold_balance.py", - "hf_folder": "applied/opt03_ftbc_threshold_balance", - "phase": 1, + "key": "opt02_seenn_bayes/conf_0.95", + "tag": "conf_0.95", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 3, "status": "ok", - "duration_s": 372.1, + "duration_s": 595.7, "optimization_summary": { - "optimization": "ftbc_threshold_balance", - "research_section": "2. Temporal-Dimension Reduction (threshold balancing + FTBC)", - "reference": "Rueckauer et al. arXiv:1612.04052; Sengupta et al. arXiv:1802.02627; FTBC: Forward Temporal Bias Correction, ECCV 2024", - "script": "opt03_ftbc_threshold_balance.py", + "optimization": "seenn_early_exit_bayesian_fusion", + "research_section": "2. Temporal-dimension reduction", + "reference": "SEENN: Towards Temporal Spiking Early-Exit Neural Networks, arXiv:2304.01230 (NeurIPS 2023); BayesianSpikeFusion, Front. Neurosci. 2024 (PMC11330889)", + "script": "opt02_seenn_bayes.py", "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9292857142857143, - "test_target_acc": 0.9292857142857143, - "best_val_acc": 0.945 + "test_acc": 0.9242857142857143, + "test_target_acc": 0.9242857142857143, + "best_val_acc": 0.9271428571428572 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3270969.221590909, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026663655095658365, - "syn_ops_per_inference_dense_fanout": 64847587.008116886, + "syn_ops_per_inference": 3638148.597402598, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.02935051209955369, + "syn_ops_per_inference_dense_fanout": 65214766.38392857, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.059285714285714, + "effective_ticks": 10.347142857142858, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 92.7018213500105, - "infer_ms_per_sample": 0.6145065031248009, - "peak_vram_mb": 2825.316864 + "train_ms_per_step": 178.97343635559082, + "infer_ms_per_sample": 0.6334354829548592, + "peak_vram_mb": 10914.694144, + "syn_ops_per_inference_early_exit": 1957780.4618506492 }, "optimization_specific": { - "calibrate_thresh": true, - "ftbc": true, - "calib_percentile": 99.9, - "calib_batches": 8, - "ftbc_target_ticks": 8, - "ftbc_ref_ticks": 100, - "trained_T": 100, - "thresh_before": [ - 1.0, - 1.0, - 1.0, - 1.0 - ], - "thresh_after": [ - 2.353323459625244, - 0.8474444150924683, - 1.1090540885925293, - 2.6859006881713867 - ], - "min_ticks_within_1pct_of_full": null, - "min_ticks_within_1pct_per_arm": { - "raw": 50, - "thresh": 50, - "ftbc": 100, - "both": null + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.95, + "conf_temp": 2.0, + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_loss_weight": 0.3, + "ic_layer": 0, + "mean_exit_tick": 10.347142857142858, + "mean_exit_ms": 517.357142857143, + "ticks_saved_frac": 0.8965285714285715, + "exit_tick_histogram": { + "counts": [ + 775, + 521, + 82, + 15, + 6, + 1, + 0, + 0, + 0, + 0 + ], + "edges": [ + 0.0, + 10.0, + 20.0, + 30.0, + 40.0, + 50.0, + 60.0, + 70.0, + 80.0, + 90.0, + 100.0 + ] }, - "speedup_at_min_ticks": null, - "full_T_acc": 0.9442857142857143, - "t_sweep_rows": [ - { - "T": 4, - "arm": "raw", - "acc": 0.2621428571428571, - "syn_per_inference": 1869022.726461039, - "dense_per_inference": 4907008.0, - "event_fraction_of_dense": 0.38088846124991826 - }, - { - "T": 4, - "arm": "thresh", - "acc": 0.40214285714285714, - "syn_per_inference": 1828094.6006493508, - "dense_per_inference": 4907008.0, - "event_fraction_of_dense": 0.37254771148719357 - }, - { - "T": 4, - "arm": "ftbc", - "acc": 0.18285714285714286, - "syn_per_inference": 1982641.3717532465, - "dense_per_inference": 4907008.0, - "event_fraction_of_dense": 0.4040428244162729 - }, - { - "T": 4, - "arm": "both", - "acc": 0.27714285714285714, - "syn_per_inference": 1953169.6939935065, - "dense_per_inference": 4907008.0, - "event_fraction_of_dense": 0.3980367861624653 - }, - { - "T": 8, - "arm": "raw", - "acc": 0.5942857142857143, - "syn_per_inference": 2050550.6517857143, - "dense_per_inference": 9814016.0, - "event_fraction_of_dense": 0.20894103410731288 - }, - { - "T": 8, - "arm": "thresh", - "acc": 0.7785714285714286, - "syn_per_inference": 1952516.9748376624, - "dense_per_inference": 9814016.0, - "event_fraction_of_dense": 0.19895188420700174 - }, - { - "T": 8, - "arm": "ftbc", - "acc": 0.375, - "syn_per_inference": 2353354.2873376627, - "dense_per_inference": 9814016.0, - "event_fraction_of_dense": 0.2397952364595353 - }, - { - "T": 8, - "arm": "both", - "acc": 0.53, - "syn_per_inference": 2284980.627435065, - "dense_per_inference": 9814016.0, - "event_fraction_of_dense": 0.23282829653375997 - }, - { - "T": 16, - "arm": "raw", - "acc": 0.8028571428571428, - "syn_per_inference": 2341053.414772727, - "dense_per_inference": 19628032.0, - "event_fraction_of_dense": 0.11927091899853878 - }, - { - "T": 16, - "arm": "thresh", - "acc": 0.8985714285714286, - "syn_per_inference": 2125678.341720779, - "dense_per_inference": 19628032.0, - "event_fraction_of_dense": 0.10829808825055813 - }, - { - "T": 16, - "arm": "ftbc", - "acc": 0.645, - "syn_per_inference": 2743122.541396104, - "dense_per_inference": 19628032.0, - "event_fraction_of_dense": 0.13975535302755282 - }, - { - "T": 16, - "arm": "both", - "acc": 0.7207142857142858, - "syn_per_inference": 2544346.234577922, - "dense_per_inference": 19628032.0, - "event_fraction_of_dense": 0.12962818863235612 - }, - { - "T": 25, - "arm": "raw", - "acc": 0.8764285714285714, - "syn_per_inference": 2563596.2670454546, - "dense_per_inference": 30668800.0, - "event_fraction_of_dense": 0.08358971551040323 - }, - { - "T": 25, - "arm": "thresh", - "acc": 0.9285714285714286, - "syn_per_inference": 2243644.229707792, - "dense_per_inference": 30668800.0, - "event_fraction_of_dense": 0.07315722264020086 - }, - { - "T": 25, - "arm": "ftbc", - "acc": 0.8257142857142857, - "syn_per_inference": 3023309.375, - "dense_per_inference": 30668800.0, - "event_fraction_of_dense": 0.09857931758008139 - }, + "acc_fc_only": 0.9242857142857143, + "acc_ic_only": 0.9392857142857143, + "acc_fused": 0.9357142857142857, + "acc_early_exit": 0.45357142857142857, + "syn_ops_saved_frac": 0.4618745195706472, + "syn_per_inference_early_exit": 1957780.4618506492, + "anytime_acc": { + "0.25": 0.6142857142857143, + "0.5": 0.8142857142857143, + "0.75": 0.8892857142857142, + "1.0": 0.9242857142857143 + }, + "pareto": [ { - "T": 25, - "arm": "both", - "acc": 0.81, - "syn_per_inference": 2707661.5560064935, - "dense_per_inference": 30668800.0, - "event_fraction_of_dense": 0.08828716989274095 + "conf": 0.5, + "mean_ticks": 4.299285714285714, + "acc": 0.2342857142857143, + "syn_ops": 1760335.4797077922 }, { - "T": 50, - "arm": "raw", - "acc": 0.935, - "syn_per_inference": 2919362.8060064935, - "dense_per_inference": 61337600.0, - "event_fraction_of_dense": 0.047594995663451024 + "conf": 0.7, + "mean_ticks": 5.031428571428571, + "acc": 0.25642857142857145, + "syn_ops": 1790720.1217532465 }, { - "T": 50, - "arm": "thresh", - "acc": 0.9371428571428572, - "syn_per_inference": 2426220.323051948, - "dense_per_inference": 61337600.0, - "event_fraction_of_dense": 0.039555188384481105 + "conf": 0.8, + "mean_ticks": 6.082857142857143, + "acc": 0.3028571428571429, + "syn_ops": 1831832.4009740262 }, { - "T": 50, - "arm": "ftbc", - "acc": 0.9107142857142857, - "syn_per_inference": 3453336.166396104, - "dense_per_inference": 61337600.0, - "event_fraction_of_dense": 0.05630047746237388 + "conf": 0.9, + "mean_ticks": 8.172142857142857, + "acc": 0.37357142857142855, + "syn_ops": 1899309.7069805192 }, { - "T": 50, - "arm": "both", - "acc": 0.905, - "syn_per_inference": 2956368.487824675, - "dense_per_inference": 61337600.0, - "event_fraction_of_dense": 0.04819830720185784 + "conf": 0.95, + "mean_ticks": 10.347142857142858, + "acc": 0.45357142857142857, + "syn_ops": 1957780.672077922 }, { - "T": 100, - "arm": "raw", - "acc": 0.9442857142857143, - "syn_per_inference": 3270968.9375, - "dense_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026663652779860967 - }, - { - "T": 100, - "arm": "thresh", - "acc": 0.9292857142857143, - "syn_per_inference": 2701710.5844155843, - "dense_per_inference": 122675200.0, - "event_fraction_of_dense": 0.02202328249243192 - }, - { - "T": 100, - "arm": "ftbc", - "acc": 0.9342857142857143, - "syn_per_inference": 3888789.481331169, - "dense_per_inference": 122675200.0, - "event_fraction_of_dense": 0.031699882953776876 - }, - { - "T": 100, - "arm": "both", - "acc": 0.9207142857142857, - "syn_per_inference": 3266400.9139610385, - "dense_per_inference": 122675200.0, - "event_fraction_of_dense": 0.02662641604791383 + "conf": 0.99, + "mean_ticks": 14.625, + "acc": 0.5785714285714286, + "syn_ops": 2047858.3961038962 } - ], - "calibration_reference": "same network at full T (NOT a source ANN)" + ] }, "config": { "method": "harmonic_matched", @@ -1081,231 +1180,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/default", - "repo_id": "UWU-R-13/SSVEP-SNN", - "push_hf": false, - "keep_epoch_weights": 1, - "no_resume": true, - "selftest": false, "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "calibrate_thresh": true, - "calib_percentile": 99.9, - "calib_batches": 8, - "ftbc": true, - "ftbc_target_ticks": 8, - "ftbc_ref_ticks": 0, - "ftbc_lr": 1.0, - "t_sweep": "4,8,16,25,50,100", - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "default.zip", - "files": 81, - "bytes": 12251189, - "MB": 12.3, - "sha256": "a2408411059da5b902543faccd650a7826414bf770223e315a19896579a36f61" - } - }, - { - "key": "opt04_cudagraph_unroll/control_baseline", - "tag": "control_baseline", - "script": "opt04_cudagraph_unroll.py", - "hf_folder": "applied/opt04_cudagraph_unroll", - "phase": 1, - "status": "ok", - "duration_s": 320.6, - "optimization_summary": { - "optimization": "cudagraph_static_unroll", - "research_section": "2. Temporal-dimension reduction / 5. OS & runtime", - "reference": "CUDA Graphs static capture/replay applied to the unrolled T-tick event-driven inference loop", - "script": "opt04_cudagraph_unroll.py", - "baseline_mode": true, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.9385714285714286, - "test_target_acc": 0.9385714285714286, - "best_val_acc": 0.9464285714285714 - }, - "efficiency": { - "spikes_per_inference": null, - "syn_ops_per_inference": 3254834.5267857146, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.02653213140704653, - "syn_ops_per_inference_dense_fanout": 64831452.31331169, - "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.097857142857142, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 92.22967624664307, - "infer_ms_per_sample": 0.6272434443235397, - "peak_vram_mb": 2804.347904 - }, - "optimization_specific": { - "graph_enabled": false - }, - "config": { - "method": "harmonic_matched", - "data_root": "/kaggle/working/data", - "subjects": "", - "blocks": "", - "limit": 0, - "drop_rest": true, - "resplit": "block", - "test_blocks": "6", - "class_weight": false, - "epochs": 60, - "batch_size": 64, - "lr": 0.002, - "weight_decay": 0.0005, - "grad_clip": 5.0, - "num_bins": 100, - "window_sec": 5.0, - "hidden": "512,256", - "freq_groups": 8, - "dropout": 0.3, - "spike_drop": 0.1, - "time_jitter": 2, - "label_smoothing": 0.05, - "no_batchnorm": false, - "binary_input": false, - "beta": 1.0, - "thresh": 1.0, - "window": 0.5, - "gain": 1.0, - "alpha": 0.9, - "readout": "spikecount", - "fake_quant": 0, - "amp": false, - "spike_reg": 0.0, - "event_eval": true, - "decision_margin": 2.0, - "export": false, - "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt04_cudagraph_unroll/control_baseline", + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_layer": 0, + "ic_loss_weight": 0.3, + "bayes_fusion": true, + "fusion_prior_weight": 1.0, + "conf_threshold": 0.95, + "conf_temp": 2.0, + "conf_sweep": "0.5,0.7,0.8,0.9,0.95,0.99", + "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/conf_0.95", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "baseline": true, - "bench": true, - "bench_warmup": 10, - "bench_iters": 50, - "bench_train_steps": 20, - "event_capacity": 0, - "graph_warmup": 3, - "bench_batches": "1,8,32,128", "sampling_rate": 250.0 } }, "zip": { - "name": "control_baseline.zip", - "files": 80, - "bytes": 12254389, - "MB": 12.3, - "sha256": "90228451e4506fa57fd18dda54312748f259653c71dda8725406593029e0c194" + "name": "conf_0.95.zip", + "files": 81, + "bytes": 12639768, + "MB": 12.6, + "sha256": "00cab3b3a3532412c189f9cb233e45acabc4376d5c7de1cbe54d5c25d6f2d53f" } }, { - "key": "opt04_cudagraph_unroll/default", - "tag": "default", - "script": "opt04_cudagraph_unroll.py", - "hf_folder": "applied/opt04_cudagraph_unroll", - "phase": 1, + "key": "opt02_seenn_bayes/conf_0.99", + "tag": "conf_0.99", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 3, "status": "ok", - "duration_s": 501.8, + "duration_s": 597.8, "optimization_summary": { - "optimization": "cudagraph_static_unroll", - "research_section": "2. Temporal-dimension reduction / 5. OS & runtime", - "reference": "CUDA Graphs static capture/replay applied to the unrolled T-tick event-driven inference loop", - "script": "opt04_cudagraph_unroll.py", + "optimization": "seenn_early_exit_bayesian_fusion", + "research_section": "2. Temporal-dimension reduction", + "reference": "SEENN: Towards Temporal Spiking Early-Exit Neural Networks, arXiv:2304.01230 (NeurIPS 2023); BayesianSpikeFusion, Front. Neurosci. 2024 (PMC11330889)", + "script": "opt02_seenn_bayes.py", "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9435714285714286, - "test_target_acc": 0.9435714285714286, - "best_val_acc": 0.95 + "test_acc": 0.9257142857142857, + "test_target_acc": 0.9257142857142857, + "best_val_acc": 0.9285714285714286 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3255047.327922078, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026533866078246277, - "syn_ops_per_inference_dense_fanout": 64831665.11444805, + "syn_ops_per_inference": 3663273.849837662, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.029553208335250658, + "syn_ops_per_inference_dense_fanout": 65239891.63636363, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 11.80642857142857, + "effective_ticks": 14.498571428571429, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 92.52521991729736, - "infer_ms_per_sample": 0.6286457926034927, - "peak_vram_mb": 2803.899904 + "train_ms_per_step": 179.46667671203613, + "infer_ms_per_sample": 0.6342180559982606, + "peak_vram_mb": 10914.656256, + "syn_ops_per_inference_early_exit": 2044428.423701299 }, "optimization_specific": { - "graph_enabled": true, - "event_capacity_scan": { - "cap_scan": 98901, - "batch_size_scan": 64, - "n_batches_scanned": 20, - "density_per_sample": 1545.328125, - "per_layer_caps": [ - 98901, - 7501, - 3379, - 3291 + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.99, + "conf_temp": 2.0, + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_loss_weight": 0.3, + "ic_layer": 0, + "mean_exit_tick": 14.498571428571429, + "mean_exit_ms": 724.9285714285714, + "ticks_saved_frac": 0.8550142857142857, + "exit_tick_histogram": { + "counts": [ + 466, + 636, + 198, + 69, + 24, + 6, + 1, + 0, + 0, + 0 + ], + "edges": [ + 0.0, + 10.0, + 20.0, + 30.0, + 40.0, + 50.0, + 60.0, + 70.0, + 80.0, + 90.0, + 100.0 ] }, - "capacity": 98901, - "overflow_ticks_frac": 0.0, - "graph_vs_eager_pred_agreement": 1.0, - "graph_capture_ms": 233.42132568359375, - "graphed_acc": 0.9435714285714286, - "kernel_launches_eager": 400, - "kernel_launches_graphed": 2, - "launch_reduction_x": 200.0, - "bench_batches": { - "1": { - "ms_per_sample_eager": 157.8002643585205, - "ms_per_sample_graphed": 32.571964263916016, - "throughput_eager_samples_per_s": 6.337124998270032, - "throughput_graphed_samples_per_s": 30.701249451750854, - "speedup_x": 4.844665279623167, - "capacity": 1546 + "acc_fc_only": 0.9257142857142857, + "acc_ic_only": 0.9364285714285714, + "acc_fused": 0.9357142857142857, + "acc_early_exit": 0.5828571428571429, + "syn_ops_saved_frac": 0.4419122054465304, + "syn_per_inference_early_exit": 2044428.423701299, + "anytime_acc": { + "0.25": 0.6142857142857143, + "0.5": 0.8257142857142857, + "0.75": 0.8942857142857142, + "1.0": 0.9257142857142857 + }, + "pareto": [ + { + "conf": 0.5, + "mean_ticks": 4.36, + "acc": 0.24928571428571428, + "syn_ops": 1750927.5121753246 }, - "8": { - "ms_per_sample_eager": 20.341086983680725, - "ms_per_sample_graphed": 12.358421683311462, - "throughput_eager_samples_per_s": 49.161581227310094, - "throughput_graphed_samples_per_s": 80.91648153990228, - "speedup_x": 1.645929189416548, - "capacity": 12363 + { + "conf": 0.7, + "mean_ticks": 5.107857142857143, + "acc": 0.2792857142857143, + "syn_ops": 1781408.5868506492 }, - "32": { - "ms_per_sample_eager": 5.914023816585541, - "ms_per_sample_graphed": 10.751050561666489, - "throughput_eager_samples_per_s": 169.08961326729144, - "throughput_graphed_samples_per_s": 93.01416584957377, - "speedup_x": 0.5500879921142168, - "capacity": 49451 + { + "conf": 0.8, + "mean_ticks": 6.007857142857143, + "acc": 0.3142857142857143, + "syn_ops": 1818025.2240259738 }, - "128": { - "ms_per_sample_eager": 1.9992999359965324, - "ms_per_sample_graphed": 9.524058550596237, - "throughput_eager_samples_per_s": 500.17507728351893, - "throughput_graphed_samples_per_s": 104.99725455146395, - "speedup_x": 0.20992100430455352, - "capacity": 197802 + { + "conf": 0.9, + "mean_ticks": 8.105, + "acc": 0.39571428571428574, + "syn_ops": 1888108.6534090908 + }, + { + "conf": 0.95, + "mean_ticks": 10.308571428571428, + "acc": 0.4735714285714286, + "syn_ops": 1948837.3271103897 + }, + { + "conf": 0.99, + "mean_ticks": 14.498571428571429, + "acc": 0.5828571428571429, + "syn_ops": 2044428.5941558443 } - }, - "speedup_x_at_batch1": 4.844665279623167 + ] }, "config": { "method": "harmonic_matched", @@ -1345,143 +1376,302 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt04_cudagraph_unroll/default", - "repo_id": "UWU-R-13/SSVEP-SNN", - "push_hf": false, - "keep_epoch_weights": 1, - "no_resume": true, - "selftest": false, "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "event_capacity": 0, - "graph_warmup": 3, - "bench_batches": "1,8,32,128", + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_layer": 0, + "ic_loss_weight": 0.3, + "bayes_fusion": true, + "fusion_prior_weight": 1.0, + "conf_threshold": 0.99, + "conf_temp": 2.0, + "conf_sweep": "0.5,0.7,0.8,0.9,0.95,0.99", + "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/conf_0.99", + "repo_id": "UWU-R-13/SSVEP-SNN", + "push_hf": false, + "keep_epoch_weights": 1, + "no_resume": true, + "selftest": false, "sampling_rate": 250.0 } }, "zip": { - "name": "default.zip", + "name": "conf_0.99.zip", "files": 81, - "bytes": 12253126, - "MB": 12.3, - "sha256": "dd13cd46e7240e145c6dd659b20ff6be55136f94e8e39058663d3ccbf1811fac" + "bytes": 12639694, + "MB": 12.6, + "sha256": "2673af6c589e17720b6676d7f3eec3a62019f7a4cad5c0e7a45b974cf0f77f76" } }, { - "key": "opt05_bitpack_popcount/control_baseline", - "tag": "control_baseline", - "script": "opt05_bitpack_popcount.py", - "hf_folder": "applied/opt05_bitpack_popcount", - "phase": 1, + "key": "opt03_ftbc_threshold_balance/calib_p95", + "tag": "calib_p95", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 3, "status": "ok", - "duration_s": 584.8, + "duration_s": 378.3, "optimization_summary": { - "optimization": "bitpack_popcount", - "research_section": "3. Spike-Sparsity & MAC->AC Restructuring", - "reference": "SATA, arXiv:2204.05422; BMXNet/BiFSMNv2 popcount GEMM", - "script": "opt05_bitpack_popcount.py", - "baseline_mode": true, + "optimization": "ftbc_threshold_balance", + "research_section": "2. Temporal-Dimension Reduction (threshold balancing + FTBC)", + "reference": "Rueckauer et al. arXiv:1612.04052; Sengupta et al. arXiv:1802.02627; FTBC: Forward Temporal Bias Correction, ECCV 2024", + "script": "opt03_ftbc_threshold_balance.py", + "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9392857142857143, - "test_target_acc": 0.9392857142857143, - "best_val_acc": 0.945 + "test_acc": 0.9321428571428572, + "test_target_acc": 0.9321428571428572, + "best_val_acc": 0.9428571428571428 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3259960.8547077924, + "syn_ops_per_inference": 3264047.4829545454, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.02657391921682453, - "syn_ops_per_inference_dense_fanout": 64836578.64123377, + "event_fraction_of_dense": 0.026607231803612675, + "syn_ops_per_inference_dense_fanout": 64840665.26948052, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 11.83, + "effective_ticks": 11.949285714285715, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, - "input_raster_bytes": 403200000, - "train_ms_per_step": 94.69575869998152, - "infer_ms_per_sample": 0.6265434059375252, - "peak_vram_mb": 2827.963904 + "input_raster_bytes": null, + "train_ms_per_step": 101.53206159998263, + "infer_ms_per_sample": 0.6751663200000735, + "peak_vram_mb": 2832.422912 }, "optimization_specific": { - "bitpack": false, - "pack_hidden": false, - "popcount_readout": false, - "n_channels": 2880, - "packed_words_per_tick": 90, - "input_raster_bytes_uint8": 403200000, - "input_raster_bytes_packed": null, - "memory_reduction_x": 1.0, - "mults_eliminated_per_inference": null, - "pred_agreement_packed_vs_float": null, - "popcount_counts_exact": null, - "crossover_density": 0.01, - "packed_ever_wins": true, - "packed_vs_scatter_ms": [ - { - "density": 0.01, - "measured_density": 0.00997178815305233, - "scatter_ms": 0.1802825927734375, - "packed_ms": 0.046405792236328125, - "pack_ms": 0.1291036605834961, - "speedup_x": 3.8849157418824496, - "packed_wins": true, - "matches_scatter": true - }, - { - "density": 0.05, - "measured_density": 0.0490993931889534, - "scatter_ms": 0.2356719970703125, - "packed_ms": 0.06339550018310547, - "pack_ms": 0.13286590576171875, - "speedup_x": 3.7174877773599095, - "packed_wins": true, - "matches_scatter": true - }, - { - "density": 0.1, - "measured_density": 0.10040690004825592, - "scatter_ms": 0.42845726013183594, - "packed_ms": 0.08290290832519531, - "pack_ms": 0.12605667114257812, - "speedup_x": 5.168181295295065, - "packed_wins": true, - "matches_scatter": true - }, - { - "density": 0.25, - "measured_density": 0.24960395693778992, - "scatter_ms": 1.0294532775878906, - "packed_ms": 0.14525413513183594, - "pack_ms": 0.12697696685791016, - "speedup_x": 7.087256253693126, - "packed_wins": true, - "matches_scatter": true - }, - { - "density": 0.5, - "measured_density": 0.49802517890930176, - "scatter_ms": 1.3754749298095703, - "packed_ms": 0.2714681625366211, - "pack_ms": 0.1302051544189453, - "speedup_x": 5.0668001615991285, - "packed_wins": true, - "matches_scatter": true - } + "calibrate_thresh": true, + "ftbc": true, + "calib_percentile": 95.0, + "calib_batches": 8, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 100, + "trained_T": 100, + "thresh_before": [ + 1.0, + 1.0, + 1.0, + 1.0 ], - "popcount_vs_loop_ms": { - "loop_ms": 0.013265609741210938, - "popcount_ms": 0.03826141357421875, - "speedup_x": 0.3467098703888335 - } - }, - "config": { - "method": "harmonic_matched", - "data_root": "/kaggle/working/data", - "subjects": "", + "thresh_after": [ + 0.5629911422729492, + 0.4806070923805237, + 0.8457203507423401, + 1.6999517679214478 + ], + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 50, + "thresh": null, + "ftbc": 100, + "both": null + }, + "speedup_at_min_ticks": null, + "full_T_acc": 0.9428571428571428, + "t_sweep_rows": [ + { + "T": 4, + "arm": "raw", + "acc": 0.305, + "syn_per_inference": 1871713.2256493508, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3814367585398986 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.3335714285714286, + "syn_per_inference": 1909303.75487013, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.38909733892223736 + }, + { + "T": 4, + "arm": "ftbc", + "acc": 0.23357142857142857, + "syn_per_inference": 1938631.2873376624, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.39507400178228 + }, + { + "T": 4, + "arm": "both", + "acc": 0.31785714285714284, + "syn_per_inference": 2003910.9650974027, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.40837735848350004 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.6157142857142858, + "syn_per_inference": 2054740.7784090908, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.20936798741810597 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.535, + "syn_per_inference": 2140106.012987013, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.21806628529921013 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.5135714285714286, + "syn_per_inference": 2244092.827922078, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.22866203070405405 + }, + { + "T": 8, + "arm": "both", + "acc": 0.4642857142857143, + "syn_per_inference": 2392016.2751623373, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2437347030168218 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.8264285714285714, + "syn_per_inference": 2346062.1858766233, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11952610357862792 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.7228571428571429, + "syn_per_inference": 2542097.0625, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1295135988416974 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.7578571428571429, + "syn_per_inference": 2610952.6550324676, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.13302162208786228 + }, + { + "T": 16, + "arm": "both", + "acc": 0.6342857142857142, + "syn_per_inference": 2888513.6176948054, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.14716267110705777 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.89, + "syn_per_inference": 2567979.000811688, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08373262080067326 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.8221428571428572, + "syn_per_inference": 2890386.8092532465, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09424518759303417 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.8642857142857143, + "syn_per_inference": 2876722.585227273, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09379964606464136 + }, + { + "T": 25, + "arm": "both", + "acc": 0.7692857142857142, + "syn_per_inference": 3290927.121753247, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.10730537620491336 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9328571428571428, + "syn_per_inference": 2922163.6103896103, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04764065777581142 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9135714285714286, + "syn_per_inference": 3546637.237824675, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.05782158476733154 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9292857142857143, + "syn_per_inference": 3297052.6079545454, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.053752553212948424 + }, + { + "T": 50, + "arm": "both", + "acc": 0.9007142857142857, + "syn_per_inference": 4030732.6136363638, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.06571389512527982 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9428571428571428, + "syn_per_inference": 3264047.5113636362, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026607232035192413 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.9321428571428572, + "syn_per_inference": 4339798.512987013, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.03537633126326277 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.9407142857142857, + "syn_per_inference": 3693235.9448051946, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.03010580740691839 + }, + { + "T": 100, + "arm": "both", + "acc": 0.9292857142857143, + "syn_per_inference": 4875421.047077922, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.03974251557835587 + } + ], + "calibration_reference": "same network at full T (NOT a source ANN)" + }, + "config": { + "method": "harmonic_matched", + "data_root": "/kaggle/working/data", + "subjects": "", "blocks": "", "limit": 0, "drop_rest": true, @@ -1516,88 +1706,296 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt05_bitpack_popcount/control_baseline", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/calib_p95", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "baseline": true, + "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "bitpack": true, - "pack_hidden": false, - "popcount_readout": true, - "sparsity_sweep": "0.01,0.05,0.1,0.25,0.5", + "calibrate_thresh": true, + "calib_percentile": 95.0, + "calib_batches": 8, + "ftbc": true, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 0, + "ftbc_lr": 1.0, + "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "control_baseline.zip", + "name": "calib_p95.zip", "files": 81, - "bytes": 12250994, - "MB": 12.3, - "sha256": "ef07404573217d6615260626d16d6c3baa237388a674cc6f4fc50b4f57d95eb3" - } - }, - { - "key": "opt05_bitpack_popcount/default", - "tag": "default", - "script": "opt05_bitpack_popcount.py", - "hf_folder": "applied/opt05_bitpack_popcount", - "phase": 1, - "status": "failed", - "duration_s": 280.1, - "optimization_summary": null, - "zip": { - "name": "FAILED_default.zip", - "files": 76, - "bytes": 10446958, - "MB": 10.4, - "sha256": "a05cd25014d037d0284290f3d579a1d933984716eb304384946909de3e297d93" + "bytes": 12247718, + "MB": 12.2, + "sha256": "7bfd3a9ba5be867423a06c63cc3e7652e2784be8ea2ed7f3064997e028337fd1" } }, { - "key": "opt06_uticket_prune/control_baseline", - "tag": "control_baseline", - "script": "opt06_uticket_prune.py", - "hf_folder": "applied/opt06_uticket_prune", - "phase": 1, + "key": "opt03_ftbc_threshold_balance/calib_p99", + "tag": "calib_p99", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 3, "status": "ok", - "duration_s": 323.1, + "duration_s": 377.6, "optimization_summary": { - "optimization": "uticket_workload_balanced_pruning", - "research_section": "3. Spike sparsity & MAC->AC restructuring", - "reference": "u-Ticket: Workload-Balanced Pruning for Sparse SNNs, arXiv:2302.06746", - "script": "opt06_uticket_prune.py", - "baseline_mode": true, + "optimization": "ftbc_threshold_balance", + "research_section": "2. Temporal-Dimension Reduction (threshold balancing + FTBC)", + "reference": "Rueckauer et al. arXiv:1612.04052; Sengupta et al. arXiv:1802.02627; FTBC: Forward Temporal Bias Correction, ECCV 2024", + "script": "opt03_ftbc_threshold_balance.py", + "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.945, - "test_target_acc": 0.945, + "test_acc": 0.9328571428571428, + "test_target_acc": 0.9328571428571428, "best_val_acc": 0.945 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3269036.607142857, + "syn_ops_per_inference": 3284640.788149351, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026647901182495378, - "syn_ops_per_inference_dense_fanout": 64845654.39366884, + "event_fraction_of_dense": 0.026775100331194495, + "syn_ops_per_inference_dense_fanout": 64861258.57467532, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 11.901428571428571, + "effective_ticks": 12.331428571428571, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 95.36304565003775, - "infer_ms_per_sample": 0.6318974475001937, - "peak_vram_mb": 2828.277248 + "train_ms_per_step": 98.5430900999745, + "infer_ms_per_sample": 0.6449701993750523, + "peak_vram_mb": 2828.248576 }, "optimization_specific": { - "pruning_enabled": false, - "balance_enabled": false + "calibrate_thresh": true, + "ftbc": true, + "calib_percentile": 99.0, + "calib_batches": 8, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 100, + "trained_T": 100, + "thresh_before": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "thresh_after": [ + 1.1893720626831055, + 0.6524527072906494, + 0.9638769626617432, + 2.4433438777923584 + ], + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "thresh": null, + "ftbc": 100, + "both": null + }, + "speedup_at_min_ticks": null, + "full_T_acc": 0.9464285714285714, + "t_sweep_rows": [ + { + "T": 4, + "arm": "raw", + "acc": 0.3157142857142857, + "syn_per_inference": 1878827.9334415584, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.38288666605833094 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.3742857142857143, + "syn_per_inference": 1883321.543831169, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.38380241968856965 + }, + { + "T": 4, + "arm": "ftbc", + "acc": 0.21071428571428572, + "syn_per_inference": 1981124.6103896103, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.4037337233584315 + }, + { + "T": 4, + "arm": "both", + "acc": 0.25, + "syn_per_inference": 2006390.69237013, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.40888270252873643 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.6171428571428571, + "syn_per_inference": 2065125.0535714284, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.21042609402424334 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.64, + "syn_per_inference": 2068805.8603896103, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2108011501499091 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.38785714285714284, + "syn_per_inference": 2372934.5551948054, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.24179036952811217 + }, + { + "T": 8, + "arm": "both", + "acc": 0.4235714285714286, + "syn_per_inference": 2420752.936688312, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2466628276016986 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.8157142857142857, + "syn_per_inference": 2361965.2678571427, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.12033632652815844 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.8385714285714285, + "syn_per_inference": 2359900.8782467535, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1202311509501693 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.6078571428571429, + "syn_per_inference": 2799702.0219155843, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.14263793853176845 + }, + { + "T": 16, + "arm": "both", + "acc": 0.6185714285714285, + "syn_per_inference": 2833707.82224026, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1443704504985655 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.8892857142857142, + "syn_per_inference": 2587462.3092532465, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08436790188247491 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.8978571428571429, + "syn_per_inference": 2580447.637987013, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08413917851324515 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.7892857142857143, + "syn_per_inference": 3096516.7978896108, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.10096635009813265 + }, + { + "T": 25, + "arm": "both", + "acc": 0.7935714285714286, + "syn_per_inference": 3116778.5568181816, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.10162701366920719 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9357142857142857, + "syn_per_inference": 2946150.8920454546, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04803172755447645 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.93, + "syn_per_inference": 2946987.3668831172, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04804536478250074 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9192857142857143, + "syn_per_inference": 3551675.100649351, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.057903718121500525 + }, + { + "T": 50, + "arm": "both", + "acc": 0.9192857142857143, + "syn_per_inference": 3567119.5762987016, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.058155512708333905 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9464285714285714, + "syn_per_inference": 3284640.9301948054, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026775101489093196 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.9328571428571428, + "syn_per_inference": 3333643.5, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.02717455117252713 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.945, + "syn_per_inference": 3961718.6420454546, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.03229437279943668 + }, + { + "T": 100, + "arm": "both", + "acc": 0.9328571428571428, + "syn_per_inference": 4013997.268668831, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.032720527610053465 + } + ], + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -1637,455 +2035,296 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt06_uticket_prune/control_baseline", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/calib_p99", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "baseline": true, + "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "prune_rounds": 5, - "prune_rate": 0.5, - "rewind_epoch": 1, - "balance": true, - "balance_iters": 2, - "prune_readout": false, + "calibrate_thresh": true, + "calib_percentile": 99.0, + "calib_batches": 8, + "ftbc": true, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 0, + "ftbc_lr": 1.0, + "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "control_baseline.zip", - "files": 80, - "bytes": 12237618, + "name": "calib_p99.zip", + "files": 81, + "bytes": 12249418, "MB": 12.2, - "sha256": "b3bf34aaf9578d97fb975b4f1ed60ef42bf6884b49c48fbdd831889668315689" + "sha256": "97afd31f1cc8ac24332af9c09efb238f37fc46365dc5d669f42dda2ecb138d3b" } }, { - "key": "opt06_uticket_prune/default", - "tag": "default", - "script": "opt06_uticket_prune.py", - "hf_folder": "applied/opt06_uticket_prune", - "phase": 1, + "key": "opt03_ftbc_threshold_balance/calib_p99.99", + "tag": "calib_p99.99", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 3, "status": "ok", - "duration_s": 325.4, + "duration_s": 377.5, "optimization_summary": { - "optimization": "uticket_workload_balanced_pruning", - "research_section": "3. Spike sparsity & MAC->AC restructuring", - "reference": "u-Ticket: Workload-Balanced Pruning for Sparse SNNs, arXiv:2302.06746", - "script": "opt06_uticket_prune.py", + "optimization": "ftbc_threshold_balance", + "research_section": "2. Temporal-Dimension Reduction (threshold balancing + FTBC)", + "reference": "Rueckauer et al. arXiv:1612.04052; Sengupta et al. arXiv:1802.02627; FTBC: Forward Temporal Bias Correction, ECCV 2024", + "script": "opt03_ftbc_threshold_balance.py", "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.7885714285714286, - "test_target_acc": 0.7885714285714286, - "best_val_acc": 0.935 + "test_acc": 0.9342857142857143, + "test_target_acc": 0.9342857142857143, + "best_val_acc": 0.9485714285714286 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 218011.0174512987, + "syn_ops_per_inference": 3246424.559253247, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.0017771401020850075, - "syn_ops_per_inference_dense_fanout": 65250329.547077924, - "weight_sparsity": 0.983618530884808, - "effective_ticks": 12.822142857142858, + "event_fraction_of_dense": 0.026463576658144815, + "syn_ops_per_inference_dense_fanout": 64823042.345779225, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 12.131428571428572, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 96.64661480001087, - "infer_ms_per_sample": 0.6332334065623968, - "peak_vram_mb": 2837.834752, - "weight_bytes_nonzero": 39755 + "train_ms_per_step": 95.91640224998628, + "infer_ms_per_sample": 0.629378066875006, + "peak_vram_mb": 2823.921152 }, "optimization_specific": { - "pruning_enabled": true, - "balance_enabled": true, - "rounds": 5, - "final_sparsity": 0.9918981481481481, - "nnz_per_layer": { - "layer0": 640, - "layer1": 5120, - "layer2": 4096 - }, - "pe_stats_per_layer": { - "layer0": { - "mean_nnz": 2.0, - "max_nnz": 2.0, - "min_nnz": 2.0, - "total_nnz": 640, - "numel": 921600, - "sparsity": 0.9993055555555556, - "utilization": 1.0 - }, - "layer1": { - "mean_nnz": 10.0, - "max_nnz": 10.0, - "min_nnz": 10.0, - "total_nnz": 5120, - "numel": 163840, - "sparsity": 0.96875, - "utilization": 1.0 - }, - "layer2": { - "mean_nnz": 16.0, - "max_nnz": 16.0, - "min_nnz": 16.0, - "total_nnz": 4096, - "numel": 131072, - "sparsity": 0.96875, - "utilization": 1.0 - } + "calibrate_thresh": true, + "ftbc": true, + "calib_percentile": 99.99, + "calib_batches": 8, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 100, + "trained_T": 100, + "thresh_before": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "thresh_after": [ + 3.5768113136291504, + 1.0354942083358765, + 1.2101423740386963, + 2.95900559425354 + ], + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "thresh": 50, + "ftbc": 100, + "both": null }, - "pe_utilization_final": 1.0, - "pe_utilization_lth": 0.5739893211289092, - "pe_utilization_uticket": 1.0, - "latency_proxy_dense": 3712, - "latency_proxy_final": 28, - "latency_reduction_frac": 0.9924568965517241, - "rounds_history": [ - { - "round": 1, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 36.0, - "max_nnz": 46.0, - "min_nnz": 24.0, - "total_nnz": 11520, - "numel": 921600, - "sparsity": 0.9875, - "utilization": 0.782608695652174 - }, - "uticket": { - "mean_nnz": 36.0, - "max_nnz": 36.0, - "min_nnz": 36.0, - "total_nnz": 11520, - "numel": 921600, - "sparsity": 0.9875, - "utilization": 1.0 - } - }, - "layer1": { - "lth": { - "mean_nnz": 160.0, - "max_nnz": 184.0, - "min_nnz": 119.0, - "total_nnz": 81920, - "numel": 163840, - "sparsity": 0.5, - "utilization": 0.8695652173913043 - }, - "uticket": { - "mean_nnz": 160.0, - "max_nnz": 160.0, - "min_nnz": 160.0, - "total_nnz": 81920, - "numel": 163840, - "sparsity": 0.5, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 256.0, - "max_nnz": 284.0, - "min_nnz": 226.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 0.9014084507042254 - }, - "uticket": { - "mean_nnz": 256.0, - "max_nnz": 256.0, - "min_nnz": 256.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 1.0 - } - } - }, - "latency_proxy": 452, - "sparsity": 0.8693181818181819 - }, - { - "round": 2, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 18.0, - "max_nnz": 27.0, - "min_nnz": 8.0, - "total_nnz": 5760, - "numel": 921600, - "sparsity": 0.99375, - "utilization": 0.6666666666666666 - }, - "uticket": { - "mean_nnz": 18.0, - "max_nnz": 18.0, - "min_nnz": 18.0, - "total_nnz": 5760, - "numel": 921600, - "sparsity": 0.99375, - "utilization": 1.0 - } - }, - "layer1": { - "lth": { - "mean_nnz": 80.0, - "max_nnz": 109.0, - "min_nnz": 30.0, - "total_nnz": 40960, - "numel": 163840, - "sparsity": 0.75, - "utilization": 0.7339449541284404 - }, - "uticket": { - "mean_nnz": 80.0, - "max_nnz": 80.0, - "min_nnz": 80.0, - "total_nnz": 40960, - "numel": 163840, - "sparsity": 0.75, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 128.0, - "max_nnz": 162.0, - "min_nnz": 95.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 0.7901234567901234 - }, - "uticket": { - "mean_nnz": 128.0, - "max_nnz": 128.0, - "min_nnz": 128.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 1.0 - } - } - }, - "latency_proxy": 226, - "sparsity": 0.9346590909090909 - }, - { - "round": 3, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 9.0, - "max_nnz": 17.0, - "min_nnz": 3.0, - "total_nnz": 2880, - "numel": 921600, - "sparsity": 0.996875, - "utilization": 0.5294117647058824 - }, - "uticket": { - "mean_nnz": 9.0, - "max_nnz": 9.0, - "min_nnz": 9.0, - "total_nnz": 2880, - "numel": 921600, - "sparsity": 0.996875, - "utilization": 1.0 - } - }, - "layer1": { - "lth": { - "mean_nnz": 40.0, - "max_nnz": 60.0, - "min_nnz": 0.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 0.6666666666666666 - }, - "uticket": { - "mean_nnz": 40.0, - "max_nnz": 40.0, - "min_nnz": 40.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 64.0, - "max_nnz": 85.0, - "min_nnz": 37.0, - "total_nnz": 16384, - "numel": 131072, - "sparsity": 0.875, - "utilization": 0.7529411764705882 - }, - "uticket": { - "mean_nnz": 64.0, - "max_nnz": 64.0, - "min_nnz": 64.0, - "total_nnz": 16384, - "numel": 131072, - "sparsity": 0.875, - "utilization": 1.0 - } - } - }, - "latency_proxy": 113, - "sparsity": 0.9673295454545454 - }, - { - "round": 4, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 4.5, - "max_nnz": 9.0, - "min_nnz": 0.0, - "total_nnz": 1440, - "numel": 921600, - "sparsity": 0.9984375, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 4.0, - "max_nnz": 4.0, - "min_nnz": 4.0, - "total_nnz": 1280, - "numel": 921600, - "sparsity": 0.9986111111111111, - "utilization": 1.0 - } - }, - "layer1": { - "lth": { - "mean_nnz": 20.0, - "max_nnz": 33.0, - "min_nnz": 0.0, - "total_nnz": 10240, - "numel": 163840, - "sparsity": 0.9375, - "utilization": 0.6060606060606061 - }, - "uticket": { - "mean_nnz": 20.0, - "max_nnz": 20.0, - "min_nnz": 20.0, - "total_nnz": 10240, - "numel": 163840, - "sparsity": 0.9375, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 32.0, - "max_nnz": 44.0, - "min_nnz": 18.0, - "total_nnz": 8192, - "numel": 131072, - "sparsity": 0.9375, - "utilization": 0.7272727272727273 - }, - "uticket": { - "mean_nnz": 32.0, - "max_nnz": 32.0, - "min_nnz": 32.0, - "total_nnz": 8192, - "numel": 131072, - "sparsity": 0.9375, - "utilization": 1.0 - } - } - }, - "latency_proxy": 56, - "sparsity": 0.9837962962962963 - }, - { - "round": 5, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 2.0, - "max_nnz": 4.0, - "min_nnz": 0.0, - "total_nnz": 640, - "numel": 921600, - "sparsity": 0.9993055555555556, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 2.0, - "max_nnz": 2.0, - "min_nnz": 2.0, - "total_nnz": 640, - "numel": 921600, - "sparsity": 0.9993055555555556, - "utilization": 1.0 - } - }, - "layer1": { - "lth": { - "mean_nnz": 10.0, - "max_nnz": 19.0, - "min_nnz": 0.0, - "total_nnz": 5120, - "numel": 163840, - "sparsity": 0.96875, - "utilization": 0.5263157894736842 - }, - "uticket": { - "mean_nnz": 10.0, - "max_nnz": 10.0, - "min_nnz": 10.0, - "total_nnz": 5120, - "numel": 163840, - "sparsity": 0.96875, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 16.0, - "max_nnz": 23.0, - "min_nnz": 11.0, - "total_nnz": 4096, - "numel": 131072, - "sparsity": 0.96875, - "utilization": 0.6956521739130435 - }, - "uticket": { - "mean_nnz": 16.0, - "max_nnz": 16.0, - "min_nnz": 16.0, - "total_nnz": 4096, - "numel": 131072, - "sparsity": 0.96875, - "utilization": 1.0 - } - } - }, - "latency_proxy": 28, - "sparsity": 0.9918981481481481 + "speedup_at_min_ticks": null, + "full_T_acc": 0.9442857142857143, + "t_sweep_rows": [ + { + "T": 4, + "arm": "raw", + "acc": 0.2892857142857143, + "syn_per_inference": 1865469.109577922, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3801642690572182 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.46214285714285713, + "syn_per_inference": 1787905.8538961038, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3643576399093101 + }, + { + "T": 4, + "arm": "ftbc", + "acc": 0.052142857142857144, + "syn_per_inference": 1966834.3693181819, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.40082151268516003 + }, + { + "T": 4, + "arm": "both", + "acc": 0.1757142857142857, + "syn_per_inference": 1898818.9853896103, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3869606459556639 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.6142857142857143, + "syn_per_inference": 2044550.4594155846, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.20832964399238646 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.855, + "syn_per_inference": 1874452.362012987, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.19099748380408052 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.10214285714285715, + "syn_per_inference": 2318848.7905844157, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.23627929591559824 + }, + { + "T": 8, + "arm": "both", + "acc": 0.3757142857142857, + "syn_per_inference": 2183480.32224026, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.22248591425164377 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.8092857142857143, + "syn_per_inference": 2330725.1071428573, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11874471710372478 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.915, + "syn_per_inference": 1987912.3238636365, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.10127924816220171 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.6707142857142857, + "syn_per_inference": 2661914.364448052, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.13561799595843596 + }, + { + "T": 16, + "arm": "both", + "acc": 0.5092857142857142, + "syn_per_inference": 2356939.4910714286, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.12008027555036739 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.8814285714285715, + "syn_per_inference": 2549276.6623376627, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08312280435940313 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.9307142857142857, + "syn_per_inference": 2060534.25, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.06718666038449499 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.8492857142857143, + "syn_per_inference": 2914881.7978896103, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09504388166115434 + }, + { + "T": 25, + "arm": "both", + "acc": 0.5964285714285714, + "syn_per_inference": 2459497.0251623373, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08019541113973606 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9257142857142857, + "syn_per_inference": 2900110.1266233767, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04728111511737298 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9421428571428572, + "syn_per_inference": 2179785.9334415584, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.03553751587022574 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9214285714285714, + "syn_per_inference": 3326054.6550324676, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.05422537978389222 + }, + { + "T": 50, + "arm": "both", + "acc": 0.8028571428571428, + "syn_per_inference": 2618701.586038961, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.042693251546179846 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9442857142857143, + "syn_per_inference": 3246424.559253247, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026463576658144815 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.9342857142857143, + "syn_per_inference": 2424959.4837662335, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.019767316326089003 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.9364285714285714, + "syn_per_inference": 3747052.824675325, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.030544501453230358 + }, + { + "T": 100, + "arm": "both", + "acc": 0.8271428571428572, + "syn_per_inference": 2880583.041396104, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.023481380437090006 } ], - "latency_proxy_lth": 46, - "latency_reduction_vs_lth_frac": 0.3913043478260869 + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -2125,7 +2364,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt06_uticket_prune/default", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/calib_p99.99", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -2136,108 +2375,285 @@ "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "prune_rounds": 5, - "prune_rate": 0.5, - "rewind_epoch": 1, - "balance": true, - "balance_iters": 2, - "prune_readout": false, + "calibrate_thresh": true, + "calib_percentile": 99.99, + "calib_batches": 8, + "ftbc": true, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 0, + "ftbc_lr": 1.0, + "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "default.zip", + "name": "calib_p99.99.zip", "files": 81, - "bytes": 8129041, - "MB": 8.1, - "sha256": "bdbba4d718c46fedaf00215f9c5812e399ad2772542fb2419c85df427e071443" + "bytes": 12248347, + "MB": 12.2, + "sha256": "fe6b60f1bc67c5a27eab9fee7d46b5e4e3be3c3d73c0025e000c6942e77b6160" } }, { - "key": "opt07_sfa_integer_train/control_baseline", - "tag": "control_baseline", - "script": "opt07_sfa_integer_train.py", - "hf_folder": "applied/opt07_sfa_integer_train", - "phase": 2, + "key": "opt03_ftbc_threshold_balance/ftbc_ticks_16", + "tag": "ftbc_ticks_16", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 3, "status": "ok", - "duration_s": 325.5, + "duration_s": 382.3, "optimization_summary": { - "optimization": "sfa_integer_train", - "research_section": "3. Training-Time Approximation for Fewer Timesteps (SFA) / spike-storm suppression", - "reference": "Yao et al., Scaling Spike-driven Transformer with Efficient Spike Firing Approximation Training, arXiv:2411.16061", - "script": "opt07_sfa_integer_train.py", - "baseline_mode": true, + "optimization": "ftbc_threshold_balance", + "research_section": "2. Temporal-Dimension Reduction (threshold balancing + FTBC)", + "reference": "Rueckauer et al. arXiv:1612.04052; Sengupta et al. arXiv:1802.02627; FTBC: Forward Temporal Bias Correction, ECCV 2024", + "script": "opt03_ftbc_threshold_balance.py", + "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.9442857142857143, - "test_target_acc": 0.9442857142857143, - "best_val_acc": 0.9464285714285714 + "test_acc": 0.9364285714285714, + "test_target_acc": 0.9364285714285714, + "best_val_acc": 0.9442857142857143 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3276098.271103896, + "syn_ops_per_inference": 3244621.7719155843, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026705465090775447, - "syn_ops_per_inference_dense_fanout": 64852716.05762987, + "event_fraction_of_dense": 0.02644888104454351, + "syn_ops_per_inference_dense_fanout": 64821239.558441564, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.049285714285714, + "effective_ticks": 11.918571428571429, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 95.41663794998385, - "infer_ms_per_sample": 0.6363128081250125, - "peak_vram_mb": 2829.275648 + "train_ms_per_step": 96.6059831000166, + "infer_ms_per_sample": 0.6313146153124194, + "peak_vram_mb": 2825.41312 }, "optimization_specific": { - "sfa_levels_D": 1, - "soft_reset": false, - "storm_reg": 0.0, + "calibrate_thresh": true, + "ftbc": true, + "calib_percentile": 99.9, + "calib_batches": 8, + "ftbc_target_ticks": 16, + "ftbc_ref_ticks": 100, "trained_T": 100, - "infer_mode": "graded", + "thresh_before": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "thresh_after": [ + 2.3250319957733154, + 0.8496885299682617, + 1.0896447896957397, + 2.718693256378174 + ], "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 50, + "thresh": 50, + "ftbc": null, + "both": null + }, "speedup_at_min_ticks": null, - "full_T_acc": null, - "t_sweep_rows": null, - "storm_ratio_peak_over_mean": 4.721035628917203, - "tick_activity_cv": 0.8204789844315089, - "mean_integer_activation": 0.07897717574611306, - "frac_activations_gt1": 0.0, - "max_activation": 1.0, - "per_layer_activity": [ + "full_T_acc": 0.9407142857142857, + "t_sweep_rows": [ { - "layer": 0, - "mean_integer_activation": 0.0650282603316009, - "peak_tick_activation": 0.3070007339119911, - "storm_ratio": 4.721035628917203, - "tick_activity_cv": 0.8204789844315089, - "frac_activations_gt1": 0.0, - "max_activation": 1.0 + "T": 4, + "arm": "raw", + "acc": 0.27714285714285714, + "syn_per_inference": 1864006.8636363635, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3798662777065706 }, { - "layer": 1, - "mean_integer_activation": 0.03752758026123047, - "peak_tick_activation": 0.084075927734375, - "storm_ratio": 2.240377001371265, - "tick_activity_cv": 0.2590329003324282, - "frac_activations_gt1": 0.0, - "max_activation": 1.0 + "T": 4, + "arm": "thresh", + "acc": 0.39714285714285713, + "syn_per_inference": 1823905.375, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.37169398847525825 }, { - "layer": 2, - "mean_integer_activation": 0.1343756866455078, - "peak_tick_activation": 0.15582275390625, - "storm_ratio": 1.159605266370255, - "tick_activity_cv": 0.12113898330190948, - "frac_activations_gt1": 0.0, - "max_activation": 1.0 + "T": 4, + "arm": "ftbc", + "acc": 0.04928571428571429, + "syn_per_inference": 1930274.5633116884, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.39337098356303646 + }, + { + "T": 4, + "arm": "both", + "acc": 0.125, + "syn_per_inference": 1898093.5227272727, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.386812803795566 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.5928571428571429, + "syn_per_inference": 2041726.3392857143, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2080418800301237 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7535714285714286, + "syn_per_inference": 1945997.961038961, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.19828762873822103 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.065, + "syn_per_inference": 2173312.650974026, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.22144987851803236 + }, + { + "T": 8, + "arm": "both", + "acc": 0.24714285714285714, + "syn_per_inference": 2095535.9318181819, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2135248130651287 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.7935714285714286, + "syn_per_inference": 2324438.898538961, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11842445022195608 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.895, + "syn_per_inference": 2115607.2045454546, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.10778498855847873 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.26285714285714284, + "syn_per_inference": 2626865.0324675324, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1338323186179609 + }, + { + "T": 16, + "arm": "both", + "acc": 0.5564285714285714, + "syn_per_inference": 2485868.408279221, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1266488870753431 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.87, + "syn_per_inference": 2540346.3376623373, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08283161837640655 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.9171428571428571, + "syn_per_inference": 2232137.172077922, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.07278201860124694 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.6721428571428572, + "syn_per_inference": 2910014.7816558443, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09488518564977581 + }, + { + "T": 25, + "arm": "both", + "acc": 0.5935714285714285, + "syn_per_inference": 2680826.768668831, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08741218334818548 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9335714285714286, + "syn_per_inference": 2889483.0446428573, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04710785952894892 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9392857142857143, + "syn_per_inference": 2412475.600649351, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.03933110523804894 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9114285714285715, + "syn_per_inference": 3366198.3173701297, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.054879850489261556 + }, + { + "T": 50, + "arm": "both", + "acc": 0.7114285714285714, + "syn_per_inference": 2968215.874188312, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.048391457673406066 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9407142857142857, + "syn_per_inference": 3244621.590097402, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026448879562433174 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.9364285714285714, + "syn_per_inference": 2678800.385551948, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.02183652755856072 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.9271428571428572, + "syn_per_inference": 3865133.496753247, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.031507048667972395 + }, + { + "T": 100, + "arm": "both", + "acc": 0.8257142857142857, + "syn_per_inference": 3321729.465097402, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.027077432644066625 } ], - "expanded_vs_graded_agreement": null, - "expanded_acc": null, - "graded_acc": null, - "syn_ratio_expanded_over_graded": null, - "expansion_caveat": "exact only at beta=1 (IAF); with beta<1 the expanded mode applies decay per sub-tick and drifts" + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -2277,167 +2693,296 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt07_sfa_integer_train/control_baseline", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/ftbc_ticks_16", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "baseline": true, + "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "sfa_levels": 4, - "soft_reset": true, - "storm_reg": 0.001, - "infer_mode": "graded", + "calibrate_thresh": true, + "calib_percentile": 99.9, + "calib_batches": 8, + "ftbc": true, + "ftbc_target_ticks": 16, + "ftbc_ref_ticks": 0, + "ftbc_lr": 1.0, "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "control_baseline.zip", - "files": 80, - "bytes": 12243558, + "name": "ftbc_ticks_16.zip", + "files": 81, + "bytes": 12244811, "MB": 12.2, - "sha256": "ef41cc96bceab3211a07c23bfa9469952a5d4dc3e8ca52e1b569b2e3abe6c088" + "sha256": "61b2fe0303d978b5bcb5292e8785f2240a28f26bf554b774d10b2ee1024af021" } }, { - "key": "opt07_sfa_integer_train/default", - "tag": "default", - "script": "opt07_sfa_integer_train.py", - "hf_folder": "applied/opt07_sfa_integer_train", - "phase": 2, + "key": "opt03_ftbc_threshold_balance/ftbc_ticks_4", + "tag": "ftbc_ticks_4", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 3, "status": "ok", - "duration_s": 356.1, + "duration_s": 376.0, "optimization_summary": { - "optimization": "sfa_integer_train", - "research_section": "3. Training-Time Approximation for Fewer Timesteps (SFA) / spike-storm suppression", - "reference": "Yao et al., Scaling Spike-driven Transformer with Efficient Spike Firing Approximation Training, arXiv:2411.16061", - "script": "opt07_sfa_integer_train.py", + "optimization": "ftbc_threshold_balance", + "research_section": "2. Temporal-Dimension Reduction (threshold balancing + FTBC)", + "reference": "Rueckauer et al. arXiv:1612.04052; Sengupta et al. arXiv:1802.02627; FTBC: Forward Temporal Bias Correction, ECCV 2024", + "script": "opt03_ftbc_threshold_balance.py", "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.92, - "test_target_acc": 0.92, - "best_val_acc": 0.9271428571428572 + "test_acc": 0.915, + "test_target_acc": 0.915, + "best_val_acc": 0.9428571428571428 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 5310716.257305195, + "syn_ops_per_inference": 3276270.6355519476, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.04329087099352758, - "syn_ops_per_inference_dense_fanout": 66887334.04383116, + "event_fraction_of_dense": 0.026706870137989974, + "syn_ops_per_inference_dense_fanout": 64852888.422077924, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 3.89, + "effective_ticks": 12.065, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 99.90659205000156, - "infer_ms_per_sample": 0.6726730093751598, - "peak_vram_mb": 2832.417792 + "train_ms_per_step": 96.65914569995948, + "infer_ms_per_sample": 0.6326527268748805, + "peak_vram_mb": 2825.361408 }, "optimization_specific": { - "sfa_levels_D": 4, - "soft_reset": true, - "storm_reg": 0.001, + "calibrate_thresh": true, + "ftbc": true, + "calib_percentile": 99.9, + "calib_batches": 8, + "ftbc_target_ticks": 4, + "ftbc_ref_ticks": 100, "trained_T": 100, - "infer_mode": "graded", - "min_ticks_within_1pct_of_full": 100, - "speedup_at_min_ticks": 1.0, - "full_T_acc": 0.92, + "thresh_before": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "thresh_after": [ + 2.3257808685302734, + 0.8485923409461975, + 1.1052438020706177, + 2.675086736679077 + ], + "min_ticks_within_1pct_of_full": 50, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "thresh": 50, + "ftbc": 100, + "both": 50 + }, + "speedup_at_min_ticks": 2.0, + "full_T_acc": 0.9407142857142857, "t_sweep_rows": [ { "T": 4, - "acc": 0.20285714285714285, - "syn_per_inference": 2760457.5081168828, + "arm": "raw", + "acc": 0.25357142857142856, + "syn_per_inference": 1866350.0876623376, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3803438037317929 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.3892857142857143, + "syn_per_inference": 1827417.9788961038, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3724098226243169 + }, + { + "T": 4, + "arm": "ftbc", + "acc": 0.24, + "syn_per_inference": 2029696.7150974027, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.4136322408884197 + }, + { + "T": 4, + "arm": "both", + "acc": 0.3535714285714286, + "syn_per_inference": 2008604.635551948, "dense_per_inference": 4907008.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 25.0 + "event_fraction_of_dense": 0.40933388238860585 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.5685714285714286, + "syn_per_inference": 2049632.3157467535, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2088474601780508 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7478571428571429, + "syn_per_inference": 1954472.2467532465, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.19915111680613182 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.4014285714285714, + "syn_per_inference": 2281707.7126623373, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2324948026029647 + }, + { + "T": 8, + "arm": "both", + "acc": 0.5271428571428571, + "syn_per_inference": 2195008.1331168828, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.22366054152722828 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.7928571428571428, + "syn_per_inference": 2341867.364448052, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11931238773444286 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.8914285714285715, + "syn_per_inference": 2129525.081168831, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.10849407017314985 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.6742857142857143, + "syn_per_inference": 2635164.2467532465, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.13425514319281967 + }, + { + "T": 16, + "arm": "both", + "acc": 0.8021428571428572, + "syn_per_inference": 2416293.149350649, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.12310419859467568 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.8671428571428571, + "syn_per_inference": 2564796.465909091, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.0836288497074907 }, { - "T": 8, - "acc": 0.31, - "syn_per_inference": 3462951.003246753, - "dense_per_inference": 9814016.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 12.5 + "T": 25, + "arm": "thresh", + "acc": 0.9185714285714286, + "syn_per_inference": 2248590.5771103897, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.0733185053575748 }, { - "T": 16, - "acc": 0.5964285714285714, - "syn_per_inference": 4058790.475649351, - "dense_per_inference": 19628032.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 6.25 + "T": 25, + "arm": "ftbc", + "acc": 0.8357142857142857, + "syn_per_inference": 2893416.010551948, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09434395902519656 }, { "T": 25, - "acc": 0.7807142857142857, - "syn_per_inference": 4340038.356331169, + "arm": "both", + "acc": 0.8971428571428571, + "syn_per_inference": 2565715.890422078, "dense_per_inference": 30668800.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 4.0 + "event_fraction_of_dense": 0.08365882885610386 }, { "T": 50, - "acc": 0.89, - "syn_per_inference": 4723786.811688311, + "arm": "raw", + "acc": 0.9271428571428572, + "syn_per_inference": 2920697.4196428573, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04761675415475756 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9357142857142857, + "syn_per_inference": 2432894.0706168828, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.03966399191714189 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.925, + "syn_per_inference": 3274119.156655844, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.053378664255788355 + }, + { + "T": 50, + "arm": "both", + "acc": 0.9328571428571428, + "syn_per_inference": 2782566.975649351, "dense_per_inference": 61337600.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 2.0 + "event_fraction_of_dense": 0.04536478400930833 }, { "T": 100, - "acc": 0.92, - "syn_per_inference": 5310716.143668831, + "arm": "raw", + "acc": 0.9407142857142857, + "syn_per_inference": 3276270.607142857, "dense_per_inference": 122675200.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 1.0 - } - ], - "storm_ratio_peak_over_mean": 3.917304922499363, - "tick_activity_cv": 0.5639521370282741, - "mean_integer_activation": 0.10247435106274982, - "frac_activations_gt1": 0.020924500189721584, - "max_activation": 4.0, - "per_layer_activity": [ + "event_fraction_of_dense": 0.026706869906410236 + }, { - "layer": 0, - "mean_integer_activation": 0.1845430330466479, - "peak_tick_activation": 0.6301635801792145, - "storm_ratio": 3.414724304547031, - "tick_activity_cv": 0.5639521370282741, - "frac_activations_gt1": 0.020924500189721584, - "max_activation": 4.0 + "T": 100, + "arm": "thresh", + "acc": 0.915, + "syn_per_inference": 2706793.6566558443, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.022064717698897937 }, { - "layer": 1, - "mean_integer_activation": 0.049515380859375, - "peak_tick_activation": 0.12670516967773438, - "storm_ratio": 2.5589052831398074, - "tick_activity_cv": 0.317194117302912, - "frac_activations_gt1": 0.0011785506940213963, - "max_activation": 4.0 + "T": 100, + "arm": "ftbc", + "acc": 0.9428571428571428, + "syn_per_inference": 3695140.096590909, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.030121329303648244 }, { - "layer": 2, - "mean_integer_activation": 0.07336463928222657, - "peak_tick_activation": 0.28739166259765625, - "storm_ratio": 3.917304922499363, - "tick_activity_cv": 0.5378646067202674, - "frac_activations_gt1": 0.0013993072061566636, - "max_activation": 4.0 + "T": 100, + "arm": "both", + "acc": 0.9235714285714286, + "syn_per_inference": 3080125.265422078, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.025107970196275024 } ], - "expanded_vs_graded_agreement": 0.9921875, - "expanded_acc": 0.87109375, - "graded_acc": 0.875, - "syn_ratio_expanded_over_graded": 1.0003825206412895, - "expansion_caveat": "exact only at beta=1 (IAF); with beta<1 the expanded mode applies decay per sub-tick and drifts" + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -2477,7 +3022,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt07_sfa_integer_train/default", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/ftbc_ticks_4", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -2488,106 +3033,118 @@ "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "sfa_levels": 4, - "soft_reset": true, - "storm_reg": 0.001, - "infer_mode": "graded", + "calibrate_thresh": true, + "calib_percentile": 99.9, + "calib_batches": 8, + "ftbc": true, + "ftbc_target_ticks": 4, + "ftbc_ref_ticks": 0, + "ftbc_lr": 1.0, "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "default.zip", + "name": "ftbc_ticks_4.zip", "files": 81, - "bytes": 12257656, + "bytes": 12252531, "MB": 12.3, - "sha256": "db0dbaf735fdc9917ddc6adb439003d589997a1e3d7383781e05c6761ae5492d" + "sha256": "39894bf766dfc01050bbdf50b22610539beef55eb6c6cb000c5313ad3481fe44" } }, { - "key": "opt08_mint_quant/control_baseline", - "tag": "control_baseline", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 2, + "key": "opt04_cudagraph_unroll/graph_warmup_1", + "tag": "graph_warmup_1", + "script": "opt04_cudagraph_unroll.py", + "hf_folder": "applied/opt04_cudagraph_unroll", + "phase": 4, "status": "ok", - "duration_s": 322.0, + "duration_s": 502.8, "optimization_summary": { - "optimization": "mint_quant", - "research_section": "4. Membrane-Potential Memory-Wall Optimizations (multiplier-less integer quantization)", - "reference": "Yin et al., MINT: Multiplier-less INTeger Quantization for Energy Efficient Spiking Neural Networks, arXiv:2305.09850 (ASP-DAC 2024)", - "script": "opt08_mint_quant.py", - "baseline_mode": true, + "optimization": "cudagraph_static_unroll", + "research_section": "2. Temporal-dimension reduction / 5. OS & runtime", + "reference": "CUDA Graphs static capture/replay applied to the unrolled T-tick event-driven inference loop", + "script": "opt04_cudagraph_unroll.py", + "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.945, - "test_target_acc": 0.945, - "best_val_acc": 0.9464285714285714 + "test_acc": 0.9464285714285714, + "test_target_acc": 0.9464285714285714, + "best_val_acc": 0.9442857142857143 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 3264850.94724026, + "syn_ops_per_inference": 3261657.1274350653, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026613781328583608, - "syn_ops_per_inference_dense_fanout": 64841468.73376623, + "event_fraction_of_dense": 0.026587746565198713, + "syn_ops_per_inference_dense_fanout": 64838274.913961045, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 11.907142857142857, + "effective_ticks": 12.156428571428572, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 94.69941574998302, - "infer_ms_per_sample": 0.626549786562407, - "peak_vram_mb": 2828.246528 + "train_ms_per_step": 94.66080665588379, + "infer_ms_per_sample": 0.6402868777513504, + "peak_vram_mb": 2804.747776 }, "optimization_specific": { - "w_bits": 0, - "u_bits": 0, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": false, - "batchnorm": true, - "membrane_memory_reduction_x": 1.0, - "weight_memory_reduction_x": 1.0, - "membrane_bytes_per_inference": 451200.0, - "working_set_bytes": 4911520.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": false, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": null, - "acc_vs_ubits": {}, - "bits_sweep_rows": null, - "fp32_membrane_acc": null, - "per_layer_scales": [ - { - "layer": 0, - "weight_scale": 9.543621453115142e-11, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 100000000.0 + "graph_enabled": true, + "event_capacity_scan": { + "cap_scan": 98901, + "batch_size_scan": 64, + "n_batches_scanned": 20, + "density_per_sample": 1545.328125, + "per_layer_caps": [ + 98901, + 7665, + 3579, + 3350 + ] + }, + "capacity": 98901, + "overflow_ticks_frac": 0.0, + "graph_vs_eager_pred_agreement": 1.0, + "graph_capture_ms": 240.91601371765137, + "graphed_acc": 0.9464285714285714, + "kernel_launches_eager": 400, + "kernel_launches_graphed": 2, + "launch_reduction_x": 200.0, + "bench_batches": { + "1": { + "ms_per_sample_eager": 165.45840740203857, + "ms_per_sample_graphed": 32.71412372589111, + "throughput_eager_samples_per_s": 6.0438149726060955, + "throughput_graphed_samples_per_s": 30.567836949536403, + "speedup_x": 5.057705619395483, + "capacity": 1546 }, - { - "layer": 1, - "weight_scale": 6.892802998249627e-11, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 100000000.0 + "8": { + "ms_per_sample_eager": 21.272578239440918, + "ms_per_sample_graphed": 12.35912024974823, + "throughput_eager_samples_per_s": 47.00887634513087, + "throughput_graphed_samples_per_s": 80.91190795075978, + "speedup_x": 1.721204892384979, + "capacity": 12363 }, - { - "layer": 2, - "weight_scale": 3.9894622346473585e-11, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 100000000.0 + "32": { + "ms_per_sample_eager": 6.193430125713348, + "ms_per_sample_graphed": 10.724300295114517, + "throughput_eager_samples_per_s": 161.46141632377288, + "throughput_graphed_samples_per_s": 93.24617667182936, + "speedup_x": 0.5775136797068972, + "capacity": 49451 }, - { - "layer": 3, - "weight_scale": 6.857638765596422e-11, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 100000000.0 + "128": { + "ms_per_sample_eager": 2.0725979655981064, + "ms_per_sample_graphed": 9.626770876348019, + "throughput_eager_samples_per_s": 482.4862402638815, + "throughput_graphed_samples_per_s": 103.87699186410437, + "speedup_x": 0.21529524200999375, + "capacity": 197802 } - ], - "shared_scale_note": "weight grid and membrane grid are the same grid up to a per-layer positive scalar that BatchNorm absorbs exactly; exact only with --batchnorm on", - "multiplier_less_compare": false, - "wall_clock_caveat": "this reference kernel computes in fp32 registers, so the traffic win does not appear in train_ms_per_step; a fixed-point core is where it becomes energy" + }, + "speedup_x_at_batch1": 5.057705619395483 }, "config": { "method": "harmonic_matched", @@ -2627,160 +3184,124 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/control_baseline", + "hub_dir": "/kaggle/working/hub/opt04_cudagraph_unroll/graph_warmup_1", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "baseline": true, + "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "w_bits": 4, - "u_bits": 2, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "l2_bytes": 2097152, + "event_capacity": 0, + "graph_warmup": 1, + "bench_batches": "1,8,32,128", "sampling_rate": 250.0 } }, "zip": { - "name": "control_baseline.zip", - "files": 80, - "bytes": 12247949, - "MB": 12.2, - "sha256": "6cdb33c67b4c87ce6cb384cb3728a02b828738c952c7367ba2e2fbf552054529" + "name": "graph_warmup_1.zip", + "files": 81, + "bytes": 12255071, + "MB": 12.3, + "sha256": "99eb4b6cb16094297a01e72d5fd80067bcda54fd85bd8612d7e8ae8c1bd8d43e" } }, { - "key": "opt08_mint_quant/default", - "tag": "default", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 2, + "key": "opt04_cudagraph_unroll/graph_warmup_10", + "tag": "graph_warmup_10", + "script": "opt04_cudagraph_unroll.py", + "hf_folder": "applied/opt04_cudagraph_unroll", + "phase": 4, "status": "ok", - "duration_s": 325.4, + "duration_s": 527.5, "optimization_summary": { - "optimization": "mint_quant", - "research_section": "4. Membrane-Potential Memory-Wall Optimizations (multiplier-less integer quantization)", - "reference": "Yin et al., MINT: Multiplier-less INTeger Quantization for Energy Efficient Spiking Neural Networks, arXiv:2305.09850 (ASP-DAC 2024)", - "script": "opt08_mint_quant.py", + "optimization": "cudagraph_static_unroll", + "research_section": "2. Temporal-dimension reduction / 5. OS & runtime", + "reference": "CUDA Graphs static capture/replay applied to the unrolled T-tick event-driven inference loop", + "script": "opt04_cudagraph_unroll.py", "baseline_mode": false, "method": "harmonic_matched", "accuracy": { - "test_acc": 0.24714285714285714, - "test_target_acc": 0.24714285714285714, - "best_val_acc": 0.5085714285714286 + "test_acc": 0.9435714285714286, + "test_target_acc": 0.9435714285714286, + "best_val_acc": 0.9485714285714286 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 850625.0412946428, + "syn_ops_per_inference": 3273295.596590909, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.006933960908925707, - "syn_ops_per_inference_dense_fanout": 63614042.63717532, - "weight_sparsity": 0.9790471097662772, - "effective_ticks": 39.044285714285714, + "event_fraction_of_dense": 0.026682618790031802, + "syn_ops_per_inference_dense_fanout": 64849913.383116886, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 12.09142857142857, "num_ticks": 100, - "membrane_bytes_per_inference": 0, - "weight_bytes": 613376, + "membrane_bytes_per_inference": 451200, + "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 89.64440669997202, - "infer_ms_per_sample": 0.6133386103124394, - "peak_vram_mb": 2834.896384 + "train_ms_per_step": 93.29218864440918, + "infer_ms_per_sample": 0.6321516633033752, + "peak_vram_mb": 2803.89888 }, "optimization_specific": { - "w_bits": 4, - "u_bits": 2, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": true, - "batchnorm": true, - "membrane_memory_reduction_x": 16.0, - "weight_memory_reduction_x": 8.0, - "membrane_bytes_per_inference": 28200.0, - "working_set_bytes": 613658.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": true, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": 0.019412504155585104, - "acc_vs_ubits": { - "2": 0.24714285714285714, - "4": 0.22214285714285714, - "8": 0.23285714285714285, - "0": 0.18928571428571428 + "graph_enabled": true, + "event_capacity_scan": { + "cap_scan": 98901, + "batch_size_scan": 64, + "n_batches_scanned": 20, + "density_per_sample": 1545.328125, + "per_layer_caps": [ + 98901, + 7747, + 3483, + 3303 + ] }, - "bits_sweep_rows": [ - { - "u_bits": 2, - "acc": 0.24714285714285714, - "target_acc": 0.24714285714285714, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.017122742132092198, - "acc_drop_vs_fp32": -0.05785714285714286 - }, - { - "u_bits": 4, - "acc": 0.22214285714285714, - "target_acc": 0.22214285714285714, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.16233945589539006, - "acc_drop_vs_fp32": -0.03285714285714286 - }, - { - "u_bits": 8, - "acc": 0.23285714285714285, - "target_acc": 0.23285714285714285, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.36418647495567374, - "acc_drop_vs_fp32": -0.043571428571428567 - }, - { - "u_bits": 0, - "acc": 0.18928571428571428, - "target_acc": 0.18928571428571428, - "membrane_bytes_per_neuron_per_tick": 4.0, - "membrane_memory_reduction_x": 1.0, - "membrane_saturation_frac": null, - "acc_drop_vs_fp32": 0.0 - } - ], - "fp32_membrane_acc": 0.18928571428571428, - "per_layer_scales": [ - { - "layer": 0, - "weight_scale": 0.026102902633803233, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 38.30991572197802 + "capacity": 98901, + "overflow_ticks_frac": 0.0, + "graph_vs_eager_pred_agreement": 1.0, + "graph_capture_ms": 232.3627471923828, + "graphed_acc": 0.9435714285714286, + "kernel_launches_eager": 400, + "kernel_launches_graphed": 2, + "launch_reduction_x": 200.0, + "bench_batches": { + "1": { + "ms_per_sample_eager": 162.28576183319092, + "ms_per_sample_graphed": 32.69205570220947, + "throughput_eager_samples_per_s": 6.161970025613662, + "throughput_graphed_samples_per_s": 30.58847106798535, + "speedup_x": 4.964073330580522, + "capacity": 1546 }, - { - "layer": 1, - "weight_scale": 0.02913376901830946, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 34.324429474660086 + "8": { + "ms_per_sample_eager": 20.896499156951904, + "ms_per_sample_graphed": 12.355339527130127, + "throughput_eager_samples_per_s": 47.85490586193799, + "throughput_graphed_samples_per_s": 80.93666692074126, + "speedup_x": 1.6912929920757669, + "capacity": 12363 }, - { - "layer": 2, - "weight_scale": 0.028474173375538418, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 35.11954453642119 + "32": { + "ms_per_sample_eager": 6.037041991949081, + "ms_per_sample_graphed": 10.774523615837097, + "throughput_eager_samples_per_s": 165.6440358264174, + "throughput_graphed_samples_per_s": 92.81152797606148, + "speedup_x": 0.5603070917284402, + "capacity": 49451 }, - { - "layer": 3, - "weight_scale": 0.0215481093951634, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 46.40778370210316 + "128": { + "ms_per_sample_eager": 2.052377350628376, + "ms_per_sample_graphed": 9.65143520385027, + "throughput_eager_samples_per_s": 487.23983418245683, + "throughput_graphed_samples_per_s": 103.61153329828787, + "speedup_x": 0.21264996420528384, + "capacity": 197802 } - ], - "shared_scale_note": "weight grid and membrane grid are the same grid up to a per-layer positive scalar that BatchNorm absorbs exactly; exact only with --batchnorm on", - "multiplier_less_compare": true, - "wall_clock_caveat": "this reference kernel computes in fp32 registers, so the traffic win does not appear in train_ms_per_step; a fixed-point core is where it becomes energy" + }, + "speedup_x_at_batch1": 4.964073330580522 }, "config": { "method": "harmonic_matched", @@ -2820,7 +3341,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/default", + "hub_dir": "/kaggle/working/hub/opt04_cudagraph_unroll/graph_warmup_10", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -2831,332 +3352,35 @@ "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "w_bits": 4, - "u_bits": 2, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "l2_bytes": 2097152, + "event_capacity": 0, + "graph_warmup": 10, + "bench_batches": "1,8,32,128", "sampling_rate": 250.0 } }, "zip": { - "name": "default.zip", + "name": "graph_warmup_10.zip", "files": 81, - "bytes": 12351757, - "MB": 12.4, - "sha256": "c2ec90c788101866da3bd41fbc98fc8613354d1e1195170654ec755e22af7703" + "bytes": 12254306, + "MB": 12.3, + "sha256": "30c304cd94c9123309fe255a127715a8b0a4ba0b1b1ac76f702132aa836c19e0" } }, { - "key": "opt09_srif_softreset/control_baseline", - "tag": "control_baseline", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 2, - "status": "ok", - "duration_s": 338.0, - "optimization_summary": { - "optimization": "srif_softreset", - "research_section": "4. Membrane-Potential Memory Wall -- Soft Reset Integrate-and-Fire (SRIF), dynamic reset potential", - "reference": "Guo et al., 'Reducing Information Loss for Spiking Neural Networks' (SRIF), ECCV 2022; research.md S4 (stacks with MINT / SpQuant-SNN membrane quantization)", - "script": "opt09_srif_softreset.py", - "baseline_mode": true, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.9464285714285714, - "test_target_acc": 0.9464285714285714, - "best_val_acc": 0.9428571428571428 - }, - "efficiency": { - "spikes_per_inference": 7588.84375, - "syn_ops_per_inference": 3247531.347402598, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026472598759998744, - "syn_ops_per_inference_dense_fanout": 64824149.13392857, - "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.189285714285715, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 95.90769074993659, - "infer_ms_per_sample": 0.6329408046872231, - "peak_vram_mb": 2828.263424, - "discarded_charge_per_reset": 0.27173534693841395 - }, - "optimization_specific": { - "reset_mode": "hard", - "learn_reset": false, - "lam_init": 0.9, - "v_reset_init": 0.0, - "u_bits": 0, - "u_scale": 1.0, - "u_headroom_requested": 2.0, - "u_headroom_actual": 0.0, - "u_threshold_level": 0, - "u_levels_above_threshold": null, - "reset_family": { - "reset_mode": "hard", - "learn_reset": false, - "num_spiking_sites": 4, - "extra_params": 0, - "extra_params_frac_of_weights": 0.0, - "extra_flops_per_tick_per_neuron": 0, - "learned_lam_per_layer": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "learned_v_reset_per_layer": [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "reset_stats": { - "reset_mode": "hard", - "learn_reset": false, - "discarded_charge_per_reset": 0.27173534693841395, - "spikes_per_inference": 7588.84375, - "syn_per_inference": 3309132.71875, - "lam_per_site": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "v_reset_per_site": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "u_bits": 0, - "membrane_saturation_frac": null, - "batches": 4, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null - }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.9464285714285714, - "target_acc": 0.9464285714285714, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.2740163210672487, - "spikes_per_inference": 7531.203125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.96, - "target_acc": 0.96, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.16058549060468713, - "spikes_per_inference": 9036.453125, - "membrane_saturation_frac": 0.30208174035904256, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.013571428571428568 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.9007142857142857, - "target_acc": 0.9007142857142857, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9342.71875, - "membrane_saturation_frac": 0.5301250831117021, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.04571428571428571 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.8421428571428572, - "target_acc": 0.8421428571428572, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 10064.375, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.9585714285714285, - "target_acc": 0.9585714285714285, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 10738.90625, - "membrane_saturation_frac": 0.33801418439716313, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.11642857142857133 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.9007142857142857, - "target_acc": 0.9007142857142857, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9342.71875, - "membrane_saturation_frac": 0.5301250831117021, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": -0.0585714285714285 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.9464285714285714, - "target_acc": 0.9464285714285714, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.27401632159846223, - "spikes_per_inference": 7531.203125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.96, - "target_acc": 0.96, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.1605852697683357, - "spikes_per_inference": 9036.453125, - "membrane_saturation_frac": 0.30208174035904256, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.013571428571428568 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.9007142857142857, - "target_acc": 0.9007142857142857, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9342.71875, - "membrane_saturation_frac": 0.5301250831117021, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.04571428571428571 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.9464285714285714, - "acc_by_bits": { - "0": 0.9464285714285714, - "4": 0.96, - "2": 0.9007142857142857 - } - }, - "soft": { - "fp32_acc": 0.8421428571428572, - "acc_by_bits": { - "0": 0.8421428571428572, - "4": 0.9585714285714285, - "2": 0.9007142857142857 - } - }, - "trained": { - "fp32_acc": 0.9464285714285714, - "acc_by_bits": { - "0": 0.9464285714285714, - "4": 0.96, - "2": 0.9007142857142857 - } - } - } - }, - "mechanism": "V = u - s*((1-lam)*u + lam*thresh) + s*v_r; lam=0,v_r=0 is the baseline hard reset exactly, lam=1,v_r=0 discards zero charge", - "cost": "2 scalars per spiking layer; identical FMA count per tick, so the reset change is free at inference time", - "caveat": "the sweep swaps the reset on ALREADY-TRAINED weights, which under-states what training with each reset would give; and a charge-conserving reset can raise the spike count, so read spikes_per_inference next to the accuracy" - }, - "config": { - "method": "harmonic_matched", - "data_root": "/kaggle/working/data", - "subjects": "", - "blocks": "", - "limit": 0, - "drop_rest": true, - "resplit": "block", - "test_blocks": "6", - "class_weight": false, - "epochs": 60, - "batch_size": 64, - "lr": 0.002, - "weight_decay": 0.0005, - "grad_clip": 5.0, - "num_bins": 100, - "window_sec": 5.0, - "hidden": "512,256", - "freq_groups": 8, - "dropout": 0.3, - "spike_drop": 0.1, - "time_jitter": 2, - "label_smoothing": 0.05, - "no_batchnorm": false, - "binary_input": false, - "beta": 1.0, - "thresh": 1.0, - "window": 0.5, - "gain": 1.0, - "alpha": 0.9, - "readout": "spikecount", - "fake_quant": 0, - "amp": false, - "spike_reg": 0.0, - "event_eval": true, - "decision_margin": 2.0, - "export": false, - "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/control_baseline", - "repo_id": "UWU-R-13/SSVEP-SNN", - "push_hf": false, - "keep_epoch_weights": 1, - "no_resume": true, - "selftest": false, - "reset_mode": "srif", - "learn_reset": true, - "lam_init": 0.9, - "v_reset_init": 0.0, - "u_bits": 0, - "u_headroom": 2.0, - "reset_sweep": "hard,soft,trained", - "bits_sweep": "0,4,2", - "baseline": true, - "bench": true, - "bench_warmup": 10, - "bench_iters": 50, - "bench_train_steps": 20, - "sampling_rate": 250.0 - } - }, + "key": "opt05_bitpack_popcount/spike_reg_1e-3", + "tag": "spike_reg_1e-3", + "script": "opt05_bitpack_popcount.py", + "hf_folder": "applied/opt05_bitpack_popcount", + "phase": 4, + "status": "failed", + "duration_s": 287.7, + "optimization_summary": null, "zip": { - "name": "control_baseline.zip", - "files": 78, - "bytes": 7975348, - "MB": 8.0, - "sha256": "4186ff3945005fa15ca75a27d3ef1dcacb7656ee24e417d75076703e65e0cf74" + "name": "FAILED_spike_reg_1e-3.zip", + "files": 76, + "bytes": 10440792, + "MB": 10.4, + "sha256": "85cce53a47439464a1965790733fbfb484763f99523930f88c8d1fc044d939e8" } } ] \ No newline at end of file