## 3 Results
### Weight Transfer by STDP  
In order to transfer the weights to the synaptic devices, it was necessary to apply PGM/ERS pulses for the precise weight adjustment. Since the weight adjustment was performed through accessing the individual synaptic devices one by one, the number of pulses required for the weight transfer was at least as many as the number of synapses in the network. However, the proposed method was based on STDP, thus that it can adjust all the synaptic weights connected with the same BL simultaneously, which reduces the pulse steps for the weight adjustment. Let us take an example with 5-level quantized weight for the weight transfer using STDP. It was assumed that all the synaptic devices were in the initial state since the STDP characteristic changes, given that the synaptic devices were not in the initial state [24]. First of all, we can find the exact timing difference to adjust the precise quantized weight based on the STDP characteristic of Equation (1), as shown in Figure 5a. The extracted timing differences were denoted as \(\left\{\Delta t^{2^{-}},\Delta t^{1^{-}},\Delta t^{1^{+}},\Delta t^{2^{+}}\right\}\). For the simplicity of the weight mapping process, we only adjusted the weights of the excitatory synapses while keeping those of the inhibitory synapses in the initial state. Because one synaptic weight was implemented by the conductance differences between the excitatory and inhibitory synapses, \(\Delta I_{source}\) of the excitatory synapse directly corresponded to the synaptic weight. In order to implement the positive weight, the timing difference must be positive, which was applied to the excitatory synapses. On the other hand, the negative timing difference  
Figure 4: Schematic view of the hardware-based SNN. Pre-synaptic inputs are applied to wordlines (WLs), and the current summation is performed in bitlines (BLs). Two BLs are paired for the excitatory and inhibitory synaptic currents. Gate 2 of the synaptic devices are connected in BL direction by \(G2_{k^{+}+}^{+}\) and \(G2_{k^{+}+}^{-}\), which are used for the weight adjustment. can be obtained through the depression part of Equation (1), and it was also applied to the excitatory synapses. Here, it was unnecessary to apply STDP pulse for the zero-weight since it can be implemented with the initial states of the excitatory and inhibitory synapses. Next, select a neuron in the \(l^{\text{th}}\) layer. The weight maps connected to the neuron having only the value of each quantized level can be extracted. For example, four weight maps with the size of 28 \(\times\) 28 were extracted for the first neuron in the first hidden layer of the trained network above, and the white pixels in each weight map corresponded to the synapses having the weight value of \(w^{2^{-}},w^{1^{-}},w^{1^{+}},w^{2^{+}}\), as shown in Figure 5b. Then, let us apply the image of the weight maps encoded by voltage input sequentially to neurons in \((l-1)^{\text{th}}\) layer. As illustrated in Figure 6a, the weight map of the value \(w^{1^{+}}\) was applied to the input layer in which the weight pixels were encoded by the asymmetric voltage pulse while the black pixels were at zero voltage. At the same time, if a teaching signal of the asymmetric voltage with the timing difference \(\Delta t^{1^{+}}\) was applied to \(G2^{+}_{11}\), all the weights with the value of \(w^{1^{+}}\) were transferred simultaneously. This process can be performed for the remaining weights \(w^{2^{+}},\ w^{1^{-}}\), and \(w^{2^{+}}\) with the timing differences \(\Delta t^{2^{+}},\ \Delta t^{1^{-}}\), and \(\Delta t^{2^{-}}\), as shown in Figure 6b-d. It requires only 4 steps for 784 synaptic weights to be transferred. Now, we can map all synaptic weights by repeating the previous process for the remaining neurons in the network.