Seal Phase 4AJ fixed APL timing hypothesis audit

This commit is contained in:
Digital Drosophila Archive
2026-09-30 12:08:25 +08:00
parent 8d6b063aaf
commit cb6937666f
1992 changed files with 258416 additions and 10 deletions
@@ -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/delay18/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": "2f1d98d1cf0334fc554a5631fd4a4ed99e2bbca7e02b1789f77b1f37106677f5"
},
"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/delay18/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": "214d061f425077623176e00368ce16051d5cb3ffa70e0cef6a0a153d8599d3f0",
"summary.json": "6f8d360fb5424f66e9413eace606876b35bafbc02f109a2e4b95668021d0d80f"
},
"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"
}
}
@@ -0,0 +1,151 @@
{
"actual_spike_events": 29368,
"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": 4.4330954551696777e-07,
"max_bound_utilization": 1.1255846215596215e-05,
"max_error_bound": 0.07659348333922923,
"max_relative_error_nonzero_reference": 1.1296086159079982e-07,
"mean_abs_error": 1.862645149230957e-08,
"zero_reference_nonzero_actual": 0
},
"inhibition": {
"bound_violations": 0,
"elements": 4064000,
"max_abs_error": 4.445260958441111e-06,
"max_bound_utilization": 6.665149070935509e-05,
"max_error_bound": 0.07816517227600407,
"max_relative_error_nonzero_reference": 6.695233609882282e-07,
"mean_abs_error": 2.497939558179807e-07,
"zero_reference_nonzero_actual": 0
},
"state": {
"bound_violations": 0,
"elements": 2000,
"max_abs_error": 8.397293098028058e-05,
"max_bound_utilization": 5.497153936634678e-05,
"max_error_bound": 1.7306627481890076,
"max_relative_error_nonzero_reference": 5.522214025342151e-07,
"mean_abs_error": 2.1755705714919985e-05,
"zero_reference_nonzero_actual": 0
}
},
"gain_f32_bits": "3c23d70a",
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay18/cal-matched_energy-00-s51101-r0",
"independent_cpu_closed_loop_oracle": false,
"input_sha256": {
"apl-drive.float32.npy": "945f263c84f91569984961e9c04bec1b316195bb5a08151119ce4b9c03adfab2",
"apl-inhibition.float32.npy": "b6f3741e964b3d57261be82727a08c8555aa1ef3af611dfea1aba20543421ee3",
"apl-state.float32.npy": "d3c52200188a64b9b7dc5054c9a6199a4cd4a9168369f051b6de2d764442e64b",
"state.npz": "17f9aa5c6748b0dc028c551ae6c91edaeea40b8d7561656a0936ff716ca74f0b",
"summary.json": "e60254d3282953bb1ca5fca775e328f49fe426ee66a2707c77a2d42933feef5c"
},
"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": 8,
"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": 29672,
"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": 3.5762786865234375e-07,
"max_bound_utilization": 1.1129652859651151e-05,
"max_error_bound": 0.06850973674407951,
"max_relative_error_nonzero_reference": 1.1169441658599537e-07,
"mean_abs_error": 1.7873942852020264e-08,
"zero_reference_nonzero_actual": 0
},
"inhibition": {
"bound_violations": 0,
"elements": 4064000,
"max_abs_error": 5.347266883504176e-06,
"max_bound_utilization": 7.933359526698304e-05,
"max_error_bound": 0.07767639555002429,
"max_relative_error_nonzero_reference": 7.980238963080976e-07,
"mean_abs_error": 3.382391482195504e-07,
"zero_reference_nonzero_actual": 0
},
"state": {
"bound_violations": 0,
"elements": 2000,
"max_abs_error": 0.0001079866522957218,
"max_bound_utilization": 6.987172912306554e-05,
"max_error_bound": 1.753313621761298,
"max_relative_error_nonzero_reference": 7.028256069891883e-07,
"mean_abs_error": 2.949250549552969e-05,
"zero_reference_nonzero_actual": 0
}
},
"gain_f32_bits": "3c23d70a",
"gpu_case_dir": "/data/digital-drosophila/experiments/phase4aj-apl-timing/gpu/delay18/cal-physiological-00-s51101-r0",
"independent_cpu_closed_loop_oracle": false,
"input_sha256": {
"apl-drive.float32.npy": "383cafd480aadca9ca7b04810087a1865f941c3ecf3429cc9133ce8dedbdd7fc",
"apl-inhibition.float32.npy": "3bf68b8939f54fdbda273803ff19d3b77b602ea63e1d8edb0a4528c3c9f69233",
"apl-state.float32.npy": "39358239cc58666ef5c690111150cb08cb4fee7b1f2c85ef59f8063e00d7e698",
"state.npz": "86c2607df55271e573c942c630f0d99488417ad823fb3b0e0936aa2db32d5418",
"summary.json": "06a5a44556479edf2f0383a79308a8e7bc66d1774c99706c88b6c4efd89e5193"
},
"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": 8,
"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/delay18/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": "6e3b6d39a29961806d6af1b05ff35b02864abbf3e52e36fea2ff27fb23fcb767",
"summary.json": "4dc17264a7e03f3e7a90b3ebdc3d938227afb45ecee626e32f1da719662108ea"
},
"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/delay18/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": "c16bc54b5422995b196d928aeba56a0a123c72f29ca4327b3c72d4c1ed915e3a",
"summary.json": "d476e6e40a87c3590bc42d40eaf00142ee0e217e234b6e63eb64695a295b67be"
},
"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/delay18/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": "cc0e6734e52f7c92955ea0814d318093d0ea90feda6ee31feb6a4937f2403b75",
"summary.json": "b4ac8dae43cfb2aa0e03f5bf503bccbf227d95352cb3823b46e402224d34ac6d"
},
"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/delay18/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": "c032df090d24a764d706eec1120e424efdc9ca432f734be3139af7f9459c5e29",
"summary.json": "3d442c599d843271184dcd2bee3cb438d9e24a48c3e7905d4176b9118eb5ba72"
},
"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/delay18/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": "821731ef22b144aadf9480764089f9018a0965791727bb17315a6cd6ebdb63a9",
"summary.json": "2ce84367efe5c0f5bde6e1357df8079cbd5069f5a87f0e833fea07a2678ab59f"
},
"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/delay18/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": "ea221914d575d7701ece30b1c0268dd6510572a4cdcd88cbae04885d6d130743"
},
"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"
}
}