Seal Phase 4AG author-APL audit and fixed CAL failure

This commit is contained in:
Digital Drosophila Archive
2026-09-30 09:26:21 +08:00
parent 7dfe5d2d87
commit ff91a74193
593 changed files with 67671 additions and 17 deletions
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 20,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "41992774ca397eadc8b51d199c8ca6950567f363c5eebdeb7542f3a6ec8f2585",
"count": 50,
"effective_weights_file_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406",
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "24009dd051cb88d5383254c72b2c6b15d7c8cb441cacb756804ddde6fac4c825",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n lastspike = _array_default_neurons_lastspike\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n t = _array_defaultclock_t[0]\n v = _array_default_neurons_v.copy()\n not_refractory = _array_default_neurons_not_refractory.copy()\n rfc = _array_default_neurons_rfc\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_v[_idx] = v\n _array_default_neurons_g[_idx] = g\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n lastspike = _array_default_neurons_lastspike\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n t = _array_defaultclock_t[0]\n v = _array_default_neurons_v.copy()\n not_refractory = _array_default_neurons_not_refractory.copy()\n rfc = _array_default_neurons_rfc\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_v[_idx] = v\n _array_default_neurons_g[_idx] = g\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,65 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"arrays.npz": "c256234eec74752513c95d961233e7c1a7b5caa20deaa9b4913be9f539b2f1d8",
"requests.npz": "6b633838a29f5aee68f83e7fe97e95e5cf15063280a639114d404afb4dd5cbe8",
"spec.json": "ab07aab0cd2a76dbf73c5838ce354aefd7acafd406645f6ccd2be3d2b76abdc8"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fe19419a07b379537e0f94176c6e60058d42f07d576c87e7bebf1c7a568a500f",
"connectivity.parquet": "5ee85c2b1befe4cde2ca5ad3ace142bb4e338a143d99d756d348d6aeaf44db9b",
"dst.npy": "6f50ad492013b3d14fe45c46210a68c37fb138337ae7f91eed0730f92d5cc7d6",
"edge_id.npy": "8b3ad7ca57738feb1495d75dadb7c7cd62890ab0b763bfb46ed217d4002c8765",
"nodes.npy": "2a65c268f42ecb99ce2a30a22f0b654a0101ab1f336388bc2e96dc7057ccc0bd",
"ptr.npy": "98f301cd19c6e01a911249cc594431369ed593b686f870c24aee86fcb41c8f81",
"signed_raw.npy": "8af7fa8ede8c3da396d00bee2146d01cd549c065702d8e27211df73ad1a32471",
"src.npy": "98ccabc84a7a57fa01a92f7164e5333dbe3f90bf18efbccf3cb4f40fef326a5f",
"weights.npy": "d751ac5a580f88071e5a876882ada072aeb8e461f76e4fbca4ad41fa4b14f865"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 10.0,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/fixtures",
"kind": "fixture",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "apl_only",
"output_budget_bytes": 16106127360,
"precision": "float64",
"record_history": true,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"steps": 100,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
100,
2
],
"inhibition": [
100,
4064
],
"state": [
100,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": true,
"history_shape": [
100,
44
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 100,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 100,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 50,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 100,
"apl_fast_edges_zeroed": 50,
"applicable_requests": 2,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 100,
"edges": 287,
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"events_sha256": "f42e10e38960132803d2eb1c3ccf3570e7a8d6618ed2d77d60bf830bf2c4812e",
"history_recorded": true,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 20,
"name": "apl_only",
"no_poi": true,
"no_training": true,
"nodes": 44,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1111370366,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "306299f8fb7e6901ce92c3e146566f8ce1f65138090daefbbe367f013d2eebaa",
"ref_rejected_requests": 0,
"requests": 2,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 2,
"state_hashes_sha256": "e2936c94d40319270491846542963ea9439c94891008003edf2436366ee42e8e",
"steps": 100,
"weights_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 20,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "41992774ca397eadc8b51d199c8ca6950567f363c5eebdeb7542f3a6ec8f2585",
"count": 50,
"effective_weights_file_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406",
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "24009dd051cb88d5383254c72b2c6b15d7c8cb441cacb756804ddde6fac4c825",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n dt = _array_defaultclock_dt[0]\n lastspike = _array_default_neurons_lastspike\n not_refractory = _array_default_neurons_not_refractory.copy()\n g = _array_default_neurons_g.copy()\n t = _array_defaultclock_t[0]\n rfc = _array_default_neurons_rfc\n v = _array_default_neurons_v.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n dt = _array_defaultclock_dt[0]\n lastspike = _array_default_neurons_lastspike\n not_refractory = _array_default_neurons_not_refractory.copy()\n g = _array_default_neurons_g.copy()\n t = _array_defaultclock_t[0]\n rfc = _array_default_neurons_rfc\n v = _array_default_neurons_v.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,65 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"arrays.npz": "c256234eec74752513c95d961233e7c1a7b5caa20deaa9b4913be9f539b2f1d8",
"requests.npz": "2b5c4d1491dd65ac70a2e23b8d4db9be7f0798fabff114c308a753ccb58a051f",
"spec.json": "a80077e0d792a9aa4789d47ac69c751e5e79014a5b7f3a8f650e6147613b5feb"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fe19419a07b379537e0f94176c6e60058d42f07d576c87e7bebf1c7a568a500f",
"connectivity.parquet": "5ee85c2b1befe4cde2ca5ad3ace142bb4e338a143d99d756d348d6aeaf44db9b",
"dst.npy": "6f50ad492013b3d14fe45c46210a68c37fb138337ae7f91eed0730f92d5cc7d6",
"edge_id.npy": "8b3ad7ca57738feb1495d75dadb7c7cd62890ab0b763bfb46ed217d4002c8765",
"nodes.npy": "2a65c268f42ecb99ce2a30a22f0b654a0101ab1f336388bc2e96dc7057ccc0bd",
"ptr.npy": "98f301cd19c6e01a911249cc594431369ed593b686f870c24aee86fcb41c8f81",
"signed_raw.npy": "8af7fa8ede8c3da396d00bee2146d01cd549c065702d8e27211df73ad1a32471",
"src.npy": "98ccabc84a7a57fa01a92f7164e5333dbe3f90bf18efbccf3cb4f40fef326a5f",
"weights.npy": "d751ac5a580f88071e5a876882ada072aeb8e461f76e4fbca4ad41fa4b14f865"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 12.0,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/fixtures",
"kind": "fixture",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "arrival_collision",
"output_budget_bytes": 16106127360,
"precision": "float64",
"record_history": true,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"steps": 120,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
120,
2
],
"inhibition": [
120,
4064
],
"state": [
120,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": true,
"history_shape": [
120,
44
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 120,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 120,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 50,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 120,
"apl_fast_edges_zeroed": 50,
"applicable_requests": 3,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 120,
"edges": 287,
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"events_sha256": "39136eaca57a5fc7eee6e4c41af79421a0e5931cdfba474e33949a775d5db53e",
"history_recorded": true,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 20,
"name": "arrival_collision",
"no_poi": true,
"no_training": true,
"nodes": 44,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1096166406,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "a14e60c29eee17afa66692052d5aa7661c6269785a5672ab116b9ca096a247e0",
"ref_rejected_requests": 1,
"requests": 4,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 3,
"state_hashes_sha256": "0bb726cf2815518ea4fe632d6eb162fecd1865cef54ec0fa25ba22a20f479772",
"steps": 120,
"weights_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 4064,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "a8c19cde743bd456bcb2e988d504f805b6943d6ceb97cd241d6e1e472ab5a591",
"count": 5845,
"effective_weights_file_sha256": "ac433da4b0ac3cdc20c526d99a7158c3dc2298b62c10784f9dcd7db1f089214b",
"effective_weights_raw_sha256": "b8b8f43048e0ef03943e607666319d25363bed3b2564fdc02b4149837e7eedc9",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n not_refractory = _array_default_neurons_not_refractory.copy()\n lastspike = _array_default_neurons_lastspike\n v = _array_default_neurons_v.copy()\n rfc = _array_default_neurons_rfc\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_v[_idx] = v\n _array_default_neurons_g[_idx] = g\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n not_refractory = _array_default_neurons_not_refractory.copy()\n lastspike = _array_default_neurons_lastspike\n v = _array_default_neurons_v.copy()\n rfc = _array_default_neurons_rfc\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_v[_idx] = v\n _array_default_neurons_g[_idx] = g\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,72 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"requests.npz": "d49fb00b3870c8e923c0e5fc903536c0d8985555e5052c23ebc6f963c8af5314",
"spec.json": "c6bece47f42a0a262f907d16a50ef6e12c37029f84c2184b5a15f79a7388c680"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fb9033398abb7585ae63472ced9d8c8cab787f69965dc9ce5fa409ab105bc1bc",
"connectivity.parquet": "1362c1102b74f5552f4b01fca956574fd6252f749e31493c4a00a1bc9eab00b3",
"dst.npy": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
"edge_id.npy": "49260615ff2b6432ce3dea9ce2c7ab8f83d06c2fb7491e58e08355fcedf86a30",
"nodes.npy": "5b511a98e8fbf8d65bbc70b93e75ecae19366f650b7842a45611bfad62ed83dc",
"ptr.npy": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
"signed_raw.npy": "f9884ccb8930b32420b27c69271df78034a8350fe5a5c9b76a63c259268efc09",
"src.npy": "bfd625ce690fc21eb0a8b9dede831688ab73b789045ba83ddf4baeefeddf1fc3",
"weights.npy": "462839ffc3feb8f6c278044488082b1c8e410e7f23229d6b5e29d1b7042416a1"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 100.0,
"expected_external_events": 102.24431762695312,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/full",
"kind": "calibration",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"mode": "matched_energy",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "cal-matched_energy-00-s51101",
"odor_id": "OMSUIQOIVADKIM-RXMQYKEDSA-N",
"odor_index": 0,
"odor_name": "ethyl (R)-(-)-3-hydroxybutanoate",
"output_budget_bytes": 16106127360,
"precision": "float64",
"rate_sum_hz": 1022.4431762695312,
"record_history": false,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"seed": 51101,
"steps": 1000,
"target_count": 48,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
1000,
2
],
"inhibition": [
1000,
4064
],
"state": [
1000,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": false,
"history_shape": [
1000,
166700
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 1000,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 1000,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 5845,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 1000,
"apl_fast_edges_zeroed": 5845,
"applicable_requests": 89,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 1000,
"edges": 25582938,
"effective_weights_raw_sha256": "b8b8f43048e0ef03943e607666319d25363bed3b2564fdc02b4149837e7eedc9",
"events_sha256": "f57af8126b151c9af0fef3b065f70ceae72e270b001b8447f91f10bc161cd0bd",
"history_recorded": false,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 4064,
"name": "cal-matched_energy-00-s51101",
"no_poi": true,
"no_training": true,
"nodes": 166700,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1628114768,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "628317164ce25c2b0b90236fe0f68d02cbcec586f9676cc03a4be1ed7e53d622",
"ref_rejected_requests": 28,
"requests": 117,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 29518,
"state_hashes_sha256": "7d07fe889f1f968fc83efb8d661cd6803e430dcf0914e75b2476db2e5c987396",
"steps": 1000,
"weights_sha256": "ac433da4b0ac3cdc20c526d99a7158c3dc2298b62c10784f9dcd7db1f089214b"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 4064,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "a8c19cde743bd456bcb2e988d504f805b6943d6ceb97cd241d6e1e472ab5a591",
"count": 5845,
"effective_weights_file_sha256": "ac433da4b0ac3cdc20c526d99a7158c3dc2298b62c10784f9dcd7db1f089214b",
"effective_weights_raw_sha256": "b8b8f43048e0ef03943e607666319d25363bed3b2564fdc02b4149837e7eedc9",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "78d88b017b336f9c72a230680a39a9c4e74fedeff6fbb7b9c8641f30cb15e72b",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n t = _array_defaultclock_t[0]\n lastspike = _array_default_neurons_lastspike\n v = _array_default_neurons_v.copy()\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n rfc = _array_default_neurons_rfc\n not_refractory = _array_default_neurons_not_refractory.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_v[:] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_default_synapses_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n t = _array_defaultclock_t[0]\n lastspike = _array_default_neurons_lastspike\n v = _array_default_neurons_v.copy()\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n rfc = _array_default_neurons_rfc\n not_refractory = _array_default_neurons_not_refractory.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_v[:] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_default_synapses_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,72 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"requests.npz": "9f87b434e8da524ce31b4563ad89ab47189dc7035c9f827840f3250aad81083d",
"spec.json": "a664118cd5506ac7e093e43234a586b9c6fe06b9d9e3a2975d264975f6789bb7"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fb9033398abb7585ae63472ced9d8c8cab787f69965dc9ce5fa409ab105bc1bc",
"connectivity.parquet": "1362c1102b74f5552f4b01fca956574fd6252f749e31493c4a00a1bc9eab00b3",
"dst.npy": "ce20f7433f78442c717ad2a7b5394cf4a3b109d990b4be0788040b7b0f4ed150",
"edge_id.npy": "49260615ff2b6432ce3dea9ce2c7ab8f83d06c2fb7491e58e08355fcedf86a30",
"nodes.npy": "5b511a98e8fbf8d65bbc70b93e75ecae19366f650b7842a45611bfad62ed83dc",
"ptr.npy": "fe43420f11e6242a11f8199ae7f097cab4b8a6db181d36f2a46b9e46670acbb4",
"signed_raw.npy": "f9884ccb8930b32420b27c69271df78034a8350fe5a5c9b76a63c259268efc09",
"src.npy": "bfd625ce690fc21eb0a8b9dede831688ab73b789045ba83ddf4baeefeddf1fc3",
"weights.npy": "462839ffc3feb8f6c278044488082b1c8e410e7f23229d6b5e29d1b7042416a1"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 100.0,
"expected_external_events": 105.90211181640625,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/full",
"kind": "calibration",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"mode": "physiological",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "cal-physiological-00-s51101",
"odor_id": "OMSUIQOIVADKIM-RXMQYKEDSA-N",
"odor_index": 0,
"odor_name": "ethyl (R)-(-)-3-hydroxybutanoate",
"output_budget_bytes": 16106127360,
"precision": "float64",
"rate_sum_hz": 1059.0211181640625,
"record_history": false,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"seed": 51101,
"steps": 1000,
"target_count": 48,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
1000,
2
],
"inhibition": [
1000,
4064
],
"state": [
1000,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": false,
"history_shape": [
1000,
166700
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 1000,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 1000,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 5845,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 1000,
"apl_fast_edges_zeroed": 5845,
"applicable_requests": 93,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 1000,
"edges": 25582938,
"effective_weights_raw_sha256": "b8b8f43048e0ef03943e607666319d25363bed3b2564fdc02b4149837e7eedc9",
"events_sha256": "4980889373ddb0681fd3444881a59242681890b9c0fa0aa20154ad9376c3cdbd",
"history_recorded": false,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 4064,
"name": "cal-physiological-00-s51101",
"no_poi": true,
"no_training": true,
"nodes": 166700,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1384814228,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "8ed73b17d00fc6a67b807c3d36f5c9b82a974f17f1ce2d3bfd9f8d6c15de5a01",
"ref_rejected_requests": 28,
"requests": 121,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 29938,
"state_hashes_sha256": "f9134739ed6a2b7558957a2bc47ad375d831b733d4c259a826e4be296bcb0cc9",
"steps": 1000,
"weights_sha256": "ac433da4b0ac3cdc20c526d99a7158c3dc2298b62c10784f9dcd7db1f089214b"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 20,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "41992774ca397eadc8b51d199c8ca6950567f363c5eebdeb7542f3a6ec8f2585",
"count": 50,
"effective_weights_file_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406",
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "24009dd051cb88d5383254c72b2c6b15d7c8cb441cacb756804ddde6fac4c825",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v.copy()\n rfc = _array_default_neurons_rfc\n lastspike = _array_default_neurons_lastspike\n not_refractory = _array_default_neurons_not_refractory.copy()\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_g[:] = g\n _array_default_neurons_v[:] = v\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v.copy()\n rfc = _array_default_neurons_rfc\n lastspike = _array_default_neurons_lastspike\n not_refractory = _array_default_neurons_not_refractory.copy()\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_g[:] = g\n _array_default_neurons_v[:] = v\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,65 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"arrays.npz": "61d667618406364f38d34a9eb2af328a74c662b17b63dc9ac33f90ab06952df7",
"requests.npz": "817f0fb0919c87927068fb4923854e2d2bfd1f362a6401695a26127ac032e019",
"spec.json": "39adb14fd5ca410840d6ed69e76c818bf82545bfca62b623de67dea5fdc00164"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fe19419a07b379537e0f94176c6e60058d42f07d576c87e7bebf1c7a568a500f",
"connectivity.parquet": "5ee85c2b1befe4cde2ca5ad3ace142bb4e338a143d99d756d348d6aeaf44db9b",
"dst.npy": "6f50ad492013b3d14fe45c46210a68c37fb138337ae7f91eed0730f92d5cc7d6",
"edge_id.npy": "8b3ad7ca57738feb1495d75dadb7c7cd62890ab0b763bfb46ed217d4002c8765",
"nodes.npy": "2a65c268f42ecb99ce2a30a22f0b654a0101ab1f336388bc2e96dc7057ccc0bd",
"ptr.npy": "98f301cd19c6e01a911249cc594431369ed593b686f870c24aee86fcb41c8f81",
"signed_raw.npy": "8af7fa8ede8c3da396d00bee2146d01cd549c065702d8e27211df73ad1a32471",
"src.npy": "98ccabc84a7a57fa01a92f7164e5333dbe3f90bf18efbccf3cb4f40fef326a5f",
"weights.npy": "d751ac5a580f88071e5a876882ada072aeb8e461f76e4fbca4ad41fa4b14f865"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 40.0,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/fixtures",
"kind": "fixture",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "high_fanin",
"output_budget_bytes": 16106127360,
"precision": "float64",
"record_history": true,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"steps": 400,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
400,
2
],
"inhibition": [
400,
4064
],
"state": [
400,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": true,
"history_shape": [
400,
44
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 400,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 400,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 50,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 400,
"apl_fast_edges_zeroed": 50,
"applicable_requests": 114,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 400,
"edges": 287,
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"events_sha256": "86cdf5a06b77c8ff57cd82cb8a814fd3ac0130ef55bdc03fe74dacbc4bc01f95",
"history_recorded": true,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 20,
"name": "high_fanin",
"no_poi": true,
"no_training": true,
"nodes": 44,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1141452780,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "02252a8546c104e0808ab55ca181e8e32c181ae9ad0ccbe13c33f008474725f6",
"ref_rejected_requests": 0,
"requests": 114,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 157,
"state_hashes_sha256": "badb44d874c9262789e61561fee3a5d2bc83451c7e5d1f402bfaa7b462512101",
"steps": 400,
"weights_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 20,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "41992774ca397eadc8b51d199c8ca6950567f363c5eebdeb7542f3a6ec8f2585",
"count": 50,
"effective_weights_file_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406",
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "24009dd051cb88d5383254c72b2c6b15d7c8cb441cacb756804ddde6fac4c825",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory.copy()\n lastspike = _array_default_neurons_lastspike\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n v = _array_default_neurons_v.copy()\n rfc = _array_default_neurons_rfc\n g = _array_default_neurons_g.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_g[:] = g\n _array_default_neurons_v[:] = v\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_default_synapses_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory.copy()\n lastspike = _array_default_neurons_lastspike\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n v = _array_default_neurons_v.copy()\n rfc = _array_default_neurons_rfc\n g = _array_default_neurons_g.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_g[:] = g\n _array_default_neurons_v[:] = v\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_default_synapses_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "before_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,65 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"arrays.npz": "c256234eec74752513c95d961233e7c1a7b5caa20deaa9b4913be9f539b2f1d8",
"requests.npz": "38d5b1a50b3c05c23f5652847e3598b1e7c9f9ad217442de0617054727b8c595",
"spec.json": "a61805aca6b71a23eb1b172bdfd49dae7a4a3631c031de693ad1e02e2fa2eb86"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fe19419a07b379537e0f94176c6e60058d42f07d576c87e7bebf1c7a568a500f",
"connectivity.parquet": "5ee85c2b1befe4cde2ca5ad3ace142bb4e338a143d99d756d348d6aeaf44db9b",
"dst.npy": "6f50ad492013b3d14fe45c46210a68c37fb138337ae7f91eed0730f92d5cc7d6",
"edge_id.npy": "8b3ad7ca57738feb1495d75dadb7c7cd62890ab0b763bfb46ed217d4002c8765",
"nodes.npy": "2a65c268f42ecb99ce2a30a22f0b654a0101ab1f336388bc2e96dc7057ccc0bd",
"ptr.npy": "98f301cd19c6e01a911249cc594431369ed593b686f870c24aee86fcb41c8f81",
"signed_raw.npy": "8af7fa8ede8c3da396d00bee2146d01cd549c065702d8e27211df73ad1a32471",
"src.npy": "98ccabc84a7a57fa01a92f7164e5333dbe3f90bf18efbccf3cb4f40fef326a5f",
"weights.npy": "d751ac5a580f88071e5a876882ada072aeb8e461f76e4fbca4ad41fa4b14f865"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 10.0,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/fixtures",
"kind": "fixture",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "kc_ref_boundary",
"output_budget_bytes": 16106127360,
"precision": "float64",
"record_history": true,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"steps": 100,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
100,
2
],
"inhibition": [
100,
4064
],
"state": [
100,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": true,
"history_shape": [
100,
44
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 100,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 100,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 50,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 100,
"apl_fast_edges_zeroed": 50,
"applicable_requests": 3,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 100,
"edges": 287,
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"events_sha256": "6e702482c91247c306339d0ad9822550c8e560a8db1b50d91db775c7500701f7",
"history_recorded": true,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 20,
"name": "kc_ref_boundary",
"no_poi": true,
"no_training": true,
"nodes": 44,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1064481295,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "72f55a0b9cc9bec5d5e066240b81ad6a44f85b97f0f6681f22ee5d41d459ed55",
"ref_rejected_requests": 3,
"requests": 6,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 4,
"state_hashes_sha256": "6dff6c90260330994a1f5bc5862dafb0258121aaf27a6b4c28ad94b28c0ffb1d",
"steps": 100,
"weights_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 20,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "41992774ca397eadc8b51d199c8ca6950567f363c5eebdeb7542f3a6ec8f2585",
"count": 50,
"effective_weights_file_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406",
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "24009dd051cb88d5383254c72b2c6b15d7c8cb441cacb756804ddde6fac4c825",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n g = _array_default_neurons_g.copy()\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n v = _array_default_neurons_v.copy()\n lastspike = _array_default_neurons_lastspike\n rfc = _array_default_neurons_rfc\n not_refractory = _array_default_neurons_not_refractory.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_v[_idx] = v\n _array_default_neurons_g[_idx] = g\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n g = _array_default_neurons_g.copy()\n t = _array_defaultclock_t[0]\n dt = _array_defaultclock_dt[0]\n v = _array_default_neurons_v.copy()\n lastspike = _array_default_neurons_lastspike\n rfc = _array_default_neurons_rfc\n not_refractory = _array_default_neurons_not_refractory.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_v[:] = v\n _array_default_neurons_g[:] = g\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n v = _array_default_neurons_v\n not_refractory = _array_default_neurons_not_refractory\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "after_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nrun:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_v[_idx] = v\n _array_default_neurons_g[_idx] = g\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,65 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"arrays.npz": "1a4ba4d3e86b06300c645f6b02cba2d8927b8ef22003f91ccfaea39b5dc24b73",
"requests.npz": "ccaa5da628e1659f6b42a3400927cff598017d104485ca60010b45248a37eba3",
"spec.json": "7a31ef85b1f00c4710a3bbeb63faf035d2497d6d1c653392d1e9c7bc3f1585a6"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fe19419a07b379537e0f94176c6e60058d42f07d576c87e7bebf1c7a568a500f",
"connectivity.parquet": "5ee85c2b1befe4cde2ca5ad3ace142bb4e338a143d99d756d348d6aeaf44db9b",
"dst.npy": "6f50ad492013b3d14fe45c46210a68c37fb138337ae7f91eed0730f92d5cc7d6",
"edge_id.npy": "8b3ad7ca57738feb1495d75dadb7c7cd62890ab0b763bfb46ed217d4002c8765",
"nodes.npy": "2a65c268f42ecb99ce2a30a22f0b654a0101ab1f336388bc2e96dc7057ccc0bd",
"ptr.npy": "98f301cd19c6e01a911249cc594431369ed593b686f870c24aee86fcb41c8f81",
"signed_raw.npy": "8af7fa8ede8c3da396d00bee2146d01cd549c065702d8e27211df73ad1a32471",
"src.npy": "98ccabc84a7a57fa01a92f7164e5333dbe3f90bf18efbccf3cb4f40fef326a5f",
"weights.npy": "d751ac5a580f88071e5a876882ada072aeb8e461f76e4fbca4ad41fa4b14f865"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 10.0,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/fixtures",
"kind": "fixture",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "natural_request",
"output_budget_bytes": 16106127360,
"precision": "float64",
"record_history": true,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"steps": 100,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
100,
2
],
"inhibition": [
100,
4064
],
"state": [
100,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": true,
"history_shape": [
100,
44
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 100,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 100,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 50,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 100,
"apl_fast_edges_zeroed": 50,
"applicable_requests": 1,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 100,
"edges": 287,
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"events_sha256": "7601dfaea8202baf80d25587d5dfdd4c9e0483f5339c7d794e958000332f50bb",
"history_recorded": true,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 20,
"name": "natural_request",
"no_poi": true,
"no_training": true,
"nodes": 44,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1103768903,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "6ed5f7b813bbae5230b8955f970ae6b0b140dd0eb33f5ea06cd2aad41f4dcae3",
"ref_rejected_requests": 0,
"requests": 1,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 2,
"state_hashes_sha256": "66acc728c7f38ccc29f5996c3d71f23682101964c70eb1d1296b81a499fad62b",
"steps": 100,
"weights_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 20,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "41992774ca397eadc8b51d199c8ca6950567f363c5eebdeb7542f3a6ec8f2585",
"count": 50,
"effective_weights_file_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406",
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "24009dd051cb88d5383254c72b2c6b15d7c8cb441cacb756804ddde6fac4c825",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n t = _array_defaultclock_t[0]\n lastspike = _array_default_neurons_lastspike\n rfc = _array_default_neurons_rfc\n v = _array_default_neurons_v.copy()\n dt = _array_defaultclock_dt[0]\n not_refractory = _array_default_neurons_not_refractory.copy()\n g = _array_default_neurons_g.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_g[:] = g\n _array_default_neurons_v[:] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,17 @@
{
"APL_precision": "float32 in separate science-Python process",
"Torch_imported_into_Brian": false,
"author_precision": "float64",
"codegen": "numpy",
"packages": {
"brian2": "2.5.1",
"cython": "0.29.33",
"numpy": "1.22.3",
"pandas": "1.4.3",
"pyarrow": "11.0.0",
"scipy": "1.8.1",
"sympy": "1.12"
},
"platform": "Linux-5.15.0-194-generic-x86_64-with-glibc2.35",
"python": "3.10.12 (main, Aug 31 2026, 10:18:17) [GCC 11.4.0]"
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n t = _array_defaultclock_t[0]\n lastspike = _array_default_neurons_lastspike\n rfc = _array_default_neurons_rfc\n v = _array_default_neurons_v.copy()\n dt = _array_defaultclock_dt[0]\n not_refractory = _array_default_neurons_not_refractory.copy()\n g = _array_default_neurons_g.copy()\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_g[:] = g\n _array_default_neurons_v[:] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject_1"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\n",
"name": "default_neurons_spike_thresholder_codeobject_1"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_i = _array_default_neurons_i[_idx]\n _source_t = _array_defaultclock_t[0]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _array_spikemonitor_count[_events - _source_start] += 1\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject_1"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n w = _array_default_synapses_w[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject_1"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject_1"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]
@@ -0,0 +1,65 @@
{
"ae_sha256": "32eb1c42383068ce52701d2139a376ce155ad7072cde019949f8ca2d55492409",
"af_sha256": "d72003d98f0f1624b12126eff50bd361c43d888f4a64d90ba9247a58976f1961",
"author_sha256": "fc45837d7122c6ce2a7f3f2f23c515992e4b232aadb919efabb72337fac88e4e",
"bundle_hashes": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"candidate_trace_used_as_input": false,
"case_hashes": {
"arrays.npz": "c256234eec74752513c95d961233e7c1a7b5caa20deaa9b4913be9f539b2f1d8",
"requests.npz": "ac00687a2d58d91e72527f8833817588ec2caa1ad274b2694c0ef43e19bdb531",
"spec.json": "ed7596015d5199d496af300b492cca1815c846c04a61c104deb613bec0aecc26"
},
"coefficients_sha256": "bde79d95ef0097b827d5faf4d5658eafc009d8e9fcef1fddd645c953823e3f64",
"graph_hashes": {
"completeness.csv": "fe19419a07b379537e0f94176c6e60058d42f07d576c87e7bebf1c7a568a500f",
"connectivity.parquet": "5ee85c2b1befe4cde2ca5ad3ace142bb4e338a143d99d756d348d6aeaf44db9b",
"dst.npy": "6f50ad492013b3d14fe45c46210a68c37fb138337ae7f91eed0730f92d5cc7d6",
"edge_id.npy": "8b3ad7ca57738feb1495d75dadb7c7cd62890ab0b763bfb46ed217d4002c8765",
"nodes.npy": "2a65c268f42ecb99ce2a30a22f0b654a0101ab1f336388bc2e96dc7057ccc0bd",
"ptr.npy": "98f301cd19c6e01a911249cc594431369ed593b686f870c24aee86fcb41c8f81",
"signed_raw.npy": "8af7fa8ede8c3da396d00bee2146d01cd549c065702d8e27211df73ad1a32471",
"src.npy": "98ccabc84a7a57fa01a92f7164e5333dbe3f90bf18efbccf3cb4f40fef326a5f",
"weights.npy": "d751ac5a580f88071e5a876882ada072aeb8e461f76e4fbca4ad41fa4b14f865"
},
"legacy_apl_worker_sha256": "21ceec65fe42581dc55872010e0025d660e80358905f1cf4df1dadf341a3b291",
"scope": "shared-APL-component closed-loop oracle, not all-components-independent CPU equivalence",
"spec": {
"apl": {
"gain": 0.01,
"normalization": 1.0,
"tau_ms": 20.0
},
"apl_bundle_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"apl_precision": "float32",
"budget_root": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2",
"coefficients_path": "/data/digital-drosophila/experiments/phase4af-author-fullgraph/oracle/no_input/coefficients.json",
"dt_ms": 0.1,
"duration_ms": 30.0,
"graph_dir": "/data/digital-drosophila/experiments/phase4ag-author-apl-r2/graphs/fixtures",
"kind": "fixture",
"legacy_apl_worker": "/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"model": {
"dt_ms": 0.1,
"membrane_tau_ms": 20.0,
"refractory_ms": 2.2,
"reset_potential_mv": -52.0,
"resting_potential_mv": -52.0,
"synaptic_delay_ms": 1.8,
"synaptic_tau_ms": 5.0,
"threshold_mv": -45.0,
"w_syn_mv_per_anatomical_synapse": 0.275
},
"name": "pn_pulse",
"output_budget_bytes": 16106127360,
"precision": "float64",
"record_history": true,
"science_python": "/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"steps": 300,
"training": false
}
}
@@ -0,0 +1,45 @@
{
"APL_SI_conversion": "h.astype(float64) * float64(0.001), then separate float64 g subtraction",
"APL_dtype": "float32",
"APL_h_units": "mV; gain already applied in float32",
"APL_input": "Brian's own actual global spikes, never candidate spikes or candidate inhibition",
"APL_shapes": {
"drive": [
300,
2
],
"inhibition": [
300,
4064
],
"state": [
300,
2
]
},
"APL_write_schedule": "end, order=0, after original reset, unconditional raw g write; recorder end/order=1",
"complete_marker": "summary.json complete=true only after worker exit and all checks",
"history_recorded": true,
"history_shape": [
300,
44
],
"queue_protocol": "sealed Phase4AF queue_summary; original global edge IDs, including zero-weight/ref-rejected arrivals",
"request_columns": [
"tick",
"neuron_idx",
"attempted",
"accepted",
"rejected"
],
"state_hash_encoding": "SHA256 of contiguous little-endian raw f64 V/g and i32 ref",
"state_hash_file": "tick-state-hashes.jsonl",
"state_npz": [
"step",
"neuron_idx",
"counts",
"v",
"g",
"ref"
]
}
@@ -0,0 +1,34 @@
{
"membrane_tau_ms": {
"author": 20.0,
"case": 20.0
},
"refractory_ms": {
"author": 2.2,
"case": 2.2
},
"reset_potential_mv": {
"author": -52.0,
"case": -52.0
},
"resting_potential_mv": {
"author": -52.0,
"case": -52.0
},
"synaptic_delay_ms": {
"author": 1.8,
"case": 1.8
},
"synaptic_tau_ms": {
"author": 5.0,
"case": 5.0
},
"threshold_mv": {
"author": -45.0,
"case": -45.0
},
"w_syn_mv_per_anatomical_synapse": {
"author": 0.275,
"case": 0.275
}
}
@@ -0,0 +1,15 @@
{
"advance_calls": 300,
"forwarding_contract": "sealed AE/AF design",
"installations": [
"default_synapses_pre_codeobject",
"default_synapses_pre_codeobject_1"
],
"limit": "Current wrapper was not independently rerun without the queue proxy",
"new_unwrapped_repeat_performed": false,
"original_edge_ids_not_sorted_or_filtered": true,
"peek_calls": 300,
"post_threshold_pre_synaptic_guard_observed": true,
"same_peek_object_returned": true,
"zero_weight_and_refractory_rejected_edges_retained": true
}
@@ -0,0 +1,11 @@
{
"schedule": [
"start",
"groups",
"thresholds",
"synapses",
"resets",
"end"
],
"summary": " object | part of | Clock dt | when | order | active\n---------------------------------------------------+-------------------------------+----------------------+-------------------+---------+-------\ndefault_neurons_stateupdater (StateUpdater) | default_neurons (NeuronGroup) | 100. us (every step) | groups | 0 | yes \noracle_common_requests (NetworkOperation) | -- | 100. us (every step) | before_thresholds | 0 | yes \ndefault_neurons_spike_thresholder (Thresholder) | default_neurons (NeuronGroup) | 100. us (every step) | thresholds | 0 | yes \nspikemonitor (SpikeMonitor) | spikemonitor (SpikeMonitor) | 100. us (every step) | thresholds | 1 | yes \ndefault_synapses_pre (SynapticPathway) | default_synapses (Synapses) | 100. us (every step) | synapses | -1 | yes \ndefault_neurons_spike_resetter (Resetter) | default_neurons (NeuronGroup) | 100. us (every step) | resets | 0 | yes \noracle_legacy_apl_unconditional (NetworkOperation) | -- | 100. us (every step) | end | 0 | yes \noracle_after_apl_record (NetworkOperation) | -- | 100. us (every step) | end | 1 | yes \nzz_apl_queue_installer (QueueInstaller) | -- | 100. us (every step) | end | 1000000 | yes "
}
@@ -0,0 +1,37 @@
{
"APL_fast_edges_zeroed": 50,
"APL_precision": "float32",
"APL_worker_exit_status": 0,
"APL_worker_ticks": 300,
"apl_fast_edges_zeroed": 50,
"applicable_requests": 1,
"backend": "shared-APL-component closed-loop Brian2 oracle",
"candidate_trace_used_as_input": false,
"complete": true,
"completed_ticks": 300,
"edges": 287,
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"events_sha256": "cfb623e0cbddf4f5dc58384e4ef080cbfaf6330c8c02607d2a001e146bcf7d52",
"history_recorded": true,
"independent_CPU_all_components_claim": false,
"kc_targets_present": 20,
"name": "pn_pulse",
"no_poi": true,
"no_training": true,
"nodes": 44,
"output_budget_bytes": 16106127360,
"output_bytes_before_summary": 1056879425,
"pass_all": true,
"pass_all_scope": "Oracle construction, protocol and internal self-checks only; candidate comparison is a separate gate",
"precision": "float64",
"queue_sha256": "9183c97b03f28017025534018cd82c55d5c050ed6bd9c912e36e06fe80776a98",
"ref_rejected_requests": 0,
"requests": 1,
"scope": "Only this fixed trajectory; legacy Torch APL is a shared numerical component, not an independent CPU APL implementation",
"single_continuous_run": true,
"source_and_inputs_unchanged": true,
"spikes": 1,
"state_hashes_sha256": "09985efa2511d1efb1b4d44002e4e0c82c63a56596453553081285396b0a0a58",
"steps": 300,
"weights_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406"
}
@@ -0,0 +1,12 @@
{
"KC_targets_in_case": 20,
"base_graph_files_modified": false,
"base_weight_raw_bytes_sha256": "41992774ca397eadc8b51d199c8ca6950567f363c5eebdeb7542f3a6ec8f2585",
"count": 50,
"effective_weights_file_sha256": "815a82e033b1f70f42595c15ad36677692521bde0befc558c34cfab624b38406",
"effective_weights_raw_sha256": "4f55a48a0b1e07e26b5fa132bb6a9ed87194f254ab832b4c7e9657b52cd375c6",
"fullgraph_required_mask_count": 5845,
"graded_targets": "only KC identities present in this LIF case",
"ordered_original_edge_id_sha256": "24009dd051cb88d5383254c72b2c6b15d7c8cb441cacb756804ddde6fac4c825",
"rule": "zero +0 all existing fast edges whose source GLOBAL neuron is in apl_globals; no graph edge removal"
}
@@ -0,0 +1,56 @@
{
"command": [
"/data/digital-drosophila/models/male-cns-lif/.venv/bin/python",
"-B",
"/data/digital-drosophila/models/male-cns-lif/author-apl-lab-v2/legacy_apl_worker.py",
"--bundle-dir",
"/data/digital-drosophila/experiments/phase4ag-author-apl-r2/apl-bundle",
"--dt-ms",
"0.1"
],
"handshake": {
"array_sha256": {
"apl_globals.npy": "979ef88dff30d41168ce9b377a006ccb3cd034b2dce86d54923ca0f4b87cb6a6",
"input_matrix.npy": "528a5f6f5ffe424f323c5a44695db4a7cf32570709832eff2f37f49e85c92c3e",
"kc_globals.npy": "9e990d10a63b0f74cd7bbbdc5369082f24d5246487af944ba289bc6bf48d4b75",
"output_matrix.npy": "0dcf02cdb7836ab72da32ac47f5682ca33e25f63a8a662a8452d4ea9d46babb9"
},
"decay_f32_bits": "3f7eb923",
"dt_ms": 0.1,
"environment": {
"CUBLAS_WORKSPACE_CONFIG": null,
"cuda": "13.0",
"cuda_matmul_allow_tf32": false,
"cudnn": 92400,
"cudnn_allow_tf32": true,
"cudnn_benchmark": false,
"cudnn_deterministic": false,
"deterministic_algorithms": false,
"device_capability": [
8,
9
],
"device_index": 0,
"device_name": "NVIDIA GeForce RTX 4090",
"float32_matmul_precision": "highest",
"numpy": "2.2.6",
"precision_configuration_changed_by_component": false,
"torch": "2.14.0+cu130"
},
"files_sha256": {
"apl_globals.npy": "8388c8795d49cfe5b14fda54f76ef3a35030c62ba87bd8ca6334a2dcdf186f19",
"input_matrix.npy": "c4d3df703ea5f1d7402b8255cfa19d9744139ad1048827c23b151d8ba766fec6",
"kc_globals.npy": "97a570aafa089f93e642b2bb07e3a3322dabb14c3c7dd431f0c8d2b3b7951fdd",
"output_matrix.npy": "e2d0a1ccd740e6777245ebf2efcd88bf5e1da9e47308c63ec8e83d451e134a73"
},
"gain_f32_bits": "3c23d70a",
"h_units": "legacy mV",
"initial_state": "float32 zeros",
"n_apl": 2,
"n_kc": 4064,
"n_neurons": 166700,
"ok": true,
"operator_sequence": "state.mul_(decay32); drive=mv(I32,spikes32); state.add_(drive); h=matmul(state,O32)*gain32",
"protocol": "phase4ag-apl-v1"
}
}
@@ -0,0 +1,72 @@
{
"c0": -0.00025935108198051754,
"cg": 0.004937935295309027,
"cv": 0.9950124791926823,
"gd": 0.9801986733067553,
"metadata": {
"constant_values_are_double": true,
"float32_execution_note": "Brian NumPy scalar/array promotion and operation order must be matched separately; double coefficients alone do not assert float64 intermediate array arithmetic.",
"g_expression": "gd * old_g",
"hex": {
"c0": "-0x1.0ff306a505980p-12",
"cg": "0x1.439cce9a65d5bp-8",
"cv": "0x1.fd7246927d28bp-1",
"gd": "0x1.f5dc99badec5bp-1",
"reset": "-0x1.a9fbe76c8b43ap-5",
"seed_volt": "-0x1.6872b020c49bap-5",
"threshold": "-0x1.70a3d70a3d70ap-5"
},
"names": {
"c0": "_lio_8",
"cg": "_lio_9",
"cv": "_lio_10",
"gd": "_lio_2"
},
"provenance": {
"c0": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_8",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cg": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_9",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"cv": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_10",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"gd": {
"code_object": "default_neurons_stateupdater_codeobject_1",
"name": "_lio_2",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"reset": {
"code_object": "default_neurons_spike_resetter_codeobject_1",
"name": "v_rst",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
},
"seed_volt": {
"source": "common request interface: unchanged v_th + 1 mV"
},
"threshold": {
"code_object": "default_neurons_spike_thresholder_codeobject_1",
"name": "v_th",
"namespace_dtype": "float64",
"source": "CodeObject.namespace"
}
},
"units": "SI volts and dimensionless coefficients",
"voltage_expression": "c0 + ((cg * old_g) + (cv * old_v))"
},
"reset": -0.052000000000000005,
"seed_volt": -0.044,
"threshold": -0.045
}
@@ -0,0 +1,124 @@
[
{
"active": true,
"code_objects": [],
"name": "default_neurons",
"order": 0,
"type": "NeuronGroup",
"when": "start"
},
{
"active": true,
"code_objects": [],
"name": "default_synapses",
"order": 0,
"type": "Synapses",
"when": "start"
},
{
"abstract_code": "not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n_g = g*exp(-dt*int(not_refractory)/tau)\n_v = g*tau*(-exp(dt*int(not_refractory)/t_mbr) + exp(dt*int(not_refractory)/tau))*exp(-dt*int(not_refractory)/t_mbr)*exp(-dt*int(not_refractory)/tau)/(t_mbr - tau) + v*exp(-dt*int(not_refractory)/t_mbr) + v_0 - v_0*exp(-dt*int(not_refractory)/t_mbr)\ng = _g\nv = _v",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n dt = _array_defaultclock_dt[0]\n _lio_1 = (- dt) / tau\n _lio_2 = exp(_lio_1)\n _lio_3 = tau / (t_mbr - tau)\n _lio_4 = dt / t_mbr\n _lio_5 = dt / tau\n _lio_6 = (- dt) / t_mbr\n _lio_7 = v_0 - v_0\n _lio_8 = v_0 - (v_0 * exp(_lio_6))\n _lio_9 = ((_lio_3 * ((- exp(_lio_4)) + exp(_lio_5))) * exp(_lio_6)) * exp(_lio_1)\n _lio_10 = exp(_lio_6)\n # vector code\n _vectorisation_idx = LazyArange(N)\n lastspike = _array_default_neurons_lastspike\n dt = _array_defaultclock_dt[0]\n g = _array_default_neurons_g.copy()\n not_refractory = _array_default_neurons_not_refractory.copy()\n rfc = _array_default_neurons_rfc\n v = _array_default_neurons_v.copy()\n t = _array_defaultclock_t[0]\n not_refractory = timestep(t - lastspike, dt) >= timestep(rfc, dt)\n _g = _numpy.where(not_refractory, _lio_2 * g, g)\n _v = _numpy.where(not_refractory, _lio_8 + ((_lio_9 * g) + (_lio_10 * v)), _lio_7 + v)\n g[not_refractory] = _g[not_refractory]\n v[not_refractory] = _v[not_refractory]\n _array_default_neurons_g[:] = g\n _array_default_neurons_not_refractory[:] = not_refractory\n _array_default_neurons_v[:] = v\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_stateupdater_codeobject"
}
],
"name": "default_neurons_stateupdater",
"order": 0,
"type": "StateUpdater",
"when": "groups"
},
{
"active": true,
"code_objects": [],
"name": "oracle_common_requests",
"order": 0,
"type": "NetworkOperation",
"when": "before_thresholds"
},
{
"abstract_code": "_cond = (v > v_th) and not_refractory",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n numpy_True = _numpy.bool_(True)\n numpy_False = _numpy.bool_(False)\n # scalar code\n _vectorisation_idx = 1\n # vector code\n _vectorisation_idx = LazyArange(N)\n not_refractory = _array_default_neurons_not_refractory\n v = _array_default_neurons_v\n _cond = (v > v_th) & not_refractory\n if _cond is True or _cond is numpy_True:\n _events = _numpy.arange(N)\n elif _cond is False or _cond is numpy_False:\n _events = _numpy.array([])\n else:\n _events, = _cond.nonzero()\n _array_default_neurons__spikespace[-1] = len(_events)\n _array_default_neurons__spikespace[:len(_events)] = _events\n # Set the neuron to refractory\n _array_default_neurons_not_refractory[_events] = False\n _array_default_neurons_lastspike[_events] = _array_defaultclock_t[0]\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _array_default_neurons__spikespace[-1] = 0\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_thresholder_codeobject"
}
],
"name": "default_neurons_spike_thresholder",
"order": 0,
"type": "Thresholder",
"when": "thresholds"
},
{
"abstract_code": "_to_record_i = _source_i\n_to_record_t = _source_t",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _n_events = _array_default_neurons__spikespace[-1]\n if _n_events > 0:\n _events = _array_default_neurons__spikespace[:_n_events]\n # Take subgroups into account\n if _source_start != 0 or _source_stop != _source_N:\n _events = _events[(_events >= _source_start) & (_events < _source_stop)]\n _n_events = len(_events)\n if _n_events > 0:\n _vectorisation_idx = 1\n _curlen = _array_spikemonitor_N[0]\n _newlen = _curlen + _n_events\n _owner.resize(_newlen)\n _array_spikemonitor_N[0] = _newlen\n _vectorisation_idx = _events\n _idx = _events\n _source_t = _array_defaultclock_t[0]\n _source_i = _array_default_neurons_i[_idx]\n _to_record_i = _source_i\n _to_record_t = _source_t\n _dynamic_array_spikemonitor_t[_curlen:_newlen] = _to_record_t\n _dynamic_array_spikemonitor_i[_curlen:_newlen] = _to_record_i\n _array_spikemonitor_count[_events - _source_start] += 1\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "spikemonitor_codeobject"
}
],
"name": "spikemonitor",
"order": 1,
"type": "SpikeMonitor",
"when": "thresholds"
},
{
"abstract_code": "g += w\n",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.push_spikes()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _owner.initialise_queue()\n",
"name": "default_synapses_pre_push_spikes"
},
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n _spiking_synapses = _queue.peek()\n if len(_spiking_synapses):\n # scalar code\n # vector code\n _idx = _spiking_synapses\n _vectorisation_idx = _idx\n # Abstract code: g += w\n _postsynaptic_idx = _array_default_synapses__synaptic_post[_idx]\n not_refractory = _array_default_neurons_not_refractory[_postsynaptic_idx]\n w = _array_default_synapses_w[_idx]\n _numpy.add.at(_array_default_neurons_g, _postsynaptic_idx[not_refractory], w[not_refractory])\n # Advance the spike queue\n _queue.advance()\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_synapses_pre_codeobject"
}
],
"name": "default_synapses_pre",
"order": -1,
"type": "SynapticPathway",
"when": "synapses"
},
{
"abstract_code": "v = v_rst; w = 0; g = 0 * mV",
"active": true,
"code_objects": [
{
"generated_code": "run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # scalar code\n _vectorisation_idx = 1\n w = 0\n # vector code\n _idx = _array_default_neurons__spikespace[:_array_default_neurons__spikespace[-1]]\n _vectorisation_idx = _idx\n v = v_rst\n g = 0.0\n _array_default_neurons_g[_idx] = g\n _array_default_neurons_v[_idx] = v\nafter_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\nbefore_run:\n import numpy as _numpy\n from brian2.codegen.runtime.numpy_rt.numpy_rt import LazyArange\n # EMPTY_CODE_BLOCK -- overwrite in child template\n",
"name": "default_neurons_spike_resetter_codeobject"
}
],
"name": "default_neurons_spike_resetter",
"order": 0,
"type": "Resetter",
"when": "resets"
},
{
"active": true,
"code_objects": [],
"name": "oracle_legacy_apl_unconditional",
"order": 0,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "oracle_after_apl_record",
"order": 1,
"type": "NetworkOperation",
"when": "end"
},
{
"active": true,
"code_objects": [],
"name": "zz_apl_queue_installer",
"order": 1000000,
"type": "QueueInstaller",
"when": "end"
}
]

Some files were not shown because too many files have changed in this diff Show More