Skip to content

Commit

Permalink
adjustments for Arbor v0.9.0; README update
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubo committed Jan 29, 2024
1 parent 40dc747 commit f51572e
Show file tree
Hide file tree
Showing 11 changed files with 4,893 additions and 4,793 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.so
*.dat
Binary file modified AdEx/adaptation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions AdEx/arbor_adex.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def cell_description(self, gid):
adex.set("tau_w", neuron_config["tau_w"])

decor.paint('(all)', arbor.density(adex))
decor.place('"center"', arbor.spike_detector(v_thresh), "spike_detector")
decor.place('"center"', arbor.threshold_detector(v_thresh), "spike_detector")

decor.place('"center"', arbor.iclamp(stimulus_config["amplitude"]/1e-9), "iclamp")

return arbor.cable_cell(tree, labels, decor)
return arbor.cable_cell(tree, decor, labels)

def event_generators(self, gid):
"""Return event generators on gid."""
Expand Down Expand Up @@ -140,7 +140,7 @@ def main(variant):

context = arbor.context()
domains = arbor.partition_load_balance(recipe, context)
sim = arbor.simulation(recipe, domains, context)
sim = arbor.simulation(recipe, context, domains)

sim.record(arbor.spike_recording.all)

Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# FIPPA: The Functional Interplay between Plasticity Processes on Arbor

The goal of FIPPA is to extend the neural network simulator
The goal of the FIPPA project was to extend the neural network simulator
[Arbor](https://arbor-sim.github.io) by key plasticity processes that
will allow to simulate and analyze the long-term adaptive dynamics of
large-scale, morphologically-detailed neuronal networks.The models
that will be ported and augmented are based on the neuro-theoretical
framework by [tetzlab.com](https://tetzlab.com). These models already
indicated that the interplay between the plasticity processes of
synaptic plasticity, synaptic scaling, and structural plasticity
yields the formation and organization of motor memories.The research
question is how multi-compartment neuron models with detailed synaptic
dynamics can be utilized to improve the performance of such
networks. Our main hypothesis is that the adaptive dynamics on the
network level enforces the specialization of branches by the formation
of synaptic clusters leading to the formation of self-sustaining
long-term memories and an overall increase in storage capacity.
allow to simulate and analyze the long-term adaptive dynamics of
large-scale, morphologically-detailed neuronal networks. The models
were ported and augmented in correspondence to neuro-theoretical
investigations by the [Tetzlaff research group](https://tetzlab.com) at
University of Göttingen.

# Outputs
## Arbor implementations -- FIPPA output

* [Event-driven plasticity](STDP)
* [Spike-timing-dependent plasticity (STDP)](STDP)
* [Spike-based homeostasis](spike_based_homeostasis)
* [Adaptive exponential integrate-and-fire (AdEx) neuron](AdEx)
* [Synaptic tagging and capture (STC) in recurrent networks of point neurons](https://github.com/tetzlab/arbor_network_consolidation)

## Arbor implementations -- based on FIPPA

* Calcium-based synaptic plasticity
* Heterosynaptic calcium-based plasticity in dendrites
* Synaptic tagging and capture (STC) in recurrent networks of morphological neurons
2 changes: 1 addition & 1 deletion STDP/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL := comparison_brian2_arbor.png

BUILD_CATALOGUE_SCRIPT := build-catalogue
BUILD_CATALOGUE_SCRIPT := arbor-build-catalogue

custom-catalogue.so: $(wildcard mechanisms/*.mod)
$(BUILD_CATALOGUE_SCRIPT) custom mechanisms
Expand Down
14 changes: 7 additions & 7 deletions STDP/arbor_lif_stdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, config):
self.the_props = arbor.neuron_cable_properties()
self.the_cat = arbor.load_catalogue("./custom-catalogue.so")
self.the_cat.extend(arbor.default_catalogue(), "")
self.the_props.register(self.the_cat)
self.the_props.catalogue = self.the_cat

self.config = config

Expand Down Expand Up @@ -73,8 +73,8 @@ def cell_description(self, gid):
lif.set("g_reset", neuron_config["g_reset"])
lif.set("g_leak", neuron_config["g_leak"])
lif.set("tau_refrac", neuron_config["tau_refrac"])
decor.paint('(all)', lif)
decor.place('"center"', arbor.spike_detector(v_thresh), "spike_detector")
decor.paint('(all)', arbor.density(lif))
decor.place('"center"', arbor.threshold_detector(v_thresh), "spike_detector")

# plastic excitatory synapse
syn_config_stdp = self.config["synapses"]["cond_exp_stdp"]
Expand All @@ -86,16 +86,16 @@ def cell_description(self, gid):
mech_expsyn_exc.set('Apre', syn_config_stdp["A_pre"])
mech_expsyn_exc.set('Apost', syn_config_stdp["A_post"])
mech_expsyn_exc.set('max_weight', 50)
decor.place('"center"', mech_expsyn_exc, "expsyn_stdp_exc")
decor.place('"center"', arbor.synapse(mech_expsyn_exc), "expsyn_stdp_exc")

# inhibitory synapse
syn_config = self.config["synapses"]["cond_exp"]
mech_expsyn_inh = arbor.mechanism('expsyn')
mech_expsyn_inh.set('tau', syn_config["tau"])
mech_expsyn_inh.set('e', syn_config["reversal_potential"])
decor.place('"center"', mech_expsyn_inh, "expsyn_inh")
decor.place('"center"', arbor.synapse(mech_expsyn_inh), "expsyn_inh")

return arbor.cable_cell(tree, labels, decor)
return arbor.cable_cell(tree, decor, labels)

def event_generators(self, gid):
"""Return event generators on gid."""
Expand Down Expand Up @@ -141,7 +141,7 @@ def main(variant):

context = arbor.context()
domains = arbor.partition_load_balance(recipe, context)
sim = arbor.simulation(recipe, domains, context)
sim = arbor.simulation(recipe, context, domains)

sim.record(arbor.spike_recording.all)

Expand Down
Binary file modified STDP/comparison_brian2_arbor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions set_arbor_env
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Script that sets environment variables required to run custom Arbor installation

# check if PATH exists and set environment variable accordingly
if [[ ! -v PATH ]]; then
export PATH=$(readlink -f ~/arbor_v0.9.0/bin)
else
export PATH=$(readlink -f ~/arbor_v0.9.0/bin):$PATH
fi

# check if LD_LIBRARY_PATH exists and set environment variable accordingly
if [[ ! -v LD_LIBRARY_PATH ]]; then
export LD_LIBRARY_PATH=$(readlink -f ~/arbor_v0.9.0/lib)
else
export LD_LIBRARY_PATH=$(readlink -f ~/arbor_v0.9.0/lib):$LD_LIBRARY_PATH
fi

# check if PYTHONPATH exists and set environment variable accordingly
if [[ ! -v PYTHONPATH ]]; then
export PYTHONPATH=$(readlink -f ~/arbor_v0.9.0/lib/python3.8/site-packages) # or: .../python3.6/..., etc.
else
export PYTHONPATH=$(readlink -f ~/arbor_v0.9.0/lib/python3.8/site-packages):$PYTHONPATH # or: .../python3.6/..., etc.
fi

# set CMAKE_PREFIX_PATH environment variable
export CMAKE_PREFIX_PATH=$(readlink -f ~/arbor_v0.9.0)
2 changes: 1 addition & 1 deletion spike_based_homeostasis/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL := homeostasis.svg

BUILD_CATALOGUE_SCRIPT := build-catalogue
BUILD_CATALOGUE_SCRIPT := arbor-build-catalogue
CONFIG := config.json

homeostasis-catalogue.so: $(wildcard mechanisms/*.mod)
Expand Down
14 changes: 7 additions & 7 deletions spike_based_homeostasis/arbor_homeostasis.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, config, catalogue):
self.the_props = arbor.neuron_cable_properties()
self.the_cat = catalogue
self.the_cat.extend(arbor.default_catalogue(), "")
self.the_props.register(self.the_cat)
self.the_props.catalogue = self.the_cat

self.config = config

Expand Down Expand Up @@ -88,8 +88,8 @@ def cell_description(self, gid):
lif.set("g_reset", neuron_config["g_reset"])
lif.set("g_leak", neuron_config["g_leak"])
lif.set("tau_refrac", neuron_config["tau_refrac"])
decor.paint('(all)', lif)
decor.place('"center"', arbor.spike_detector(v_thresh), "spike_detector")
decor.paint('(all)', arbor.density(lif))
decor.place('"center"', arbor.threshold_detector(v_thresh), "spike_detector")

# plastic synapse
syn_config_homeostasis = self.config["stimulus"]["steady"]
Expand All @@ -98,16 +98,16 @@ def cell_description(self, gid):
mech_expsyn_homeostasis.set('e', syn_config_homeostasis["reversal_potential"])
mech_expsyn_homeostasis.set('dw_plus', syn_config_homeostasis["dw_plus"])
mech_expsyn_homeostasis.set('dw_minus', syn_config_homeostasis["dw_minus"])
decor.place('"center"', mech_expsyn_homeostasis, "expsyn_homeostasis")
decor.place('"center"', arbor.synapse(mech_expsyn_homeostasis), "expsyn_homeostasis")

# static synapse
syn_config = self.config["stimulus"]["varying"]
mech_expsyn_varying = arbor.mechanism('expsyn')
mech_expsyn_varying.set('tau', syn_config["tau"])
mech_expsyn_varying.set('e', syn_config["reversal_potential"])
decor.place('"center"', mech_expsyn_varying, "expsyn")
decor.place('"center"', arbor.synapse(mech_expsyn_varying), "expsyn")

return arbor.cable_cell(tree, labels, decor)
return arbor.cable_cell(tree, decor, labels)

def event_generators(self, gid):
"""Return event generators on gid."""
Expand Down Expand Up @@ -158,7 +158,7 @@ def main(config, catalogue):

context = arbor.context()
domains = arbor.partition_load_balance(recipe, context)
sim = arbor.simulation(recipe, domains, context)
sim = arbor.simulation(recipe, context, domains)

sim.record(arbor.spike_recording.all)

Expand Down
Loading

0 comments on commit f51572e

Please sign in to comment.