arbor-sim / arbor

The Arbor multi-compartment neural network simulation library.
https://arbor-sim.org
BSD 3-Clause "New" or "Revised" License
107 stars 60 forks source link

[AEP] Structural Plasticity #1889

Closed thorstenhater closed 1 year ago

thorstenhater commented 2 years ago

In order to conduct experiments on long-term learning and structural development of the brain Arbor should support dynamic connectivity.

We would need to wire new synapses (not Gap Junctions for now due to the implications on load balancing) at runtime. Here are some assumptions I'll make for the remainder of this proposal (if users have different need we will try to accomodate, so please comment).

Connectivity

Implementation: Phantom Connections

It is possible to add phantom connections between all sources and targets and edit weights over time. Howevere, this is catastrophic for performance as

  1. the connection table grows as #Sources * #Targets, amortised by storing only the local parts on the source side.
  2. each source emits spikes even over zero weight connections bloating the spike buffer
  3. which needs to be sorted and transmitted to all MPI ranks
  4. and filtered by each target.

In addition we need one spike detector per source location and one synapse per target.

Thus the global spike count grows with the total number of sources S (even if dormant by w=0) and the spike delivery grows with N log(N) (by sorting) where N=S*f and f the mean spiking frequency and T log(N) (by filtering) with T being the target count.

This approach might be simplified by tracking source as one detector per cell, eg at the soma, and its number of active connections. This is a trade-off between fidelity and efficiency to be considered.

We will have to add some runtime support for changing weights and/or parameters, see also #1705.

Implementation: Editing the Connection Table

The connection table is built implicitly by keeping track of deliverable_event = { weight, time, target } and the local targets; so adding entries should be simple. Still needs to edit weight over time. Adding connection should go via the DSL proposed in #418.

Implementation: Finding New Partners

As noted above this will be based on

  1. internal state, like homeostasis rules
  2. stochastic input
  3. distance in space

We have a proposal that cover 2. and 3. in #418. The challenge will be adding

Further a naive implementation scale as N^2, but there should be one in N log(N), see literature. This might be also interesting for #418.

Reading

thorstenhater commented 1 year ago

Hey,

the #1919 PR layed the foundation. We decided offline to make the actual plasticity (ie finding new partners and deleting old ones) part outside of Arbor, since it is usecase specific and/or requires extra facilities like spatial queries. So, for now, this is considered done.