Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Time-Series data and RNNs

GPU is available, using GPU Tesla T4
Loading...
<Figure size 960x720 with 1 Axes>
RNN Train Dataset has 2908 sequences
RNN Test Dataset has 375 sequences
<Figure size 960x720 with 1 Axes>

A simple baseline for time-series forecasting

<Figure size 960x720 with 1 Axes>
<Figure size 960x720 with 1 Axes>
[Text(0, 0.5, 'Sunspots')]
<Figure size 960x720 with 1 Axes>

Another baseline (ARIMA)

278
<Figure size 960x720 with 1 Axes>
Mean absolute deviation: 35 spots / year
<Figure size 960x720 with 1 Axes>
Mean absolute deviation: 22 spots / year
<Figure size 960x720 with 1 Axes>

RNN Training

Loading...
<Figure size 750x375 with 2 Axes>
Mean absolute deviation: 36 sunspots / year
<Figure size 960x720 with 1 Axes>

RNN forecasting with residual connections

A residual connection on RNN outputs is analagous to the discrete form of a differential equation

y(t+Δt)=y(t)+RNN(t) Δt→RNN(t)=y(t+Δt)−y(t)Δt≈dydt\begin{align*} y(t + \Delta t) &= y(t) + RNN(t) \, \Delta t \\ \\ \rightarrow RNN(t) &= \frac{y(t + \Delta t) - y(t)}{\Delta t} \approx \frac{d y}{dt} \end{align*}

A continuous analogue which is both interesting and useful is NeuralODE

Loading...
<Figure size 750x375 with 2 Axes>
Mean absolute deviation: 31 sunspots / year
<Figure size 960x720 with 1 Axes>

Reservoir computing

A reservoir computer is a recurrent neural network variant whose hidden state weights are frozen. The state transitions are modeled using a “reservoir” which in general has the following properties:

  • The reservoir is big, and the RNN hidden state is a high-dimensional vector

  • The reservoir is sparse, so that the hidden state elements do not interact much

  • The resevoir is random, so that there is a broad range of hidden state dynamics

  • The resevoir is contracting, so that signals do not explode or persist indefinitely

Once initialized, we couple inputs to the reservoir via another frozen random matrix. The “training” task requires learning the output weight matrix that maps hidden states to dynamics predictions. Typically, this is done via linear regression.

Additional reading: [1] [2] [3]