Formale Methoden UZH Nov 2013
Formale Methoden UZH Nov 2013
Reservoir Computing
Helmut Hauser
Artificial Intelligence Laboratory
university of Zurich
Overview
What are we talking about?
...
What are we talking about?
...
input Mapping output
...
...
What are we talking about?
Computation
...
...
Mapping
...
...
What are we talking about?
Computation
...
...
Mapping
...
...
What are we talking about?
Computation
...
...
Mapping
...
...
What are we talking about?
Computation
...
...
emulation
Mapping
...
...
What are we talking about?
Computation
...
...
emulation
Mapping
...
...
• We want to learn this mapping with machine learning techniques
What are we talking about?
Computation
...
...
emulation
Mapping
...
...
• We want to learn this mapping with machine learning techniques
• Different levels of complexity for the mapping are possible
Simplest Mapping:
Look-up table
input output
...
...
Simplest Mapping:
Look-up table
input output
...
...
Pro: Simple, fast, non-smooth mappings are possible
Simplest Mapping:
Look-up table
input output
...
...
Pro: Simple, fast, non-smooth mappings are possible
Con: You have to know every single point of mapping
(no generalization properties), no memory
Artificial Neural Networks
input output
...
...
...
Artificial Neural Networks
hidden layer
input output
...
...
...
Artificial Neural Networks
hidden layer
input output
...
...
...
Input node
Artificial Neural Networks
hidden layer
input output
...
...
...
Input node
Node: summation of input plus nonlinearity
Artificial Neural Networks
hidden layer
input output
...
...
...
Input node
Node: summation of input plus nonlinearity
Weight of “importance”
Artificial Neural Networks
hidden layer
input output
...
...
...
Input node
Node: summation of input plus nonlinearity
Weight of “importance”
Output node (linear or nonlinear)
Artificial Neural Networks
hidden layer
input output
...
...
...
Artificial Neural Networks
hidden layer
input output
...
...
...
input output
...
...
...
input output
...
...
...
input output
...
...
...
Artificial Neural Networks
hidden layer
input output
...
...
...
• Feedforward structure
Artificial Neural Networks
hidden layer
input output
...
...
...
• Feedforward structure
• Static (no memory) - mapping point to point
Artificial Neural Networks
hidden layer
input output
...
...
...
• Feedforward structure
• Static (no memory) - mapping point to point
• Nonlinear with generalization property
Artificial Neural Networks
hidden layer
input output
...
...
...
• Feedforward structure
• Static (no memory) - mapping point to point
• Nonlinear with generalization property
Memory is important in a lot
of cases
time
Memory is important in a lot
of cases
discrete case
input
time
Memory is important in a lot
of cases
X
output
discrete case
...
input
time
Memory is important in a lot
of cases
X
output
discrete case
...
input
time
history
Memory is important in a lot
of cases
X
output
discrete case
...
input
time
history
memory is needed
Memory is important in a lot
of cases
discrete case
...
delay line
time
history
memory is needed
Memory is important in a lot
of cases
discrete case
...
delay line
time
history
memory is needed
Memory is important in a lot
of cases
Z 0
continuous case 1
output
input
time
history
memory is needed
Memory is important in a lot
of cases
Memory is important in a lot
of cases
• Elman networks
http://en.wikipedia.org/wiki/File:Elman_srnn.png
Different RNNs
• Elman networks
• Hopfield
http://commons.wikimedia.org/wiki/File:Hopfield-net.png
Different RNNs
• Elman networks
• Hopfield
• Anything is possible...
http://edizquierdo.wordpress.com/2008/10/02/bacterial-chemotaxis/
Different RNNs
• Elman networks
• Hopfield
• Anything is possible...
http://edizquierdo.wordpress.com/2008/10/02/bacterial-chemotaxis/
learning Rules for RNN
Learning is not trivial anymore !
learning Rules for RNN
Learning is not trivial anymore !
fixed during
learning
input s2
sN
Solution Reservoir
Computing Approach
reservoir s1
input s2
sN
input s2
sN
input s2
sN
...
sN
Solution Reservoir
Computing Approach
N
X
reservoir u(t) = b0 + wi · si (t)
i=1
s1
X
input output
...
sN
Solution Reservoir
Computing Approach
N
X
reservoir u(t) = b0 + wi · si (t)
i=1
s1
X
input output
...
sN
...
sN
... X
...
Learning Setup
one or
multiple
... X
...
Learning Setup
... X
...
Learning Setup
... X
...
randomly initialized
Learning Setup
X
u1
X
... u2
...
...
X
uK
randomly initialized
Learning Setup
X
u1
X
... u2
...
...
X
uK
randomly initialized
multitasking
Learning Setup
X
u1
X
... u2
...
...
X
uK
randomly initialized
Learning Setup
...
Learning Setup
...
mapping that we want
to emulate
(Black Box)
Learning Setup
...
mapping that we want
to emulate
(Black Box)
Learning Setup
...
target output
...
target output
emulation
...
target output
emulation
s1
s2
...
input
sN
Learning Setup
supervised learning setup collect data
s1
s2
...
input
sN
matrix
N number of signals
s1
s2
...
input
sN
matrix
N number of signals
...
target output
Learning Setup
supervised learning setup
...
target output
matrix
target output
Learning Setup
supervised learning setup
...
target output
matrix
linear optimal
regression weights
wi
target output
Learning Setup
supervised learning setup
...
target output
matrix
linear optimal
regression weights
wi
target output
minimize the quadratic error
Learning Setup for
Feedback
supervised learning setup
...
target output
computation we want
to emulate
(Black Box)
Learning Setup for
Feedback
supervised learning setup
...
target output
unstable
computation we want
to emulate
(Black Box)
Learning Setup for
Feedback collect all data points
over time
...
target output
teacher forcing
Learning Setup for
Feedback collect all data points
noise
over time
...
target output
noise is crucial for
robustness!
Learning Setup for
Feedback
noise
...
target output
matrix
linear optimal
regression weights
wi
target output
minimize the quadratic error
Learning Setup for
Feedback
...
Learning Setup for
Feedback
...
close loop,
let system run freely
Theories of Reservoir
Computing
Theories of Reservoir
Computing
X
feedforward
...
Theories of Reservoir
Computing
X
feedforward
...
X
feedback
...
Theories of Reservoir
Computing
X
feedforward
...
two different theories
X
feedback
...
Mathematical Formulation
X
reservoir
...
Mathematical Formulation
X
reservoir
...
Mathematical Formulation
X
reservoir mathematical operator
...
Mathematical Formulation
X
reservoir mathematical operator
...
...
...
streams operators streams
Mathematical Formulation
X
reservoir mathematical operator
...
...
streams operators streams
Hauser, Helmut, Auke J. Ijspeert, Rudolf M. Füchslin, Rolf Pfeifer, and Wolfgang Maass. "Towards a
theoretical foundation for morphological computation with compliant bodies" Biological Cybernetics
105, no. 5-6 (2011): 355-370.
First Theoretical Model
Hauser, Helmut, Auke J. Ijspeert, Rudolf M. Füchslin, Rolf Pfeifer, and Wolfgang Maass. "Towards a
theoretical foundation for morphological computation with compliant bodies" Biological Cybernetics
105, no. 5-6 (2011): 355-370.
First Theoretical Model
temporal nonlinear
integration
• Encoding combination
our computational task
• Nonlinear, dynamic
B1 operator
B2 f
• Any exp. stable nonlinear dynamic system with one point
...
...
of equilibrium
Bk
temporal nonlinear
integration
• Encoding combination
our computational task
• Nonlinear, dynamic
B1 operator
B2 f
• Any exp. stable nonlinear dynamic system with one point
...
...
of equilibrium
Bk
...
of equilibrium
Bk
...
of equilibrium
Bk
...
of equilibrium
Bk
nonlinear controller
linear, dynamic nonlinear, static
First Theoretical Model
Hauser, Helmut, Auke J. Ijspeert, Rudolf M. Füchslin, Rolf Pfeifer, and Wolfgang Maass. "Towards a
theoretical foundation for morphological computation with compliant bodies" Biological Cybernetics
105, no. 5-6 (2011): 355-370.
First Theoretical Model
memory
1
Hauser, Helmut, Auke J. Ijspeert, Rudolf M. Füchslin, Rolf Pfeifer, and Wolfgang Maass. "Towards a
theoretical foundation for morphological computation with compliant bodies" Biological Cybernetics
105, no. 5-6 (2011): 355-370.
First Theoretical Model
memory nonlinearity
1 2
Hauser, Helmut, Auke J. Ijspeert, Rudolf M. Füchslin, Rolf Pfeifer, and Wolfgang Maass. "Towards a
theoretical foundation for morphological computation with compliant bodies" Biological Cybernetics
105, no. 5-6 (2011): 355-370.
First Theoretical Model
1 2
First Theoretical Model
temporal
integration
1 2
linear, dynamic
First Theoretical Model
temporal nonlinear
integration combination
1 2
temporal nonlinear
integration combination
B1
B2 f
...
...
...
Bk
Has totemporal
separate signals nonlinear
integration combination
B1
B2 f
...
...
...
Bk
Has totemporal
separate signals nonlinear
integration combination
B1
B2 f
...
...
...
Bk
Has totemporal
separate signals nonlinear
integration combination
B1
B2 f
...
...
...
Bk
Has totemporal
separate signals nonlinear
integration combination
B1
B2 f
...
...
...
Bk
B2
Has totemporal
separate signals nonlinear
integration combination
B1
B2 f
...
...
...
Bk
B2
Has totemporal
separate signals nonlinear
integration combination
B1
B2 f
...
...
...
Bk
B2
Has totemporal
separate signals nonlinear
integration combination
B1
B2 f
...
...
...
Bk
B1
B2 f
...
...
...
Bk
nonlinear, dynamic
operator
temporal nonlinear
integration combination
B1
B2 f
...
...
...
Bk
nonlinear, dynamic
operator
temporal nonlinear
integration combination
B1
B2 f
...
...
...
Bk
nonlinear, dynamic
operator
temporal nonlinear
integration combination
B1
B2 f
...
...
...
Bk
nonlinear, dynamic
operator
emulation
temporal nonlinear
integration combination
B1
B2 f
...
...
...
Bk
nonlinear, dynamic
operator
B1
B2 f
...
...
...
Bk
nonlinear, dynamic
operator
ẋ = A1 (x) + b1 u
ẋ = A2 (x) + b2 u f
...
...
...
ẋ = Ak (x) + bk u
nonlinear, dynamic
operator
emulation
temporal nonlinear
integration combination
ẋ = A1 (x) + b1 u
ẋ = A2 (x) + b2 u f
...
...
...
ẋ = Ak (x) + bk u
nonlinear, dynamic
operator
emulation
temporal nonlinear
integration combination
ẋ = A1 (x) + b1 u
ẋ = A2 (x) + b2 u f
...
...
ANN
...
ẋ = Ak (x) + bk u
...
ANN
...
...
ẋ = Ak (x) + bk u
NOT A RESERVOIR
SETUP YET
temporal nonlinear
integration combination
ẋ = A1 (x) + b1 u
ẋ = A2 (x) + b2 u f
...
ANN
...
...
ẋ = Ak (x) + bk u
...
ANN
...
...
ẋ = Ak (x) + bk u
...
ANN
...
...
ẋ = Ak (x) + bk u
X
...
...
• Nonlinear, static mapping could also be done by ”kernel”
• Idea: complex, nonlinear high-dimensional dynamic system could
be seen as an implementation of such a finite kernel
• Combining both stages - we get a reservoir
Reservoir Setup
temporal nonlinear
integration + combination
X
...
...
Reservoir Setup
temporal nonlinear
integration + combination
X
...
...
nonlinearities, memory
are part of the reservoir
Reservoir Setup
temporal nonlinear
integration + combination
X
...
...
nonlinearities, memory simple, static, linear
are part of the reservoir readout - linear regression
Reservoir Setup
nonlinear, dynamic
operator
X
...
...
nonlinearities, memory simple, static, linear
are part of the reservoir readout - linear regression
Reservoir Setup
nonlinear, dynamic
operator
X
...
...
nonlinearities, memory simple, static, linear
are part of the reservoir readout - linear regression
Desired Properties
temporal nonlinear
integration + combination
X
...
...
Desired Properties
temporal nonlinear
integration + combination
kernel property
X
...
...
Desired Properties
temporal nonlinear
integration + combination
kernel property
X
...
...
The reservoir should be:
Desired Properties
temporal nonlinear
integration + combination
kernel property
X
...
...
The reservoir should be:
• Nonlinear
Desired Properties
temporal nonlinear
integration + combination
kernel property
X
...
...
The reservoir should be:
• Nonlinear
• High-dimensional
Desired Properties
temporal nonlinear
integration + combination
kernel property
X
...
...
The reservoir should be:
• Nonlinear
• High-dimensional
• Dynamic (fading memory)
Desired Properties
temporal nonlinear
integration + combination
kernel property
X
...
...
The reservoir should be: ...but otherwise
completely generic
• Nonlinear
• High-dimensional
• Dynamic (fading memory)
Desired Properties
temporal nonlinear
integration + combination
kernel property
X
...
...
The reservoir should be: ...but otherwise
completely generic
• Nonlinear
• High-dimensional
• Dynamic (fading memory) different flavors of RC
Different Flavors of RC
temporal nonlinear
integration + combination
X
...
...
Neuron (model)
Synaptic connection
Spike trains
Connection based on
biological data
Different Flavors of RC
temporal nonlinear
integration + combination
X
...
...
Neuron (model)
Liquid State
Synaptic connection
Machine
Spike trains
Maass et al. 2002
Connection based on
biological data
Different Flavors of RC
temporal nonlinear
integration + combination
X
...
...
Simple diff. equation (nonlinearity)
weighted connection
Full connectivity
Pure machine learning
technique
Different Flavors of RC
temporal nonlinear
integration + combination
X
...
...
Simple diff. equation (nonlinearity)
weighted connection Echo State
Network
Full connectivity
Pure machine learning Jaeger 2002
technique
Different Flavors of RC
temporal nonlinear
integration + combination
X
...
...
bucket of water
Different Flavors of RC
temporal nonlinear
integration + combination
X
...
...
bucket of water
X
...
...
bucket of water
X
...
...
bucket of water
Nonlinear optical X
...
effects of laser
...
Different Flavors of RC
temporal nonlinear
integration + combination
Nonlinear optical X
...
effects of laser
...
• Nonlinear optical effects are exploited
Different Flavors of RC
temporal nonlinear
integration + combination
Nonlinear optical X
...
effects of laser
...
• Nonlinear optical effects are exploited
• Calculating at the speed of light
Different Flavors of RC
temporal nonlinear
integration + combination
Nonlinear optical X
...
effects of laser
...
• Nonlinear optical effects are exploited
• Calculating at the speed of light
• Generic computational device
Different Flavors of RC
temporal nonlinear
integration + combination
Nonlinear optical X
...
effects of laser
...
• Nonlinear optical effects are exploited
Photonic RC
• Calculating at the speed of light
• Generic computational device
Massar, Dambri, Schrauwen
Different Flavors of RC
e.g., physical body of a robot
temporal nonlinear
integration + combination
X
...
...
Different Flavors of RC
e.g., physical body of a robot
temporal nonlinear
integration + combination
X
...
...
masses (scaling)
nonlinear springs
temporal nonlinear
integration + combination
X
...
...
masses (scaling)
nonlinear springs physical reservoir
computing
only local connectivity
Morphological computation setup Hauser et al. 2012
Different Flavors of RC
e.g., physical body of a robot
temporal nonlinear
integration + combination
X
...
...
masses (scaling)
nonlinear springs physical reservoir
computing
only local connectivity
Morphological computation setup Hauser et al. 2012
Remarkable Conclusion
nonlinear, dynamic
operator
temporal nonlinear
integration combination
X
...
...
Remarkable Conclusion
nonlinear, dynamic
operator
temporal nonlinear
integration combination
X
...
...
Outsourcing big part of the
computation to the
morphology
Remarkable Conclusion
nonlinear, dynamic
operator
temporal nonlinear
integration combination
X
...
...
Outsourcing big part of the resulting task is
computation to the easier:
morphology linear regression
Remarkable Conclusion
nonlinear, dynamic
operator
temporal nonlinear
integration combination
X
...
...
Outsourcing big part of the resulting task is
computation to the easier:
morphology linear regression
temporal nonlinear
integration combination
X
...
...
Concept of Morphological Computation
Remarkable Conclusion
randomly
initialized! temporal nonlinear
integration combination
X
...
...
Concept of Morphological Computation
Remarkable Conclusion
randomly
initialized! temporal nonlinear
integration combination
l
na
sio
en
im X
...
-d
...
gh
hi
l
na
sio
en
r
ea
im X
in
...
-d
...
nl
gh
no
hi
l
na
sio
en
nt
ea
im X
ia
in
...
pl
-d
...
nl
m
gh
no
co
hi
high-dimensional
nonlinear
compliant
high-dimensional
nonlinear
compliant
high-dimensional
nonlinear
compliant
Actually, I do like
that!
temporal nonlinear
integration + combination
X
...
...
Limitation
temporal nonlinear
integration + combination
X
...
...
• The theoretical model is limited to time-invariant operators with
fading memory
Limitation
temporal nonlinear
integration + combination
X
...
...
• The theoretical model is limited to time-invariant operators with
fading memory
• Persistent memory is of interest too, or limit cycles
Limitation
temporal nonlinear
integration + combination
X
...
...
• The theoretical model is limited to time-invariant operators with
fading memory
• Persistent memory is of interest too, or limit cycles
• Another theory is needed!
Limitation
temporal nonlinear
integration + combination
X
...
...
• The theoretical model is limited to time-invariant operators with
fading memory
• Persistent memory is of interest too, or limit cycles
• Another theory is needed!
• based on feedback linearization from control theory
Second Theoretical Model
Second Theoretical Model
• Based on the concept of “feedback linearization” from control theory
• Maass et al. 2007 applied to generic neural networks, Hauser et al. to
physical bodies
Second Theoretical Model
• Based on the concept of “feedback linearization” from control theory
• Maass et al. 2007 applied to generic neural networks, Hauser et al. to
physical bodies
u(t) z(t)
z(t)(n) = G(z(t), z(t)0 , . . . , z(t)(n 1)
) + u(t)
Second Theoretical Model
• Based on the concept of “feedback linearization” from control theory
• Maass et al. 2007 applied to generic neural networks, Hauser et al. to
physical bodies
u(t) z(t)
z(t)(n) = G(z(t), z(t)0 , . . . , z(t)(n 1)
) + u(t)
K(x(t), u(t))
u(t)
K(x(t), u(t))
u(t)
K(x(t), u(t))
u(t)
K(x(t), u(t))
u(t)
K(x(t), u(t))
u(t)
K(x(t), u(t))
u(t)
...
Second Theoretical Model
u(t)
X
z(t)
...
u(t) z(t)(n) = G(z(t), z(t)0 , . . . , z(t)(n 1)
) + u(t) z(t)
Second Theoretical Model
u(t)
X
z(t)
...
u(t) z(t)(n) = G(z(t), z(t)0 , . . . , z(t)(n 1)
) + u(t) z(t)
...
emulation
...
emulation
X
...
...
...
The body as a Reservoir
X
...
...
...
X
x1
no input!
...
X
x2
Results
Generating Stable Nonlinear Limit Cycles
X
x1
no input!
...
X
x2
Results
Generating Stable Nonlinear Limit Cycles
1 1
0.5 0.5
x2
0 0
x −0.5
−0.5 1
x
2
−1 −1
0 5 10 15 −0.5 0 0.5
time [s] x1
Results
Generating Stable Nonlinear Limit Cycles
#masses = 10
#springs = 22
Results
Generating Stable Nonlinear Limit Cycles
#masses = 10 1
#springs = 22
0.5
x2
0
−0.5
−1
−1 −0.5 0 0.5 1
x1
Results
Generating Stable Nonlinear Limit Cycles
#masses = 10 1
#springs = 22
0.5
x2
0
−0.5
−1
−1 −0.5 0 0.5 1
x1
Results
Generating Stable Nonlinear Limit Cycles
0.5
x2
0
−0.5
−1
−1 −0.5 0 0.5 1
x1
Results
Testing Robustness of Learned Nonlinear Limit Cycles
Results
Testing Robustness of Learned Nonlinear Limit Cycles
−2 x1
x
2
−4
−6
0 10 20 30 40 50
time [s]
Results
Testing Robustness of Learned Nonlinear Limit Cycles
1
0
0
x1 −1
−2
x
x2
2
−2
−4 −3
−4
−6 −5
0 10 20 30 40 50 −4 −2 0
time [s] x1
Results
Testing Robustness of Learned Nonlinear Limit Cycles
x1 −1
−2
x
x2
2
−2
−4 −3
−4
−6 −5
0 10 20 30 40 50 −4 −2 0
time [s] x1
Results
Input Dependent Limit Cycle
= 0.2
1
=1
=5
x2
−1
−1 0 1
x1
Results
Input Dependent Limit Cycle
= 0.2 x1
1 1
=1 x2
=5
x2
0 0
−1 −1
−1 0 1 0 5 10 15
x1 time [s]
Results
Input Dependent Limit Cycle
= 0.2 x1
1 1
=1 x2
=5
x2
0 0
−1 −1
−1 0 1 0 5 10 15
x1 time [s]
Results
Input Dependent Limit Cycle
= 0.2 x1
1 1
=1 x2
=5
x2
0 0
−1 −1
−1 0 1 0 5 10 15
x1 time [s]
Results
Input Dependent Limit Cycle
X
x1
"
...
X
x2
Results
Input Dependent Limit Cycle
X
x2
Results
Input Dependent Limit Cycle
2 2
x1
"=5
1 x2 1
x2
0 0
from 0 to 20 s
−1 −1 from 20 to 40 s
from 40 to 60 s
from 60 to 80 s
from 80 to 100 s
−2 −2
0 20 40 60 −2 0 2
time [s] x1
= 0.2
1
=1
=5
x2
−1
−1 0 1
x
1
Results
Input Dependent Limit Cycle
2 2
x1
"=1
1 x2 1
x2
0 0
from 0 to 20 s
−1 −1 from 20 to 40 s
from 40 to 60 s
from 60 to 80 s
from 80 to 100 s
−2 −2
0 20 40 60 −2 0 2
time [s] x
1
= 0.2
1
=1
=5
x2
−1
−1 0 1
x
1
Results
Input Dependent Limit Cycle
2 2
x1
" = 0.2
1 x2 1
x2
0 0
from 0 to 20 s
−1 −1 from 20 to 40 s
from 40 to 60 s
from 60 to 80 s
from 80 to 100 s
−2 −2
0 20 40 60 −2 0 2
time [s] x
1
= 0.2
1
=1
=5
x2
−1
−1 0 1
x
1
Discussion
...
Discussion
...
constant
Discussion
squeezing
...
constant
Discussion
squeezing
...
constant
Discussion
squeezing
...
constant
Discussion
squeezing
...
constant
Discussion
squeezing
...
constant
...
constant
...
constant
...
constant
Tao Li
Application in Soft Robotics
Kohei
Nakajima
Tao Li
soft (passive)
silicone structure
Application in Soft Robotics
Kohei
Nakajima
Tao Li
water
tank soft (passive)
silicone structure
Application in Soft Robotics
Kohei
Nakajima
Tao Li
water
tank soft (passive)
silicone structure
10 bending
sensors
Application in Soft Robotics
Kohei
Nakajima
rotational
motor Tao Li
water
tank soft (passive)
silicone structure
10 bending
sensors
Application in Soft Robotics
X
...
Application in Soft Robotics
X
...
Application in Soft Robotics
X
...
X
...
Application in Soft Robotics
X
...
motor signal
X
...
Application in Soft Robotics
X
...
motor signal
...
motor signal
...
motor signal
...
motor signal
...
motor signal
...
Summary
...
Summary
...
Supervised Machine Learning technique
Summary
Reservoir: Randomly
initialized complex,
nonlinear, dynamic
system
...
Supervised Machine Learning technique
Summary
Reservoir: Randomly output weights learned
initialized complex, with linear regression
nonlinear, dynamic
system
...
Supervised Machine Learning technique
Thank you very much
for your Attention!