## 2 Methods
### Network Configurations  
As shown in Figure 2a, a network consisting of 784, 800, and 10 neurons in the input, hidden and output layers, respectively, were trained. As mentioned above, since the performance of learning algorithms for SNN had not reached the state-of-the-art, we trained the network using software-based learning techniques with MNIST dataset. The MNIST dataset is composed of 60,000 train and 10,000 test images, and each image has a label vector, which gives the answer [21; 22; 23]. The network was optimized by stochastic gradient descent (SGD) algorithm with a learning rate of \(5\times 10^{-3}\) and momentum of 0.9 [27]. In order to prevent over-fitting, some nodes were randomly dropped out with the probability of 0.5 [28]. After training, we obtained an accuracy of 98.23% for 10,000 test images.  
Figure 1: Weight adjustment of the silicon-based four-terminal synaptic transistor by: (**a**) Hot hole injection (potentiation) and (**b**) hot electron injection (depression); (**c**) measured spike-timing-dependent plasticity (STDP) characteristic and the fitting curve.  
The I&F neuron cannot fire more than one spike at one timestep. When too many input spikes were applied in one timestep or one input spike with a too large weight came in, the neuron could not properly represent the output activations [21]. In order to properly implement SNN with the trained weights by software-based learning rules, weight normalization must be performed. This can prevent the I&F neuron from underestimating the output activations [21]. In this work, we employed 'Data-based Normalization' where the trained weights were normalized by the maximum output activation or maximum weight [21]. In addition, an analog value of the input was encoded using rate-based coding. Rate-based spike trains were generated by applying the constant current inputs corresponding to the input values to the I&F neuron. Figure 2b shows the accuracy of SNN for 10,000 test images with the full-precision weight according to the simulation time. SNN determines the index of the maximum firing neuron in the output layer as the answer, thus we can extract the accuracy by comparing the answer with the label vector in the dataset. In SNN, there was an inherent latency since it takes an integration time for a certain neuron to fire. Thus, the accuracy increased with respect to the simulation time, and it finally converged to the ANN's accuracy.  
After the weight normalization, we needed to quantize the weights because it was impossible for the synaptic devices to have 32-bit full precision weights as the weights in software-based ANN. The weights were quantized by a linear quantization method, which equally divides the weight distribution into a linear scale [17]. As shown in Figure 2c, the normalized weight distribution can be divided by \((2n+1)\)-level as \(\left\{w^{n^{-}},\cdots,w^{2^{-}},w^{1^{-}},w^{0},w^{1^{+}},w^{2^{+}},\cdots, w^{n^{+}}\right\}\), and the interval between each level is \(\alpha\). Figure 2d indicates the converged accuracy of SNNs according to the quantization level when \(\alpha\) changes. It can be seen that there is the optimal \(\alpha\), which can minimize the accuracy loss compared with the case using the full-precision weight. Figure 3 illustrates 3, 5, 7, and  
Figure 2: (**a**) Trained neural network for MNIST dataset consisting of 784, 800, and 10 neurons in the input, hidden, and the output layers; (**b**) Time-accuracy of spiking neural network (SNN) according to the simulation time; (**c**) Full-precision weight distribution; (**d**) The optimization process of the weight quantization according to the weight interval \(\alpha\).  
9-level quantized weight distribution with the optimal \(\alpha\), which will be transferred to the hardware-based SNN using the proposed method.