Downloads · 30 days
0
drmylesgarveylabs/ion_neural_network
ion_neural_network is a machine learning model from drmylesgarveylabs. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as gpl-3.0.
Neurotransmitter Ion Receptor Glial Endocannabinoid Network A biophysically grounded, discrete-ion framework for neural computation — breaking 80 years of voltage abstraction.
Downloads · 30 days
0
Access
Public
Updated Sep 19, 2026
Repo size
554 MB
Likes
3
Trending 1
Click a slice to open those files.
.csv550 MB · 98%
From the Hugging Face model README
Neurotransmitter Ion Receptor Glial Endocannabinoid Network
A biophysically grounded, discrete-ion framework for neural computation — breaking 80 years of voltage abstraction.
Picture trying to understand a symphony orchestra from the lobby, with one low-quality microphone taped to the back wall. You can hear volume rising and falling — but not the oboe, not the second violins entering a half-beat late, not that eighty different instruments are involved. A theory built only from that microphone would be a theory of loudness over time and nothing else. This is almost exactly what happened in 1943.
— Garvey (2026), Shadows of Consciousness
In 1943, the only signal recoverable from outside a neuron was a voltage trace. McCulloch and Pitts built a model from it. Nine years later, Hodgkin and Huxley proved that voltage is the derived epiphenomenon — the microphone reading — of discrete ions moving through specific molecular gates in integer steps, subject to conservation laws and finite molecular inventories.
Artificial intelligence kept the voltage. The biology went a different direction without us.
The standard neuron formula — $y = \sigma(Wx + b)$ — is an unconstrained, continuous, unbounded operation. Real nervous systems compute through:
An audit of 23 model classes from McCulloch–Pitts through GPT-3, evaluated against five of these properties, finds that none represent all five, and most represent none.
NIRGEN goes backstage.
NIRGEN (Neurotransmitter Ion Receptor Glial Endocannabinoid Network) is a discrete, biophysically grounded Ionic Neural Network (INN) framework derived from six threads of post-1943 neuroscience literature.
Computation proceeds through:
The nirgen Python package lets you construct, fit, and test INN models built on this framework.
Install directly from GitHub:
pip install git+https://github.com/drmylesgarveylabs/nirgen.git
Requirements: Python ≥ 3.9, NumPy ≥ 1.23, PyTorch ≥ 2.0
The paper's experimental section walks through three full worked experiments using the nirgen package. The snippet below shows the general workflow:
import nirgen
# Define a single NIRGEN unit (INN neuron) with biophysical defaults
# d_endo=20µm soma diameter, cleft_thickness=20nm, single ion species
model = nirgen.NIRGENUnit(
d_endo=20, # soma diameter (µm)
cleft_nm=20, # perisynaptic cleft thickness (nm)
n_input_patches=2, # number of input receptor patches (l_i)
n_output_patches=1, # number of output vesicle patches (l_o)
)
# XOR dataset — full 2-bit permutation grid
X = [[0, 0], [0, 1], [1, 0], [1, 1]]
y = [0, 1, 1, 0]
# Fit using relaxation backpropagation with Straight-Through Estimator (STE)
model.fit(X, y, epochs=500, lr=0.05)
# Evaluate — single unit solves XOR via compartment saturation
preds = model.predict(X)
print(preds)
See the preprint (Section: Experiments) for full runnable examples of all six experimental configurations.
A NIRGEN unit models a single ion species ($\text{ion}_1$) partitioned across bounded topological sub-domains:
$$\text{Extracellular Cleft } B_{\text{ecto}} ;\cup; \text{Annular Membrane } B ;\cup; \text{Intracellular Cytosol } B_{\text{endo}}$$
Signal flow:
Problem Input (x) ──► [Input Patches l_i] ──► Receptor Gating (r_e) ──► Ion Translocation
│
Diffusion Bridge
│
Problem Output (y) ◄── [Output Patches l_o] ◄── Vesicle Fusion (V_e) ◄── Intracellular Pool
Compartment ceilings are derived from measured biological values, not set as hyperparameters:
| Compartment | Dimension | Ion density |
|---|---|---|
| Intracellular soma | $d_{\text{endo}} = 20,\mu\text{m}$ | $\rho \approx 2.92,\text{ions/nm}^2$ |
| Extracellular cleft | thickness $= 20,\text{nm}$ | $\rho \approx 2.92,\text{ions/nm}^2$ |
$$S_{B_{\text{ecto}}}^{(\tau)} + S_{B_{\text{endo}}}^{(\tau)} = D \leq C_{B_{\text{endo}}} + C_{B_{\text{ecto}}}$$
This holds exactly at every discrete timestep $\tau$.
Optimization updates only physically meaningful quantities:
The accompanying preprint reviews six threads of post-1943 neuroscience literature and audits 23 model classes — from McCulloch–Pitts (1943) through GPT-3 — against five biophysical properties:
| Property | Description |
|---|---|
| Ion specificity | Na⁺, K⁺, Cl⁻, Ca²⁺ are chemically distinct and non-interchangeable |
| Stoichiometric gating | Integer ligand counts trigger integer ionic quanta |
| Geometric capacity | Compartment ceilings constrain computation physically |
| Glial renegotiation | Astrocytes continuously modify the capacity environment |
| Retrograde signaling | Postsynaptic endocannabinoid feedback without a global error signal |
Result: No model class satisfies all five. Most satisfy none.
NIRGEN is the first framework designed to satisfy all five simultaneously.
| Experiment | Description |
|---|---|
| 1 — Geometric Scaling Grid | Sweeps soma scales ($d_{\text{endo}} \in {10, 15, 20, 25},\mu\text{m}$) and cleft profiles ($10$–$40,\text{nm}$) to locate optimal physical volumes for structural stability |
| 2 — Local Budget Allocation | Evaluates varying concentration gradients by shifting the ectosphere budget split ($\gamma \in {0.1, 0.25, 0.5, 0.75, 0.9}$) under a frozen total ionic pool |
| 3 — Free-Floating Control | Removes the localized budget coefficient ($\delta$) to assess performance when dynamics draw unconstrained from the macro ambient pool $P$ |
| Experiment | Description |
|---|---|
| 4 — Gating Hardness Sweep | Anneals the soft-minimum sharpness parameter ($\kappa_{\text{start}} \to \kappa_{\text{end}}$) from smooth approximations down to hard discrete boundaries |
| 5 — Sub-pool Ratios ($\alpha$, $\beta$) | Ablates the stoichiometric allocation weights dividing ions into flux-eligible and ligand-binding pools |
| 6 — The Continuous Impostor | Replaces discrete floor boundaries with an unconstrained continuous projection of equal parameter width — measuring the exact performance decay when physical limits are abandoned |
Calibration and task performance are verified every 50 epochs across three paradigms:
1. $n$-Bit XOR Parity
Evaluated via full permutation grids. Tests the network's ability to exploit localized compartment saturation to collapse output headroom when co-active inputs collide. Standard connectionist networks require at least one hidden layer for this task. NIRGEN solves it in a single unit.
2. Stoichiometric Convergence Rate
Tracks parameter trajectory smoothness using Straight-Through Estimators (STE) and Fourier-series smooth floor surrogates against traditional Adam optimization. The floor surrogate uses $J = 10$ Fourier terms.
3. Mass Invariance Error
A strict conservation audit tracking numerical drift across prolonged forward passes. Acceptable variance is fixed at exactly $0$ — physical matter conservation is not a soft regularizer.
| Parameter | Value |
|---|---|
| Hardware | Custom local environment (self-funded) |
| Optimization | Relaxation backpropagation + STE |
| Surrogate operator | $J = 10$ Fourier smooth floor |
| Initial budgets | $D \leq C_{B_{\text{endo}}} + C_{B_{\text{ecto}}}$, checked dynamically |
| Membrane weighting | $\sigma = 1.0$ (default) |
| Learning rate | $0.05$ with gradient clipping at norm $5.0$ |
| Sharpness schedule | Cosine annealing ($\kappa: 1.0 \to 30.0$) |
Single ion species. This iteration tracks a single generic monovalent ion pool ($R = {\text{ion}_1}$). Real tissue relies on overlapping, chemically specific competitive interactions between Na⁺, K⁺, Cl⁻, and Ca²⁺.
Discrete step horizon. The forward pass resolves across tight discrete intervals. Fine-grained volume transmission and asynchronous wave propagation are omitted from this version.
Instrument Concept Bias. Standard ML evaluation suites measure vector transformations, not resource allocation dynamics. Benchmarking an INN against tasks designed for dot-product networks risks the exact conceptual category error this paradigm argues against.
The formal derivation, biological literature review, 23-model audit, and full experimental results are available in the preprint:
Garvey, M. (2026). Shadows of Consciousness: An Investigation into Ionic Neural Networks Using the Neurotransmitter Ion Receptor Glial Endocannabinoid Network (NIRGEN) Paradigm. Zenodo. https://doi.org/10.5281/zenodo.22379848
@article{garvey2026shadows,
title = {Shadows of Consciousness: An Investigation into Ionic Neural Networks
Using the Neurotransmitter Ion Receptor Glial Endocannabinoid Network
(NIRGEN) Paradigm},
author = {Garvey, Myles},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.22379848},
url = {https://doi.org/10.5281/zenodo.22379848},
note = {Preprint — not peer-reviewed, subject to revision},
orcid = {0000-0003-0495-0268}
}
Biophysical foundations referenced:
Dr. Myles Douglas Garvey — Independent Researcher
📧 [email protected]
🆔 ORCID: 0000-0003-0495-0268
🤗 Hugging Face
📄 Preprint (Zenodo)
Currently seeking full-time and part-time research and engineering opportunities.
The preprint is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). The nirgen package is MIT-licensed.