latent force models - the university of manchesteralvarezm/talks/aistatspres.pdflatent force models...

34
Latent Force Models Mauricio Alvarez 1 David Luengo 1,2 Neil D. Lawrence 1 1 School of Computer Science, University of Manchester. 2 Dep. Teoría de Señal y Comunicaciones, Universidad Carlos III de Madrid. (University of Manchester) Latent Force Models 17/04/2009 1 / 24

Upload: vanhuong

Post on 03-Jul-2019

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent Force Models

Mauricio Alvarez1 David Luengo1,2 Neil D. Lawrence1

1 School of Computer Science, University of Manchester.2 Dep. Teoría de Señal y Comunicaciones, Universidad Carlos III de Madrid.

(University of Manchester) Latent Force Models 17/04/2009 1 / 24

Page 2: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Data driven paradigm

q Traditionally, the main focus in machine learning has been modelgeneration through a data driven paradigm.

q Combine a data set with a flexible class of models and, throughregularization, make predictions on unseen data.

q Problems– Data is scarce relative to the complexity of the system.– Model is forced to extrapolate.

(University of Manchester) Latent Force Models 17/04/2009 2 / 24

Page 3: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Mechanistic models

q Models inspired by the underlying knowledge of a physical system arecommon in many areas.

q Description of a well characterized physical process that underpins thesystem, typically represented with a set of differential equations.

q Identifying and specifying all the interactions might not be feasible.

q A mechanistic model can enable accurate prediction in regions wherethere may be no available training data

(University of Manchester) Latent Force Models 17/04/2009 3 / 24

Page 4: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Hybrid systems

q We suggest a hybrid approach involving a mechanistic model of thesystem augmented through machine learning techniques.

q Dynamical systems (e.g. incorporating first order and second orderdifferential equations).

q Partial differential equations for systems with multiple inputs.

(University of Manchester) Latent Force Models 17/04/2009 4 / 24

Page 5: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent variable model: definition

q Our approach can be seen as a type of latent variable model.

Y = FW + E,

where Y ∈ RN×Q , F ∈ RN×R , W ∈ RR×Q (R < Q) and E is a matrixvariate white Gaussian noise with columns e:,q ∼ N (0,Σ).

q In PCA and FA the common approach to deal with the unknowns is tointegrate out F under a Gaussian prior and optimize with respect to W.

(University of Manchester) Latent Force Models 17/04/2009 5 / 24

Page 6: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent variable model: alternative view

q Data with temporal nature and Gaussian (Markov) prior for rows of Fleads to the Kalman filter/smoother.

q Consider a joint distribution for p (F|t), t = [t1 . . . tN ]>, with the form of aGaussian process (GP),

p (F|t) =R∏

r=1

N(f:,r |0,Kf:,r ,f:,r

),

The latent variables are random functions, {fr (t)}Rr=1 with associated

covariance Kf:,r ,f:,r .

q The GP for Y can be readily implemented. In [?] this is known as asemi-parametric latent factor model (SLFM).

(University of Manchester) Latent Force Models 17/04/2009 6 / 24

Page 7: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: mechanistic interpretation (1)

q We include a further dynamical system with a mechanistic inspiration.

q Reinterpret equation Y = FW + E, as a force balance equation

YD = FS + E,

where S ∈ RR×Q is a matrix of sensitivities, D ∈ RQ×Q is diagonal matrixof spring constants, W = SD−1 and e:,q ∼ N

(0,D>ΣD

).

(University of Manchester) Latent Force Models 17/04/2009 7 / 24

Page 8: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: mechanistic interpretation (2)

Dq

yq(t)

F (t)

(University of Manchester) Latent Force Models 17/04/2009 8 / 24

Page 9: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: mechanistic interpretation (2)

F (t)

S1q

S2q

SRq

f1(t)

f2(t)

fR(t)

(University of Manchester) Latent Force Models 17/04/2009 8 / 24

Page 10: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: mechanistic interpretation (2)

F (t)

S1q

S2q

SRq

f1(t)

f2(t)

fR(t)

Dq

yq(t)

YD = FS + E

(University of Manchester) Latent Force Models 17/04/2009 8 / 24

Page 11: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: extension (1)

q The model can be extended including dampers and masses.

q We can writeYD + YC + YM = FS + E ,

whereY is the first derivative of Y w.r.t. timeY is the second derivative of Y w.r.t. timeC is a diagonal matrix of damping coefficientsM is a diagonal matrix of massesE is a matrix variate white Gaussian noise.

(University of Manchester) Latent Force Models 17/04/2009 9 / 24

Page 12: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: extension (2)

Dq

yq(t)

Cq

mq

F (t)

(University of Manchester) Latent Force Models 17/04/2009 10 / 24

Page 13: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: extension (2)

F (t)

S1q

S2q

SRq

f1(t)

f2(t)

fR(t)

(University of Manchester) Latent Force Models 17/04/2009 10 / 24

Page 14: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: extension (2)

F (t)

S1q

S2q

SRq

f1(t)

f2(t)

fR(t)

Dq

yq(t)

Cq

mq

YD + YC + YM = FS + E

(University of Manchester) Latent Force Models 17/04/2009 10 / 24

Page 15: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Latent force model: properties

q This model allows to include behaviors like inertia and resonance.

q We refer to these systems as latent force models (LFMs).

q One way of thinking of our model is to consider puppetry.

(University of Manchester) Latent Force Models 17/04/2009 11 / 24

Page 16: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Second Order Dynamical System

Using the system of second order differential equations

mqd2yq(t)

dt2 + Cqdyq(t)

dt+ Dqyq(t) =

R∑r=1

Srq fr (t),

wherefr (t) latent forces

yq(t) displacements over timeCq damper constant for the q-th outputDq spring constant for the q-th outputmq mass constant for the q-th outputSrq sensitivity of the q-th output to the r -th input.

(University of Manchester) Latent Force Models 17/04/2009 12 / 24

Page 17: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Second Order Dynamical System: solution

Solving for yq(t), we obtain

yq(t) =Bq

Dq+

R∑r=1

Lrq[fr ](t),

where the linear operator is given by a convolution:

Lrq[fr ](t) =Srq

ωqexp(−αq t)

∫ t

0fr (τ) exp(αqτ) sin(ωq(t − τ))dτ ,

with ωq =√

4Dq − C2q/2 and αq = Cq/2.

(University of Manchester) Latent Force Models 17/04/2009 13 / 24

Page 18: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Second Order Dynamical System: covariance matrix

Behaviour of the system summarized by the damping ratio:

ζq =12

Cq/√

Dq

ζq > 1 overdamped systemζq = 1 critically damped systemζq < 1 underdamped systemζq = 0 undamped system (no friction)

Example covariance matrix:

ζ1 = 0.125 underdampedζ2 = 2 overdampedζ3 = 1 critically damped

f(t) y1(t) y

2(t) y

3(t)

f(t)

y 1(t)

y 2(t)

y 3(t)

−0.4

−0.2

0

0.2

0.4

0.6

0.8

(University of Manchester) Latent Force Models 17/04/2009 14 / 24

Page 19: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Second Order Dynamical System: samples from GP

0 5 10 15 20−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Figure: Joint samples from the ODE covariance, cyan: f (t), red: y1 (t)(underdamped)and green: y2 (t) (overdamped) and blue: y3 (t) (critically damped).

(University of Manchester) Latent Force Models 17/04/2009 15 / 24

Page 20: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Second Order Dynamical System: samples from GP

0 5 10 15 20−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Figure: Joint samples from the ODE covariance, cyan: f (t), red: y1 (t)(underdamped)and green: y2 (t) (overdamped) and blue: y3 (t) (critically damped).

(University of Manchester) Latent Force Models 17/04/2009 15 / 24

Page 21: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Second Order Dynamical System: samples from GP

0 5 10 15 20−1

−0.5

0

0.5

1

1.5

2

Figure: Joint samples from the ODE covariance, cyan: f (t), red: y1 (t)(underdamped)and green: y2 (t) (overdamped) and blue: y3 (t) (critically damped).

(University of Manchester) Latent Force Models 17/04/2009 15 / 24

Page 22: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Second Order Dynamical System: samples from GP

0 5 10 15 20−2.5

−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Figure: Joint samples from the ODE covariance, cyan: f (t), red: y1 (t)(underdamped)and green: y2 (t) (overdamped) and blue: y3 (t) (critically damped).

(University of Manchester) Latent Force Models 17/04/2009 15 / 24

Page 23: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Motion Capture Data (1)

q CMU motion capture data, motions 18, 19 and 20 from subject 49.

q Motions 18 and 19 for training and 20 for testing.

(University of Manchester) Latent Force Models 17/04/2009 16 / 24

Page 24: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Motion Capture Data (2)

q The data down-sampled by 32 (from 120 frames per second to 3.75).

q We focused on the subject’s left arm.

q For testing, we condition only on the observations of the shoulder’sorientation (motion 20) to make predictions for the rest of the arm’sangles.

(University of Manchester) Latent Force Models 17/04/2009 17 / 24

Page 25: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Motion Capture Results

Root mean squared (RMS) angle error for prediction of the left arm’sconfiguration in the motion capture data. Prediction with the latent force modeloutperforms the prediction with regression for all apart from the radius’s angle.

Latent Force RegressionAngle Error ErrorRadius 4.11 4.02Wrist 6.55 6.65

Hand X rotation 1.82 3.21Hand Z rotation 2.76 6.14

Thumb X rotation 1.77 3.10Thumb Z rotation 2.73 6.09

(University of Manchester) Latent Force Models 17/04/2009 18 / 24

Page 26: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Diffussion in the Swiss Jura

Lead

Cadmium

CopperCopper

Region ofSwiss Jura

(University of Manchester) Latent Force Models 17/04/2009 19 / 24

Page 27: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Diffussion in the Swiss Jura

Lead

Cadmium

CopperCopper

Region ofSwiss Jura

(University of Manchester) Latent Force Models 17/04/2009 19 / 24

Page 28: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Diffussion in the Swiss Jura

Lead

Cadmium

CopperCopper

Region ofSwiss Jura

(University of Manchester) Latent Force Models 17/04/2009 19 / 24

Page 29: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Diffussion in the Swiss Jura

Lead

Cadmium

CopperCopper

Region ofSwiss Jura

(University of Manchester) Latent Force Models 17/04/2009 19 / 24

Page 30: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Diffusion equation

q A simplified version of the diffusion equation is

∂yq(x, t)∂t

=d∑

j=1

κq∂2yq(x, t)∂x2

j,

where yq(x, t) are the concentrations of each pollutant.

q The solution to the system is then given by

yq(x, t) =R∑

r=1

Srq

∫Rd

fr (x′)Gq(x,x′, t)dx′

where fr (x) represents the concentration of pollutants at time zero andGq(x,x′, t) is the Green’s function given as

Gq(x,x′, t) =1

2dπd/2T d/2q

exp

− d∑j=1

(xj − x ′j )2

4Tq

,with Tq = κq t .

(University of Manchester) Latent Force Models 17/04/2009 20 / 24

Page 31: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Prediction of Metal Concentrations

q Prediction of a primary variable by conditioning on the values of somesecondary variables.

Primary variable Secondary VariablesCd Ni, ZnCu Pb, Ni, ZnPb Cu, Ni, ZnCo Ni, Zn

q Comparison bewteen diffusion kernel, independent GPs and “ordinaryco-kriging”.

Metals IGPs GPDK OCKCd 0.5823±0.0133 0.4505±0.0126 0.5Cu 15.9357±0.0907 7.1677±0.2266 7.8Pb 22.9141±0.6076 10.1097±0.2842 10.7Co 2.0735±0.1070 1.7546±0.0895 1.5

(University of Manchester) Latent Force Models 17/04/2009 21 / 24

Page 32: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Discussion

q Hybrid approach for the use of simple mechanistic models with Gaussianprocesses.

q Convolution processes not for multi-ouput regression but to augmentdata-driven models with characteristics of physical systems.

q Gaussian process as meaningful prior distributions.

q Other applications considered:Bioinformatics: transcription factor networks [AISTATS’09].Financial time series: foreign currency exchange [Learning’09].

(University of Manchester) Latent Force Models 17/04/2009 22 / 24

Page 33: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

Acknowledgments

DL has been partly financed by Comunidad de Madrid (projectPRO-MULTIDIS-CM, S-0505/TIC/0233), and by the Spanish government(CICYT project TEC2006-13514-C02-01 and researh grant JC2008-00219).MA and NL have been financed by a Google Research Award and EPSRCGrant No EP/F005687/1 “Gaussian Processes for Systems Identification withApplications in Systems Biology”. MA received a travel grant from Nokia.

(University of Manchester) Latent Force Models 17/04/2009 23 / 24

Page 34: Latent Force Models - The University of Manchesteralvarezm/talks/aistatsPres.pdfLatent Force Models Mauricio Alvarez 1David Luengo;2 Neil D. Lawrence 1 School of Computer Science,

References I

Yee Whye Teh, Matthias Seeger, and Michael I. Jordan.

Semiparametric latent factor models.In Robert G. Cowell and Zoubin Ghahramani, editors, AISTATS 10, pages 333–340, Barbados, 6-8 January 2005. Society for Artificial Intelligenceand Statistics.

(University of Manchester) Latent Force Models 17/04/2009 24 / 24