ReservoirComputing.jl
ReservoirComputing.jl provides an efficient, modular and easy to use implementation of Reservoir Computing models such as Echo State Networks (ESNs). Reservoir Computing (RC) is an umbrella term used to describe a family of models such as ESNs and Liquid State Machines (LSMs). The key concept is to expand the input data into a higher dimension and use regression in order to train the model; in some ways Reservoir Computers can be considered similar to kernel methods.
This library assumes some basic knowledge of Reservoir Computing. For a good introduction, we suggest the following papers: the first two are the seminal papers about ESN and LSM, the others are in-depth review papers that should cover all the needed information. For the majority of the algorithms implemented in this library we cited in the documentation the original work introducing them. If you ever are in doubt about about a method or a function just type ? function in the Julia REPL to read the relevant notes.
- Jaeger, Herbert: The “echo state” approach to analyzing and training recurrent neural networks-with an erratum note.
- Maass W, Natschläger T, Markram H: Real-time computing without stable states: a new framework for neural computation based on perturbations.
- Lukoševičius, Mantas: A practical guide to applying echo state networks." Neural networks: Tricks of the trade.
- Lukoševičius, Mantas, and Herbert Jaeger: Reservoir computing approaches to recurrent neural network training.
Installation
ReservoirComputing.jl is registered in the General Julia Registry, so the installation of the package follows the usual procedure:
import Pkg; Pkg.add("ReservoirComputing")The support for this library is for Julia v1.6 or greater.
Features Overview
This library provides multiple ways of training the chosen RC model. More specifically the available algorithms are:
StandardRidge: a naive implementation of Ridge Regression. The default choice for training.LinearModel: a wrap around MLJLinearModels.GaussianProcess: a wrap around GaussianProcesses.LIBSVM.AbstractSVR: a direct call of LIBSVM regression methods.
Also provided are two different ways of doing predictions using RC:
Generative: the algorithm uses the prediction of the model in the previous step to continue the prediction. It only needs the number of steps as input.Predictive: standard Machine Learning type of prediction. Given the features the RC model will return the label/prediction.
It is possible to modify the RC obtained states in the training and prediction step using the following:
StandardStates: default choice, no changes will be made to the states.ExtendedStates: the states are extended using a vertical concatenation with the input data.PaddedStates: the states are padded using a vertical concatenation with the choosing padding valuePaddedExtendedStates: a combination of the first two. First the states are extended and then padded.
In addition another modification is possible through the choice of non linear algorithms:
NLADefault: default choice, no changes will be made to the states.NLAT1NLAT2NLAT3
Echo State Networks
Regarding ESNs in the library are implemented the following input layers:
WeightedLayer: weighted layer matrix with weights sampled from a uniform distribution.DenseLayer: dense layer matrix with weights sampled from a uniform distribution.SparseLayer: sparse layer matrix with weights sampled from a uniform distribution.MinimumLayer: matrix with constant weights and weight sign decided following one of the two:BernoulliSampleIrrationalSample
InformedLayer: special kin of weighted layer matrix for Hybrid ESNs.
The package also contains multiple implementation of Reservoirs:
RandSparseReservoir: random sparse matrix with scaling of spectral radiusPseudoSVDReservoir: Pseudo SVD construction of a random sparse matrixDelayLineReservoir: minimal matrix with chosen weightsDelayLineBackwardReservoir: minimal matrix with chosen weightsSimpleCycleReservoir: minimal matrix with chosen weightsCycleJumpsReservoir: minimal matrix with chosen weights
In addition multiple ways of driving the reservoir states are also provided:
RNN: standard Recurrent Neural Network driver.MRNN: Multiple RNN driver, it consists on a linear combination of RNNsGRU: gated Recurrent Unit driver, with all the possible GRU variants available:FullyGatedVariant1Variant2Variant3Minimal
An hybrid version of the model is also available through Hybrid
Reservoir Computing with Cellular Automata
The package provides also an implementation of Reservoir Computing models based on one dimensional Cellular Automata through the RECA call. For the moment the only input encoding available (an input encoding plays a similar role to the input matrix for ESNs) is a random mapping, called through RandomMapping.
All the training methods described above can be used, as well as all the modifications to the states. Both prediction methods are also possible in theory, although in the literature only Predictive tasks have been explored.
Contributing
Contributions are very welcomed! Some interesting variation of RC models are posted in the issues, but everyone is free to just post relevant papers that could fit the scope of the library. Help with the documentation, providing new examples or application cases is also really important and appreciated. Everything that can make the package a little better is a great contribution, no matter how small. The API section of the documentation provides a more in depth look into how things work and are connected, so that is a good place to start exploring more the library. For every doubt that cannot be expressed in issues please feel free to contact any of the lead developers on Slack or by email.
Citing
If you use this library in your work, please cite:
@misc{https://doi.org/10.48550/arxiv.2204.05117,
doi = {10.48550/ARXIV.2204.05117},
url = {https://arxiv.org/abs/2204.05117},
author = {Martinuzzi, Francesco and Rackauckas, Chris and Abdelrehim, Anas and Mahecha, Miguel D. and Mora, Karin},
keywords = {Computational Engineering, Finance, and Science (cs.CE), Artificial Intelligence (cs.AI), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {ReservoirComputing.jl: An Efficient and Modular Library for Reservoir Computing Models},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}