Spiking ink drop spread clustering algorithm and its memristor crossbar conceptual hardware design

ABSTRACT


INTRODUCTION
Soft computing systems were originally developed to simulate human inference, and now these techniques find extensive application in diverse scientific domains, including but not limited to system control, modeling, decision-making, and knowledge extraction.Drawing inspiration from the biological processes of the brain, spiking neural networks (SNNs) are commonly regarded as the 3 rd generation of artificial neural networks.The appeal of SNNs lies in their ability to precisely model the synaptic connections between neurons, which involves considering the timing of spike firing.Currently, the primary objective is to develop effective learning mechanisms that can leverage the unique characteristics of SNNs while preserving the fundamental properties of conventional connectionist models.Conventional connectionist models are general-purpose and easy-to-use models, further there were available simulators for them [1].
Besides SNNs, fuzzy systems have achieved great results.One of the most effective algorithms in fuzzy context is active learning method (ALM), which was proposed by Shouraki et al. [2].Inspired by human problem-solving behavior, the ALM aims to approximate a multiple input-single output (MISO) system using several single input-single output (SISO) subsystems, each exhibiting output behavior with respect to a single input.This kind of behavior is depicted on a plane called ink drop spread (IDS) plane or IDS unit.The IDS method applies a two-dimensional membership function to each data point, diffusing information across the problem space, and combining the diffused data to obtain a narrow path on each IDS  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol. 13, No. 6, December 2023: 7125-7136 7126 plane.In contrast to instance-based learning approaches, the IDS algorithm does not retain data during the learning process [3], but there is a need for a short constant memory to store estimated narrow path representation data.
Creation of memristor in Hewlett Packard (HP) labs sparked interest in its utilization to implement various applications.In the domain of SNNs, memristor crossbars have been used to develop fully asynchronous spike-timing-dependent plasticity (STDP) learning algorithm of neuromorphic architectures [4]- [6].Moreover, some others have drawn an analogy between memristor crossbar and IDS planes to implement fuzzy relations and algorithms [7]- [10].The proposed networks have been depicted in Figures 1(a) and 1(b).The similarity of these architectures and their behavior, which are implementing brain computation procedures, was an encouragement to propose the current model.This model is a mixture of these two depicted architectures.In our neuro-fuzzy architecture, pulses do the computations, while input-output variables are fuzzy.The subsequent sections of the paper are structured in the following manner.Section 2 provides a comprehensive examination of the SNN models and the ink drop spread (IDS) algorithm.The introduction of the memristor-crossbar structure is discussed in section 3. The network structure under consideration is elaborated upon in section 4, while section 5 presents and thoroughly discusses the simulation results.Ultimately, section 6 presents the derived conclusions.

OVERVIEW OF SNNs
In addition to neuronal and synaptic state, SNNs integrate the concept of time into their model.Numerous models of spiking neurons have been proposed such as Hodgkin-Huxley [11], integrate and fire, leaky integrate and fire [12], theta neuron [13] and Izhikevich's neuron [14].A comprehensive review on spiking neuron models was done in [1].
Leaky integrate and fire (LIF) is derived from Hodgkin-Huxley neuron model.The most important simplification in the LIF neuron is neglecting the shape of the action potentials.Thus, every spike is considered to be a uniform event, and defined only by its appearance time.The electrical model of LIF neuron consists of a capacitor C in parallel with a resistor R that is driven by an input current (), as shown in Figure 2. In this model, the dynamics of the membrane potential in the LIF neuron are described by a single first-order linear differential as (1): where   =  is the time constant of the voltage leakage of the neuron membrane model.Additionally, the firing time  () of the neuron is defined by a threshold crossing equation u(t (f) ) = v, under the condition  ′ ( () ) > 0. Immediately after  () , the potential is reset to a given value of   ,   = 0 is a common assumption.An absolute refractory period can be modeled by forcing the neuron's voltage to a value  =   during the time interval   after a spike emission, and then restarting the integration by the initial value of   .
Figure 2. The integrate-and-fire neuron model (I&F) [1] ALM is inspired by human problem-solving behavior and aims to approximate a MISO system using several SISO subsystems.Each subsystem represents the output behavior with respect to a single input, which is obtained from the pattern generated on a two-dimensional plane using the IDS operator.The IDS operator applies a two-dimensional membership function to each data point, diffusing information across the problem space and combining the diffused data to obtain a smooth pattern representing the functional behavior of a single variable.ALM has demonstrated its effectiveness in various engineering applications, such as modeling, control, and pattern recognition [15]- [18].
The pattern on a plane is constructed by projecting all (xi; y) data on the plane.Diffusion of information has the main role in this process; common sense implies that each sample data not only has information in its exact point but also is valid in neighboring points with less confidence degree.By getting away from the point of sample data, the confidence degree will decrease.It is similar to the notion of fuzzy member-ship functions.The diffusion of information can thus be implemented by considering a threedimensional pyramid-shape fuzzy membership function centering at each data point as shown in Figure 3. Figure 3(a) depicts two such membership functions overlapped and aggregated.An IDS plane after applying IDS operator to the five data samples is shown in Figure 3(b).For the sake of simulation and hardware conformity, the range of input variables should be quantized to n levels, giving rise to  ×  pixel IDS planes.

MEMRISTOR AND MEMRISTOR CROSSBAR
A memristor is an analog variable resistor where its resistance can be adjusted by changing the direction and the duration of the applied voltage.Therefore, memristor can be used as a storage device in which analog values can be stored in it as memristance instead of voltage or charge [19].In May 1, 2008, a paper, which was published in Nature by Hewlett Packard (HP) Labs [20], announced the first experimental realization of the memristor.This paper has caused an increased interest in this passive circuit element.It has become clear that memristor can have many potential applications such as non-volatile memory construction [21], creation of analog neural network and emulation of human learning [21]- [23], building programmable analog circuits [24], [25], implementing digital circuits [26] and signal processing algorithms [27], [28].
A memristor crossbar is a two-dimensional grid in which analog values can be stored in the crosspoints using the memristance of the memristors, as illustrated in Figure 1.Therefore, the memristor crossbar appears to be an ideal structure for implementing the two-dimensional planes of the Ink Drop Spread (IDS) units.In this case, the vertical and horizontal wires of the crossbar represent different discrete values of the variables xi and y, respectively, while the memristors in the crosspoints act as the pixels of the IDS plane.Additionally, memristor crossbars have been demonstrated to be useful as synapses for implementing STDP learning rule [29].STDP is an improvement of Hebb's rule that considers the precise relative timing of individual pre-and post-synaptic spikes, rather than their average rates over time.The shape of STDP function  can be interpolated from experimental data, such as that obtained by Bi and Poo [30], as shown in Figure 4(a).The resulting function (), computed using the memristor model through (2), is illustrated in Figure 4(b).This result shows that a memristive type of mechanism could be behind the biological STDP phenomenon.

PROPOSED NETWORK STRUCTURE
The proposed structure is a one layer, fully connected network, which uses the LIF type neurons.Each variable, input or output is partitioned into quantized levels.One neuron is used for each quantized level.Therefore, if the system has p inputs and one output, and each one is quantized into n levels,  ×  input neurons and n output neurons would be implemented as depicted in Figure 5.
Figure 5. Proposed network scheme with n quantized level for each variable Analogy between the above structure and IDS planes can be drawn.In each IDS plane there are n pixels for each input.It will be shown in the proposed inference algorithm that each pixel represents the confidence degree of IDS plane to its corresponding input-output value.This scheme is equivalent to the above proposed network.Each pixel in IDS plane represents a synaptic coefficient.As this value increases, the confidence degree of this plane to the desired output increases.Similarly, as the network synaptic coefficient increases, the corresponding output neuron is more likely to fire.

Information coding
As mentioned in the last section, the incoming data make the input neurons fire, corresponding to their quantized level.For each input both corresponding and neighboring neurons will fire, although neurons that are farther from the main neuron will have a lower confidence degree.It has been assumed that the main neuron is fired with confidence degree value equal to one.
In Figure 6, information coding has been depicted.In the first interval, a pulse in  0 is fired, and in the second time interval, a pulse in  1 is fired.As it can be seen in this figure, confidence degree for each pulse is ( 0 ) and ( 1 ) respectively.Note that every descending function can be used as confidence degree function.
Confidence degree of neighboring neurons can be determined using Bohte's algorithm [32].Figure 7 illustrates the procedure.On each input's quantized level, a receptive field such as trigonometric, Gaussian or any convex function can be used.For an input quantized level, a vertical line is drawn.Every neuron that crosses the vertical bar has to fire related to the confidence degree which can be computed using the horizontal bar.Therefore, as the convex functions become wider, more neighbor neurons fire in the learning phase.Hence, ink drops radius has a direct relationship with wideness of convex function.Network learning uses winner takes all (WTA) mechanism, which needs a control block for implementation.The threshold voltage of output neurons is an issue which has to be considered.If this value is too small, only the neurons with very high confidence degrees will have a role in the firing of output neurons.It is also possible that output neuron fire just after the main neuron and before neighboring neurons.In this case, neighboring neurons have no role in choosing the winner.Albeit, this problem does not pose an algorithmic problem and the solution will be achieved, but ink drop spread loses its concept.The ink drop spread learning algorithm presumes that by occurring data in input space not only do we have information about that pixel but also, we have information of its surroundings.Hence, learning algorithms use both information codes: the information of the data itself and the information of its surroundings.On the other hand, high threshold value probably causes no winner neuron or requires a long time until a neuron fires.It can cause late convergence of algorithm, which is a weakness of implementing memristor crossbar networks.
In the clustering phase, the network receives data, which causes output neurons to fire.As the firing time of an output neuron gets closer to beginning of the period, the confidence degree of network to that neuron becomes higher.Therefore, the time between output neuron firings and beginning of the pulse is relative to confidence of network to each output.Thus, the input data can be in different clusters with different confidence degrees.

Hardware implementation of the proposed structure using memristor crossbar
The overall structure of network hardware for a system with two inputs and one output is shown in Figure 8. Four neurons are dedicated for each input and output variable, which means each variable is quantized to four levels.The neurons in this structure are implemented using the circuit proposed by Bernabe, which is depicted in the Figure 9 [31].
Considering consistency of network learning with learning algorithm introduced in the last section, pulse shape and firing type have to be specified.Two pulse types have been chosen for network hardware learning.The first type is the one used by input neurons which is applied to network, and then its inverse returns by the output winner neuron.Voltage amplitude of this pulse is lower than memristor's threshold voltage  ℎ and cannot cause any change in memristance.Furthermore, voltage difference between signal and returned pulse is more than threshold voltage in which memristance increases in proportion to it.The winner output neuron generates the second type pulse which is passed to input neurons.This pulse decreases synaptic coefficients of input neurons which have not fired.Its amplitude is more than memristors threshold voltage.As this amplitude increases, the memristance decreases.In addition, it is in opposite polarity compared to returned pulse.
As mentioned before, implementing learning algorithm has two phases.In the first phase, the main input neuron and its neighboring fire pulses and other input neurons reach a high impedance state.Subsequently, output neurons compete, and the winner neuron returns a pulse to its input.When the potential difference of pulses is applied to the memristor, its memristance decreases; consequently, the synaptic coefficient increases.In the second phase of training, the firing neurons transition to high impedance state 7131 and the rest of neurons are connected to the ground potential.Therefore, the output winner neuron fires the second pulse.This pulse has opposite polarity to the first pulse; consequently, it decreases the synaptic coefficient.
Figure 8. High level hardware structure of network with two input and four quantized level Figure 9. Hardware realization of LIF neuron [31] Firing time controller In Figure 10, T is Learning time.In T/2 the process for increasing synaptic coefficient takes place.The confidence degree for firing each input neuron sets the starting time of firing in the interval of 0 to T/4.Then the firing pulse remains active till T/2.This coding has been chosen in order to maximize the possible number of neurons to influence firing of the output winner neuron.In this period, other input neurons reach high impedance.In the time interval [T/2, T], the winner neuron fires another pulse with reverse polarity compared with the first pulse.In this state, input firing neurons in the last period go to high impedance, and other neurons connect to ground.Hence, this pulse increases synaptic coefficient in these neurons.The problem that must be considered here is that the increase in synaptic coefficients of the grounded neurons is greater than firing neurons.
In the Figure 10,  1 is the fired pulse by an input neuron,  2 is the fired pulse by an output winner neuron whose difference ( 1 −  2 ) increases the value of synaptic coefficient.  is the winner neuron pulse in the time interval [T/2, T] which is used to decrease the synaptic coefficient.In Figure 11 an increase in synaptic coefficient of input neurons, which have been fired according to their firing time and firing time of winner neuron, has been depicted.

SIMULATION RESULTS
For simulation and evaluation of the proposed algorithm, three classes are randomly generated with two inputs, with a uniform distribution, means (-1.5,-1.5),(0,0), and (1.5,1.5), and variance 1, as depicted in Figure 12. Figure 12(a) shows the training data; Figure 12(b) shows the clustering with a radius of 40; and Figure 12(c) shows the clustering with a radius of 20.These classes are fully separated.In this simulation, the resolution of input variables is 128, and 8 rows have been used for a maximum of 8 classes.Clustering has been simulated with radii of 20 and 40.As seen in Figure 12, when the radius is 40, test data are clustered in three separate classes, but when the radius of the ink drop is decreased, the number of clusters increases.For further evaluation, class means and variances are changed.So, classes become very close to each other.As shown in Figure 13, a similar behavior to the previous example has happened here.Figure 13(a) shows the training data; Figure 13(b) shows the clustering with a radius of 40; Figure 13(c) shows the clustering with a radius of 20, and Figure 13(d) shows the clustering with a radius of 10.Decrease in the radius of ink drop has increased the number of clusters.This characteristic of the proposed algorithm can be used for vector quantization.The smaller the radius is, the more the detected vectors are and vice versa.

CONCLUSION
Combining the fuzzy concept and spiking neural network algorithm as a third artificial neural network generation is what this paper is about.Therefore, the border between these two branches of the artificial intelligence and soft-computing family is faded out in this algorithm.Although the proposed algorithm is not fully mature yet, the simulation result shows that it can be useful in clustering tasks.The proposed memristor-crossbar hardware structure of the algorithm can be a proof that this algorithm can be a new guideline for brain simulation domain.

Figure 3 .
Figure 3.The diffusion of information is implemented by fuzzy membership function (a) ink stains with pyramid shape and (b) five Inks are diffused on the plane

Figure 10 .
Figure 10.Learning pulses which are used in the process

Figure 12 .
Figure 12.Simulation and evaluation of the proposed algorithm (a) training data, (b) clustering with radius=40, and (c) clustering with radius=20

Figure 13 .
Figure 13.Other simulation and evaluation of the proposed algorithm (a) training data, (b) clustering with radius=40, (c) clustering with radius=20, and (d) clustering with radius=10 Spiking ink drop spread clustering algorithm and its memristor crossbar … (Iman Esmaili PaeenAfrakoti)