Multifunctional biological neural networks exploit multistability in order to perform multiple tasks without changing any network properties. Enabling artificial neural networks (ANNs) to obtain certain multistabilities in order to perform several tasks, where each task is related to a particular attractor in the network’s state space, naturally has many benefits from a machine learning perspective. Given the association to multistability, in this paper, we explore how the relationship between different attractors influences the ability of a reservoir computer (RC), which is a dynamical system in the form of an ANN, to achieve multifunctionality. We construct the “seeing double” problem in order to systematically study how a RC reconstructs a coexistence of attractors when there is an overlap between them. As the amount of overlap increases, we discover that for multifunctionality to occur, there is a critical dependence on a suitable choice of the spectral radius for the RC’s internal network connections. A bifurcation analysis reveals how multifunctionality emerges and is destroyed as the RC enters a chaotic regime that can lead to chaotic itinerancy.

Multifunctionality is an emerging area of interest in reservoir computing that opens the door to many new machine learning application areas. Multifunctionality describes the ability of a neural network to perform multiple tasks without changing any network properties. However, there is still relatively little known about how multifunctional reservoir computers (RCs) perform certain tasks, such as reconstructing coexistences of attractors. Questions regarding the relationship between the attractors and how many attractors can coexist become important. In this paper, we shed some light on these issues by exploring the dynamics of a RC when trained to solve the “seeing double” problem. To be more specific, this problem involves training a RC to reconstruct a coexistence of a pair of two-dimensional circular orbits that rotate in opposite directions and can be moved closer together and overlap in state space. We find that the range of RC training parameters where multifunctionality is achieved greatly diminishes as the amount of overlap between the orbits increases. In the extreme case when the orbits are completely overlapping, we examine the nature of the basins of attraction and explore the bifurcation structure of the trained RC. By virtue of its simplicity, the seeing double problem enables us to study the fundamentals and improve the formalism behind how a RC achieves multifunctionality.

## I. INTRODUCTION

A “reservoir computer” (RC) is a dynamical system that can be realized as an artificial neural network (ANN) and trained to solve certain machine learning (ML) problems. As outlined in Ref. 1, Verstraeten *et al.*^{2} coined the term RC to unify the following shared philosophies of Jaeger^{3} and Maass *et al.*^{4}: instead of training all the weights in a network it is sufficient to optimize only the weights of a readout layer to solve a given task. This ideological shift in training ANNs stems from the design of a RC’s internal layer, known as the “reservoir,” whose role is to enable the RC to respond to a sequence of driving inputs that are related to a particular problem. Depending on the nature of the problem, before the RC is trained, it is described as an open-loop (driven) system and its response to a sequence of driving inputs is used to train the RC by producing a readout layer that can, for instance, transform the open-loop RC to a closed-loop (autonomous) system or enable the open-loop RC to generate a desired response to a different input. Using this approach, RCs have been trained to perform tasks such as, decoding neuronal information in brain–machine interfaces,^{5} model-free control of nonlinear systems,^{6,7} predicting critical transitions,^{8,9} and attractor reconstruction.^{10,11}

Within the context of attractor reconstruction, which involves training an open-loop RC to become a closed-loop RC that reconstructs the long-term dynamics of a given attractor, the following question naturally emerges, what is the “reconstruction capacity” of a given RC design? In other words, can a RC be trained to have more than one function and become multifunctional? If so, how many attractors can a given RC reconstruct simultaneously and what are the limiting factors? It is questions like these that motivated the translation of “multifunctionality” from biological neural networks (BNNs) to ANNs using a RC.^{12} Here it was shown that, in a similar fashion to the operational principles of multifunctional neural networks in the brains of humans and other animals, a RC can also be trained to harness its inherent ability to exhibit multistable dynamics and achieve multifunctionality by performing multiple tasks without needing to change any network properties to do so. It is important to make clear that, in the present paper, multifunctionality is regarded as a feature of only the trained closed-loop multistable RC.

While it has been demonstrated that multifunctional RCs can possess exotic multistabilities like, for example, reconstructing coexistences of chaotic attractors from different dynamical systems,^{12–15} several issues arise that do not ordinarily occur in the case of reconstructing only a single attractor. For instance, as shown in Flynn *et al.*,^{14} when training different types of RCs to reconstruct a coexistence of the Lorenz and Halvorsen chaotic attractors, the RCs fail to achieve multifunctionality when the training data describing these attractors are too close together and begin to overlap, i.e., share common regions of state space. However, there is a limit to the level of insight about the relationship between multifunctionality and overlapping training data that can be gained from the above results given this arbitrary choice of chaotic attractors. This subsequently motivates the need for a reductionist approach to study this issue of overlap in a systematic manner.

In this paper, we introduce the “seeing double” problem as a means to explore the dynamics of a RC when trained to achieve multifunctionality in a paradigmatic case of overlapping training data. The seeing double problem involves training a RC to reconstruct a coexistence of two circular orbits that rotate in opposite directions. While these are relatively simple dynamical objects for a RC to reconstruct, we find that the closer together these orbits are the more problematic it becomes for the closed-loop RC to achieve multifunctionality.

In Sec. II, we further discuss the basics of multifunctionality and outline the procedure we use to train a RC to become multifunctional. In Sec. III, we describe how the training data are generated. The results of our numerical experiments are detailed in Secs. IV and V. Here we show that as the orbits are moved closer together, the range of spectral radii of the RC’s internal layer, $\rho $, where multifunctionality is achieved greatly diminishes. Despite these difficulties, we find that for a small range of $\rho $ values the closed-loop RC achieves multifunctionality when the orbits are completely overlapping. We examine the nature of the trained closed-loop RC’s basins of attraction in this extreme case and unearth the existence of several “untrained attractors,” attractors which exist in the trained closed-loop RC’s state space but were not present during the training. We explore the interplay between these untrained attractors and the reconstructed orbits and identify the particular bifurcations responsible for the rise and fall of multifunctionality. The relationship between symmetry and the seeing double problem is discussed in Appendix B. Several other dynamical phenomena are also encountered during our analysis, such as routes to chaos and evidence of chaotic itinerancy. We provide some concluding remarks in Sec. VI.

## II. MULTIFUNCTIONAL RESERVOIR COMPUTERS

### A. Introduction to multifunctionality

Multifunctionality is the term used to describe neural networks that are capable of changing their dynamics on demand of a given duty without needing to alter their synaptic properties. This is a fundamental feature of many neural architectures and is considered to be key to the survival of certain species over time. Multifunctionality is typically found in BNNs with a small number of neurons which are used to perform a set of mutually exclusive tasks. For example, in switching between swimming and crawling motions^{16} or regular breathing, sighing, and gasping.^{17,18} Multifunctionality has been an active area of research in neuroscience since the mid-1980s with seminal work published by Mpitsos and Cohan^{19} and Getting,^{20} followed by review papers by Dickinson^{21} and Marder and Calabrese^{22} and more recently reviewed by Briggman and Kristan.^{23}

At the core of the above examples is a BNN that is capable of changing its activity patterns based on a given input without altering any synapses. From the perspective of dynamical systems, we can say that a multifunctional neural network possesses a multistability. Each task that the network performs there is, in this sense, an attractor associated with it. This attractor is in coexistence with several other attractors in the network’s state space, each of which are distinctly related to the tasks that the network performs.

This multistability interpretation of events dates back to the seminal work of Mpitsos and Cohan,^{19} where the researchers use the term multifunctionality to describe networks in which neurons have multiple dynamical regimes but without altering the strength of the synapses. Through Definition 1 in Sec. II C we provide a more precise definition of multifunctionality in the context of reservoir computing.

It is natural to consider that many more network systems may have the ability to achieve multifunctionality. Where this becomes immediately relevant is in the domain of ML. By harnessing multifunctionality from a ML perspective, it can be used to unlock additional computational capabilities of certain ANNs which would otherwise have remained dormant.

Moreover, training ANNs to achieve multifunctionality is highly advantageous from a practicality point of view as it has the potential to broaden the network’s functional capacity to solve multiple tasks using the same set of trained weights. As multifunctionality brings multistability into the world of ML, this, in turn, opens the door for many new application areas.

The development of multifunctional RCs came as a result of recognizing that since a multifunctional neural network in principle resembles a system with a coexistence of attractors, and that a RC can be trained to reconstruct the dynamics of an attractor, then by extending this formalism a RC was trained to exhibit multifunctionality by reconstructing a coexistence of attractors.^{12}

### B. Reservoir computing

The RC that is studied throughout this paper was presented by Lu *et al.*^{11} To outline the steps in how this RC is trained to reconstruct a coexistence of attractors and achieve multifunctionality, let us first consider the case of training this RC to reconstruct the dynamics of a single attractor, $ A\u2282 R D$, given access to a trajectory on $ A$ described by a vector $u(t)\u2208 A$.

^{3}The $tanh$ “activation function” is a pointwise operation and is defined as $tanh\u2061 ( \u22c5 ): R N\u2192 R N$. The topology of the network is described by the adjacency matrix, $M\u2208 R N \xd7 N$. The input strength parameter, $\sigma $, and the input matrix, $ W i n\u2208 R N \xd7 D$, when multiplied together represent the weight given to $u(t)$, as it is projected into the open-loop RC. The steps involved in constructing $M$ and $ W i n$ are outlined in Appendix A.

In our results, the spectral radius of $M$, which is denoted by $\rho $, is shown to play a crucial role in training this RC design to solve the seeing double problem and achieve multifunctionality. $\rho $ is tuned by rescaling the elements of $M$ such that the maximum of the absolute values of its eigenvalues is $\rho $. $\rho $ has also been a key parameter in our previous results on training a RC to achieve multifunctionality.^{12–14}

We now describe the specifics of the listening and training stages we mentioned earlier. The listening stage is described as the duration of time where Eq. (1) is driven by $u(t)$ for $0\u2264t\u2264 t listen$, where $ t listen< t train$ is chosen such that $r(t)$ is determined by a history of driving inputs and is no longer dependent on its initial condition.

^{13,24}

We say the closed-loop RC has achieved attractor reconstruction when the long-term dynamical characteristics of $ u ^(t)$ are indistinguishable from $u(t)$. In this scenario, there exists an attractor $ S\u2282 S$ such that when the state of the closed-loop RC approaches $ S$ and is projected from $ S$ to $ P$ via $ \psi ^ ( \u22c5 )$, the dynamics of the “reconstructed attractor,” $ A ^\u2282 P$, will resemble the dynamics of $ A$ in the long-term. By resembling the long-term dynamics it is meant that, for instance, $ A$ and $ A ^$ will have nearly identical Poincaré sections when computed for the same region of $ R D$ and $ P$ as $t\u2192\u221e$ for $t> t train$.

### C. Training a RC to become multifunctional

Using the terminology we have established, we now define multifunctionality in the context of having successfully trained the closed-loop RC in Eq. (10) to reconstruct a coexistence of $n$ attractors, $ A 1\u2282 R D$, $ A 2\u2282 R D$, $\u2026$, $ A n\u2282 R D$, given input training data from each of, $ u ( A 1 )(t)\u2208 A 1$, $ u ( A 2 )(t)\u2208 A 2$, $\u2026$, $ u ( A n )(t)\u2208 A n$, for $0<t\u2264 t train$.

The closed-loop RC, defined in Eq. (10), achieves multifunctionality if for every $ A j$, for $j=1,\u2026,n$, there exists a corresponding attractor $ S j\u2282 S$ such that the projection of each $ S j$ from $ S$ to $ P$ via $ \psi ^$ resembles the long-term dynamics of the respective $ A j$.

The projection of a given $ S j$ from $ S$ to $ P$ is also referred to as the reconstructed attractor $ A ^ j\u2282 P$. What Definition 1 says it that in order for a RC to achieve multifunctionality it is necessary for it to inherit the ability to **perform multiple tasks using the same readout matrix**, $ W o u t$, **and without changing any other structural properties of the RC**.

The steps involved in computing $ W o u t$ from Sec. II B are adapted for the case of multifunctionality. For simplicity, let us first consider the case of reconstructing a coexistence of two attractors, $ A 1\u2282 R D$ and $ A 2\u2282 R D$.

The closed-loop RC is then described by the same autonomous continuous-time dynamical system as in Eq. (10) using $ W o u t$ that is obtained from Eq. (14). If multifunctionality is achieved, then we refer to the resulting multistable closed-loop RC as the “multifunctional RC.”

As per Definition 1, for each $ A 1$ and $ A 2$, there exist two coexisting attractors $ S 1, S 2\u2282 S$ such that when the state of the multifunctional RC approaches either $ S 1$ or $ S 2$ and is projected from $ S$ to $ P$ using $ \psi ^ ( \u22c5 )$ as in Eq. (3), then the long-term dynamics of the reconstructed attractors, $ A ^ 1$ and $ A ^ 2$, will resemble the long-term dynamics of $ A 1$ and $ A 2$.

Therefore, to reconstruct the dynamics of either $ A 1$ or $ A 2$, the multifunctional RC needs to be initialized with the corresponding $ r ^ ( 0 )= r ( A 1 ) ( t t r a i n )$ or $ r ( A 2 ) ( t t r a i n )$, or some other initial condition that is in the basin of attraction of the corresponding $ S 1$ or $ S 2$.

The same steps as outlined in Sec. II C can be extended in order to produce a multifunctional RC that reconstructs a coexistence of $n$ attractors, $ A 1, A 2,\u2026, A n$. All that is required is to produce the corresponding $ X C= [ X ( A 1 ) , X ( A 2 ) , \u2026 , X ( A n ) ]$ and $ Y C= [ Y ( A 1 ) , Y ( A 2 ) , \u2026 , Y ( A n ) ]$ and solve for $ W o u t$ as in Eq. (14).

### D. Summary of previous work

As mentioned previously, multifunctionality was first translated from BNNs to ANNs in Flynn *et al.*^{12} Here, it was shown that the same RC design as in Eq. (1) can be trained to reconstruct a coexistence of chaotic attractors from a multistable system, different parameter settings of the same system, and two systems with different nonlinearities. The issues of choosing appropriate training parameters, differences in the timescales of the chaotic attractor’s dynamics, and the existence of untrained attractors are also investigated. Independent of these results, Herteux and Ráth^{24} also demonstrated how to train a RC to reconstruct a coexistence of chaotic attractors using the same training technique described in Sec. II C. The phenomena which arise when training Eq. (1) to reconstruct a coexistence of attractors that are related by certain symmetries are explored in Flynn *et al.*,^{13} the analytical and numerical results presented here show how a RC can adapt to and take on the symmetry of the trained system spontaneously. In Flynn *et al.*^{14}, the ability of different types of RCs to achieve multifunctionality in the presence of overlapping training data is assessed. The present paper extends on the above results in many ways. Moreover, it is thanks to the seeing double problem’s simplicity that we are able to more rigorously examine the dynamics and improve the formalism behind how a RC achieves multifunctionality.

Since the first results regarding multifunctionality in a RC,^{12} it has been discovered that a given $ W o u t$ can enable a RC to perform more than one task using different principles to those involving multifunctionality. In this context, the so-called “parameter-aware” RCs have been trained to interpolate and extrapolate the dynamics of a system such as those studied in Kim *et al.*,^{25} Kong *et al.*,^{26,27} and Fan *et al.*^{28} To do this, an additional parameter input channel is incorporated into the RC’s architecture during training so that, in this case, the closed-loop RC performs a task associated with a given parameter value and $ W o u t$ remains fixed after the training. In these examples of parameter-aware RCs, it is shown that the RC can go through similar bifurcations to the attractor from the dynamical system used to generate the training data without necessarily needing to be trained on data after bifurcation takes place. In future work, it would be interesting to investigate the dynamical principles behind how this is achieved and how this relates to the phenomenon of untrained attractors as presented in Flynn *et al*.^{12} These attractors form a key aspect of our analysis in Sec. V. Furthermore, while multifunctionality has so far not been studied using these parameter-aware RCs, we comment that a “multifunctional parameter-aware” RC may further enhance the reconstruction capacity of a given RC.

## III. SEEING DOUBLE

The “seeing double” problem is introduced in this section. This numerical experiment is designed as a means to systematically induce the issues related to multifunctionality and overlapping training data.

This task involves training a RC to reconstruct a coexistence of attractors that follow trajectories on two circular orbits of equal radius, rotate in opposite directions, and the centers of these orbits can be moved either closer together or further apart. When these orbits are overlapping, the RC is therefore required to distinguish between points in $ R D$ that are common to both cycles in order to exhibit multifunctionality.

### A. Numerical experiment setup

We say that this closed-loop RC achieves multifunctionality and solves the seeing double problem once it reconstructs a coexistence of two attractors, $ S A$ and $ S B$, that exist in $ S$ and resemble $ C A$ and $ C B$ when projected to $ P$ using $ \psi ^ ( \u22c5 )$ as in Eq. (3) with $ W o u t$ as mentioned above. As per the same convention used earlier, these projected dynamics of $ S A$ and $ S B$ are referred to as the reconstructed attractors and denoted by $ C ^ A$ and $ C ^ B$. To reconstruct the dynamics of $ C A$ or $ C B$ using this multifunctional RC, we initialize Eq. (10) with $ r ^(0)= r ^ ( C A )(0)= r ( C A )( t listen)$ or $ r ^(0)= r ^ ( C B )(0)= r ( C B )( t listen)$ or some known point in the basin of attraction of $ S A$ or $ S B$. The subsequent states of Eq. (10) when approaching $ S A, S B\u2282 S$ ( $ C ^ A, C ^ B\u2282 P$) are written as $ r ^ ( C A )(t)$ and $ r ^ ( C B )(t)$.

In this paper, $ b x$ and $ b y$ are set to $ b x= b y=5$ to create $ C A$ and for $ C B$, $ b x=\u22125$ and $ b y=5$. The centers of $ C A$ and $ C B$ are brought closer together by changing the values of $ ( x c e n , y c e n )$. In order to simplify the experiment further, $ C A$ and $ C B$ are designed to be centered at $ ( x c e n , 0 )$ and $ ( \u2212 x c e n , 0 )$, respectively. Therefore, by changing $ x c e n$ the centers of these cycles are moved equidistantly along the line $y=0$. In this case, an overlapping region between $ C A$ and $ C B$ exists whenever $ | x c e n |\u2264b=5$, i.e., $ C A\u2229 C B\u2260\u2205$ $\u2200 | x c e n |\u22645$. Furthermore, $ C A$ and $ C B$ are said to be “entirely/completely overlapping” when $ x c e n=0$. In this extreme case, the only difference between $ C A$ and $ C B$ is the direction of rotation on both cycles.

### B. Illustrating issues of overlap

The orbits $ C A$ and $ C B$ produced from Eq. (15) are depicted in Fig. 1 with $ u ( C A )$ and $ u ( C B )$ plotted in the $(x,y)$-plane for a given $ x c e n$. The green arrows indicate the direction of rotation in which an orbit along these circles evolves upon in time.

Figure 1(a) shows that the cycles do not overlap when $ x c e n=\u22125.5$. However, when $ | x c e n |\u22645$, like in Fig. 1(b) for $ x c e n=\u22123$, the orbits share similar regions of the $ ( x , y )$-space. This presents a challenge for the resulting closed-loop RC to remain on the correct path when its state approaches the point where these cycles intersect as indicated by the green arrows at the crossing point in Fig. 1(b). If the RC fails to distinguish between these overlapping cycles then, for example, the state of the RC may move onto a different path [as indicated by the red arrow in Fig. 1(b)] or potentially result in an attractor merging crisis scenario.

Therefore, when there is an overlap between $ C A$ and $ C B$, the state of the open-loop RC must contain sufficient knowledge of its previous states during the training so that after the training the closed-loop RC remains on the correct path when approaching a crossing between $ C A$ and $ C B$. In Sec. IV it is found that by changing the spectral radius, $\rho $, of the RC’s internal connections, which as a result tunes the weight given to the RC’s previous states, it is possible to overcome the issue of overlap.

## IV. SEEING DOUBLE WITH A MULTIFUNCTIONAL RC

The focus of this section is to explore the dynamics of the closed-loop RC in Eq. (10) after it is has trained to solve the seeing double problem. Here we show that as the difficulty of the seeing double problem is varied according to changes in $ x c e n$ (the amount of overlap between $ C A$ and $ C B$ and the nearer they are to one another), the more “memory” is required of the RC and consequently the spectral radius, $\rho $, plays a more significant role. In this instance, we do not use the word memory in a quantitative sense but in how it relates to a property of this RC design that, during the training, by increasing $\rho $ up to a certain point the state of the RC depends not only on the current input but also previous inputs. In other words, the RC has a greater ability to recall information from the past.

The results in this section are generated by training the RC using the method outlined in Sec. II C using the input data, $ u ( C A )(t)$ and $ u ( C B )(t)$ constructed as described in Sec. III A. The RC training and design parameters are specified in Table II and the same $M$ and $ W i n$ matrices are used to produce the results presented throughout this paper.

While the results that follow are computed using just one random realization of $M$ and $ W i n$, we do not claim that our results are universal across all possible $M$ and $ W i n$. At the same time, the analysis tools we use throughout this paper provide significant insight toward how a RC solves the seeing double problem and are applicable to all random realizations of $M$ and $ W i n$. Where appropriate, we highlight certain features of our results that appear across several random realizations of $M$ and $ W i n$ and other features that may be heavily dependent on the particular $M$ and $ W i n$ that is used to generate our results.

### A. Exploring multifunctionality in (*x*_{cen}, *ρ*)-plane

*ρ*

We now explore the long-term dynamics of the closed-loop RC [described in Eq. (10)] when initialized with $ r ^(0)= r ( C A )( t listen)$ and $ r ^(0)= r ( C B )( t listen)$, as viewed from $ P$, for a given $ x c e n\u2208 [ \u2212 10 , 10 ]$ and $\rho \u2208 [ 0.1 , 2.5 ]$.

#### 1. Prediction analysis

After the training, a number of outcomes are possible. If the training is successful, then $ C ^ A\u2248 C A$ and $ C ^ B\u2248 C B$ and the closed-loop RC’s predicted trajectory on either $ C A$ or $ C B$ will remain on $ C ^ A$ or $ C ^ B$ in the long-term ( $t\u2192\u221e$). However, given the nature of the seeing double problem, it is also possible for the predicted trajectory to switch from $ C ^ A$ to $ C ^ B$ or vice versa if the RC fails to lift the corresponding driving input data, $ u ( C A )(t)$ and $ u ( C B )(t)$, into separate regions of $ S$. Furthermore, if the RC fails to reconstruct $ C A$ or $ C B$ then the dynamics of Eq. (10) can, for example, decay to a fixed point, some other limit cycle, or never settle down to periodic behavior and display evidence of the RC entering a chaotic regime.

An error metric known as the “roundness” is used to assess the accuracy of the RC’s reconstruction of a given orbit. The roundness of a given cycle, $ C$, is denoted by $\delta ( C )$ and is found by calculating the difference between the radii of the maximum and minimum circles needed to enclose and inscribe the cycle. For simplicity, the centers of these maximum and minimum circles are taken to be located at the center of the given target orbit. It was found empirically that if the relative roundness of a given cycle, $ \delta r e l ( C )=\delta ( C )/b$, was $< \delta r e l +=0.25$, then the RC is in general able to successfully reconstruct the desired orbit with a high level of accuracy. This error metric is typically used in the production of circular shaped materials, like plastic tubes or copper pipe, and the formula to calculate the roundness is found in most machining manuals in line with the International Organisation for Standardisation (ISO).

The RC’s reconstruction of a given orbit is characterized as the particular attractor that the state of the closed-loop RC is approaching for $ t predict\u2212 t \u2217\u2264t\u2264 t predict$ where $ t predict=600$ and $ t \u2217=40$ as viewed from $ P$. The result of this is displayed in Figs. 2(a)–2(b) where each point in the $ ( x c e n , \rho )$-plane is colored according to the specifications in Table I.

Blue | Correct cycle is reconstructed and $ \delta r e l ( C )< \delta r e l +$. |

Yellow | Prediction switches to the other cycle. |

Magenta | Prediction does not settle down to periodic motion |

and label this as some attractor, $ S$. | |

Black | Prediction tends to some other limit cycle |

or $ \delta r e l ( C )\u2265 \delta r e l +$, this attractor is labeled as, LC. | |

Green | Prediction decays toward some fixed point labeled as FP. |

Blue | Correct cycle is reconstructed and $ \delta r e l ( C )< \delta r e l +$. |

Yellow | Prediction switches to the other cycle. |

Magenta | Prediction does not settle down to periodic motion |

and label this as some attractor, $ S$. | |

Black | Prediction tends to some other limit cycle |

or $ \delta r e l ( C )\u2265 \delta r e l +$, this attractor is labeled as, LC. | |

Green | Prediction decays toward some fixed point labeled as FP. |

In order to deduce the regions of the $ ( x c e n , \rho )$-plane in which multifunctionality was achieved, an additional picture is provided in Fig. 3 where the common blue regions of Figs. 2(a) and 2(b) are identified and the larger of the $ \delta r e l ( C )$ values when assessing the accuracy of the closed-loop RC’s reconstruction of $ C A$ and $ C B$, defined as $ \delta r e l m a x=max ( \delta r e l ( C ^ A ) , \delta r e l ( C ^ B ) )$, is plotted for each point in the $ ( x c e n , \rho )$-plane.

#### 2. Regions of multifunctionality

The relationship between overlapping training data, multifunctionality, and $\rho $ becomes evident in Figs. 2 and 3 where a “Goldilocks effect” is found to occur. By this, it is meant that if $\rho $ is too small or too large then the closed-loop RC fails to achieve multifunctionality. When the orbits are furthest apart, we see that the closed-loop RC is multifunctional even at small values of $\rho $. However, as the orbits are moved closer together and begin to overlap (i.e., when $ C A\u2229 C B\u2260\u2205$), then the closed-loop RC requires a much larger $\rho $ in order to distinguish between the cycles and prevent the predicted trajectories from decaying to a fixed point or some other limit cycle. At the same time, if $\rho $ is too large, the closed-loop RC fails to reconstruct either orbit regardless the investigated values of $ x c e n$ and displays evidence of chaos.

We comment that from further inspection there are some subtle differences in the results for different $M$ and $ W i n$; however, this Goldilocks effect is a consistent feature.

Furthermore, it is important to note that a near symmetric set of results occur about $ x c e n=0$ in all Figs. 2 and 3, some insight to this is provided in Appendix B 1.

#### 3. $ C A$ and $ C B$ rotating in the same direction

To provide a comparison, the same RC (constructed via the parameters in Table II) is trained to reconstruct a coexistence of $ C A$ and $ C B$ except, in this case, both cycles are rotating in the same direction. This is done by setting $ b x= b y=5$ for both $ C A$ and $ C B$ in Eq. (15). We examine the regions of multifunctionality in the $ ( x c e n , \rho )$-plane and these are computed using the same procedure that produced Fig. 3.

N
. | P
. | ρ
. | σ
. | γ
. | β
. | t_{listen}
. | t_{train}
. |
---|---|---|---|---|---|---|---|

1000 | 0.04 | [0.1, 2.5] | 0.2 | 5 | 10^{−2} | 200 | 400 |

N
. | P
. | ρ
. | σ
. | γ
. | β
. | t_{listen}
. | t_{train}
. |
---|---|---|---|---|---|---|---|

1000 | 0.04 | [0.1, 2.5] | 0.2 | 5 | 10^{−2} | 200 | 400 |

The result of the above is presented in Fig. 4 where a similar phenomenon to Fig. 3 is shown to occur, once the overlap is introduced then multifunctionality is achieved only when $\rho $ is sufficiently large. However, the main difference between Figs. 4 and 3 is the trivial case for $ x c e n=0$ as $ C A$ and $ C B$ are the exact same and the closed-loop RC has no issue reconstructing the dynamics for $\rho \u2208 [ 0.1 , 1.7 ]$. For $\rho >2.1$, the RC fails to become multifunctional $\u2200 x c e n\u2208 [ \u2212 10 , 10 ]$.

### B. Transition to chaotic dynamics

#### 1. Dynamics before chaos

In Figs. 3 and 4, we find that for a given value of $ x c e n$ and $\rho $, the smallest error, i.e., the smallest $ \delta r e l m a x$ value, occurs in many instances before the closed-loop RC’s behavior becomes chaotic for large $\rho $. This transition to chaos is quantified in Figs. 3 and 4 by the green and cyan curves which show the location where the largest Lyapunov exponent (LLE), denoted by $ \lambda MAX$, first becomes larger than $ \lambda C=0.01$ when increasing $\rho $ for a given $ x c e n$. We do this in order to indicate, within some measurement error, that $ \lambda MAX$ is positive.

Figure 4 shows that this transition to chaotic dynamics appears in the same vicinity of $\rho $ values as it does in Fig. 3 for $ | x c e n |\u22731.5$. As the same RC design is used in both cases, this suggests that the location of this transition may also arise as an intrinsic property of the RC rather than solely being related to the nature of the task itself.

While the above comment is only speculation, some progress has been made in answering questions of this nature. For instance, Jiang and Lai^{29} conducted many extensive experiments which provide significant insight toward assessing the role of $\rho $ in the performance of a RC when training 100 random realizations of this RC in attractor reconstruction problems. The central result from Jiang and Lai’s experiments is that, for a given RC, there exists an interval of $\rho $ values where optimal or near-optimal performance is achieved. A similar phenomenon is seen to occur in Figs. 3 and 4 which compliments the work of Jiang and Lai and also offers additional information as Figs. 3 and 4 both show that as the difficulty of the task is varied (by changing $ x c e n$) then the width of these intervals change accordingly.

We remark that in studies involving the training of input-driven RCs [after the training the readout function does not replace the driving input like in Eq. (10)], a similar phenomenon known as the “edge of chaos” or the “edge of stability” and has been the focus of many investigations which suggest that RCs achieve optimal computational capacity at the edge of chaos.^{30–32} However, Carroll^{33} presents several examples of RCs which perform better on certain problems just prior to crossing the edge of chaos.

#### 2. Dynamics after chaos

In some cases, after the transition to chaotic dynamics, an interesting sequence of events is found to occur when increasing $\rho $ past the point of where multifunctionality is no longer achieved. As an example, Fig. 5 illustrates the changes in the dynamics of Eq. (10) as viewed from $ P$ as $\rho $ is increased from $1.864$ to $1.944$ in the case where $ x c e n=6.5$. In relation to Figs. 2(a) and 2(b), the long-term dynamics of the closed-loop RC when trained at these $\rho $ values and initialized from $ r ^ ( C A )$ or $ r ^ ( C B )$ are color-coded as magenta, indicating that the state of Eq. (10) does not settle down to periodic motion.

Figure 5 shows that for $\rho =1.864$ and $1.904$, the dynamics of both $ C ^ A$ and $ C ^ B$ begin to occupy larger and larger regions of $ P$. This behavior continues up to a point where the closed-loop RC loses multistability and the state of Eq. (10) begins to switch from one orbit to the other and back again, shown here for $\rho =1.944$.

While further analysis is required in order to determine the route of these switching dynamics, it is possible that the closed-loop RC has entered into the dynamical regime known as “chaotic itinerancy.” Chaotic itinerancy^{34–36} describes the dynamical phenomenon of an autonomous switching process whereby the state of a given autonomous dynamical system switches between several “attractor ruins” or “quasi-attractors.” These were previously coexisting attractors that are now connected to form one global attractor. The quasi-attractors retain much of their original features except trajectories on these quasi-attractors leak into each other. In the case of Fig. 5 for $\rho =1.944$, $ C ^ A$ and $ C ^ B$ exhibit these quasi-attractor properties. The state of the closed-loop RC wanders between visiting different regions of $ P$ associated with attractor ruins of the previously coexisting $ C ^ A$ and $ C ^ B$. The corresponding time traces of the reconstructed $x$ variable (as shown in the middle right in Fig. 5) provide a clearer picture of the switching dynamics between attractor ruins as emphasised by the arrows in the associated $ P$ (middle left panel in Fig. 5). After simulating the dynamics of Eq. (10) up to $t=1000000$ in this metastable regime from $ r ^ ( 0 )= r ( C A ) ( t t r a i n )$, we find that there are over $200$ switchings between the two quasi-attractors. In the bottom panels, we also plot the distribution of time spent in each quasi-attractor, labeled here as $ C ~ A$ and $ C ~ B$. These plots show that the state of the closed-loop RC spends a far greater amount of time in $ C ~ A$ as opposed to $ C ~ B$. In future work, we aim to explore the relationship between $\rho $ and the resulting distribution of residence times in each quasi-attractor.

It is important to stress here that there is no external input used to generate the switching dynamics shown in Fig. 5 as it is an intrinsic property of the closed-loop RC after it loses multifunctionality and subsequently multistability. This differs from previous cases where RCs were trained to switch between learning different chaotic and periodic attractors based on an external input like, for example, in the work of Inoue *et al.* in Ref. 37 and Lu and Bassett in Ref. 38. In these scenarios, $ W o u t$ is updated online in response to a given driving input from an individual attractor and only one attractor is shown to exist at each point in time.

### C. Achieving multifunctionality when *x*_{cen} = 0

#### 1. Dynamics in $ P P$

From a dynamical systems perspective, it is remarkable that the closed-loop RC reconstructs a coexistence of $ C A$ and $ C B$ when these share similar regions of state space. However, the most striking result from Fig. 3 is that the closed-loop RC reconstructs a coexistence of these orbits even when they are completely overlapping, i.e., when $ x c e n=0$. In this extreme scenario, multifunctionality is achieved for a small range of $\rho $ values, specifically for $1.1\u2264\rho \u22641.4$. The most accurate reconstruction of both orbits is achieved when $\rho =1.25$.

Figure 6 highlights how values of $ \delta r e l m a x$ differ in regions where multifunctionality was achieved, for instance, $ \delta r e l m a x\u22480.062,0.019,0.125$ for $\rho =1.1,1.25,1.4$, respectively. These account for the slightly off-circular reconstructions of $ C A$ for $\rho =1.1$ and $ C B$ for $\rho =1.4$ as shown in Fig. 6.

Examples where the closed-loop RC fails to achieve multifunctionality just outside the small window of $\rho $ values identified in Fig. 3 are also illustrated in Fig. 6 for $\rho =1.7$ and $0.8$. Here the chaotic-like behavior of the closed-loop RC is seen for $\rho =1.7$. What is important to note in this example is that shape swept out by the closed-loop RC’s trajectories when initialized from both $ r ^(0)= r ( C A )( t listen)$ and $ r ^(0)= r ( C B )( t listen)$ is bounded to regions nearby the original circular orbits, however the direction of rotation is not preserved.

Figure 6 also shows that when the reconstruction of both $ C A$ and $ C B$ fails for $\rho =0.8$ then the state of Eq. (10) approaches the same limit cycle which bears no resemblance to either $ C A$ and $ C B$. The role this limit cycle plays in how the closed-loop RC solves the seeing double problem is assessed in Sec. V.

Much of the following results in this paper focus on exploring the dynamics of the closed-loop RC in this “simplest hardest” case, “simplest” in terms of the dynamics being limit cycles and “hardest” as the training data are entirely overlapping. We comment that, from analysis not shown in the present paper, the small range of $\rho $ values where multifunctionality is achieved is relatively consistent across several random realizations of $M$ and $ W i n$.

#### 2. Dynamics in $ S S$

Before discussing these further results, we wish to provide some insight toward the internal dynamics of the multifunctional RC and how the behavior of the individual neurons differ when reconstructing either $ C A$ or $ C B$ in the case where $ x c e n=0$. Figure 7 depicts a representative example of how the dynamics of the same set of neurons can significantly differ in $ S$ as the state of the multifunctional RC approaches either $ S A$ or $ S B$ while the only difference between the projected dynamics (the dynamics of the reconstructed attractors, $ C ^ A$ and $ C ^ B$), is the direction of rotation. To place a stronger emphasis on the fact that we are now examining the dynamics of $ S A$ and $ S B$, in this section we refer to the corresponding states of Eq. (10) as $ r ^ ( S A )(t)$ and $ r ^ ( S B )(t)$. Figure 7 highlights how the state of the multifunctional RC’s neurons $9,25,50,88,103,250,400$, and $650$ evolve over time [starting from when Eq. (10) is initialized with $ r ^ ( 0 )= r ^ ( S A )(0)= r ( C A ) ( t t r a i n )$ or $ r ^ ( 0 )= r ^ ( S B )(0)= r ( C B ) ( t t r a i n )$] for the case of $\rho =1.25$ whose dynamics in $ P$ are shown in Fig. 6. It is found that many neurons behave similarly to each other when the state of the multifunctional RC approaches either $ S A$ or $ S B$, see the dynamics of $ r ^ 650$ in Fig. 7 as an example. At the same time, Fig. 7 shows that the behavior of many other neurons may bare no resemblance to one another. While all neurons exhibit periodic dynamics, some neurons oscillate with multiple local maxima, however, what is consistent across all neurons is that they each have the same period of rotation.

In order to provide further insight to the dynamics of the individual neurons, we now continue our study of the multifunctional RC in the above case where $\rho =1.25$ and $ x c e n=0$. We now examine how the dynamics of these neurons differs when the state of the multifunctional RC approaches the same point on each reconstructed attractor in $ P$, i.e., when $ x C ^ A(t)\u2212 x C ^ B(t)=0$ where $ x C ^ A(t)$ and $ x C ^ A(t)$ denote the location of the $x$-variable in $ P$ at a given time $t$ [starting from when Eq. (10) is initialized] when reconstructing $ C A$ and similarly for $ C B$. Note that the associated $y$-variables are always equal for all values of $t$, this is why we need only look at the $x$-variable. Using the same notation convention as for $ x C ^ A$ and $ x C ^ B$, in the top panel of Fig. 8 we plot how the difference between $ r ^ S A$ and $ r ^ S B$ evolves over time. To convey how these $N=1000$ neurons behave, we do this by generating a histogram at each time step of the simulation which describes how many components of $ r ^ S A(t)\u2212 r ^ S B(t)$ have a particular value at a given time $t$. These values are confined to be within $\u22122$ and $2$ (which is the maximum and minimum allowed values due to the $tanh$ activation function in the RC design) in intervals of $0.02$ (which is the bin width of the histograms and is chosen to show sufficient details of the dynamics at an appropriate resolution). In the lower panel, we plot the evolution of the corresponding difference between $ x C ^ A$ and $ x C ^ B$.

From Fig. 8, it is evident that at times when $ x C ^ A(t)\u2212 x C ^ B(t)\u22480$, even though many neurons fire identically the crucial aspect for multifunctionality is that not all neurons fire identically as evidenced by the relatively wide distribution of the values of the components of $ r ^ S A(t)\u2212 r ^ S B(t)$ at these particular times. We also see here that the greater the distance between points on each reconstructed attractor, i.e., when $ | x C ^ A\u2212 x C ^ B |$ grows larger, the greater the difference between $ r ^ S A$ and $ r ^ S B$ (the wider the distribution of the firing patterns).

### D. Projected basins of attraction for *x*_{cen} **=** 0

The focus of this section is to provide some insight toward the nature of the basins of attraction created by the closed-loop RC in order to solve the seeing double problem in the extreme case of $ x c e n=0$.

#### 1. Method of generating the basins

Considering the dimension of the closed-loop RC ( $N=1000$), to determine the precise location of the basins of attraction in $ S$ for both $ S A$ and $ S B$ is highly expensive. Instead, to get some insight about the structure of these basins, we examine how the state of the closed-loop RC evolves from the open-loop RC’s representation of different points in $ R D$. From this, it is possible to see how $ P$ is split to accommodate a coexistence of $ C ^ A$ and $ C ^ B$ when $ C A$ and $ C B$ are completely overlapping.

To be more specific, for a given $\rho $ and $ x c e n=0$, we drive Eq. (1) with a point in $ R D$ from $t=0$ to $t= t listen$. After this time, the state of Eq. (1) converges to a representation of the point in $ R N$. This response vector is labeled as $ r D=r( t listen)$. The corresponding closed-loop RC is then initialized with $ r ^(0)= r D$ and the long-term behavior of Eq. (10) is characterized from this initial condition.

#### 2. Basins for *ρ* **=** 1.25

*ρ*

The projected basins of attraction for $\rho =1.25$, which is the case where multifunctionality was achieved with the best accuracy, is shown in Fig. 9. Each point in Fig. 9 describes which attractor Eq. (10) approaches in $ P$ for a given point in $ R D$. If the state of Eq. (10) approaches $ C ^ A$, then the point is colored blue and similarly for $ C ^ B$, the point is colored orange. There is one exception, when Eq. (1) is driven with $ ( 0 , 0 )$, its state remains at the origin and so too does Eq. (10), this is colored gray. The reconstructed attractors, $ C ^ A$ and $ C ^ B$, are both plotted in black.

Figure 9 shows how $ C ^ A$ and $ C ^ B$ share $ P$ and that the number of points which converge to either attractor is not evenly distributed. In particular, most of the points closest to the location of the reconstructed attractors in $ P$ tend toward $ C ^ A$. Furthermore, there is no single curve which entirely divides the boundary between the basins of $ C ^ A$ and $ C ^ B$ in Fig. 9, at the same time, a more regular or complex pattern may occur in $ S$. Nonetheless, the method used to produce Fig. 9 provides an indication that the basin of attraction for the attractor $ S A$ in $ S$, which when projected to $ P$ describes $ C ^ A$, is of a larger volume than the basin for $ S B$ in $ S$. We comment that this result may not be the case across all random realizations of $M$ and $ W i n$.

#### 3. Basins for *ρ* **=** 0.9, 0.8, 0.4, 0.3

*ρ*

In order to gain a broader understanding of the closed-loop RC’s dynamics when it fails to distinguish between $ C A$ and $ C B$, we now study the different basins of attraction which exist before the closed-loop RC exhibits multifunctionality. The same procedure which generated the basins for $\rho =1.25$ is now used to find the projected basins of attraction in $ P$ when setting $\rho =0.9,0.8,0.4$, and $0.3$ in the case of $ x c e n=0$.

Prior to achieving multifunctionality, Fig. 2 shows that the closed-loop RC is able to reconstruct $ C B$ before $ C A$. For $\rho =0.9$, Fig. 10(a) illustrates that in addition to $ C ^ B$ there are other basins of attraction for a limit cycle labeled as LC $ 1$ and a quasi-periodic torus labeled as T $ 1$. So while the aim is to reconstruct a coexistence of $ C A$ and $ C B$, there are other attractors that can be approached from an abundance of initial conditions. These untrained attractors, are attractors that exist in $ P$ but were not present during the training, these attractors were also found in Flynn *et al.*^{12}

In the case where neither $ C A$ or $ C B$ can be reconstructed, for example, when $\rho =0.8$ as seen in Figs. 2 and 6, Fig. 10(b) shows that there are basins of attraction for two different limit cycles, LC $ 1$ from Fig. 10(a) and another limit cycle denoted as LC $ 2$. So at one point before achieving multifunctionality, there is a coexistence of two different limit cycles in $ P$.

When setting $\rho =0.4$, Fig. 10(c) reveals that four fixed points $ FP 1$, $ FP 2$, $ FP 3$, and $ FP 4$ are the only stable attractors which populate $ P$. Far away from the origin it can be seen that $ P$ is split into nearly equal quadrants. However, closer to the origin there is a greater interaction between the basins resulting in the emergence of a fractal pattern. A similar result is found when setting $\rho =0.3$ in Fig. 10(d) with fractal basins boundaries appearing closer to the origin. For further reading on fractal basin boundaries and the difficulties these cause in predicting the long-term behavior of a dynamical system see: Grebogi *et al.*^{39,40} and McDonald *et al.*^{41}

The symmetrical properties of the basins discussed in the present section are analyzed in Appendix B.

## V. SEEING DOUBLE DYNAMICS

Section IV outlines where multifunctionality is achieved in the $ ( x c e n , \rho )$-plane by assessing the long-term dynamics of the closed-loop RC given by Eq. (10). However, from Figs. 2(a), 2(b), and 10, it appears that the closed-loop RC must overcome the influence of several untrained attractors before either $ C A$ or $ C B$ can be reconstructed. From our previous work in Flynn *et al.*,^{12} it is clear that there are many advantages to treating Eq. (10) like any other dynamical system as by exploring the closed-loop RC’s dynamics through a bifurcation analysis further advancements on, for instance, how the RC learns to solve a given problem can be made. In this section, the interplay between the untrained attractors and the reconstructed attractors is investigated in greater detail and the particular bifurcations through which the RC learns how to solve the seeing double problem are identified.

### A. Bifurcation analysis for *x*_{cen} = 0

In Sec. IV D, multiple fixed points, limit cycles, and a torus were found to coexist in $ P$ at different $\rho $ values. However, according to the results shown in Fig. 9, these attractors seemingly vanish from $ P$ as multifunctionality is achieved. Moreover, for a small change in $\rho $ there is also a small change in the location of these fixed points and the nature of these limit cycles. This intriguing behavior warrants further investigation in order to establish the suggested link between these untrained attractors and the reconstructed attractors.

Taking the above statements into account, the changes in the dynamics of the fixed points, $ FP 1$, $ FP 2$, $ FP 3$, and $ FP 4$, shown in Figs. 10(c)–10(d) are now tracked with respect to changes in $\rho $. The same tracking procedure in Flynn *et al.*^{12} is used here which consists of the following: the changes in the dynamics of a given attractor with respect to, for instance, $\rho $ is tracked by repeating the process of incrementally changing $\rho $, retraining, and initializing the state of the closed-loop RC with the attractor corresponding to the previous $\rho $. If there is a change in the dynamics of the closed-loop RC, for instance, a bifurcation from a fixed point to limit cycle or a period-doubling (P-D) bifurcation, then the dynamics of the resulting stable attractor is tracked. Figure 11 shows the results of this.

While the particular bifurcation structure in Fig. 11 may be heavily dependent on the choice of $M$ and $ W i n$, overall, Fig. 11 provides a clear picture on the challenges the closed-loop RC overcomes in order to achieve multifunctionality. For instance, Fig. 11 shows that for small $\rho $ the closed-loop RC is unable to create any time-varying dynamics and instead produces two pairs of antisymmetric fixed points. As $\rho $ is increased, Fig. 11 establishes that these branches of mirrored fixed points are drawn closer together and two limit cycles are born in quick succession of one another. These are the same limit cycles, $ LC 1$ and $ LC 2$, that were found previously in Fig. 10(b).

The role played by these fixed points and limit cycles is akin to the formation of a memory in the brain. As the closed-loop RC learns the correct memory, in this case the correct attractors, along the way its dynamics begins to bear a stronger resemblance to $ C ^ A$ and $ C ^ B$ as the influence of the training data grows until attractor reconstruction is achieved. Once $\rho $ is sufficiently large, Fig. 11 shows that the closed-loop RC is first able to reconstruct $ C B$ and subsequently for larger $\rho $, the closed-loop RC achieves multifunctionality. A more comprehensive breakdown on each of the major events described above is outlined in the remainder of Sec. V.

#### 1. Bifurcations of FP_{1} and FP_{2} to LC_{1}, and of FP_{3} and FP_{4} to LC_{2}

Figure 12 provides a more detailed picture on the bifurcations from $ FP 1$ and $ FP 2$ to $ LC 2$ at $\rho =0.4935$ in the left hand panel and from $ FP 3$ and $ FP 4$ to $ LC 1$ at $\rho =0.4931$ in the middle panel. What is plotted here are the location of the fixed points and the local maxima and minima of the limit cycles in the $ ( \rho , x )$-plane. When tracking the evolution of these limit cycles for decreasing $\rho $, it is found that $ LC 2$ can no longer be tracked for $\rho <0.4905$ and similarly for $ LC 1$ for $\rho <0.4847$.

The panel on the right of Fig. 12 displays the location of the fixed points and limit cycles just before and after the respective bifurcations take place on each fixed point and limit cycle. It also appears here that the location of the fixed points just prior to the bifurcation is related to the amplitude of oscillation for both limits cycles after bifurcation.

Figure 13 shows that as $\rho $ decreases and approaches the point at which $ LC 1$ and $ LC 2$ can no longer be tracked, the period, $ T ( \u22c5 )$, of both limit cycles tends to infinity. $ T ( \u22c5 )$ is plotted here in units of $t/2\pi $ to provide a comparison to the period of $ C A$ and $ C B$ which correspond to $ T ( \u22c5 )=1$.

Figure 13 also shows that as $\rho $ increases, T( $ LC 1$) and T( $ LC 2$) converge to $1$. This provides further indication that while there does not appear to be a smooth transition from either $ LC 1$ or $ LC 2$ to $ C ^ A$ or $ C ^ B$, these untrained attractors bear a stronger resemblance to the desired dynamics as $\rho $ increases.

Taking all of the above information on $ LC 1$ and $ LC 2$ into account, there are two potential bifurcations which describe how these transitions from two fixed points to one limit cycle takes place. On one hand, since there appears to be a small range of $\rho $ values where $ FP 1$, $ FP 2$, and $ LC 2$ coexist for $\rho \u2208 ( 0.4905 , 0.4935 )$ and similarly where $ FP 3$, $ FP 4$, and $ LC 1$ coexist for $\rho \u2208 ( 0.4847 , 0.4931 )$, then a homoclinic bifurcation may be responsible for the birth of these stable limit cycles. On the other hand, since these windows of multistability appear for only a small range of $\rho $ values, their existence may be an artefact of the tracking procedure used to compute the evolution of these fixed points and limit cycles with regard to changes in $\rho $. If there is no window of multistability, then a saddle-node infinite period (SNIPER) bifurcation may instead be responsible for the transition from antisymmetric pairs of fixed points to the corresponding limit cycle.

The above quandary identifies a pitfall of this tracking procedure as it is unable to determine when, for instance, an attractor becomes unstable. Instead, this approach relies on a suitably chosen step size of the bifurcation parameter, in this case $\rho $, to account for when a bifurcation takes place. If the step size is sufficiently small, then this method can, for example, continue to track unstable solutions of the given dynamical system for a certain range of the bifurcation parameter values. Despite these issues, the results presented in this section provide significant insight toward the role of untrained attractors, how this closed-loop RC solves the seeing double problem and achieves multifunctionality.

#### 2. Bifurcations of LC_{1} and LC_{2} and the birth of $ C ^ B$

Figure 11 also illustrates how the limit cycles, $ LC 1$ and $ LC 2$, evolve in $ P$ with regard to changes in $\rho $. An extensive account of this behavior and the events which result in the death of these stable limit cycles and the creation of the first reconstructed cycle, $ C ^ B$, is provided in Fig. 14.

The evolution of the local maxima of the closed-loop RC’s stable solutions in the projected $x$ coordinate (denoted as $ x m$) for $\rho \u2208 ( 0.848 , 0.948 )$ is plotted in the top left panel of Fig. 14. Here, it can be seen that the quasi-periodic torus, $ T 1$, shown earlier in Fig. 10(a) comes into existence due to $ LC 2$ undergoing a torus bifurcation at $\rho =0.8746$. In light of this, the top right panel provides an updated picture on the stable attractors which, in Fig. 10(a), were shown to coexist in $ P$ for $\rho =0.9$. The color scheme in the top right panel is consistent with the bifurcation diagram shown in the top left panel instead of assigning the light gray color to the torus as in Fig. 10(a).

The second row of images in Fig. 14 provides additional insight toward the sequence of events which result in the creation/destruction of $ C ^ B$ as $\rho $ increases/decreases. Moving from left to right, these images show the result of tracking the evolution of $ C ^ B$ as $\rho $ decreases. The dashed trajectory indicates that $ C ^ B$ is found to either become unstable or no longer exist between $\rho =0.8937$ and $0.8936$ and the state of the closed-loop RC is on a transient to $ LC 1$. The closed-loop RC then remains on $ LC 1$ when $\rho $ is decreased further as illustrated by the image on the right for $\rho =0.8935$.

The third row of images in Fig. 14 depicts the previously mentioned torus bifurcation and the subsequent death of this torus as $\rho $ increases. By increasing $\rho $ from $0.9073$ to $0.9074$, the torus can no longer be tracked. Following this bifurcation, the state of the closed-loop RC departs from the unstable torus (as illustrated by the dashed line) and approaches $ C ^ B$ and, according to the tracking algorithm, remains on $ C ^ B$ when $\rho $ is increased as shown in the right panel for $\rho =0.9075$.

The bottom row of images in Fig. 14 shows that by increasing $\rho $ from $0.9419$ to $0.9420$ $ LC 1$ can no longer be tracked. As $ C ^ B$ is the only remaining stable solution of the closed-loop RC for $\rho =0.9420$, the state of the closed-loop RC has no choice but to embark on a transient from the previously stable LC $ 1$ to $ C ^ B$ (plotted as the dashed line) and remains on $ C ^ B$ as $\rho $ is increased to $0.9421$.

#### 3. The rise and fall of multifunctionality

While Fig. 11 highlights the range of $\rho $ values where multifunctionality is achieved, Fig. 15 expands on this and shows how the rise and fall of multifunctionality begins with the arrival of $ C ^ A$ at $\rho =1.0831$ and death of $ C ^ B$ at $\rho =1.4297$.

The top panel of Fig. 15 picks up where Fig. 14 leaves off by continuing to track the changes in the dynamics of $ C ^ B$ with regard to changes in $\rho $. The second row of images in Fig. 15 highlights the circumstances in which $ C ^ B$ can no longer be tracked. By increasing $\rho $ from $1.4296$ to $1.4297$, it is shown here that $ C ^ B$ no longer has a fixed amplitude of oscillation. Following this, by increasing $\rho $ to $1.4298$, $ C ^ B$ is no longer a stable limit cycle and the state of the closed-loop RC is instead on a transient to $ C ^ A$ and remains on $ C ^ A$ for increasing $\rho $.

The third row of images in Fig. 15 depicts how $ C ^ A$ is born. Shown from right to left is the result of tracking the evolution of $ C ^ A$ for decreasing $\rho $. Here it can be seen that between $\rho =1.0831$ and $1.0830$, $ C ^ A$ can no longer be tracked and the state of the closed-loop RC subsequently tends toward $ C ^ B$ and remains on $ C ^ B$ for smaller $\rho $ values.

While Fig. 6 shows an instance in which the closed-loop RC fails to achieve multifunctionality for $\rho =1.7$, the top panel of Fig. 15 reveals the means in which this comes about. Following the death of $ C ^ B$ at $\rho =1.4298$, $ C ^ A$ is the only stable solution present in $ P$. However, $ C ^ A$ is found to undergo a torus bifurcation at $\rho =1.4711$. Following this, several windows of periodic and chaotic behavior appear and the closed-loop RC remains chaotic for $\rho >1.6$. The first instance of chaos for increasing $\rho $ is in agreement with the corresponding Lyapunov analysis in Fig. 3. As $\rho $ is increased beyond this point, the range of local maxima in the $x$ variable, as plotted here, continues to grow. As a result, the dynamics of the closed-loop RC loses its resemblance to the original driving input.

Furthermore, the bifurcation diagram presented in Fig. 15 provides additional information on the results shown previously in Fig. 6. Figure 15 shows that the trajectories taken by the closed-loop RC when initialized with either $ r ( C A )( t listen)$ or $ r ( C B )( t listen)$ for $\rho =1.7$ are trajectories on the same chaotic attractor. However, we do not claim that the mechanisms responsible for the loss of multifunctionality are universal across all possible $M$ and $ W i n$ as we find, from further analysis not presented in the present paper, examples where $ C ^ A$ is first to disappear as $\rho $ increases.

#### 4. Floquet analysis

^{42}

Taking this into account, Fig. 16 shows how the five largest Floquet multipliers evolve for changes in $\rho $ when solving Eq. (16) with drive from $ C ^ A$ and $ C ^ B$ in the top and bottom panels, respectively. In each case, $ | \mu 1 |=1$ at all $\rho $ values where $ C ^ A$ and $ C ^ B$ were found to exist as stable attractors.

As $\rho $ decreases, Fig. 16 shows that Re $ ( \mu 2 )\u21921$ and since all Im $ ( \mu i )=0$ it can be deduced that $ C ^ A$ and $ C ^ B$ are born through a saddle-node bifurcation. For $ C ^ B$, Fig. 16 demonstrates that Re $ ( \mu 2 )$ and Re $ ( \mu 3 )$ become equal at $\rho =1.3690$ and beyond this point the corresponding imaginary components of $ \mu 2$ and $ \mu 3$ grow according to Im $ ( \mu 2 )=\u2212 Im ( \mu 3 )$ until $ | \mu 2 |$ and $ | \mu 3 |$ tend to $1$ resulting in $ C ^ B$ becoming unstable at $\rho =1.4927$. Based on this information and the results shown in Figs. 15 and 16 indicates that $ C ^ B$ becomes unstable through a subcritical torus bifurcation. The behavior of the Floquet multipliers computed for $ C ^ A$ in Fig. 16 establishes that a supercritical torus bifurcation is responsible for the $ C ^ A$’s change in dynamics from a stable limit cycle to stable torus at $\rho =1.4711$ as illustrated in Fig. 15. Figure 16 also reveals further information which Fig. 15 fails to capture. For instance, a symmetry breaking bifurcation on $ C ^ A$ is found to occur at $\rho =1.4450$ as Re $ ( \mu 2 )$ sharply increases to $1$ and quickly decreases from $1$.

### B. Bifurcation analysis in the (*x*_{cen}, *ρ*)-plane

*ρ*

Section V A provides an extensive account of the particular bifurcations the closed-loop RC goes through in order to achieve multifunctionality when $ x c e n=0$. These results suggest that for increasing $\rho $, on one hand, the dynamics of $ FP 1$, $ FP 2$, $ FP 3$, and $ FP 4$ which lead to the creation of $ LC 1$ and $ LC 2$, symbolizes a set of challenges for the closed-loop RC to overcome in order to achieve multifunctionality. On the other hand, as $\rho $ increases it can also be argued that the role these fixed points and limit cycles play is to sculpt $ P$ for the arrival of $ C ^ A$ and $ C ^ B$. Furthermore, given the ubiquity of the Goldilocks effect across multiple random realizations of $M$ and $ W i n$ as mentioned in Sec. IV A, it is worthwhile to study the behavior of these untrained attractors at different $ x c e n$ values.

In this section, many of the tools applied in Sec. V A are used to explore the dynamics of the closed-loop RC in the $ ( x c e n , \rho )$-plane. The results presented in this section reveal how the relationships between the fixed points and limit cycles mentioned above evolve with respect to changes in $ x c e n$ nearby where these six attractors coexist for a small range of $\rho $ values when $ x c e n=0$ in Figs. 11 and 12. These results also provide insight on the different roads to $ C A$ and $ C B$’s reconstruction as conceivably carved out by these fixed points and limit cycles.

#### 1. Tracking stable solutions in the (*x*_{cen}, *ρ*)-plane

*ρ*

The result of tracking the changes in the dynamics of the closed-loop RC’s stable solutions for $\rho \u2208 [ 0.48 , 0.52 ]$ and $ x c e n\u2208 [ 0.575 , \u2212 0.575 ]$ is presented in Fig. 17. These results are generated by tracking the evolution of $ LC 1$ and $ LC 2$ for changes in $ x c e n$ beginning nearby the bifurcations at $\rho =0.4847$ and $0.4905$, which spawn $ LC 1$ and $ LC 2$, respectively when $ x c e n=0$, as illustrated in Figs. 11 and 12. Similarly, the evolution of $ FP 1$, $ FP 2$, $ FP 3$, and $ FP 4$ is also tracked with respect to changes in $ x c e n$ nearby the bifurcations at $\rho =0.4935$ and $0.4931$ that result in the death of these fixed points. Once these attractors can no longer be tracked for changes in $ x c e n$, this location in the $ ( x c e n , \rho )$-plane is recorded and added to the corresponding curve in Fig. 17. The same process is repeated for incremental changes in $\rho $ for $\rho \u2208 [ 0.48 , 0.52 ]$. We did not find any additional attractors in the portion of the $ ( x c e n , \rho )$-plane shown in Fig. 17 that were unrelated to those studied previously in Sec. V A.

Each curve and filled region in Fig. 17 has a specific meaning which we outline below.

The labels and color scheme of each curve in Fig. 17 are consistent with illustrations of the attractors studied in the previous section. While, for example, the stable period-1 limit cycle, $ LC 1$, is found to undergo P-D bifurcations at several locations in the $ ( x c e n , \rho )$-plane, the resulting stable period-2 limit cycle is also referred to as $ LC 1$. This convention, which was also taken in relation to $ LC 2$ and $ T 1$ in Fig. 14, is applied even when, for instance, an infinite sequence of P-D bifurcations have taken place when tracking the dynamics of the original period-1 limit cycle. What is not shown nor highlighted along these curves are the continuation of the corresponding codim-1 bifurcation curves and location of codim-2 points associated with the dynamics of certain attractors in the $ ( x c e n , \rho )$-plane. This decision was taken in order to avoid overcrowding Fig. 17 with information that may distract from its main message of tracking how the attractors mentioned above behave in the $ ( x c e n , \rho )$-plane. Instead, a more detailed breakdown on some of the bifurcations shown in Fig. 17 is provided later in the present section.

The color scheme of the filled regions in the portion of the $ ( x c e n , \rho )$-plane shown in Fig. 17, as defined by the area the above curves enclose, describes the nature of the closed-loop RC’s stable solutions in $ P$ for a given $ x c e n$ and $\rho $.

#### 2. General comments on RC’s dynamics in the (*x*_{cen}, *ρ*)-plane

*ρ*

The primary message of Fig. 17 continues the central narrative of this paper, the greater the overlap between $ C A$ and $ C B$, the closed-loop RC requires larger $\rho $ values to recall more information from the past in order to achieve multifunctionality and the greater the influence of these fixed points and limit cycles until reconstruction occurs. Figure 17 further substantiates this statement through examining the behavior of the stable solutions in $ P$ for the selected $ x c e n$ and $\rho $ values. What this reveals is the wider role these attractors play in terms of how the closed-loop RC solves the seeing double problem.

One of the main features of Fig. 17 is the symmetry in the closed-loop RC’s dynamics about $ x c e n=0$ and this is studied in much greater detail in Appendix B.

#### 3. Behavior of FP_{3} and FP_{4}

Concentrating first on $ FP 3$ and $ FP 4$, Fig. 17 reveals that as the magnitude of $ x c e n$ increases these fixed points play a diminishing role in $ P$. At $\rho =0.48$, these fixed points cease to coexist for $ | x c e n |>0.055$ and both no longer exist for $ | x c e n |>0.13$. The inset plot on the right hand side of Fig. 17 highlights that for increasing $\rho $ along the $ FP 3$ and $ FP 4$ curves from $ x c e n=0.13$ and $\u22120.13$, respectively, the $ FP 3$ and $ FP 4$ curves become point-like at $ x c e n\u2248\u22120.035$ and $0.035$, respectively, and can no longer be tracked for $\rho >0.495$.

#### 4. Behavior of FP_{1} and FP_{2}

Figure 17 reveals that as the magnitude of $ x c e n$ increases, $ FP 1$ and $ FP 2$ begin to play a more prominent role in the closed-loop RC’s dynamics in comparison to $ FP 3$ and $ FP 4$ for the particular $\rho $ values explored here in the $ ( x c e n , \rho )$-plane.

While Fig. 17 shows that the coexistence of $ FP 1$ and $ FP 2$ comes to an end at $\rho =0.48$ for $ | x c e n |>0.07$, these fixed points exist far beyond the limits of the $ x c e n$ axis displayed here. These fixed points occupy the largest combined area in the portion of the $ ( x c e n , \rho )$-plane shown here. For increasing $\rho $ along the curves which enclose the regions of the $ ( x c e n , \rho )$-plane where $ FP 1$ and $ FP 2$ are both stable, the same fate as $ FP 3$ and $ FP 4$ awaits $ FP 1$ and $ FP 2$ as these curves become point-like at $ x c e n\u22480.34$ and $\u22120.34$, respectively.

As a further comment, the inset plot on the right hand side of Fig. 17 provides additional insight to the bifurcation diagrams in Figs. 11 and 12 and draws attention to how the coexistence between $ FP 1$ and $ FP 2$, and $ FP 3$ and $ FP 4$ at $ x c e n=0$ unfolds with respect to changes in $ x c e n$.

#### 5. Behavior of LC_{1}

Focusing next on $ LC 1$, Fig. 17 illustrates the limited role this limit cycle plays in the closed-loop RC’s dynamics as the magnitude of $ x c e n$ increases from $0$. For decreasing $\rho $, the range of $ x c e n$ values where $ LC 1$ is stable also decreases. By increasing $ | x c e n |$ from $0$ for $\rho =0.48$, a region in the $ ( x c e n , \rho )$-plane where all four fixed points coexist, LC $ 1$ is first encountered as a stable solution at $ x c e n\u2248\xb10.05$. $ LC 1$ briefly coexists with these four fixed points until $ FP 3$ and $ FP 4$ can no longer be tracked as previously mentioned at $ x c e n=\u22130.055$ and likewise for $ FP 1$ and $ FP 2$ at $ x c e n=\xb10.07$. This leaves $ LC 1$ in coexistence with $ FP 2$ and $ FP 3$ for $ x c e n\u2208 [ 0.071 , 0.097 ]$ and in coexistence with $ FP 1$ and $ FP 4$ for $ x c e n\u2208 [ \u2212 0.071 , \u2212 0.097 ]$. $ LC 1$ can no longer be tracked for $ | x c e n |>0.097$ at $\rho =0.48$.

As a further comment, as $\rho $ decreases, the brown curves on either side of $ x c e n=0$, which outline where $ LC 1$ is stable, appear to be converging to a point along the $ FP 3$ and $ FP 4$ curves. This suggests that a codim-2 bifurcation takes place in the $ ( x c e n , \rho )$-plane outside of the regions explored in Fig. 17.

Prior to no longer being able to track $ LC 1$ for increasing the magnitude of $ x c e n$, Fig. 17 also illustrates that $ LC 1$ begins to exhibit chaos along the dotted brown curve $\u2200\rho $ values shown here. The extent of this chaos in the $ ( x c e n , \rho )$-plane is described by the area enclosed by this dotted curve and the $ LC 1$ curve, and is further emphasized by the hatched pattern. It is shown here that, on one hand, these windows of chaos widen as $\rho $ increases, on the other hand, the inset plot on the left hand side of Fig. 17 provides a more detailed picture on how, this small region of chaos narrows as $\rho $ decreases.

Figure 18 sheds some light on $ LC 1$’s change from periodic to chaotic dynamics. For $\rho =0.515$, it is shown here that as $ x c e n$ increases, $ LC 1$ undergoes a series of P-D bifurcations. An infinite sequence of these bifurcations occurs between $ x c e n=0.1301$ and $0.1302$ which gives rise to the chaotic dynamics shown in Fig. 18 for $ x c e n=0.1303$.

#### 6. Behavior of LC_{2}

Figure 17 lays bare the intricate relationship between $ LC 2$, $\rho $, and $ x c e n$. Several events occur along the $ LC 2$ curve as the magnitude of $ x c e n$ increases. The inset plot on the right hand side highlights the first of these incidents with the loss of its coexistence with the four fixed points and $ LC 1$. This continues with larger $ | x c e n |$ values and at $\rho =0.502$, $ LC 2$ is in coexistence with only $ FP 1$ for $ x c e n<\u22120.115$ and FP $ 2$ for $ x c e n>0.115$ until $ C B$ is reconstructed at larger $ x c e n$ values.

It is also shown in Fig. 17 that nearby these points in the $ ( x c e n , \rho )$-plane where $ LC 2$ loses its coexistence with $ LC 1$, the $ LC 2$ curve itself reaches its first of several local maxima. In order to continue tracking $ LC 2$ beyond this point, $\rho $ is required to decrease as $ | x c e n |$ increases until the curve reaches its first of several local minima at $ ( x c e n , \rho )= ( \xb1 0.16 , 0.49 )$ where a P-D bifurcation occurs. Subsequent P-D bifurcations are encountered along the $ LC 2$ curve for slightly increasing $ | x c e n |$ and $\rho $. The hatched region of the $ ( x , \rho )$-plane enclosed by the $ LC 2$ curve and the nearby dotted curve characterize the small window of chaotic solutions produced by an infinite sequence of these P-D bifurcations.

Figure 19(a) provides an example of the closed-loop RC’s dynamics nearby one of these P-D cascades for $\rho =0.501$. It is shown here that when tracking the evolution of the original stable period-1 limit cycle, successive P-D bifurcations are encountered for increasing $ x c e n$. Figure 19(a) shows examples of the corresponding period-1 dynamics at $ x c e n=0.1500$, period-2 dynamics at $ x c e n=0.1660$, and period-4 dynamics at $ x c e n=0.1665$. In this scenario the period-8 limit cycle, whose dynamics are shown here for $ x c e n=0.1667$, undergoes an infinite sequence of P-D bifurcations for a small increase in $ x c e n$. This produces the chaotic dynamics shown here for $ x c e n=0.1669$. This region of chaos in Fig. 17 ends once the $ LC 2$ curve and dotted curve meet at $ ( x c e n , \rho )= ( 0.178 , 0.507 )$. For increasing $ | x c e n |$ beyond this point, it is found that $ LC 2$ is a period-2 limit cycle before it can no longer be tracked. However, subsequent P-D bifurcations occur along the $ LC 2$ curve for increasing $ | x c e n |$.

Following an infinite sequence of these P-D bifurcations, what Fig. 17 also shows is that along the LC $ 2$ curve, chaos reappears at $ ( x c e n , \rho )= ( \xb1 0.35 , 0.508 )$. The dotted magenta curve which stems from this point distinguishes between when LC $ 2$ is periodic or chaotic as further emphasized by the hatched pattern. An example of this particular route to chaos is provided in Fig. 19(b). Furthermore, although it is not shown here, these P-D bifurcation do not only occur along the LC $ 2$ curve, there is a locus which connects each given set of P-D bifurcation points in the $ ( x c e n , \rho )$-plane in a similar way to the dotted magenta curve mentioned above.

What Fig. 19(b) depicts is the result of tracking the evolution of $ LC 2$’s dynamics for changes in $ x c e n$ when $\rho =0.511$. The remnants of the previous small window of chaos, which occurs after the first local minima along the $ LC 2$ curve, are visible here with a period-2 limit cycle found for $ x c e n=0.2$. The major difference between this period-2 limit cycle and the example illustrated in Fig. 19(a) for $\rho =0.501$ is the prominence of the sharp turn around the max $y$ value on the period-2 limit cycle in Fig. 19(b). This remains a distinctive feature of $ LC 2$ when tracking its dynamics as $ x c e n$ is further increased and persists after each of the subsequent P-D bifurcations that result in chaos. It is also worth noting that this kink along $ LC 2$’s dynamics occurs nearby the location of $ FP 2$ and $ FP 1$ for the corresponding positive and negative $ x c e n$ values, respectively.

$ LC 2$ remains chaotic as $ | x c e n |$ increases from $0.35$ and, depending on the sign of $ x c e n$, continues its coexistence with either $ FP 1$ or $ FP 2$ for the range of $ x c e n$ values shown in Fig. 17. Much like $ LC 1$ with $ FP 3$ and $ FP 4$, Fig. 17 also suggests that the $ LC 1$ curve may connect with the $ FP 1$ and $ FP 2$ curves beyond the range of $ x c e n$ values shown here.

As $\rho $ increases along this dotted curve of chaos, which begins at $ ( x c e n , \rho )= ( \xb1 0.35 , 0.508 )$, there is a point where these sequences of P-D bifurcations are no longer directly responsible for the onset of chaotic dynamics. For instance, Fig. 20(a) shows that when tracking the evolution of $ LC 2$ for $\rho =0.515$, by increasing $ x c e n$ from $0.3623$ to $0.3624$, there is a sudden change in dynamics from a period-2 limit cycle to a chaotic attractor. The same is shown Fig. 20(b) for $\rho =0.517$ and $ x c e n$ increases from $0.3558$ to $0.3559$. The only difference between these examples of $ LC 2$’s dynamics prior to the dawning of chaos is the lack of a period-4 limit cycle for $\rho =0.517$.

#### 7. Behavior of $ C ^ B$

Figure 17 also illustrates regions in the $ ( x c e n , \rho )$-plane where $ C ^ B$ comes into existence. For much of its presence in Fig. 17, $ C ^ B$ is in coexistence with either, LC $ 2$, or one of $ FP 2$ or $ FP 1$ depending on the sign of $ x c e n$, or $ LC 2$ and $ FP 2$ or $ FP 1$.

At the limits of the $ x c e n$-axis in Fig. 17 (when $ | x c e n |=0.575$), the nature of $ C ^ B$ differs greatly depending on $\rho $. In particular, the dotted orange curve describes the boundary between when $ C ^ B$ exhibits periodic or chaotic behavior, and it is within the hatched region that $ C ^ B$ is chaotic. For decreasing $ | x c e n |$, these two curves approach one another and the window of chaos becomes arbitrarily small at $ | x c e n |=0.45$. By slightly decreasing $ | x c e n |$ from this point in the $ ( x c e n , \rho )$-plane, a sudden increase in $\rho $ is required in order to reconstruct $ C ^ B$.

Figure 21 illustrates the changes in $ C ^ B$’s dynamics when tracking its evolution for decreasing $ x c e n$ when $\rho =0.504$. Here it can be seen that $ C ^ B$ is a period-1 limit cycle for $ x c e n=0.7000$ and is also not perfectly circular. $ C ^ B$ undergoes several P-D bifurcations with examples of period-2, period-4, and period-8 dynamics shown here for $ x c e n=0.6400,0.5200,$ and $0.5205$. An infinite sequence of P-D bifurcations occurs as $ x c e n$ is decreased further resulting in the chaotic dynamics like those shown here for $ x c e n=0.4965$.

Above all, what Figs. 21 and 17 show is that while $ C ^ B$ is stable its dynamics do not always resemble $ C B$ even to the point when $ C ^ B$ is not in any way circular, has a much larger period, or even exhibits chaos. At the same time, it is also worth noting that after a number of P-D bifurcations, for instance the period-4 limit cycle shown in Fig. 21, portions of the trajectory on $ C ^ B$ begin to resemble a more circular orbit with similar characteristics to $ C B$. This suggests that these P-D bifurcations may play an important role in how the closed-loop RC improves its reconstruction of $ C B$.

## VI. CONCLUSION

The results presented here show that for the closed-loop RC described in Eq. (10) to achieve multifunctionality there is a crucial dependence on $\rho $, the spectral radius of the RC’s internal connections. The intricacies of this relationship are revealed in Sec. IV A when the cycles $ C A$ and $ C B$ are moved closer together. As $ C A$ and $ C B$ begin to overlap, Fig. 3 shows that the closed-loop RC requires a greater amount of memory in order to successfully distinguish between the orbits. A “Goldilocks” effect is also found whereby if $\rho $ is too small or too large then multifunctionality will not occur.

From our results, we have obtained a greater understanding of multifunctionality in a RC. In the context of the formalism developed in Sec. II C, we have shown that while, for instance, $ A 1\u2229 A 2\u2260\u2205$ (there can be an overlap in the training data), for a closed-loop RC to achieve multifunctionality, we require that the open-loop RC responds uniquely to each of the driving inputs $ u ( A 1 )(t)$ and $ u ( A 2 )(t)$ so that at no time $t$ during the training $ r ( A 1 )(t)= r ( A 2 )(t)$ even if $ u ( A 1 )(t)= u ( A 2 )(t)$.

While Figs. 3 and 4 show that the closed-loop RC achieves its best performance just prior to exhibiting chaotic dynamics, Fig. 5 provides some evidence that beyond this transition to chaos the closed-loop RC enters into the dynamical regime of chaotic itinerancy. From a different point of view, multifunctionality can be used as a precursor to generate a specifically designed chaotically itinerant orbit between several attractor ruins thereby providing a suitable means to realize Tsuda’s thoughts on the role of “chaotic itinerancy” in cognitive neurodynamics in Tsuda.^{43} Tsuda puts forward chaotic itinerancy as a potential dynamical mechanism to describe how the brain transitions between performing different tasks or recounting different memories characterized by each attractor ruin. We intend to study this connection between multifunctionality and chaotic itinerancy and how can multifunctionality be exploited as a data-driven modelling tool in future work.

Section IV D focuses on how the closed-loop RC constructs basins of attraction from the perspective of $ P$ for $ C ^ A$ and $ C ^ B$ when they are entirely overlapping, i.e., when $ x c e n=0$. The nature of $ P$ prior to the closed-loop RC achieving multifunctionality is also explored. Figure 10 unveils the coexistence of several fixed points with fractal basin boundaries, limit cycles and tori in $ P$, these are untrained attractors which were not involved in the training. This discovery provides the basis for conducting the bifurcation analyses carried out in Sec. V in order to determine the role these attractors play in how the closed-loop RC solves the seeing double problem.

This bifurcation analysis is divided into two studies, the results of the first are outlined in Sec. V A which explores how changes in $\rho $ effects the closed-loop RC’s dynamics in the case of $ x c e n=0$. The results of the second study are presented in Sec. V B where the closed-loop RC’s dynamics in a portion of the $ ( x c e n , \rho )$-plane are assessed. Here the role of the untrained attractors in the learning dynamics of the closed-loop RC becomes apparent. The bifurcations which result in the rise and fall of multifunctionality are identified through the results of the Floquet analysis shown in Fig. 16. The main take home message from both of these bifurcation analyses is the same, the more $ C A$ and $ C B$ overlap, the more memory the the closed-loop RC requires in order to exhibit multifunctionality and the greater the influence of these untrained attractors until reconstruction occurs.

Even though the bifurcation analysis tools used in this paper have provided significant insight into how the closed-loop RC learns, performs certain tasks, and interacts with untrained attractors, it is likely that only half the story is being told as the unstable solutions are not accounted for. As mentioned in Flynn *et al.*,^{12} these issues can be alleviated by adapting well-known continuation software like AUTO^{44} to the case of reservoir computing.

While the bifurcation analysis in Sec. V is conducted for only one random realization of $M$ and $ W i n$, it is also possible that multifunctionality may be achieved in various other scenarios for different choices of $M$ and $ W i n$. For instance, Morra *et al.*^{45} investigate the dynamics of the same RC design as in Eq. (1), when trained to solve the seeing double problem in the case of $ x c e n=0$, using the same technique that produced Fig. 11. It is shown that for a much smaller number of neurons ( $N=500$ as opposed to $1000$) there is a greater interaction and coexistence between the trained attractors and the untrained attractors in comparison to the results presented in Fig. 11. This may indicate that as $N$ is increased, the less the untrained attractors interact and coexist with the trained attractors. We remark that even though these bifurcation diagrams are produced for smaller $N$ and different random realizations of $M$ and $ W i n$, they share similar characteristics features in terms of there being a coexistence of four fixed points at small $\rho $, and that there is a bifurcation between these fixed points and two limit cycles. The results presented in Morra *et al.*^{45} also show that by constructing the weights of $M$ based on a region of a fruit-fly’s connectome (where $N=426$) and repeating the same experiment, there is a slightly different bifurcation structure. What is interesting here, in comparison to the results presented in this paper, is that for different designs of $M$ and for $N=426$ as opposed to $N=1000$, multifunctionality is achieved for a much greater range of $\rho $ values.

We comment that bifurcation analysis on ANNs similar to the closed-loop RC studied throughout this paper have so far mainly concentrated low dimensional ANNs such as the work of Doya,^{46} Beer,^{47,48} and Ceni *et al.*^{49} where the results from a bifurcation analysis of a RC provides the insight needed to solve the “flip-flop problem.” By conducting a bifurcation analysis of low-dimensional RCs and studying how the dynamics of the RC changes as the dimension increases may provide further insight into the behavior of higher dimensional RCs and establish how much multifunctionality a given RC can have.

We do not claim that the training method outlined in Sec. II C is the optimal method for reconstructing a coexistence of any number of attractors. It is clear from the results presented in this paper that even for the closed-loop RC to reconstruct a coexistence of two relatively simple dynamical objects, $ C A$ and $ C B$, it is the relationship between them that is the more crucial aspect. By making further progress on establishing other limiting factors which impact the reconstruction capacity of a given closed-loop RC, it may be possible to extend the current record of the seven coexisting reconstructed chaotic attractors presented in Herteux.^{15}

In summary, this paper provides significant insight toward how a closed-loop RC achieves multifunctionality in a paradigmatic setting with a particular focus on exploring the dynamics of the closed-loop RC as it solves the seeing double problem. However, there are still many unanswered questions concerning the reconstruction capacity of a given closed-loop RC and the limiting factors to the interesting dynamics a multifunctional RC can produce. While this paper improves the language surrounding the basic mechanisms needed for multifunctionality to occur from previous studies, in future work we aim to extend the description of how RCs achieve attractor reconstruction using the formalism of generalized synchronization, like in Lu *et al.*,^{11} to the case of multifunctionality. Furthermore, we also aim to investigate the role of untrained attractors in how RCs achieve attractor reconstruction in more general cases. From an industry and applications perspective, the study of untrained attractors is an important issue for critical safety applications when, for instance, constructing digital twins of real-world systems as the operator needs to ensure that no unintentional dynamics can be triggered when noise is introduced. Moreover, the existence of untrained attractors raises questions about what behavioral assurances can be guaranteed for closed-loop RCs of this form.

## ACKNOWLEDGMENTS

This work was funded by the Irish Research Council Enterprise Partnership Scheme (Grant No. EPSPG/2017/301). We thank the reviewers of this paper for their very helpful comments. We would also like to thank Andrea Ceni, Lou Pecora, Tom Carroll, Ling-Wei Kong, Joschka Herteux, Daniel Köglmayr, Oliver Heilmann, Christoph Räth, Jacob Morra, and many fellow researchers from UCC, for their influential conversations and input when discussing the contents of this paper as it has evolved over the past few years.

## AUTHOR DECLARATIONS

### Conflict of Interest

The authors have no conflicts to disclose.

### Author Contributions

**Andrew Flynn:** Conceptualization (equal); Data curation (equal); Formal analysis (equal); Funding acquisition (equal); Investigation (equal); Methodology (equal); Validation (equal); Writing – original draft (equal); Writing – review & editing (equal). **Vassilios A. Tsachouridis:** Funding acquisition (equal); Supervision (supporting); Writing – review & editing (supporting). **Andreas Amann:** Conceptualization (supporting); Formal analysis (supporting); Funding acquisition (equal); Investigation (supporting); Methodology (supporting); Supervision (lead); Validation (equal); Writing – original draft (supporting); Writing – review & editing (equal).

## DATA AVAILABILITY

The data that support the findings of this study are available from the corresponding author upon reasonable request.

### APPENDIX A: RC DESIGN AND TRAINING PARAMETERS

In this paper, $M$ is constructed with an Erdös–Renyi topology where each of the non-zero elements are then replaced with a random number between $\u22121$ and $1$, the matrix is subsequently scaled to a specific spectral radius, $\rho $. To elaborate, $M$ is designed such that each element is chosen independently to be nonzero with probability $P$ (i.e., sparsity $=P$ or degree $=N/P$) and these nonzero elements are chosen uniformly from $ ( \u2212 1 , 1 )$. This random sparse matrix is rescaled such that the spectral radius, which is the maximum of the absolute values of its eigenvalues, is $\rho $. This topology is chosen in order to provide the RC with enough dynamical flexibility to solicit multistable dynamics in tasks requiring multifunctionality. Similarly, the input matrix, $ W i n$, is designed such that each row has only one nonzero randomly assigned element, chosen uniformly from $ ( \u2212 1 , 1 )$.

The numerical results presented throughout this paper are generated using the same $M$ and $ W i n$. From further analysis and results which are not shown here, we remark that there are relatively small quantitative changes to our results when using different initializations of $M$ and $ W i n$ however the main characteristics of our results remain similar.

### APPENDIX B: SYMMETRY AND SEEING DOUBLE

It is important to note that in Figs. 9 and 10 there are certain symmetries present in the projected basins of attraction.

In Figs. 9, 10(a), and 10(b), the closed-loop RC approaches the same attractor whether it is initialized with its representation of either the point $ ( x \u2032 , y \u2032 )$ or $ ( \u2212 x \u2032 , \u2212 y \u2032 )$. However, there is a slightly different situation in Figs. 10(c) and 10(d). Using the terminology developed by Herteux and Räth,^{24} when the closed-loop RC is initialized with its representation of the point $ ( x \u2032 , y \u2032 )$ then $ r ^(t)$ settles down to a particular fixed point, for example, $ FP 1$ or $ FP 3$, if instead the closed-loop RC was initialized with its representation of $ ( \u2212 x \u2032 , \u2212 y \u2032 )$ then $ r ^(t)$ settles down to the “mirror-attractor” of that fixed point, which in this case is $ FP 2$ or $ FP 4$.

Despite breaking the symmetry in this closed-loop RC setup with the square terms in Eq. (4) in the design of $ W o u t$, there are certain properties of the seeing double training data that allow for the emergence of mirror-attractors in a similar way to some of the results presented in Flynn *et al.*^{13} regarding the “symmetry kills the square” phenomenon. The manner in which these scenarios arise in the case of the seeing double problem are outlined in the remainder of this Appendix.

#### 1. Seeing double and $ W o u t ( 2 )\u21920$

In order for mirror-attractors to exist, the symmetry breaking terms in Eq. (10), i.e., the $ r 2(t)$ term in Eq. (4) and the corresponding $ W o u t ( 2 )$ term in Eq. (5), cannot exist.^{24}

In the case of the seeing double problem, there are two conditions which contribute to forcing $ W o u t ( 2 )\u21920$ that need to be satisfied simultaneously. These are the anti-symmetric nature of the individual circular orbits, as described by Eqs. (28) and (29) in Flynn *et al.*,^{13} and the subsequent anti-symmetric nature of the combined training data set described in Eqs. (16) and (17) in Flynn *et al.*^{13} which determine $ W o u t$.

*et al.*,

^{13}holds when the RC is trained to reconstruct only $ C A$ or $ C B$ for $ x c e n=0$ as

*et al.*

^{13}and concerns the structure of the resulting $ X C$ and $ Y C$ matrices used in the case of multifunctionality. On one hand, this condition holds $\u2200 x c e n$ when $ C A$ and $ C B$ are rotating in the same direction as the RC is effectively being trained to reconstruct mirror-attractors. To be more specific, the input data, $u(t)$, from, for instance, $ C A$ when centered at $ ( x c e n , 0 )$, is equal to $\u2212u(t)$ when $ C A$ is centered at $ ( \u2212 x c e n , 0 )$, denoted as $ C A \u2212$. As the RC is trained to reconstruct a coexistence of $ C A$ and $ C B$ for a given $ x c e n$, and $ C B= C A \u2212=\u2212 C A$ then $ u ( C B )(t)=\u2212 u ( C A )(t)$ and

*et al.*

^{13}and as a consequence, $ W o u t ( 2 )=0$.

On the other hand, when $ C A$ and $ C B$ are rotating in opposite directions there is no mirror symmetry present in the combined training data sets, it is only when $ x c e n=0$ that “symmetry kills the square” as the combined training data matrices from both $ C A$ and $ C B$ satisfy necessary conditions. As a further comment, if instead the RC was trained to reconstruct a coexistence of $ C A$ and $ C B$ when these are of different radii and $ x c e n=0$, so long as Eqs. (28) and (29) in Flynn *et al.*^{13} are satisfied for both $ u ( C A )(t)$ and $ u ( C B )(t)$ then $ W o u t ( 2 )=0$ as the RC is trained to provide a coexistence of attractors which are all anti-symmetric to themselves. In return, this places no constraint on the behavior of the corresponding response attractors, $ S A$ and $ S B$, in $ S$ as these do not necessarily need to be mirror-attractors of one another as already shown in Fig. 9.

#### 2. *ρ* vs $ W o u t (2)$

*ρ*

Given the insight gained about the role of $\rho $ in the behavior of $ W o u t ( 2 )$ from Fig. 7 in Flynn *et al.*,^{13} the same procedure is applied here for the present case of the seeing double problem when $ x c e n=0$ and the result of this is illustrated in Fig. 22(a). There is a threshold value of $\rho $ associated with the symmetry-breaking bifurcation discussed in Sec. V A 4 which corresponds with $ W o u t ( 2 )$ coming into existence in Fig. 22(a). Since $ W o u t ( 2 )=0$ for all $\rho $ values less than this critical value, each solution of the closed-loop RC is required to either have a mirror-attractor or is anti-symmetric to itself, whether or not multifunctionality is achieved. While the behavior of $ W o u t ( 2 )$ in Fig. 22(a) is qualitatively similar to Fig. 7 in Flynn *et al.*^{13} there are some differences, mainly that $ W o u t ( 2 )$ reappears at smaller $\rho $ and its elements grow much faster and larger in magnitude over a similar interval of $\rho $.

Nevertheless, the existence of mirror-attractors in Figs. 10(c) and 10(d), which led toward this discussion in the first place, and that $ W o u t ( 2 )=0$ for the corresponding $\rho $ values shown in Fig. 22(a), together show that while both driving inputs possess the symmetry described in Eq. (B1) and the open-loop RC may respond to these driving inputs according to Eq. (B2), it is still possible that $ W o u t ( 2 )=0$ even if the resulting attractors in $ P$ are not periodic but are instead mirrored fixed points.

When $ x c e n\u22600$ the symmetry in the training data is broken, which is much like shifting the location of the mirror-attractors as in Flynn *et al.*^{13} The effect this has on the elements of $ W o u t ( 2 )$ for $\rho \u2208 [ 0.1 , 2.5 ]$ is shown in Figs. 22(b)–22(c). Similar to the results depicted in Fig. 2 in Flynn *et al.*,^{13} the central message of Figs. 22(b)–22(c) is that as the magnitude of $ x c e n$ increases so too does the magnitude of $ W o u t ( 2 )$’s elements.

#### 3. $ ( W o u t ( 1 ) ) x c e n= ( W o u t ( 1 ) ) \u2212 x c e n$ and $ ( W o u t ( 2 ) ) x c e n=\u2212 ( W o u t ( 2 ) ) \u2212 x c e n$

While it is shown in Fig. 22(a) that $ W o u t ( 2 )=0$ for $ x c e n=0$, there is another “symmetry kills the square” phenomenon and related to the structure of the seeing double training data that is generated as follows.

The above analytical results in Eq. (B8) are confirmed numerically in Fig. 23 by examining the behavior of the resulting $ ( W o u t ) x c e n$ matrices after training the RC with data from $ C A$ and $ C B$ for $ x c e n=3$ in Fig. 23(a) and $ x c e n=\u22123$ in Fig. 23(b) where $\rho =1.45$ in both cases. The elements of the resulting matrix from the element-wise addition of $ ( W o u t ) x c e n = 3$ and $ ( W o u t ) x c e n = \u2212 3$ is depicted in Fig. 23(c) which shows that $ ( W o u t ( 2 ) ) x c e n+ ( W o u t ( 2 ) ) \u2212 x c e n=0$. Similarly, in Fig. 23(d), the element-wise subtraction of $ ( W o u t ) x c e n = \u2212 3$ from $ ( W o u t ) x c e n = 3$ results in $ ( W o u t ( 1 ) ) x c e n\u2212 ( W o u t ( 1 ) ) \u2212 x c e n=0$.

While these results are interesting from an analytical and numerical perspective, their influence has been a common factor throughout many of the results presented in this paper and arise due to the constraint in Eq. (B8) as imposed by the structure of the training data.

## REFERENCES

*Proceedings of the 16th Annual ProRISC Workshop*(Veldhoven, The Netherlands, 2005), pp. 454–459.

*2022 International Joint Conference on Neural Networks (IJCNN)*(IEEE, Piscataway, NJ, 2022), pp. 1–8.

*Applied Nonlinear Dynamics: Analytical, Computational, and Experimental Methods*

*Proceedings 1992 IEEE International Symposium on Circuits and Systems*(IEEE, 1992), Vol. 6, pp. 2777–2780.