Biophysical Neural Network Simulator


<Only Inference>


1. Simulation Run

>> ./home/dkim785/Tools/CUDA/INF_Neuron_Simulatior_HPC/Debug/Run the INF_Neuron_Simulator_HPC


2. Type '8'


3. Run the Matlab Code (/home/dkim785/Tools/CUDA/INF_Neuron_Simulator_HPC/Debug/mass_process_read_potential_2.m


4. Symulation Run and Type '7'


5. You can see the result.


<How to change the parameters?>


1. For the first try, I changed the 'Debug/device2_output_network.txt'.


2. Just copied it, and open.


3. Inside this file, you can see the parameters, and weights.


4. Order is (This neuron's number // 2 // LIF_b // LIF_th // LIF_reset // 20.000000 // LIF_c // LIF_a // -65.060000 // 0.000 // 0.000 ; From, Weight, From, Weight ...)


5. Change the parameters.


6. If it is not work, we should change the weights. (You should learning)


<Learning>


1. Run the INF_Neruon_Simulator_HPC


2. Type '4'


Yun's Matlab Simulator


< Yun's Code>


1. Check the parameters by run model_compare_tuned.m


2. Inside the model_compare_tuned.m code, there is

# STDP, wikipedia

#research #SNN #STDP


Spiking-timing-dependent plasticity(STDP) is biological process that adjusts the strength of connections between neurons in the brain. This process adjusts the connection strengths based on the relative timing of a particular neuron’s output and input spikes. If the input spike from Neuron A occur immediately before that neuron B’s output spike, then that particular input is made somewhat stronger the synapse between Neuron A and Neuron B. If the input spike occur after an output spike, then that particular input is made somewhat weaker. (Wikipedia)


With STDP, repeated presynaptic spike arrival a few milliseconds before postsynaptic spike leads in many synapse types to Long-Term Potentiation (LTP) of the synapses, whereas repeated spike arrival after postsynaptic spikes leads to Long-Term Depression (LTD) of the same synapse. The change of the synapse plotted as a function of the relative timing of pre- and postsynaptic action potentials is called the STDP function or learning window and varies between synapse types.

[image:6F56A2F7-212C-46AE-8AB7-4BB944050328-13930-000260942B8E46BB/STDP_learning_window.JPEG]

Figure 1: Spike-Timing Dependent Plasticity (schematic): The STDP function shows the change of synaptic connections as a function of the relative timing of pre- and postsynaptic spikes after 60 spike parings. Schematically redrawn after Bi and Poo (1998)


When weight increases, the amount of increase is related to the current weight.


<Experimental STDP Protocol>

The paring is repeated for 50-100 times at a fixed frequency (for example 10 Hz). (이것은 Neuron의 firing frequency가 0.5~1kHz쯤 된다는 것인가?) The weight of the synapse is measured as the amplitude (or initial slope) of the postsynaptic potential. 


<Basic STDP Model>

The weight change delta w_j of a synapse from a presynaptic neuron j depends on the relative timing between presynaptic spike arrivals and postsynaptic spikes. Let us name the presynaptic spike arrival times at synapse j by t_j^f where 1, 2, 3, … counts the presynaptic spikes. Similarly, t_i^n with n = 1, 2, 3, … labels the firing times of the postsynaptic neuron. The total weight change delta w_j induced by a stimulation protocol with pairs of pre-and postsynaptic spikes is then (Gerstner and al. 1996, Kempter et al. 1999)

[image:66CCECA4-C660-475A-A1D1-D9C463F5F5AB-13930-000261A3D76D62FE/FC770EDA-98FA-4DD0-B957-A02CFA95AFBC.png]


의문점) 그럼 만약에 postsynaptic spiking 전에 presynaptic spiking이 2번 있었으면 나중의 것으로 생각해서 계산하는 것인가? -> 다양한 버전이 존재한다. 전체를 모두 고려하는 all-to-all 혹은 제일 가까운 애만 고려하는 nearest 같은 것도 존재하고.


where W(x) denotes one of the STDP functions (also called learning window)

A popular choice for the STDP function W(x)

[image:8B313596-6CAB-463B-90BC-635900C43535-13930-000261BA7801BC5F/419F7E0C-D679-4451-9EE3-3D1EAC4D5D64.png]

Which has been used in fits to experimental data (Zhang et al. 1998) and models (e.g, Song et al. .2000). The parameters A_+ and A_- may depend on the current value of the synaptic weight w_j. The time constants are on the order of taw_+ = 10ms and tow_- = 10ms

Xueyuan에게 어떻게 SNN learning을 하는지 물어보고 받은 paper이다. Xueyuan의 paper와 함께 읽으면 될 듯 하다.


간단하게 synaptic plasticity learning에 대해서 말해보면, 사용한 synapse는 더 강화하고, 사용하지 않는 synapse는 약화시키는 것이다. (weight를 통해서) 이것을 time에만 연관시켜서 한 것을Simplified STDP Learning이라고 하는 듯 하다. 여기서는 Memristor의 conductance를 이용하여 구현하였다.

STDP를 어떻게 했는지 보면, 만약 어떤 Neuron에서 spike가 발생한다면, 그 neuron의 dendrite에 spike를 준 synapse들 중 spike를 준 synapse의 weight를 증가시키는 것이다. (일정 기간 내에 spike를 줬어야 한다) weight는conductance를 올리거나 내려버리는 것으로 조절한다. 체크는 여기서는 연속적인 Negative + Positive Pulse를 사용한다. Fig. 2.를 참조하면 됨.

Causality에 대해서도 알아야 하함. 그것은 위에서 보이듯이, Neuron A가 Neuron B에 spike를 준다고 하면, Neuron B가 spike 할 때, Neuron A가 영향을 줬는지가 causality이다. (Cause라는 단어에서 나옴)


Refer the next post '[SNN] How to learning and inference?'

'Research > Spiking Neural Network' 카테고리의 다른 글

[Manual] Yun&Xueyuan's Simulator  (0) 2018.12.02
STDP - Wikipedia  (0) 2018.10.25
[Paper Review] TrueNorth, 2015 - TCAD  (0) 2018.09.26

일단 현재 필요한것만 보기 위해서 앞에서 7페이지만 읽어봄.


Fig. 2.에서 보면, 어떻게 뉴런이 동작하는지에 대해서 나와있다.

1. 이전 Neuron에서 들어온 Spike들을 버퍼에 저장.
2. 1kHz의 Signal(Tick)이 오면 axon으로 spike를 넘긴다.
3. Dendrite와 연결된 axon들이 해당 neuron으로 spike를 넣어준다.
4. Spike를 받은 Neuron은 Membrane Potential을 update한다.
5. Membrane potential을 update한 뒤, leak value를 값에서 뺴준다.
6. Updated된 membrane potential이 threshold voltage를 넘기면 Spike를 생성하여 output으로 넘긴다.

jth neuron의 membrane potential의 계산 방법은,
이전 membrane potential + [i = 0~255까지,] (Spike 가 있으면 1, 없으면 0) x (jth dendrite와 ith axon이 연결 되어있는지 보면서, 연결 되어 있으면 1, 아니면 0) x (Neuron의 type과 jth dendrite에 따른 weight) - (jth dendrite의 leaking value)
이렇게 계산하게 된다.
=> 그냥 computation을 일일이 해주는 것인 듯.
=> 실제로는 pseudo random number을 넣어서 더 복잡하게 한다고 한다.
=> 모델 만들면서 각 neuron마다 다르게 넣어줄 수 있는 것은,

1. 각 neuron의 type과 그에 따른 weight. 근데 같은 type이라도 neuron마다 조금씩 차이가 날 수 있어야 한다. 그리고 한 뉴런에는 한개의 weight만 사용한다.

2. 각 뉴런의 leaking value.

=> leaking value와 weight를 그냥 leaking value 한 가지 parameter로 퉁 칠수 있을까?? 머리로는 없다고 생각이 들긴 함.


Asynchronous Design: Communication & Control. Control은 input이 있을때만 computation하도록 하는 것이다.
Synchronous Design: Computation. Asynchronous control signal에 의해서 각각의 core에서 synchronous working을 위한 clock pulse가 생성된다.

그리고 computation 끝날때 까지만 clock이 생성됨.


이 논문을 보면 결국 한 core에 neuron이라고 할 수 있을만한 것은 256개가 아니라 1개 뿐임. 사실 그것도 computation unit이다. 즉, 얘가 SRAM에서 각 Neuron의 parameter/weight/leakage value들을 한개씩 받아와서 계산하고 다시 SRAM으로 넘기고 하는 과정을 256번 반복하는 것이다. Fig. 6에 block이 Neuron block이라고 불리는 computation unit이다.


Chip간의 data 통신은 I/O때문에, multiple bus를 merge해서 single stream of spike로 만든다.



+ Recent posts