Seal Phase 4AJ fixed APL timing hypothesis audit
This commit is contained in:
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 2,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 1.5e-323,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 406400,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 2.6e-322,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 4.69e-321,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/apl_only-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "15fe3726f298f2ebcf01f147d8dbd995d41c1e9413138d858f341b8aa0df48bd",
|
||||
"apl-inhibition.float32.npy": "429a69417d057704b5a9364e5dc9968d7a690c83f43b096c9284be47835d4c9f",
|
||||
"apl-state.float32.npy": "15fe3726f298f2ebcf01f147d8dbd995d41c1e9413138d858f341b8aa0df48bd",
|
||||
"state.npz": "0a2750ea21a095925edb6f6642777f204b176eaa717f3b0aa429f0568fb9e809",
|
||||
"summary.json": "e36b5ea75de8ad3a99a2ef8fce530df405850382e9d16df850e6b1e528e5680b"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 100,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 0,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 3,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 240,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 0.0169758646495657,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 487680,
|
||||
"max_abs_error": 4.8516818562660546e-08,
|
||||
"max_bound_utilization": 6.446459311349652e-05,
|
||||
"max_error_bound": 0.0014135775322797544,
|
||||
"max_relative_error_nonzero_reference": 6.477506295857017e-07,
|
||||
"mean_abs_error": 3.025335278028543e-09,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 240,
|
||||
"max_abs_error": 9.64070396403116e-07,
|
||||
"max_bound_utilization": 5.2935382778105945e-05,
|
||||
"max_error_bound": 0.029058704062549626,
|
||||
"max_relative_error_nonzero_reference": 5.319253846070637e-07,
|
||||
"mean_abs_error": 2.718757893987664e-07,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/arrival_collision-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "5c00bd6558f55c0ac7b2b7dd1a3de32c1b66357de1cec433dc7e6bfb8e6650ec",
|
||||
"apl-inhibition.float32.npy": "04a2f0809f96a13a8e07649f11f546c78e4173583f599f6c8a60109df8d8005a",
|
||||
"apl-state.float32.npy": "fd345540fb68691ab401b60b39daf097ed1e5667c39396575bcd8f33e23e4edf",
|
||||
"state.npz": "1b5d50cfd92a11ccc8217bae24b6899d59d0092a75ddf90e5b74bc21ec31bc98",
|
||||
"summary.json": "be6895a9482a60918a5d04016d26ca75f22fd2c4fcea21cd67cbf29a7e4bdf0a"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 120,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 2,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 29518,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 2000,
|
||||
"max_abs_error": 1.1883676052093506e-06,
|
||||
"max_bound_utilization": 1.3425302775238804e-05,
|
||||
"max_error_bound": 0.08851700591819335,
|
||||
"max_relative_error_nonzero_reference": 1.347329858244693e-07,
|
||||
"mean_abs_error": 1.6856938600540162e-08,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 4064000,
|
||||
"max_abs_error": 5.454211202682302e-06,
|
||||
"max_bound_utilization": 9.84223576203938e-05,
|
||||
"max_error_bound": 0.07556047939475269,
|
||||
"max_relative_error_nonzero_reference": 9.900927935120239e-07,
|
||||
"mean_abs_error": 4.106206890725126e-07,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 2000,
|
||||
"max_abs_error": 0.0001467736110498663,
|
||||
"max_bound_utilization": 9.011960851284882e-05,
|
||||
"max_error_bound": 1.7234670898130762,
|
||||
"max_relative_error_nonzero_reference": 9.065433270955913e-07,
|
||||
"mean_abs_error": 3.576079289893559e-05,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/cal-matched_energy-00-s51101-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "664e679a6ff1d0a98a8a9c833b1bc6e5a48556487e2a181dba6a2b7db3c22f47",
|
||||
"apl-inhibition.float32.npy": "5c61b09f281cb180e88f7753df1537790606b8a4d3bd38af6ce47ee73e6723d4",
|
||||
"apl-state.float32.npy": "1912491567db6f8c9ef5d574a80a3a79e9ae22e215d9f027bd22b3afa73be185",
|
||||
"state.npz": "3413e5df842dcae18784eac3fbc3ab2e5e01da74e8285e2fdee10a49f8b9eab9",
|
||||
"summary.json": "5f4d55060ff93570fd48eb996a14bdc177ec9a5101c70ff8deff3be001836194"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 1000,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 11,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 29938,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 2000,
|
||||
"max_abs_error": 5.327165126800537e-07,
|
||||
"max_bound_utilization": 1.3081829823259631e-05,
|
||||
"max_error_bound": 0.07437045311528964,
|
||||
"max_relative_error_nonzero_reference": 1.312859770571549e-07,
|
||||
"mean_abs_error": 1.6927719116210936e-08,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 4064000,
|
||||
"max_abs_error": 7.491359403921649e-06,
|
||||
"max_bound_utilization": 0.00011989178922831249,
|
||||
"max_error_bound": 0.07492270812507368,
|
||||
"max_relative_error_nonzero_reference": 1.205880367596719e-06,
|
||||
"mean_abs_error": 4.967732996601039e-07,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 2000,
|
||||
"max_abs_error": 0.0001710029721095907,
|
||||
"max_bound_utilization": 0.00010836545907437195,
|
||||
"max_error_bound": 1.7577510177979658,
|
||||
"max_relative_error_nonzero_reference": 1.089951834730382e-06,
|
||||
"mean_abs_error": 4.368356717728657e-05,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/cal-physiological-00-s51101-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "2a492856ea680dd6509ae2e5924228744beb6f37f34c0ac0ec1ef6bdbcb7ec2a",
|
||||
"apl-inhibition.float32.npy": "0227a22a7c8f54321e7f02ef320a3bc22142b7efd63d9fc4a475653c86d4f025",
|
||||
"apl-state.float32.npy": "fcf12e155c5922d0a93d3618205cc4828455e67f805271d8018743fe44c46721",
|
||||
"state.npz": "ea7080a05e476eb987f536ec7fb327dc78f6e2f18a7d6e4cd91601d8446ffeae",
|
||||
"summary.json": "8f3f8b7e7d583b70dc50cb80fa0fc3f469f11015e5f85354dc8f6199d0b08ca3"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 1000,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 10,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 157,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 800,
|
||||
"max_abs_error": 4.887580871582031e-06,
|
||||
"max_bound_utilization": 1.6511086743180562e-05,
|
||||
"max_error_bound": 0.3599287436704336,
|
||||
"max_relative_error_nonzero_reference": 1.6570114308471973e-07,
|
||||
"mean_abs_error": 3.116670995950699e-08,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 1625600,
|
||||
"max_abs_error": 1.2484126887812863e-06,
|
||||
"max_bound_utilization": 8.058559947951667e-05,
|
||||
"max_error_bound": 0.03670469855006011,
|
||||
"max_relative_error_nonzero_reference": 8.123768266382489e-07,
|
||||
"mean_abs_error": 1.3598974519396686e-07,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 800,
|
||||
"max_abs_error": 3.000281999732124e-05,
|
||||
"max_bound_utilization": 7.192595541700556e-05,
|
||||
"max_error_bound": 0.9714612652236844,
|
||||
"max_relative_error_nonzero_reference": 7.250582286303385e-07,
|
||||
"mean_abs_error": 1.1814070948781286e-05,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/high_fanin-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "a4b78272e91043441d6c17b2aa9844122546a0a20332cf37d08f28c324a545fb",
|
||||
"apl-inhibition.float32.npy": "c1950e4c348b57a70516a73fbd7b22cef62de32b2d39ee6bce72605d6768dd50",
|
||||
"apl-state.float32.npy": "951c2cc005cace059b0648d23809566f03a45d3c5e001de9c795fc84c42936b8",
|
||||
"state.npz": "d4408b09e7099f9293340ece2bfd381d5827829e7efb2e27f1ac8de59e70ac40",
|
||||
"summary.json": "2006f60cb8f9573eb679c8ae04e35fc8fcf427182421bc0b05f0c47c2a955114"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 400,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 25,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 4,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 0.0440564111223974,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 406400,
|
||||
"max_abs_error": 1.9029258452318842e-07,
|
||||
"max_bound_utilization": 4.4126254222663114e-05,
|
||||
"max_error_bound": 0.005784441916246177,
|
||||
"max_relative_error_nonzero_reference": 4.4317091098579625e-07,
|
||||
"mean_abs_error": 6.804216737954364e-09,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 3.576507783265015e-06,
|
||||
"max_bound_utilization": 3.6536565512615554e-05,
|
||||
"max_error_bound": 0.11890991658573181,
|
||||
"max_relative_error_nonzero_reference": 3.669348968748365e-07,
|
||||
"mean_abs_error": 5.966829373615923e-07,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/kc_ref_boundary-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "87b9b4d999a0ae584aafffbbce8603333b55467122495501a81fd3f396a0de15",
|
||||
"apl-inhibition.float32.npy": "f915b04b78d1660e20f0f97874564454c97dc306a84ae0383cdb09b0ae5bf67f",
|
||||
"apl-state.float32.npy": "db75fd304090f4d00ed3c7e5f80c14be74c0bfc99ac95984a710a3a143ef3625",
|
||||
"state.npz": "cfabddcd199a03da9acb981c3791031d8d5926f244e3d3b5d9556133e4b23868",
|
||||
"summary.json": "4ec5c3563dc0ce38b4bafaea26ef4110eee44146eab91a8f0b432702380a511c"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 100,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 1,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 2,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 0.0440564111223974,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 406400,
|
||||
"max_abs_error": 2.983958111157925e-08,
|
||||
"max_bound_utilization": 2.592836429347364e-05,
|
||||
"max_error_bound": 0.002143175293067466,
|
||||
"max_relative_error_nonzero_reference": 2.6046869456955393e-07,
|
||||
"mean_abs_error": 1.4655995503399407e-09,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 5.368426725382847e-07,
|
||||
"max_bound_utilization": 1.816095230598335e-05,
|
||||
"max_error_bound": 0.044056937070883116,
|
||||
"max_relative_error_nonzero_reference": 1.824341540183155e-07,
|
||||
"mean_abs_error": 1.2347406080026603e-07,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/natural_request-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "694944eb4e7ede2146035bd4a3725a7ca84b59a2eb499ebab036998fc05c88b4",
|
||||
"apl-inhibition.float32.npy": "6652e316e26fdb7a1089fd8d586eecbb53d9643fa02c2f79722956fb70ce28d2",
|
||||
"apl-state.float32.npy": "1b5d2c9959509781490fd5518682f448eaaafa0737d4de841ea0b816aeac0a11",
|
||||
"state.npz": "770b7e29adbab3d29de20a77c9e3977f0da7d9cf2aaf68f346e1953683fb632c",
|
||||
"summary.json": "e0b6ec4955c9fc2fd0677f460d9f98047163eeda0148a1c160acf399c0e96e5e"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 100,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 1,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 1,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 600,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 0.021624017139767585,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 1219200,
|
||||
"max_abs_error": 2.5551622206965163e-08,
|
||||
"max_bound_utilization": 8.782876291952778e-05,
|
||||
"max_error_bound": 0.0008170294997358125,
|
||||
"max_relative_error_nonzero_reference": 8.841340802705443e-07,
|
||||
"mean_abs_error": 1.8512844276510413e-09,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 600,
|
||||
"max_abs_error": 6.090067741215677e-07,
|
||||
"max_bound_utilization": 8.10124097075475e-05,
|
||||
"max_error_bound": 0.021624275288781088,
|
||||
"max_relative_error_nonzero_reference": 8.154926639445106e-07,
|
||||
"mean_abs_error": 1.5725084035383974e-07,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/pn_pulse-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "d36ee1bc57cdb36c38fefe93da0493e17dabf899b02b2222468bd67bcad5edf5",
|
||||
"apl-inhibition.float32.npy": "5d3c55e13884d2a86296e3826d4ebab1ca491458fee90cbb11972b0d895c76aa",
|
||||
"apl-state.float32.npy": "b680c32977a56e9551cbebef9c2d14acca31e32f44c6109a7f0b2fa90a9bb63a",
|
||||
"state.npz": "cd3596d06b03fc4702dea4b528c7c704659ff9316e46bdf0b804b6a3ec3b9804",
|
||||
"summary.json": "d38b8ec6ce2630d29016d744b80150c36ff4ee806709c0d222c1109bcc2f0372"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 300,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 1,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 13,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 600,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 0.0440564111223974,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 1219200,
|
||||
"max_abs_error": 2.626378379222416e-07,
|
||||
"max_bound_utilization": 5.477468793595109e-05,
|
||||
"max_error_bound": 0.008708151261175854,
|
||||
"max_relative_error_nonzero_reference": 5.510089963658295e-07,
|
||||
"mean_abs_error": 1.4450305411278388e-08,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 600,
|
||||
"max_abs_error": 4.6134957809584876e-06,
|
||||
"max_bound_utilization": 4.419862852467115e-05,
|
||||
"max_error_bound": 0.17901217817239432,
|
||||
"max_relative_error_nonzero_reference": 4.44605370798596e-07,
|
||||
"mean_abs_error": 1.2647788049158225e-06,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/two_sources-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "656c1fb8a53ca1ed7c23b31f0b87a394ebca2af6e8be118d2dda6c972a5da180",
|
||||
"apl-inhibition.float32.npy": "c31530f2d09305d73bd37438ca1ed7e1d2b3cedfcfe6e4cced94279377b32081",
|
||||
"apl-state.float32.npy": "919e10a7ccb6c6ff4bd240dfe7a70f654df72068c254c63e67d8ffd6eea1ca03",
|
||||
"state.npz": "ad50b02424e0dda0894e245442ae07ec02f4508ad4110795ebdd146067571975",
|
||||
"summary.json": "54a85f8a3a895858c697d3f5f6cb7d1a2fb48db6ec0629fc25cd73250f7b1e2d"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 300,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 1,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"actual_spike_events": 0,
|
||||
"ast_replay_bitwise_exact": {
|
||||
"drive": true,
|
||||
"inhibition": true,
|
||||
"state": true
|
||||
},
|
||||
"brain_or_learning_parameters_changed": false,
|
||||
"bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
|
||||
"bundle_sha256": {
|
||||
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
|
||||
"apl_out_ids.npy": "51e2cb25752d8eaa3ab1950fdd4ae9580f71644b8d435f875abb63efa6ab344c",
|
||||
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
|
||||
"input_raw.npy": "6da61bb9db93e11c687632f8ae7a5ffec3734d506b790f40c38da16c7e6d1028",
|
||||
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
|
||||
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73",
|
||||
"output_raw.npy": "a142a2b49b070d1a03c8ba4b7fa53fa97fa3005ad70326e0a93204570e5beea1",
|
||||
"pn_globals.npy": "ed574f42559455069679f8ce3b339395efa9398ec13e199eab47959533370805",
|
||||
"provenance.json": "c3441f8424032f6f9c28aa19370928407c46eaea942eb7581a77214ed38bf57e",
|
||||
"scales.json": "fe2decd3949f73006966227cd6a1c4a7d43885f977311ffabb9ababdedd44daa"
|
||||
},
|
||||
"candidate_function_called": false,
|
||||
"canonical_sha256": {
|
||||
"indices": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
|
||||
"indptr": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
|
||||
"metadata": "922af16846a065c3dbfca7c11146b83ca217fcbd7392edc745f444a04eae8c63",
|
||||
"raw": "c7ae101451dd19c47fd976bcfacbc52d67193a68ffa04c5b4d2e911cfd52d99b"
|
||||
},
|
||||
"decay_f32_bits": "3f7eb923",
|
||||
"environment": {
|
||||
"cuda": "13.0",
|
||||
"cuda_matmul_allow_tf32": false,
|
||||
"deterministic_algorithms": false,
|
||||
"float32_matmul_precision": "highest",
|
||||
"gpu": "NVIDIA GeForce RTX 4090",
|
||||
"numpy": "2.2.6",
|
||||
"precision_flags_changed": false,
|
||||
"torch": "2.14.0+cu130"
|
||||
},
|
||||
"extracted_source": {
|
||||
"decay_line": 126,
|
||||
"decay_source": "apl_decay = np.float32(math.exp(-self.dt / 20.0))",
|
||||
"excluded_self_base_line": 83,
|
||||
"inhibition_line": 154,
|
||||
"inhibition_source": "inhibition = torch.matmul(apl_state, self.output_gpu) * np.float32(0.01)",
|
||||
"initializer_line_end": 82,
|
||||
"initializer_line_start": 55,
|
||||
"initializer_source": "self.rt = rt\nself.n = rt.n\nself.device = rt.device\nself.dt = rt.dt\nmeta = rt.table.to_pandas().sort_values(\"neuron_idx\").reset_index(drop=True)\nself.meta = meta\ncls = meta.annotation_class.fillna(\"\").astype(str).to_numpy()\ntyp = meta.annotation_type.fillna(\"\").astype(str).to_numpy()\nself.kc = np.flatnonzero(cls == \"Kenyon_Cell\").astype(np.int32)\nself.mbon = np.flatnonzero(cls == \"MBON\").astype(np.int32)\nself.pn = np.flatnonzero(cls == \"ALPN\").astype(np.int32)\nself.apl = np.flatnonzero(typ == \"APL\").astype(np.int32)\nif len(self.apl) != 2 or len(self.kc) != 4064: raise RuntimeError(\"frozen APL/KC identity changed\")\nself.sources = np.repeat(np.arange(self.n, dtype=np.int32), np.diff(rt.indptr_np).astype(np.int64))\nidx = rt.indices_np\nraw = rt.raw_np\napl_out = np.isin(self.sources, self.apl)\nself.apl_out_ids = np.flatnonzero(apl_out).astype(np.int64)\ninput_matrix = np.zeros((len(self.apl), self.n), np.float32)\noutput_matrix = np.zeros((len(self.apl), len(self.kc)), np.float32)\nkc_lookup = np.full(self.n, -1, np.int32)\nkc_lookup[self.kc] = np.arange(len(self.kc), dtype=np.int32)\nallowed = np.isin(self.sources, np.concatenate((self.kc, self.pn))) & np.isin(idx, self.apl)\napl_lookup = {int(x): i for i, x in enumerate(self.apl)}\nfor eid in np.flatnonzero(allowed): input_matrix[apl_lookup[int(idx[eid])], int(self.sources[eid])] += float(raw[eid])\nfor eid in np.flatnonzero(apl_out & np.isin(idx, self.kc)):\n output_matrix[apl_lookup[int(self.sources[eid])], kc_lookup[int(idx[eid])]] += float(raw[eid])\nself.input_scale = float(input_matrix[input_matrix > 0].sum() / np.count_nonzero(np.any(input_matrix > 0, axis=0)))\nself.output_scale = float(output_matrix[output_matrix > 0].mean())\nself.input_gpu = torch.as_tensor(input_matrix / self.input_scale, dtype=torch.float32, device=self.device)\nself.output_gpu = torch.as_tensor(output_matrix / self.output_scale, dtype=torch.float32, device=self.device)\nself.kc_gpu = torch.as_tensor(self.kc, dtype=torch.int64, device=self.device)\nself.apl_out_gpu = torch.as_tensor(self.apl_out_ids, dtype=torch.int64, device=self.device)",
|
||||
"learning_initializer_suffix_executed": false,
|
||||
"original_run_loop_executed": false,
|
||||
"sha256": "c7e693a2da70acdce4f53af5c2853e52e8333acc93f88a46a5e8083eac639346",
|
||||
"source": "/data/digital-drosophila/models/male-cns-lif/deterministic-runtime-v2/phase4p_revalidate.py",
|
||||
"state_update_line": 153,
|
||||
"state_update_source": "apl_state.mul_(float(apl_decay)).add_(torch.mv(self.input_gpu, self.rt.spike_u8.to(torch.float32)))"
|
||||
},
|
||||
"first_ast_difference": null,
|
||||
"float64_measurement": {
|
||||
"drive": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 1.5e-323,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"inhibition": {
|
||||
"bound_violations": 0,
|
||||
"elements": 406400,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 2.6e-322,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
},
|
||||
"state": {
|
||||
"bound_violations": 0,
|
||||
"elements": 200,
|
||||
"max_abs_error": 0.0,
|
||||
"max_bound_utilization": 0.0,
|
||||
"max_error_bound": 4.69e-321,
|
||||
"max_relative_error_nonzero_reference": 0.0,
|
||||
"mean_abs_error": 0.0,
|
||||
"zero_reference_nonzero_actual": 0
|
||||
}
|
||||
},
|
||||
"gain_f32_bits": "3c23d70a",
|
||||
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay0/zero-r0",
|
||||
"independent_cpu_closed_loop_oracle": false,
|
||||
"input_sha256": {
|
||||
"apl-drive.float32.npy": "15fe3726f298f2ebcf01f147d8dbd995d41c1e9413138d858f341b8aa0df48bd",
|
||||
"apl-inhibition.float32.npy": "429a69417d057704b5a9364e5dc9968d7a690c83f43b096c9284be47835d4c9f",
|
||||
"apl-state.float32.npy": "15fe3726f298f2ebcf01f147d8dbd995d41c1e9413138d858f341b8aa0df48bd",
|
||||
"state.npz": "acf8be16ad5ac4fab3a0fb96cd1b322b86cb0089f506f57a7d4a6043f4e18dff",
|
||||
"summary.json": "8ff367a625a8c15a331a6f1cae5fa85ae523f44dd5b906320bb011511d708602"
|
||||
},
|
||||
"limitations": [
|
||||
"AST shadow and candidate use the same original Torch/CUDA primitives; this validates preserved component semantics, not an independent CPU whole-brain oracle.",
|
||||
"Float64 is a non-feedback mathematical measurement with explicit gamma error bounds, not replacement APL dynamics.",
|
||||
"Replay uses the recorded actual spike train; it does not establish equivalence for untested closed-loop inputs.",
|
||||
"The N-1 positive-sum bound is deliberately conservative; passing it does not prove physiological validity or learning."
|
||||
],
|
||||
"matrix_checks": {
|
||||
"apl_globals": true,
|
||||
"apl_out_ids": true,
|
||||
"input_matrix": true,
|
||||
"input_raw": true,
|
||||
"input_scale": true,
|
||||
"kc_globals": true,
|
||||
"output_matrix": true,
|
||||
"output_raw": true,
|
||||
"output_scale": true,
|
||||
"pn_globals": true
|
||||
},
|
||||
"pass_all": true,
|
||||
"reconstructed_array_sha256": {
|
||||
"apl_globals": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
|
||||
"apl_out_ids": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
|
||||
"input_matrix": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
|
||||
"input_raw": "a7153b9a7c7cdc2700bd97f9ed96c7402c360172ebb739099303d057c9bbea11",
|
||||
"kc_globals": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
|
||||
"output_matrix": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9",
|
||||
"output_raw": "2a3e4f18ac86c6d557f5dc85b6f99060fc1bd2d4c0c53241714acc2aee24dc0e",
|
||||
"pn_globals": "56c4eb47cb535fcf990017b13a29d026f91a28397e6c206bd24a99598d2588ff"
|
||||
},
|
||||
"scope": "Frozen APL component extraction and recorded-spike replay only",
|
||||
"steps": 100,
|
||||
"theoretical_bound": {
|
||||
"applicable": true,
|
||||
"assumptions": "nonnegative f32 matrices, spikes exactly 0/1, fixed stored f32 decay/gain, normal finite RN binary32/64 operations; no reduced-precision matmul",
|
||||
"bound_arithmetic": "Each positive bound operation is rounded toward +infinity via nextafter; denominator toward -infinity",
|
||||
"drive_n": 166699,
|
||||
"f64_values_used_to_drive_brain": false,
|
||||
"gamma_definition": "gamma_n=(n*u)/(1-n*u), upward-rounded; u32=2^-24,u64=2^-53",
|
||||
"gamma_drive_f32": 0.010035750241849791,
|
||||
"gamma_drive_f64": 1.8507306798541427e-11,
|
||||
"max_observed_nonzero_drive_terms": 0,
|
||||
"no_cpu_gpu_bitwise_expectation_for_f64_measurement": true,
|
||||
"normal_or_zero_arithmetic": true,
|
||||
"output_bound": "q*sum(B*E_p) + gamma_(2*A+1),p*q*sum(B*abs(s_p)); compare with E32+E64",
|
||||
"state_recurrence": "E_p[t] <= d*E_p[t-1] + gamma_2,p*(d*abs(s_p[t-1])+D_upper) + (1+u_p)*gamma_(N-1),p*D_upper",
|
||||
"tolerance_fitted_to_observed_error": false
|
||||
},
|
||||
"value_units": {
|
||||
"drive": "legacy normalized-contact spike drive",
|
||||
"inhibition": "legacy mV",
|
||||
"state": "legacy normalized-drive accumulator"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user