README.md
Qui mettiamo la descrizione del neurone. Infatti l'espressione G. non e' come un programma tradizionale che puo' essere letto e capito, essendo i comportamenti omomorfi rispetto al codice. In un'espressione G. i comportamenti sono locali in tempo e spazio (contestualizzazione). Non essendoci un flusso programmatico, il commento ai comportamenti locali, non e' sufficienti a spiegare i comportamenti che sara' possibile verificare in diversi ambiti. C'e' quindi bisogno di esprimere i flussi e le chiusure che in diversi ambiti abbiamo voluto esprimere, tramite espressioni locali.
Containers
Axon
The axon does not contain specific behavior. We might add balancing of ATP within PRE later. Here we comprehend it as a “cable” transporting the AP from SOMA to Presynapse.
Presynapse
Discursive description:
The presynapse is the sending terminal of a neuron — a small bulb at the tip of an axon whose job is to release chemical signals, called neurotransmitters (NT), into the synaptic cleft, the narrow gap that separates it from the receiving neuron's postsynapse.
To do this, the presynapse maintains a stockpile of NT packed inside small membrane bubbles called vesicles. These vesicles are organised in two pools: a reserve pool (RP), which is the deep storage, and a readily-releasable pool (RRP), which is the small set of vesicles docked at the membrane and ready to fire immediately. When a spike arrives — an electrical pulse called an action potential — it briefly opens specialised calcium channels (VGCCs) in the membrane. Calcium (Ca²⁺) rushes in, and the sudden local surge of calcium triggers the docked vesicles to fuse with the membrane and pour their NT into the cleft.
But the presynapse does not just release blindly. It runs several interlocking feedback loops that continuously regulate how much it releases, how quickly it recovers, and when it should stop entirely to protect itself.
The amount of Ca²⁺ that enters is itself regulated. Three brakes — CDI, eCB, and mGluR — each reduce the effective number of open channels in their own way and on their own timescale. CDI (calcium-dependent inactivation) is a channel-level self-brake: Ca²⁺ that enters during a spike physically blocks the same channels from reopening, accumulating gradually across repeated spikes. eCB (endocannabinoids) is a retrograde signal synthesised by the receiving neuron when it is over-stimulated; it travels backward across the cleft to suppress the presynaptic channels. mGluR is a presynaptic autoreceptor that senses accumulated NT in the cleft and reduces channel conductance through a slower chemical signalling cascade.
The release of vesicles itself is regulated by two separate NT-sensing mechanisms. One acts locally at the release site in the same millisecond: high NT already in the cleft reduces how many docked vesicles fuse, trimming the current release event. The other is the mGluR pathway described above, which acts more slowly and suppresses the next spike's Ca²⁺ influx rather than the current one.
After release the vesicle stockpile must be replenished. The RRP is refilled from the RP on a timescale of seconds, at a speed that depends on recent calcium history — the synapse replenishes faster when it has been active recently. The RP itself is replenished over minutes via a chemical shuttle from the neighbouring astrocyte, a support cell that recycles the released NT back into a precursor form and ships it back to the presynapse.
The astrocyte is also the gateway to the energy supply. All of the active processes — pumping Ca²⁺ back out, docking vesicles, running the membrane pumps that restore the electrical gradient after each spike — consume ATP, the cell's energy currency. The astrocyte delivers glucose, which sets the rate of ATP replenishment. Under sustained high-frequency firing, this energy demand can outpace supply: ATP falls, the Ca²⁺ pumps slow, residual Ca²⁺ accumulates between spikes, CDI cannot recover, and the VGCCs lock shut. The synapse goes silent — not because it is broken, but because it is protecting itself from the toxic consequence of uncontrolled Ca²⁺ overload, a process known as excitotoxicity. This self-imposed silence is the central emergent behaviour we want to comprehend.
The presynapse does not release blindly. Its behaviour is governed by three interlocking closed loops — the NT loop, the Ca²⁺ loop, and the ATP loop — each operating on a different timescale and each feeding back on the others.
The NT loop is the supply chain of the synapse, operating across all three timescales.
- On the millisecond scale, action potentials trigger Ca²⁺-driven release of NT from the RRP into the cleft. NT in the cleft feeds back on itself within the same millisecond — high cleft concentration suppresses further release, acting as a local brake.
- On the seconds scale, the astrocyte's EAATs actively clear NT from the cleft, and the accumulated clearance load drives the IP3 signal that tells the astrocyte how hard the synapse has been working. EEATs only captures 30% of NT?. The rest is dispersed.
- On the minutes scale, the astrocyte converts the captured glutamate into glutamine and ships it back to the presynapse, which repackages it into vesicles and restores the RP. The RP then feeds the RRP on the seconds scale via Ca²⁺-trace-gated recruitment.
- The loop closes when those recycled vesicles are released again at the next burst.
- The critical asymmetry is timescale: release takes milliseconds, full replenishment takes minutes. Sustained firing depletes faster than the loop can replenish.
The Ca²⁺ loop is the timing and intensity controller of the synapse, operating entirely within the millisecond scale with a slow integration tail that reaches into seconds.
- Ca²⁺ enters through VGCCs at every spike and immediately drives two things in parallel:
- vesicle release (the higher the Ca²⁺, the more vesicles fuse)
- the Tr_Ca trace integrator (which accumulates the recent Ca²⁺ history).
- Ca²⁺ is then cleared by a single slow decay term, returning toward baseline between spikes.
- The loop closes through Tr_Ca: a high trace — reflecting a recent burst — accelerates RP→RRP recruitment in the seconds loop, meaning that Ca²⁺ activity directly speeds up the resupply of the very vesicles that Ca²⁺ triggered.
- The Ca²⁺ loop is also where the eCB retrograde signal from the postsynapse intersects: sustained postsynaptic depolarisation generates eCB on the seconds scale, which travels back and suppresses VGCC opening at the next spike, reducing Ca²⁺ influx. This makes the Ca²⁺ loop the primary interface between the presynapse and the postsynapse — it is the channel through which the receiving neuron tells the sending terminal to ease off.
The ATP loop (not included in the coprehension yet) is the metabolic backbone of the synapse, operating on the minutes scale but with consequences that reach back into every millisecond.
- ATP is consumed continuously by three processes:
- the Na/K-ATPase pump that restores the membrane gradient after each spike (the largest cost, proportional to firing rate)
- the PMCA and SERCA pumps that clear Ca²⁺ from the cytosol
- the molecular machinery that docks and primes vesicles for release.
- These costs accumulate in an ATP demand register that grows with every spike and every Ca²⁺ clearance event in the millisecond loop.
- The creation side of the loop runs on the minutes scale and is entirely astrocyte-dependent. The astrocyte delivers glucose from the bloodstream to both itself and the presynapse. Glucose enters glycolysis and the mitochondrial oxidative phosphorylation chain, producing ATP. The astrocyte also produces lactate as an intermediate, which it shuttles directly to the presynaptic terminal as an additional fuel source. The rate of ATP production is therefore set by glucose availability — the root input of the loop.
- The loop closes through Ca²⁺ clearance. If firing is sustained long enough that ATP demand outpaces glucose-driven production, ATP falls, the PMCA and SERCA pumps slow, and residual Ca²⁺ builds between spikes. This elevated residual Ca²⁺ suppresses CDI recovery, causing VGCCs to gradually lock shut and silencing the synapse. Silence stops consuming ATP, allowing the production side to catch up and ATP to recover. The ATP loop therefore has a natural self-resetting property: the same mechanism that causes silence also triggers recovery.
- The ATP loop intersects both other loops. It shares Ca²⁺ clearance with the Ca²⁺ loop — pump failure is what connects ATP depletion to VGCC inactivation. It shares the glutamine shuttle with the NT loop — when the astrocyte is energy-starved, conversion efficiency falls and RP replenishment slows, making vesicle depletion more severe and prolonged. ATP depletion is therefore the single point of failure that can cascade across all three loops simultaneously, which is why it is the mechanistic basis of excitotoxic protection.
VGCC Tuning
Short, medium and long time scale
- The Short-Term Mechanism: Local CDI
On the millisecond scale, CDI is "fast." Each VGCC is physically coupled to a calcium-sensing protein called Calmodulin (CaM).
- When a single channel opens, the
Ca^{2+}concentration in the immediate vicinity (the nanodomain) can reach10–100 \mu M. - This binds to the CaM "sensor," which flips the channel shut.
- The Result: This limits the duration of the current
Ca^{2+}influx, acting as a high-pass filter.
- When a single channel opens, the
- The Medium-Term Mechanism: Bulk Accumulation
This is where your ATP loop and Ca2+ loop intersect. If the firing frequency is high, or if the ATP-dependent pumps (PMCA/SERCA) are slowing down, the "bulk"
Ca^{2+}in the terminal does not return to baseline between spikes. - Cumulative CDI: As residual
Ca^{2+}builds up in the terminal (Tr\_Cain your model), the CaM sensors on the VGCCs stay partially "primed" or occupied.The- Effect: This means when the next action potential arrives, the channels are already in a semi-inactivated state. Fewer channels are "available" to open, and those that do open close faster.
- Timescale: This operates on the scale of hundreds of milliseconds to seconds, effectively mapping the decay curve of your calcium clearance pumps.
- Modulation by the "State" of the Channel
In the minutes and beyond category, the accumulation of
Ca^{2+}changes the structural landscape of the VGCCs through two medium-term signals:- A. The "Clogged" Channel Signal (Minutes)
If
Ca^{2+}accumulation is high enough to keep CDI active for a prolonged period (as in your "self-imposed silence" scenario), the channel spends too much time in the inactivated state.- Ubiquitination: Inactivated channels are more susceptible to being tagged by E3 ubiquitin ligases (like Nedd4-1).
- Elimination: Once tagged, they are endocytosed (removed from the membrane). This is a medium-term "down-scaling" to prevent excitotoxicity.
- B. The Calcineurin Pathway (Minutes to Hours)
Accumulated
Ca^{2+}activates- Calcineurin (PP2B), a phosphatase.Calcineurin dephosphorylates the VGCCs and their anchoring proteins (like RIM).
- This physically "loosens" the channels from the Active Zone. They drift away from the release sites, meaning even if they do open, they are too far away from the vesicles to trigger release.
- A. The "Clogged" Channel Signal (Minutes)
If
- Modeling Summary for your Loops
If you are building this into your simulation, the Availability (
A) of VGCCs can be modeled as a function of both the instantaneous spike and the integrated trace:$A = (1 - CDI_{fast}) \times (1 - f(Tr\_Ca))$- Short term:
CDI_{fast}resets (mostly) between spikes if pumps are healthy. - Medium term:
f(Tr\_Ca)grows as ATP drops, locking the "Availability" to near zero. - Long term: If
f(Tr\_Ca)stays high for>Xminutes, trigger a decrement in theTotal\_VGCC\_Count(structural elimination).
- Short term:
Long time scale
In the minutes-to-hours range, the presynapse shifts from "gating" (turning existing channels on/off) to remodeling (changing the physical number of channels). This process is governed by a shift from purely electrical signals to biochemical "state" signals.The primary signal that dictates the density of VGCCs at the terminal is the history of the Ca^{2+} trace, specifically mediated through three core molecular pathways:
- The RIM-Binding Protein (RBP) Scaffold (Minutes)
The most immediate way to "add" or "eliminate" channels without synthesizing new protein is through lateral mobility. VGCCs aren't bolted down; they are held in place by a scaffold called the Active Zone (AZ), composed of proteins like RIM and Cast.
- The Signal: High-frequency activity leads to the phosphorylation of RIM.
- The Action: This alters the "slots" available for VGCCs. If RIM is phosphorylated or degraded due to over-activity, it loses its grip on the channel. The VGCC then drifts out of the Active Zone into the "perisynaptic" space.
- The Scale: This happens over 5–30 minutes. The channel is still on the membrane, but it's no longer near the vesicles, effectively "eliminating" its influence on neurotransmitter release.
- Ubiquitin-Mediated Endocytosis (Minutes to Hours)
If the "silence" you described in the ATP loop persists, the cell moves from drifting channels to actually removing them from the surface.
- The Signal: Ubiquitin ligases (like Nedd4). These enzymes are often activated by prolonged high internal
Ca^{2+}or metabolic stress. - The Action: They tag the VGCC protein with a "trash me" label (ubiquitin). This triggers endocytosis, where the membrane folds inward and swallows the channel, moving it into an internal vesicle for degradation.
- The Purpose: This is the ultimate "excitotoxic brake." If the ATP loop can’t recover, the cell physically reduces its capacity for
Ca^{2+}entry to prevent permanent damage.
- The Signal: Ubiquitin ligases (like Nedd4). These enzymes are often activated by prolonged high internal
- Homeostatic Scaling & Gene Expression (Hours to Days)
When the "silence" lasts for a long time, the neuron assumes the synapse is underperforming and needs more "ears."
- The Signal: Nuclear factor of activated T-cells (NFAT) or CREB. These are transcription factors that reside in the synapse but travel to the nucleus when
Ca^{2+}levels stay low for too long. - The Action: The nucleus "shships" more VGCC mRNA and protein (specifically the
\alpha_1subunit) back down the axon to the terminal. - The Scale: This is the "Minutes and Beyond" territory. It is a slow, structural increase in the total number of channels to restore firing to a baseline level.
- The Signal: Nuclear factor of activated T-cells (NFAT) or CREB. These are transcription factors that reside in the synapse but travel to the nucleus when
- Summary of the "Minutes" Signal Logic
In your three-loop model, the ATP loop is likely the master regulator of these signals:
- Low ATP/High Residual
Ca^{2+}(Short term): Causes CDI (channels lock shut). - Persistent
Ca^{2+}Overload (Minutes): Activates Ubiquitin ligases\rightarrowPhysical removal of VGCCs (Elimination). - Chronic Silence/Low
Ca^{2+}Flux (Hours): Triggers Homeostatic Scaling\rightarrowTrafficking of new VGCCs to the terminal (Addition).
- Low ATP/High Residual
Behaviors:
— ms:
- AP fires → membrane jumps to peak, decays toward rest (Na/K-ATPase)
- ATP cost charged per AP (Na/K-ATPase recharge)
- Ca²⁺ enters via VGCCs, gated by CDI, eCB, and mGluR suppression
- Ca²⁺ buffered by calbindin / calmodulin (fast capture, slow release)
- Ca²⁺ cleared by NCX (always), PMCA and SERCA (ATP-dependent)
- ATP cost charged per unit Ca²⁺ extruded by PMCA and SERCA
- SERCA loads Ca_ER store as a side-effect of clearance
- CDI rises with Ca²⁺ — only during spike (channels open and Ca²⁺ entering)
- CDI recovers every ms — rate suppressed when Ca²⁺ is high (self-locking)
- Ca²⁺ trace (Tr_Ca) integrates every ms, including between spikes
- Vesicles release from RRP — driven by Ca²⁺ Hill sensor, suppressed by NT_cleft
- NT added to cleft
- NT_released_this_window accumulates (feeds mGluR and IP3 in seconds loop)
- NT passively diffuses out of cleft (physical, not astrocyte)
- Observed behaviors: -- STD: exhaustion of NT momentarly stops presynapse from releasing NT -- STP: Ca2+ left in the presynapse beteween spikes primes next NT release.
— seconds:
- Astrocyte EAATs actively clear 30% of remaining NT_cleft
- IP3 integrates NT_released_this_window (cumulative burst load)
- If IP3 exceeds threshold → astrocyte Ca²⁺ wave triggered
- mGluR autoreceptor activation updates from NT_released_this_window
- eCB retrograde signal updates from V_post history (postsynaptic input)
- RP → RRP recruitment runs (rate gated by Tr_Ca, costs ATP)
- NT_released_this_window resets to zero
— mins:
- ATP_demand (accumulated from ms loop) reduces ATP_level
- ATP_demand resets to zero
- Glucose level sets metabolic health and conversion_efficiency
- conversion_efficiency gates glutamine shuttle throughput
- Glutamine shuttle refills N_RP from astrocyte store
Semplified comprehension:
In this comprehension, we decide to simplify:
- The VCGG are active while the AP is active, we do not comprehend the Voltage increase and decay
- We do not comprehend the ATP
- We do not comprehend CDI, we check just for Ca2+ concentration
- We do not comprehend mGlur, we check for the concentration of NT in the cleft
- We do not comprehend Ca2+ buffering
- We do not comprehend PMCA, NCX, and SERCA, we comprehend Ca2+ clearing as a slow process
- We do not comprehend vesicles, we comprehend them as processes releasing NT, fast, mediumness and slow based on conditions
The simplification impies that:
- Removing CDI and mGluR means Ca²⁺ concentration and NT in the cleft are now the only two conditions controlling release rate.
- Removing ATP removes the metabolic silencing cascade entirely. The mins behavior now only does one thing: replenish the NT reserve. If we want the synapse to still be able to fail under sustained firing, the mechanism would have to come from NT depletion alone (RP exhausted, nothing to replenish) rather than from pump failure and Ca²⁺ accumulation.
- "Ca²⁺ cleared slowly" replaces PMCA, NCX, and SERCA with a single exponential decay. This means Ca²⁺ will still accumulate under high firing if the decay is slow relative to the spike rate, which preserves some of the residual-Ca²⁺ dynamic even without the full pump machinery.
Soma
Discursive description:
The soma is the cell body of the neuron — a roughly spherical structure, typically 10 to 30 micrometres across, that sits at the convergence point of all dendritic branches and at the origin of the axon. It is the decision-making centre of the neuron: its job is to continuously monitor the summed electrical input arriving from the dendrites and decide, moment by moment, whether that input is strong enough to warrant sending a signal forward. That decision takes the form of an action potential — a brief, explosive electrical event that propagates down the axon to the next neuron in the circuit and simultaneously backward up the dendrites as the bAP that enables postsynaptic plasticity.
The soma receives VDB — the summed dendritic potential — as a continuous input. This potential reflects the aggregate activity of every active spine on every dendritic branch, weighted by the electrical properties of each branch. The soma integrates this input across time through its own membrane capacitance: it accumulates charge when depolarising currents arrive and loses charge continuously through passive membrane leak. The result is a somatic membrane potential, VSOMA, that rises when dendritic input is strong and sustained, and falls when input weakens or stops. VSOMA is not a simple sum of inputs — it is a leaky integrator, always decaying toward rest, always requiring ongoing input to stay elevated.
While Na+ enter K+ exit. In order to spike, the flux of Na+ entering must be grater than K+ exiting. Timing andquantity is also important.
The critical site of decision is not the soma body itself but the axon hillock — the narrow region where the soma tapers into the beginning of the axon. The axon hillock has the lowest threshold for firing of any part of the neuron, because it has the highest density of voltage-gated sodium channels (VGSC). These channels are sensitive to voltage: when VSOMA at the hillock crosses the firing threshold — typically about 15 millivolts above the resting membrane potential — they open explosively, allowing a massive inward rush of sodium (Na+) that drives VSOMA rapidly to its peak. This is the action potential. It is an all-or-nothing event: once the threshold is crossed, the AP fires to its full amplitude regardless of how far above threshold the triggering input was. The size of the AP does not encode the strength of the input — only whether it was strong enough to cross the threshold at all.
Immediately after firing, the soma enters a refractory period. The same sodium channels that opened to produce the AP become inactivated — they cannot reopen until the membrane has repolarised past its resting level, which requires the delayed activation of potassium channels that pull VSOMA below rest into a brief hyperpolarisation. During this absolute refractory period, no input, however strong, can trigger another AP. During the subsequent relative refractory period, firing is possible but requires a stronger-than-normal input because the membrane is recovering. This refractory mechanism sets the maximum firing rate of the neuron and ensures that APs are discrete, separated events rather than a continuous depolarisation.
The reason the pump isn't the "timer" for the refractory period is scale. A single action potential only changes the internal sodium concentration by a fraction of 1% (approx. 0.0001 mM). The neuron does not need to "pump out" that sodium to fire again. It has enough "buffer" to fire hundreds or even thousands of times before the internal sodium concentration becomes a problem. Peer Correction: If the neuron had to wait for the pump to reset the concentration before every spike, our brains would run at about 1 Hz (1 spike per second) instead of 100–500 Hz. The pump is the "slow recharger," not the "instant reset."
The metabolic cost of all this activity falls heavily on the soma. Every action potential disturbs the sodium and potassium gradients across the entire soma membrane — sodium rushes in during the rising phase, potassium rushes out during repolarisation. The Na/K-ATPase pump must then restore these gradients by actively moving three sodium ions out for every two potassium ions in, at the cost of one ATP molecule per pump cycle. At high firing rates this cost is substantial — a neuron firing at 100 Hz consumes ATP at a rate that would exhaust its local reserves in seconds without continuous resupply. The astrocyte network surrounding the soma provides this supply through glucose delivery and lactate shuttling, making the soma's ability to sustain firing directly dependent on the metabolic health of its supporting glial environment.
The soma also integrates neuromodulatory signals. Receptors on the somatic membrane respond to dopamine, serotonin, acetylcholine, and other modulatory transmitters that arrive not from specific synapses but diffusely from distant projection neurons. These signals do not directly trigger APs — they adjust the threshold, the gain, and the temporal dynamics of the soma's integrative process. A dopamine signal might lower the firing threshold, making the neuron more likely to fire in response to the same dendritic input. A serotonin signal might increase the afterhyperpolarisation, reducing the maximum firing rate. These modulatory influences are the mechanism through which global brain states — arousal, attention, motivation, stress — shape the input-output relationship of individual neurons. They are not modelled in the current simplified framework but represent an entire layer of regulation that sits above the three-loop structure of the tripartite synapse.
The action potential the soma generates has two destinations. Forward, it travels down the axon to the presynaptic terminal of the next neuron, where it will trigger the calcium influx and vesicle release that we have already modelled as the presynaptic AP. Backward, it propagates up all dendritic branches as the bAP, arriving at every postsynaptic spine and providing the postsynaptic depolarisation that enables NMDA coincidence detection. The soma is therefore simultaneously the output of the dendritic integration process and the source of the feedback signal that enables plasticity at every spine that contributed to its firing. It is both the conclusion of one cycle and the beginning of the next.
The soma does not fire randomly or continuously. Under no input it sits at rest, its membrane potential held near -70 mV by the balance of passive leak and active pump activity. Under weak sustained input it may oscillate just below threshold, generating subthreshold oscillations that modulate its sensitivity without triggering APs. Under strong sustained input it fires repetitively at a rate that reflects the intensity of that input — stronger input produces higher firing rates, up to the limit set by the refractory period. Under brief strong input it fires a single AP and then returns to rest. The relationship between input intensity and output firing rate — the neuron's input-output curve, or f-I curve — is one of the most fundamental characterisations of a neuron's computational properties, and it is shaped by the properties of every channel on the somatic membrane.
The soma is therefore not a simple threshold device. It is a dynamic integrator with memory encoded in its current membrane potential, a nonlinear decision mechanism encoded in its channel kinetics, a refractory mechanism that shapes its temporal output, and a metabolic dependence that links its firing capacity to the health of its local environment. It is, in miniature, a complete signal processing unit — and the action potential it produces is the one binary output that all of this continuous analogue computation ultimately reduces to.
Event Time Scale Responsible Mechanism ───────────────────────────────────────────────────────────────── Resting at -70 mV steady Leak channels + pumps (balance) ↓ Depolarization to -50 mV ~1-2 ms Na⁺ enters (VGSCs open) ↓ Repolarization to -70 mV ~1-2 ms K⁺ exits (VG K⁺ channels open) ← NOT pumps! ↓ After-hyperpolarization ~5-20 ms K⁺ channels still open ↓ Return to exact -70 mV ~100-1000 ms Na⁺/K⁺ pumps restore gradients
Simplified comprehension:
In this model we decide to simplify:
- We do not model the axon hillock as a separate compartment — threshold crossing is computed directly from VSOMA
- We do not model neuromodulatory inputs — threshold and gain are fixed parameters
- We do not model subthreshold oscillations — VSOMA is a simple leaky integrator
- We do not model somatic ATP
The simplifications imply that:
Removing the axon hillock as a separate compartment means the threshold comparison is applied directly to VSOMA rather than to a spatially distinct zone with its own channel density. In biology the hillock has a lower threshold than the soma body because of its higher Na⁺ channel density — this gradient is absent here. A single fixed threshold applied to VSOMA is a reasonable approximation for a single-compartment model, but it means the model cannot capture phenomena that depend on the hillock's spatial separation from the dendritic integration zone, such as the ability of strong distal dendritic inputs to bypass somatic inhibition.
Removing neuromodulatory inputs means the threshold and gain of the soma are fixed across the entire simulation. In biology dopamine, serotonin, and acetylcholine continuously adjust VSOMA_threshold and the shape of the f-I curve in response to behavioural state. A neuron in an attentive animal fires more readily to the same input than the same neuron in a drowsy animal. This state-dependence is entirely absent — the soma responds identically to a given VDB at all times.
Removing subthreshold oscillations means VSOMA behaves as a simple leaky integrator between APs. In some neuron types, voltage-gated channels produce rhythmic subthreshold fluctuations that bias the timing of AP generation toward specific phases of network oscillations. These are not modelled — VSOMA decays smoothly toward rest between threshold crossings.
ATP is a simplification of convenience — at this stage we do not comprehend the total metabolic load.
Dendritic-branch
Discursive description:
The dendrite is the receiving arm of a neuron — a long, branching extension of the cell body whose job is to collect the electrical signals generated by postsynaptic spines, integrate them in space and time, and route their combined effect toward the soma, where the decision to fire an action potential is made. A single dendritic branch can be thought of as a shared electrical highway: dozens to hundreds of postsynaptic spines line its length, each one a private compartment where synaptic signals are first detected, and the dendrite shaft is the common conductor that carries all of their contributions forward.
Each spine sits along the branch and generates a small electrical signal — an excitatory postsynaptic potential, or EPSP — whenever its AMPA and NDMA receptors are activated by neurotransmitters from the presynapse. This EPSP spreads from the spine head through the narrow spine neck and into the dendrite shaft, where it joins a shared pool of electrical activity. The spine neck is not a neutral conduit — it has electrical resistance that attenuates and slows the signal as it passes through, and its geometry can change with synaptic activity. A wider, shorter neck passes the EPSP more faithfully; a narrower, longer neck attenuates it more severely. This geometry is one of the mechanisms through which plasticity expresses itself physically: LTP widens the neck, making a strengthened synapse electrically closer to the dendrite.
Once in the shaft, EPSPs from different spines summate. If two spines fire close together in time, their EPSPs overlap and their combined depolarisation is larger than either alone — this is temporal summation. If two spines fire simultaneously but are located close together along the branch, their EPSPs also overlap in space before they decay — this is spatial summation. The dendrite is therefore performing a continuous integration across both time and space, weighting each spine's contribution by how recently it fired and how well its signal survived the journey through the neck and along the shaft.
The shaft itself is passive in this model — it conducts electrical signals without amplifying them. The key property of a passive cable is the membrane time constant: how long a voltage change persists before leaking back to rest through the membrane. A long time constant means EPSPs linger and are more likely to overlap with subsequent arrivals, broadening the temporal window for summation. A short time constant means only very precisely timed inputs summate, sharpening the temporal selectivity of the branch. The length constant — how far a signal travels along the shaft before decaying to a fraction of its original amplitude — sets the spatial window: spines farther from the soma contribute a smaller fraction of their EPSP to the somatic potential than nearby spines.
In the full biological model, the dendrite is far from passive. Voltage-gated sodium, potassium, and calcium channels are distributed throughout the dendritic shaft and can generate local regenerative events called dendritic spikes — brief, locally amplified depolarisations that boost the signal and ensure it reaches the soma with sufficient strength. Dendritic spikes give individual branches a degree of computational independence: a branch can, under some conditions, generate a strong enough local event to drive somatic firing even when other branches are quiet. This makes the dendrite not just a wire but a computational unit in its own right. However, in the simplified passive model we adopt here, these active conductances are not included — the shaft sums and attenuates, and nothing more.
The soma sits at the convergence point of all dendritic branches. It continuously integrates the summed depolarisation arriving from the dendrites and compares it against a threshold at the axon hillock — the narrow junction where the soma meets the axon, and the site with the highest density of voltage-gated sodium channels in the neuron. When the summed input crosses this threshold, an action potential is triggered. This AP propagates forward down the axon to the next neuron, and simultaneously backward up all dendritic branches as a back-propagating action potential, or bAP.
The bAP is one of the most important signals in the postsynaptic system. It travels from the soma back toward every spine on every branch, carrying the information that the neuron has just fired. At each spine it arrives as a brief, strong depolarisation — in the full biological system its amplitude decays with distance from the soma, so distal spines receive a weaker bAP than proximal ones. This attenuation is not merely a physical limitation: it is a functional gradient that makes the synapse's location on the dendrite matter for plasticity. A distal spine must generate a stronger local AMPA signal to achieve the coincidence needed for LTP, because the bAP it receives is weaker. A proximal spine achieves coincidence more easily because it receives a stronger bAP. Dendritic location is therefore a form of synaptic weighting that is built into the geometry of the cell rather than into the receptor count.
The bAP is the bridge that closes the loop between the postsynapse and the dendrite. Without it, the NMDA coincidence gate at each spine can only be opened by local AMPA depolarisation — which is rarely sufficient alone to fully clear the magnesium block. With the bAP, any spine that has NT in its cleft at the moment the neuron fires receives the full coincidence signal: NT from the presynapse and depolarisation from the soma simultaneously, opening the NMDA gate and allowing the calcium surge that drives plasticity. The bAP is how the neuron reports its own firing back to the very synapses that contributed to it, enabling each synapse to assess whether its own contribution was relevant to the outcome.
The dendrite therefore runs three interlocking processes across its timescales. On the millisecond scale, it continuously integrates arriving EPSPs and distributes the bAP to all spines. On the seconds scale, it does not itself perform any active computation — the integration is purely electrical and instantaneous relative to the slower processes happening in the spines and at the soma. On the minutes to hours scale, structural changes driven by plasticity — spine neck widening under LTP, spine retraction under LTD — alter the dendritic geometry and therefore the weighting of individual spines in the summation. The dendrite learns not by changing its own proteins but by changing its shape.
Simplified comprehension:
In this model we decide to simplify:
- We model a single dendritic branch, not a full dendritic tree
- We do not model the spine neck geometry or its resistance — EPSPs pass from spine to dendrite without attenuation
- We do not model active dendritic conductances — the shaft is a passive cable with no dendritic spikes
- We do not model bAP distance attenuation — all spines receive the bAP at full amplitude regardless of their position
- We do not model structural plasticity — spine neck widening and retraction are not implemented
The simplifications imply that:
- Removing spine neck resistance means all spines contribute equally to V_dend regardless of their geometry or location. The physical basis of synaptic weighting by dendritic position is lost. All EPSPs are treated as equivalent inputs to the shared pool.
- Removing active conductances means the dendrite cannot generate dendritic spikes. Integration is nearly linear — two spines together produce exactly twice the VDB of one spine alone. There is no threshold event within the dendrite itself, only at the soma.
- Removing bAP attenuation means all spines have equal access to the coincidence signal regardless of distance from the soma. Proximal and distal synapses have identical plasticity thresholds. The functional gradient that makes dendritic location matter is absent.
- Removing structural plasticity means the geometry of the dendrite is fixed. LTP and LTD change AMPA receptor density at each spine but do not change how well those spines couple electrically to the dendrite. The structural component of long-term potentiation — which in biology is arguably more important than the receptor component for sustained changes — is not captured.
The only behavior we model:
- Integrations of spine EPSPs into VDB
- Uniform bAP distribution to all spines on soma firing. In this case the dendrites acts as a cable, relaying the bAp to Postsynapse. bAp arrives here and directly to each spine, no distance from SOMA and attenuation.
Postsynapse
Discursive description:
The postsynapse is the receiving terminal of a neuron — a specialised patch of membrane on the surface of a dendrite, sitting directly across the synaptic cleft from the presynapse. Its job is to detect the neurotransmitters (NT) released by the presynapse, convert that chemical signal back into an electrical response, and decide — based on the history and pattern of that activity — whether to strengthen or weaken the connection for the future.
To do this, the postsynapse maintains two types of receptor on its membrane surface. AMPA receptors are the fast responders: when NT binds them, they immediately open and allow sodium ions to rush in, raising the local membrane potential (V_post). NMDA receptors are the coincidence detectors: they can only open fully when two conditions are simultaneously true — NT must be present in the cleft, and the membrane must already be strongly depolarised. Under resting conditions a magnesium ion physically plugs the NMDA channel from the inside, blocking calcium entry. Only a sufficiently large depolarisation can eject this plug. This dual requirement makes NMDA receptors the central logic gate of the postsynapse.
The depolarisation that clears the NMDA block can come from two sources acting together. Local AMPA activation raises V_post from incoming NT. A back-propagating action potential (bAP) — an electrical echo of the postsynaptic neuron's own firing that travels backward up the dendrites from the cell body — provides an independent boost. When both arrive simultaneously, V_post reaches its maximum and the NMDA gate opens fully. When only one arrives, or when they arrive at different times, the gate stays partially or fully blocked. This coincidence detection is what gives the postsynapse its ability to distinguish meaningful coordinated activity from random noise.
When the NMDA gate does open, calcium (Ca²⁺) surges into the postsynaptic spine. The size of this surge is the key signal. A large surge — produced by strong, well-timed coincidence — activates molecular machinery that inserts more AMPA receptors into the membrane, making the synapse more sensitive to future NT release. This is long-term potentiation, or LTP: the postsynapse remembers that this connection was recently successful and strengthens it. A weak or poorly timed surge — produced when the presynapse fired but the postsynaptic neuron was not ready — activates a different pathway that removes AMPA receptors, weakening the connection. This is long-term depression, or LTD. The amplitude of Ca²⁺ in the spine is therefore the plasticity controller: it translates the timing of electrical events into lasting structural change.
But the postsynapse does not only look forward. If Ca²⁺ in the spine remains elevated for too long — a sign that incoming activity is excessive — the postsynapse synthesises a chemical called an endocannabinoid (eCB) and releases it retrogradely across the cleft. This signal travels backward to the presynapse and suppresses the very channels that are driving the excess activity. This is the postsynapse telling the presynapse to ease off: a retrograde brake, operating on the seconds timescale, that protects the spine from being overwhelmed.
After every response, ion gradients must be restored. Sodium that entered through AMPA receptors must be pumped back out by Na/K-ATPase. Calcium that entered through NMDA receptors must be pumped out of the spine by dedicated calcium pumps. Both processes consume ATP continuously, and their cost scales directly with how active the synapse has been.
The ATP supply comes from the same astrocyte that serves the presynapse — a shared glucose budget that both sides draw from simultaneously. Under sustained high-frequency activity, this shared supply can be exhausted. When postsynaptic ATP falls, the calcium pumps slow and Ca²⁺ begins to accumulate in the spine even between genuine coincidence events. This accumulation looks, to the postsynapse, indistinguishable from real overactivity: the eCB threshold is crossed, the retrograde signal fires, and the presynapse is silenced — not because it was genuinely excessive, but because the postsynapse has lost the ability to clear calcium fast enough to distinguish signal from noise. This false trigger is a desperate survival mechanism. By silencing the presynapse, NT input stops, NMDA gates close, the calcium load drops, the pumps have a chance to recover, and the synapse pulls back from the edge of excitotoxic collapse.
Like its presynaptic partner, the postsynapse is governed by three interlocking loops—the V_{post} loop, the Ca^{2+} loop, and the ATP loop—operating across three distinct timescales.
The Critical Connection with the presynapse: The system is beautifully asymmetric. While the presynapse is built to supply signal, the postsynapse is built to filter it.
The V_{post} Loop: The Fast Gatekeeper (Milliseconds)
This is the primary electrophysiological response, where chemical signals are converted back into electricity.
-
Activation: When NT arrives in the cleft, it binds to AMPA receptors. These act as the primary current drivers. If
NT_cleftis Full and receptors are not in a Desensitization state, theNa^{+}influx causes the local membrane potential (V_{post}) to rise steeply. -
The bAP Feedback: The postsynapse does not work in isolation. It receives a back-propagating Action Potential (bAP)—an electrical "echo" sent from the cell body whenever the neuron fires.
-
Coincidence Logic: On this millisecond scale, the loop computes a logical AND operation. If local AMPA-driven depolarization coincides with a somatic bAP, the total
V_{post}becomes Full. This massive depolarization is the only thing strong enough to kick the magnesium "plug" out of the NMDA receptors, allowing the next loop to begin.
The Ca^{2+} Loop: The Plasticity Controller (Seconds)
This loop translates electrical timing into biological "memory."
-
The NMDA Gate:
Ca^{2+}entry is strictly gated by the NMDA receptor. Unlike the presynaptic VGCCs (which open with any spike), the NMDA channel only opens if it senses both NT (from the presynapse) and highV_{post}(from the bAP). -
Signaling Fate (LTP/LTD): The amplitude of the
Ca^{2+}surge determines the synapse’s fate. A Full surge (perfect coincidence) triggers LTP, signaling the astrocyte to help strengthen the synapse. A Medium or poorly timed surge triggers LTD, weakening the connection. -
Retrograde Signaling (eCB): If
Ca^{2+}levels remain high for too long, the postsynapse synthesizes endocannabinoids (eCB). This signal travels backward across the cleft to tell the presynapse to stop sending NT. This is the primary safety valve that prevents the postsynapse from being overwhelmed.
The ATP Loop: The Metabolic Backbone (Minutes)
This is the "Hidden Master" that determines if the other two loops are allowed to function.
-
The Cost of Logic: The postsynapse is metabolically expensive. The
Na/Kpumps must work constantly to reset theV_{post}gradient, and the PMCA pumps must use ATP to flush out theCa^{2+}that entered through NMDA channels. -
The Astrocyte Bridge: The astrocyte provides the glucose required to replenish ATP. It also performs a "janitorial" service: it clears excess Potassium (
K^{+}) and Glutamate from the cleft. If the astrocyte is starved of glucose, the ATP_level_post drops to Empty. -
The False Trigger (Excitotoxic Protection): When ATP fails, the
Ca^{2+}pumps stop. Even without an NMDA surge,Ca^{2+}begins to "leak" and accumulate in the spine. This creates a False Trigger: the highCa^{2+}level initiates eCB synthesis, silencing the presynapse even though there was no "real" signal. This is a desperate survival mechanism; by tricking the presynapse into silence, the postsynapse stops the influx of ions and buys time for its ATP levels to recover.
The failure of the ATP loop in the postsynapse is arguably more dangerous; if the postsynaptic pumps fail and the eCB "False Trigger" doesn't fire, the spine will literally digest itself from Ca^{2+} overload.
Behaviors:
— ms:
- NT arrives in cleft → AMPA receptors bind NT, gated by Desensitization_level
- V_post rises with AMPA conductance, decays passively each ms
- bAP arrives → V_post receives additional depolarisation boost
- NMDA gate checks coincidence: NT_cleft AND V_post both non-zero
- Ca²⁺ enters spine via NMDA — amount determined by NT_cleft × Mg_block_removal
- Ca²⁺ cleared slowly from spine (single decay term, ATP detail not modelled)
- V_post history updated every ms (rolling buffer, feeds seconds loop)
- Desensitization_level rises with NT_cleft exposure, recovers during silence
- ATP cost charged per V_post level (Na/K-ATPase recharge, continuous)
- ATP cost charged per unit Ca²⁺ cleared (PMCA cost, continuous)
— seconds:
- Ca_post_history computed (2 s rolling mean of Ca_post)
- eCB synthesised when Ca_post_history exceeds threshold
- eCB_level decays when Ca_post_history falls below threshold
- eCB_level written → read by presynapse as retrograde brake on VGCCs
- Ca_post_history compared to LTP/LTD thresholds → plasticity tag set
- Desensitization recovery continues passively
— mins:
- ATP_demand_post (accumulated from ms loop) reduces ATP_level_post
- ATP_demand_post resets to zero
- Glucose level (shared with presynapse) sets ATP_level_post
- If ATP_level_post low → Ca²⁺ clearance slows → false eCB trigger risk
- If Plasticity_LTP tagged AND ATP_level_post not empty → AMPA density increases
- If Plasticity_LTD tagged → AMPA density decreases
- AMPA density feeds back into receptor_conductance ceiling for next cycle
Simplified comprehension:
In this comprehension we decide to simplify:
- We do not model ATP — the postsynaptic energy loop is removed
- We do not model Desensitization_level — receptor availability is assumed constant
- We do not model Ca²⁺ clearance detail — Ca_post decays with a single slow term
The simplification implies that:
- Removing ATP removes the false eCB trigger mechanism entirely. The retrograde signal remains but it is always genuine — driven by real Ca_post elevation from NMDA coincidence, not pump failure. The synapse cannot enter the excitotoxic protection cascade.
- Removing Desensitization_level means the postsynapse cannot fatigue under sustained NT exposure. Receptor availability is always at maximum, so the tenth burst produces the same AMPA response as the first. This preserves the short-term dynamics of V_post without the adaptation layer.
- Removing Ca²⁺ clearance detail means Ca_post reflects the cumulative history of coincidence events with a single decay constant rather than the interplay of PMCA, NCX speed, and ATP availability. Ca_post will still accumulate under high-frequency coincident firing if the decay is slow relative to the event rate, which preserves the eCB trigger dynamic even without the full pump machinery.
Flussi e chiusure
Flusso da POST a SOMA
- Gli NT che arrivano a BEH-POST-AMPA aprono i AMPA che fa entrare Na che vengono integrati nella POST
- Gli Na nella POST aprono NDMA che fanno entrare Ca2+
- Ca2+ genera VPost nel DB
- L'integrazione di VPost nel DB genera VDB nel SOMA
- L'integrazione di VDB nel SOMA determina AP
- Si aprono i Canali ionici del SOMA, si genera VSOMA e refractory period (emergente)
Flusso da SOMA a POST
bAP
Flusso da SOMA a PRE
AP
Based on the computational model provided, here is the complete breakdown of all simulated behaviors, categorized by functional compartment.
The four pillars
This framework describes a system that is not a static processor, but a living entity that balances high-speed pattern extraction based on expectations with allostatic balancing and physical transformation.
Pillar 1: The Electrical Pillar (The Integration Layer)
- Function & Reason: Pattern Extraction. The neuron acts as a spatiotemporal filter. It integrates thousands of tiny inputs across its dendritic tree (space) and within narrow windows of time. Its "output" is a declaration that a specific relevant pattern has been recognized.
- Timescale: Milliseconds (ms).
- Behaviors: Summation of Excitatory/Inhibitory Post-Synaptic Potentials (EPSPs/IPSPs), the "Tug-of-War" at the soma, and the propagation of the "Success" signal (the Spike).
- Elements Involved: -- Ions: Na+ (The "Yes" current), K+ (The "No/Reset" current). -- Hardware: Dendritic tree (The Space), VGSC/VGKC (The Timers).
Pillar 2: The Metabolic Pillar (The Constraint Layer)
- Function & Reason: Sustainability and Gradient Maintenance. This pillar provides the energy required for all other behaviors. It sets the "Hard Limit" on how much work the neuron can do.
- Timescale: Seconds to Minutes.
- Behaviors: Active transport of ions, ATP production, and "Metabolic Silencing" (shutting down to prevent death when energy is low).
- Elements Involved:
- Molecules: ATP, Glucose, Oxygen.
- Hardware: Na/K-ATPase Pump (the "Battery Recharger"), Mitochondria.
- Constraint: The
Na^+/K^+ratio.
Pillar 3: The Calcium Pillar (The Logic / Information Keeper)
- Function & Reason: Adaptation and Translation. This pillar acts as the "sensor" that monitors electrical activity and translates it into chemical signals. It keeps the "history" of the cell's workload.
- Timescale: Minutes to Hours.
- Behaviors: Homeostatic Scaling (tuning the master volume), Synaptic Plasticity (LTP/LTD), and Gain Control.
- Elements Involved:
- Ions: Calcium (
Ca^{2+}). - Hardware: Somatic VGCCs (L-type), NMDA receptors.
- Software: Calmodulin, CaMKIV (signaling proteins that "count" the calcium).
- Ions: Calcium (
Pillar 4: The Structural Pillar (The Renovation Layer)
- Function & Reason: Physical Transformation. This pillar is the actual rebuilding of the "factory" to change the neuron's fundamental capabilities. It is the physical manifestation of long-term memory and health.
- Timescale: Days to Weeks.
- Behaviors: Axon Initial Segment (AIS) translocation (moving the trigger zone), dendritic branch growth/pruning, and changes in total channel/receptor count via gene expression.
- Elements Involved:
- Structural Proteins: Actin, Microtubules, Ankyrin-G (the "anchor").
- Genetics: mRNA, Ribosomes, Transcription Factors (e.g., CREB).
What is Achieved by This Entity?
By combining these four pillars, the neuron becomes a Non-Static Adaptive Engine:
- Selective Attention: It doesn't just pass signals; it ignores noise and only "speaks" when its specific spatial and temporal requirements are met.
- Self-Regulating Sensitivity: If the patterns it is expecting become too frequent or too rare, the Calcium and Structural pillars adjust the Electrical hardware to find a new "sweet spot."
- Metabolic Wisdom: It balances the "desire" to extract patterns against the "cost" of ATP. It is an engine that tunes itself to be as efficient as possible.
- Hardware-Software Unity: Unlike a computer, where the software cannot change the CPU, the neuron's "software" (the activity patterns) physically rewrites its "hardware" (the pillars) every single day.
This is the portrait of a system that isn't just "running a program"—it is a biological machine constantly sculpting itself to become a better filter for the world it perceives.