Stigmergic electronic gates and networks

Stigmergy is a communication method based on changing the surrounding environment according to reference feedbacks. It is typical within animal colonies that are able to process even complex information by releasing signals into the environment, which are subsequently received and processed by other elements of the colony. For example, ants searching for food leave traces of a pheromone, like Hansel and Gretel’s breadcrumbs, along the way. When food is found, they return to the anthill reinforcing this pheromone trace as a signal and reminder to all the others. Similar techniques are used in routing software even if stigmergic hardware might be even more efficient, fast, and energy saving. Recently, a stigmergic photonic gate based on soliton waveguides has been proposed; this particular stigmergic hardware can switch the output ratio of the channels as a result of optical feedback. Based on these results, in this study, we analyze stigmergic electronic gates that can be addressed through external feedback, as the photonic ones do. We show that the nonlinear response of such gates must be based on quadratic saturating conductances driven by feedback signals. For this purpose, networks of stigmergic gates require two parallel and communicating current circuits: one to transmit information, and another for feedback signals to control the gate switching. We also show that by increasing the number of terminals per single gate, from 2 × 2 to 3 × 3 or higher, the overall power consumption can be reduced by a few orders of magnitude.


Introduction
Stigmergy is a method of communication that uses decentralized systems in which individuals can communicate with each other by changing their surroundings [1]. Stigmergy is commonly found in animal colonies that are able to realize distributed processing of information through many small and simple cognitive processes, all of which are generated by leaving signals in the environment [2][3][4][5][6]. A typical example is represented by the optimization of the trajectories that ants create when they go out on reconnaissance missions in search of food. Each ant leaves a pheromone trace along its exploratory path, in order to identify a specific trajectory, and thus be able to return to the anthill. Then, if food is found, on the way back it will follow the trace it had previously left behind, thereby reinforcing this pheromone-laced path. Every other ant casually crossing the reinforced trace of pheromones will be alerted to the path and begin to follow it, in turn reaching the food source, while simultaneously reinforcing the pheromone pathway themselves. After a intermediate period, all the ineffective traces that had been laid out will diminish in favor of the one pathway toward the food, as the increasing number of ants following said traces exponentially increases the signaling of the effective pheromone pathway. This process of optimizing the path toward the goal is based on three simple cognitive processes that the ant colony exercises at each point of the entire map: (1) leave a pheromone trace during the exploration, (2) follow a trace of pheromone, and (3) follow the most intense trace at every intersection. The stigmergic communication paradigm has also been used in the information technology field [7][8][9]. For example, many software codes optimize the trajectories followed by signals in complex Ethernet and Intranet communication networks, using algorithms that simulate the search for food by ants. Such software systems are indeed effective, but they require computation time to develop necessary algorithms, which increases exponentially with the complexity of the network. Hardware solutions, especially optical ones, have also shown greater potential in terms of energy management and large-scale implementation than software [10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25]. Recently, using photonic technology, a stigmergic logic gate [26] based on soliton waveguides has been created [27]. These waveguides exploit the refractive channels induced by laser beams that do not diffract (via self-confined beams, also called spatial solitons). They can be reached in photorefractive nonlinear materials [28,29], taking advantage of the refractive index plasticity, i.e., the possibility of locally varying the material refractive index by the intensity of the used light. The optical stigmergy corresponds exactly to such modification: any optical feedback re-injected in the soliton channel would increase the refractive index contrast between the channel and the environment, acting like an enhancement of the pheromone trace and unbalancing any channel crossing. Thus, stigmergic optical gates can be addressed from 50-50 to 20-80 through optical feedback signals [26]. The present work aims to reproduce individual electronic gates with a stigmergic response based on that of the equivalent photonic gates [26], which has proven to be able to replicate the evolution of stigmergic processes. Therefore, this model aims to understand the physical processes underlying a stigmergic gate and to analyze how complex stigmergic networks, based on such gates, could work, starting from simple structures, characterized by few inputs and few outputs, up to more complex structures not yet realized in the photonic equivalent.

Conductance with linear saturation
The stigmergic paradigm can be shown through designing a gate whose switching efficiency between channels can be addressed by control signals. Consequently, any electronic stigmergic network which might be made using stigmergic 2 × 2 gates (ideal) will be composed by two circuitries: one dedicated to the management of the information signals, and another one dedicated to the management of feedback signals that control the switching rate of the gates. Information currents travel forward, while control currents propagate backward; such peculiarity ensures a top-down addressing of the stigmergic networks. Any control is launched from the output and propagates backward, using an external independent generator of current, in order to re-address the whole network as a function of the desired behavior.
The general scheme of a stigmergic 2 × 2 gate is shown in Fig. 1 where the signal circuit is represented in black, and the control circuit in red. Two input signal currents ISin1 and ISin2 pass across the central node and are switched in one or both the output signal currents ISout1 and ISout2; on the same way, two control currents ICin1 and ICin2, injected from the output, travel backward in the control circuit and are switched toward either ICout1 and ICout2. The practical implementation of the stigmergic 2 × 2 gate requires both analogical and digital signal processing as shown in Fig. 2. Stigmergic optical gates can be addressed from 50-50 to 20-80 through optical feedback signals [26].
The two input signals 1 and 2 should be directed toward output 1 or 2 according to the gate setting, which is decided by the control currents. Such currents, after passing through nonlinear limiters that allow to manage the currents and prevent them from exploding to infinity, are both translated into digital conductances and compared. Each control current is translated into a conductance value, then compared with the other and normalized. These two normalized values are then transported into the signal propagation circuit and multiply the two input currents (I Sin1 and I Sin2 ) , determining a percentage p of output current toward one channel and a percentage (1−p) to the other channel. Therefore, the whole control of the gate is driven by the nonlinear conductances that the two channels manifest. So, the switching efficiency of the signal currents depends on the value of the saturating conductances, in the same way, as it happens in photonic gates [28], in the corresponding arms: Here, G ∞ is the saturation limit conductance and is the conductance sensitivity to the feedback control changes. Both and G ∞ depend only on the network geometry and consequently are fixed values. I 0 is the initializing network current, and in an ideal case, it might be considered null. In practice, I 0 cannot be zero, since it fixes the symmetric behavior of the switching gate that will be re-addressed by the control currents, ultimately favoring either one exit or the other. This phenomenon is more evident in the photonic stigmergic gate [27] where a non-zero amount of control light must be present to realize the initial symmetric waveguide junction. Then, we can identify the total currents in the feedback circuit arms as I FBi = I 0 + I Cini . They are not affected by the signal potentials, and their values depend only on the intensity of the feedback signals and on the switching percentage p (percentage value that determines the distribution of the feedback currents, variable between 0.5 and 1), according to the relation: (with j = 1, 2 and j ≠ i ). The characteristic expressions for the two output currents are: In the limit G ∞ → ∞ , the output signal currents would depend only on the ratio of the two feedback currents, but would be independent of the sensitivity : Thus, in non-degenerate cases, the action of the feedback currents is consistent with the required behavior, but it never allows a complete switching: and the fraction is always lower than 1. This limiting effect on the switching efficiency is the consequence of the saturating trend of the conductance. Trying to reach the maximum possible imbalance of the gate by doubling the feedback current we obtain: However, considering I 0 0 , the conductance ratio n cannot exceed 2 ( n < 2 ). Consequently, the largest normalized output signal for any arm of the gate, when the total control currents in the two arms are I 0 and 2I 0 , respectively, is limited to: The result of this electronic model does not reproduce the experimental results obtained in the photonic case, where the switching ratio obtained by doubling the control signal reached a larger value, up to about 0.8. Thus, the linear saturation model should be replaced by a nonlinear saturation one, in order to induce faster switches.

Conductance with quadratic saturation
As mentioned, more efficient switching can be reached adopting conductances with quadratic saturations: In the limit G ∞ → ∞ , the output signal currents would depend only on the ratio of the two feedback currents, but would be independent of the sensitivity : The fundamental difference, with respect to the previous case, is the parabolic rise at low intensities that induces higher switches at lower current values. Figure 3 gives a comparison between the linear and nonlinear conductance responses. The nonlinear 2 × 2 gate now evidences the new characteristic curves for the output signals: with i ≠ j.
The maximum switching values asymptotically reachable for very high feedbacks are expressed by the quantities: These relationships are only the function of the structural parameters and of the amplitude of the overall write signal to the other output branch of the junction. As seen in the linear saturating case, also here, we can notice that if the conductance did not suffer from the saturating behavior, but could instead grow to infinity, it would be possible to obtain complete switching. The switching sensitivity to the feedback currents is much improved using a nonlinear conductance saturation. In fact, increasing the control feedback current up to doubling the initializing value and imposing again the condition (7) we obtain: which provides the limits for the ratio n between the channel conductances, which can be in range 1:4.
In particular, considering the generic output, we have for 1 < n < 4: This value best reproduces the experimental result obtained with the experimental photonic gate [27]. (12) lim

3 × 3 channel network
Using 2 × 2 stigmergic gates, 3 × 3 channel networks can be designed, as shown in Fig. 4a. The analysis of more complex gates is indeed more difficult due to the large number of possible paths that the information might follow within the electronic network. Considering 3 × 3 channel networks, one possible scheme is represented in Fig. 4, where the three conductances have been numbered with the z index ranging from 1 to 3. By focusing on the output channel 1 as a reference, the current arriving to it is: where G z,1 is the z-th conductance in the arm 1 of the z-th gate, while G z = G z,1 + G z,2 is the total conductance of the z-th gate. Generalizing, the output current on the m-th output arm gets the form: where m is the selected output, n the input, k(n, m) is the number of paths that connects the n-th input with the m-th output, r is the path taken into consideration, s is the gate in the path, and G(r) is the conductance along the r-th path.
The network performances have been tested using a MAT-LAB code, whose sketch is shown in Fig. 4b. Reinforcing the input control current I Cin 1 would result in a reinforcement of the corresponding signal output I Sout 1 , as shown in Fig. 5. A steep slope carries this current at almost 80% of the total (15) Fig. 3 Switching of the normalized output currents driven by an increasing of the control current of the 1 terminal using linearly saturating (dotted lines) and quadratically saturating (continuous lines) conductances Fig. 4 a Scheme of a 3 × 3 stigmergic network based 2 × 2 on gates and its implementation b in Simulink environment input current for a tripling of the corresponding control current. We found the same control current value for all three ports on the network. In this case, a higher control current was necessary to get the same switching ratio found for the single gate 2 × 2. This finding highlights an important phenomenon: As the number of internal junctions increases, the feedback current, necessary to reach a certain fixed value at a normalized output, increases.
The increase is not only a function of the number of internal nodes, but it also depends also on how these nodes are distributed and on the proximity of the channels, so as to achieve the conductance saturation.

10 × 10 channel network
The simulation of the 3 × 3 network showed the low sensitivity when routing the entire network to a specific output which was appropriately highlighted by a feedback signal. The increase in control current, needed to switch the network, augments itself according to its dimensionality. This is a critical factor for the development of a complex system with many gates. The transition from a single 2 × 2 port to a 3 × 3 network implies an increase about 2-4 times of the necessary feedback current. This important influence of complexity on the required control values has led us to study a more complex network, 10 × 10, to highlight a functional dependence on feedback. Figure 6 shows the configured 10 × 10 network. Figure 7 shows the currents at the output ports for a control sent from port 1 (Fig. 7a) or from port 5 (Fig. 7b) or from port 10 (Fig. 7 c). In all three cases, the necessary increase in feedback current to switch the whole network is very high: Port 1 requires 56-fold increase, 8fold for port 5 and 12-fold for port 10. The large variability between the values of the control currents depends on the network complexity along the trajectories, in order to achieve a specific output. Such complexity is strongly influenced by the number of nodes involved and by how deep they lie within the network, i.e., the distance of a certain node from the reinforced output. For the values of k prime close to the reinforced channel, the decreasing trend of the feedback current required for switching the network is justified by the presence of an increasing number of nodes involved in the trajectories followed by the feedback.
This means that multiple nodes are able to individually unbalance, contributing to a greater flow of current coming from the inputs to that particular output. The mechanism described above is valid as long as the ports receive a feedback signal of sufficient amplitude for a significant imbalance. When the involved gates are too deep, or distant, even if in increasing numbers, the feedback control current encounters too many splits, thus rendering themselves to weak to function. Therefore, individual imbalances are too small to actively contribute to a general switching of the whole network toward the particular reinforced output.

Energy management
The problem of sustaining the amplitude of feedback signals, which becomes more critical as the number of inputs/outputs of networks increases, can be theoretically solved by amplifying the stimuli each time they cross a junction. Therefore, an alternative compromise may require an efficient system to monitor the feedback at each point of the network with sensors and to provide a local amplification when the amplitudes fall below a specific threshold. However, there might be a topological optimization that could keep the management energy at reasonable levels. Let's consider the general expression for the control current reaching the gate z-th: where f is a function whose codomain is defined by the set p, 1 − p , 1 and it has the task to select one of these factors depending on the analyzed node and path. Fixing p = 1∕2 and considering the j-th active feedback, the control current at the l-th arm of the z-th gate becomes: The worst case, i.e., the lowest control current, can be estimated as: Two important points should be stressed: 1. the k term at the numerator gives a linear dependence of the control current by the number of paths which connect the z-th node with the j-th output. Increasing the number of paths would enhance the corresponding control current at the z-th node; 2. instead, the power term 2 k max at the denominator describes how the trajectories with a larger number of nodes are a limitation. They require a high increase in the feedback current and therefore exert little control on the gearing the entire network toward the j-th output. The power term dominates when the order of the network increases, thus leading to the creation of the worst possible outcomes, regardless of the number of accessible paths, i.e., of the number of nodes that the feedback signal can unbalance. This analysis points out that adopting single gates with a number of outputs greater than 2, (for example, 3 × 3 or 10 × 10 gates), would allow for a great improvement across the entire network. This process is decisive for large networks, since a variable-base power is definitely lower than a power term with variable to the exponent. Here, the management of complex systems becomes accessible with controlled levels of energy using an innovative technology based on junctions with an arbitrary number of tributary channels. A practical example is represented by the neurons [30][31][32][33], which act as logic gates with N synaptic inputs and outputs. The development of complex reasoning is therefore ensured by the ability to manage single switching ports with many inputs and many outputs, with a well-controlled energy management plan, uniformly distributed across the entire processing network.

Modified stigmergic gates and power consumption
The diagram of a single 3 × 3 gate is shown in Fig. 8a, whose behavior is shown in Fig. 8b. The new single 3 × 3 junction network is more sensitive to the feedback. In fact, to obtain a total switching of 80% , it requires less variation (about 50% less of the control current compared to a similar 3 × 3 network realized by 2 × 2 ports. This drastic reduction is a significant advantage in complex networks and is crucial for the total network order increase. To highlight the importance of reducing control current in complex networks, we have implemented a  Fig. 8, where the output currents of the 10 terminals are shown after a control feedback has been injected to channel 1. Corresponding with an increasing of the output 1 current, a notable decrease in all of the currents in the remaining channels is found. An interesting feature to point out here is the perfect symmetry of the output channels. They have an identical behavior, Fig. 9, and it is not possible to distinguish the different curves, which are shown to be perfectly superimposed on each other. The entire network of 10 inputs and 10 outputs fully switches ( 70% ) for control current values only 4 times greater than the initial feedback (2 × 2 gate), which means more than 50% of the power needed. For the same switching ratio, the 2 × 2 gates network required a control current up to 15 times higher (more than one order of magnitude). Thus, an increase in the number of channels at the single gate is reflected in a much lower level of control current needed to switch complex networks.

Conclusion
In the present work, electronic 2 × 2 stigmergic gates have been designed to simulate the behavior found in the equivalent photonic stigmergic junctions. The proposed gates are indeed innovative and can be efficiently applied in existing networks. The use and application of stigmergic technology have proved extremely effective for the optimization of complex problems, and its hardware implementation allows for the simplifying of the management of these networks, without having to resort to the use of time-consuming software processing. This work studies energy management in stigmergic structures and in particular has highlighted how the use of complex logic gates (i.e., with many inputs and many outputs) can drastically reduce the percentage of energy required. To achieve this goal, we started from a simple circuit made up of 2 × 2 gates and then progressively increased its complexity, in terms of the number of gates used or the number of inputs and outputs for each. The simulation of large circuits based on 2 × 2 gates has shown a major limitation in the high power required for control, which increases with network complexity. A great improvement is evidenced by the use of single gates with a large number of input and output channels, indeed larger than the simple 2 × 2 X junctions: the replacement of 3 × 3 ports to 2 × 2 ones used in networks with 10 parallel channels has led to a substantial reduction in the need for control current power of one order of magnitude. Therefore, this work suggests that the improvement of complex signal processing networks can be performed using neuromorphic stigmergic systems, where multichannel ports with an extremely high number of inputs and outputs (quite similar to neurons) can be implemented. The increase in processing channels provides the best possible outcome, by many orders of magnitude, to simplify complex networks and drastically reduce the energy consumption needed to control them. Future evolutions of the presented work will concern the quantification of the maximum number of IN / OUT ports and / or gates necessary to ensure reliable operating of the system and of the maximum number of path splits above which the system cannot work properly. Moreover, we are currently working on adding meta-heuristic optimization methods to the model to make it more general and flexible.
Funding Open access funding provided by Università degli Studi di Roma La Sapienza within the CRUI-CARE Agreement.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/. Fig. 9 Switching of the normalized output currents driven by an increasing of the control current of the 1 terminal in a 10 × 10 stigmergic network based on 3 × 3 gates. In this case, all the inhibited terminals show exactly the same dynamics, and consequently, all trends are represented by a single curve