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" @@ -1073,536 +1073,131 @@ } }, { - "key": "opt06_uticket_prune/prune_readout", - "tag": "prune_readout", - "script": "opt06_uticket_prune.py", - "hf_folder": "applied/opt06_uticket_prune", - "phase": 9, + "key": "opt02_seenn_bayes/conf_temp_4", + "tag": "conf_temp_4", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 582.6, + "duration_s": 616.4, "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": "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.4135714285714286, - "test_target_acc": 0.4135714285714286, - "best_val_acc": 0.9335714285714286 + "test_acc": 0.9278571428571428, + "test_target_acc": 0.9278571428571428, + "best_val_acc": 0.9264285714285714 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 104257.90097402596, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.0008498694191982239, - "syn_ops_per_inference_dense_fanout": 65062433.861201294, - "weight_sparsity": 0.9917057400354758, - "effective_ticks": 11.177142857142858, + "syn_ops_per_inference": 3638325.674512987, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.029351940656890448, + "syn_ops_per_inference_dense_fanout": 65214943.461038955, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 4.575714285714286, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 94.6925303999933, - "infer_ms_per_sample": 0.6165744149999597, - "peak_vram_mb": 2836.776448, - "weight_bytes_nonzero": 40703 + "train_ms_per_step": 187.23959922790527, + "infer_ms_per_sample": 0.6532642859310361, + "peak_vram_mb": 10914.677248, + "syn_ops_per_inference_early_exit": 1640777.8961038962 }, "optimization_specific": { - "pruning_enabled": true, - "balance_enabled": true, - "rounds": 5, - "final_sparsity": 0.9917049248747913, - "nnz_per_layer": { - "layer0": 640, - "layer1": 5120, - "layer2": 4096, - "readout": 320 + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.9, + "conf_temp": 4.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": 4.575714285714286, + "mean_exit_ms": 228.78571428571428, + "ticks_saved_frac": 0.9542428571428572, + "exit_tick_histogram": { + "counts": [ + 1339, + 54, + 5, + 2, + 0, + 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 + ] }, - "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 - }, - "readout": { - "mean_nnz": 8.0, - "max_nnz": 8.0, - "min_nnz": 8.0, - "total_nnz": 320, - "numel": 10240, - "sparsity": 0.96875, - "utilization": 1.0 - } + "acc_fc_only": 0.9278571428571428, + "acc_ic_only": 0.9364285714285714, + "acc_fused": 0.935, + "acc_early_exit": 0.25214285714285717, + "syn_ops_saved_frac": 0.5490294044874021, + "syn_per_inference_early_exit": 1640777.8961038962, + "anytime_acc": { + "0.25": 0.62, + "0.5": 0.8178571428571428, + "0.75": 0.8885714285714286, + "1.0": 0.9278571428571428 }, - "pe_utilization_final": 1.0, - "pe_utilization_lth": 0.5667460317460318, - "pe_utilization_uticket": 1.0, - "latency_proxy_dense": 3968, - "latency_proxy_final": 36, - "latency_reduction_frac": 0.9909274193548387, - "rounds_history": [ - { - "round": 1, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 36.0, - "max_nnz": 47.0, - "min_nnz": 25.0, - "total_nnz": 11520, - "numel": 921600, - "sparsity": 0.9875, - "utilization": 0.7659574468085106 - }, - "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": 180.0, - "min_nnz": 123.0, - "total_nnz": 81920, - "numel": 163840, - "sparsity": 0.5, - "utilization": 0.8888888888888888 - }, - "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": 288.0, - "min_nnz": 210.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 0.8888888888888888 - }, - "uticket": { - "mean_nnz": 256.0, - "max_nnz": 256.0, - "min_nnz": 256.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 1.0 - } - }, - "readout": { - "lth": { - "mean_nnz": 128.0, - "max_nnz": 143.0, - "min_nnz": 117.0, - "total_nnz": 5120, - "numel": 10240, - "sparsity": 0.5, - "utilization": 0.8951048951048951 - }, - "uticket": { - "mean_nnz": 128.0, - "max_nnz": 128.0, - "min_nnz": 128.0, - "total_nnz": 5120, - "numel": 10240, - "sparsity": 0.5, - "utilization": 1.0 - } - } - }, - "latency_proxy": 580, - "sparsity": 0.8662353923205343 - }, - { - "round": 2, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 18.0, - "max_nnz": 28.0, - "min_nnz": 10.0, - "total_nnz": 5760, - "numel": 921600, - "sparsity": 0.99375, - "utilization": 0.6428571428571429 - }, - "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": 104.0, - "min_nnz": 33.0, - "total_nnz": 40960, - "numel": 163840, - "sparsity": 0.75, - "utilization": 0.7692307692307693 - }, - "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": 161.0, - "min_nnz": 93.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 0.7950310559006211 - }, - "uticket": { - "mean_nnz": 128.0, - "max_nnz": 128.0, - "min_nnz": 128.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 1.0 - } - }, - "readout": { - "lth": { - "mean_nnz": 64.0, - "max_nnz": 74.0, - "min_nnz": 56.0, - "total_nnz": 2560, - "numel": 10240, - "sparsity": 0.75, - "utilization": 0.8648648648648649 - }, - "uticket": { - "mean_nnz": 64.0, - "max_nnz": 64.0, - "min_nnz": 64.0, - "total_nnz": 2560, - "numel": 10240, - "sparsity": 0.75, - "utilization": 1.0 - } - } - }, - "latency_proxy": 290, - "sparsity": 0.9331176961602671 - }, - { - "round": 3, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 9.0, - "max_nnz": 18.0, - "min_nnz": 1.0, - "total_nnz": 2880, - "numel": 921600, - "sparsity": 0.996875, - "utilization": 0.5 - }, - "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": 64.0, - "min_nnz": 2.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 0.625 - }, - "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": 38.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 - } - }, - "readout": { - "lth": { - "mean_nnz": 32.0, - "max_nnz": 38.0, - "min_nnz": 26.0, - "total_nnz": 1280, - "numel": 10240, - "sparsity": 0.875, - "utilization": 0.8421052631578947 - }, - "uticket": { - "mean_nnz": 32.0, - "max_nnz": 32.0, - "min_nnz": 32.0, - "total_nnz": 1280, - "numel": 10240, - "sparsity": 0.875, - "utilization": 1.0 - } - } - }, - "latency_proxy": 145, - "sparsity": 0.9665588480801336 - }, - { - "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": 45.0, - "min_nnz": 12.0, - "total_nnz": 8192, - "numel": 131072, - "sparsity": 0.9375, - "utilization": 0.7111111111111111 - }, - "uticket": { - "mean_nnz": 32.0, - "max_nnz": 32.0, - "min_nnz": 32.0, - "total_nnz": 8192, - "numel": 131072, - "sparsity": 0.9375, - "utilization": 1.0 - } - }, - "readout": { - "lth": { - "mean_nnz": 16.0, - "max_nnz": 28.0, - "min_nnz": 11.0, - "total_nnz": 640, - "numel": 10240, - "sparsity": 0.9375, - "utilization": 0.5714285714285714 - }, - "uticket": { - "mean_nnz": 16.0, - "max_nnz": 16.0, - "min_nnz": 16.0, - "total_nnz": 640, - "numel": 10240, - "sparsity": 0.9375, - "utilization": 1.0 - } - } - }, - "latency_proxy": 72, - "sparsity": 0.9834098497495827 - }, - { - "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": 18.0, - "min_nnz": 0.0, - "total_nnz": 5120, - "numel": 163840, - "sparsity": 0.96875, - "utilization": 0.5555555555555556 - }, - "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": 25.0, - "min_nnz": 0.0, - "total_nnz": 4096, - "numel": 131072, - "sparsity": 0.96875, - "utilization": 0.64 - }, - "uticket": { - "mean_nnz": 16.0, - "max_nnz": 16.0, - "min_nnz": 16.0, - "total_nnz": 4096, - "numel": 131072, - "sparsity": 0.96875, - "utilization": 1.0 - } - }, - "readout": { - "lth": { - "mean_nnz": 8.0, - "max_nnz": 14.0, - "min_nnz": 3.0, - "total_nnz": 320, - "numel": 10240, - "sparsity": 0.96875, - "utilization": 0.5714285714285714 - }, - "uticket": { - "mean_nnz": 8.0, - "max_nnz": 8.0, - "min_nnz": 8.0, - "total_nnz": 320, - "numel": 10240, - "sparsity": 0.96875, - "utilization": 1.0 - } - } - }, - "latency_proxy": 36, - "sparsity": 0.9917049248747913 + "pareto": [ + { + "conf": 0.5, + "mean_ticks": 3.902142857142857, + "acc": 0.22357142857142856, + "syn_ops": 1613080.9172077922 + }, + { + "conf": 0.7, + "mean_ticks": 4.2371428571428575, + "acc": 0.23857142857142857, + "syn_ops": 1626802.577922078 + }, + { + "conf": 0.8, + "mean_ticks": 4.365, + "acc": 0.245, + "syn_ops": 1632438.9545454546 + }, + { + "conf": 0.9, + "mean_ticks": 4.575714285714286, + "acc": 0.25214285714285717, + "syn_ops": 1640777.924512987 + }, + { + "conf": 0.95, + "mean_ticks": 4.854285714285714, + "acc": 0.26071428571428573, + "syn_ops": 1651982.8961038962 + }, + { + "conf": 0.99, + "mean_ticks": 6.857857142857143, + "acc": 0.3357142857142857, + "syn_ops": 1728711.8571428573 } - ], - "latency_proxy_lth": 61, - "latency_reduction_vs_lth_frac": 0.4098360655737705 + ] }, "config": { "method": "harmonic_matched", @@ -1642,321 +1237,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt06_uticket_prune/prune_readout", - "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, - "prune_rounds": 5, - "prune_rate": 0.5, - "rewind_epoch": 1, - "balance": true, - "balance_iters": 2, - "prune_readout": true, + "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.9, + "conf_temp": 4.0, + "conf_sweep": "0.5,0.7,0.8,0.9,0.95,0.99", + "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/conf_temp_4", + "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": "prune_readout.zip", + "name": "conf_temp_4.zip", "files": 81, - "bytes": 8103773, - "MB": 8.1, - "sha256": "71a4d931df327896a7f5538c47ae56a8c6d2a773250c37ea42d325f453d2355a" + "bytes": 12640717, + "MB": 12.6, + "sha256": "a9f16ef1db8ee6c4c51113bece56694dc7dd17feb4b73d57c99a3dad1b66ca71" } }, { - "key": "opt06_uticket_prune/prune_rounds_3", - "tag": "prune_rounds_3", - "script": "opt06_uticket_prune.py", - "hf_folder": "applied/opt06_uticket_prune", - "phase": 9, + "key": "opt02_seenn_bayes/fusion_prior_2x", + "tag": "fusion_prior_2x", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 320.7, + "duration_s": 609.0, "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": "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.9057142857142857, - "test_target_acc": 0.9057142857142857, - "best_val_acc": 0.9407142857142857 + "test_acc": 0.9271428571428572, + "test_target_acc": 0.9271428571428572, + "best_val_acc": 0.9307142857142857 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 550376.6811079546, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.004486454320905567, - "syn_ops_per_inference_dense_fanout": 65058668.56331169, - "weight_sparsity": 0.9592550083472454, - "effective_ticks": 13.450714285714286, + "syn_ops_per_inference": 3657479.1964285714, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.02950646036978337, + "syn_ops_per_inference_dense_fanout": 65234096.98295455, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 7.784285714285715, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 94.40872569999783, - "infer_ms_per_sample": 0.6202037340624855, - "peak_vram_mb": 2837.544448, - "weight_bytes_nonzero": 160314 + "train_ms_per_step": 185.8240008354187, + "infer_ms_per_sample": 0.6510175053198733, + "peak_vram_mb": 10914.386944, + "syn_ops_per_inference_early_exit": 1785947.325487013 }, "optimization_specific": { - "pruning_enabled": true, - "balance_enabled": true, - "rounds": 3, - "final_sparsity": 0.9673295454545454, - "nnz_per_layer": { - "layer0": 2880, - "layer1": 20480, - "layer2": 16384 + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.9, + "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.784285714285715, + "mean_exit_ms": 389.2142857142857, + "ticks_saved_frac": 0.9221571428571429, + "exit_tick_histogram": { + "counts": [ + 1048, + 306, + 34, + 11, + 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 + ] }, - "pe_stats_per_layer": { - "layer0": { - "mean_nnz": 9.0, - "max_nnz": 9.0, - "min_nnz": 9.0, - "total_nnz": 2880, - "numel": 921600, - "sparsity": 0.996875, - "utilization": 1.0 - }, - "layer1": { - "mean_nnz": 40.0, - "max_nnz": 40.0, - "min_nnz": 40.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 1.0 - }, - "layer2": { - "mean_nnz": 64.0, - "max_nnz": 64.0, - "min_nnz": 64.0, - "total_nnz": 16384, - "numel": 131072, - "sparsity": 0.875, - "utilization": 1.0 - } + "acc_fc_only": 0.9271428571428572, + "acc_ic_only": 0.9357142857142857, + "acc_fused": 0.9357142857142857, + "acc_early_exit": 0.37714285714285717, + "syn_ops_saved_frac": 0.5116999360567951, + "syn_per_inference_early_exit": 1785947.325487013, + "anytime_acc": { + "0.25": 0.6264285714285714, + "0.5": 0.8178571428571428, + "0.75": 0.8921428571428571, + "1.0": 0.9271428571428572 }, - "pe_utilization_final": 1.0, - "pe_utilization_lth": 0.623062015503876, - "pe_utilization_uticket": 1.0, - "latency_proxy_dense": 3712, - "latency_proxy_final": 113, - "latency_reduction_frac": 0.9695581896551724, - "rounds_history": [ - { - "round": 1, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 36.0, - "max_nnz": 49.0, - "min_nnz": 25.0, - "total_nnz": 11520, - "numel": 921600, - "sparsity": 0.9875, - "utilization": 0.7346938775510204 - }, - "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": 190.0, - "min_nnz": 93.0, - "total_nnz": 81920, - "numel": 163840, - "sparsity": 0.5, - "utilization": 0.8421052631578947 - }, - "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": 297.0, - "min_nnz": 193.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 0.8619528619528619 - }, - "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": 29.0, - "min_nnz": 8.0, - "total_nnz": 5760, - "numel": 921600, - "sparsity": 0.99375, - "utilization": 0.6206896551724138 - }, - "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": 115.0, - "min_nnz": 28.0, - "total_nnz": 40960, - "numel": 163840, - "sparsity": 0.75, - "utilization": 0.6956521739130435 - }, - "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": 157.0, - "min_nnz": 99.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 0.8152866242038217 - }, - "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": 18.0, - "min_nnz": 1.0, - "total_nnz": 2880, - "numel": 921600, - "sparsity": 0.996875, - "utilization": 0.5 - }, - "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": 64.0, - "min_nnz": 6.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 0.625 - }, - "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": 86.0, - "min_nnz": 45.0, - "total_nnz": 16384, - "numel": 131072, - "sparsity": 0.875, - "utilization": 0.7441860465116279 - }, - "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 + "pareto": [ + { + "conf": 0.5, + "mean_ticks": 4.289285714285715, + "acc": 0.24571428571428572, + "syn_ops": 1647281.4212662338 + }, + { + "conf": 0.7, + "mean_ticks": 4.978571428571429, + "acc": 0.275, + "syn_ops": 1678001.2727272727 + }, + { + "conf": 0.8, + "mean_ticks": 5.852857142857143, + "acc": 0.3028571428571429, + "syn_ops": 1714795.320616883 + }, + { + "conf": 0.9, + "mean_ticks": 7.785, + "acc": 0.37714285714285717, + "syn_ops": 1785960.5300324673 + }, + { + "conf": 0.95, + "mean_ticks": 10.002142857142857, + "acc": 0.45071428571428573, + "syn_ops": 1850843.49512987 + }, + { + "conf": 0.99, + "mean_ticks": 14.499285714285714, + "acc": 0.5742857142857143, + "syn_ops": 1959679.1558441557 } - ], - "latency_proxy_lth": 168, - "latency_reduction_vs_lth_frac": 0.32738095238095233 + ] }, "config": { "method": "harmonic_matched", @@ -1996,656 +1433,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt06_uticket_prune/prune_rounds_3", - "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, - "prune_rounds": 3, - "prune_rate": 0.5, - "rewind_epoch": 1, - "balance": true, - "balance_iters": 2, - "prune_readout": false, + "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": 2.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/fusion_prior_2x", + "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": "prune_rounds_3.zip", + "name": "fusion_prior_2x.zip", "files": 81, - "bytes": 8378826, - "MB": 8.4, - "sha256": "4f95cb87dd3ae4936d31d4c1e94317cb6a26fbeb7da655363811df3a91cd6bf8" + "bytes": 12637636, + "MB": 12.6, + "sha256": "fc6050fb762f5c1e2b45dd261c259362087f7598c1df1884b7b7b97c019e13f4" } }, { - "key": "opt06_uticket_prune/prune_rounds_8", - "tag": "prune_rounds_8", - "script": "opt06_uticket_prune.py", - "hf_folder": "applied/opt06_uticket_prune", - "phase": 9, + "key": "opt02_seenn_bayes/ic_layer_1", + "tag": "ic_layer_1", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 322.7, + "duration_s": 609.7, "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": "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.18428571428571427, - "test_target_acc": 0.18428571428571427, - "best_val_acc": 0.9142857142857143 + "test_acc": 0.9278571428571428, + "test_target_acc": 0.9278571428571428, + "best_val_acc": 0.9321428571428572 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 129797.51948051948, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.0010580583482278365, - "syn_ops_per_inference_dense_fanout": 65036167.55113637, - "weight_sparsity": 0.9907585233201168, - "effective_ticks": 16.09857142857143, + "syn_ops_per_inference": 3613774.1201298703, + "dense_macs_per_inference": 124723200.0, + "event_fraction_of_dense": 0.02897435377002731, + "syn_ops_per_inference_dense_fanout": 65190391.90665584, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 8.52, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 94.60634120000577, - "infer_ms_per_sample": 0.6177368868750222, - "peak_vram_mb": 2839.143424, - "weight_bytes_nonzero": 4453 + "train_ms_per_step": 185.69024801254272, + "infer_ms_per_sample": 0.6491338937126812, + "peak_vram_mb": 10916.063744, + "syn_ops_per_inference_early_exit": 1842881.0933441557 }, "optimization_specific": { - "pruning_enabled": true, - "balance_enabled": true, - "rounds": 8, - "final_sparsity": 0.9990924873737373, - "nnz_per_layer": { - "layer0": 80, - "layer1": 512, - "layer2": 512 + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.9, + "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": 1, + "mean_exit_tick": 8.52, + "mean_exit_ms": 426.0, + "ticks_saved_frac": 0.9148000000000001, + "exit_tick_histogram": { + "counts": [ + 970, + 375, + 48, + 7, + 0, + 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 + ] }, - "pe_stats_per_layer": { - "layer0": { - "mean_nnz": 0.25, - "max_nnz": 1.0, - "min_nnz": 0.0, - "total_nnz": 80, - "numel": 921600, - "sparsity": 0.9999131944444445, - "utilization": 0.25 - }, - "layer1": { - "mean_nnz": 1.0, - "max_nnz": 1.0, - "min_nnz": 1.0, - "total_nnz": 512, - "numel": 163840, - "sparsity": 0.996875, - "utilization": 1.0 - }, - "layer2": { - "mean_nnz": 2.0, - "max_nnz": 2.0, - "min_nnz": 2.0, - "total_nnz": 512, - "numel": 131072, - "sparsity": 0.99609375, - "utilization": 1.0 - } + "acc_fc_only": 0.9278571428571428, + "acc_ic_only": 0.935, + "acc_fused": 0.935, + "acc_early_exit": 0.39785714285714285, + "syn_ops_saved_frac": 0.4900397667140505, + "syn_per_inference_early_exit": 1842881.0933441557, + "anytime_acc": { + "0.25": 0.6442857142857142, + "0.5": 0.8335714285714285, + "0.75": 0.8935714285714286, + "1.0": 0.9278571428571428 }, - "pe_utilization_final": 0.75, - "pe_utilization_lth": 0.4166666666666667, - "pe_utilization_uticket": 0.75, - "latency_proxy_dense": 3712, - "latency_proxy_final": 4, - "latency_reduction_frac": 0.9989224137931034, - "rounds_history": [ - { - "round": 1, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 36.0, - "max_nnz": 49.0, - "min_nnz": 24.0, - "total_nnz": 11520, - "numel": 921600, - "sparsity": 0.9875, - "utilization": 0.7346938775510204 - }, - "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": 194.0, - "min_nnz": 134.0, - "total_nnz": 81920, - "numel": 163840, - "sparsity": 0.5, - "utilization": 0.8247422680412371 - }, - "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": 289.0, - "min_nnz": 203.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 0.8858131487889274 - }, - "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": 25.0, - "min_nnz": 9.0, - "total_nnz": 5760, - "numel": 921600, - "sparsity": 0.99375, - "utilization": 0.72 - }, - "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": 102.0, - "min_nnz": 41.0, - "total_nnz": 40960, - "numel": 163840, - "sparsity": 0.75, - "utilization": 0.7843137254901961 - }, - "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": 158.0, - "min_nnz": 80.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 0.810126582278481 - }, - "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": 15.0, - "min_nnz": 4.0, - "total_nnz": 2880, - "numel": 921600, - "sparsity": 0.996875, - "utilization": 0.6 - }, - "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": 57.0, - "min_nnz": 11.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 0.7017543859649122 - }, - "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": 84.0, - "min_nnz": 32.0, - "total_nnz": 16384, - "numel": 131072, - "sparsity": 0.875, - "utilization": 0.7619047619047619 - }, - "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": 34.0, - "min_nnz": 1.0, - "total_nnz": 10240, - "numel": 163840, - "sparsity": 0.9375, - "utilization": 0.5882352941176471 - }, - "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": 45.0, - "min_nnz": 18.0, - "total_nnz": 8192, - "numel": 131072, - "sparsity": 0.9375, - "utilization": 0.7111111111111111 - }, - "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": 17.0, - "min_nnz": 0.0, - "total_nnz": 5120, - "numel": 163840, - "sparsity": 0.96875, - "utilization": 0.5882352941176471 - }, - "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": 26.0, - "min_nnz": 9.0, - "total_nnz": 4096, - "numel": 131072, - "sparsity": 0.96875, - "utilization": 0.6153846153846154 - }, - "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 - }, - { - "round": 6, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 1.0, - "max_nnz": 2.0, - "min_nnz": 0.0, - "total_nnz": 320, - "numel": 921600, - "sparsity": 0.9996527777777777, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 1.0, - "max_nnz": 1.0, - "min_nnz": 1.0, - "total_nnz": 320, - "numel": 921600, - "sparsity": 0.9996527777777777, - "utilization": 1.0 - } - }, - "layer1": { - "lth": { - "mean_nnz": 5.0, - "max_nnz": 10.0, - "min_nnz": 0.0, - "total_nnz": 2560, - "numel": 163840, - "sparsity": 0.984375, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 5.0, - "max_nnz": 5.0, - "min_nnz": 5.0, - "total_nnz": 2560, - "numel": 163840, - "sparsity": 0.984375, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 8.0, - "max_nnz": 14.0, - "min_nnz": 3.0, - "total_nnz": 2048, - "numel": 131072, - "sparsity": 0.984375, - "utilization": 0.5714285714285714 - }, - "uticket": { - "mean_nnz": 8.0, - "max_nnz": 8.0, - "min_nnz": 8.0, - "total_nnz": 2048, - "numel": 131072, - "sparsity": 0.984375, - "utilization": 1.0 - } - } - }, - "latency_proxy": 14, - "sparsity": 0.9959490740740741 - }, - { - "round": 7, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 0.5, - "max_nnz": 1.0, - "min_nnz": 0.0, - "total_nnz": 160, - "numel": 921600, - "sparsity": 0.9998263888888889, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 0.5, - "max_nnz": 1.0, - "min_nnz": 0.0, - "total_nnz": 160, - "numel": 921600, - "sparsity": 0.9998263888888889, - "utilization": 0.5 - } - }, - "layer1": { - "lth": { - "mean_nnz": 2.5, - "max_nnz": 5.0, - "min_nnz": 0.0, - "total_nnz": 1280, - "numel": 163840, - "sparsity": 0.9921875, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 2.0, - "max_nnz": 2.0, - "min_nnz": 2.0, - "total_nnz": 1024, - "numel": 163840, - "sparsity": 0.99375, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 4.0, - "max_nnz": 7.0, - "min_nnz": 1.0, - "total_nnz": 1024, - "numel": 131072, - "sparsity": 0.9921875, - "utilization": 0.5714285714285714 - }, - "uticket": { - "mean_nnz": 4.0, - "max_nnz": 4.0, - "min_nnz": 4.0, - "total_nnz": 1024, - "numel": 131072, - "sparsity": 0.9921875, - "utilization": 1.0 - } - } - }, - "latency_proxy": 7, - "sparsity": 0.9981849747474747 - }, - { - "round": 8, - "layers": { - "layer0": { - "lth": { - "mean_nnz": 0.25, - "max_nnz": 1.0, - "min_nnz": 0.0, - "total_nnz": 80, - "numel": 921600, - "sparsity": 0.9999131944444445, - "utilization": 0.25 - }, - "uticket": { - "mean_nnz": 0.25, - "max_nnz": 1.0, - "min_nnz": 0.0, - "total_nnz": 80, - "numel": 921600, - "sparsity": 0.9999131944444445, - "utilization": 0.25 - } - }, - "layer1": { - "lth": { - "mean_nnz": 1.0, - "max_nnz": 2.0, - "min_nnz": 0.0, - "total_nnz": 512, - "numel": 163840, - "sparsity": 0.996875, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 1.0, - "max_nnz": 1.0, - "min_nnz": 1.0, - "total_nnz": 512, - "numel": 163840, - "sparsity": 0.996875, - "utilization": 1.0 - } - }, - "layer2": { - "lth": { - "mean_nnz": 2.0, - "max_nnz": 4.0, - "min_nnz": 0.0, - "total_nnz": 512, - "numel": 131072, - "sparsity": 0.99609375, - "utilization": 0.5 - }, - "uticket": { - "mean_nnz": 2.0, - "max_nnz": 2.0, - "min_nnz": 2.0, - "total_nnz": 512, - "numel": 131072, - "sparsity": 0.99609375, - "utilization": 1.0 - } - } - }, - "latency_proxy": 4, - "sparsity": 0.9990924873737373 + "pareto": [ + { + "conf": 0.5, + "mean_ticks": 3.99, + "acc": 0.2307142857142857, + "syn_ops": 1674774.195616883 + }, + { + "conf": 0.7, + "mean_ticks": 5.156428571428571, + "acc": 0.2742857142857143, + "syn_ops": 1725540.0787337662 + }, + { + "conf": 0.8, + "mean_ticks": 6.271428571428571, + "acc": 0.32, + "syn_ops": 1770739.0535714284 + }, + { + "conf": 0.9, + "mean_ticks": 8.519285714285715, + "acc": 0.39785714285714285, + "syn_ops": 1842866.4797077922 + }, + { + "conf": 0.95, + "mean_ticks": 10.811428571428571, + "acc": 0.4764285714285714, + "syn_ops": 1903597.862012987 + }, + { + "conf": 0.99, + "mean_ticks": 14.98857142857143, + "acc": 0.5942857142857143, + "syn_ops": 1996385.5430194808 } - ], - "latency_proxy_lth": 7, - "latency_reduction_vs_lth_frac": 0.4285714285714286 + ] }, "config": { "method": "harmonic_matched", @@ -2685,1544 +1629,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt06_uticket_prune/prune_rounds_8", - "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, - "prune_rounds": 8, - "prune_rate": 0.5, - "rewind_epoch": 1, - "balance": true, - "balance_iters": 2, - "prune_readout": false, - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "prune_rounds_8.zip", - "files": 81, - "bytes": 7983037, - "MB": 8.0, - "sha256": "477e6120957d9a5697e3cc386ecc6dce0c2c61b98a383a8e903d9e83590962cc" - } - }, - { - "key": "opt06_uticket_prune/rewind_epoch_0", - "tag": "rewind_epoch_0", - "script": "opt06_uticket_prune.py", - "hf_folder": "applied/opt06_uticket_prune", - "phase": 9, - "status": "ok", - "duration_s": 321.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": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.7814285714285715, - "test_target_acc": 0.7814285714285715, - "best_val_acc": 0.9264285714285714 - }, - "efficiency": { - "spikes_per_inference": null, - "syn_ops_per_inference": 216478.7705965909, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.0017646498281363382, - "syn_ops_per_inference_dense_fanout": 65202982.11444805, - "weight_sparsity": 0.983618530884808, - "effective_ticks": 12.964285714285714, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 94.85441450001417, - "infer_ms_per_sample": 0.6180852540624926, - "peak_vram_mb": 2837.810688, - "weight_bytes_nonzero": 39755 - }, - "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 - } - }, - "pe_utilization_final": 1.0, - "pe_utilization_lth": 0.5554385964912281, - "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": 27.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": 189.0, - "min_nnz": 123.0, - "total_nnz": 81920, - "numel": 163840, - "sparsity": 0.5, - "utilization": 0.8465608465608465 - }, - "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": 292.0, - "min_nnz": 197.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 0.8767123287671232 - }, - "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": 9.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": 110.0, - "min_nnz": 32.0, - "total_nnz": 40960, - "numel": 163840, - "sparsity": 0.75, - "utilization": 0.7272727272727273 - }, - "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": 161.0, - "min_nnz": 90.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 0.7950310559006211 - }, - "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": 63.0, - "min_nnz": 3.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 0.6349206349206349 - }, - "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": 81.0, - "min_nnz": 40.0, - "total_nnz": 16384, - "numel": 131072, - "sparsity": 0.875, - "utilization": 0.7901234567901234 - }, - "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": 34.0, - "min_nnz": 0.0, - "total_nnz": 10240, - "numel": 163840, - "sparsity": 0.9375, - "utilization": 0.5882352941176471 - }, - "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": 20.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": 25.0, - "min_nnz": 5.0, - "total_nnz": 4096, - "numel": 131072, - "sparsity": 0.96875, - "utilization": 0.64 - }, - "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 - } - ], - "latency_proxy_lth": 48, - "latency_reduction_vs_lth_frac": 0.41666666666666663 - }, - "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/opt06_uticket_prune/rewind_epoch_0", - "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, - "prune_rounds": 5, - "prune_rate": 0.5, - "rewind_epoch": 0, - "balance": true, - "balance_iters": 2, - "prune_readout": false, - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "rewind_epoch_0.zip", - "files": 81, - "bytes": 8131993, - "MB": 8.1, - "sha256": "2759d4be6c9db943f9a4bdcb3c0501243b30044c7b1df1e065f9089899f000db" - } - }, - { - "key": "opt06_uticket_prune/rewind_epoch_5", - "tag": "rewind_epoch_5", - "script": "opt06_uticket_prune.py", - "hf_folder": "applied/opt06_uticket_prune", - "phase": 9, - "status": "ok", - "duration_s": 321.7, - "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": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.77, - "test_target_acc": 0.77, - "best_val_acc": 0.9257142857142857 - }, - "efficiency": { - "spikes_per_inference": null, - "syn_ops_per_inference": 216033.23041801946, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.001761017959767088, - "syn_ops_per_inference_dense_fanout": 65245333.36607143, - "weight_sparsity": 0.983618530884808, - "effective_ticks": 13.376428571428571, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 95.69244695001089, - "infer_ms_per_sample": 0.6242595653125704, - "peak_vram_mb": 2837.865472, - "weight_bytes_nonzero": 39755 - }, - "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 - } - }, - "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": 189.0, - "min_nnz": 126.0, - "total_nnz": 81920, - "numel": 163840, - "sparsity": 0.5, - "utilization": 0.8465608465608465 - }, - "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": 288.0, - "min_nnz": 214.0, - "total_nnz": 65536, - "numel": 131072, - "sparsity": 0.5, - "utilization": 0.8888888888888888 - }, - "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": 28.0, - "min_nnz": 10.0, - "total_nnz": 5760, - "numel": 921600, - "sparsity": 0.99375, - "utilization": 0.6428571428571429 - }, - "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": 103.0, - "min_nnz": 31.0, - "total_nnz": 40960, - "numel": 163840, - "sparsity": 0.75, - "utilization": 0.7766990291262136 - }, - "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": 155.0, - "min_nnz": 99.0, - "total_nnz": 32768, - "numel": 131072, - "sparsity": 0.75, - "utilization": 0.8258064516129032 - }, - "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": 2.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": 63.0, - "min_nnz": 0.0, - "total_nnz": 20480, - "numel": 163840, - "sparsity": 0.875, - "utilization": 0.6349206349206349 - }, - "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": 83.0, - "min_nnz": 44.0, - "total_nnz": 16384, - "numel": 131072, - "sparsity": 0.875, - "utilization": 0.7710843373493976 - }, - "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": 43.0, - "min_nnz": 19.0, - "total_nnz": 8192, - "numel": 131072, - "sparsity": 0.9375, - "utilization": 0.7441860465116279 - }, - "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": 7.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 - } - ], - "latency_proxy_lth": 46, - "latency_reduction_vs_lth_frac": 0.3913043478260869 - }, - "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/opt06_uticket_prune/rewind_epoch_5", - "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, - "prune_rounds": 5, - "prune_rate": 0.5, - "rewind_epoch": 5, - "balance": true, - "balance_iters": 2, - "prune_readout": false, - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "rewind_epoch_5.zip", - "files": 81, - "bytes": 8032799, - "MB": 8.0, - "sha256": "1d7273c1361cb8ae29ebdbf7f2044317537adba581891a63ec662bd9b3b8d948" - } - }, - { - "key": "opt07_sfa_integer_train/hard_reset_D1", - "tag": "hard_reset_D1", - "script": "opt07_sfa_integer_train.py", - "hf_folder": "applied/opt07_sfa_integer_train", - "phase": 9, - "status": "ok", - "duration_s": 333.6, - "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": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.9457142857142857, - "test_target_acc": 0.9457142857142857, - "best_val_acc": 0.9464285714285714 - }, - "efficiency": { - "spikes_per_inference": null, - "syn_ops_per_inference": 3248166.6850649347, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.02647777778283577, - "syn_ops_per_inference_dense_fanout": 64824784.47159091, - "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.107142857142858, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 93.90855915000884, - "infer_ms_per_sample": 0.6246371478124502, - "peak_vram_mb": 2828.755968 - }, - "optimization_specific": { - "sfa_levels_D": 1, - "soft_reset": false, - "storm_reg": 0.001, - "trained_T": 100, - "infer_mode": "graded", - "min_ticks_within_1pct_of_full": 100, - "speedup_at_min_ticks": 1.0, - "full_T_acc": 0.9457142857142857, - "t_sweep_rows": [ - { - "T": 4, - "acc": 0.28214285714285714, - "syn_per_inference": 1865061.2053571427, - "dense_per_inference": 4907008.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 25.0 - }, - { - "T": 8, - "acc": 0.5857142857142857, - "syn_per_inference": 2043636.288961039, - "dense_per_inference": 9814016.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 12.5 - }, - { - "T": 16, - "acc": 0.8035714285714286, - "syn_per_inference": 2325766.0089285714, - "dense_per_inference": 19628032.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 6.25 - }, - { - "T": 25, - "acc": 0.8757142857142857, - "syn_per_inference": 2540783.9699675324, - "dense_per_inference": 30668800.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 4.0 - }, - { - "T": 50, - "acc": 0.93, - "syn_per_inference": 2887393.0584415584, - "dense_per_inference": 61337600.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 2.0 - }, - { - "T": 100, - "acc": 0.9457142857142857, - "syn_per_inference": 3248166.713474026, - "dense_per_inference": 122675200.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 1.0 - } - ], - "storm_ratio_peak_over_mean": 4.402592156354595, - "tick_activity_cv": 0.7492657914512895, - "mean_integer_activation": 0.07816793096872668, - "frac_activations_gt1": 0.0, - "max_activation": 1.0, - "per_layer_activity": [ - { - "layer": 0, - "mean_integer_activation": 0.064309815550223, - "peak_tick_activation": 0.28312988951802254, - "storm_ratio": 4.402592156354595, - "tick_activity_cv": 0.7492657914512895, - "frac_activations_gt1": 0.0, - "max_activation": 1.0 - }, - { - "layer": 1, - "mean_integer_activation": 0.036434059143066404, - "peak_tick_activation": 0.07265853881835938, - "storm_ratio": 1.9942477046833988, - "tick_activity_cv": 0.22539867053210047, - "frac_activations_gt1": 0.0, - "max_activation": 1.0 - }, - { - "layer": 2, - "mean_integer_activation": 0.13375991821289063, - "peak_tick_activation": 0.158294677734375, - "storm_ratio": 1.183423852595627, - "tick_activity_cv": 0.12266443917391988, - "frac_activations_gt1": 0.0, - "max_activation": 1.0 - } - ], - "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" - }, - "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/opt07_sfa_integer_train/hard_reset_D1", - "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, - "sfa_levels": 4, - "soft_reset": false, - "storm_reg": 0.001, - "infer_mode": "graded", - "t_sweep": "4,8,16,25,50,100", - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "hard_reset_D1.zip", - "files": 81, - "bytes": 12247474, - "MB": 12.2, - "sha256": "14ec9f04c11682c9afbfa8aa48edc10a0d1b46c0b71aa2f5fc9f393b5519c9ad" - } - }, - { - "key": "opt07_sfa_integer_train/infer_expanded", - "tag": "infer_expanded", - "script": "opt07_sfa_integer_train.py", - "hf_folder": "applied/opt07_sfa_integer_train", - "phase": 9, - "status": "ok", - "duration_s": 361.5, - "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": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.9264285714285714, - "test_target_acc": 0.9264285714285714, - "best_val_acc": 0.93 - }, - "efficiency": { - "spikes_per_inference": null, - "syn_ops_per_inference": 5329171.874188311, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.043441313926435916, - "syn_ops_per_inference_dense_fanout": 66905789.66071429, - "weight_sparsity": 0.7324707846410685, - "effective_ticks": 4.7178571428571425, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 98.45181450000382, - "infer_ms_per_sample": 0.660058239062522, - "peak_vram_mb": 2832.446464 - }, - "optimization_specific": { - "sfa_levels_D": 4, - "soft_reset": true, - "storm_reg": 0.001, - "trained_T": 100, - "infer_mode": "expanded", - "min_ticks_within_1pct_of_full": 100, - "speedup_at_min_ticks": 1.0, - "full_T_acc": 0.9264285714285714, - "t_sweep_rows": [ - { - "T": 4, - "acc": 0.16, - "syn_per_inference": 2778669.6290584416, - "dense_per_inference": 4907008.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 25.0 - }, - { - "T": 8, - "acc": 0.2892857142857143, - "syn_per_inference": 3495133.1233766233, - "dense_per_inference": 9814016.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 12.5 - }, - { - "T": 16, - "acc": 0.5628571428571428, - "syn_per_inference": 4105260.607142857, - "dense_per_inference": 19628032.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 6.25 - }, - { - "T": 25, - "acc": 0.765, - "syn_per_inference": 4387251.887987013, - "dense_per_inference": 30668800.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 4.0 - }, - { - "T": 50, - "acc": 0.8835714285714286, - "syn_per_inference": 4760043.469155844, - "dense_per_inference": 61337600.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 2.0 - }, - { - "T": 100, - "acc": 0.9264285714285714, - "syn_per_inference": 5327084.303571429, - "dense_per_inference": 122675200.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 1.0 - } - ], - "storm_ratio_peak_over_mean": 3.6731897953532338, - "tick_activity_cv": 0.5687552774544564, - "mean_integer_activation": 0.10272448336705566, - "frac_activations_gt1": 0.021054688608273864, - "max_activation": 4.0, - "per_layer_activity": [ - { - "layer": 0, - "mean_integer_activation": 0.18541565285995604, - "peak_tick_activation": 0.640545666217804, - "storm_ratio": 3.454647201234981, - "tick_activity_cv": 0.5687552774544564, - "frac_activations_gt1": 0.021054688608273864, - "max_activation": 4.0 - }, - { - "layer": 1, - "mean_integer_activation": 0.04947120666503906, - "peak_tick_activation": 0.12639999389648438, - "storm_ratio": 2.555021444136521, - "tick_activity_cv": 0.3229986629594537, - "frac_activations_gt1": 0.00117851253162371, - "max_activation": 4.0 - }, - { - "layer": 2, - "mean_integer_activation": 0.07328659057617187, - "peak_tick_activation": 0.269195556640625, - "storm_ratio": 3.6731897953532338, - "tick_activity_cv": 0.5266420152224381, - "frac_activations_gt1": 0.0013648986277985387, - "max_activation": 4.0 - } - ], - "expanded_vs_graded_agreement": 1.0, - "expanded_acc": 0.9140625, - "graded_acc": 0.9140625, - "syn_ratio_expanded_over_graded": 1.0003622535345824, - "expansion_caveat": "exact only at beta=1 (IAF); with beta<1 the expanded mode applies decay per sub-tick and drifts" - }, - "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/opt07_sfa_integer_train/infer_expanded", + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_layer": 1, + "ic_loss_weight": 0.3, + "bayes_fusion": true, + "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/ic_layer_1", "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, - "sfa_levels": 4, - "soft_reset": true, - "storm_reg": 0.001, - "infer_mode": "expanded", - "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "infer_expanded.zip", + "name": "ic_layer_1.zip", "files": 81, - "bytes": 12257806, - "MB": 12.3, - "sha256": "ce5e194365b062cb3866b982931e820ee73fb98483e8b12a4970e99e56ca8bcf" + "bytes": 12859971, + "MB": 12.9, + "sha256": "98a8ce45dac9959cbbf7cd753b3711e1819bd3c4c7d767ae7eb71ba456bc39eb" } }, { - "key": "opt07_sfa_integer_train/storm_reg_1e-2", - "tag": "storm_reg_1e-2", - "script": "opt07_sfa_integer_train.py", - "hf_folder": "applied/opt07_sfa_integer_train", - "phase": 9, + "key": "opt02_seenn_bayes/ic_loss_0.1", + "tag": "ic_loss_0.1", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 352.7, + "duration_s": 606.7, "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": "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.9271428571428572, "test_target_acc": 0.9271428571428572, - "best_val_acc": 0.9257142857142857 + "best_val_acc": 0.9242857142857143 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 5481484.731331169, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.04468290845526372, - "syn_ops_per_inference_dense_fanout": 67058102.51785714, + "syn_ops_per_inference": 3436030.0146103892, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.027719934416711757, + "syn_ops_per_inference_dense_fanout": 65012647.80113637, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 3.505714285714286, + "effective_ticks": 7.478571428571429, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 98.8862052499826, - "infer_ms_per_sample": 0.6657202099999893, - "peak_vram_mb": 2833.100288 + "train_ms_per_step": 184.88277196884155, + "infer_ms_per_sample": 0.6457533518872668, + "peak_vram_mb": 10912.55296, + "syn_ops_per_inference_early_exit": 1629213.7150974027 }, "optimization_specific": { - "sfa_levels_D": 4, - "soft_reset": true, - "storm_reg": 0.01, - "trained_T": 100, - "infer_mode": "graded", - "min_ticks_within_1pct_of_full": 100, - "speedup_at_min_ticks": 1.0, - "full_T_acc": 0.9271428571428572, - "t_sweep_rows": [ - { - "T": 4, - "acc": 0.21571428571428572, - "syn_per_inference": 2678610.4642857146, - "dense_per_inference": 4907008.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 25.0 - }, - { - "T": 8, - "acc": 0.3557142857142857, - "syn_per_inference": 3344226.649350649, - "dense_per_inference": 9814016.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 12.5 - }, + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.9, + "conf_temp": 2.0, + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_loss_weight": 0.1, + "ic_layer": 0, + "mean_exit_tick": 7.478571428571429, + "mean_exit_ms": 373.92857142857144, + "ticks_saved_frac": 0.9252142857142858, + "exit_tick_histogram": { + "counts": [ + 1079, + 270, + 43, + 7, + 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.9271428571428572, + "acc_ic_only": 0.9357142857142857, + "acc_fused": 0.9314285714285714, + "acc_early_exit": 0.3657142857142857, + "syn_ops_saved_frac": 0.5258441549783321, + "syn_per_inference_early_exit": 1629213.7150974027, + "anytime_acc": { + "0.25": 0.6142857142857143, + "0.5": 0.825, + "0.75": 0.89, + "1.0": 0.9271428571428572 + }, + "pareto": [ { - "T": 16, - "acc": 0.6378571428571429, - "syn_per_inference": 3941638.6444805195, - "dense_per_inference": 19628032.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 6.25 + "conf": 0.5, + "mean_ticks": 4.1292857142857144, + "acc": 0.23142857142857143, + "syn_ops": 1500398.4293831168 }, { - "T": 25, - "acc": 0.7914285714285715, - "syn_per_inference": 4239864.0032467535, - "dense_per_inference": 30668800.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 4.0 + "conf": 0.7, + "mean_ticks": 4.82, + "acc": 0.26357142857142857, + "syn_ops": 1529523.75487013 }, { - "T": 50, - "acc": 0.8857142857142857, - "syn_per_inference": 4694799.851461039, - "dense_per_inference": 61337600.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 2.0 + "conf": 0.8, + "mean_ticks": 5.501428571428572, + "acc": 0.29214285714285715, + "syn_ops": 1558365.8676948054 }, { - "T": 100, - "acc": 0.9271428571428572, - "syn_per_inference": 5481484.731331169, - "dense_per_inference": 122675200.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 1.0 - } - ], - "storm_ratio_peak_over_mean": 3.003345709243902, - "tick_activity_cv": 0.46190065268000957, - "mean_integer_activation": 0.10574525063236555, - "frac_activations_gt1": 0.020694764563813806, - "max_activation": 4.0, - "per_layer_activity": [ - { - "layer": 0, - "mean_integer_activation": 0.19540179803967475, - "peak_tick_activation": 0.5868591517210007, - "storm_ratio": 3.003345709243902, - "tick_activity_cv": 0.46190065268000957, - "frac_activations_gt1": 0.020694764563813806, - "max_activation": 4.0 + "conf": 0.9, + "mean_ticks": 7.478571428571429, + "acc": 0.3657142857142857, + "syn_ops": 1629213.413961039 }, { - "layer": 1, - "mean_integer_activation": 0.04897125244140625, - "peak_tick_activation": 0.11265945434570312, - "storm_ratio": 2.3005222192448387, - "tick_activity_cv": 0.26290936311848917, - "frac_activations_gt1": 0.0010063552690553479, - "max_activation": 4.0 + "conf": 0.95, + "mean_ticks": 9.495714285714286, + "acc": 0.42928571428571427, + "syn_ops": 1689368.923701299 }, { - "layer": 2, - "mean_integer_activation": 0.07286270141601563, - "peak_tick_activation": 0.21881866455078125, - "storm_ratio": 3.0031643117569575, - "tick_activity_cv": 0.36416396678259205, - "frac_activations_gt1": 0.0011422729294281453, - "max_activation": 4.0 + "conf": 0.99, + "mean_ticks": 13.76, + "acc": 0.5578571428571428, + "syn_ops": 1796731.148538961 } - ], - "expanded_vs_graded_agreement": 0.9921875, - "expanded_acc": 0.90625, - "graded_acc": 0.90625, - "syn_ratio_expanded_over_graded": 1.0003618800383918, - "expansion_caveat": "exact only at beta=1 (IAF); with beta<1 the expanded mode applies decay per sub-tick and drifts" + ] }, "config": { "method": "harmonic_matched", @@ -4262,191 +1825,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt07_sfa_integer_train/storm_reg_1e-2", - "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, - "sfa_levels": 4, - "soft_reset": true, - "storm_reg": 0.01, - "infer_mode": "graded", - "t_sweep": "4,8,16,25,50,100", + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_layer": 0, + "ic_loss_weight": 0.1, + "bayes_fusion": true, + "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/ic_loss_0.1", + "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": "storm_reg_1e-2.zip", + "name": "ic_loss_0.1.zip", "files": 81, - "bytes": 12255265, - "MB": 12.3, - "sha256": "c2a25d9ee33de9bba942a4027d5d7df8d62fa45eb05f8d3d39e831de2f724632" + "bytes": 12641458, + "MB": 12.6, + "sha256": "eee45bc432ffd53ea313c17e39d1034457326176b0a2447f42b1ecf6ed5b52a5" } }, { - "key": "opt07_sfa_integer_train/t_sweep_ultra_low", - "tag": "t_sweep_ultra_low", - "script": "opt07_sfa_integer_train.py", - "hf_folder": "applied/opt07_sfa_integer_train", - "phase": 9, + "key": "opt02_seenn_bayes/ic_loss_0.6", + "tag": "ic_loss_0.6", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 351.0, + "duration_s": 613.6, "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": "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.925, - "test_target_acc": 0.925, - "best_val_acc": 0.9285714285714286 + "test_acc": 0.9278571428571428, + "test_target_acc": 0.9278571428571428, + "best_val_acc": 0.93 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 5325856.609577922, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.04341428919274574, - "syn_ops_per_inference_dense_fanout": 66902474.39610389, + "syn_ops_per_inference": 3881920.3644480524, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.03131712396452954, + "syn_ops_per_inference_dense_fanout": 65458538.15097403, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 3.922142857142857, + "effective_ticks": 8.4, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 98.89879284999097, - "infer_ms_per_sample": 0.6661157987500133, - "peak_vram_mb": 2832.45568 + "train_ms_per_step": 187.2155785560608, + "infer_ms_per_sample": 0.6591762280344364, + "peak_vram_mb": 10915.289088, + "syn_ops_per_inference_early_exit": 2075315.3977272727 }, "optimization_specific": { - "sfa_levels_D": 4, - "soft_reset": true, - "storm_reg": 0.001, - "trained_T": 100, - "infer_mode": "graded", - "min_ticks_within_1pct_of_full": 100, - "speedup_at_min_ticks": 1.0, - "full_T_acc": 0.925, - "t_sweep_rows": [ - { - "T": 2, - "acc": 0.07642857142857143, - "syn_per_inference": 2239954.340909091, - "dense_per_inference": 2453504.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 50.0 - }, - { - "T": 3, - "acc": 0.1357142857142857, - "syn_per_inference": 2528104.3733766233, - "dense_per_inference": 3680256.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 33.333333333333336 - }, - { - "T": 4, - "acc": 0.1657142857142857, - "syn_per_inference": 2779257.885551948, - "dense_per_inference": 4907008.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 25.0 - }, - { - "T": 6, - "acc": 0.23142857142857143, - "syn_per_inference": 3189504.724837662, - "dense_per_inference": 7360512.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 16.666666666666668 - }, - { - "T": 8, - "acc": 0.30642857142857144, - "syn_per_inference": 3490675.0357142854, - "dense_per_inference": 9814016.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 12.5 - }, + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.9, + "conf_temp": 2.0, + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_loss_weight": 0.6, + "ic_layer": 0, + "mean_exit_tick": 8.4, + "mean_exit_ms": 420.00000000000006, + "ticks_saved_frac": 0.916, + "exit_tick_histogram": { + "counts": [ + 996, + 350, + 41, + 11, + 1, + 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 + ] + }, + "acc_fc_only": 0.9278571428571428, + "acc_ic_only": 0.9364285714285714, + "acc_fused": 0.935, + "acc_early_exit": 0.3942857142857143, + "syn_ops_saved_frac": 0.4653894972360285, + "syn_per_inference_early_exit": 2075315.3977272727, + "anytime_acc": { + "0.25": 0.6278571428571429, + "0.5": 0.8207142857142857, + "0.75": 0.8907142857142857, + "1.0": 0.9278571428571428 + }, + "pareto": [ { - "T": 12, - "acc": 0.4342857142857143, - "syn_per_inference": 3871810.025162338, - "dense_per_inference": 14721024.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 8.333333333333334 + "conf": 0.5, + "mean_ticks": 4.551428571428572, + "acc": 0.24857142857142858, + "syn_ops": 1938717.4821428573 }, { - "T": 16, - "acc": 0.5678571428571428, - "syn_per_inference": 4094637.9375, - "dense_per_inference": 19628032.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 6.25 + "conf": 0.7, + "mean_ticks": 5.35, + "acc": 0.2757142857142857, + "syn_ops": 1970675.2102272727 }, { - "T": 25, - "acc": 0.7721428571428571, - "syn_per_inference": 4374663.069805195, - "dense_per_inference": 30668800.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 4.0 + "conf": 0.8, + "mean_ticks": 6.325714285714286, + "acc": 0.31785714285714284, + "syn_ops": 2008171.7573051946 }, { - "T": 100, - "acc": 0.925, - "syn_per_inference": 5325856.666396104, - "dense_per_inference": 122675200.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 1.0 - } - ], - "storm_ratio_peak_over_mean": 3.6839613211418474, - "tick_activity_cv": 0.5593002627242345, - "mean_integer_activation": 0.10257062120983997, - "frac_activations_gt1": 0.020979859633371234, - "max_activation": 4.0, - "per_layer_activity": [ - { - "layer": 0, - "mean_integer_activation": 0.18541919242590665, - "peak_tick_activation": 0.6322021558880806, - "storm_ratio": 3.409583159201322, - "tick_activity_cv": 0.5593002627242345, - "frac_activations_gt1": 0.020979859633371234, - "max_activation": 4.0 + "conf": 0.9, + "mean_ticks": 8.4, + "acc": 0.3942857142857143, + "syn_ops": 2075315.4375 }, { - "layer": 1, - "mean_integer_activation": 0.049783668518066405, - "peak_tick_activation": 0.12538528442382812, - "storm_ratio": 2.518602749781809, - "tick_activity_cv": 0.3183053742457197, - "frac_activations_gt1": 0.0011735152947949246, - "max_activation": 4.0 + "conf": 0.95, + "mean_ticks": 10.375714285714286, + "acc": 0.46214285714285713, + "syn_ops": 2131283.1087662335 }, { - "layer": 2, - "mean_integer_activation": 0.07250900268554687, - "peak_tick_activation": 0.267120361328125, - "storm_ratio": 3.6839613211418474, - "tick_activity_cv": 0.5338615572684136, - "frac_activations_gt1": 0.0013800048400298692, - "max_activation": 4.0 + "conf": 0.99, + "mean_ticks": 14.411428571428571, + "acc": 0.5742857142857143, + "syn_ops": 2220022.9334415584 } - ], - "expanded_vs_graded_agreement": 1.0, - "expanded_acc": 0.90234375, - "graded_acc": 0.90234375, - "syn_ratio_expanded_over_graded": 1.0003646028320816, - "expansion_caveat": "exact only at beta=1 (IAF); with beta<1 the expanded mode applies decay per sub-tick and drifts" + ] }, "config": { "method": "harmonic_matched", @@ -4486,179 +2021,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt07_sfa_integer_train/t_sweep_ultra_low", - "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, - "sfa_levels": 4, - "soft_reset": true, - "storm_reg": 0.001, - "infer_mode": "graded", - "t_sweep": "2,3,4,6,8,12,16,25", + "anytime_fracs": "0.25,0.5,1.0", + "anytime_weights": "0.3,0.3,1.0", + "ic_layer": 0, + "ic_loss_weight": 0.6, + "bayes_fusion": true, + "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/ic_loss_0.6", + "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": "t_sweep_ultra_low.zip", + "name": "ic_loss_0.6.zip", "files": 81, - "bytes": 12258005, - "MB": 12.3, - "sha256": "9b40b0bf29d963e1cd4165e4b8d4e3a1993bf7be7ddbb241165fc0976c82fe13" + "bytes": 12634970, + "MB": 12.6, + "sha256": "8b06be6ffe12ced55b0fa84f116fc4476be96b97264b7c85d13026df05393ec7" } }, { - "key": "opt08_mint_quant/bits_sweep_fine", - "tag": "bits_sweep_fine", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 9, + "key": "opt02_seenn_bayes/no_bayes_fusion", + "tag": "no_bayes_fusion", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 323.5, + "duration_s": 605.0, "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": "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.22428571428571428, - "test_target_acc": 0.22428571428571428, - "best_val_acc": 0.49357142857142855 + "test_acc": 0.9257142857142857, + "test_target_acc": 0.9257142857142857, + "best_val_acc": 0.9257142857142857 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 737711.1282467532, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.006013531082458013, - "syn_ops_per_inference_dense_fanout": 63661272.290584415, - "weight_sparsity": 0.9789982001252087, - "effective_ticks": 27.373571428571427, + "syn_ops_per_inference": 3621647.9464285714, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.029217394239439504, + "syn_ops_per_inference_dense_fanout": 65198265.73295455, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 10.228571428571428, "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": 88.68454749999728, - "infer_ms_per_sample": 0.6045492706249433, - "peak_vram_mb": 2835.119104 + "train_ms_per_step": 184.58738327026367, + "infer_ms_per_sample": 0.6467816068898493, + "peak_vram_mb": 10914.273792, + "syn_ops_per_inference_early_exit": 1852356.0259740262 }, "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.018447992852393617, - "acc_vs_ubits": { - "0": 0.18428571428571427, - "2": 0.22428571428571428, - "3": 0.21571428571428572, - "4": 0.21428571428571427, - "6": 0.21571428571428572, - "8": 0.21214285714285713 + "seenn_enabled": true, + "bayes_fusion_enabled": false, + "conf_threshold": 0.9, + "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.228571428571428, + "mean_exit_ms": 511.42857142857144, + "ticks_saved_frac": 0.8977142857142857, + "exit_tick_histogram": { + "counts": [ + 784, + 517, + 79, + 19, + 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 + ] }, - "bits_sweep_rows": [ - { - "u_bits": 0, - "acc": 0.18428571428571427, - "target_acc": 0.18428571428571427, - "membrane_bytes_per_neuron_per_tick": 4.0, - "membrane_memory_reduction_x": 1.0, - "membrane_saturation_frac": null, - "acc_drop_vs_fp32": 0.0 - }, - { - "u_bits": 2, - "acc": 0.22428571428571428, - "target_acc": 0.22428571428571428, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.016339829898049645, - "acc_drop_vs_fp32": -0.04000000000000001 - }, - { - "u_bits": 3, - "acc": 0.21571428571428572, - "target_acc": 0.21571428571428572, - "membrane_bytes_per_neuron_per_tick": 0.375, - "membrane_memory_reduction_x": 10.666666666666666, - "membrane_saturation_frac": 0.07418640569592198, - "acc_drop_vs_fp32": -0.031428571428571445 - }, - { - "u_bits": 4, - "acc": 0.21428571428571427, - "target_acc": 0.21428571428571427, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.1724607297207447, - "acc_drop_vs_fp32": -0.03 - }, - { - "u_bits": 6, - "acc": 0.21571428571428572, - "target_acc": 0.21571428571428572, - "membrane_bytes_per_neuron_per_tick": 0.75, - "membrane_memory_reduction_x": 5.333333333333333, - "membrane_saturation_frac": 0.3710663923980496, - "acc_drop_vs_fp32": -0.031428571428571445 - }, - { - "u_bits": 8, - "acc": 0.21214285714285713, - "target_acc": 0.21214285714285713, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.37882293051861704, - "acc_drop_vs_fp32": -0.027857142857142858 - } - ], - "fp32_membrane_acc": 0.18428571428571427, - "per_layer_scales": [ + "acc_fc_only": 0.9257142857142857, + "acc_ic_only": 0.9342857142857143, + "acc_fused": 0.9257142857142857, + "acc_early_exit": 0.44, + "syn_ops_saved_frac": 0.48853227774370045, + "syn_per_inference_early_exit": 1852356.0259740262, + "anytime_acc": { + "0.25": 0.615, + "0.5": 0.8064285714285714, + "0.75": 0.8935714285714286, + "1.0": 0.9257142857142857 + }, + "pareto": [ { - "layer": 0, - "weight_scale": 0.03549237549304962, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 28.17506537976945 + "conf": 0.5, + "mean_ticks": 4.534285714285715, + "acc": 0.24142857142857144, + "syn_ops": 1655985.486201299 }, { - "layer": 1, - "weight_scale": 0.03008062924657549, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 33.24398541675601 + "conf": 0.7, + "mean_ticks": 5.685, + "acc": 0.2885714285714286, + "syn_ops": 1712321.3814935065 }, { - "layer": 2, - "weight_scale": 0.027376641120229448, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 36.52749055694305 + "conf": 0.8, + "mean_ticks": 6.976428571428571, + "acc": 0.3385714285714286, + "syn_ops": 1762251.6274350649 }, { - "layer": 3, - "weight_scale": 0.02388627827167511, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 41.865040196982996 + "conf": 0.9, + "mean_ticks": 10.228571428571428, + "acc": 0.44, + "syn_ops": 1852356.7021103897 + }, + { + "conf": 0.95, + "mean_ticks": 10.916428571428572, + "acc": 0.4614285714285714, + "syn_ops": 1872607.6915584416 + }, + { + "conf": 0.99, + "mean_ticks": 15.165714285714285, + "acc": 0.5571428571428572, + "syn_ops": 1963321.9383116884 } - ], - "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" + ] }, "config": { "method": "harmonic_matched", @@ -4698,160 +2217,297 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/bits_sweep_fine", - "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, - "w_bits": 4, - "u_bits": 2, - "leak_shift": 0, - "qat": true, - "bits_sweep": "0,2,3,4,6,8", - "l2_bytes": 2097152, + "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/no_bayes_fusion", + "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": "bits_sweep_fine.zip", + "name": "no_bayes_fusion.zip", "files": 81, - "bytes": 12373116, - "MB": 12.4, - "sha256": "2fe3f4aad883a9ccc3ebe2dd4259aaa6e4053f00e53278a241e2f51f70d48e6c" + "bytes": 12641798, + "MB": 12.6, + "sha256": "e2e83c0d51a17b32b845d07b1c1cd99dd318c4b15f891615c90b53a342810c59" } }, { - "key": "opt08_mint_quant/l2_jetson_nano", - "tag": "l2_jetson_nano", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 9, + "key": "opt03_ftbc_threshold_balance/calib_batches_32", + "tag": "calib_batches_32", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 7, "status": "ok", - "duration_s": 321.2, + "duration_s": 399.1, "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": "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.22642857142857142, - "test_target_acc": 0.22642857142857142, - "best_val_acc": 0.48142857142857143 + "test_acc": 0.9378571428571428, + "test_target_acc": 0.9378571428571428, + "best_val_acc": 0.9478571428571428 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 819585.7610592532, + "syn_ops_per_inference": 3261141.8693181816, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.006680940899703064, - "syn_ops_per_inference_dense_fanout": 63636744.434253246, - "weight_sparsity": 0.9802144198664441, - "effective_ticks": 35.24857142857143, + "event_fraction_of_dense": 0.026583546383606316, + "syn_ops_per_inference_dense_fanout": 64837759.65584416, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 12.063571428571429, "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": 88.0644066500281, - "infer_ms_per_sample": 0.6020276593750395, - "peak_vram_mb": 2835.111424 + "train_ms_per_step": 96.95494634997885, + "infer_ms_per_sample": 0.6346498156250391, + "peak_vram_mb": 2824.29952 }, "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": false, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 262144, - "membrane_saturation_frac": 0.019173973570478724, - "acc_vs_ubits": { - "2": 0.22642857142857142, - "4": 0.2057142857142857, - "8": 0.20642857142857143, - "0": 0.155 + "calibrate_thresh": true, + "ftbc": true, + "calib_percentile": 99.9, + "calib_batches": 32, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 100, + "trained_T": 100, + "thresh_before": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "thresh_after": [ + 2.3753418922424316, + 0.8675889372825623, + 1.0950974225997925, + 2.8038883209228516 + ], + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "thresh": 50, + "ftbc": 100, + "both": null }, - "bits_sweep_rows": [ + "speedup_at_min_ticks": null, + "full_T_acc": 0.9442857142857143, + "t_sweep_rows": [ + { + "T": 4, + "arm": "raw", + "acc": 0.27, + "syn_per_inference": 1859619.69237013, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.37897221532349856 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.4235714285714286, + "syn_per_inference": 1819867.7662337662, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3708711634938778 + }, + { + "T": 4, + "arm": "ftbc", + "acc": 0.17, + "syn_per_inference": 1981539.6152597403, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.4038182972719303 + }, + { + "T": 4, + "arm": "both", + "acc": 0.23, + "syn_per_inference": 1951891.856331169, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.39777637540659583 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.605, + "syn_per_inference": 2038958.4732142857, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.20775984807995887 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7764285714285715, + "syn_per_inference": 1942887.4034090908, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.1979706782023884 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.315, + "syn_per_inference": 2370014.435064935, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.24149282363763572 + }, + { + "T": 8, + "arm": "both", + "acc": 0.4764285714285714, + "syn_per_inference": 2295570.1801948054, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2339073199182481 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.8192857142857143, + "syn_per_inference": 2325345.020292208, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11847061489874319 + }, { - "u_bits": 2, - "acc": 0.22642857142857142, - "target_acc": 0.22642857142857142, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.01658403978280142, - "acc_drop_vs_fp32": -0.07142857142857142 - }, - { - "u_bits": 4, - "acc": 0.2057142857142857, - "target_acc": 0.2057142857142857, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.18061516511524822, - "acc_drop_vs_fp32": -0.05071428571428571 - }, - { - "u_bits": 8, - "acc": 0.20642857142857143, - "target_acc": 0.20642857142857143, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.39453422816932626, - "acc_drop_vs_fp32": -0.051428571428571435 - }, - { - "u_bits": 0, - "acc": 0.155, - "target_acc": 0.155, - "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.155, - "per_layer_scales": [ + "T": 16, + "arm": "thresh", + "acc": 0.8992857142857142, + "syn_per_inference": 2113511.4650974027, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.10767821578329415 + }, { - "layer": 0, - "weight_scale": 0.02853875287941524, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 35.040073552803754 + "T": 16, + "arm": "ftbc", + "acc": 0.6028571428571429, + "syn_per_inference": 2770224.811688312, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.14113614710269026 }, { - "layer": 1, - "weight_scale": 0.03575079781668527, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 27.97140374677987 + "T": 16, + "arm": "both", + "acc": 0.6885714285714286, + "syn_per_inference": 2556422.022727273, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.13024342036569295 }, { - "layer": 2, - "weight_scale": 0.03166966778891427, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 31.57595484313992 + "T": 25, + "arm": "raw", + "acc": 0.8892857142857142, + "syn_per_inference": 2546046.7800324676, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08301748943657618 }, { - "layer": 3, - "weight_scale": 0.022976822086742947, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 43.52211964843367 + "T": 25, + "arm": "thresh", + "acc": 0.9214285714285714, + "syn_per_inference": 2230110.1696428573, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.07271592529355102 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.7728571428571429, + "syn_per_inference": 3055456.0194805195, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09962750480881284 + }, + { + "T": 25, + "arm": "both", + "acc": 0.8035714285714286, + "syn_per_inference": 2718618.5576298703, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08864443857046478 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9285714285714286, + "syn_per_inference": 2902600.2816558443, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.047321712646987237 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9428571428571428, + "syn_per_inference": 2409330.423701299, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.03927982874617362 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9007142857142857, + "syn_per_inference": 3497088.7767857146, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.05701378561902837 + }, + { + "T": 50, + "arm": "both", + "acc": 0.8971428571428571, + "syn_per_inference": 2966595.8733766233, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04836504645399597 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9442857142857143, + "syn_per_inference": 3261141.1704545454, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026583540686744716 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.9378571428571428, + "syn_per_inference": 2675097.6079545454, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.021806343971353177 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.935, + "syn_per_inference": 3939535.5738636362, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.03211354514900841 + }, + { + "T": 100, + "arm": "both", + "acc": 0.9235714285714286, + "syn_per_inference": 3268745.5649350653, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026645528720842235 } ], - "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" + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -4891,7 +2547,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/l2_jetson_nano", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/calib_batches_32", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -4902,149 +2558,285 @@ "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": 262144, + "calibrate_thresh": true, + "calib_percentile": 99.9, + "calib_batches": 32, + "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": "l2_jetson_nano.zip", + "name": "calib_batches_32.zip", "files": 81, - "bytes": 12361956, - "MB": 12.4, - "sha256": "d29263c2d6d2174c1049eacdc639e439ab6721dbf1819649dee4622ebabc2743" + "bytes": 12248653, + "MB": 12.2, + "sha256": "9359402eddfde164b345f308da096b3218c7dd55bd14b4dbd1e9a946ac98d5e9" } }, { - "key": "opt08_mint_quant/leak_shift_2", - "tag": "leak_shift_2", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 9, + "key": "opt03_ftbc_threshold_balance/ftbc_lr_0.5", + "tag": "ftbc_lr_0.5", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 7, "status": "ok", - "duration_s": 308.1, + "duration_s": 386.3, "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": "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.025, - "test_target_acc": 0.025, - "best_val_acc": 0.6871428571428572 + "test_acc": 0.9328571428571428, + "test_target_acc": 0.9328571428571428, + "best_val_acc": 0.945 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 8857.618810876624, + "syn_ops_per_inference": 3251424.406655844, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 7.22038261268506e-05, - "syn_ops_per_inference_dense_fanout": 63155950.40909091, - "weight_sparsity": 0.9982718593489148, - "effective_ticks": 100.0, + "event_fraction_of_dense": 0.026504333448454487, + "syn_ops_per_inference_dense_fanout": 64828042.19318182, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 12.322857142857142, "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": 83.6030630499863, - "infer_ms_per_sample": 0.5862654068749862, - "peak_vram_mb": 2832.311808 + "train_ms_per_step": 96.83538014996884, + "infer_ms_per_sample": 0.6346282890626753, + "peak_vram_mb": 2825.357824 }, "optimization_specific": { - "w_bits": 4, - "u_bits": 2, - "leak_shift": 2, - "beta_eff": 0.75, - "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.0, - "acc_vs_ubits": { - "2": 0.025, - "4": 0.025714285714285714, - "8": 0.03, - "0": 0.024285714285714285 - }, - "bits_sweep_rows": [ - { - "u_bits": 2, - "acc": 0.025, - "target_acc": 0.025, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.0, - "acc_drop_vs_fp32": -0.0007142857142857159 - }, - { - "u_bits": 4, - "acc": 0.025714285714285714, - "target_acc": 0.025714285714285714, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 3.0197251773049646e-05, - "acc_drop_vs_fp32": -0.0014285714285714284 - }, - { - "u_bits": 8, - "acc": 0.03, - "target_acc": 0.03, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.0005447279476950355, - "acc_drop_vs_fp32": -0.005714285714285713 - }, - { - "u_bits": 0, - "acc": 0.024285714285714285, - "target_acc": 0.024285714285714285, - "membrane_bytes_per_neuron_per_tick": 4.0, - "membrane_memory_reduction_x": 1.0, - "membrane_saturation_frac": null, - "acc_drop_vs_fp32": 0.0 - } + "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.332695722579956, + 0.859599232673645, + 1.0915957689285278, + 2.6890203952789307 ], - "fp32_membrane_acc": 0.024285714285714285, - "per_layer_scales": [ + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "thresh": null, + "ftbc": null, + "both": null + }, + "speedup_at_min_ticks": null, + "full_T_acc": 0.95, + "t_sweep_rows": [ { - "layer": 0, - "weight_scale": 0.005439152142831257, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 183.8521838956075 + "T": 4, + "arm": "raw", + "acc": 0.2671428571428571, + "syn_per_inference": 1861908.2905844154, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3794386091452093 }, { - "layer": 1, - "weight_scale": 0.0023113220397915158, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 432.65282067322875 + "T": 4, + "arm": "thresh", + "acc": 0.4085714285714286, + "syn_per_inference": 1822856.6185064935, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.37148026220998487 }, { - "layer": 2, - "weight_scale": 0.008123405277729034, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 123.10108455890783 + "T": 4, + "arm": "ftbc", + "acc": 0.31785714285714284, + "syn_per_inference": 1921884.1883116884, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3916611076060378 }, { - "layer": 3, - "weight_scale": 0.016667025429861888, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 59.99870848029819 + "T": 4, + "arm": "both", + "acc": 0.43785714285714283, + "syn_per_inference": 1887901.7792207792, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3847358266423815 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.5807142857142857, + "syn_per_inference": 2040732.888798701, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.20794065230775058 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7564285714285715, + "syn_per_inference": 1946398.6477272727, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.19832845674260902 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.5457142857142857, + "syn_per_inference": 2210247.6266233767, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.22521337102195235 + }, + { + "T": 8, + "arm": "both", + "acc": 0.7142857142857143, + "syn_per_inference": 2123275.1217532465, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2163513001969068 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.8042857142857143, + "syn_per_inference": 2325398.8141233767, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11847335556225794 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.8992857142857142, + "syn_per_inference": 2118264.750811688, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.10792038401056653 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.7342857142857143, + "syn_per_inference": 2572779.288961039, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1310767828868956 + }, + { + "T": 16, + "arm": "both", + "acc": 0.8478571428571429, + "syn_per_inference": 2357532.7719155843, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.12011050175155534 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.8764285714285714, + "syn_per_inference": 2543208.9926948054, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08292495932983375 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.9242857142857143, + "syn_per_inference": 2236140.2930194805, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.07291254607351708 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.8357142857142857, + "syn_per_inference": 2838940.3084415584, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.092567701000416 + }, + { + "T": 25, + "arm": "both", + "acc": 0.895, + "syn_per_inference": 2509213.547077922, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.0818164893011113 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9307142857142857, + "syn_per_inference": 2895740.404220779, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04720987459927971 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9392857142857143, + "syn_per_inference": 2418345.2930194805, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.03942680008705069 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9214285714285714, + "syn_per_inference": 3263736.2483766233, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.053209389483393925 + }, + { + "T": 50, + "arm": "both", + "acc": 0.9307142857142857, + "syn_per_inference": 2744258.13474026, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.044740226789771034 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.95, + "syn_per_inference": 3251424.2077922076, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026504331827396307 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.9328571428571428, + "syn_per_inference": 2685684.0251623373, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.0218926402823255 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.9378571428571428, + "syn_per_inference": 3688635.3920454546, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.030068305509552497 + }, + { + "T": 100, + "arm": "both", + "acc": 0.925, + "syn_per_inference": 3041737.727272727, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.024795050077544012 } ], - "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" + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -5084,7 +2876,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/leak_shift_2", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/ftbc_lr_0.5", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -5095,149 +2887,285 @@ "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "w_bits": 4, - "u_bits": 2, - "leak_shift": 2, - "qat": true, - "bits_sweep": "2,4,8,0", - "l2_bytes": 2097152, + "calibrate_thresh": true, + "calib_percentile": 99.9, + "calib_batches": 8, + "ftbc": true, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 0, + "ftbc_lr": 0.5, + "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "leak_shift_2.zip", + "name": "ftbc_lr_0.5.zip", "files": 81, - "bytes": 12398575, - "MB": 12.4, - "sha256": "f3265cdd1b2d111f678c285a1c19cf7387d1102687a0b4cf493deb9a791519cc" + "bytes": 12251677, + "MB": 12.3, + "sha256": "77804b842073b38ff69c86ae0358cafc315ed019d7dc45240ea65afc1daf7137" } }, { - "key": "opt08_mint_quant/no_qat", - "tag": "no_qat", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 9, + "key": "opt03_ftbc_threshold_balance/ftbc_lr_2.0", + "tag": "ftbc_lr_2.0", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 7, "status": "ok", - "duration_s": 328.8, + "duration_s": 387.4, "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": "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.8814285714285715, - "test_target_acc": 0.8814285714285715, - "best_val_acc": 0.9071428571428571 + "test_acc": 0.925, + "test_target_acc": 0.925, + "best_val_acc": 0.9442857142857143 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 2369107.872970779, + "syn_ops_per_inference": 3270530.453733766, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.01931203595323895, - "syn_ops_per_inference_dense_fanout": 65155147.9375, - "weight_sparsity": 0.8282806956907346, - "effective_ticks": 10.586428571428572, + "event_fraction_of_dense": 0.026660078432590825, + "syn_ops_per_inference_dense_fanout": 64847148.240259744, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 12.499285714285714, "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": 93.63406789998407, - "infer_ms_per_sample": 0.6351243703124965, - "peak_vram_mb": 2828.762112 + "train_ms_per_step": 97.14889454999138, + "infer_ms_per_sample": 0.6363494856253737, + "peak_vram_mb": 2825.317888 }, "optimization_specific": { - "w_bits": 4, - "u_bits": 2, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": false, - "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.10079070395611703, - "acc_vs_ubits": { - "2": 0.8814285714285715, - "4": 0.9357142857142857, - "8": 0.9421428571428572, - "0": 0.9278571428571428 + "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.366356134414673, + 0.8545898795127869, + 1.1143375635147095, + 2.678464412689209 + ], + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "thresh": 50, + "ftbc": null, + "both": null }, - "bits_sweep_rows": [ + "speedup_at_min_ticks": null, + "full_T_acc": 0.9485714285714286, + "t_sweep_rows": [ { - "u_bits": 2, - "acc": 0.8814285714285715, - "target_acc": 0.8814285714285715, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.09545739140070922, - "acc_drop_vs_fp32": 0.046428571428571375 + "T": 4, + "arm": "raw", + "acc": 0.25285714285714284, + "syn_per_inference": 1866740.6030844154, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3804233869364826 }, { - "u_bits": 4, - "acc": 0.9357142857142857, - "target_acc": 0.9357142857142857, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.2861436862810284, - "acc_drop_vs_fp32": -0.007857142857142896 + "T": 4, + "arm": "thresh", + "acc": 0.3921428571428571, + "syn_per_inference": 1825928.9253246754, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3721063681421908 }, { - "u_bits": 8, - "acc": 0.9421428571428572, - "target_acc": 0.9421428571428572, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.3314320146276596, - "acc_drop_vs_fp32": -0.014285714285714346 - }, - { - "u_bits": 0, - "acc": 0.9278571428571428, - "target_acc": 0.9278571428571428, - "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.9278571428571428, - "per_layer_scales": [ + "T": 4, + "arm": "ftbc", + "acc": 0.05071428571428571, + "syn_per_inference": 2045034.4821428573, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.41675792705918907 + }, + { + "T": 4, + "arm": "both", + "acc": 0.030714285714285715, + "syn_per_inference": 2018497.18262987, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.4113498862504137 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.5771428571428572, + "syn_per_inference": 2048153.543831169, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.20869678058718968 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7385714285714285, + "syn_per_inference": 1950252.5267857143, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.19872114807900398 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.05285714285714286, + "syn_per_inference": 2452784.042207792, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2499266398391639 + }, + { + "T": 8, + "arm": "both", + "acc": 0.06642857142857143, + "syn_per_inference": 2399304.793831169, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2444773672501827 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.7892857142857143, + "syn_per_inference": 2337609.4261363638, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11909545624015509 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.9014285714285715, + "syn_per_inference": 2121910.1517857146, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.10810610823263965 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.4092857142857143, + "syn_per_inference": 2811218.702922078, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.14322468513002617 + }, + { + "T": 16, + "arm": "both", + "acc": 0.3514285714285714, + "syn_per_inference": 2648069.6298701297, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.13491264075125461 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.8792857142857143, + "syn_per_inference": 2558687.908279221, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08342967146674213 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.925, + "syn_per_inference": 2239377.7564935065, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.07301810819117495 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.685, + "syn_per_inference": 3072336.8579545454, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.10017792864261221 + }, + { + "T": 25, + "arm": "both", + "acc": 0.5571428571428572, + "syn_per_inference": 2806018.2516233767, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.0914942303456078 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9328571428571428, + "syn_per_inference": 2913571.6136363638, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.047500580616723895 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9407142857142857, + "syn_per_inference": 2421276.7459415584, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.039474592190459984 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.8578571428571429, + "syn_per_inference": 3487039.4261363638, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.05684994890795146 + }, + { + "T": 50, + "arm": "both", + "acc": 0.7778571428571428, + "syn_per_inference": 3057650.978896104, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04984953729679844 + }, { - "layer": 0, - "weight_scale": 0.03091752529144287, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 32.34411520888358 + "T": 100, + "arm": "raw", + "acc": 0.9485714285714286, + "syn_per_inference": 3270530.1485389615, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.02666007594476277 }, { - "layer": 1, - "weight_scale": 0.01778849107878549, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 56.21612286117947 + "T": 100, + "arm": "thresh", + "acc": 0.925, + "syn_per_inference": 2694214.478896104, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.02196217718737042 }, { - "layer": 2, - "weight_scale": 0.01220501959323883, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 81.93350222509812 + "T": 100, + "arm": "ftbc", + "acc": 0.9164285714285715, + "syn_per_inference": 3933733.825487013, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.03206625157723006 }, { - "layer": 3, - "weight_scale": 0.018680229783058167, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 53.53253207339769 + "T": 100, + "arm": "both", + "acc": 0.8485714285714285, + "syn_per_inference": 3378956.2589285714, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.02754392296836338 } ], - "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" + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -5277,7 +3205,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/no_qat", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/ftbc_lr_2.0", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -5288,342 +3216,182 @@ "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "w_bits": 4, - "u_bits": 2, - "leak_shift": 0, - "qat": false, - "bits_sweep": "2,4,8,0", - "l2_bytes": 2097152, + "calibrate_thresh": true, + "calib_percentile": 99.9, + "calib_batches": 8, + "ftbc": true, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 0, + "ftbc_lr": 2.0, + "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "no_qat.zip", + "name": "ftbc_lr_2.0.zip", "files": 81, - "bytes": 12241785, + "bytes": 12249793, "MB": 12.2, - "sha256": "23aa8a4da5964260deb080b490dd81651bc1ec81a1e96263826a88013a927a7d" + "sha256": "8da510a7f6f6ea93fcb881624cd1c8187170ac3da8af0683fcf18c123a1fac73" } }, { - "key": "opt08_mint_quant/w_bits_2", - "tag": "w_bits_2", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 10, + "key": "opt03_ftbc_threshold_balance/ftbc_only", + "tag": "ftbc_only", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 7, "status": "ok", - "duration_s": 313.7, + "duration_s": 362.0, "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": "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.03214285714285714, - "test_target_acc": 0.03214285714285714, - "best_val_acc": 0.23142857142857143 + "test_acc": 0.9414285714285714, + "test_target_acc": 0.9414285714285714, + "best_val_acc": 0.9421428571428572 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 64874.41061282468, + "syn_ops_per_inference": 3249375.69724026, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.0005288306896000551, - "syn_ops_per_inference_dense_fanout": 63605566.99918831, - "weight_sparsity": 0.9991204416214524, - "effective_ticks": 84.10142857142857, + "event_fraction_of_dense": 0.026487633174759526, + "syn_ops_per_inference_dense_fanout": 64825993.48376623, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 12.075714285714286, "num_ticks": 100, - "membrane_bytes_per_inference": 0, - "weight_bytes": 306688, + "membrane_bytes_per_inference": 451200, + "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 85.21973990000333, - "infer_ms_per_sample": 0.5962876021874308, - "peak_vram_mb": 2835.795968 + "train_ms_per_step": 101.28010819998963, + "infer_ms_per_sample": 0.656100417812695, + "peak_vram_mb": 2828.060672 }, "optimization_specific": { - "w_bits": 2, - "u_bits": 2, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": true, - "batchnorm": true, - "membrane_memory_reduction_x": 16.0, - "weight_memory_reduction_x": 16.0, - "membrane_bytes_per_inference": 28200.0, - "working_set_bytes": 306970.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": true, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": 0.008376689937943263, - "acc_vs_ubits": { - "2": 0.03214285714285714, - "4": 0.03785714285714286, - "8": 0.03357142857142857, - "0": 0.03428571428571429 + "calibrate_thresh": false, + "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": null, + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "ftbc": 100 }, - "bits_sweep_rows": [ + "speedup_at_min_ticks": null, + "full_T_acc": 0.9414285714285714, + "t_sweep_rows": [ { - "u_bits": 2, - "acc": 0.03214285714285714, - "target_acc": 0.03214285714285714, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.007398326684397164, - "acc_drop_vs_fp32": 0.0021428571428571477 - }, - { - "u_bits": 4, - "acc": 0.03785714285714286, - "target_acc": 0.03785714285714286, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.05461069093528369, - "acc_drop_vs_fp32": -0.0035714285714285726 - }, - { - "u_bits": 8, - "acc": 0.03357142857142857, - "target_acc": 0.03357142857142857, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.1291535073138298, - "acc_drop_vs_fp32": 0.0007142857142857159 - }, - { - "u_bits": 0, - "acc": 0.03428571428571429, - "target_acc": 0.03428571428571429, - "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.03428571428571429, - "per_layer_scales": [ + "T": 4, + "arm": "raw", + "acc": 0.285, + "syn_per_inference": 1863959.37987013, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3798566009817245 + }, { - "layer": 0, - "weight_scale": 0.1566811352968216, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 6.382389290871355 + "T": 4, + "arm": "ftbc", + "acc": 0.18, + "syn_per_inference": 1988746.081168831, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.4052869041927038 }, { - "layer": 1, - "weight_scale": 0.1379482001066208, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 7.249097844169735 + "T": 8, + "arm": "raw", + "acc": 0.6028571428571429, + "syn_per_inference": 2041225.4082792208, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.20799083762235773 }, { - "layer": 2, - "weight_scale": 0.07789017260074615, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 12.83859011490264 + "T": 8, + "arm": "ftbc", + "acc": 0.375, + "syn_per_inference": 2398680.064935065, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.24441371044586283 }, { - "layer": 3, - "weight_scale": 0.1205046996474266, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 8.298431537739242 - } - ], - "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" - }, - "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/opt08_mint_quant/w_bits_2", - "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, - "w_bits": 2, - "u_bits": 2, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "l2_bytes": 2097152, - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "w_bits_2.zip", - "files": 81, - "bytes": 12361927, - "MB": 12.4, - "sha256": "2bbbd0d38983d52dddfea5a1ba1805c017e7f9fd0cf0c7815896dc8b4f1b95ce" - } - }, - { - "key": "opt08_mint_quant/w_bits_8", - "tag": "w_bits_8", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 10, - "status": "ok", - "duration_s": 321.1, - "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": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.17714285714285713, - "test_target_acc": 0.17714285714285713, - "best_val_acc": 0.5 - }, - "efficiency": { - "spikes_per_inference": null, - "syn_ops_per_inference": 1656847.0116680192, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.013505965441002087, - "syn_ops_per_inference_dense_fanout": 63575177.9935065, - "weight_sparsity": 0.9049547096723706, - "effective_ticks": 34.494285714285716, - "num_ticks": 100, - "membrane_bytes_per_inference": 0, - "weight_bytes": 1226752, - "input_raster_bytes": null, - "train_ms_per_step": 88.07029660001717, - "infer_ms_per_sample": 0.5999964265623703, - "peak_vram_mb": 2834.582528 - }, - "optimization_specific": { - "w_bits": 8, - "u_bits": 2, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": true, - "batchnorm": true, - "membrane_memory_reduction_x": 16.0, - "weight_memory_reduction_x": 4.0, - "membrane_bytes_per_inference": 28200.0, - "working_set_bytes": 1227034.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": true, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": 0.017583977449024825, - "acc_vs_ubits": { - "2": 0.17714285714285713, - "4": 0.19642857142857142, - "8": 0.19642857142857142, - "0": 0.16357142857142856 - }, - "bits_sweep_rows": [ - { - "u_bits": 2, - "acc": 0.17714285714285713, - "target_acc": 0.17714285714285713, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.015716422872340426, - "acc_drop_vs_fp32": -0.013571428571428568 - }, - { - "u_bits": 4, - "acc": 0.19642857142857142, - "target_acc": 0.19642857142857142, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.1619908715647163, - "acc_drop_vs_fp32": -0.03285714285714286 - }, - { - "u_bits": 8, - "acc": 0.19642857142857142, - "target_acc": 0.19642857142857142, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.3510126468306738, - "acc_drop_vs_fp32": -0.03285714285714286 - }, - { - "u_bits": 0, - "acc": 0.16357142857142856, - "target_acc": 0.16357142857142856, - "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.16357142857142856, - "per_layer_scales": [ + "T": 16, + "arm": "raw", + "acc": 0.8192857142857143, + "syn_per_inference": 2324367.765422078, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11842082616444062 + }, { - "layer": 0, - "weight_scale": 0.0016182805374851377, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 617.9398298604231 + "T": 16, + "arm": "ftbc", + "acc": 0.6142857142857143, + "syn_per_inference": 2803018.7873376627, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1428069195799998 }, { - "layer": 1, - "weight_scale": 0.0015527149589042964, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 644.0332105164167 + "T": 25, + "arm": "raw", + "acc": 0.8821428571428571, + "syn_per_inference": 2541577.2775974027, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08287175493000713 }, { - "layer": 2, - "weight_scale": 0.0011796849215124537, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 847.6839720201876 + "T": 25, + "arm": "ftbc", + "acc": 0.78, + "syn_per_inference": 3086706.7922077924, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.10064648086028122 }, { - "layer": 3, - "weight_scale": 0.0008578119198168356, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 1165.7567083161132 + "T": 50, + "arm": "raw", + "acc": 0.9257142857142857, + "syn_per_inference": 2894576.2873376627, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04719089575297473 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9128571428571428, + "syn_per_inference": 3537494.286525974, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.057672525278556284 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9414285714285714, + "syn_per_inference": 3249375.612012987, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026487632480020305 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.9385714285714286, + "syn_per_inference": 3966864.5608766233, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.032336320306603314 } ], - "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" + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -5663,7 +3431,7 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/w_bits_8", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/ftbc_only", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, @@ -5674,265 +3442,285 @@ "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, - "w_bits": 8, - "u_bits": 2, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "l2_bytes": 2097152, + "calibrate_thresh": false, + "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": "w_bits_8.zip", + "name": "ftbc_only.zip", "files": 81, - "bytes": 12364242, - "MB": 12.4, - "sha256": "56ab4c27abf4fa9bb3d03b40fdebdc1a39a01711c51366a348fc10f4df048451" + "bytes": 12244861, + "MB": 12.2, + "sha256": "736f330397784874481ef351ef9ef2dc0fd23464b032e5ef4d4e65a8729b5ab0" } }, { - "key": "opt09_srif_softreset/no_learn_reset", - "tag": "no_learn_reset", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 10, + "key": "opt03_ftbc_threshold_balance/ftbc_ref_ticks_25", + "tag": "ftbc_ref_ticks_25", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 7, "status": "ok", - "duration_s": 338.9, + "duration_s": 386.5, "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", + "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.9157142857142857, - "test_target_acc": 0.9157142857142857, - "best_val_acc": 0.9135714285714286 + "test_acc": 0.9357142857142857, + "test_target_acc": 0.9357142857142857, + "best_val_acc": 0.945 }, "efficiency": { - "spikes_per_inference": 6883.3984375, - "syn_ops_per_inference": 3723144.671266234, + "spikes_per_inference": null, + "syn_ops_per_inference": 3264603.7832792206, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.03034961158625569, - "syn_ops_per_inference_dense_fanout": 65299762.45779221, + "event_fraction_of_dense": 0.026611766545147027, + "syn_ops_per_inference_dense_fanout": 64841221.5698052, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.082142857142857, + "effective_ticks": 12.280714285714286, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 95.2910739500112, - "infer_ms_per_sample": 0.6323959431250614, - "peak_vram_mb": 2829.398528, - "discarded_charge_per_reset": 0.038193207689203236 + "train_ms_per_step": 97.85671250001542, + "infer_ms_per_sample": 0.6403399928126419, + "peak_vram_mb": 2825.387008 }, "optimization_specific": { - "reset_mode": "srif", - "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": "srif", - "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.8999999761581421, - 0.8999999761581421, - 0.8999999761581421, - 0.8999999761581421 - ], - "learned_v_reset_per_layer": [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": false, - "discarded_charge_per_reset": 0.038193207689203236, - "spikes_per_inference": 6883.3984375, - "syn_per_inference": 3811349.5, - "lam_per_site": [ - 0.8999999761581421, - 0.8999999761581421, - 0.8999999761581421, - 0.8999999761581421 - ], - "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 + "calibrate_thresh": true, + "ftbc": true, + "calib_percentile": 99.9, + "calib_batches": 8, + "ftbc_target_ticks": 8, + "ftbc_ref_ticks": 25, + "trained_T": 100, + "thresh_before": [ + 1.0, + 1.0, + 1.0, + 1.0 + ], + "thresh_after": [ + 2.3277933597564697, + 0.8438996076583862, + 1.0949429273605347, + 2.7184956073760986 + ], + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 100, + "thresh": 50, + "ftbc": 100, + "both": null }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.9264285714285714, - "target_acc": 0.9264285714285714, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.22403764747430177, - "spikes_per_inference": 5916.7890625, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.94, - "target_acc": 0.94, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.11177482137016213, - "spikes_per_inference": 6947.1171875, - "membrane_saturation_frac": 0.2622705424423759, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.013571428571428568 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.8428571428571429, - "target_acc": 0.8428571428571429, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 6449.640625, - "membrane_saturation_frac": 0.3889967032358156, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.08357142857142852 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.9014285714285715, - "target_acc": 0.9014285714285715, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7159.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.9421428571428572, - "target_acc": 0.9421428571428572, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7629.8828125, - "membrane_saturation_frac": 0.30001184341755316, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.0407142857142857 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.8428571428571429, - "target_acc": 0.8428571428571429, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 6449.640625, - "membrane_saturation_frac": 0.3889967032358156, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.05857142857142861 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.9157142857142857, - "target_acc": 0.9157142857142857, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.03844964373905227, - "spikes_per_inference": 6912.2421875, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.9428571428571428, - "target_acc": 0.9428571428571428, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.013396262930022496, - "spikes_per_inference": 7548.390625, - "membrane_saturation_frac": 0.2957444730718085, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.027142857142857135 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.8428571428571429, - "target_acc": 0.8428571428571429, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 6449.640625, - "membrane_saturation_frac": 0.3889967032358156, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.07285714285714284 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.9264285714285714, - "acc_by_bits": { - "0": 0.9264285714285714, - "4": 0.94, - "2": 0.8428571428571429 - } - }, - "soft": { - "fp32_acc": 0.9014285714285715, - "acc_by_bits": { - "0": 0.9014285714285715, - "4": 0.9421428571428572, - "2": 0.8428571428571429 - } - }, - "trained": { - "fp32_acc": 0.9157142857142857, - "acc_by_bits": { - "0": 0.9157142857142857, - "4": 0.9428571428571428, - "2": 0.8428571428571429 - } - } + "speedup_at_min_ticks": null, + "full_T_acc": 0.9471428571428572, + "t_sweep_rows": [ + { + "T": 4, + "arm": "raw", + "acc": 0.29928571428571427, + "syn_per_inference": 1866356.1696428573, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.38034504317964374 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.4421428571428571, + "syn_per_inference": 1826142.4926948054, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.37214989107309493 + }, + { + "T": 4, + "arm": "ftbc", + "acc": 0.1457142857142857, + "syn_per_inference": 1930750.6753246754, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.39346801051163466 + }, + { + "T": 4, + "arm": "both", + "acc": 0.23785714285714285, + "syn_per_inference": 1891963.7873376624, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.385563623971606 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.6071428571428571, + "syn_per_inference": 2047413.7930194808, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2086214036149402 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7614285714285715, + "syn_per_inference": 1950466.1079545454, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.19874291095047586 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.22642857142857142, + "syn_per_inference": 2217957.851461039, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2259990050414671 + }, + { + "T": 8, + "arm": "both", + "acc": 0.4878571428571429, + "syn_per_inference": 2107893.627435065, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.21478400151732632 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.795, + "syn_per_inference": 2334632.549512987, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.11894379169103592 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.8978571428571429, + "syn_per_inference": 2122709.396103896, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1081468277667316 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.49642857142857144, + "syn_per_inference": 2581577.3790584416, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.13152502395851207 + }, + { + "T": 16, + "arm": "both", + "acc": 0.8085714285714286, + "syn_per_inference": 2327981.189935065, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.118604921264397 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.8828571428571429, + "syn_per_inference": 2554239.542207792, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08328462614147902 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.9221428571428572, + "syn_per_inference": 2240504.061688312, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.07305483297971593 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.7678571428571429, + "syn_per_inference": 2843913.9107142854, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09272987240173354 + }, + { + "T": 25, + "arm": "both", + "acc": 0.8828571428571429, + "syn_per_inference": 2468573.5324675324, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08049136361603755 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9335714285714286, + "syn_per_inference": 2908471.4699675324, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.04741743188464388 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9385714285714286, + "syn_per_inference": 2421485.2816558443, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.039477991992771876 + }, + { + "T": 50, + "arm": "ftbc", + "acc": 0.9185714285714286, + "syn_per_inference": 3242881.149350649, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.05286938434745815 + }, + { + "T": 50, + "arm": "both", + "acc": 0.9285714285714286, + "syn_per_inference": 2676649.548701299, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.043637989564334095 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9471428571428572, + "syn_per_inference": 3264602.8230519476, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026611758717751816 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.9357142857142857, + "syn_per_inference": 2689589.7467532465, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.02192447818917961 + }, + { + "T": 100, + "arm": "ftbc", + "acc": 0.9428571428571428, + "syn_per_inference": 3643597.5600649347, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.029701174810107787 + }, + { + "T": 100, + "arm": "both", + "acc": 0.9314285714285714, + "syn_per_inference": 2949095.00974026, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.024039863067190925 } - }, - "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" + ], + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -5972,362 +3760,360 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/no_learn_reset", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/ftbc_ref_ticks_25", "repo_id": "UWU-R-13/SSVEP-SNN", "push_hf": false, "keep_epoch_weights": 1, "no_resume": true, "selftest": false, - "reset_mode": "srif", - "learn_reset": false, - "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": 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": 25, + "ftbc_lr": 1.0, + "t_sweep": "4,8,16,25,50,100", "sampling_rate": 250.0 } }, "zip": { - "name": "no_learn_reset.zip", + "name": "ftbc_ref_ticks_25.zip", "files": 81, - "bytes": 12252281, - "MB": 12.3, - "sha256": "600844de2ff500a224c3e08c679649a712a823e9b59de96b2ebad2d66308f326" + "bytes": 12245889, + "MB": 12.2, + "sha256": "cf78b5486d0a886d731d0302948dd4676970143adfcc5145211d7413c97f33c7" } }, { - "key": "opt09_srif_softreset/reset_x_bits_full", - "tag": "reset_x_bits_full", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 10, + "key": "opt03_ftbc_threshold_balance/t_sweep_ultra_low", + "tag": "t_sweep_ultra_low", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 8, "status": "ok", - "duration_s": 352.8, + "duration_s": 361.4, "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", + "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.8478571428571429, - "test_target_acc": 0.8478571428571429, - "best_val_acc": 0.8692857142857143 + "test_acc": 0.9242857142857143, + "test_target_acc": 0.9242857142857143, + "best_val_acc": 0.9464285714285714 }, "efficiency": { - "spikes_per_inference": 9121.73828125, - "syn_ops_per_inference": 4522878.1777597405, + "spikes_per_inference": null, + "syn_ops_per_inference": 3280250.712662338, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.03686872471175707, - "syn_ops_per_inference_dense_fanout": 66099495.96428571, + "event_fraction_of_dense": 0.026739314161805628, + "syn_ops_per_inference_dense_fanout": 64856868.49918831, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 15.272142857142857, + "effective_ticks": 12.063571428571429, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 97.55348075000256, - "infer_ms_per_sample": 0.6508080149998818, - "peak_vram_mb": 2830.13888, - "discarded_charge_per_reset": -0.40509077622122347 + "train_ms_per_step": 98.6024443000133, + "infer_ms_per_sample": 0.6513143553127065, + "peak_vram_mb": 2825.365504 }, "optimization_specific": { - "reset_mode": "srif", - "learn_reset": true, - "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": "srif", - "learn_reset": true, - "num_spiking_sites": 4, - "extra_params": 8, - "extra_params_frac_of_weights": 6.5212854757929885e-06, - "extra_flops_per_tick_per_neuron": 0, - "learned_lam_per_layer": [ - 0.7039555907249451, - 0.7162760496139526, - 0.6912680864334106, - 0.8535905480384827 - ], - "learned_v_reset_per_layer": [ - 0.4652628004550934, - 0.5016207695007324, - 0.4343704283237457, - 0.916726291179657 - ] - }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": true, - "discarded_charge_per_reset": -0.40509077622122347, - "spikes_per_inference": 9121.73828125, - "syn_per_inference": 4631522.0, - "lam_per_site": [ - 0.7039555907249451, - 0.7162760496139526, - 0.6912680864334106, - 0.8535905480384827 - ], - "v_reset_per_site": [ - 0.4652628004550934, - 0.5016207695007324, - 0.4343704283237457, - 0.916726291179657 - ], - "u_bits": 0, - "membrane_saturation_frac": null, - "batches": 4, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null + "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.332289695739746, + 0.8534926176071167, + 1.113392949104309, + 2.6782219409942627 + ], + "min_ticks_within_1pct_of_full": null, + "min_ticks_within_1pct_per_arm": { + "raw": 25, + "thresh": 16, + "ftbc": null, + "both": null }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.7407142857142857, - "target_acc": 0.7407142857142858, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.15744831227474765, - "spikes_per_inference": 6255.1328125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 8, - "acc": 0.8028571428571428, - "target_acc": 0.8028571428571428, - "grid_headroom": 1.984375, - "grid_levels_above_thresh": 63, - "discarded_charge_per_reset": 0.1512959886308234, - "spikes_per_inference": 6588.09375, - "membrane_saturation_frac": 0.10686842032358157, - "membrane_memory_reduction_x": 4.0, - "acc_drop_vs_fp32": -0.062142857142857166 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.8342857142857143, - "target_acc": 0.8342857142857143, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.05941473367507645, - "spikes_per_inference": 6960.21875, - "membrane_saturation_frac": 0.16326490469858157, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.09357142857142864 - }, - { - "reset_mode": "hard", - "u_bits": 3, - "acc": 0.8107142857142857, - "target_acc": 0.8107142857142857, - "grid_headroom": 1.5, - "grid_levels_above_thresh": 1, - "discarded_charge_per_reset": 0.01613670709751149, - "spikes_per_inference": 7805.390625, - "membrane_saturation_frac": 0.18435373725620569, - "membrane_memory_reduction_x": 10.666666666666666, - "acc_drop_vs_fp32": -0.07000000000000006 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.4085714285714286, - "target_acc": 0.4085714285714286, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 2916.671875, - "membrane_saturation_frac": 0.1515874335106383, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.3321428571428571 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.8307142857142857, - "target_acc": 0.8307142857142857, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7030.25, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 8, - "acc": 0.87, - "target_acc": 0.87, - "grid_headroom": 1.984375, - "grid_levels_above_thresh": 63, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7334.640625, - "membrane_saturation_frac": 0.1289720467641844, - "membrane_memory_reduction_x": 4.0, - "acc_drop_vs_fp32": -0.03928571428571426 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.8657142857142857, - "target_acc": 0.8657142857142858, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7372.984375, - "membrane_saturation_frac": 0.180172733820922, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.03499999999999992 - }, - { - "reset_mode": "soft", - "u_bits": 3, - "acc": 0.8271428571428572, - "target_acc": 0.8271428571428572, - "grid_headroom": 1.5, - "grid_levels_above_thresh": 1, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7913.796875, - "membrane_saturation_frac": 0.1904026761968085, - "membrane_memory_reduction_x": 10.666666666666666, - "acc_drop_vs_fp32": 0.0035714285714285587 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.4085714285714286, - "target_acc": 0.4085714285714286, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 2916.6796875, - "membrane_saturation_frac": 0.15158750277039007, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.42214285714285715 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.8478571428571429, - "target_acc": 0.8478571428571429, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": -0.4054994834959055, - "spikes_per_inference": 9098.09375, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 8, - "acc": 0.8957142857142857, - "target_acc": 0.8957142857142857, - "grid_headroom": 1.984375, - "grid_levels_above_thresh": 63, - "discarded_charge_per_reset": -0.41906449639349935, - "spikes_per_inference": 9753.5703125, - "membrane_saturation_frac": 0.23588444703014183, - "membrane_memory_reduction_x": 4.0, - "acc_drop_vs_fp32": -0.04785714285714282 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.8957142857142857, - "target_acc": 0.8957142857142857, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": -0.4484818391381923, - "spikes_per_inference": 10158.6953125, - "membrane_saturation_frac": 0.3265235067597517, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.04785714285714282 - }, - { - "reset_mode": "trained", - "u_bits": 3, - "acc": 0.8785714285714286, - "target_acc": 0.8785714285714286, - "grid_headroom": 1.5, - "grid_levels_above_thresh": 1, - "discarded_charge_per_reset": -0.45839456771794834, - "spikes_per_inference": 11573.875, - "membrane_saturation_frac": 0.3351565962987589, - "membrane_memory_reduction_x": 10.666666666666666, - "acc_drop_vs_fp32": -0.030714285714285694 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.44357142857142856, - "target_acc": 0.44357142857142856, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": -0.47925886040673965, - "spikes_per_inference": 12766.6015625, - "membrane_saturation_frac": 0.3268530446586879, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.4042857142857143 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.7407142857142857, - "acc_by_bits": { - "0": 0.7407142857142857, - "8": 0.8028571428571428, - "4": 0.8342857142857143, - "3": 0.8107142857142857, - "2": 0.4085714285714286 - } - }, - "soft": { - "fp32_acc": 0.8307142857142857, - "acc_by_bits": { - "0": 0.8307142857142857, - "8": 0.87, - "4": 0.8657142857142857, - "3": 0.8271428571428572, - "2": 0.4085714285714286 - } - }, - "trained": { - "fp32_acc": 0.8478571428571429, - "acc_by_bits": { - "0": 0.8478571428571429, - "8": 0.8957142857142857, - "4": 0.8957142857142857, - "3": 0.8785714285714286, - "2": 0.44357142857142856 - } - } + "speedup_at_min_ticks": null, + "full_T_acc": 0.8828571428571429, + "t_sweep_rows": [ + { + "T": 2, + "arm": "raw", + "acc": 0.02642857142857143, + "syn_per_inference": 1752319.4204545454, + "dense_per_inference": 2453504.0, + "event_fraction_of_dense": 0.7142109490975134 + }, + { + "T": 2, + "arm": "thresh", + "acc": 0.03214285714285714, + "syn_per_inference": 1738330.94237013, + "dense_per_inference": 2453504.0, + "event_fraction_of_dense": 0.7085095204124917 + }, + { + "T": 2, + "arm": "ftbc", + "acc": 0.04428571428571428, + "syn_per_inference": 1793459.4740259738, + "dense_per_inference": 2453504.0, + "event_fraction_of_dense": 0.7309788262118072 + }, + { + "T": 2, + "arm": "both", + "acc": 0.07714285714285714, + "syn_per_inference": 1784578.0275974027, + "dense_per_inference": 2453504.0, + "event_fraction_of_dense": 0.72735892323689 + }, + { + "T": 3, + "arm": "raw", + "acc": 0.14642857142857144, + "syn_per_inference": 1817622.8660714284, + "dense_per_inference": 3680256.0, + "event_fraction_of_dense": 0.49388489987420126 + }, + { + "T": 3, + "arm": "thresh", + "acc": 0.22714285714285715, + "syn_per_inference": 1790499.9334415584, + "dense_per_inference": 3680256.0, + "event_fraction_of_dense": 0.4865150504316978 + }, + { + "T": 3, + "arm": "ftbc", + "acc": 0.08428571428571428, + "syn_per_inference": 1893111.2353896103, + "dense_per_inference": 3680256.0, + "event_fraction_of_dense": 0.5143966168086161 + }, + { + "T": 3, + "arm": "both", + "acc": 0.14714285714285713, + "syn_per_inference": 1874461.9123376624, + "dense_per_inference": 3680256.0, + "event_fraction_of_dense": 0.5093292184939479 + }, + { + "T": 4, + "arm": "raw", + "acc": 0.26785714285714285, + "syn_per_inference": 1874738.8027597403, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3820533414169572 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.3871428571428571, + "syn_per_inference": 1833943.452922078, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.37373965009269966 + }, + { + "T": 4, + "arm": "ftbc", + "acc": 0.135, + "syn_per_inference": 1990891.393668831, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.4057240977941815 + }, + { + "T": 4, + "arm": "both", + "acc": 0.21142857142857144, + "syn_per_inference": 1961136.798701299, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.39966040379418555 + }, + { + "T": 6, + "arm": "raw", + "acc": 0.4764285714285714, + "syn_per_inference": 1969987.3693181819, + "dense_per_inference": 7360512.0, + "event_fraction_of_dense": 0.26764270872979784 + }, + { + "T": 6, + "arm": "thresh", + "acc": 0.6278571428571429, + "syn_per_inference": 1902471.609577922, + "dense_per_inference": 7360512.0, + "event_fraction_of_dense": 0.25847000990935437 + }, + { + "T": 6, + "arm": "ftbc", + "acc": 0.255, + "syn_per_inference": 2175123.340909091, + "dense_per_inference": 7360512.0, + "event_fraction_of_dense": 0.29551250523184946 + }, + { + "T": 6, + "arm": "both", + "acc": 0.3507142857142857, + "syn_per_inference": 2125190.585227273, + "dense_per_inference": 7360512.0, + "event_fraction_of_dense": 0.28872863534863785 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.6135714285714285, + "syn_per_inference": 2061354.8465909092, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.21004192846138717 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7464285714285714, + "syn_per_inference": 1962566.861201299, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.19997591823788538 + }, + { + "T": 8, + "arm": "ftbc", + "acc": 0.32357142857142857, + "syn_per_inference": 2363100.6761363638, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2407883455800728 + }, + { + "T": 8, + "arm": "both", + "acc": 0.4635714285714286, + "syn_per_inference": 2291690.112012987, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2335119600388859 + }, + { + "T": 12, + "arm": "raw", + "acc": 0.7221428571428572, + "syn_per_inference": 2225777.935064935, + "dense_per_inference": 14721024.0, + "event_fraction_of_dense": 0.15119722208624448 + }, + { + "T": 12, + "arm": "thresh", + "acc": 0.8571428571428571, + "syn_per_inference": 2062856.625, + "dense_per_inference": 14721024.0, + "event_fraction_of_dense": 0.1401299682005817 + }, + { + "T": 12, + "arm": "ftbc", + "acc": 0.47714285714285715, + "syn_per_inference": 2584647.832792208, + "dense_per_inference": 14721024.0, + "event_fraction_of_dense": 0.17557527470862136 + }, + { + "T": 12, + "arm": "both", + "acc": 0.5707142857142857, + "syn_per_inference": 2447611.5698051946, + "dense_per_inference": 14721024.0, + "event_fraction_of_dense": 0.1662663935474322 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.8064285714285714, + "syn_per_inference": 2357961.4675324676, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.12013234273983595 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.8921428571428571, + "syn_per_inference": 2139811.6217532465, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.10901814413962879 + }, + { + "T": 16, + "arm": "ftbc", + "acc": 0.6371428571428571, + "syn_per_inference": 2753975.573051948, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.14030828832212766 + }, + { + "T": 16, + "arm": "both", + "acc": 0.6585714285714286, + "syn_per_inference": 2552953.403409091, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.13006670273459361 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.8828571428571429, + "syn_per_inference": 2582600.840909091, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08420938676795606 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.9257142857142857, + "syn_per_inference": 2259412.2305194805, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.07367136081357864 + }, + { + "T": 25, + "arm": "ftbc", + "acc": 0.8107142857142857, + "syn_per_inference": 3033411.4326298703, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.09890870958856787 + }, + { + "T": 25, + "arm": "both", + "acc": 0.765, + "syn_per_inference": 2715560.4196428573, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08854472361627638 } - }, - "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" + ], + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -6367,278 +4153,198 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/reset_x_bits_full", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/t_sweep_ultra_low", "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,8,4,3,2", "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": "2,3,4,6,8,12,16,25", "sampling_rate": 250.0 } }, "zip": { - "name": "reset_x_bits_full.zip", + "name": "t_sweep_ultra_low.zip", "files": 81, - "bytes": 12269476, + "bytes": 12250607, "MB": 12.3, - "sha256": "44447e048efd1105904179a9e495f1c420dc4b70d30bbf5a28d57dc17386d626" + "sha256": "39c7a527158f3ac451c03f8cd69f8d779aa19f416260eb3eb5582179915c5f2a" } }, { - "key": "opt09_srif_softreset/u_bits_2", - "tag": "u_bits_2", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 10, + "key": "opt03_ftbc_threshold_balance/thresh_only", + "tag": "thresh_only", + "script": "opt03_ftbc_threshold_balance.py", + "hf_folder": "applied/opt03_ftbc_threshold_balance", + "phase": 8, "status": "ok", - "duration_s": 303.1, + "duration_s": 361.1, "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", + "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.025, - "test_target_acc": 0.025, - "best_val_acc": 0.025 + "test_acc": 0.93, + "test_target_acc": 0.93, + "best_val_acc": 0.9442857142857143 }, "efficiency": { - "spikes_per_inference": 0.0, - "syn_ops_per_inference": 1578887.635551948, + "spikes_per_inference": null, + "syn_ops_per_inference": 3291572.5738636362, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.012870471257042566, - "syn_ops_per_inference_dense_fanout": 63155505.422077924, + "event_fraction_of_dense": 0.026831605523069343, + "syn_ops_per_inference_dense_fanout": 64868190.36038961, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 100.0, + "effective_ticks": 12.039285714285715, "num_ticks": 100, - "membrane_bytes_per_inference": 0, + "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 82.91583395002817, - "infer_ms_per_sample": 0.5732730162498001, - "peak_vram_mb": 2820.341248, - "discarded_charge_per_reset": 0.0 + "train_ms_per_step": 98.61616005000542, + "infer_ms_per_sample": 0.648547162812747, + "peak_vram_mb": 2825.319424 }, "optimization_specific": { - "reset_mode": "srif", - "learn_reset": true, - "lam_init": 0.9, - "v_reset_init": 0.0, - "u_bits": 2, - "u_scale": 1.0, - "u_headroom_requested": 2.0, - "u_headroom_actual": 1.0, - "u_threshold_level": 1, - "u_levels_above_threshold": 0, - "reset_family": { - "reset_mode": "srif", - "learn_reset": true, - "num_spiking_sites": 4, - "extra_params": 8, - "extra_params_frac_of_weights": 6.5212854757929885e-06, - "extra_flops_per_tick_per_neuron": 0, - "learned_lam_per_layer": [ - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134 - ], - "learned_v_reset_per_layer": [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": true, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "syn_per_inference": 1664173.09375, - "lam_per_site": [ - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134 - ], - "v_reset_per_site": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "u_bits": 2, - "membrane_saturation_frac": 0.0, - "batches": 4, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0 + "calibrate_thresh": true, + "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": [ + 2.316941022872925, + 0.8509324193000793, + 1.1109048128128052, + 2.703218460083008 + ], + "min_ticks_within_1pct_of_full": 50, + "min_ticks_within_1pct_per_arm": { + "raw": 50, + "thresh": 50 }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": 0.0, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": 0.0, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": 0.0, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": 0.0, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": 0.0, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 0.0, - "membrane_saturation_frac": 0.0, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.0 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.025, - "acc_by_bits": { - "0": 0.025, - "4": 0.025, - "2": 0.025 - } - }, - "soft": { - "fp32_acc": 0.025, - "acc_by_bits": { - "0": 0.025, - "4": 0.025, - "2": 0.025 - } - }, - "trained": { - "fp32_acc": 0.025, - "acc_by_bits": { - "0": 0.025, - "4": 0.025, - "2": 0.025 - } - } + "speedup_at_min_ticks": 2.0, + "full_T_acc": 0.9457142857142857, + "t_sweep_rows": [ + { + "T": 4, + "arm": "raw", + "acc": 0.2742857142857143, + "syn_per_inference": 1874088.702922078, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.38192085745979587 + }, + { + "T": 4, + "arm": "thresh", + "acc": 0.41285714285714287, + "syn_per_inference": 1834095.9163961038, + "dense_per_inference": 4907008.0, + "event_fraction_of_dense": 0.3737707206501607 + }, + { + "T": 8, + "arm": "raw", + "acc": 0.595, + "syn_per_inference": 2061721.9034090908, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.2100793297472809 + }, + { + "T": 8, + "arm": "thresh", + "acc": 0.7728571428571429, + "syn_per_inference": 1963701.1875, + "dense_per_inference": 9814016.0, + "event_fraction_of_dense": 0.20009150051314364 + }, + { + "T": 16, + "arm": "raw", + "acc": 0.8207142857142857, + "syn_per_inference": 2358720.708603896, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1201710242068026 + }, + { + "T": 16, + "arm": "thresh", + "acc": 0.9035714285714286, + "syn_per_inference": 2142573.9935064935, + "dense_per_inference": 19628032.0, + "event_fraction_of_dense": 0.1091588801927006 + }, + { + "T": 25, + "arm": "raw", + "acc": 0.89, + "syn_per_inference": 2583865.2305194805, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.08425061399596595 + }, + { + "T": 25, + "arm": "thresh", + "acc": 0.9307142857142857, + "syn_per_inference": 2263356.4123376627, + "dense_per_inference": 30668800.0, + "event_fraction_of_dense": 0.07379996649160263 + }, + { + "T": 50, + "arm": "raw", + "acc": 0.9385714285714286, + "syn_per_inference": 2942934.289772727, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.047979286600270094 + }, + { + "T": 50, + "arm": "thresh", + "acc": 0.9421428571428572, + "syn_per_inference": 2448527.6655844157, + "dense_per_inference": 61337600.0, + "event_fraction_of_dense": 0.039918869756632405 + }, + { + "T": 100, + "arm": "raw", + "acc": 0.9457142857142857, + "syn_per_inference": 3291572.496753247, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.026831604894495768 + }, + { + "T": 100, + "arm": "thresh", + "acc": 0.93, + "syn_per_inference": 2714702.452922078, + "dense_per_inference": 122675200.0, + "event_fraction_of_dense": 0.02212918709667543 } - }, - "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" + ], + "calibration_reference": "same network at full T (NOT a source ANN)" }, "config": { "method": "harmonic_matched", @@ -6678,278 +4384,137 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/u_bits_2", + "hub_dir": "/kaggle/working/hub/opt03_ftbc_threshold_balance/thresh_only", "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": 2, - "u_headroom": 2.0, - "reset_sweep": "hard,soft,trained", - "bits_sweep": "0,4,2", "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": false, + "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": "u_bits_2.zip", + "name": "thresh_only.zip", "files": 81, - "bytes": 10276157, - "MB": 10.3, - "sha256": "73e4f4b1f74a1efe218f865b59d03062b3c9d292f5b6a35747f4559d0736ef1f" + "bytes": 12246575, + "MB": 12.2, + "sha256": "17a308e5444a23727992a34377bb7f0dc5f72c901454d5a8a2380dbb443a30b6" } }, { - "key": "opt09_srif_softreset/u_bits_4", - "tag": "u_bits_4", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 10, + "key": "opt04_cudagraph_unroll/bench_batches_wide", + "tag": "bench_batches_wide", + "script": "opt04_cudagraph_unroll.py", + "hf_folder": "applied/opt04_cudagraph_unroll", + "phase": 8, "status": "ok", - "duration_s": 345.7, + "duration_s": 639.6, "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", + "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.92, - "test_target_acc": 0.92, - "best_val_acc": 0.935 + "test_acc": 0.9492857142857143, + "test_target_acc": 0.9492857142857143, + "best_val_acc": 0.9428571428571428 }, "efficiency": { - "spikes_per_inference": 11915.01171875, - "syn_ops_per_inference": 4401361.720779221, + "spikes_per_inference": null, + "syn_ops_per_inference": 3288914.2832792206, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.035878170329285954, - "syn_ops_per_inference_dense_fanout": 65977979.5073052, + "event_fraction_of_dense": 0.02680993618334611, + "syn_ops_per_inference_dense_fanout": 64865532.0698052, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 21.25857142857143, + "effective_ticks": 12.153571428571428, "num_ticks": 100, - "membrane_bytes_per_inference": 0, + "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 98.06833220000044, - "infer_ms_per_sample": 0.650274362812695, - "peak_vram_mb": 2834.694656, - "discarded_charge_per_reset": -0.7078402399200352 + "train_ms_per_step": 96.87458276748657, + "infer_ms_per_sample": 0.6550618261098862, + "peak_vram_mb": 2804.85888 }, "optimization_specific": { - "reset_mode": "srif", - "learn_reset": true, - "lam_init": 0.9, - "v_reset_init": 0.0, - "u_bits": 4, - "u_scale": 0.25, - "u_headroom_requested": 2.0, - "u_headroom_actual": 1.75, - "u_threshold_level": 4, - "u_levels_above_threshold": 3, - "reset_family": { - "reset_mode": "srif", - "learn_reset": true, - "num_spiking_sites": 4, - "extra_params": 8, - "extra_params_frac_of_weights": 6.5212854757929885e-06, - "extra_flops_per_tick_per_neuron": 0, - "learned_lam_per_layer": [ - 0.5789579153060913, - 0.5431995391845703, - 0.5589428544044495, - 0.7961611747741699 - ], - "learned_v_reset_per_layer": [ - 0.6194214224815369, - 0.877713143825531, - 0.6152849197387695, - 0.9643499255180359 + "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, + 7935, + 3512, + 3383 ] }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": true, - "discarded_charge_per_reset": -0.7078402399200352, - "spikes_per_inference": 11915.01171875, - "syn_per_inference": 4434214.6875, - "lam_per_site": [ - 0.5789579153060913, - 0.5431995391845703, - 0.5589428544044495, - 0.7961611747741699 - ], - "v_reset_per_site": [ - 0.6194214224815369, - 0.877713143825531, - 0.6152849197387695, - 0.9643499255180359 - ], - "u_bits": 4, - "membrane_saturation_frac": 0.2822270126883865, - "batches": 4, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3 - }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.295, - "target_acc": 0.295, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.08765906069564103, - "spikes_per_inference": 4919.84375, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.7471428571428571, - "target_acc": 0.7471428571428571, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.013719326346275418, - "spikes_per_inference": 5178.40625, - "membrane_saturation_frac": 0.12054306571365248, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.4521428571428571 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.04, - "target_acc": 0.04, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 428.6640625, - "membrane_saturation_frac": 0.06521574412677306, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.255 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.43785714285714283, - "target_acc": 0.43785714285714283, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 5315.078125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.7878571428571428, - "target_acc": 0.7878571428571428, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 5275.203125, - "membrane_saturation_frac": 0.1267951435062057, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.35 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.04, - "target_acc": 0.04, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 428.6640625, - "membrane_saturation_frac": 0.06521574412677306, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.39785714285714285 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.8771428571428571, - "target_acc": 0.8771428571428571, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": -0.672806146062752, - "spikes_per_inference": 10959.46875, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.92, - "target_acc": 0.92, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": -0.70911303501342, - "spikes_per_inference": 11931.078125, - "membrane_saturation_frac": 0.2747938137189716, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.04285714285714293 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.03785714285714286, - "target_acc": 0.03785714285714286, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": -0.7804550254675015, - "spikes_per_inference": 6802.96875, - "membrane_saturation_frac": 0.12682423260195036, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.8392857142857143 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.295, - "acc_by_bits": { - "0": 0.295, - "4": 0.7471428571428571, - "2": 0.04 - } - }, - "soft": { - "fp32_acc": 0.43785714285714283, - "acc_by_bits": { - "0": 0.43785714285714283, - "4": 0.7878571428571428, - "2": 0.04 - } - }, - "trained": { - "fp32_acc": 0.8771428571428571, - "acc_by_bits": { - "0": 0.8771428571428571, - "4": 0.92, - "2": 0.03785714285714286 - } - } + "capacity": 98901, + "overflow_ticks_frac": 0.0, + "graph_vs_eager_pred_agreement": 1.0, + "graph_capture_ms": 246.45113945007324, + "graphed_acc": 0.9492857142857143, + "kernel_launches_eager": 400, + "kernel_launches_graphed": 2, + "launch_reduction_x": 200.0, + "bench_batches": { + "1": { + "ms_per_sample_eager": 155.08618831634521, + "ms_per_sample_graphed": 32.538652420043945, + "throughput_eager_samples_per_s": 6.4480274539999485, + "throughput_graphed_samples_per_s": 30.732680231833935, + "speedup_x": 4.766214233900218, + "capacity": 1546 + }, + "4": { + "ms_per_sample_eager": 39.0606689453125, + "ms_per_sample_graphed": 15.353316068649292, + "throughput_eager_samples_per_s": 25.601200056252637, + "throughput_graphed_samples_per_s": 65.13250919402033, + "speedup_x": 2.5441193792051506, + "capacity": 6182 + }, + "16": { + "ms_per_sample_eager": 10.658027529716492, + "ms_per_sample_graphed": 11.284635066986084, + "throughput_eager_samples_per_s": 93.82599146153645, + "throughput_graphed_samples_per_s": 88.61606902340718, + "speedup_x": 0.9444725032267306, + "capacity": 24726 + }, + "64": { + "ms_per_sample_eager": 3.5885700583457947, + "ms_per_sample_graphed": 9.764026775956154, + "throughput_eager_samples_per_s": 278.66252678398735, + "throughput_graphed_samples_per_s": 102.41676133687925, + "speedup_x": 0.3675297232062721, + "capacity": 98901 + }, + "256": { + "ms_per_sample_eager": 1.2360872328281403, + "ms_per_sample_graphed": 9.808671623468399, + "throughput_eager_samples_per_s": 809.0043917952473, + "throughput_graphed_samples_per_s": 101.95060436189773, + "speedup_x": 0.1260198404308547, + "capacity": 395604 } }, - "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" + "speedup_x_at_batch1": 4.766214233900218 }, "config": { "method": "harmonic_matched", @@ -6989,278 +4554,124 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/u_bits_4", + "hub_dir": "/kaggle/working/hub/opt04_cudagraph_unroll/bench_batches_wide", "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": 4, - "u_headroom": 2.0, - "reset_sweep": "hard,soft,trained", - "bits_sweep": "0,4,2", "baseline": false, "bench": true, "bench_warmup": 10, "bench_iters": 50, "bench_train_steps": 20, + "event_capacity": 0, + "graph_warmup": 3, + "bench_batches": "1,4,16,64,256", "sampling_rate": 250.0 } }, "zip": { - "name": "u_bits_4.zip", - "files": 81, - "bytes": 12262238, - "MB": 12.3, - "sha256": "e272a8770dc758e21ec340f0e670fb3661af3f7c3d82166c465f0ded0a39437c" + "name": "bench_batches_wide.zip", + "files": 78, + "bytes": 7977178, + "MB": 8.0, + "sha256": "20c84fb916addc61aa295dfeead6cf4874dd253da092adb70e951ec451943fe1" } }, { - "key": "opt09_srif_softreset/u_headroom_1.0", - "tag": "u_headroom_1.0", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 10, + "key": "opt04_cudagraph_unroll/bench_deep", + "tag": "bench_deep", + "script": "opt04_cudagraph_unroll.py", + "hf_folder": "applied/opt04_cudagraph_unroll", + "phase": 8, "status": "ok", - "duration_s": 377.0, + "duration_s": 515.1, "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", + "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.027142857142857142, - "test_target_acc": 0.027142857142857142, - "best_val_acc": 0.9271428571428572 + "test_acc": 0.9471428571428572, + "test_target_acc": 0.9471428571428572, + "best_val_acc": 0.9478571428571428 }, "efficiency": { - "spikes_per_inference": 42530.8515625, - "syn_ops_per_inference": 8441536.425324677, + "spikes_per_inference": null, + "syn_ops_per_inference": 3288532.137987013, "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.0688120861048091, - "syn_ops_per_inference_dense_fanout": 70018154.21185066, + "event_fraction_of_dense": 0.026806821085166462, + "syn_ops_per_inference_dense_fanout": 64865149.92451298, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 100.0, + "effective_ticks": 12.623571428571429, "num_ticks": 100, - "membrane_bytes_per_inference": 0, + "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 109.88897699999143, - "infer_ms_per_sample": 0.7659782600001108, - "peak_vram_mb": 2864.751104, - "discarded_charge_per_reset": -1.0151342772222465 + "train_ms_per_step": 99.1249680519104, + "infer_ms_per_sample": 0.6687609851360321, + "peak_vram_mb": 2804.772352 }, "optimization_specific": { - "reset_mode": "srif", - "learn_reset": true, - "lam_init": 0.9, - "v_reset_init": 0.0, - "u_bits": 4, - "u_scale": 0.14285714285714285, - "u_headroom_requested": 1.0, - "u_headroom_actual": 1.0, - "u_threshold_level": 7, - "u_levels_above_threshold": 0, - "reset_family": { - "reset_mode": "srif", - "learn_reset": true, - "num_spiking_sites": 4, - "extra_params": 8, - "extra_params_frac_of_weights": 6.5212854757929885e-06, - "extra_flops_per_tick_per_neuron": 0, - "learned_lam_per_layer": [ - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134 - ], - "learned_v_reset_per_layer": [ - 0.5309860706329346, - 0.9011129140853882, - 1.1452094316482544, - 1.5818078517913818 + "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, + 7862, + 3565, + 3290 ] }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": true, - "discarded_charge_per_reset": -1.0151342772222465, - "spikes_per_inference": 42530.8515625, - "syn_per_inference": 8537739.03125, - "lam_per_site": [ - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134, - 0.5803266763687134 - ], - "v_reset_per_site": [ - 0.5309860706329346, - 0.9011129140853882, - 1.1452094316482544, - 1.5818078517913818 - ], - "u_bits": 4, - "membrane_saturation_frac": 0.5931137799202127, - "batches": 4, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0 - }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.1543459879080405, - "spikes_per_inference": 8712.734375, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9348.4375, - "membrane_saturation_frac": 0.37194453679078016, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 4515.7578125, - "membrane_saturation_frac": 0.10904539284131205, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9918.25, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9348.4375, - "membrane_saturation_frac": 0.37194453679078016, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.025, - "target_acc": 0.025, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 4515.7578125, - "membrane_saturation_frac": 0.10904539284131205, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.027142857142857142, - "target_acc": 0.027142857142857142, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": -0.8385291672512332, - "spikes_per_inference": 38981.2578125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.027142857142857142, - "target_acc": 0.027142857142857142, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": -1.0162284200455858, - "spikes_per_inference": 42474.8671875, - "membrane_saturation_frac": 0.5922369514627659, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.02642857142857143, - "target_acc": 0.02642857142857143, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": -0.9949134701506006, - "spikes_per_inference": 9275.1953125, - "membrane_saturation_frac": 0.1492860704787234, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.0007142857142857124 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.025, - "acc_by_bits": { - "0": 0.025, - "4": 0.025, - "2": 0.025 - } - }, - "soft": { - "fp32_acc": 0.025, - "acc_by_bits": { - "0": 0.025, - "4": 0.025, - "2": 0.025 - } - }, - "trained": { - "fp32_acc": 0.027142857142857142, - "acc_by_bits": { - "0": 0.027142857142857142, - "4": 0.027142857142857142, - "2": 0.02642857142857143 - } - } + "capacity": 98901, + "overflow_ticks_frac": 0.0, + "graph_vs_eager_pred_agreement": 1.0, + "graph_capture_ms": 230.26442527770996, + "graphed_acc": 0.9471428571428572, + "kernel_launches_eager": 400, + "kernel_launches_graphed": 2, + "launch_reduction_x": 200.0, + "bench_batches": { + "1": { + "ms_per_sample_eager": 152.34436988830566, + "ms_per_sample_graphed": 32.587409019470215, + "throughput_eager_samples_per_s": 6.564075854809535, + "throughput_graphed_samples_per_s": 30.686698638806277, + "speedup_x": 4.674945768081269, + "capacity": 1546 + }, + "8": { + "ms_per_sample_eager": 19.862996339797974, + "ms_per_sample_graphed": 12.355670928955078, + "throughput_eager_samples_per_s": 50.34487158397024, + "throughput_graphed_samples_per_s": 80.93449605043585, + "speedup_x": 1.607601598813201, + "capacity": 12363 + }, + "32": { + "ms_per_sample_eager": 5.842189788818359, + "ms_per_sample_graphed": 11.338528245687485, + "throughput_eager_samples_per_s": 171.16869464151043, + "throughput_graphed_samples_per_s": 88.19486782866565, + "speedup_x": 0.5152511562548153, + "capacity": 49451 + }, + "128": { + "ms_per_sample_eager": 2.0107360556721687, + "ms_per_sample_graphed": 9.604028947651386, + "throughput_eager_samples_per_s": 497.33031701453734, + "throughput_graphed_samples_per_s": 104.1229681262617, + "speedup_x": 0.2093638062350784, + "capacity": 197802 } }, - "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" + "speedup_x_at_batch1": 4.674945768081269 }, "config": { "method": "harmonic_matched", @@ -7300,34 +4711,29 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/u_headroom_1.0", + "hub_dir": "/kaggle/working/hub/opt04_cudagraph_unroll/bench_deep", "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": 4, - "u_headroom": 1.0, - "reset_sweep": "hard,soft,trained", - "bits_sweep": "0,4,2", "baseline": false, "bench": true, - "bench_warmup": 10, - "bench_iters": 50, - "bench_train_steps": 20, + "bench_warmup": 50, + "bench_iters": 300, + "bench_train_steps": 60, + "event_capacity": 0, + "graph_warmup": 3, + "bench_batches": "1,8,32,128", "sampling_rate": 250.0 } }, "zip": { - "name": "u_headroom_1.0.zip", + "name": "bench_deep.zip", "files": 81, - "bytes": 12376323, - "MB": 12.4, - "sha256": "bdc988664ace513f808a1701b953a16837db9aae49686a1a8ebbda310392ac05" + "bytes": 12255264, + "MB": 12.3, + "sha256": "70a596bb1874f408054a990df12a3c72c0bde75bfcf9116e0193c989df6825e7" } } ] \ No newline at end of file