{ "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/phase4ag-author-apl-r2/gpu/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": "737fba9a39f9c30a2e4e337df01f1fc30ad482ca0357c8a3c8cd92170f2e35db" }, "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" } }