Full text
Adaptive Fuzzy Spiking Neural P Systems for Fuzzy Inference and Learning Jun Wang1and Hong Peng2 1School of Electrical and Information Engineering, Xihua University, Chengdu, Sichuan, 610039, China 2School of Mathematics and Computer Engineering, Xihua University, Chengdu, Sichuan, 610039, China [email protected] Summary. Spiking neural P systems (in short, SN P systems) and their variants, including fuzzy spiking neural P systems (in short, FSN P systems), generally lack learning ability so far. Aiming at this problem, a class of modified FSN P systems are proposed in this paper, called adaptive fuzzy spiking neural P systems (in short, AFSN P systems). The AFSN P systems not only can model weighted fuzzy production rules in fuzzy knowledge base but also can perform dynamically fuzzy reasoning. It is more important that the AFSN P systems have learning ability like neural networks. Based on neuron’s firing mechanisms, a fuzzy reasoning algorithm and a learning algorithm are developed. An example is included to illustrate the learning ability of the AFSN P systems. Key words: Spiking neural P systems, Fuzzy spiking neural P systems, Adaptive fuzzy spiking neural P systems, Fuzzy reasoning, Learning pronlem 1 Introduction Spiking neural P systems (in short, SN P systems) firstly introduced by Ionescu et al. in 2006 [1], are a class of distributed parallel computing models, which are incorporated into membrane computing from the way that biological neurons communicate through electrical impulses of identical form (spikes) [2]. Since then, a large number of SN P systems and their variants have been proposed [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]. From the viewpoint of real-world applications, SN P systems have attractive due to the following features: (i) parallel computing advantage, (ii) high understandability (due to their directed graph structure), (iii) dynamic feature (neurons firing and spiking mechanisms make them suitable to model dynamic behaviors of a system), (iv) synchronization (that makes them suitable to describe concurrent events or activities), (v) non-linearly (that makes them suitable to process non-linear situation), and so on. Recently, in order to take full the advantage of SN P systems, a class of extended SN P systems were
236 J. Wang, H. Peng proposed by introducing fuzzy logic, which were called fuzzy spiking neural P systems (in short, FSN P systems) [12, 13, 14, 15]. The motivation of proposing these FSN P systems is to deal with the representation of fuzzy knowledge and model fuzzy reasoning in some real-world applications, such as process control, expert system, fault diagnosing, etc. As we know, since knowledge in real-world applications mentioned above is frequently updated, they are essentially dynamic systems. This requires that the FSN P systems should be adaptive, that at, FSN P systems must have ability to adjust themselves. However, the FSN P systems might fails to cope with potential changes of actual systems due to their lack of adaptive or learning mechanism. Besides, a few of adaptive SN P systems have been addressed in recent years [16, 17]. In this paper, we propose a class of modified FSN P systems, which are called adaptive fuzzy spiking neural P systems (in short, AFSN P systems). The practical motivation is to build a novel way to deal with the learning problem of dynamical fuzzy knowledge in some real-world applications under the framework of SN P systems. For this purpose, based on neuron’s firing mechanisms, a fuzzy reasoning algorithm and a learning algorithm are developed in this paper. The rest of this paper is organized as follows. In Section 2, we firstly present the AFSN P systems, and then describe a way to model weighted fuzzy production rules by the AFSN P systems, finally move on to give the developed fuzzy reasoning algorithm and learning algorithm. Simulation example is provided in Section 3. Finally, Section 4 draws the conclusions. 2 AFSN P Systems 2.1 Definition of AFSN P Systems Currently, fuzzy spiking neural P systems (FSN P Systems, in short) have been discussed [12, 13, 14, 15]. However, they can not adjust themselves and lack learning ability. In this paper, we will introduce “adaptive” mechanism into the FSN P systems to propose a class of adaptive FSN P systems, called AFSN P systems. Definition 1. An AFSN P systems ( of degree m≥1) is a construct of the form Π= (A, Np, Nr, syn, I, O) where 1) A={a}is the singleton alphabet (the object ais called spike); 2) Np={σp1, σp2, . . . , σpm}is called proposition neuron set, where σpi is its i-th proposition neuron associated with a fuzzy proposition in weighted fuzzy production rules, 1≤i≤m. Each proposition neuron σpi has the form σpi = (αi,ωi, λi, ri), where: a) αi∈[0,1] and it is called the (potential) value of pulse contained in proposition neuron σpi.αiis used to express fuzzy truth value of the proposition associated with proposition neuron σpi.
Adaptive Fuzzy Spiking Neural P Systems 237 b) ωi= (ωi1, ωi2, . . . , ωisi)is called the output weight vector of the neuron σpi, where component ωij ∈[0,1] is the weight on j-th output synapse (arc) of the neuron, 1≤j≤si, and siis the number of all output synapses (arc) of the neuron. c) riis a firing/spiking rule, of the form E/aα→aα, where α∈[0,1].E= {α≥λi}is called the firing condition, i.e., if α≥λi, then the firing rule will be enabled, where λi∈[0,1) is called the firing threshold. 3) Nr={σr1, σr2, . . . , σrn}is called rule neuron set, where σri is its i-th rule neuron associated with a weighted fuzzy production rule, 1≤i≤n. Each rule neuron σri has the form σri = (αi, γi, τi, ri), where a) αi∈[0,1] is called the (potential) value of pulse contained in rule neuron σri. b) γi∈[0,1] is called the certain factor. It represents the strength of belief of the weighted fuzzy production rule associated with rule neuron σri. At the same time, γiis also the weight on output synapse (arc) of the neuron. c) riis a firing/spiking rule, of the form E/aα→aβ, where α, β ∈[0,1]. E={α≥τi}is called the firing condition, i.e., if α≥τi, then the firing rule will be enabled, where τi∈[0,1) is called the firing threshold. 4) syn ⊆(Np×Nr)∪(Nr×Np)indicates synapses between both proposition neurons and rule neurons. Note that there are no synapse connections between any two proposition neurons or between any two rule neurons; 5) I, O ⊆Npare input neuron set and output neuron set, respectively. In the AFSN P systems, there are two types of neurons: proposition neurons and rule neurons. In this paper, we denote proposition neurons and rule neurons by circles and rectangles respectively, shown in Fig. 1. (a) (b) Fig. 1. Two types of neurons: (a) a proposition neuron; (b) a rule neuron. For a proposition neuron, its content is used to express the fuzzy truth value of the fuzzy proposition associated with it. When its firing condition E={α≥λi} is satisfied, the neuron fires and its firing/spiking rule E/aα→aαcan be applied. Applying the firing/spiking rule E/aα→aαmeans that the spike contained in the neuron is consumed, and then it produces a spike with value α, which will be weighted by the corresponding weight factor. Thus, its outputs are α·ωi(i= 1,2, . . . , s).
238 J. Wang, H. Peng Note that each rule neuron is assigned only an output weight ν. Suppose that a rule neuron has kpredecessor proposition neurons. When it receives kspikes from its all predecessor proposition neurons and its firing condition E={α≥τi} is satisfied, then it fires and its firing/spiking rule E/aα→aβcan be applied. The value of the received kspikes is calculated as its content α:α=x1+x2+. . . +xk. Applying the firing/spiking rule E/aα→aβmeans that the spike contained in the neuron is consumed, and then it produces a spike with value βwhere β=α·γ. Thus, its all outputs are α·γ. Suppose that a proposition neuron has kpredecessor rule neurons and it receives kspikes from them. Let output weights of the kpredecessor rule neurons be γ1, γ2, . . . , γkrespectively. If (potential) values of the received kspikes are x1, x2, . . . , xkrespectively, then its new content is computed by α= (x1+x2+ . . . +xk)/(γ1+γ2+. . . +γk). 2.2 Modeling Weighted Fuzzy Production Rules by AFSN P Systems In many real-world applications such as expert system, fault diagnosing and process control, fuzzy production rules are used to describe the fuzzy relation between two propositions. In order to consider the degree of importance of each proposition in the antecedent contributing to the consequent, weighted fuzzy production rule has been introduced, and a more detained description can be found in [18, 19, 20]. However, we will discuss the following three types of weighted fuzzy production rules in order to study AFSN P systems in this paper. Type 1: A simple fuzzy production rule R: IF p1THEN p2(CF =γ), τ, ω Type 2: A composite conjunctive rule R: IF p1AND p2AND ··· AND pnTHEN pn+1 (CF =γ), τ, ω1, ω2, . . . , ωn Type 3: A composite disjunctive rule R: IF p1OR p2OR · · · OR pnTHEN pn+1 (CF =γ), τ, ω1, ω2, . . . , ωn Above three types of weighted fuzzy production rules can be modeled by the proposed AFSN P systems according to the idea that each fuzzy proposition is mapped into one proposition neuron and each fuzzy production rule is mapped into one rule neuron or several rule neurons. Thus, the three types of weighted fuzzy production rules are represented by the following three AFSN P systems, Π1,Π2and Π3, respectively: •Π1= (A, {σp1, σp2},{σr1}, syn, I, O) where: (1) A={a} (2) For each j(j= 1,2), σpj = (αj,ω, λ, rj) is a proposition neuron associated with proposition pj, and rjis a spiking rule of the form E/aα→aα.
Adaptive Fuzzy Spiking Neural P Systems 239 (3) σr1= (α3, γ, τ, r3) is a rule neuron associated with rule R, and r3is a spiking rule of the form E/aα→aβ. (4) syn ={(σp1, σr1),(σr1, σp2)}. (5) I={σp1},O={σp2}. Fig. 2(a) shows the AFSN P system model of Type 1:Π1. •Π2= (A, {σp1, σp2, . . . , σpn, σp(n+1)},{σr1}, syn, I, O) where: (1) A={a} (2) For each j(j= 1, . . . , n, n + 1), σpj = (αj,ωj, λj, rj) is a proposition neuron associated with proposition pj, and rjis a spiking rule of the form E/aα→aα. (3) σr1= (αn+2, γ, τ, rn+2) is a rule neuron associated with rule R, and rn+2 is a spiking rule of the form E/aα→aβ. (4) syn ={(σp1, σr1),(σp2, σr1), . . . , (σpn, σr1),(σr1, σp(n+1))}. (5) I={σp1, σp2, . . . , σpn},O={σp(n+1)}. Fig. 2(b) shows the AFSN P system model of Type 2:Π2(in the case of n= 2). •Π3= (A, {σp1, σp2, . . . , σpn, σp(n+1)},{σr1, σr2, . . . , σrn}, syn, I, O) where: (1) A={a} (2) For each j(j= 1, . . . , n, n+1), σj= (αj,ωj, λj, rj) is a proposition neuron associated with proposition pj, and rjis a spiking rule of the form E/aα→ aα. (3) For each j(j= 1, . . . , n), σrj = (αn+j+1, γj, τj, rn+j+1) is a rule neuron associated with rule R, and rn+j+1 is a spiking rule of the form E/aα→aβ. (4) syn ={(σp1, σr1),(σp2, σr2), . . . , (σpn, σrn),(σr1, σp(n+1)),(σr2, σp(n+1)), . . . , (σrn, σp(n+1))}. (5) I={σp1, σp2, . . . , σpn},O={σp(n+1)}. Fig. 2(c) shows the AFSN P system model of Type 3:Π3(in the case of n= 2). 2.3 Fuzzy Reasoning Based on AFSN P systems Since the presented AFSN P systems mainly focus on the weighted fuzzy reasoning, we assume that firing threshold of every proposition neuron is λ= 0. This means that once a proposition neuron contains a spike with α > 0 it will fires. According to firing mechanism of AFSN P systems, fuzzy reasoning processes of above three types of weighted fuzzy production rules can be described as follows: •For Type 1, we can set ω= 1 since there is only one proposition in antecedent of the rule R. Initially, assume that neuron σp1contains a spike with α1>0. At first step, neuron σp1fires and emits a spike with α1. At second step, neuron σr1receives the spike. If α1≥τ, then neuron σr1fires and emits a spike with
240 J. Wang, H. Peng (a) s p1 s r1 s p2 t w 1 (b) (c) l 1 g s p1 s r1 s p3 t w 1 l 1 g s p2 w 2 l 2 s p1 s r1 s p3 t 1 w 1 l 1 g1 s p2 s r2 t 2 w 2 l 2 g2 Fig. 2. AFSN P systems of weighted fuzzy production rules of three types: (a) Type 1 ; (b) Type 2 ; (c) Type 3. α1·γ. Neuron σp2will receive the spike at next step. Thus, α2can be expressed by α2={α1·γ, if α1≥τ 0,if α1< τ (1) •For Type 2, assume that neurons σp1, σp2, . . . , σpn contain a spike with α1> 0, α2>0, . . . , αn>0, respectively. At first step, the nneuron fire simultaneously, and emit a spike with α1, α2, . . . , αn, respectively. At second step, neuron σr1receives the nspikes and its content is updated as ∑n i=1 αi·ωi. If (∑n i=1 αi·ωi)≥τ, then neuron σr1fires and emits a spike with (∑n i=1 αi·ωi)·γ. Neuron σp(n+1) will receive the spike at next step. Thus, αn+1 can be expressed by
Adaptive Fuzzy Spiking Neural P Systems 241 αn+1 = (n ∑ i=1 αi·ωi)·γ, if (n ∑ i=1 αi·ωi)≥τ 0,if (n ∑ i=1 αi·ωi)< τ (2) •For Type 3, we can set ω1=ω2= 1. Assume that neurons σp1, σp2, . . . , σpn contain a spike with α1>0, α2>0, . . . , αn>0, respectively. At first step, the nneuron fire simultaneously, and emit a spike with α1, α2, . . . , αn, respectively. At second step, each neuron σri receives a spike sent by σpi, whose value is αi, i= 1,2, . . . , n. Let J={j|αj≥τj, j = 1,2, . . . , n}. Then neurons σrj (j∈J) fire and each neuron of them emits a spike. Neuron σp(n+1) will receive the spikes at next step. Thus, αn+1 can be expressed by αn+1 = (∑ j∈J αj·γj)/(∑ j∈J γj),if αj≥τj, j ∈J 0,if αj< τj, j = 1,2. . . , n (3) From fuzzy reasoning process described above, we can see that fuzzy reasoning based on AFSN P systems are easily implemented. Thus, through firing mechanism of AFSN P systems, certainty factors can be reasoned from a set of known antecedent propositions to a set of consequent propositions step by step. Let Pcurrent ={σpi |σpi ∈Np, αi>0}be a set of current enabled proposition neurons. If a neuron σpi ∈Pcurrent, then it will fire. Let Rcurrent ={σrj |σrj ∈ Nr, αj> τj}be a set of current enabled rule neurons. Likewise, if a neuron σrj ∈ Rcurrent, then it will fire. Therefore, fuzzy reasoning algorithm based on AFSN P systems can be summarized as follows. program Fuzzy_reasoning_algorithm input Certainty factors of a set of antecedent propositions, which are corresponding to I of AFSN P systems; output Certainty factors of a set of consequence propositions, which are corresponding to O of AFSN P systems; begin Pcurrent := I; Rcurrent := {} P := Np; R := Nr; repeat Compute the outputs of current enabled proposition neurons in Pcurrent; Find current enabled rule neurons Rcurrent form R; Compute the outputs of current enabled proposition neurons in Rcurrent; P := P - Pcurrent;
242 J. Wang, H. Peng R := R - Rcurrent; Find current enabled proposition neurons Pcurrent form P; until P = {} and R = {} end. 2.4 Learning of AFSN P systems In order to deal with the learning problem of AFSN P systems, we assume that 1) AFSN P system model Πhas been developed; 2) In the AFSN P system model, weights and thresholds of all rule neurons are known; 3) Certainty factor values of all neurons in Iand Oare given. From the discussion above, we know that the presented AFSN P systems are mainly used to model weighted fuzzy production rules and these rules consist of three types. So, an AFSN P system model can be divided into three types of sub-structures, which are shown in Fig.2(a)-(c). Therefore, the learning of entire system can be decomposed to several simpler learning procedures of the sub-nets. This means that the complexity of the learning algorithm can be greatly reduced. According to above assumption, certainty factors of the proposition neurons associated with antecedent propositions are known, however, their weights are unknown. Therefore, these weights need to be learned. Note that for AFSN P system Π1of Type 1, we have ω1= 1, while we have ω1=ω2= 1 for AFSN P system Π3of Type 3. So, only weights of AFSN P system Π2of Type 2 need to be learned. In order to carry out the weight learning, the AFSN P system Π2of Type 2 can be converted to a single-layer neural network, shown in Fig.3. So, Widrow-Hoff learning law (Least Mean Square) can be applied in this paper. a 1 a n a n+1 w n w 1 a 2 w 2 Fig. 3. The single-layer neural network converted by the AFSN P system Π2of Type 2. We can summarize the learning algorithm of AFSN P systems as follows
Adaptive Fuzzy Spiking Neural P Systems 243 program Weight_learning_algorithm input Training data set D; m = |D|; Learning rate delta; output The weights (w1, w2,..., wn); begin Select a set of initial weights; i=1; repeat Compute the outputs error of i-th training sample; Update the weights (w1, w2,..., wn) using Widrow-Hoff learning law with learning rate delta; i=i+1 until i>m end. 3 Simulation In this section, a typical example is selected to illustrate the learning ability. Example 1. Let p1,p2,p3,p4,p5and p6are related propositions of a knowledge base of fault diagnosis. There are the following weighted fuzzy production rules: R1: IF p1THEN p4(γ1,τ1) R2: IF p2AND p4THEN p5(ω2,ω4,γ2,τ2) R3: IF p3AND p5THEN p6(γ3,γ4,τ3,τ4) This example includes three types of rules: R1is a simple rule and R2is a composite conjunctive rule, while R3is a composite disjunctive rule. These weighted fuzzy production rules can be modeled by the following AFSN P system Π: •Π= (A, {σp1, σp2, σp3, σp4, σp5, σp6},{σr1, σr2, σr3, σr4}, syn, I, O) where: (1) A={a} (2) For each j(j= 1,2,3,4,5,6), σpj = (αj,ωj, λj, rj) is a proposition neuron associated with proposition pj, and rjis a spiking rule of the form E/aα→ aα. Here, λj(j= 1,2, . . . , 6) = 0, and ω1=ω3=ω5= 1. (3) For each j(j= 1,2,3,4), σrj = (αk+j, γj, τj, rk+j) is rule neuron. σr1and σr2are associated with rule R1and R2respectively, while σr3and σr4are associated with rule R3.rk+j(j= 1,2,3,4) are spiking rule of the form E/aα→aβ. (4) syn ={(σp1, σr1),(σp2, σr2),(σp3, σr3),(σp4, σr2),(σp5, σr4),(σr1, σp4), (σr2, σp5),(σr3, σp6),(σr4, σp6)}. (5) I={σp1, σp2, σp3},O={σp4, σp5, σp6}.