28
Taking control by convex optimization Elad Hazan Based on: [Hazan, Singh, Zhang, NIPS ‘17] [Hazan, Lee, Singh, C. Zhang, Y. Zhang, NIPS ‘18] [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] Google Brain

Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

Takingcontrolbyconvexoptimization

Elad Hazan

Basedon:[Hazan,Singh,Zhang,NIPS‘17][Hazan,Lee,Singh,C.Zhang,Y.Zhang,NIPS‘18][Arora,Hazan,Lee,Singh,C.Zhang,Y.ZhangICLR‘18]

GoogleBrain

Page 2: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

KaranSingh CyrilZhang

Page 3: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

DynamicalSystems

𝑦" = 𝑓 ℎ" , ℎ"'( = 𝑔(ℎ", 𝑥")

Input time series 𝒙𝒕 Output time series 𝒚𝒕

𝒉𝒕

Prediction:given𝑥(, … , 𝑥",𝑦(, … ,𝑦"3( predict𝑦"Control:compute𝑥(, … , 𝑥" toachievesomereward(𝑦(,… , 𝑦")

Page 4: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

DynamicalSystems

Page 5: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

• Lineardynamicalsystem(LDS):

LinearDynamicalSystems

ℎ"'( = 𝐴ℎ" + 𝐵𝑥" + 𝜂"𝑦" = 𝐶ℎ" + 𝐷𝑥" + 𝜉"

(𝐴,𝐵, 𝐶,𝐷, ℎ@)

Input time series 𝒙𝒕 Output time series 𝒚𝒕

𝒉𝒕

Page 6: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

LDSintheworld

• Rocketscience(trackingsatellitesetc.)

• Specialcases:• HiddenMarkovModels(languagetranslation)• ARMA(weather/financialforecasting)

• Controlforrobots/autonomousdrones/vehicles

Page 7: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

• Giventhesystem(A,B,C,D,h0 ),Kalman filterrecoversht andpredictsoptimally.

• Nohiddenstate:onlinelearningfortimeseriesprediction[Anava,Hazan,Mannor,Shamir,Zeevi ‘’13,‘15],[Kuznetzov,Mohri ’15,‘17]Nohiddenstate:convexLDS[Simchovich,Mania,Tu,Jordan,Recht ‘18]

• canwerecoverthesystem??EMalgorithm:non-convexandcantakeexponentialtime[Hardt,Ma,Recht ’17]:undergenerativeassumptions,SISOsystemrecovery

• Ourresult:wecanpredict asthebestsysteminlineartime![withKaranSinghandCyrilZhang,NIPS‘17]basedonanewWaveFilter

LDS:stateoftheart

ℎ"'( = 𝐴ℎ" + 𝐵𝑥" + 𝜂"𝑦" = 𝐶ℎ" + 𝐷𝑥" + 𝜉"

Page 8: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

OnlineLearningofLDS

• Onlinesequenceprediction,𝑡 = 1, … , 𝑇:• Observeinput𝑥"• Predictoutput 𝑦"E ∈ ℝH• Observe𝑦" ,incurringloss 𝑦" − 𝑦"E J

• Useinformationabout𝑦" tohelppredict𝑥"'( ↦ 𝑦"'(…

• Guarantee:(findingbestLDS(systemidentification) isnon-convex)

L 𝑦" − 𝑦"E J

"

≤ minQ,R,S,T,UV

L 𝑦" −𝑀 X,Y,Z,[,\V 𝑡J

"

+ 𝑂(log𝑇)

• Where𝑀 X,Y,Z,[,\V (𝑡) isthepredictionofaKalman filterwithbest(𝐴, 𝐵, 𝐶, 𝐷, ℎ@) inhindsight

Page 9: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

ImproperlearningbyConvexRelaxation

• Theactualsignal:𝑦" = 𝐷𝑥" + 𝐵𝐴𝐶𝑥"3( + 𝐵𝐴J𝐶𝑥"3J +⋯

• An“easy”impropermachine:𝑦" = 𝑀(𝑥" + 𝑀J𝑥"3( + 𝑀b𝑥"3J +⋯

• Ifthespectrumof A < 1 − 𝛿 isbounded,thensufficetohaveO (

glog (

h parameters

solvebyconvexoptimization(linearregression)!

Page 10: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

ImproperlearningbyConvexRelaxation

• Theactualsignal:𝑦" = 𝐷𝑥" + 𝐵𝐴𝐶𝑥"3( + 𝐵𝐴J𝐶𝑥"3J +⋯

• Ourmachine:𝑦" = 𝑀 𝑥",𝑥"3(,… = 𝑀iΦ 𝑥", 𝑥"3(,… islinear(doesnottrytorecoverD,B,A,Borhiddenstates)

• HasonlyO log (h parameters– independentofthecondition#

Page 11: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

Intuition(scalarcase)

• 𝑦" = 1𝑥" + 𝛼𝑥"3( + 𝛼J𝑥"3J + 𝛼b𝑥"3b +⋯

• Approximateall 1𝛼𝛼J𝛼b…𝛼l3( ∈ ℝl usingsomelinearbasis𝜙(, … , 𝜙n ∈ ℝl

• “ContinuousPCA”

• 𝑍 = ∫ 𝜇 𝛼 ⊗ 𝜇 𝛼 d𝛼(@ ,𝜇 𝛼 = 1𝛼𝛼J𝛼b…𝛼l3(

• Set𝜙(,… ,𝜙n tobetopeigenvectorsof𝑍

Page 12: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

TheMagicofHankelMatrices

𝑍 = s

1 𝛼 𝛼J 𝛼 𝛼J 𝛼b 𝛼J 𝛼b 𝛼t ⋱ 𝛼Jl3J

𝑑𝛼(

@

Page 13: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

TheMagicofHankelMatrices

𝑍 =

1 12x

13x

12x

13x

14x

13x

14x

15x

⋱ 1

2𝑇 − 1x

Page 14: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

TheMagicofHankelMatrices• Eigenvaluesdecayrapidly![Beckerman,Townsend‘16]

• Spanoftop𝑂| log𝑇 log (h

eigenvectors𝜖-approximates𝜇(𝛼):

s 𝜇 𝛼 − Proj��…,�� 𝜇 𝛼J

�∼ 𝑒3n

(thisholdsforevery𝛼 aswell)

Page 15: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

TheMagicofHankelMatrices

• Ourmachine:𝑦" = 𝑀iΦ 𝑥", 𝑥"3(,…

• So:restrict𝑀 tospan 𝜙(..n, ⋅• Problemisconvex!• Onlypolylog(𝑇) timesmoreparametersthan 𝐴,𝐵, 𝐶,𝐷, ℎ@

Page 16: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

AFilteringReinterpretation

• Interpretbasis𝜙(, … , 𝜙n asasmallfilterbank forinputs𝑥"

Page 17: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

OnlineAlgorithm

L 𝑦" − 𝑦"E J

"

≤ minQ,R,S,T,UV

L 𝑦" −𝑀 X,Y,Z,[,\V 𝑡J

"

+ 𝑂(log𝑇)

Page 18: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

AFilteringReinterpretation

• Concisewave-filtering algorithm:• Convolvetimeseries𝑥" byeachof𝑘 ≪ 𝑇 filters𝜙�• UseOCO algorithmtopredict𝑀" ∈ ℝH×n thatmapsfilteroutputsto𝑦"• Regret ≤ 𝑂| 𝑇polylog 𝑇

• Handlesadversarial inputs• 10-20xmoreefficientthanpyKalman (andmoreaccurate)

Page 19: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

• Keepsimproving,whenEMishappywithlocaloptimum• Learnshigh-dimensionalsystemsprovably

• Worksinpracticeforsomemoregeneralsystems…

usefulinpractice…

Page 20: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

Experiments

Page 21: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

Sometimesevenworksfornon-linearsystems!

Page 22: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

BeyondSymmetricTransitionMatrices[Hazan,Lee,Singh,C.Zhang,Y.Zhang,NIPS‘18]

• General(non-symmetric)A:notrealdiagonalizable,needcomplexdiagonalization

• Weakerresult:sameregret,butO (�

factorinrunningtime

• Thesymmetricpredictor:

𝑓" 𝑀 = 𝑀iΦ𝑥(:" − 𝑦" J

Page 23: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

BeyondSymmetricTransitionMatrices

Thesymmetricpredictor:𝑓" 𝑀 = 𝑀iΦ𝑥(:" − 𝑦" J

1st try:discretizethecomplexphaseuptoprecision𝜀 :

𝑓" 𝑀, 𝑝 = 𝑀ipΦ𝑋(:"h − 𝑦" J

Non-convexquadratic!2nd attempt:convexrelaxation,let𝑁 ∈ 𝑅n×(/h beamatrixwith||J,(boundednorm,relaxing𝑀𝑝i tohighrank.

𝑓" 𝑁 = 𝑁Φ𝑋(:"h − 𝑦" J

Convex!

Repeatxt(�times,

onceforeachdiscretizedphase

Page 24: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

II.Control

Page 25: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

Setting:Linear-QuadraticControl

• Black-boxaccesstoanunknownLDS:

• Prediction:planinputsequence𝑥(:l tostabilizethesystem• Objective:minimize quadraticcost∑ 𝑦"i𝑄𝑦"l

"�( + ∑ 𝑥"i𝑅𝑥"l"�(

• Minimally-stylizedmodelofreinforcementlearning

Unknown dynamics

Page 26: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

PreviousWork

• Identifythesystem(A,B,C,D,ℎ@)(non-convex)Noknownefficientalgorithmforsys-id

• UseKalman filtertomaintainhiddenstateestimate• Findoptimalstate-feedbackcontroller byLQR

• Gradientmethodsforproperlearning[Fazel,Ge,Kakade,Mesbahi‘18]

Page 27: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

TowardsProvableControlinUnknownLDS[Arora,Hazan,Lee,Singh,C.Zhang,Y.ZhangICLR‘18]

• Hankeleigenvectorscanbeusedforexplorationofthesystem• Needstrongerguaranteethanforprediction:learneveryentryof𝑀

• LearnLDSefficiently inpoly 𝑛, 𝑚, 𝑑, log𝑇 , (�

episodes

• Planningtheoptimalinputsequence𝑥(:l becomesconvex

Page 28: Taking control by convex optimization · [Arora, Hazan, Lee, Singh, C. Zhang, Y. Zhang ICLR ‘18] • Hankel eigenvectors can be used for exploration of the system • Need stronger

Summary1. Improperconvexrelaxation:predictioncanbeeasyevenifestimationis

computationallyhard!

2. Regressionformulationoverwave-filteredinputs:firstefficientLDSwithoutrecovery

3. Extensionstocontroletc…