Road traffic reservoir computing

12/02/2019 ∙ by Hiroyasu Ando, et al. ∙ 0

Reservoir computing derived from recurrent neural networks is more applicable to real world systems than deep learning because of its low computational cost and potential for physical implementation. Specifically, physical reservoir computing, which replaces the dynamics of reservoir units with physical phenomena, has recently received considerable attention. In this study, we propose a method of exploiting the dynamics of road traffic as a reservoir, and numerically confirm its feasibility by applying several prediction tasks based on a simple mathematical model of the traffic flow.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Information processing in the brain is conducted by means of electrical signals in neural networks (NNs). A model of NNs has been studied for more than half a century [1]. Recently, NNs have exhibited impressive performance in difficult tasks owing to the development of learning algorithms and computers. Specifically, it is well-known that multi-layered NNs are suitable for the task of image processing and recurrent NNs are useful for time series processing. Although these models of deep neural networks are typical examples of deep learning [2], the high performance of the models requires a large amount of computational cost. Meanwhile, reservoir computing has received considerable attention in terms of low computational cost, which is derived from recurrent NNs with a simple learning rule [3].

In reservoir computing, input signals are mapped into a high dimensional space represented by a large size of NN with randomly fixed weights. Moreover, the complex dynamics of NN preserves the memory of input signals in the high dimensional space so that it is possible to learn the desired output using a linear model. According to the property of fixed weights, the recurrent NN can be replaced other complex dynamic systems, namely physical reservoirs, such as a water surface filled in a bucket.

In this study, we consider a mathematical model, which exploits the dynamics of road traffic as a reservoir. The dynamics of road traffic are determined by the aggregation of individual vehicles while maintaining traffic order. Each vehicle is traveling a road network from its origin to its destination, and the network is basically common for all traveling vehicles in a limited space. Therefore, all the traveling vehicles generate the complex dynamics of traffic flow that can be used for reservoir computing.

In the viewpoint of computational cost, a reservoir computing by measuring the real traffic flow and exploiting its complex dynamics can detect the computational resource not only from cyberspace, i.e., computers, but also from physical space. This means that the framework of reservoir computing with real traffic flow potentially reduces the computational cost of computers.

For the purpose of this study, we verify the proposed concept of road traffic reservoir computing by simulating a mathematical model of traffic flow, before applying the idea to traffic dynamics in the real world. Precisely, we consider one of the simplest models of the traffic flow, in which some of the fundamental conditions for real traffic flow are assumed, and numerically simulate it to confirm the feasibility of the road traffic reservoir computing. Moreover, we simulate the multi-agent based model of traffic flow with the optimal velocity rule [4] and verify the proposed concept in this model as well.

2 Model

First, to make the road network simple, we consider a lattice network system with a traffic signal at the junctions. To introduce reservoir units into the system, each traffic signal has its internal state which is determined by the dynamics of traffic flow intersecting the junction of the traffic signal. Precisely, we define a phase of the traffic signal with the time constant . Further, the dynamics of the phase is governed by the following discrete time dynamic systems.


where is an initial phase shift. Now, we can define the internal state of the reservoir unit at the traffic signal (reservoir unit ) as follows:


where the set of is the internal state of the reservoir unit at time , and is a sum of inflow to the junction of the traffic signal . The inflow to the junction is considered later. Note that the sinusoidal function for calculating internal states can be replaced with other nonlinear functions.

Next, we define the dynamics of traffic flow which satisfy the fundamental assumptions of the LWR (Lighthill, Whitham, Richards) model [5], i.e. 1) the conservation law for the number of vehicles and 2) the concave functional relation between flow (vehicles per hour) and density (vehicles per mile). For simplicity, we assume that the considered phase of flow and density is in that of free flow, namely there is no traffic jam in the model and is proportional to . Due to the above assumptions, we define the dynamics of traffic flow as follows. The number of vehicles in the road between neighboring junctions and at time is denoted by . The length of the corresponding road is denoted by . Further, we define as the inflow to the node from the road between nodes and . This means that the velocity is constant, or equal to 1, and the amount of inflow is governed by the density . Therefore, , where is a set of neighboring nodes to . We call this model a density model.

In addition, the outflow from node

is determined by a sum of parts of inflows to the node, namely the amount of outflow with respect to one inflow is determined stochastically with the probability of

, , and , which means turning right, turning left, and going straight, respectively. Hence, is satisfied. These three probabilities are assigned to all inflows for one node randomly. In the case of a boundary in the lattice network, we do not consider the output and input of a vehicle for simplicity. Finally, we introduce a stop and go function to the traffic signal such that the inflow from one direction is zero (i.e. stop) and its perpendicular direction has some value (i.e. go) when at the junction . Otherwise, the former direction is “go” and the latter is “stop”. Note that the dynamics of traffic flow in this model are determined by the inflow, the outflow, and the phase.

Regarding the readout from the reservoir units, we use a standard linear model. In other words, the output weight of the model

is estimated by the ridge regression as

. and are the -length time series of a teacher signal and the states of the reservoir units , respectively. We define (def. (a)) or (def. (b)). Here, and the same as . Further, the dimension of is for def. (a) and for def. (b). is a hyper parameter. Note that corresponds to the input signal for the reservoir however, is not necessarily added to the reservoir units depending on a task. We discuss this point later. is forecast horizon explained in the next section.

is a vector concatenation.

In addition, we also consider the multi-agent based model of traffic flow in which each agent follows the vehicle ahead on the same road with the optimal velocity model [4]. Depending on the parameters, a traffic jam can be observed in this model. Therefore, if the prediction on this model is performed well, it should be more realistic than the density model. We call this model a multi-agent model. In this model, the above def. (a) is slightly modified as: , where is a vector of the densities in roads at time .

3 Prediction task

In this study, we consider the following two prediction tasks.

  1. Prediction of the density in a link of the network with step forecast horizon.

  2. Prediction of temperature in Tsukuba city with step forecast horizon.

The first task is predicting an internal state of the traffic dynamics so that there is no external input to the system. Moreover, the second task is based on a prediction of an arbitrary time series independent from the traffic dynamics. Therefore, an external input needs to be added to the reservoir units. We consider how to apply an external input to the system as follows. Note that in this task. At every time step, the phase is perturbed by the input as , where is a random vector. Regarding the definition of , the defs. (a) and (b) are applied to the tasks (1) and (2), respectively. Note that the def. (b) makes the prediction easier for task (2), so we do not consider this case.

In addition, we consider a constraint condition that all the reservoir units are not necessarily used for the prediction task 1. Here, we introduce a parameter representing the fraction of available reservoir units out of all units. This condition is introduced to evaluate the ability of predicting traffic density in a target road that is not connected to reservoir units used for the prediction. We investigate how many reservoir units can be reduced for good prediction performance.

In the following section, we numerically evaluate the precision of the prediction tasks 1 and 2 by the reservoir units with the density model. Regarding the multi-agent model, we check the prediction ability of the reservoir system for task 1. The precision is evaluated by the logarithm of the normalized root mean-square error (logNRMSE): where represents the time average, and is the predicted .

4 Results

In this section, we show the numerical results of prediction for tasks 1 and 2. First, Fig. 1 (a) shows the precision of prediction depending on the fraction parameter for task 1 when , , , and . The results are averaged over 20 trials. The lengths of training and test time series are and time steps, respectively. It is clearly observed that precision increases with an increasing value of . This dependency is reasonable, as reducing the number of reservoir units makes the prediction worse. In fact, delayed prediction for very small is observed, as shown in Fig. 1 (b). It is not indicated that this is a prediction, as a predicted signal generates step ahead of the teacher signal with some scale transformation. Otherwise, it is possible to predict traffic density sufficiently well for an intermediate value of , say , as shown in Fig. 1 (c). This implies that road traffic in some areas can be exploited as reservoir units for predicting the traffic density in other areas. Note that the delayed prediction is also observed even for a large value of , when are varied and the time series of the density is complex.

Figure 1: (a) Precision of prediction in the density model with respect to the fraction parameter ;(b) The size of the road network ;(c) Predicted time series of the density in one road that is not connected to the reservoir units for prediction.

In Fig. 2, we show the results of task 1 for the multi-agent based model with . Fig. 2 (a) shows the dependency of precision on the number of roads that determine the dimensions of . The results are averaged over 10 trials. The lengths of training and test time series are and time steps, respectively. As shown in the figure, precision decreases with decreasing . However, it is not necessarily required for the density of all roads, i.e., is sufficient for prediction in some cases. In fact, Fig. 2 (b) shows the time series of prediction in the case of , where 4 roads are omitted from estimating . As shown in the figure, the densities of the 4 roads are predicted moderately from the densities of the other 20 roads and the 9 reservoir units. These results imply that our concept of road traffic reservoir computing is applicable in the case that the traffic flow in a road network includes both jam flow together with free flow.

Figure 2: (a) Precision of prediction in the multi-agent model with respect to the number of roads . roads are determined randomly from all roads for . The results are averaged over 10 trials; (b) The predicted time series of densities for 4 omitted roads from the estimation of when .

Fig. 3 shows the prediction results of task 2 by the density model. Fig. 3 (a) shows the dependency of precision on the forecast horizon . The lengths of training and test time series are and time steps, respectively. Precision decreases with increasing . For large , the delayed prediction is also observed in this task. As one-time step corresponds to 15 min in this case, it is possible to take a sufficiently large forecast horizon with moderate prediction. In fact, Fig. 3 (b) shows an example of the predicted time series for (150 mins.), which is the average of five trials. This averaging operation is reasonable for real time prediction because the estimation of can be done in parallel for .

Figure 3: (a) Precision of predicting temperature in Tsukuba city by the density model with respect to the forecast horizon . The size of road network . The results are averaged over 20 trials. (b) Predicted temperature time series with . The time series are the average of five trials.

5 Conclusions and Future works

In this study, we proposed a concept of reservoir computing with road traffic dynamics and verified it by numerical simulations for the flow-density model as well as the multi-agent model with the optimal velocity rule. We summarized the characteristics of a road traffic reservoir by computing as follows. i) In the task of predicting the internal state of the system, it does not require external inputs to the system, which implies that the system is closed. ii) It is possible to observe the learning process in the internal state. Therefore, we may discuss the interpretability of prediction deductively. iii) Once real time traffic data are available, a part of the prediction calculation is assigned to the physical phenomena, which implies that the computational cost can be reduced. As for future research, we will systematically simulate the proposed models to make the relation between the multi-agent model and the density model clear. Likewise, the problem of delayed prediction that is observed for a complex time series can be solved by improving the linear model for output from the reservoir units.


  • [1] S.I. Amari, Dreaming of mathematical neuroscience for half a century, Neural Networks, 37:48-51, Elsevier, 2013.
  • [2] Y. LeCun, Y. Bengio and G. Hinton, Deep learning, Nature, 521: 436-444, Macmillan Publishers Limited, 2015.
  • [3] H. Jaeger, The ”echo state” approach to analysing and training recurrent neural networks. GMD Report 148, GMD - German National Research Institute for Computer Science, January 2001.
  • [4] M. Bando, K. Hasebe, K. Nakanishi, A. Nakayama, A. Shibata, et al.. Phenomenological Study of Dynamical Model of Traffic Flow. Journal de Physique I, EDP Sciences, 5 (11), pp.1389-1399,1995.
  • [5] M. J. Lighthill, G. B. Whitham, On kinematic waves II. A theory of traffic flow on long crowded roads, Proceedings of the royal society A, 229, 317–345, 1955.