A Delay Damage Model Selection Algorithm for NARX Neural Networks Tsungnan Lin 1 ; 2 ? , C. Lee Giles 1 ; 3 , Bill G. Horne 1 , S.Y. Kung 2 1 NEC Research Institute , 4 Independence Way , Princeton , NJ 08540 2 Department of Electrical Engineering , Princeton University , Princeton , NJ 08540 3 UMIACS , University of Maryland , College Park , MD 20742 U. of Maryland Technical Report CS-TR-3707 and UMIACS-TR-96-77 Abstract Recurrent neural networks have become popular models for system identification and time series prediction . NARX -LRB- Nonlinear AutoRegressive models with eXogenous inputs -RRB- neural network models are a popular subclass of recurrent networks and have been used in many applications . Though embedded memory can be found in all recurrent network models , it is particularly prominent in NARX models . We show that using intelligent memory order selection through pruning and good initial heuristics significantly improves the generalization and predictive performance of these nonlinear systems on problems as diverse as grammatical inference and time series prediction . ? Current address : Epson Palo Alto Laboratory , 3145 Porter Drive , Suite 104 , Palo Alto , CA 94304 1 Introduction NARX -LRB- Nonlinear AutoRegressive models with eXogenous inputs -RRB- recurrent neural architectures -LSB- 6 , 41 -RSB- , as opposed to other recurrent neural models , have limited feedback architectures which come only from the output neuron instead of from hidden neurons . It has been shown that in theory one can use NARX networks , rather than conventional recurrent networks , without any computational loss and that they are at least equivalent to Turing machines -LSB- 53 -RSB- . Not only are NARX neural networks computationally powerful in theory , but they have several advantages in practice . For example , it has been reported that gradient-descent learning can be more effective in NARX networks than in other recurrent architectures with \ hidden states '' -LSB- 25 -RSB- . Part of the reason can be attributed to the embedded memory of NARX networks . This embedded memory will appear as jump-ahead connections which provide shorter paths for propagating gradient information more efficiently when the networks are unfolded in time to backpropagate the error signal and thus reduce the network 's sensitivity to the problem of long-term dependencies -LSB- 34 , 36 -RSB- . Not only can the embedded memory reduce the sensitivity to long-term dependencies , but it also plays an important role in learning capability and generalization performance -LSB- 35 -RSB- . In particular , forecasting performance could be seriously deficient if a model 's memory architecture is either inadequate or unnecessarily large . Therefore , choosing the appropriate memory architectures for a given task is a critical issue in NARX networks . The problem of memory-order selection is analogous to that of choosing an optimal subset of regressors variables in statistical model building . In optimal subset selection , it is desired that the model includes as many regressors as possible so that the information content in these regressors will influence the predicted value of the dependent variable ; on the other hand , it is also desired that the model includes as few regressors as possible because the variance of the model 's predictions increases along with the increasing number of regressors -LSB- 39 -RSB- . According to the embedding theorem -LSB- 45 , 51 , 57 -RSB- , the memory orders need to be large enough in order to provide a sufficient embedding . The problem of choosing the proper memory architecture corresponds to give a good representation of input data . A good representation can make useful information explicit and easy to extract . Two different representations can be equivalent in terms of expressive power , but may differ dramatically in the efficiency or effectiveness of problem-solving . When there is no prior knowledge about the model of the underling process , traditional statistical tests can be used , for example , Akaike information criterion -LRB- AIC -RRB- -LSB- 1 -RSB- and the minimum description length principle -LRB- MDL -RRB- -LSB- 50 -RSB- . Such models are judged on their \ goodness-of-fit '' , which is a function of the likelihood of the data given the hypothesized model and its associated degrees of freedom . Fogel -LSB- 16 -RSB- applied the modification of AIC to select a \ best '' network . However , the AIC method is complex and can be troubled by imprecision -LSB- 52 , 23 -RSB- . Evolutionary Programming -LSB- 2 , 18 -RSB- is another search mechanism . This algorithm operates on a population of models . Offspring models are created by randomly mutating parents models . Competition between offspring models for survival are judged according to the fitness function . Fogel -LSB- 17 -RSB- used evolutionary programming for order selections of linear models in a time series of ocean acoustic data . But the algorithm can be computationally expensive when the underling process is complex and nonlinear . Alternatively , an adaptive algorithm which treats the delay operators as ordinary adjustable parameters can be a useful technique . This algorithm iteratively determines the memory of a model based on the gradient information . Originally proposed by Etter , it was used as a \ adaptive delay filter '' , which included variable delays taps as well as variable gains , for modeling several sparse systems -LSB- 15 , 7 -RSB- . Recently others -LSB- 4 , 13 , 33 , 14 -RSB- have also extended neural networks to include adaptable time delays . Because the error function of the adaptable time delays depends on the autocorrelation function of input signals -LSB- 15 , 7 -RSB- , the gradient of the delay operator will depend on the derivative of input signals . However , a closed form of the derivative of the input signal can not always be determined in general . Therefore , there is no guarantee that such a modified algorithm for a nonliner model would converge to the optimum solution . In this paper , we propose a pruning-based algorithm , the Delay Damage Algorithm , to determine the optimal memory-order of NARX and input time delay neural networks . This algorithm can also incorporate several useful heuristics , such as weight decay -LSB- 29 -RSB- , which are used extensively in static networks to optimize the nonlinear function . -LSB- For a survey of pruning methods for feedforward neural networks , see -LSB- 49 -RSB- . -RSB- The procedure of the algorithm starts with a NARX network with enough degrees of freedom in both input and output memory , and then delete those memory orders with small sensitivity measure after training . After pruning , the network is retrained . Of course , this procedure can be iterated . This method should be contrasted to another recurrent neural network procedure -LSB- 22 -RSB- where nodes are pruned based on output values and is similar in spirit to the pruning method of Pederson and Hansen -LSB- 47 -RSB- . The sensitive measure of each memory order is calculated by estimating the second order derivative of the error function with respect to each memory order . Le Cun et al. -LSB- 11 -RSB- originally calculated the \ saliency '' by estimating the second order derivative for each weight . The success of their algorithm had been implemented in identification of handwritten ZIP-codes by pruning the weights of feedforward networks -LSB- 11 , 10 -RSB- . 2 NARX Neural Network An important and useful class of discrete -LCB- time nonlinear systems is the Nonlinear AutoRegressive with eXogenous inputs -LRB- NARX -RRB- model -LSB- 6 , 32 , 37 , 54 , 55 -RSB- : y -LRB- t -RRB- = f ? u -LRB- t ? Du -RRB- ; : : : ; u -LRB- t ? 1 -RRB- ; u -LRB- t -RRB- ; y -LRB- t ? Dy -RRB- ; : : : ; y -LRB- t ? 1 -RRB- ? ; -LRB- 1 -RRB- where u -LRB- t -RRB- and y -LRB- t -RRB- represent input and output of the model at time t , Du and Dy are the inputmemory and output-memory order , and the function f is a nonlinear function . When the function f can be approximated by a Multilayer Perceptron -LRB- MLP -RRB- , the resulting system is called a NARX recurrent neural network -LSB- 6 , 41 -RSB- . Figure 1 shows a NARX networks with input-memory of order 2 and output-memory of order 3 . It has been demonstrated that NARX neural networks are well suited for modeling several nonlinear systems such as heat exchangers -LSB- 6 -RSB- , waste water treatment plants -LSB- 54 , 55 -RSB- , catalytic reforming systems in a petroleum refinery -LSB- 55 -RSB- , nonlinear oscillations associated with multi -LCB- legged locomotion in biological systems -LSB- 58 -RSB- , time series -LSB- 9 -RSB- , and various artificial nonlinear systems -LSB- 6 , 41 , 48 -RSB- . When the output-memory order of NARX network is zero , a NARX network becomes a Time Delay Neural Network -LRB- TDNN -RRB- -LSB- 30 , 31 , 60 -RSB- , which is simply a tapped delay line input into a MLP . In general the TDNN implements a function of the form : y -LRB- t -RRB- = f ? u -LRB- t ? Du -RRB- ; : : : ; u -LRB- t ? 1 -RRB- ; u -LRB- t -RRB- ? : -LRB- 2 -RRB- Tapped delay lines can be implementations of delay space embedding and can form the basis of traditional statistical autoregressive -LRB- AR -RRB- models . In time series modeling , subset models are often desirable in the hope of capturing the global behavior of the data . A subset autoregressive -LRB- SAR -RRB- time series model is defined as : y -LRB- t -RRB- = m X i = 1 a iy -LRB- t ? i -RRB- + u -LRB- t -RRB- : -LRB- 3 -RRB- where a i and i are the ith coefficient and ith order respectively , and u -LRB- t -RRB- is the white noise innovation with zero mean . SAR models have demonstrated their long-term prediction capability in various applications -LSB- 38 , 42 -RSB- and can easily be extended into nonlinear models . A nonlinear version of a SAR is a NSAR 1 . A primary problem associated with the nonlinear subset model is how to optimally select the subset orders . Various methods have been suggested for the determination of the orders in linear case -LSB- 64 , 42 -RSB- . In designing the nonlinear sparse models , we can determine the memory order by applying the Delay Damage Algorithm , described in the next section . The Delay Damage approach is based on the assumption that the memory order of an initial network should be given enough 1We use the term NSAR and not TDNN to differentiate between networks that are driven by previous values and those by external inputs . However , these distinctions are not always made nor are standard . For example , NARX networks have also been called NARMA -LRB- Nonlinear AutoRegressive Moving Average -RRB- networks . It would also be possible to refer to a NSAR as a NAR model . degrees of freedom to learn the the given task in a reasonable amount of training time . y -LRB- k-1 -RRB- y -LRB- k-2 -RRB- y -LRB- k-3 -RRB- u -LRB- k-1 -RRB- u -LRB- k -RRB- u -LRB- k-2 -RRB- MLP y -LRB- k -RRB- Figure 1 : A NARX neural network with 2 input-memory taps and 3 output-memory taps . 3 Delay Damage Algorithm The Delay Damage algorithm attempts to select optimal memory orders of NARX networks by calculating the sensitivity of the error to each memory order after the network is trained by gradientbased learning algorithm . Several methods for sensitivity calculations have been proposed -LSB- 40 , 28 , 24 -RSB- , for details see the survey paper by Reed -LSB- 49 -RSB- . Our method of calculating sensitivity is based on evaluating the second order derivative of the cost function with respect to each memory order -LSB- 47 -RSB- . We assume the cost function -LRB- E -RRB- is the mean-squared error : E = 1 2 X p t1 X o = t0 -LRB- dp -LRB- t -RRB- ? op -LRB- t -RRB- -RRB- 2 ; -LRB- 4 -RRB- where p and o denote the pattern index and time index respectively . The MLP of a NARX network can be described as : xi -LRB- t -RRB- = f -LRB- ai -LRB- t -RRB- -RRB- ; -LRB- 5 -RRB- ai -LRB- t -RRB- = X j wijxj -LRB- t -RRB- ; -LRB- 6 -RRB- where xi -LRB- t -RRB- is the output of hidden node i , ai -LRB- t -RRB- is the weighted-sum input , f is the nonlinear function , and wij is the real valued connection weight from node j to node i. By the chain rule , the first-order derivative of E with respect to output node i at time t = t1 is given as @E @ak -LRB- t1 -RRB- = f k -LRB- ak -LRB- t1 -RRB- -RRB- ek -LRB- t1 -RRB- ; -LRB- 7 -RRB- where ek -LRB- t1 -RRB- is the error between the output node and the target output . The gradient information of the hidden nodes can be obtained by backpropagating the gradient information from the output node . For the earlier time steps , there will be an injection error from the target output into the output node . Thus , not only is the gradient information determined by a backward pass through the unrolled network , but the injection errors are also taken into account in reverse order . The error signal of output node k at time t0 < o < t1 will become : @E @ak -LRB- o -RRB- = f k -LRB- ak -LRB- o -RRB- -RRB- @ek -LRB- o -RRB- + X j wjk @E @ak -LRB- o + 1 -RRB- 1 A : -LRB- 8 -RRB- Differentiating the first-order derivative once more yields the second order information . For the output node k at the last time step t1 , the second order information can be described by @ 2E @a2k -LRB- t1 -RRB- = f -LRB- ak -LRB- t1 -RRB- -RRB- 2 ? ek -LRB- t1 -RRB- f 00 -LRB- aK -LRB- t1 -RRB- -RRB- : -LRB- 9 -RRB- The Levenberg-Marquardt approximation was used by Le Cun et al. to drop the second term of Equation 9 . This will result in the same order of complexity as computing the first-order derivatives and non-negative quantities . The second order information of the hidden nodes at time t1 can be calculated by the backpropagation procedure . Proceeding to the earlier time steps , the effect of the injection error should be taken into account . Therefore , the second order gradient of the output node k at interval time t0 < o < t1 will become : @ 2E @a2k -LRB- o -RRB- = f -LRB- ak -LRB- o -RRB- 2 -RRB- @ 1 + X j w2jk @ 2E @a2k -LRB- o + 1 -RRB- 1 A : -LRB- 10 -RRB- The procedure is computed down to t0 + 1 . In order to compute the second-order derivative with respect to each memory order of a NARX neural network , the function f of each memory order is assumed to be linear . Therefore , the sensitivity of input-memory order u -LRB- k ? n -RRB- and output-memory order y -LRB- k ? m -RRB- can be described respectively as : @ 2E @u -LRB- k ? n -RRB- 2 = X p X o @ -LRB- up -LRB- t ? n -RRB- -RRB- 2 X j w2jn @ 2E @ ? apj -LRB- o -RRB- ? 2 1 A -LRB- 11 -RRB- @ 2E @y -LRB- k ? m -RRB- 2 = X p X o @ -LRB- yp -LRB- t ? m -RRB- -RRB- 2 X j w2jm @ 2E @ ? apj -LRB- o -RRB- ? 2 1 A : -LRB- 12 -RRB- Once the sensitivity of each node is evaluated , nodes are pruned based on a predescribed sensitivity threshold or ratio and retraining occurs . Pruning stops when the a certain error , total or otherwise , is reached . 4 Experimental Results Here we discuss experimental results for a grammatical inference problem and time series prediction problems , sun spot data and laser intensity data from the Santa Fe time series competition . The grammatical inference problem will use a NARX neural network whereas the time series problems will use degenerate forms of the NARX network , the NSARs . We also give a brief introduction to the theory of dynamic embedding before discussing the results of time series prediction . In order to also optimize the architecture of the MLP of a NARX network or NSAR , several methods of weight-elimination -LSB- 5 , 29 , 44 , 61 , 63 -RSB- can be incorporated into the training algorithm . In the following experiments , networks are trained using weight decay -LSB- 29 -RSB- . All experiments were trained using Back-Propagation Through Time -LRB- BPTT -RRB- . 4.1 Grammatical Inference : Learning A 512-state Finite Memory Ma - chine NARX networks have been shown to be able to simulate and learn a class of finite state machines -LSB- 8 , 21 -RSB- , called respectively definite and finite memory machines . When being trained on strings which are encoded as temporal sequences , NARX networks are able to \ learn '' rather large -LRB- hundreds to thousands of states -RRB- machines provided that they have enough memory and the logic implementation is not too complex . However , the generalization performance and the size of extracted machines are also found to be very sensitive to the memory order selections in NARX networks -LSB- 35 -RSB- . The purpose of this experiment is to see how the delay damage algorithm can improve the generalization performance of NARX networks with unnecessary memory structures . In this experiment , the finite memory machine has 512 states . The machine has input order of 5 and output order of 4 . Its transition function can be described as the simple logic function : y -LRB- k -RRB- = ? u -LRB- k ? 5 -RRB- ? u -LRB- k -RRB- + ? u -LRB- k ? 5 -RRB- y -LRB- k ? 4 -RRB- + u -LRB- k -RRB- u -LRB- k ? 5 -RRB- ? y -LRB- k ? 4 -RRB- -LRB- 13 -RRB- where y and u represent output and input respectively , and ? x represents the complement of x . The FSM is shown in Figure 2 . The depth , d , of the machine is 9 . The training set was 300 strings randomly chosen from the complete set . The complete set , which consists of all strings of length from 1 to d +1 -LRB- 10 in this case -RRB- , are shown to be able to sufficiently identify a finite memory machine with depth d -LSB- 20 -RSB- . The strings were encoded such that input values of 0s and 1s and target output labels \ negative '' and \ positive '' corresponded to floating point values of :0 and 1:0 respectively . Initially , before pruning the NARX networks were chosen to have 4 hidden nodes , 10 input taps , and 10 output taps . The number of weights was 91 . The memory order of the neural network was chosen to be large enough to make sure the architecture had enough degrees of freedom to learn the large machine within a reasonable amount of time . The networks were trained with Back Propagation Through Time -LRB- BPTT -RRB- algorithm at the learning rate of :1 and weight decay of :001 . The training time was set to 5000 epochs . For more details , see -LSB- 20 , 21 -RSB- . For each of 50 experiments , the weights were randomly initialized within the range of -LSB- ? 0:5 ; :5 -RSB- . The average training time was approximately 600 epochs . After training , the trained networks were tested on the remaining strings of the complete set . A zero error rate showed that the networks had learned the complete set . However , when trained networks were tested on the strings of length longer than 10 , the number of errors was no longer zero and plotted in the Figure 3 as a function of the length of testing strings . Note that the performance of NARX networks can be strongly dependent on the selection of memory order -LSB- 35 -RSB- . In particular the new testing set consisted of 250 positive strings and 250 negative strings from length 20 to 150 in increments of 10 . Applying the delay damage algorithm described in Section 3 to prune the taps with small sensitivity measure always resulted in the minimal NARX architectures with 5 input memory orders and 4 output memory orders . Furthermore , out of 50 pruning runs , the minimal NARX architectures always contain the proper subset of u -LRB- t -RRB- , u -LRB- t ? 5 -RRB- , and y -LRB- t ? 4 -RRB- . The number of weights of pruned networks could be reduced to anywhere from 20 to 30 depending on the number of remaining memory orders . The time to retrain the pruned networks took on the average 70 epochs . Furthermore , the generalization error on the remaining strings of the complete set and the strings randomly generated from length 20 to 150 was reduced to zero . 4.2 The Theory of Embedding In order to clarify the results of our experiments on time series prediction we give a brief introduction to the theory of embedding , for more details see -LSB- 51 -RSB- . The state of a deterministic dynamic system is the information necessary to determine the entire future evolution of the system . A time series Figure 2 : A 512 state finite memory machine with input order 5 and output order 4 . 20 40 60 80 100 120 140 10 20 30 40 50 60 70 80 90 100 Lenth of testing strings Number of errors in the testing set Figure 3 : Number of errors in the testing set , which consists 250 positive strings and 250 negative strings from length 20 to 150 , as a function of the length of the strings for a NARX neural network trained on the data from the 512 state finite memory machine . is a set of measures of an observable quantity of the system over time . An observable quantity is a function only of the state of the underlying system . The observations , y -LRB- n -RRB- , are a projection of the multivariate state space of the system onto the one dimensional space . In order to do prediction , we need to reconstruct as well as possible the state space of the system using the information in y -LRB- n -RRB- . The embedding theorem motivates the technique of using time-delay coordinate reconstruction in reproducing the phase space of an observed dynamical system . A collection of time lags in a vector space of d dimensions , s -LRB- t -RRB- = h y -LRB- t -RRB- ; y -LRB- t ? T -RRB- ; y -LRB- t ? 2T -RRB- ; ? ? ? ; y -LRB- t ? -LRB- d ? 1 -RRB- T -RRB- i ; -LRB- 14 -RRB- will provide sufficient information to reconstruct the states of the dynamical system . The purpose of time-delay embedding is to unfold the projection back to a multivariate state space that is representative of the original system -LSB- 43 , 46 , 57 -RSB- . It was shown that if the dynamical system and the observed quantity were generic , then the delay coordinate map from a d-dimensional smooth compact manifold to 2d + 1-dimensional reconstruction space was a diffeomorphism -LRB- one-to-one differential mapping -RRB- . The theorem was further refined by Sauer et al. -LSB- 51 -RSB- such that a measured quantity led to a one-to-one delay coordinate map as long as the reconstruction dimension was greater than twice the box-counting dimension of the attractor . The embedding theorem provides a sufficient condition for choosing the embedded dimension dE large enough so that the projection is theoretically able to construct the original state space . Once a large enough d = dE has been obtained , any d > = dE will also provide an embedding . The predictive relationship between the current state s -LRB- t -RRB- and the next value of time series can be expressed as y -LRB- t + 1 -RRB- = f -LRB- s -LRB- t -RRB- -RRB- = f -LRB- y -LRB- t -RRB- ; y -LRB- t ? T -RRB- ; y -LRB- t ? 2T -RRB- ; ? ? ? ; y -LRB- t ? -LRB- d ? 1 -RRB- T -RRB- -RRB- : -LRB- 15 -RRB- The embedding theorem provides a theoretical framework for nonlinear time series prediction . Once an embedding dimension is chosen , one remaining task is to approximate the mapping function f . It has been shown that a feedforward neural network with enough neurons is capable of approximating any nonlinear function to an arbitrary degree of accuracy -LSB- 12 , 19 , 26 , 27 -RSB- . Neural networks thus can provide a good approximation to the function f . These arguments provide the basic motivation for the use of NARX networks to the nonlinear time series prediction . It is still an open question as to how to optimally choose the embedding dimension d and the delay time T . The embedding theorem only guarantees that a sufficiently large embedding dimension dE will be capable of unfolding the state space . It does not describe how complicated the mapping function will be . One may be able to find a minimum embedding dimension to unfold the state space , but the mapping function may be too complicated to approximate . For example , two different embedded dimensions can be equivalent in terms of repressive power , but the nonlinear function may dramatically differ in the efficiency of approximation . It should be noted that when T is chosen , the embedding representation will always be equally spaced . This rules out the possibility of any unequally spaced representation of the embedding dimension . In the following experiments , we will use the delay damage algorithm to prune the taps of a neural network . After pruning , the networks will be retrained , at least twice . The final network architecture ends up providing a unequally spaced temporal representation of the state space . These sparse delay architectures can be regarded as the nonlinear versions of SAR models -LRB- NSARs -RRB- and the subset orders of the NSAR provide the embedding coordinates to reconstruct the mapping function . The time lags in the initial embedding vector can be equally or unequally spaced as long as the embedding dimension is large enough to unfold the state space . 4.3 Prediction of Sunspot Data Sunspots are dark botches on the sun and yearly averages have been recorded since 1700 . The series is shown in Figure 4 and has served as a benchmark for time series prediction problems . Several researchers have tested the prediction ability of neural networks on this data . For example , Weigend et al. -LSB- 61 -RSB- trained a NSAR -LRB- or TDNN -RRB- network with an embedded dimension of 12 with 8 hidden neurons and pruned the weights by adding a complexity term to the cost function . They were able to reduce a network with 8 hidden nodes to 3 . The embedding dimension remained the same . Svarer et al. -LSB- 56 -RSB- pruned the weights using a second order sensitivity measure . Our approach is to prune the orders of networks directly and use the weight decay technique to optimize the nonlinear mapping function . For comparison we treat the data in the same way as Weigend et al. . -LSB- 61 -RSB- . and partition it into a training set from 1700 through 1920 and a testing set from 1921 to 1979 . The data set was scaled to be in the range of -LSB- 0 ; 1:0 -RSB- . We tried various architectures with various number of hidden nodes and different embedding dimensions . The initial embedding dimension was usually close to 14 . However , the largest initial order depth was 33 . The networks were trained as a one-step ahead predictors at the learning rate of :1 and weight decay of :001 . After pruning the taps , the networks were retrained . Our cost function was the normalized mean squared error defined as : NMSE -LRB- N -RRB- = P k2S -LRB- targetk ? predictionk -RRB- 2 P k2S -LRB- targetk ? meanS -RRB- 2 = 1 oe2 1 N X k2S -LRB- xk ? ^ xk -RRB- 2 ; -LRB- 16 -RRB- where k = 1 ? ? ? N enumerates the point in the data set S , and meanS and oe2 denote the sample average and sample variance of the target value in S . This measure removes the data 's dependence on dynamic range and size of the data set . To make comparisons with previous work , the variance was normalized with the same value of 1535 -LSB- 61 -RSB- . Training was stopped when the normalized mean squared error was less than :1 . Reported in table 1 are our two best results from the architectures denoted as B and C . The final number of hidden nodes were respectively 6 and 3 . The final subset orders of the two networks after pruning consisted of -LRB- xt ; xt ? 1 ; xt ? 9 ; xt ? 11 ; xt ? 13 ; xt ? 14 ; xt ? 31 ; xt ? 33 -RRB- and -LRB- xt ; xt ? 1 ; xt ? 2 ; xt ? 8 ; xt ? 10 ; xt ? 11 ; xt ? 19 ; xt ? 22 -RRB- respectively . Table 1 lists the one-step ahead prediction performance Network NMSE No . of parameters Train -LRB- 1700-1920 -RRB- Test -LRB- 1921-1955 -RRB- Test -LRB- 1956-1979 -RRB- A -LRB- Weigend et al. -RRB- 0.082 0.086 0.35 43 B 0.094 0.1065 0.449 69 C 0.0966 0.1013 0.4033 31 D -LRB- Svarer et al. -RRB- 0.090 0.082 0.35 14 Table 1 : Normalized MSE for one-step ahead prediction on the sunspot data . of various models on the data set . Comparing the NMSE , the single-step prediction qualities of different models are quite comparable . We also compared long-term prediction results to one another . To do the long-term prediction , the predicted output is fed back into the neural network . Hence , the inputs consists of predicted value as opposed to actual data of the origin time series . We used the average relative I-times iterated prediction variance proposed by Weigend et al. -LSB- 61 -RSB- as a performance measure of the longterm behavior of the models . The average relative I-times iterated prediction variance is defined as : arv -LRB- iterated ; I -RRB- = 1 oe2 1 M M X t = 1 -LRB- xt ? ^ xt ; I -RRB- 2 ; -LRB- 17 -RRB- where xt is the real data point at time t , M the difference between the period of the prediction and I , and ^ xt ; I is the predicted value for time t after I iterations . Recall that I is the number of time steps into the future of the prediction . The average relative iterated prediction variance is shown in Figure 5 and went through from 1921 to 1979 . From Figure 5 , it can be seen that the networks B and C which have sparsely connected tapped delay lines start to perform better as I is increased . Note that the arv is greater than 1:0 , since the variance of the original data 1920 through 1979 is fairly large . If we normalize the arv to the variance of the original data set , the results are shown in Figure 6 . Again the networks B and C perform better as I is increased . 20 40 60 80 100 120 140 160 180 200 1700 1750 1800 1850 1900 1950 Yearly sunspot averages Year Figure 4 : Sunspot data for years 1700 to 1979 . A B C D 5 10 15 20 25 30 0.4 0.6 0.8 1 1.2 1.4 1.6 Number of iterations Arv Relative multi-step prediction performance Figure 5 : Relative multi-step prediction performance . These results were normalized to a variance of 1535 . 16 A B C D 5 10 15 20 25 30 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 Number of iterations Arv Multi-step performance Figure 6 : Relative multi-step prediction performance . The results were normalized to the variance of the original data set . 4.4 Prediction of Laser Data In order to explore the capability of capturing the global behavior of NSAR neural networks , we also tested them on the laser data the Santa Fe competition . The data set consists of laser intensity collected from a laboratory experiment -LSB- 62 -RSB- . Although deterministic , its behavior is chaotic as seen in Figure 7 . Figure 8 shows the normalized autocorrelation function of the first 1000 training data points . The networks were trained as a one-step ahead predictor using the first 1000 points . The data was scaled to zero mean and unit variance . We give the results of our best performing neural network . The network was chosen to have two hidden layers . The first hidden layer had 5 neurons and the second layer had 3 neurons . We used the hyperbolic tangent function as the nonlinear function in the two hidden layers . The output layer had only one output neuron with linear function . We chose the embedding dimension to be 25 . However , the depth of the tapped delay line was very long -LRB- up to 500 -RRB- . We used the last 12 subsets , 3 subsets from the past 100 data points -LRB- i.e. , xt ? 99 , xt ? 100 , xt ? 101 -RRB- , and 10 subsets from the past 445 data points -LRB- i.e. , xt ? 445 , ? ? ? , xt ? 455 -RRB- . We heuristically chose the memory order by observing that the autocorrelation function of the training data set was peaked in these areas . The total number of weights was 152 . In this experiment , we used the adaptive learning rate algorithm and batch data presentation . The algorithm works as follows . The cost function is monitored during training . If the increase of the cost function at time t is not larger than the product of the cost of previous time step and the cost bonus , < = , the learning rate is increased by ten percent until the learning rate reaches the maximum learning rate , 1:0 , and the weights are updated . If the increase of the cost function at the present time step is larger than the product of the cost bonus and the cost of earlier time step , the weight vector of previous time step is restored and the learning rate decreases by half until it reaches the minimum learning rate -LRB- 10 ? 8 -RRB- , and the weights are updated according to the smaller learning rate and the gradient information of one time step ahead . Of course , this requires one to keep track of the weight vector and the gradient information of previous time steps . In our experiment , the initial learning rate was :01 and the cost bonus , < = , was :001 . The network was trained with the previously discussed mean squared error cost function in the batch mode -LRB- i.e. errors were accumulated until the end of the data -RRB- . When the average squared error is less than 0.004 , training was stopped and pruning commenced . This procedure was performed twice . The trained and pruned neural network NSAR gave some interesting long-term predictive behavior of the time series . The network was able to predict 1000 data points using closed-loop iteration . Figure 9 shows the 500 steps iterated prediction from time t = 1000 . Figure 10 shows the 1000 step iterated prediction ; note that the network was able to predict three collapses and there were only two collapses in the training data set . We pruned 5 taps of the original network when trained on the first 1000 data points . The final architecture had only 127 weights . 50 100 150 200 250 300 100 200 300 400 500 600 700 800 900 1000 Figure 7 : Original 1000 laser data . 100 200 300 400 500 600 700 800 900 1000 -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 1 Lag Normalized Autocorrelation Figure 8 : Normalized autocorrelation function of the 1000 laser data . -50 50 100 150 200 250 300 1000 1050 1100 1150 1200 1250 1300 1350 1400 1450 1500 Figure 9 : The solid line represents 500 data points predicted by the pruned network when using closed loop iteration . -100 -50 50 100 150 200 250 300 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 Figure 10 : The solid line represents 1000 data points predicted by the pruned network when using closed loop iteration . 5 Conclusion Determining of the proper architecture of a dynamical network is a difficult yet critical task . Not only can the nonlinear architectures affect the performance , but the memory architecture of dynamical model can have a significant impact on its dynamical behavior . In this paper , we proposed a pruning-based algorithm to determine the embedded memory order of NARX recurrent neural networks and degenerate forms such as NSAR networks . This algorithm can also incorporate several useful heuristics , e.g. weight decay , which have been used extensively in static networks to optimize the nonlinear function . We also show that this algorithm can demonstrate improved performance on both nonlinear predictions and grammatical inference tasks . Furthermore , optimizing the memory architecture and the nonlinear function through pruning often results in sparsely connected architectures but with long time windows which are able to model the global features of the underlying system quite efficiently . Though the embedding theorem demonstrates that the order of embedded memory should be large enough in order to provide a guarantee of forming a diffeomorphism mapping , choosing the proper memory order can be a challenge . Choosing different embedding memory architectures corresponds to giving different representations of the state space of the underlying system . The major issue is that such a representation plays an important role in solving problems . A good representation can make useful information explicit and easy to extract . In this work we only explored classic tapped delay memory structures . It would be interesting to see if similar results could be achieved for other memory models -LSB- 3 , 59 -RSB- . However , a minimal representation does not necessarily mean a good representation . Two different representations can be equivalent in terms of expressive power , but may make a great difference in efficiency and effectiveness of problem-solving . 6 Acknowledgements We would like to acknowledge useful discussions with G. Flake , D. Hush and J. Principe . References -LSB- 1 -RSB- H. Akaike . A new look at the statistical model identification . IEEE trans . Automatic Control , AC 19:716 -LCB- 723 , 1974 . -LSB- 2 -RSB- W. Atmar . Notes on the simulation of evolution . IEEE Transactions on Neural Networks , 5 -LRB- 1 -RRB- :130 -LCB- 148 , 1994 . -LSB- 3 -RSB- A.D. Back and A.C. Tsoi . A comparison of discrete-time operator models for nonlinear system identification . In G. Tesauro , D. Touretzky , and T. Leen , editors , Advances in Neural Information Processing Systems 7 , pages 883 -LCB- 890 . MIT Press , 1995 . -LSB- 4 -RSB- U. Bodenhausen and A. Waibel . The tempo 2 algorithm : Adjusting time-delays by supervised learning . In Advances in Neural Information Processing Systems 3 , pages 155 -LCB- 161 . Morgan Kaufmann , San Mateo , CA , 1991 . -LSB- 5 -RSB- Y. Cauvin . A back-propagation algorithm with optimal use of hidden units . In D. Touretzky , editor , Advances in Neural Information Processing Systems 1 , pages 519 -LCB- 526 , 1989 . -LSB- 6 -RSB- S. Chen , S.A. Billings , and P.M. Grant . Non -LCB- linear system identification using neural networks . International Journal of Control , 51 -LRB- 6 -RRB- :1191 -LCB- 1214 , 1990 . -LSB- 7 -RSB- Yung-Fu Cheng and Delores M. Etter . Analysis of an adaptive technique for modeling sparse systems . IEEE Transactions on Acoustics , Speech , and Signal Processing , 37 -LRB- 2 -RRB- :254 -LCB- 264 , 1989 . -LSB- 8 -RSB- D.S. Clouse , C.L. Giles , B.G. Horne , and G.W. Cottrell . Time-delay neural networks : Representation and induction of finite state machines . IEEE Transactions on Neural Networks . Accepted . -LSB- 9 -RSB- J. Connor , L.E. Atlas , and D.R. Martin . Recurrent networks and NARMA modeling . In J.E. Moody , S.J. Hanson , and R.P. Lippmann , editors , Advances in Neural Information Processing Systems 4 , pages 301 -LCB- 308 , 1992 . -LSB- 10 -RSB- Y. Le Cun , J. S. Denker , and S. A. Solla . Handwritten digit recognition with a backpropagation network . In Advances in Neural Information Processing Systems , volume 2 , pages 396 -LCB- 404 , 1990 . -LSB- 11 -RSB- Y. Le Cun , J. S. Denker , and S. A. Solla . Optimal brain damage . In D.S. Touretzky , editor , Advances in Neural Information Processing Systems , volume 2 , pages 598 -LCB- 605 , San Mateo , CA , 1990 . Morgan Kaufmann Publishers . -LSB- 12 -RSB- G. Cybenko . Approximation by superpositions of a sigmoidal function . Mathematics of Control , Signals , and Systems , 2 -LRB- 4 -RRB- :303 -LCB- 314 , 1989 . -LSB- 13 -RSB- J. E. Dayhoff D.-T . Lin and P. A. Ligomenides . A learning algorithm for adaptive time-delays in a temporal neural network . Technical Report SRC-TR-92-59 , Systems Research Center , University of Maryland , College Park , Maryland , 1992 . -LSB- 14 -RSB- Shawn P. Day and Michael R. Davenport . Continuous-time temporal back-propagation with adaptable time delays . IEEE Transactions on Neural Networks , 4 -LRB- 2 -RRB- :348 -LCB- 354 , 1993 . -LSB- 15 -RSB- D. M. Etter and S. D. Stearns . Adaptive estimation of time delays in sampled data systems . IEEE Transactions on Acoustics , Speech , and Signal Processing , ASSP-29 -LRB- 3 -RRB- :582 -LCB- 587 , 1981 . -LSB- 16 -RSB- David B. Fogel . An information criterion for optimal neural network selection . IEEE Transactions on Neural Networks , 2 -LRB- 5 -RRB- :490 -LCB- 497 , 1991 . -LSB- 17 -RSB- David B. Fogel . Using evolutionary programming for modeling : An ocean acoustic example . IEEE Journal of Oceanic Engineering , 17 -LRB- 4 -RRB- :333 -LCB- 340 , 1992 . -LSB- 18 -RSB- David B. Fogel . Evolutionary programming : An introduction and some current directions . Statistics and Computing , 4:113 -LCB- 129 , 1994 . -LSB- 19 -RSB- K. Funahashi . On the approximate realization of continuous mappings by neural networks . Neural Networks , 2 -LRB- 3 -RRB- :183 -LCB- 192 , 1989 . -LSB- 20 -RSB- C. L. Giles , B. G. Horne , and T. Lin . Learning a class of large finite state machines with a recurrent neural network . Technical Report UMIACS -LCB- TR -LCB- 94 -LCB- 94 and CS -LCB- TR -LCB- 3328 , Institute for Advanced Computer Studies , University of Maryland , College Park , Maryland , 1994 . -LSB- 21 -RSB- C.L. Giles , B.G. Horne , and T. Lin . Learning a class of large finite state machines with a recurrent neural network . Neural Networks , 8 -LRB- 9 -RRB- :1359 -LCB- 1365 , 1995 . -LSB- 22 -RSB- C.L. Giles and C.W. Omlin . Pruning recurrent neural networks for improved generalization performance . IEEE Transactions on Neural Networks , 5 -LRB- 5 -RRB- :848 -LCB- 851 , 1994 . -LSB- 23 -RSB- E. J. Hannan and B. G. Quinn . The determination of the order of an autoregression . J. Royal Stat . Soc . B. , 41:190 -LCB- 195 , 1979 . -LSB- 24 -RSB- Babak Hassibi and David G. Stork . Second order derivatives for network pruning : Optimal brain surgeon . In S.J. Hanson , J.D. Cowan , and C.L. Giles , editors , Advances in Neural Information Processing Systems 5 , San Mateo , CA , 1993 . Morgan Kaufmann Publishers . -LSB- 25 -RSB- B.G. Horne and C.L. Giles . An experimental comparison of recurrent neural networks . In Advances in Neural Information Processing Systems 7 , pages 697 -LCB- 704 . MIT Press , 1995 . -LSB- 26 -RSB- K. Hornik , M. Stinchcombe , and H. White . Multilayer feedforward networks are universal approximators . Neural Networks , 2 -LRB- 5 -RRB- :359 -LCB- 366 , 1989 . -LSB- 27 -RSB- B. Irie and S. Miyake . Capabilities of three -LCB- layered perceptrons . In Proceedings of the IEEE International Conference on Neural Networks , volume 1 , pages 641 -LCB- 648 , San Diego , CA , 1988 . IEEE . -LSB- 28 -RSB- E.D. Karnin . A simple procedure for pruning back -LCB- propagation trained neural networks . IEEE Transactions on Neural Networks , 1 -LRB- 2 -RRB- :239 -LCB- 242 , 1990 . -LSB- 29 -RSB- A. Krogh and J.A. Hertz . A simple weight decay can improve generalization . In J.E. Moody , S.J. Hanson , and R.P. Lippmann , editors , Advances in Neural Information Processing Systems 4 , pages 950 -LCB- 957 , 1992 . -LSB- 30 -RSB- K.J. Lang , A.H. Waibel , and G.E. Hinton . A time -LCB- delay neural network architecture for isolated word recognition . Neural Networks , 3 -LRB- 1 -RRB- :23 -LCB- 44 , 1990 . -LSB- 31 -RSB- A. Lapedes and R. Farber . Nonlinear signal processing using neural networks : Prediction and signal modeling . Technical Report LA -LCB- UR -LCB- 87 -LCB- 2662 , Los Alamos National Laboratories , Los Alamos , New Mexico , 1987 . -LSB- 32 -RSB- I.J. Leontaritis and S.A. Billings . Input -LCB- output parametric models for non -LCB- linear systems : Part I : deterministic non -LCB- linear systems . International Journal of Control , 41 -LRB- 2 -RRB- :303 -LCB- 328 , 1985 . -LSB- 33 -RSB- D.T. Lin , J.E. Dayhoff , and P.A. Ligomenides . Trajectory production with the adaptive timedelay neural network . Neural Networks , 8 -LRB- 3 -RRB- :447 -LCB- 461 , 1995 . -LSB- 34 -RSB- T. Lin , B.G. Horne , P. Tino , and C.L. Giles . Learning long-term dependencies in narx recurrent neural networks . IEEE Transactions on Neural Networks , 7 -LRB- 6 -RRB- :1329 -LCB- 1338 , 1996 . -LSB- 35 -RSB- Tsungnan Lin , B.G. Horne , and C.L. Giles . How memory orders effect the performance of narx networks . Technical Report UMIACS-TR-96-76 and CS-TR-3706 , Institute for Advanced Computer Studies , University of Maryland , College Park , Maryland , 1996 . -LSB- 36 -RSB- Tsungnan Lin , B.G. Horne , P. Tino , and C.L. Giles . Learning long-term dependencies is not as difficult with narx recurrent neural networks . In Advances in Neural Information Processing Systems 8 . MIT Press , Cambridge , MA , 1996 . -LSB- 37 -RSB- L. Ljung . System identification : Theory for the user . Prentice-Hall , Englewood Cliffs , NJ , 1987 . -LSB- 38 -RSB- G. A. N. Mbamalu and M. E. El-Hawary . Load forecasting via suboptimal seasonal autoregressive models and iteratively reweighted least squares estimation . IEEE Transactions on Power Systems , 8 -LRB- 1 -RRB- :343 -LCB- 348 , 1993 . -LSB- 39 -RSB- D.C. Montgomery and E.A. Peck . Introduction to Linear Regression Analysis . Wiley , New York , 1982 . -LSB- 40 -RSB- M. C. Mozer and P. Smolensky . Skeletonization : A technique for trimming the fat from a network via relevance assessment . Connection Science , 11:3 -LCB- 26 , 1989 . -LSB- 41 -RSB- K.S. Narendra and K. Parthasarathy . Identification and control of dynamical systems using neural networks . IEEE Trans . on Neural Networks , 1 -LRB- 1 -RRB- :4 -LCB- 27 , 1990 . -LSB- 42 -RSB- Gil Nave and Arnon Cohen . Ecg compression using long-term prediction . IEEE Transactions on Biomedical Engineering , 40 -LRB- 9 -RRB- :877 -LCB- 885 , 1993 . -LSB- 43 -RSB- R. Ma n?e . On the dimension of the compact invariant sets of certain nonlinear maps . In Lecture Notes in Math . No. 898 , page 230 . Springer-Verlag , 1981 . -LSB- 44 -RSB- S.J. Nowlan and G.E. Hinton . Simplifying neural networks by soft weight-sharing . Neural Computation , 4 -LRB- 4 -RRB- :473 -LCB- 493 , 1992 . -LSB- 45 -RSB- Edward Ott , Tim Sauer , and James Yorke . Coping with Chaos . John Wiley and Sons , Inc , New York , NY , 1994 . -LSB- 46 -RSB- N. Packard , J. Crutchfield , D. Farmer , and R. Shaw . Geometry from a time series . Physical Review Letter , 45:712 -LCB- 715 , 1980 . -LSB- 47 -RSB- M.W. Pedersen and L.K. Hansen . Recurrent networks : Second order properties and pruning . In G. Tesauro , D. Touretzky , and T. Leen , editors , Advances in Neural Information Processing Systems 7 . MIT Press , 1995 . -LSB- 48 -RSB- S.-Z . Qin , H.-T . Su , and T.J. McAvoy . Comparison of four neural net learning methods for dynamic system identification . IEEE Transactions on Neural Networks , 3 -LRB- 1 -RRB- :122 -LCB- 130 , 1992 . -LSB- 49 -RSB- Russel Reed . Pruning algorithms | a survey . IEEE Transactions on Neural Networks , 4 -LRB- 5 -RRB- :740 -LCB- 747 , 1993 . -LSB- 50 -RSB- J. Rissanen . Universal coding , information , prediction , and estimation . IEEE Transactions on Information Theory , IT-30 :629 -LCB- 636 , 1984 . -LSB- 51 -RSB- T. Sauer , J. Yorke , and M. Casdagli . Embedology . Journal of Statistical Physics , 65:579 -LCB- 616 , 1991 . -LSB- 52 -RSB- R. Shibata . Various model selection techniques in time series analysis . In Handbood of statistics , volume 5 , pages 179 -LCB- 187 . Eds . Amsterdam : Elsevier , 1985 . -LSB- 53 -RSB- H.T. Siegelmann , B.G. Horne , and C.L. Giles . Computational capabilities of recurrent narx neural networks . IEEE Trans . on Systems , Man and Cybernetics , 1997 . In press . -LSB- 54 -RSB- H.-T . Su and T.J. McAvoy . Identification of chemical processes using recurrent networks . In Proceedings of the American Controls Conference , volume 3 , pages 2314 -LCB- 2319 , 1991 . -LSB- 55 -RSB- H.-T . Su , T.J. McAvoy , and P. Werbos . Long -LCB- term predictions of chemical processes using recurrent neural networks : A parallel training approach . Industrial Engineering and Chemical Research , 31:1338 -LCB- 1352 , 1992 . -LSB- 56 -RSB- C. Svarer , L. K. Hansen , and J. Larsen . On design and evaluation of tapped-dealy neural architectures . In IEEE International Conf . on Neural Networks , pages 46 -LCB- 51 , 1992 . -LSB- 57 -RSB- F. Takens . Detecting strange attractors in turbulence . In Lecture Notes in Math . No. 898 , pages 366 -LCB- 381 . Springer-Verlag , 1981 . -LSB- 58 -RSB- S.T. Venkataraman . On encoding nonlinear oscillations in neural networks for locomotion . In Proceedings of the Eighth Yale Workshop on Adaptive and Learning Systems , pages 14 -LCB- 20 , 1994 . -LSB- 59 -RSB- Bert de Vries and Jose Principe . The gamma model - a new neural network for temporal processing . Neural Networks , 5 -LRB- 4 -RRB- :565 -LCB- 576 , 1992 . -LSB- 60 -RSB- A. Waibel , T. Hanazawa , G. Hinton , K. Shikano , and K. Lang . Phoneme recognition using time -LCB- delay neural networks . IEEE Transactions on Acoustics , Speech and Signal Processing , 37 -LRB- 3 -RRB- :328 -LCB- 339 , 1989 . -LSB- 61 -RSB- Andreas S. Weigend , Bernardo A. Huberman , and David E. Rumelhart . Prediction the future : A connectionist approach . International Journal of Neural Systems , 1 -LRB- 3 -RRB- :193 -LCB- 209 , 1990 . -LSB- 62 -RSB- A.S. Weigend and N.A. Gershenfeld . Time Series Prediction : Forecasting the future and understanding the past . Addison -LCB- Wesley , 1994 . -LSB- 63 -RSB- A.S. Weigend , B.A. Huberman , and D.E. Rumelhart . Predicting sunspots and exchange rates with connectionist networks . In M. Casdagli and S. Eubank , editors , Nonlinear Modeling and Forecasting , SFI Studies in the Sciences of Complexity , volume 12 . Addison -LCB- Wesley , 1991 . -LSB- 64 -RSB- Gwo-Hsing Yu and Yow-Chano Lin . A methodology for selecting subset autoregressive time series models . Journal of Time Series Analysis , 12 -LRB- 4 -RRB- :363 -LCB- 373 , 1989 .

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O B O O O B O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O B O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B I O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B I O B I O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O B I O O O O O O O O O O O O O O O O O O O O O O O B I O O B O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O B O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O B I O O O O O O O O O O O O

memory
narx networks
pruning
recurrent neural networks
temporal sequences
time series

automata
auto{regressive
embedding theory
gradient descent training
latching
long{term dependencies
tapped{delay lines