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" @@ -461,139 +461,131 @@ } }, { - "key": "opt07_sfa_integer_train/storm_reg_0", - "tag": "storm_reg_0", - "script": "opt07_sfa_integer_train.py", - "hf_folder": "applied/opt07_sfa_integer_train", - "phase": 5, + "key": "opt02_seenn_bayes/default", + "tag": "default", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 1, "status": "ok", - "duration_s": 620.6, + "duration_s": 586.1, "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.93, - "test_target_acc": 0.93, - "best_val_acc": 0.9335714285714286 + "test_acc": 0.9278571428571428, + "test_target_acc": 0.9278571428571428, + "best_val_acc": 0.9307142857142857 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 5285655.101461039, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.04308658230401123, - "syn_ops_per_inference_dense_fanout": 66862272.88798702, + "syn_ops_per_inference": 3638362.4326298703, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.029352237200455246, + "syn_ops_per_inference_dense_fanout": 65214980.21915584, "weight_sparsity": 0.7324707846410685, - "effective_ticks": 4.083571428571428, + "effective_ticks": 7.985, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 104.8419256499983, - "infer_ms_per_sample": 0.6984454099999482, - "peak_vram_mb": 2830.736384 + "train_ms_per_step": 174.30670261383057, + "infer_ms_per_sample": 0.6237456846476799, + "peak_vram_mb": 10914.396672, + "syn_ops_per_inference_early_exit": 1846599.2897727273 }, "optimization_specific": { - "sfa_levels_D": 4, - "soft_reset": true, - "storm_reg": 0.0, - "trained_T": 100, - "infer_mode": "graded", - "min_ticks_within_1pct_of_full": 100, - "speedup_at_min_ticks": 1.0, - "full_T_acc": 0.93, - "t_sweep_rows": [ - { - "T": 4, - "acc": 0.12142857142857143, - "syn_per_inference": 2814512.5584415584, - "dense_per_inference": 4907008.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 25.0 - }, - { - "T": 8, - "acc": 0.2307142857142857, - "syn_per_inference": 3556388.2735389615, - "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.3, + "ic_layer": 0, + "mean_exit_tick": 7.985, + "mean_exit_ms": 399.25000000000006, + "ticks_saved_frac": 0.92015, + "exit_tick_histogram": { + "counts": [ + 1040, + 316, + 39, + 4, + 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.9278571428571428, + "acc_ic_only": 0.935, + "acc_fused": 0.9378571428571428, + "acc_early_exit": 0.3578571428571429, + "syn_ops_saved_frac": 0.49246417200994075, + "syn_per_inference_early_exit": 1846599.2897727273, + "anytime_acc": { + "0.25": 0.6228571428571429, + "0.5": 0.8078571428571428, + "0.75": 0.8885714285714286, + "1.0": 0.9278571428571428 + }, + "pareto": [ { - "T": 16, - "acc": 0.5378571428571428, - "syn_per_inference": 4167199.856331169, - "dense_per_inference": 19628032.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 6.25 + "conf": 0.5, + "mean_ticks": 4.405, + "acc": 0.22785714285714287, + "syn_ops": 1715995.05762987 }, { - "T": 25, - "acc": 0.7707142857142857, - "syn_per_inference": 4437607.62012987, - "dense_per_inference": 30668800.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 4.0 + "conf": 0.7, + "mean_ticks": 5.097857142857142, + "acc": 0.25285714285714284, + "syn_ops": 1744549.8368506492 }, { - "T": 50, - "acc": 0.8842857142857142, - "syn_per_inference": 4779261.4342532465, - "dense_per_inference": 61337600.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 2.0 + "conf": 0.8, + "mean_ticks": 5.984285714285714, + "acc": 0.28285714285714286, + "syn_ops": 1779479.5024350649 }, { - "T": 100, - "acc": 0.93, - "syn_per_inference": 5285655.101461039, - "dense_per_inference": 122675200.0, - "infer_mode": "graded", - "ticks_speedup_vs_trained_T": 1.0 - } - ], - "storm_ratio_peak_over_mean": 4.048530718036778, - "tick_activity_cv": 0.5872231855348422, - "mean_integer_activation": 0.10196488050743936, - "frac_activations_gt1": 0.02114660758525133, - "max_activation": 4.0, - "per_layer_activity": [ - { - "layer": 0, - "mean_integer_activation": 0.18338739359751344, - "peak_tick_activation": 0.6446411237120628, - "storm_ratio": 3.515187773085857, - "tick_activity_cv": 0.5872231855348422, - "frac_activations_gt1": 0.02114660758525133, - "max_activation": 4.0 + "conf": 0.9, + "mean_ticks": 7.984285714285714, + "acc": 0.3578571428571429, + "syn_ops": 1846555.8522727273 }, { - "layer": 1, - "mean_integer_activation": 0.04924224853515625, - "peak_tick_activation": 0.12945556640625, - "storm_ratio": 2.6289531907509436, - "tick_activity_cv": 0.3385586560128827, - "frac_activations_gt1": 0.0011788940100814216, - "max_activation": 4.0 + "conf": 0.95, + "mean_ticks": 10.01142857142857, + "acc": 0.42857142857142855, + "syn_ops": 1902723.0324675327 }, { - "layer": 2, - "mean_integer_activation": 0.07326499938964844, - "peak_tick_activation": 0.2966156005859375, - "storm_ratio": 4.048530718036778, - "tick_activity_cv": 0.5675882158492334, - "frac_activations_gt1": 0.0014440917584579438, - "max_activation": 4.0 + "conf": 0.99, + "mean_ticks": 14.458571428571428, + "acc": 0.5621428571428572, + "syn_ops": 2004484.2800324673 } - ], - "expanded_vs_graded_agreement": 1.0, - "expanded_acc": 0.8984375, - "graded_acc": 0.8984375, - "syn_ratio_expanded_over_graded": 1.000382822740147, - "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", @@ -633,159 +625,187 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt07_sfa_integer_train/storm_reg_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, - "sfa_levels": 4, - "soft_reset": true, - "storm_reg": 0.0, - "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.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/default", + "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_0.zip", + "name": "default.zip", "files": 81, - "bytes": 12259837, - "MB": 12.3, - "sha256": "194904e94dac6ff6cfd7ba1ce7a3b3ffeb09cd84de849835a09aaac3268a4a08" + "bytes": 12636571, + "MB": 12.6, + "sha256": "1c64c6704af63b5eec37b2f1d2e824ba1c5c3c28328c5b1c03089bd12b4cc747" } }, { - "key": "opt08_mint_quant/u_bits_0", - "tag": "u_bits_0", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 5, + "key": "opt02_seenn_bayes/conf_sweep_fine", + "tag": "conf_sweep_fine", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 341.5, + "duration_s": 909.8, "optimization_summary": { - "optimization": "mint_quant", - "research_section": "4. Membrane-Potential Memory-Wall Optimizations (multiplier-less integer quantization)", - "reference": "Yin et al., MINT: Multiplier-less INTeger Quantization for Energy Efficient Spiking Neural Networks, arXiv:2305.09850 (ASP-DAC 2024)", - "script": "opt08_mint_quant.py", + "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.9407142857142857, - "test_target_acc": 0.9407142857142857, - "best_val_acc": 0.9421428571428572 + "test_acc": 0.9342857142857143, + "test_target_acc": 0.9342857142857143, + "best_val_acc": 0.9285714285714286 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 2152696.525466721, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.0175479357316452, - "syn_ops_per_inference_dense_fanout": 64922516.865259744, - "weight_sparsity": 0.8335865765859767, - "effective_ticks": 12.575, + "syn_ops_per_inference": 3615247.340909091, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.02916575779724522, + "syn_ops_per_inference_dense_fanout": 65191865.127435066, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 8.057142857142857, "num_ticks": 100, "membrane_bytes_per_inference": 451200, - "weight_bytes": 613376, + "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 99.00966735000338, - "infer_ms_per_sample": 0.6622065121874954, - "peak_vram_mb": 2833.092608 + "train_ms_per_step": 180.51012754440308, + "infer_ms_per_sample": 0.6378180717104044, + "peak_vram_mb": 10915.470336, + "syn_ops_per_inference_early_exit": 1822430.1501623376 }, "optimization_specific": { - "w_bits": 4, - "u_bits": 0, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": true, - "batchnorm": true, - "membrane_memory_reduction_x": 1.0, - "weight_memory_reduction_x": 8.0, - "membrane_bytes_per_inference": 451200.0, - "working_set_bytes": 617888.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": true, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": null, - "acc_vs_ubits": { - "2": 0.8964285714285715, - "4": 0.9521428571428572, - "8": 0.9521428571428572, - "0": 0.9407142857142857 + "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": 8.057142857142857, + "mean_exit_ms": 402.85714285714283, + "ticks_saved_frac": 0.9194285714285715, + "exit_tick_histogram": { + "counts": [ + 1022, + 331, + 39, + 5, + 3, + 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": [ + "acc_fc_only": 0.9342857142857143, + "acc_ic_only": 0.9292857142857143, + "acc_fused": 0.94, + "acc_early_exit": 0.37714285714285717, + "syn_ops_saved_frac": 0.49590443521242755, + "syn_per_inference_early_exit": 1822430.1501623376, + "anytime_acc": { + "0.25": 0.615, + "0.5": 0.8142857142857143, + "0.75": 0.895, + "1.0": 0.9342857142857143 + }, + "pareto": [ { - "u_bits": 2, - "acc": 0.8964285714285715, - "target_acc": 0.8964285714285715, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.09132064494680851, - "acc_drop_vs_fp32": 0.04428571428571426 + "conf": 0.3, + "mean_ticks": 2.82, + "acc": 0.17142857142857143, + "syn_ops": 1600944.0178571427 }, { - "u_bits": 4, - "acc": 0.9521428571428572, - "target_acc": 0.9521428571428572, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.2783921348625886, - "acc_drop_vs_fp32": -0.011428571428571455 + "conf": 0.4, + "mean_ticks": 3.285, + "acc": 0.18571428571428572, + "syn_ops": 1629355.7386363635 }, { - "u_bits": 8, - "acc": 0.9521428571428572, - "target_acc": 0.9521428571428572, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.32464220412234046, - "acc_drop_vs_fp32": -0.011428571428571455 + "conf": 0.5, + "mean_ticks": 4.3757142857142854, + "acc": 0.24285714285714285, + "syn_ops": 1687021.986201299 }, { - "u_bits": 0, - "acc": 0.9407142857142857, - "target_acc": 0.9407142857142857, - "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.9407142857142857, - "per_layer_scales": [ + "conf": 0.6, + "mean_ticks": 4.670714285714285, + "acc": 0.2507142857142857, + "syn_ops": 1699344.8084415584 + }, { - "layer": 0, - "weight_scale": 0.034521830933434625, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 28.967177376200326 + "conf": 0.7, + "mean_ticks": 5.075714285714286, + "acc": 0.26285714285714284, + "syn_ops": 1716703.7767857143 }, { - "layer": 1, - "weight_scale": 0.02071961760520935, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 48.263438981063956 + "conf": 0.8, + "mean_ticks": 5.987857142857143, + "acc": 0.2914285714285714, + "syn_ops": 1753268.2150974027 }, { - "layer": 2, - "weight_scale": 0.013957016170024872, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 71.64855208433981 + "conf": 0.9, + "mean_ticks": 8.057142857142857, + "acc": 0.37714285714285717, + "syn_ops": 1822430.0933441557 }, { - "layer": 3, - "weight_scale": 0.0242827194077628, - "membrane_scale": 1.0, - "shared_scale_gauge_factor": 41.18154903524997 + "conf": 0.95, + "mean_ticks": 10.176428571428572, + "acc": 0.45, + "syn_ops": 1882071.5430194808 + }, + { + "conf": 0.99, + "mean_ticks": 14.704285714285714, + "acc": 0.5742857142857143, + "syn_ops": 1981175.7142857143 + }, + { + "conf": 0.999, + "mean_ticks": 19.547142857142855, + "acc": 0.68, + "syn_ops": 2074480.44237013 } - ], - "shared_scale_note": "weight grid and membrane grid are the same grid up to a per-layer positive scalar that BatchNorm absorbs exactly; exact only with --batchnorm on", - "multiplier_less_compare": false, - "wall_clock_caveat": "this reference kernel computes in fp32 registers, so the traffic win does not appear in train_ms_per_step; a fixed-point core is where it becomes energy" + ] }, "config": { "method": "harmonic_matched", @@ -825,160 +845,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/u_bits_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, - "w_bits": 4, - "u_bits": 0, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "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": true, + "fusion_prior_weight": 1.0, + "conf_threshold": 0.9, + "conf_temp": 2.0, + "conf_sweep": "0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.95,0.99,0.999", + "hub_dir": "/kaggle/working/hub/opt02_seenn_bayes/conf_sweep_fine", + "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": "u_bits_0.zip", + "name": "conf_sweep_fine.zip", "files": 81, - "bytes": 12238321, - "MB": 12.2, - "sha256": "de8d0ec3134b59a7b9e26917542d60cf181033520d851a5638465f805487afa4" + "bytes": 12637373, + "MB": 12.6, + "sha256": "e33a7b3b8947f0b0a5fd13a441d22f8068a82f8246738956132681351836f98c" } }, { - "key": "opt08_mint_quant/u_bits_3", - "tag": "u_bits_3", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 5, + "key": "opt02_seenn_bayes/conf_temp_16", + "tag": "conf_temp_16", + "script": "opt02_seenn_bayes.py", + "hf_folder": "applied/opt02_seenn_bayes", + "phase": 7, "status": "ok", - "duration_s": 341.6, + "duration_s": 613.7, "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.9578571428571429, - "test_target_acc": 0.9578571428571429, - "best_val_acc": 0.9628571428571429 + "test_acc": 0.9278571428571428, + "test_target_acc": 0.9278571428571428, + "best_val_acc": 0.9278571428571428 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 1648163.6732954546, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.013435182280489085, - "syn_ops_per_inference_dense_fanout": 64593181.90016234, - "weight_sparsity": 0.8624946199394825, - "effective_ticks": 11.785714285714286, + "syn_ops_per_inference": 3658814.530844156, + "dense_macs_per_inference": 123955200.0, + "event_fraction_of_dense": 0.02951723308779427, + "syn_ops_per_inference_dense_fanout": 65235432.31737013, + "weight_sparsity": 0.7324707846410685, + "effective_ticks": 4.197857142857143, "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": 98.38904980000507, - "infer_ms_per_sample": 0.6557833990625284, - "peak_vram_mb": 2840.912896 + "train_ms_per_step": 187.19353675842285, + "infer_ms_per_sample": 0.6553214698580642, + "peak_vram_mb": 10914.399232, + "syn_ops_per_inference_early_exit": 1722971.6599025973 }, "optimization_specific": { - "w_bits": 4, - "u_bits": 3, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": true, - "batchnorm": true, - "membrane_memory_reduction_x": 10.666666666666666, - "weight_memory_reduction_x": 8.0, - "membrane_bytes_per_inference": 42300.0, - "working_set_bytes": 613799.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": true, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": 0.14972666638962767, - "acc_vs_ubits": { - "2": 0.5942857142857143, - "4": 0.9564285714285714, - "8": 0.955, - "0": 0.9528571428571428 + "seenn_enabled": true, + "bayes_fusion_enabled": true, + "conf_threshold": 0.9, + "conf_temp": 16.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.197857142857143, + "mean_exit_ms": 209.89285714285717, + "ticks_saved_frac": 0.9580214285714286, + "exit_tick_histogram": { + "counts": [ + 1368, + 26, + 3, + 2, + 1, + 0, + 0, + 0, + 0, + 0 + ], + "edges": [ + 0.0, + 10.0, + 20.0, + 30.0, + 40.0, + 50.0, + 60.0, + 70.0, + 80.0, + 90.0, + 100.0 + ] }, - "bits_sweep_rows": [ - { - "u_bits": 2, - "acc": 0.5942857142857143, - "target_acc": 0.5942857142857143, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.019098722850177306, - "acc_drop_vs_fp32": 0.35857142857142854 - }, + "acc_fc_only": 0.9278571428571428, + "acc_ic_only": 0.935, + "acc_fused": 0.94, + "acc_early_exit": 0.2257142857142857, + "syn_ops_saved_frac": 0.5290901888090305, + "syn_per_inference_early_exit": 1722971.6599025973, + "anytime_acc": { + "0.25": 0.6042857142857143, + "0.5": 0.8057142857142857, + "0.75": 0.8885714285714286, + "1.0": 0.9278571428571428 + }, + "pareto": [ { - "u_bits": 4, - "acc": 0.9564285714285714, - "target_acc": 0.9564285714285714, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.20831449468085106, - "acc_drop_vs_fp32": -0.0035714285714285587 + "conf": 0.5, + "mean_ticks": 2.979285714285714, + "acc": 0.18857142857142858, + "syn_ops": 1660596.797077922 }, { - "u_bits": 8, - "acc": 0.955, - "target_acc": 0.955, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.2674735427748227, - "acc_drop_vs_fp32": -0.002142857142857113 + "conf": 0.7, + "mean_ticks": 4.196428571428571, + "acc": 0.2257142857142857, + "syn_ops": 1722894.4212662338 }, { - "u_bits": 0, - "acc": 0.9528571428571428, - "target_acc": 0.9528571428571428, - "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.9528571428571428, - "per_layer_scales": [ - { - "layer": 0, - "weight_scale": 0.03138868297849383, - "membrane_scale": 0.3333333333333333, - "shared_scale_gauge_factor": 10.619538690480226 + "conf": 0.8, + "mean_ticks": 4.196428571428571, + "acc": 0.2257142857142857, + "syn_ops": 1722894.1939935065 }, { - "layer": 1, - "weight_scale": 0.019679610218320574, - "membrane_scale": 0.3333333333333333, - "shared_scale_gauge_factor": 16.93800485047307 + "conf": 0.9, + "mean_ticks": 4.197857142857143, + "acc": 0.2257142857142857, + "syn_ops": 1722971.7207792208 }, { - "layer": 2, - "weight_scale": 0.009625924485070365, - "membrane_scale": 0.3333333333333333, - "shared_scale_gauge_factor": 34.62870853083538 + "conf": 0.95, + "mean_ticks": 4.199285714285714, + "acc": 0.2257142857142857, + "syn_ops": 1723035.8133116884 }, { - "layer": 3, - "weight_scale": 0.015539673822266715, - "membrane_scale": 0.3333333333333333, - "shared_scale_gauge_factor": 21.45047168594374 + "conf": 0.99, + "mean_ticks": 4.243571428571428, + "acc": 0.22642857142857142, + "syn_ops": 1724673.6931818181 } - ], - "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", @@ -1018,160 +1041,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/u_bits_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, - "w_bits": 4, - "u_bits": 3, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "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": true, + "fusion_prior_weight": 1.0, + "conf_threshold": 0.9, + "conf_temp": 16.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_16", + "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": "u_bits_3.zip", + "name": "conf_temp_16.zip", "files": 81, - "bytes": 12230314, - "MB": 12.2, - "sha256": "59408685a190f6abc9f857e49ce34938251b9d14b3cc1bd8192fc8a52b9a9882" + "bytes": 12637814, + "MB": 12.6, + "sha256": "d302c2ff3a0a7090de4ff36762170bca52ef860f9f4f098a3fde82a954059161" } }, { - "key": "opt08_mint_quant/u_bits_4", - "tag": "u_bits_4", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 5, + "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": 344.8, + "duration_s": 616.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": "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.965, - "test_target_acc": 0.965, - "best_val_acc": 0.9628571428571429 + "test_acc": 0.9278571428571428, + "test_target_acc": 0.9278571428571428, + "best_val_acc": 0.9264285714285714 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 1883576.624797078, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.015354176107290455, - "syn_ops_per_inference_dense_fanout": 64875275.42613637, - "weight_sparsity": 0.854853303683222, - "effective_ticks": 12.19, + "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": 0, - "weight_bytes": 613376, + "membrane_bytes_per_inference": 451200, + "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 99.37113355001657, - "infer_ms_per_sample": 0.6619073024999977, - "peak_vram_mb": 2841.84576 + "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": { - "w_bits": 4, - "u_bits": 4, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": true, - "batchnorm": true, - "membrane_memory_reduction_x": 8.0, - "weight_memory_reduction_x": 8.0, - "membrane_bytes_per_inference": 56400.0, - "working_set_bytes": 613940.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": true, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": 0.2496060505319149, - "acc_vs_ubits": { - "2": 0.7471428571428571, - "4": 0.965, - "8": 0.9657142857142857, - "0": 0.9592857142857143 + "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 + ] }, - "bits_sweep_rows": [ - { - "u_bits": 2, - "acc": 0.7471428571428571, - "target_acc": 0.7471428571428571, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.032914381094858156, - "acc_drop_vs_fp32": 0.2121428571428572 - }, + "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 + }, + "pareto": [ { - "u_bits": 4, - "acc": 0.965, - "target_acc": 0.965, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.2418986868351064, - "acc_drop_vs_fp32": -0.005714285714285672 + "conf": 0.5, + "mean_ticks": 3.902142857142857, + "acc": 0.22357142857142856, + "syn_ops": 1613080.9172077922 }, { - "u_bits": 8, - "acc": 0.9657142857142857, - "target_acc": 0.9657142857142857, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.296513671875, - "acc_drop_vs_fp32": -0.00642857142857145 + "conf": 0.7, + "mean_ticks": 4.2371428571428575, + "acc": 0.23857142857142857, + "syn_ops": 1626802.577922078 }, { - "u_bits": 0, - "acc": 0.9592857142857143, - "target_acc": 0.9592857142857143, - "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.9592857142857143, - "per_layer_scales": [ - { - "layer": 0, - "weight_scale": 0.03545519496713366, - "membrane_scale": 0.14285714285714285, - "shared_scale_gauge_factor": 4.0292302154753035 + "conf": 0.8, + "mean_ticks": 4.365, + "acc": 0.245, + "syn_ops": 1632438.9545454546 }, { - "layer": 1, - "weight_scale": 0.020786042724336897, - "membrane_scale": 0.14285714285714285, - "shared_scale_gauge_factor": 6.872743636280589 + "conf": 0.9, + "mean_ticks": 4.575714285714286, + "acc": 0.25214285714285717, + "syn_ops": 1640777.924512987 }, { - "layer": 2, - "weight_scale": 0.010473860161645072, - "membrane_scale": 0.14285714285714285, - "shared_scale_gauge_factor": 13.639397571898177 + "conf": 0.95, + "mean_ticks": 4.854285714285714, + "acc": 0.26071428571428573, + "syn_ops": 1651982.8961038962 }, { - "layer": 3, - "weight_scale": 0.017392768391541073, - "membrane_scale": 0.14285714285714285, - "shared_scale_gauge_factor": 8.213594273274003 + "conf": 0.99, + "mean_ticks": 6.857857142857143, + "acc": 0.3357142857142857, + "syn_ops": 1728711.8571428573 } - ], - "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", @@ -1211,160 +1237,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/u_bits_4", - "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": 4, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "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": 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": "u_bits_4.zip", + "name": "conf_temp_4.zip", "files": 81, - "bytes": 12211406, - "MB": 12.2, - "sha256": "fa14fb4378b6e3737d3d49ed8bf58b569e33a530256e925d6c0ec6d07495a44d" + "bytes": 12640717, + "MB": 12.6, + "sha256": "a9f16ef1db8ee6c4c51113bece56694dc7dd17feb4b73d57c99a3dad1b66ca71" } }, { - "key": "opt08_mint_quant/u_bits_8", - "tag": "u_bits_8", - "script": "opt08_mint_quant.py", - "hf_folder": "applied/opt08_mint_quant", - "phase": 5, + "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": 346.7, + "duration_s": 609.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.9664285714285714, - "test_target_acc": 0.9664285714285714, - "best_val_acc": 0.9628571428571429 + "test_acc": 0.9271428571428572, + "test_target_acc": 0.9271428571428572, + "best_val_acc": 0.9307142857142857 }, "efficiency": { "spikes_per_inference": null, - "syn_ops_per_inference": 2087678.7174310065, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.017017936122631194, - "syn_ops_per_inference_dense_fanout": 65242462.345779225, - "weight_sparsity": 0.8476187526085142, - "effective_ticks": 12.227857142857143, + "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": 112800, - "weight_bytes": 613376, + "membrane_bytes_per_inference": 451200, + "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 100.49617395000041, - "infer_ms_per_sample": 0.6706169215624413, - "peak_vram_mb": 2844.865024 + "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": { - "w_bits": 4, - "u_bits": 8, - "leak_shift": 0, - "beta_eff": 1.0, - "qat": true, - "batchnorm": true, - "membrane_memory_reduction_x": 4.0, - "weight_memory_reduction_x": 8.0, - "membrane_bytes_per_inference": 112800.0, - "working_set_bytes": 614504.0, - "baseline_working_set_bytes": 4911520.0, - "l2_cache_fits": true, - "baseline_l2_cache_fits": false, - "l2_budget_bytes": 2097152, - "membrane_saturation_frac": 0.32682918467420213, - "acc_vs_ubits": { - "2": 0.8592857142857143, - "4": 0.965, - "8": 0.9664285714285714, - "0": 0.9521428571428572 + "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 + ] }, - "bits_sweep_rows": [ - { - "u_bits": 2, - "acc": 0.8592857142857143, - "target_acc": 0.8592857142857143, - "membrane_bytes_per_neuron_per_tick": 0.25, - "membrane_memory_reduction_x": 16.0, - "membrane_saturation_frac": 0.050917691710992904, - "acc_drop_vs_fp32": 0.09285714285714286 - }, + "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 + }, + "pareto": [ { - "u_bits": 4, - "acc": 0.965, - "target_acc": 0.965, - "membrane_bytes_per_neuron_per_tick": 0.5, - "membrane_memory_reduction_x": 8.0, - "membrane_saturation_frac": 0.26607622728280145, - "acc_drop_vs_fp32": -0.01285714285714279 + "conf": 0.5, + "mean_ticks": 4.289285714285715, + "acc": 0.24571428571428572, + "syn_ops": 1647281.4212662338 }, { - "u_bits": 8, - "acc": 0.9664285714285714, - "target_acc": 0.9664285714285714, - "membrane_bytes_per_neuron_per_tick": 1.0, - "membrane_memory_reduction_x": 4.0, - "membrane_saturation_frac": 0.3181812389184397, - "acc_drop_vs_fp32": -0.014285714285714235 + "conf": 0.7, + "mean_ticks": 4.978571428571429, + "acc": 0.275, + "syn_ops": 1678001.2727272727 }, { - "u_bits": 0, - "acc": 0.9521428571428572, - "target_acc": 0.9521428571428572, - "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.9521428571428572, - "per_layer_scales": [ - { - "layer": 0, - "weight_scale": 0.04109285133225577, - "membrane_scale": 0.007874015748031496, - "shared_scale_gauge_factor": 0.19161521998963355 + "conf": 0.8, + "mean_ticks": 5.852857142857143, + "acc": 0.3028571428571429, + "syn_ops": 1714795.320616883 }, { - "layer": 1, - "weight_scale": 0.020464909928185598, - "membrane_scale": 0.007874015748031496, - "shared_scale_gauge_factor": 0.38475692175839443 + "conf": 0.9, + "mean_ticks": 7.785, + "acc": 0.37714285714285717, + "syn_ops": 1785960.5300324673 }, { - "layer": 2, - "weight_scale": 0.01011819179568972, - "membrane_scale": 0.007874015748031496, - "shared_scale_gauge_factor": 0.7782038438316392 + "conf": 0.95, + "mean_ticks": 10.002142857142857, + "acc": 0.45071428571428573, + "syn_ops": 1850843.49512987 }, { - "layer": 3, - "weight_scale": 0.01918845304421016, - "membrane_scale": 0.007874015748031496, - "shared_scale_gauge_factor": 0.41035177405337353 + "conf": 0.99, + "mean_ticks": 14.499285714285714, + "acc": 0.5742857142857143, + "syn_ops": 1959679.1558441557 } - ], - "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", @@ -1404,898 +1433,163 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt08_mint_quant/u_bits_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, - "w_bits": 4, - "u_bits": 8, - "leak_shift": 0, - "qat": true, - "bits_sweep": "2,4,8,0", - "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": 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": "u_bits_8.zip", + "name": "fusion_prior_2x.zip", "files": 81, - "bytes": 12213011, - "MB": 12.2, - "sha256": "63dd1fe2bcaf39fb5ab00bb833afca7ab94b1ab1e3556da5782d622e248c8bd7" + "bytes": 12637636, + "MB": 12.6, + "sha256": "fc6050fb762f5c1e2b45dd261c259362087f7598c1df1884b7b7b97c019e13f4" } }, { - "key": "opt09_srif_softreset/lam_init_0.1", - "tag": "lam_init_0.1", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 5, + "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": 363.2, + "duration_s": 609.7, "optimization_summary": { - "optimization": "srif_softreset", - "research_section": "4. Membrane-Potential Memory Wall -- Soft Reset Integrate-and-Fire (SRIF), dynamic reset potential", - "reference": "Guo et al., 'Reducing Information Loss for Spiking Neural Networks' (SRIF), ECCV 2022; research.md S4 (stacks with MINT / SpQuant-SNN membrane quantization)", - "script": "opt09_srif_softreset.py", - "baseline_mode": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.8864285714285715, - "test_target_acc": 0.8864285714285715, - "best_val_acc": 0.8864285714285715 - }, - "efficiency": { - "spikes_per_inference": 14075.5703125, - "syn_ops_per_inference": 5061701.517045454, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.04126100073238482, - "syn_ops_per_inference_dense_fanout": 66638319.30357143, - "weight_sparsity": 0.7324707846410685, - "effective_ticks": 21.771428571428572, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 104.55192480001188, - "infer_ms_per_sample": 0.7019145781249847, - "peak_vram_mb": 2834.965504, - "discarded_charge_per_reset": -0.5145500630598341 - }, - "optimization_specific": { - "reset_mode": "srif", - "learn_reset": true, - "lam_init": 0.1, - "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.34666571021080017, - 0.329329252243042, - 0.33023813366889954, - 0.4990707039833069 - ], - "learned_v_reset_per_layer": [ - 0.5600309371948242, - 0.6936066150665283, - 0.6635518074035645, - 1.1929576396942139 - ] - }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": true, - "discarded_charge_per_reset": -0.5145500630598341, - "spikes_per_inference": 14075.5703125, - "syn_per_inference": 5154236.75, - "lam_per_site": [ - 0.34666571021080017, - 0.329329252243042, - 0.33023813366889954, - 0.4990707039833069 - ], - "v_reset_per_site": [ - 0.5600309371948242, - 0.6936066150665283, - 0.6635518074035645, - 1.1929576396942139 - ], - "u_bits": 0, - "membrane_saturation_frac": null, - "batches": 4, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null - }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.6842857142857143, - "target_acc": 0.6842857142857143, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.15835896317720594, - "spikes_per_inference": 6790.640625, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.6864285714285714, - "target_acc": 0.6864285714285714, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.059665275456522254, - "spikes_per_inference": 7909.4375, - "membrane_saturation_frac": 0.22161569148936172, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.002142857142857113 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.16214285714285714, - "target_acc": 0.16214285714285714, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 2683.109375, - "membrane_saturation_frac": 0.19872880651595745, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.5221428571428571 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.7814285714285715, - "target_acc": 0.7814285714285715, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 8097.6796875, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.7571428571428571, - "target_acc": 0.7571428571428571, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 8502.828125, - "membrane_saturation_frac": 0.2330075354609929, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": 0.024285714285714355 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.16214285714285714, - "target_acc": 0.16214285714285714, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 2683.109375, - "membrane_saturation_frac": 0.19872880651595745, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.6192857142857143 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.8864285714285715, - "target_acc": 0.8864285714285715, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": -0.51547552848815, - "spikes_per_inference": 13885.140625, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.9092857142857143, - "target_acc": 0.9092857142857143, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": -0.5824071496424404, - "spikes_per_inference": 17677.2734375, - "membrane_saturation_frac": 0.3281896193484043, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.022857142857142798 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.06642857142857143, - "target_acc": 0.06642857142857143, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": -0.6881111096608943, - "spikes_per_inference": 24211.9453125, - "membrane_saturation_frac": 0.4429418079565603, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.8200000000000001 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.6842857142857143, - "acc_by_bits": { - "0": 0.6842857142857143, - "4": 0.6864285714285714, - "2": 0.16214285714285714 - } - }, - "soft": { - "fp32_acc": 0.7814285714285715, - "acc_by_bits": { - "0": 0.7814285714285715, - "4": 0.7571428571428571, - "2": 0.16214285714285714 - } - }, - "trained": { - "fp32_acc": 0.8864285714285715, - "acc_by_bits": { - "0": 0.8864285714285715, - "4": 0.9092857142857143, - "2": 0.06642857142857143 - } - } - } - }, - "mechanism": "V = u - s*((1-lam)*u + lam*thresh) + s*v_r; lam=0,v_r=0 is the baseline hard reset exactly, lam=1,v_r=0 discards zero charge", - "cost": "2 scalars per spiking layer; identical FMA count per tick, so the reset change is free at inference time", - "caveat": "the sweep swaps the reset on ALREADY-TRAINED weights, which under-states what training with each reset would give; and a charge-conserving reset can raise the spike count, so read spikes_per_inference next to the accuracy" - }, - "config": { - "method": "harmonic_matched", - "data_root": "/kaggle/working/data", - "subjects": "", - "blocks": "", - "limit": 0, - "drop_rest": true, - "resplit": "block", - "test_blocks": "6", - "class_weight": false, - "epochs": 60, - "batch_size": 64, - "lr": 0.002, - "weight_decay": 0.0005, - "grad_clip": 5.0, - "num_bins": 100, - "window_sec": 5.0, - "hidden": "512,256", - "freq_groups": 8, - "dropout": 0.3, - "spike_drop": 0.1, - "time_jitter": 2, - "label_smoothing": 0.05, - "no_batchnorm": false, - "binary_input": false, - "beta": 1.0, - "thresh": 1.0, - "window": 0.5, - "gain": 1.0, - "alpha": 0.9, - "readout": "spikecount", - "fake_quant": 0, - "amp": false, - "spike_reg": 0.0, - "event_eval": true, - "decision_margin": 2.0, - "export": false, - "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/lam_init_0.1", - "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.1, - "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, - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "lam_init_0.1.zip", - "files": 81, - "bytes": 12307403, - "MB": 12.3, - "sha256": "f0bde8116a705a1c90f84adf38d925dec0ca1bf7025cb8bb4df284bd28d75a88" - } - }, - { - "key": "opt09_srif_softreset/lam_init_0.5", - "tag": "lam_init_0.5", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 5, - "status": "ok", - "duration_s": 362.7, - "optimization_summary": { - "optimization": "srif_softreset", - "research_section": "4. Membrane-Potential Memory Wall -- Soft Reset Integrate-and-Fire (SRIF), dynamic reset potential", - "reference": "Guo et al., 'Reducing Information Loss for Spiking Neural Networks' (SRIF), ECCV 2022; research.md S4 (stacks with MINT / SpQuant-SNN membrane quantization)", - "script": "opt09_srif_softreset.py", - "baseline_mode": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.8707142857142857, - "test_target_acc": 0.8707142857142857, - "best_val_acc": 0.8821428571428571 - }, - "efficiency": { - "spikes_per_inference": 10510.55078125, - "syn_ops_per_inference": 4706841.721590909, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.038368323194834075, - "syn_ops_per_inference_dense_fanout": 66283459.508116886, - "weight_sparsity": 0.7324707846410685, - "effective_ticks": 16.917142857142856, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 104.18545079999149, - "infer_ms_per_sample": 0.688990259687472, - "peak_vram_mb": 2832.164352, - "discarded_charge_per_reset": -0.4861374069439148 - }, - "optimization_specific": { - "reset_mode": "srif", - "learn_reset": true, - "lam_init": 0.5, - "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.42542359232902527, - 0.46086835861206055, - 0.48474565148353577, - 0.740869402885437 - ], - "learned_v_reset_per_layer": [ - 0.588733434677124, - 0.6110309362411499, - 0.563993513584137, - 1.0104514360427856 - ] - }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": true, - "discarded_charge_per_reset": -0.4861374069439148, - "spikes_per_inference": 10510.55078125, - "syn_per_inference": 4809386.59375, - "lam_per_site": [ - 0.42542359232902527, - 0.46086835861206055, - 0.48474565148353577, - 0.740869402885437 - ], - "v_reset_per_site": [ - 0.588733434677124, - 0.6110309362411499, - 0.563993513584137, - 1.0104514360427856 - ], - "u_bits": 0, - "membrane_saturation_frac": null, - "batches": 4, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null - }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.5607142857142857, - "target_acc": 0.5607142857142857, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.14522441932037566, - "spikes_per_inference": 6385.7578125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.71, - "target_acc": 0.71, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.05066428686952293, - "spikes_per_inference": 7130.9140625, - "membrane_saturation_frac": 0.17117339871453902, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.14928571428571424 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.32357142857142857, - "target_acc": 0.32357142857142857, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 2256.09375, - "membrane_saturation_frac": 0.13216942320478722, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.23714285714285716 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.7485714285714286, - "target_acc": 0.7485714285714286, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7258.03125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.7742857142857142, - "target_acc": 0.7742857142857142, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7553.2734375, - "membrane_saturation_frac": 0.18284456726507092, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.02571428571428569 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.32357142857142857, - "target_acc": 0.32357142857142857, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 2256.1015625, - "membrane_saturation_frac": 0.13216949246453902, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.425 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.8707142857142857, - "target_acc": 0.8707142857142857, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": -0.4863823495393781, - "spikes_per_inference": 10391.765625, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.9028571428571428, - "target_acc": 0.9028571428571428, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": -0.548379950693327, - "spikes_per_inference": 12341.2890625, - "membrane_saturation_frac": 0.3302675504210993, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.03214285714285714 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.145, - "target_acc": 0.145, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": -0.606366216730921, - "spikes_per_inference": 18285.546875, - "membrane_saturation_frac": 0.337806405141844, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.7257142857142856 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.5607142857142857, - "acc_by_bits": { - "0": 0.5607142857142857, - "4": 0.71, - "2": 0.32357142857142857 - } - }, - "soft": { - "fp32_acc": 0.7485714285714286, - "acc_by_bits": { - "0": 0.7485714285714286, - "4": 0.7742857142857142, - "2": 0.32357142857142857 - } - }, - "trained": { - "fp32_acc": 0.8707142857142857, - "acc_by_bits": { - "0": 0.8707142857142857, - "4": 0.9028571428571428, - "2": 0.145 - } - } - } - }, - "mechanism": "V = u - s*((1-lam)*u + lam*thresh) + s*v_r; lam=0,v_r=0 is the baseline hard reset exactly, lam=1,v_r=0 discards zero charge", - "cost": "2 scalars per spiking layer; identical FMA count per tick, so the reset change is free at inference time", - "caveat": "the sweep swaps the reset on ALREADY-TRAINED weights, which under-states what training with each reset would give; and a charge-conserving reset can raise the spike count, so read spikes_per_inference next to the accuracy" - }, - "config": { - "method": "harmonic_matched", - "data_root": "/kaggle/working/data", - "subjects": "", - "blocks": "", - "limit": 0, - "drop_rest": true, - "resplit": "block", - "test_blocks": "6", - "class_weight": false, - "epochs": 60, - "batch_size": 64, - "lr": 0.002, - "weight_decay": 0.0005, - "grad_clip": 5.0, - "num_bins": 100, - "window_sec": 5.0, - "hidden": "512,256", - "freq_groups": 8, - "dropout": 0.3, - "spike_drop": 0.1, - "time_jitter": 2, - "label_smoothing": 0.05, - "no_batchnorm": false, - "binary_input": false, - "beta": 1.0, - "thresh": 1.0, - "window": 0.5, - "gain": 1.0, - "alpha": 0.9, - "readout": "spikecount", - "fake_quant": 0, - "amp": false, - "spike_reg": 0.0, - "event_eval": true, - "decision_margin": 2.0, - "export": false, - "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/lam_init_0.5", - "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.5, - "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, - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "lam_init_0.5.zip", - "files": 81, - "bytes": 12268812, - "MB": 12.3, - "sha256": "b35cda80713daa0bc18b2908550166cba40b17bbfa0eeffefce594f89c5a011f" - } - }, - { - "key": "opt09_srif_softreset/lam_init_0.99", - "tag": "lam_init_0.99", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 5, - "status": "ok", - "duration_s": 360.8, - "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": "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.8371428571428572, - "test_target_acc": 0.8371428571428572, - "best_val_acc": 0.8692857142857143 + "test_acc": 0.9278571428571428, + "test_target_acc": 0.9278571428571428, + "best_val_acc": 0.9321428571428572 }, "efficiency": { - "spikes_per_inference": 9121.7265625, - "syn_ops_per_inference": 4526709.357954546, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.03689995498645648, - "syn_ops_per_inference_dense_fanout": 66103327.14448052, + "spikes_per_inference": null, + "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": 14.662857142857144, + "effective_ticks": 8.52, "num_ticks": 100, "membrane_bytes_per_inference": 451200, "weight_bytes": 4907008, "input_raster_bytes": null, - "train_ms_per_step": 104.05160694999722, - "infer_ms_per_sample": 0.6848713053125266, - "peak_vram_mb": 2829.587456, - "discarded_charge_per_reset": -0.3675518972181794 + "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": { - "reset_mode": "srif", - "learn_reset": true, - "lam_init": 0.99, - "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.8137291669845581, - 0.8217479586601257, - 0.803193211555481, - 0.890302300453186 + "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 ], - "learned_v_reset_per_layer": [ - 0.3964306116104126, - 0.4692990481853485, - 0.36490488052368164, - 0.8738293647766113 + "edges": [ + 0.0, + 10.0, + 20.0, + 30.0, + 40.0, + 50.0, + 60.0, + 70.0, + 80.0, + 90.0, + 100.0 ] }, - "reset_stats": { - "reset_mode": "srif", - "learn_reset": true, - "discarded_charge_per_reset": -0.3675518972181794, - "spikes_per_inference": 9121.7265625, - "syn_per_inference": 4624103.46875, - "lam_per_site": [ - 0.8137291669845581, - 0.8217479586601257, - 0.803193211555481, - 0.890302300453186 - ], - "v_reset_per_site": [ - 0.3964306116104126, - 0.4692990481853485, - 0.36490488052368164, - 0.8738293647766113 - ], - "u_bits": 0, - "membrane_saturation_frac": null, - "batches": 4, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null + "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 }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.79, - "target_acc": 0.79, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.16616223328734864, - "spikes_per_inference": 6908.4453125, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.8585714285714285, - "target_acc": 0.8585714285714285, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.06637943740236554, - "spikes_per_inference": 7634.6875, - "membrane_saturation_frac": 0.16316371620124115, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.0685714285714285 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.7228571428571429, - "target_acc": 0.7228571428571429, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 6319.0546875, - "membrane_saturation_frac": 0.1936854499113475, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.06714285714285717 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.8414285714285714, - "target_acc": 0.8414285714285714, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 7679.484375, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.8692857142857143, - "target_acc": 0.8692857142857143, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 8084.046875, - "membrane_saturation_frac": 0.18212551252216314, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.027857142857142914 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.7228571428571429, - "target_acc": 0.7228571428571429, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 6319.0546875, - "membrane_saturation_frac": 0.1936854499113475, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.11857142857142855 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.8371428571428572, - "target_acc": 0.8371428571428572, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": -0.3687197298662461, - "spikes_per_inference": 9087.9609375, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.9014285714285715, - "target_acc": 0.9014285714285715, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": -0.4008518399443033, - "spikes_per_inference": 9850.1484375, - "membrane_saturation_frac": 0.32428080673758863, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.06428571428571428 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.6264285714285714, - "target_acc": 0.6264285714285714, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": -0.4210314479921704, - "spikes_per_inference": 12215.1015625, - "membrane_saturation_frac": 0.3508273077349291, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.21071428571428574 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.79, - "acc_by_bits": { - "0": 0.79, - "4": 0.8585714285714285, - "2": 0.7228571428571429 - } - }, - "soft": { - "fp32_acc": 0.8414285714285714, - "acc_by_bits": { - "0": 0.8414285714285714, - "4": 0.8692857142857143, - "2": 0.7228571428571429 - } - }, - "trained": { - "fp32_acc": 0.8371428571428572, - "acc_by_bits": { - "0": 0.8371428571428572, - "4": 0.9014285714285715, - "2": 0.6264285714285714 - } - } + "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 } - }, - "mechanism": "V = u - s*((1-lam)*u + lam*thresh) + s*v_r; lam=0,v_r=0 is the baseline hard reset exactly, lam=1,v_r=0 discards zero charge", - "cost": "2 scalars per spiking layer; identical FMA count per tick, so the reset change is free at inference time", - "caveat": "the sweep swaps the reset on ALREADY-TRAINED weights, which under-states what training with each reset would give; and a charge-conserving reset can raise the spike count, so read spikes_per_inference next to the accuracy" + ] }, "config": { "method": "harmonic_matched", @@ -2335,345 +1629,35 @@ "decision_margin": 2.0, "export": false, "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/lam_init_0.99", - "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.99, - "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, - "sampling_rate": 250.0 - } - }, - "zip": { - "name": "lam_init_0.99.zip", - "files": 81, - "bytes": 12263834, - "MB": 12.3, - "sha256": "f20a40634372d3bda7cef0078c215a40efee8ac042ebc720492deb9c4543d6cc" - } - }, - { - "key": "opt09_srif_softreset/reset_hard", - "tag": "reset_hard", - "script": "opt09_srif_softreset.py", - "hf_folder": "applied/opt09_srif_softreset", - "phase": 5, - "status": "ok", - "duration_s": 349.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", - "baseline_mode": false, - "method": "harmonic_matched", - "accuracy": { - "test_acc": 0.9407142857142857, - "test_target_acc": 0.9407142857142857, - "best_val_acc": 0.9471428571428572 - }, - "efficiency": { - "spikes_per_inference": 7627.40234375, - "syn_ops_per_inference": 3272123.518668831, - "dense_macs_per_inference": 122675200.0, - "event_fraction_of_dense": 0.026673064471619618, - "syn_ops_per_inference_dense_fanout": 64848741.3051948, - "weight_sparsity": 0.7324707846410685, - "effective_ticks": 12.062857142857142, - "num_ticks": 100, - "membrane_bytes_per_inference": 451200, - "weight_bytes": 4907008, - "input_raster_bytes": null, - "train_ms_per_step": 100.3461672999947, - "infer_ms_per_sample": 0.6541350159373849, - "peak_vram_mb": 2828.251648, - "discarded_charge_per_reset": 0.2713630626355262 - }, - "optimization_specific": { - "reset_mode": "hard", - "learn_reset": false, - "lam_init": 0.9, - "v_reset_init": 0.0, - "u_bits": 0, - "u_scale": 1.0, - "u_headroom_requested": 2.0, - "u_headroom_actual": 0.0, - "u_threshold_level": 0, - "u_levels_above_threshold": null, - "reset_family": { - "reset_mode": "hard", - "learn_reset": false, - "num_spiking_sites": 4, - "extra_params": 0, - "extra_params_frac_of_weights": 0.0, - "extra_flops_per_tick_per_neuron": 0, - "learned_lam_per_layer": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "learned_v_reset_per_layer": [ - 0.0, - 0.0, - 0.0, - 0.0 - ] - }, - "reset_stats": { - "reset_mode": "hard", - "learn_reset": false, - "discarded_charge_per_reset": 0.2713630626355262, - "spikes_per_inference": 7627.40234375, - "syn_per_inference": 3337387.15625, - "lam_per_site": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "v_reset_per_site": [ - 0.0, - 0.0, - 0.0, - 0.0 - ], - "u_bits": 0, - "membrane_saturation_frac": null, - "batches": 4, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null - }, - "reset_x_bits_sweep": { - "rows": [ - { - "reset_mode": "hard", - "u_bits": 0, - "acc": 0.9407142857142857, - "target_acc": 0.9407142857142857, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.2736259544984989, - "spikes_per_inference": 7585.875, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "hard", - "u_bits": 4, - "acc": 0.9585714285714285, - "target_acc": 0.9585714285714285, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.16008536543109247, - "spikes_per_inference": 9070.0546875, - "membrane_saturation_frac": 0.29968112810283687, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.017857142857142794 - }, - { - "reset_mode": "hard", - "u_bits": 2, - "acc": 0.895, - "target_acc": 0.895, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9282.828125, - "membrane_saturation_frac": 0.524759530141844, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.04571428571428571 - }, - { - "reset_mode": "soft", - "u_bits": 0, - "acc": 0.8385714285714285, - "target_acc": 0.8385714285714285, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 10120.0625, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "soft", - "u_bits": 4, - "acc": 0.9571428571428572, - "target_acc": 0.9571428571428572, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 10759.703125, - "membrane_saturation_frac": 0.33632909463652483, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.11857142857142866 - }, - { - "reset_mode": "soft", - "u_bits": 2, - "acc": 0.895, - "target_acc": 0.895, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9282.828125, - "membrane_saturation_frac": 0.524759530141844, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": -0.056428571428571495 - }, - { - "reset_mode": "trained", - "u_bits": 0, - "acc": 0.9407142857142857, - "target_acc": 0.9407142857142857, - "grid_headroom": 0.0, - "grid_levels_above_thresh": null, - "discarded_charge_per_reset": 0.2736259550797889, - "spikes_per_inference": 7585.875, - "membrane_saturation_frac": null, - "membrane_memory_reduction_x": 1.0, - "acc_drop_vs_fp32": 0.0 - }, - { - "reset_mode": "trained", - "u_bits": 4, - "acc": 0.9585714285714285, - "target_acc": 0.9585714285714285, - "grid_headroom": 1.75, - "grid_levels_above_thresh": 3, - "discarded_charge_per_reset": 0.16008443018764404, - "spikes_per_inference": 9070.0703125, - "membrane_saturation_frac": 0.29968078180407803, - "membrane_memory_reduction_x": 8.0, - "acc_drop_vs_fp32": -0.017857142857142794 - }, - { - "reset_mode": "trained", - "u_bits": 2, - "acc": 0.895, - "target_acc": 0.895, - "grid_headroom": 1.0, - "grid_levels_above_thresh": 0, - "discarded_charge_per_reset": 0.0, - "spikes_per_inference": 9282.828125, - "membrane_saturation_frac": 0.524759530141844, - "membrane_memory_reduction_x": 16.0, - "acc_drop_vs_fp32": 0.04571428571428571 - } - ], - "by_mode": { - "hard": { - "fp32_acc": 0.9407142857142857, - "acc_by_bits": { - "0": 0.9407142857142857, - "4": 0.9585714285714285, - "2": 0.895 - } - }, - "soft": { - "fp32_acc": 0.8385714285714285, - "acc_by_bits": { - "0": 0.8385714285714285, - "4": 0.9571428571428572, - "2": 0.895 - } - }, - "trained": { - "fp32_acc": 0.9407142857142857, - "acc_by_bits": { - "0": 0.9407142857142857, - "4": 0.9585714285714285, - "2": 0.895 - } - } - } - }, - "mechanism": "V = u - s*((1-lam)*u + lam*thresh) + s*v_r; lam=0,v_r=0 is the baseline hard reset exactly, lam=1,v_r=0 discards zero charge", - "cost": "2 scalars per spiking layer; identical FMA count per tick, so the reset change is free at inference time", - "caveat": "the sweep swaps the reset on ALREADY-TRAINED weights, which under-states what training with each reset would give; and a charge-conserving reset can raise the spike count, so read spikes_per_inference next to the accuracy" - }, - "config": { - "method": "harmonic_matched", - "data_root": "/kaggle/working/data", - "subjects": "", - "blocks": "", - "limit": 0, - "drop_rest": true, - "resplit": "block", - "test_blocks": "6", - "class_weight": false, - "epochs": 60, - "batch_size": 64, - "lr": 0.002, - "weight_decay": 0.0005, - "grad_clip": 5.0, - "num_bins": 100, - "window_sec": 5.0, - "hidden": "512,256", - "freq_groups": 8, - "dropout": 0.3, - "spike_drop": 0.1, - "time_jitter": 2, - "label_smoothing": 0.05, - "no_batchnorm": false, - "binary_input": false, - "beta": 1.0, - "thresh": 1.0, - "window": 0.5, - "gain": 1.0, - "alpha": 0.9, - "readout": "spikecount", - "fake_quant": 0, - "amp": false, - "spike_reg": 0.0, - "event_eval": true, - "decision_margin": 2.0, - "export": false, - "seed": 1234, - "hub_dir": "/kaggle/working/hub/opt09_srif_softreset/reset_hard", + "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, - "reset_mode": "hard", - "learn_reset": true, - "lam_init": 0.9, - "v_reset_init": 0.0, - "u_bits": 0, - "u_headroom": 2.0, - "reset_sweep": "hard,soft,trained", - "bits_sweep": "0,4,2", - "baseline": false, - "bench": true, - "bench_warmup": 10, - "bench_iters": 50, - "bench_train_steps": 20, "sampling_rate": 250.0 } }, "zip": { - "name": "reset_hard.zip", + "name": "ic_layer_1.zip", "files": 81, - "bytes": 12252182, - "MB": 12.3, - "sha256": "a69135a81c5f43ecd4495a977c9705cda35004b34ed7b0310f97c97a13239a9c" + "bytes": 12859971, + "MB": 12.9, + "sha256": "98a8ce45dac9959cbbf7cd753b3711e1819bd3c4c7d767ae7eb71ba456bc39eb" } } ] \ No newline at end of file