ReSNN-DCT: Methodology for Reduction of the Spiking Neural Network using Discrete Cosine Transform and Elegant Pairing

In recent years, the use of artificial neural network applications to perform object classification and event prediction has increased, mainly from research about deep learning techniques running on hardware such as GPU and FPGA. The interest in the use of neural networks extends to embedded systems, due to the development of applications in smart mobile devices, such as cell phones, drones, autonomous cars and industrial robots. But when it comes to embedded systems, it is necessary to observe the hardware limitations, such as memory, scalability and power consumption, which significantly impact the processing of a neural network. In this article, a methodology is proposed that allows to reduce a spiking neural network, applying the discrete cosine transform (DCT) and elegant pairing, contributing to the scalability of the neural network layers in hardware. The results demonstrate the effectiveness of the methodology, showing the feasibility of reducing synapses and neurons, while maintaining the correctness of the spiking neural network response.

. Architecture of a typical CNN network [1].
nervous systems, exploring new methods for cognitive computing. Its computational capacity, based on the spatial and temporal characteristics of the input signals, has proved to be very attractive for implementing energy-efficient hardware applications [5].
Neural networks have been used in the development of applications with large amount of raw data, mainly in the area of data mining, computer vision and pattern recognition, such as image recognition for medical diagnosis. However, processing a large dataset requires an increase in computational speed, otherwise the process becomes slow, due to the high computational cost of training neural networks, which may require the implementation of billions of neuron connections, such as in Google's cat videos recognition system. To solve this problem, computational parallelism in hardware is employed using clusters of graphics processing units (GPU) with general purpose graphic processors (GPGPU) [1], [2], [4], [6].
Three factors impact the use of GPU for the implementation of deep learning networks: the high cost per unit of graphics processing, the low flexibility to add more GPG-PUs and the high power consumption. As an alternative, researchers use programmable hardware, such as field programmable gate arrays (FPGA), for the development of digital system designs. FPGA is a programmable logic device (PLD) of flexible architecture, encapsulated in a single integrated circuit, which provides high performance per watt of power consumption. Hardware accelerators of FPGA algorithms allow to implement complex structures with energy efficiency and high performance, besides providing a scalable architecture. For deep learning applications, FPGA is a suitable solution for development in hardware platforms. Its flexibility, low cost and parallel processing capability, allows classifying FPGA technology between general purpose processors (GPP) and application specific integrated circuits (ASIC) [3], [4], [6]- [8].
Highlighting the implementation in hardware, the interest in the use of neural networks extends to embedded systems, due to the development of applications in smart mobile devices, such as cell phones, drones, autonomous cars and industrial robots. However, in embedded systems, hardware limitations, such as memory and energy consumption, must be observed, which significantly impact the processing of a neural network. When using hardware to implement neural networks, there are some limitations that impact application performance, some of which are energy efficiency and scalability.
Energy efficiency is one of the most researched characteristics in deep neural network designs on hardware with limited resources. Research shows that the power consumption of GPGPU is very high compared to CPU. However, GPGPU-based accelerators have been used intensively for CNN implementations. Alternatives such as the FPGA have advantages over CPUs and GPGPUs due to their features of massive parallelism and low power consumption, which make them attractive for deep neural network applications. However, FPGA has loss of energy efficiency with the addition of more processing units.
Scalability is the factor that determines the level of processing capacity of the hardware. This capacity is directly associated with the number of processing and memory elements used for each type of neural network architecture implemented. A neural network architecture is said to be scalable in hardware if it can add more processing cores, increasing the layers of the network. However, when all hardware resources are in use, it is necessary to use another hardware platforms with more resources. This is a dynamic implementation problem. Scalability directly impacts the energy efficiency of the hardware. Current research focuses on the development of models that apply techniques capable of increasing the level of scalability of hardware limited in resources.
This article contributes with a proposed methodology for the reduction of spiking neural networks (SNN), using the discrete cosine transform (DCT) and the techniques of elegant pairing. The objective of the methodology is to allow the reduction of synapses, rescaling the architecture of the neural network in systems, for example, in hardware with limited resources, but maintaining the same accuracy.
The paper is divided as follows: section II presents concepts about spiking neural networks (SNN) and the Izhikevich model. Section III, describes the discrete cosine transform (DCT) and related works of DCT applied in SNN neural networks. Section IV describes the elegant pairing applied in the ReSNN-DCT. Section V presents the proposed methodology for the reduction of layers of spiking neural networks. Section VI presents the experimental results of validation of the methodology proposed in this work. Finally, section VII, presents the final considerations about the work.

II. SPIKING NEURAL NETWORK
Spiking neural networks (SNN) are the third generation of artificial neural networks, which more realistically simulate the biological neuron, making use of spikes as input and output information, as shown in Figure 2. This functional feature allows the spatial and temporal encoding of information, through pulses [9].
In a spiking neural network, signals consist of small electrical pulses called action potentials or spikes, and have an  amplitude around 100 mV with a duration of 1 − 2 ms. These neurons transmit sequences of spikes, called spike trains, that change dramatically in frequency over a short period of time, requiring spatial and temporal information from the input spike patterns to encode the message between neurons. Thus, the number and duration of spikes provide useful information for the network.
Mathematical models were developed to describe the behavior of a spiking neuron. Among these models, we can mention the Integrate-and-Fire model [11], proposed in 1907 by the neuroscientist Louis Lapicque, and the Hodgkin-Huxley model [12], presented in 1963 by Nobel Prizewinning physiologists and biophysicists Alan Hodgkin and Andrew Huxley, which provided an understanding of neuron behavior in terms of action potentials [13].
In a simplified model of a spiking neuron, a neuron v fires when there is, on the neuron's membrane, a potential value P v greater than or equal to a threshold value θ v . There are two types of neurons: postsynaptic potentials (EPSP) and presynaptic potentials (IPSP). The potential P v is the sum of the outputs of neurons u, which are connected to neuron v through synapses. Whenever a presynaptic neuron u fires at time s, this results in a P v at time t. Mathematically, this relationship is described by (1) in which w u,v is the weight, which represents the strength (effectiveness) between the synapes, and u,v (t − s) is the response function that has the form illustrated in Figure 3 [13].
In a typical biological neuron, the resting membrane potential is approximately −70 mV, the firing threshold of a resting neuron is close to −50 mV. If a neuron v fires in time t , it will not fire again milliseconds after t , even if the current potential P v is greater than the threshold. This phenomenon is known as the refractory period, in which the neuron is still reluctant to fire. Figure 4 illustrates the θ v (t − t ) function that models the refractory phenomenon. A SNN consists of a set of spiking neurons and a set of synapses connecting neurons between layers. The firing potential of a neuron v at time t, of a SNN network, is given by (2), where Γ u represents the set of neurons in the layer before neuron v, and s is the firing time of neuron u. The variables d k uv and w k uv are, respectively, the delay time and weight associated with the synapse k between neuron u and neuron v [10], [13].
For a SNN, a typical response function is the exponential, defined in (3), and which represents the rise and decay of the potential of a postsynaptic neuron (EPSP), as illustrated in Figure 3. In this equation, τ is the decay time constant of the membrane potential [10].
Algorithm 1 shows the algorithm for calculating the firing potential, where K is the total synapses, and the parameters VOLUME 4, 2016 3 This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication. t v , t u , d uv and w uv , are respectively, the firing time of the neuron v, the firing time of the presynaptic neuron u, the delay time between the neurons u and v, and the synapse weight. For this work, the Izhikevich neuron model was used, developed by Eugene M. Izhikevich in 2003, based on the Integrate-and-Fire and Hodgkin-Huxley models. A spiking neural network built from this model can be easily implemented in a hardware device like FPGA, for its energy efficiency [14].

A. IZHIKEVICH NEURON MODEL
The Izhikevich model is computationally simple and allows the simulation of firing patterns of real biological neurons. It is a realistic model like the Hodgkin-Huxley model, but just as efficient as the Integrate-and-Fire model. Basically, the Izhikevich model reproduces the behavior of pulses from known types of cortical neurons, as illustrated in Figure 5 [15].
The Izhikevich model is represented by the ordinary differential equations (4) and (5).
In equations (4) and (5), the variable v represents the membrane potential of the neuron and u represents a membrane recovery variable, responsible for the activation of ionic currents of K + and inactivation of ionic currents of N a + , and that gives negative feedback to v. After the spike reaches its apex, around +30 mV, the membrane voltage and recovery variable are reset, according to (6). The values of the synaptic current, or injected DC current, are provided by the variable I. Figure 6 shows the behavior of the potential, according to the Izhikevich model.
The choice of parameters a, b, c and d, in (4), (5) and (6), result in various intrinsic firing patterns like those of the  This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication. in possibly strong subthreshold oscillations and lowthreshold peak dynamics. A typical value is b = 0.2. • The parameter c describes the after-spike reset value of the membrane potential v, caused by conductances K + of high threshold fast. A typical value is c = −65 mV. • The parameter d describes the after-spike reset of the recovery variable u, caused by conductances N a + and K + of high threshold slow. A typical value is d = 2.

III. DISCRETE COSINE TRANSFORM
The discrete cosine transform (DCT) is used in several applications of signal digital processing, mainly in the compression of audio and video signals. For example, DCT is the basis for multimedia encoding standards such as JPEG, MPEG-2, MPEG-4 and H.264/AVC [16]. DCT is a real orthogonal transform that maps a signal to real coefficients [17]. The coefficients are found through (7) [18] for 0 ≤ k ≤ N − 1.
An important property of DCT defines that most of the signal energy is highly concentrated in a few coefficients, allowing the development of efficient compression techniques. As observed in Figure 7(b), the signal x(n) of Figure 7(a), has its energy strongly concentrated in the first coefficients C(k) of DCT. The first lowest frequency coefficient is known as the DC coefficient and the rest are the AC coefficients. The DC coefficient concentrates the average intensity of the transformed signal [18], [19].
There are few studies related to the application of DCT in SNN. In general, the application of DCT in spiking neural networks is associated with the transformation of signals into coefficients that are processed by SNN. In the work of Garg, Chowdhury and Roy [20] a scheme for image coding using DCT was proposed, decomposing the spatial information into a set of orthogonal weighted values that are processed by SNN. On the other hand, the work by Wu et al. [21] proposed a SNN capable of performing DCT for visual processing, allowing the extraction of image characteristics.

IV. PAIRING
Pairing functions are unique functions and bijections that map a pair of coordinates, represented by values non-negative integers to a single coordinate, which also has a value nonnegative integer [22].
Pairing functions are important in the fields of computing and mathematics. They are useful in computational applications such as enumerating complete binary trees and finitelength sequences. They are also applied to optimize data storage, so that two binary numbers of size n can be represented by a single binary number of size less than or equal to 2n. They are useful in shading applications, mapping systems, and image rendering [23], [24]. The work of Solís-Rosas et al. [22], employed a pairing function as a length encoder, allowing to increase the compression rate of medical images such as magnetic resonance, X-rays and computed tomography. The work of Reddaiah [25] showed the importance of the pairing function in cryptographic systems.

A. CANTOR'S PAIRING FUNCTION
One of the well-known functions of pairing is the Cantor's function which maps each pair of positive integers (x, y) through (11), into a single positive integer p(x, y) [24]. VOLUME 4, 2016 5 This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication.
The inverse of the pairing function, (x, y) = f −1 (z) is given by (13). where Graphically, Cantor's pairing function assigns consecutive numbers to points along the diagonals in the plane, as shown in Figure 8 [26]. Although simple and less complex, the Cantor's pairing function has the disadvantage of losing efficiency with the use of higher dimensional values [25].

B. ELEGANT PAIRING FUNCTION
To compensate for the disadvantage of the Cantor's pairing function, the elegant pairing function is used, also known as the Szudzik's pairing function [26]. Figure 9 graphically shows how the elegant pairing function assigns consecutive numbers to points along the edge of the squares.
For integer values x and y, the elegant pairing function generates a non-negative integer p(x, y), through (15) [22], [26]. where and y p = 2y, y ≥ 0 (−2y) − 1, y < 0 In the inverse function of elegant pairing, a pair (x, y) is associated with a non-negative integer z, as shown in (18) for f : Z → (x, y). where Equations (20) and (21) normalizes the pair (x, y) to allow negative integers.

V. RESNN-DCT
As explained earlier, the interest in the use of neural networks in embedded applications has grown a lot in recent years, directing research into solutions that overcome the limitations imposed by the hardware itself, such as low energy efficiency and scalability.
This work proposes a methodology, henceforth identified by ReSNN-DCT (abbreviation of Reduction of SNN by DCT), which allows to reduce a spiking neural network (SNN), applying the discrete cosine transform (DCT) in the synapses of its neurons, and the elegant pairing function in the neurons of the hidden layers, improving the scalability of this type of neural network. Figure 10 presents ReSNN-DCT, where blocks 1, 2 and 3 correspond to the stages of the direct ReSNN-DCT, responsible for reducing the structure of the spiking neural network. The stages of the inverse ReSNN-DCT, corresponding to blocks 4, 5 and 6, are part of the pre-processing performed before the calculation of the firing potential of the neuron, that was described in section II. With the coefficients of the restored synapses, it is possible to run the Algorithm 1 (section II), finding the firing potential of each SNN neuron. In the direct ReSNN-DCT, shown in Figure 10, DCT is applied to the weights and also on delay times in synapses of the spiking neurons the layer to be reduced. Next, the coefficients with lower energy are eliminated, allowing to reduce the number of DCT matrix coefficients. In the last stage of the reduction process, the neuron synapse coefficients are paired, allowing to reduce the number of neurons in the layer by a factor of 1/2. Before performing the calculation of the firing potential of the neurons in the layer, it is necessary to perform the inverse ReSNN-DCT, which has 3 stages. The first stage, corresponding to unpairing, decodes the paired coefficients, based on the total number of neurons of the original layer. In the second stage of the inverse ReSNN-DCT, the coefficients eliminated in the direct ReSNN-DCT are restored from the total energy eliminated. Finally, with the coefficients restored, IDCT is applied to restore the values of weights and delay times of the synapses that are used in the calculation of the firing potential.

A. APPLYING THE DCT
Based on the Izhikevich model, each neuron synapse contains the weight information, which defines the weighted force for the firing potential, and of the delay time, so that the firing of the presynaptic neuron reaches the neuronal membrane.
Considering the synapse matrix syn(n) in (22), with the values of weights and delay times, where n is the index of the synapse, with {n ∈ N | 0 ≤ n ≤ N − 1}, and N is the total synapses.
Equation (7) from the DCT, presented in section III, is applied to the matrix syn(n), obtaining the matrix syn(n, 1) cos π n + 1 2 k N (24) and syn(n, 2) cos π n + 1 2 k N In equations (23), (24) and (25), is defined that {k ∈ N | 0 ≤ k ≤ N − 1}, r is the index of the column, indicating whether it is a coefficient of weight (r = 1) or delay time (r = 2), and N is the total synapses.

B. REDUCTION OF SYNAPSES
The first step for reducing the number of synapses, of each neuron of the SNN layer, is to determine which DCT coefficients will be eliminated. In equation (26), the index of the first coefficient to be eliminated is defined, where f r is the reduction factor, with value between the interval {f r ∈ R | 1 < f r < N }.
The coefficients C(k, r) are eliminated if the index k is greater than or equal to ind, resulting in the array of values of the remaining coefficients C rem (k, r) = C(k, r) ∀ k < ind (27) Considering the AC coefficients eliminated, C elim , according to (28), the information of the total amount of energy is stored for later use in the stage for restoring the coefficients with less energy, as shown in (29), where M is the number of coefficients eliminated.

C. PAIRING THE COEFFICIENTS
In order to reduce the number of neurons in the layer, the elegant pairing function is used to encode the coefficients of each pair of neurons into a single integer, resulting in a paired neuron, as shown in Figure 11. Considering that the DCT coefficients are real values, a normalization of each coefficient is performed, through the conversion to an integer value, using the ceiling function, as shown in (30). For this work, the constant 100 is multiplied with the coefficient, reducing the precision to two decimal digits.
C rem (k, r) = 100 C rem (k, r) As shown in the example of Figure 11, the elegant pairing function is applied to the normalized coefficients of neurons 1 and 2, generating the vector C pair (k) of non-negative integer values. where After the stages of reducing and pairing the coefficients, the SNN layer is reduced by half of its neurons. The number of remaining neurons is defined by (33), where Q is the number of neurons in the SNN layer before applying direct ReSNN-DCT.

D. INVERSE RESNN-DCT
The inverse ReSNN-DCT, which consists of the stages of unpairing and restoring the coefficients, and the application of IDCT, is performed before calculating the firing potential. Algorithm 2 shows the algorithm 1 presented in section II, adapted to the ReSNN-DCT methodology.
Algorithm of the inverse ReSNN-DCT function.
In line 1 of the algorithm, the inverse elegant pairing function over the matrix C pair (k, r) is performed, generating the normalized coefficients of the pair of paired neurons. Next, the coefficients are divided by 100 to convert the values into real numbers with two digits of precision, as shown in (34). To calculate the potential, the coefficients of the neuron v are selected.
In line 2 of the Algorithm 2, the coefficients eliminated during direct ReSNN-DCT are restored. The size of the matrix of eliminated coefficients is M × 2, and the accumulated values, associated with weights and delay times, are represented by E elim (v)(r), where v indicates the neuron and r indicates whether the total energy of the eliminated coefficients is from the weight (r = 1) or from the delay time (r = 2). The matrix of eliminated coefficients is reconstructed in (35).
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication.
Thus, the complete matrix of coefficients is given by After restoring the coefficients, IDCT is applied to the matrix C(v)(k, r), shown in (9), as presented in section III. The vector of the weights w uv (n) in (39), is obtained by (38), where {n ∈ N | 0 ≤ n ≤ N − 1}, and N is the total number of rows of the matrix C(v)(k, r).
The vector of delay times d uv (n) in (41), is obtained by (40), where {n ∈ N | 0 ≤ n leqN − 1}, and N the total number of rows of the matrix C(v)(k, r).

VI. EXPERIMENTAL EVALUATION
To evaluate the feasibility of the ReSNN-DCT methodology, experiments were performed which consisted in generating random weights and delay times of synapse samples, and applying the proposed methodology on these samples, comparing the frequencies generated by the Izhikevich model of spiking neuron, before and after ReSNN-DCT.

A. TESTS ENVIRONMENT
The experiments were performed on the Linux platform, on an AMD Rizen 5 Radeon Vega 3.7 GHz computer, with 12 GBytes of RAM and an AMD Radeon Picasso graphics card. For the implementation and simulation of the algorithms of the ReSNN-DCT methodology, was used the Octave software. Table 1 shows the values of the parameters of the Izhikevich spiking neuron model used in the simulations. For the experimental evaluation, the coding rate in frequency of the neuron was considered, based on (42), where n p is the number of spikes, and T pikes is the time interval between one spike and another [27].

B. SIMULATIONS AND RESULTS
The simulations generated 18068 data samples, with 8960 samples referring only to tests of the reduction stage of synapses, and 9108 samples referring to the complete stages of the proposed methodology, including the direct and inverse stages of ReSNN-DCT. Spiking neurons were simulated with the number of synapses represented by the set S = {syn ∈ N | 0 ≤ syn ≤ N − 1}, or S = {0, 1, 2, ..., N − 1}. For 5 synapses (syn = 5), simulations of the ReSNN-DCT methodology were performed, corresponding the reductions 1/2 and 1/4, that is, the number of synapses was reduced by half and by factor of 1/4, respectively. For 10 synapses (syn = 10), simulations were performed using the ReSNN-DCT methodology, corresponding to reductions of 1/2, 1/4, 1/6 and 1/8. For more than 10 synapses (syn > 10), reductions of 1/2, 1/4, 1/6, 1/8 and 1/10 of the number of synapses of the spiking neuron were performed. All simulations were repeated until the number of samples mentioned above was reached. Table 2 shows the evolution of synapse reductions, considering reduction factors from 1/2 to 1/10, where the "Syn" column informs the number of synapses remaining after the VOLUME 4, 2016 9 This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2022.3182719 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ application of the reduction stage of the coefficients of the ReSNN-DCT methodology, the column "f 2 " represents the resulting frequency, and the column "f 1 − f 2 " corresponds to the difference, in percentage, of the response in frequency of the neuron, before and after the application of ReSNN-DCT. In Table 2, it is observed that for the 5 simulations of a neuron with 40 synapses, using the ReSNN-DCT methodology, a difference of 0.27% from the response in frequency of the neuron occurred in only one simulation. It can also be seen that most of the energy of the coefficients, associated with weight and delay time are greater than 90%, with the exception of the second simulation, where the energy of the delay time coefficients was 89.53%. In Table 3 the same behavior is observed, occurring only in two simulations, with a difference between the frequencies, before and after ReSNN-DCT, of 0.08%. Regarding the energies of the stored coefficients, the percentage was above 90%. With respect to the frequencies f 1 and f 2, respectively, before and after ReSNN-DCT, only 1.84% of the samples, from the total of 18068 simulations, showed any difference between them, and a difference above 1% between the values of the frequencies occurred in only 0.02% .
As shown in section V, the total amount of energy of the eliminated coefficients, during the reduction stage, is used in the restoration stage, through the distribution of this total amount by the number of eliminated coefficients, as shown in (35). This is possible because in general, less than 10% of the energy is concentrated in the eliminated coefficients. Despite this, in 4.44% of the simulations, the concentration of energy reached percentages higher than 20% and lower than 45%, as shown in Table 4. For example, 287 (3.20%) of the 8960 simulations, referring to the reduction stage, concentrated between 20% and 25% of the DCT energy in the eliminated coefficients. After considering the stage of reducing the number of coefficients, it is important to observe how this impacts the data storage capacity of the network structure. Considering as example, the information in Table 3, for a neuron with 495 synapses, without reduction, a 495 × 2 array would be needed to store 990 values of the real type. With the reduction by a factor of 10, the storage is reduced to 98 values of real coefficients in a 49×2 array. Table 5 presents a comparison of the storage capacity of the coefficients, for some simulation samples, before and after the application of the reduction stage of the ReSNN-DCT methodology, where the column "Syn" corresponds to number of synapses. It is observed in Table 5, that for a neuron with 785 synapses, knowing that each neuron has two real values (weight and delay time), 1570 coefficients are stored, without the application of ReSNN-DCT. Applying the reduction factor of 1/2 for worst case, the number of stored coefficients was reduced to 784. Considering the best case of reduction by a factor of 1/10, it was possible to store only the 156 coefficients that possess more than 90% of the DCT energy. It is important to note that for the values in the last two columns, 2 units must be added, which correspond to the stored values of the total amount of energy and of the amount of coefficients eliminated. Thus, the values of the last rows of the table, for reduction factors of 1/2 and 1/10, respectively, are 786 and 158, after ReSNN-DCT.
Elegant pairing allows a decrease in 2× the amount of information to be stored, hence reducing the amount of SNN neurons. As shown in Table 6, the number of coefficients is substantially reduced, considering the number of synapses per neurons. In this table, the columns "NN" and "Syn" correspond, respectively, to the number of neurons per layer and the number of synapses per neuron. As an example, in row 2 of the table, for a layer with 50 neurons, knowing that each neuron has 50 synapses, an array of 2500 × 2 will be needed to store all the 5000 real coefficients of the weights and delay times of the layer. After executing the elegant pairing function ReSNN-DCT, considering the reduction per worst case (1/2), the matrix would be reduced to the size of 200 × 2, capable of storing 1250 integer values, corresponding to the coefficients of weights and delay times. For the best-case reduction, by a factor of 1/10, the array is reduced to the size of 40 × 2, capable of storing 250 integer-type values. For the reduction factor of 1/2, the gain of storage space, in terms of the amount of values, is 75%, and for the factor of 1/10, the gain is 95%. Another important point to be analyzed is the processing time of the SNN network, after the reduction of its layers by the ReSNN-DCT methodology. Naturally, there will be an increase in the execution time of the potential calculation algorithm, shown in Algorithm 2, in section V, where the stages of unpairing and restoration of the coefficients and the stage of IDCT on the restored coefficients are executed. Table 7 shows the processing times for some of the simulations performed, where the time values are in seconds, but in the fifth column the increment time values are informed in milliseconds. In the sixth column, the percentage of the increase in the processing time after ReSNN-DCT is informed. As observed in the table, only the simulations with 67 and 100 neurons had a time increase greater than 5%, reflecting what happened in the simulations performed during the experimental evaluation.
In order to analyze the processing time, in addition to the number of simulations mentioned, referring to the direct and inverse stages of ReSNN-DCT, another 9108 simulations were performed, totaling 18216. In general, in the inverse ReSNN-DCT, there is an increase of less than 5% on the processing time for more than 74% of the simulations performed, as shown in Table 8. At 19.89% of the simulations, the increment is greater than 5% and less than 10%.

VII. CONCLUSION
This work presented a methodology proposal, based on the discrete cosine transform (DCT) and on the elegant pairing technique, for the reduction of layers of a spiking neural network, which uses the Izhikevich neuron model. One of the objectives of this work was to demonstrate that the amount of synapses per neuron can be reduced, concentrating most of the energy of the weights and delay times in the remaining coefficients, generated by DCT during the direct ReSNN-DCT. One of the interesting features of DCT is that, as few coefficients concentrate most of the signal energy, it was possible to equally distribute the total AC energy among the eliminated coefficients. Thus, it was only necessary to store the remaining coefficients and the information about the total energy and the amount of the eliminated coefficients, for use in the pre-processing of the calculation of the firing potential, in the inverse ReSNN-DCT.
It has also been shown that it is possible to reduce the number of neurons in the SNN network layers by applying elegant pairing. This technique allowed to encode coefficients of two neurons of the same layer, pairing in a single integer-type value. In order to be able to use the pairing technique, it was VOLUME 4, 2016 necessary to reduce the precision of the DCT coefficients by two decimal digits. However, this reduction in the precision of the real coefficients does not affect the restoration of the real values of the coefficients, allowing later to perform IDCT on these coefficients, restoring the weights and delay times, in the inverse ReSNN-DCT.
In conclusion, the ReSNN-DCT methodology proved to be effective in reducing the number of synapses and neurons, allowing for scaling the memory storage capacity, reducing the amount of coefficients needed to store. Despite the increase in processing time for the reduced network, the ReSNN-DCT methodology proved to be efficient in keeping this increase in time below 5%, in more than 74% of the simulated cases.