Hello,
I have followed the example script comparing `tsodyks_synapse` and `tsodyks2_synapse` models, which can be found here:
https://nest-simulator.readthedocs.io/en/stable/auto_examples/evaluate_tsod…
Using the parameter set for depression instead of facilitation I found that `tsodyks2_synapse` model leads to weird peaks of synaptic currents (at least I would not expect that for short term depression) - during the second stimulation the weight rescaling seems to be shifted by one spike compared to tsodyks_synapse (as if parameter "u" would be updated after rescaling the weight instead of before).
Does anybody know why is there this difference between the two synapse models?
Thank you.
All the best,
PH
Hi Everyone,
Does nest server currently support nestml models? I couldn't find examples in the documentation (even though `nestml-server` binary exists in nest3.8 docker image). Ideally, I would like to run it with MPI too.
I can run a simple example (`python test.py`) with `nest-server` running from a docker container, but the same code fails if I use `nestml-server`:
```
docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` -p 52425:52425 nest/nest-simulator:3.8 nest-server start
```
works, but
```
docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` -p 52426:52426 nest/nest-simulator:3.8 nestml-server start
```
fails with
```
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 199, in _new_conn
sock = connection.create_connection(
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 789, in urlopen
response = self._make_request(
File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 495, in _make_request
conn.request(
File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 441, in request
self.endheaders()
File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 279, in connect
self.sock = self._new_conn()
File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 214, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fb8b63ea440>: Failed to establish a new connection: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 843, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=52425): Max retries exceeded with url: /exec (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb8b63ea440>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pablo/git/nest-client/test_server.py", line 4, in <module>
response = nsc.from_file('examples/NESTClient_script.py', return_vars='n_events')
File "/home/pablo/git/nest-client/nest_client/nest_client.py", line 68, in from_file
return self.exec_script(script, return_vars)
File "/home/pablo/git/nest-client/nest_client/nest_client.py", line 56, in exec_script
response = requests.post(self.url + 'exec', json=params, headers=self.headers)
File "/usr/lib/python3/dist-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 544, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 657, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=52425): Max retries exceeded with url: /exec (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb8b63ea440>: Failed to establish a new connection: [Errno 111] Connection refused'))
```
The simple python code used is shown below.
```
from nest_client import NESTClient
nsc = NESTClient()
response = nsc.from_file('examples/NESTClient_script.py', return_vars='n_events')
n_events = response['data']
print('Number of events:', n_events)
```
No nestml models are being tested for now because I don't know which functions should be used to generate code with `nest-client` e.g.
```
from pynestml.codegeneration.nest_code_generator_utils import NESTCodeGeneratorUtils
module_name, neuron_model_name, synapse_model_name = \
NESTCodeGeneratorUtils.generate_code_for(
"neuron.nestml",
"synapse.nestml",
post_ports=["post_spikes"],
codegen_opts=codegen_opts
)
```
should be rewritten to use `from nest_client import NESTClient`.
Thanks in advance,
Pablo Alejandro
Dear NEST Users & Developers!
I would like to invite you to our next fortnightly Open NEST Developer Video Conference today
*Monday December 16, at 11:30 CET (UTC+0100).*
As usual, in the Project team round, a contact person of each team will give a short statement summarizing ongoing and planned work in the team and highlight cross-cutting points that need discussion among the teams. The remainder of the meeting we would go into a more in-depth discussion of topics that came up on the mailing list or that are suggested by the teams.
Feel free to join the meeting also if it’s just to bring your own quick questions for direct discussion in the in-depth section.
Agenda
* Welcome
* Review of NEST User Mailing List
* Project team round
* In-depth discussion
The agenda for this meeting is also available online, see https://github.com/nest/nest-simulator/wiki/2024-12-16-Open-NEST-Developer-… <https://github.com/nest/nest-simulator/wiki/2024-12-16-Open-NEST-Developer-…>
Looking forward to seeing you soon!
Cheers,
Dennis Terhorst
Log-in information
We use a virtual conference room provided by DFN <https://www.dfn.de/en/> (Deutsches Forschungsnetz).
You can use the web client to connect. We however encourage everyone to use a headset for better audio quality or even a proper video conferencing system (see below) or software when available.
Web client
* Visit https://conf.dfn.de/webapp/conference/97938800 <https://conf.dfn.de/webapp/conference/97938800>
* Enter your name and allow your browser to use camera and microphone
* The conference does not need a PIN to join, just click join and you’re in.
In case you see a dfnconf logo and the phrase “Auf den Meetingveranstalter warten”, just be patient, the meeting host needs to join first (a voice will tell you).
VC system/software
How to log in with a video conferencing system, depends on you VC system or software.
* Using the H.323 protocol (eg Polycom): |vc.dfn.net##97938800| or |194.95.240.2##97938800|
* Using the SIP protocol:97938800@vc.dfn.de <mailto:97938800@vc.dfn.de>
* By telephone: |+49-30-200-97938800|
For those who do not have a video conference system or suitable software, Polycom provides a pretty good free app for iOS and Android, so you can join from your tablet (Polycom RealPresence Mobile, available from AppStore/PlayStore). Note that firewalls may interfere with videoconferencing in various and sometimes confusing ways.
For more technical information on logging in from various VC systems, please see
http://vcc.zih.tu-dresden.de/index.php?linkid=1.1.3.4 <http://vcc.zih.tu-dresden.de/index.php?linkid=1.1.3.4>
--
Dipl.-Phys. Dennis Terhorst
Coordinator Software Development
Institute for Advanced Simulation (IAS-6)
Computational and Systems Neuroscience
&
JARA-Institute Brain Structure-Function Relationships (INM-10)
Institute of Neuroscience and Medicine
Jülich Research Center, Member of the Helmholz Association
52425 Jülich, Germany
http://www.csn.fz-juelich.de/
Phone +49 2461 61-85062
----------------------------------------------------------------------
Forschungszentrum Jülich GmbH
52425 Jülich
Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
Geschäftsführung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr. Ir. Pieter Jansens
----------------------------------------------------------------------
I have built a nest model with a reverse stdp approach in which with time I'm trying to reduce the spikes in training data which is a normal bearing metal data and then during testing I'll try to test it on a anomalous data which should produce opposite results to that of training data so now firstly I made it in brian and it worked fine but here in nest after training the model when I have to test it then again the synaptic weights are changing which should not happen during testing. In brian I had put the learning rate as 0 thats why it was working fine but in Nest I am not able to find a way to test a model by freezing the weights. So I tried something which I'm not sure is the correct approach so can anyone please review this approach or if suggest a better approach for testing these kind of models.
Also I want to mention one thing that with my current approach the weights are freezing but as I'm assigning input spikes from anomalous signal and start testing, the kernel is getting died which usually happens when there is a some issue in nest network.
nest.ResetKernel()
# Simulation parameters
dt = 0.01 # Simulation time step in ms
nest.SetKernelStatus({"resolution": dt})
N = 16 # Number of neurons
gmax = 3
neuron_params = {
"tau_m": 140.0, # Membrane time constant in ms
"E_L": -70.6, # Resting potential (in mV)
"V_th": -40.4, # Threshold potential (in mV)
"V_reset": -70.6, # Reset potential (in mV)
"V_m":0.0,
}
nest.CopyModel("stdp_synapse_hom", "stdp_synapse_exc", {"weight":gmax,"alpha":1,"Wmax":gmax, "tau_plus": 20.0,"lambda": -0.0005, "mu_minus": 0, "mu_plus": 0})
nest.CopyModel("stdp_synapse_hom", "stdp_synapse_inh", {"weight":-gmax/(N-1),"alpha":1,"Wmax":-gmax, "tau_plus": 20.0,"lambda": 0.005, "mu_minus": 0, "mu_plus": 0})
G_spike_gen = nest.Create("spike_generator", N)
G_input = nest.Create("parrot_neuron", N)
G_hidden = nest.Create("iaf_psc_delta", N,params=neuron_params)
G_output = nest.Create("iaf_psc_delta", 1,params=neuron_params)
S_in = nest.Connect(G_spike_gen, G_input, "one_to_one")
# Connect input to hidden layer with excitatory STDP synapses
S_exc = nest.Connect(G_input, G_hidden,"one_to_one",syn_spec = "stdp_synapse_exc")
# Retrieve the neuron IDs for G_input and G_hidden
input_ids = G_input.tolist()
hidden_ids = G_hidden.tolist()
# Get the existing excitatory connections and extract their source-target ID pairs
exc_connections = nest.GetConnections(G_input, G_hidden)
exc_connection_pairs = set(zip(exc_connections.get("source"), exc_connections.get("target")))
for i in input_ids:
for h in hidden_ids:
if (i, h) not in exc_connection_pairs:
nc1 = nest.NodeCollection([i])
nc2 = nest.NodeCollection([h])
nest.Connect(nc1, nc2, syn_spec= "stdp_synapse_inh")
S_out = nest.Connect(G_hidden, G_output,"all_to_all",syn_spec = {"weight": 40.4/N})
def train_net(signals, spike_tol=0):
output_spike_recorder = nest.Create("spike_recorder")
output_membrane_recorder = nest.Create("voltmeter", 1)
nest.Connect(G_output, output_spike_recorder) # Record output layer spikes
nest.Connect(output_membrane_recorder, G_output, "one_to_one")
while True:
recorder_for_epoch = nest.Create("spike_recorder")
nest.Connect(G_output, recorder_for_epoch)
for signal in signals:
indices, times = process_signal(signal) # Get the indices and times
offset = nest.GetKernelStatus()["biological_time"]
for i in range(N):
times_for_neuron = [t+offset for j,t in enumerate(times) if indices[j] == i]
G_spike_gen[i].set(spike_times = times_for_neuron)
nest.Simulate(len(signal)*(1/SAMPLE_RATE)*1000)
output_spikes_num = len(recorder_for_epoch.get()["events"]["times"])
print("# of output spikes: " + str(output_spikes_num))
del recorder_for_epoch
if output_spikes_num <= spike_tol:
print("Training finished")
break
return output_membrane_recorder, output_spike_recorder
def synapse_freeze():
conn = nest.GetConnections()
sources = conn.get("source")
targets = conn.get("target")
weights = conn.get("weight")
# Store as a list of tuples
connections = list(zip(sources, targets, weights))
# Replace dynamic synapses with static synapses
for s,t,w in connections:
nc1 = nest.NodeCollection([s])
nc2 = nest.NodeCollection([t])
conn_t = nest.GetConnections(nc1,nc2)
model=nest.GetConnections(nc1,nc2).get("synapse_model")
if model=="stdp_synapse_exc":
nest.Disconnect(nc1,nc2,syn_spec = {"synapse_model":"stdp_synapse_exc"})
nest.Connect(nc1,nc2,syn_spec = {"synapse_model":"static_synapse","weight":w})
if model=="stdp_synapse_inh":
nest.Disconnect(nc1,nc2,syn_spec = {"synapse_model":"stdp_synapse_inh"})
nest.Connect(nc1,nc2,syn_spec = {"synapse_model":"static_synapse","weight":w})
print("Switched to static synapses with trained weights.")
def inference(signal):
output_spike_recorder_t = nest.Create("spike_recorder")
output_membrane_recorder_t = nest.Create("voltmeter", 1)
nest.Connect(G_output, output_spike_recorder_t) # Record output layer spikes
nest.Connect(output_membrane_recorder_t, G_output, "one_to_one")
indices, times = process_signal(signal) # Prepare test signal
offset = nest.GetKernelStatus()["biological_time"]
for i in range(N):
times_for_neuron = [t+offset for j,t in enumerate(times) if indices[j] == i]
G_spike_gen[i].set(spike_times = times_for_neuron)
nest.Simulate(len(signal)*(1/SAMPLE_RATE)*1000) # Run simulation
output_spikes_num = len(output_spike_recorder_t.get()["events"]["times"])
print("# of output spikes: " + str(output_spikes_num))
return output_membrane_recorder_t, output_spike_recorder_t
I am currently working on a project involving synaptic weight
normalization using the guidelines provided in the NEST simulator
documentation. I have implemented the normalization process; however, I
encountered some questions that I would appreciate your insights on.
1.
Normalization Value: I found that the normalization value for a neuron
with approximately 190 synapses is around 420, which I do not fully
understand. This looks like the total weight of the neuron synapses. Could
you provide clarification on how the normalisation value is determined?
2.
Simulation State Preservation: I would like to save and restore the
state of synaptic weights to maintain the simulation's behaviour across
sessions. Below is the pseudocode I intend to use:
Save synaptic weights:
w = array of current weights of neuron connections
normalization_factor = sum of absolute weights
if normalization_factor != 0:
normalized_weights = w / normalization_factor
save normalized_weights to file
Load synaptic weights:
read normalized_weights from file
assign loaded weights back to connection
I would like to know if you have any suggestions for improving this
pseudocode or if there are best practices I should consider.
Thank you for your time and assistance. I look forward to your response.
Dear NEST Users & Developers!
I would like to invite you to our next fortnightly Open NEST Developer Video Conference today
*Monday December 2, at 11:30 CET (UTC+0100).*
As usual, in the Project team round, a contact person of each team will give a short statement summarizing ongoing and planned work in the team and highlight cross-cutting points that need discussion among the teams. The remainder of the meeting we would go into a more in-depth discussion of topics that came up on the mailing list or that are suggested by the teams.
Feel free to join the meeting also if it’s just to bring your own quick questions for direct discussion in the in-depth section.
Agenda
* Welcome
* Review of NEST User Mailing List
* Project team round
* In-depth discussion
The agenda for this meeting is also available online, see https://github.com/nest/nest-simulator/wiki/2024-12-02-Open-NEST-Developer-… <https://github.com/nest/nest-simulator/wiki/2024-12-02-Open-NEST-Developer-…>
Today Jessica will be chairing the meeting.
Cheers,
Dennis Terhorst
Log-in information
We use a virtual conference room provided by DFN <https://www.dfn.de/en/> (Deutsches Forschungsnetz).
You can use the web client to connect. We however encourage everyone to use a headset for better audio quality or even a proper video conferencing system (see below) or software when available.
Web client
* Visit https://conf.dfn.de/webapp/conference/97938800 <https://conf.dfn.de/webapp/conference/97938800>
* Enter your name and allow your browser to use camera and microphone
* The conference does not need a PIN to join, just click join and you’re in.
In case you see a dfnconf logo and the phrase “Auf den Meetingveranstalter warten”, just be patient, the meeting host needs to join first (a voice will tell you).
VC system/software
How to log in with a video conferencing system, depends on you VC system or software.
* Using the H.323 protocol (eg Polycom): |vc.dfn.net##97938800| or |194.95.240.2##97938800|
* Using the SIP protocol:97938800@vc.dfn.de <mailto:97938800@vc.dfn.de>
* By telephone: |+49-30-200-97938800|
For those who do not have a video conference system or suitable software, Polycom provides a pretty good free app for iOS and Android, so you can join from your tablet (Polycom RealPresence Mobile, available from AppStore/PlayStore). Note that firewalls may interfere with videoconferencing in various and sometimes confusing ways.
For more technical information on logging in from various VC systems, please see
http://vcc.zih.tu-dresden.de/index.php?linkid=1.1.3.4 <http://vcc.zih.tu-dresden.de/index.php?linkid=1.1.3.4>
--
Dipl.-Phys. Dennis Terhorst
Coordinator Software Development
Institute for Advanced Simulation (IAS-6)
Computational and Systems Neuroscience
&
JARA-Institute Brain Structure-Function Relationships (INM-10)
Institute of Neuroscience and Medicine
Jülich Research Center, Member of the Helmholz Association
52425 Jülich, Germany
http://www.csn.fz-juelich.de/
Phone +49 2461 61-85062
----------------------------------------------------------------------
Forschungszentrum Jülich GmbH
52425 Jülich
Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
Geschäftsführung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr. Ir. Pieter Jansens
----------------------------------------------------------------------
Dear NEST Users & Developers!
I would like to invite you to our next fortnightly Open NEST Developer Video Conference today
*Monday November 18, at 11:30 CET (UTC+0100).*
As usual, in the Project team round, a contact person of each team will give a short statement summarizing ongoing and planned work in the team and highlight cross-cutting points that need discussion among the teams. The remainder of the meeting we would go into a more in-depth discussion of topics that came up on the mailing list or that are suggested by the teams.
Feel free to join the meeting also if it’s just to bring your own quick questions for direct discussion in the in-depth section.
Agenda
* Welcome
* Review of NEST User Mailing List
* Project team round
* In-depth discussion
The agenda for this meeting is also available online, see https://github.com/nest/nest-simulator/wiki/2024-11-18-Open-NEST-Developer-… <https://github.com/nest/nest-simulator/wiki/2024-11-18-Open-NEST-Developer-…>
Looking forward to seeing you soon!
Cheers,
Dennis Terhorst
Log-in information
We use a virtual conference room provided by DFN <https://www.dfn.de/en/> (Deutsches Forschungsnetz).
You can use the web client to connect. We however encourage everyone to use a headset for better audio quality or even a proper video conferencing system (see below) or software when available.
Web client
* Visit https://conf.dfn.de/webapp/conference/97938800 <https://conf.dfn.de/webapp/conference/97938800>
* Enter your name and allow your browser to use camera and microphone
* The conference does not need a PIN to join, just click join and you’re in.
In case you see a dfnconf logo and the phrase “Auf den Meetingveranstalter warten”, just be patient, the meeting host needs to join first (a voice will tell you).
VC system/software
How to log in with a video conferencing system, depends on you VC system or software.
* Using the H.323 protocol (eg Polycom): |vc.dfn.net##97938800| or |194.95.240.2##97938800|
* Using the SIP protocol:97938800@vc.dfn.de <mailto:97938800@vc.dfn.de>
* By telephone: |+49-30-200-97938800|
For those who do not have a video conference system or suitable software, Polycom provides a pretty good free app for iOS and Android, so you can join from your tablet (Polycom RealPresence Mobile, available from AppStore/PlayStore). Note that firewalls may interfere with videoconferencing in various and sometimes confusing ways.
For more technical information on logging in from various VC systems, please see
http://vcc.zih.tu-dresden.de/index.php?linkid=1.1.3.4 <http://vcc.zih.tu-dresden.de/index.php?linkid=1.1.3.4>
--
Dipl.-Phys. Dennis Terhorst
Coordinator Software Development
Institute for Advanced Simulation (IAS-6)
Computational and Systems Neuroscience
&
JARA-Institute Brain Structure-Function Relationships (INM-10)
Institute of Neuroscience and Medicine
Jülich Research Center, Member of the Helmholz Association
52425 Jülich, Germany
http://www.csn.fz-juelich.de/
Phone +49 2461 61-85062
----------------------------------------------------------------------
Forschungszentrum Jülich GmbH
52425 Jülich
Sitz der Gesellschaft: Jülich
Eingetragen im Handelsregister des Amtsgerichts Düren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
Geschäftsführung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr. Ir. Pieter Jansens
----------------------------------------------------------------------
Hello everyone,
I am Shavika Rastogi, a PhD student at the International Centre for
Neuromorphic Systems, Western Sydney University, Australia. I currently use
NEST and NESTML to write and test any arbitrary neuron model. Before
writing my own neuron model, I wanted to test neuron models already
existing in NESTML. I am using NEST and NESTML using docker.
I am running the Izhikevich tutorial available in the documentation (
https://nestml.readthedocs.io/en/latest/tutorials/izhikevich/nestml_izhikev…).
As per this tutorial, we can generate and build code using the following
statement :
"module_name,neuron_model_name=NESTCodeGeneratorUtils.generate_code_for("izhikevich_solution.nestml")"
When I am using this function, I get the following error :
"AttributeError: 'NESTCodeGeneratorUtils' object has no attribute
'generate_code_for'"
Does anyone know whether the generate_code_for() function exists in
the NESTCodeGeneratorUtils package? If not, what could be the alternative
function we can use for generating and building neuron models ?
Thanks in advance.
With Warm Regards
Shavika Rastogi, Research Scholar (Dual Award PhD)
International Centre for Neuromorphic Systems
The MARCS Institute of Brain, Behaviour and Development
Western Sydney University
Sydney, Australia
&
Biocomputation Research Group
University of Hertfordshire, UK
Hello everyone,
quick update on my problem: I was using the latest .nestml models from the
main branch with NESTML version 8.0.0-rc3. There is a slight difference
between these and apparently that caused it.
It works now and I hope everyone has a great weekend.
Kind regards,
Jona