# Evolutionary Optimization of Spiking Neural P Systems for Remaining Useful Life Prediction
## 2 Background
### Spiking Neural P Systems  
Before presenting our method, we describe how an SN P system works. In biological neurons, a neuron transmits an electric pulse, which is known as a spike, via its synapses. A spike train is a sequence of such spikes. In our study, we assume that (1) all the spikes of a spiking neuron are identical, and (2) the spiking neurons carry information by means of the number and the timing of the spikes rather than the size and the shape of each spike. As we anticipated in the introduction, the computational model used in this study is a membrane system called a P system, in which each membrane comprises a number of generic \"objects\" and a set of rules. Its computation is based upon the progression of objects in a membrane structure. At the beginning, the model is initialized with a specific number of objects in each membrane. Following the set of rules presented in the membrane, the state of the system is updated in each timestep. The result of the system is then the number of objects in each membrane, after completing all the timesteps. In particular, SN P systems are a class of neural-like P systems that contain neurons structured in a neural net. The behavior of SN P systems is based on the state of its neurons and their interactions based on spikes. By using the same notions of regular languages used in [3], a standard SN P system of degree \(m\geq 1\) is formally defined as follows:  
\[\Pi=(O,\sigma_{1},\ldots,\sigma_{m},syn,I_{in},I_{out}) \tag{1}\]  
where:  
* \(O=a\) is a singleton alphabet, where \(a\) represents a spike. * \(\sigma_{1},\ldots,\sigma_{m}\) denote neurons. Each neuron consists has the form: \(\sigma_{i}=(n_{i},R_{i})\), \(1\leq i\leq m\), in which \(n_{i}\) is the number of spikes initially present in \(\sigma_{i}\) and \(R_{i}=\{r_{1},\ldots,r_{N}\}\) is a finite set of rules in the neuron, respectively. Each rule \(r_{i}\) can take one of these two forms: \[E/a^{c} \to a^{p};d,\ \forall c,p,d:p<c;\] (2) \[E/a^{f} \rightarrow\lambda,\ \forall f.\] (3)
* \(syn\) is the set of synapses, where each synapse is included in \(\{1,\ldots,m\}\times\{1,\ldots,m\}\). More specifically, \(syn\) is an \(m\times m\) matrix in which each \((i,j)\) element contains the neuron indexes of the synapse connecting neurons \(i\) and \(j\), and its corresponding weight, which is an integer. In other words, the synapses have the form of \((i,j,z_{i,j})\) where \(1\leq i,j\leq m\), \(i\
eq j\) denote the indexes of the two connected neurons, and \(z_{i,j}\) denotes the weight on that connection. * \(I_{in}\) is the set of input neurons, i.e., a mutually exclusive subset of \(\{\sigma_{1},\ldots,\sigma_{m}\}\). * \(I_{out}\) is the set of output neurons, i.e., a mutually exclusive subset of \(\{\sigma_{1},\ldots,\sigma_{m}\}\). The computation of the system at each step consists of updating the number of spikes following the set of rules in each neuron. The first type of rule, shown in Equation (2), is called a _spiking rule_ (or _firing rule_). In this rule, \(E\) is a regular language over \(O\); \(c\) denotes the number of spikes consumed to generate \(p<c\) spikes, when the spiking rule is applicable; \(d\) denotes the \"refractory\" period, which in turn indicates an enforced waiting interval between two consecutive spikes; \(c\) is the application threshold of the spiking rule. The rule can be applied to a neuron only if the number of spikes in the neuron \(g\) is greater than or equal to the number of spikes to be consumed \(c\) (i.e., the spiking rule is applicable for the neurons that satisfy \(g\geq c\)). In summary, a neuron \(\sigma_{i}\) at a certain timestep is updated with respect to the spiking rule in the following way: if the number of spikes \(g\) contained in \(\sigma_{i}\) is greater than \(c\), then the neuron consumes \(c\) spikes to fire. After immediately emittingspikes, \(g-c\) spikes remain in the neuron for the following \(d\) timesteps. The second type of rule, shown in Equation (3), is referred to as the _forgetting rule_.