A Technique in Implementations of Riemannian quasi-Newton...

40
1/23 Riemannian Optimization Representation and Complexities Experiments A Technique in Implementations of Riemannian quasi-Newton Methods Speaker: Wen Huang Xiamen University April 20, 2019 Joint work with Pierre-Antoine Absil, and Kyle Gallivan Speaker: Wen Huang Tangent Vectors and Vector Transport

Transcript of A Technique in Implementations of Riemannian quasi-Newton...

Page 1: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

1/23

Riemannian OptimizationRepresentation and Complexities

Experiments

A Technique in Implementations of Riemannianquasi-Newton Methods

Speaker: Wen Huang

Xiamen University

April 20, 2019

Joint work with Pierre-Antoine Absil, and Kyle Gallivan

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 2: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

2/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Riemannian Optimization

Problem: Given f (x) :M→ R,solve

minx∈M

f (x)

where M is a Riemannian manifold.M

Rf

Unconstrained optimization problem on a constrained space.

Riemannian manifold = manifold + Riemannian metric

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 3: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

3/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Riemannian Manifold

Manifolds:

Sphere

Stiefel manifold: St(p, n) =X ∈ Rn×p|XTX = Ip;Grassmann manifold Gr(p, n):all p-dimensional subspaces ofRn;

And many more.

Riemannian metric:

M

x

ξ

η

R

gx(η, ξ)TxM

A Riemannian metric, denoted by g ,is a smoothly-varying inner producton the tangent spaces;

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 4: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

4/23

Riemannian OptimizationRepresentation and Complexities

Experiments

BFGS Quasi-Newton Algorithm: from Euclidean to Riemannian

replace by Rxk (ηk)

Update formula:

y

xk+1 = xk + αkηk

Search direction:ηk = −B−1

k grad f (xk)

Bk update:

Bk+1 = Bk −Bksks

Tk Bk

sTk Bksk+

ykyTk

yTk sk

,

← use vector transport

forspacewhere sk = xk+1 − xk , and yk = grad f (xk+1)− grad f (xk)

x

x

replaced by R−1xk (xk+1)

use vector transport

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 5: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

4/23

Riemannian OptimizationRepresentation and Complexities

Experiments

BFGS Quasi-Newton Algorithm: from Euclidean to Riemannian

replace by Rxk (ηk)

Update formula:y

xk+1 = xk + αkηk

Search direction:ηk = −B−1

k grad f (xk)

Bk update:

Bk+1 = Bk −Bksks

Tk Bk

sTk Bksk+

ykyTk

yTk sk

,

← use vector transport

forspacewhere sk = xk+1 − xk , and yk = grad f (xk+1)− grad f (xk)x

x

replaced by R−1xk (xk+1)

use vector transport

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 6: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

4/23

Riemannian OptimizationRepresentation and Complexities

Experiments

BFGS Quasi-Newton Algorithm: from Euclidean to Riemannian

replace by Rxk (ηk)

Update formula:y

xk+1 = xk + αkηk

Search direction:ηk = −B−1

k grad f (xk)

Bk update:

Bk+1 = Bk −Bksks

Tk Bk

sTk Bksk+

ykyTk

yTk sk

, ← use vector transport

forspacewhere sk = xk+1 − xk , and yk = grad f (xk+1)− grad f (xk)x x

replaced by R−1xk (xk+1) use vector transport

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 7: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

5/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Retraction and Vector Transport

Retraction: R : TM→M

Euclidean Riemannianxk+1 = xk + αkdk xk+1 = Rxk (αkηk)

M

TxM

Rx(η)Rx(η)

Two retractions:R and R

A vector transport:T : TM× TM→ TM :(ηx , ξx) 7→ Tηx ξx :

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 8: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

6/23

Riemannian OptimizationRepresentation and Complexities

Experiments

BFGS Quasi-Newton Algorithm: from Euclidean to Riemannian

Update formula: xk+1 = Rxk (αkηk)

Search direction:ηk = −B−1

k grad f (xk)

Bk update:

Bk =Tαkηk Bk T −1

αkηk,

← matrix matrix multiplication

Bk+1 =Bk −Bksks

Tk Bk

sTk Bksk+

ykyTk

yTk sk

,

where sk = Tαkηk(αkηk), and yk = grad f (xk+1)− Tαkηk

grad f (xk);

x

x

matrix vector multiplication matrix vector multiplication

Extra cost on vector transports!

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 9: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

6/23

Riemannian OptimizationRepresentation and Complexities

Experiments

BFGS Quasi-Newton Algorithm: from Euclidean to Riemannian

Update formula: xk+1 = Rxk (αkηk)

Search direction:ηk = −B−1

k grad f (xk)

Bk update:

Bk =Tαkηk Bk T −1

αkηk, ← matrix matrix multiplication

Bk+1 =Bk −Bksks

Tk Bk

sTk Bksk+

ykyTk

yTk sk

,

where sk = Tαkηk(αkηk), and yk = grad f (xk+1)− Tαkηk

grad f (xk);x xmatrix vector multiplication matrix vector multiplication

Extra cost on vector transports!

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 10: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

7/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Qi [Qi11]: exponential mapping, parallel translation;

Idea: imitate the Euclidean setting;

Exponential mapping: along the geodesic;Parallel translation: move tangent vector parallelly;Problem: maybe unknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 11: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

7/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Qi [Qi11]: exponential mapping, parallel translation;

Idea: imitate the Euclidean setting;Exponential mapping: along the geodesic;

Parallel translation: move tangent vector parallelly;Problem: maybe unknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 12: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

7/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Qi [Qi11]: exponential mapping, parallel translation;

Idea: imitate the Euclidean setting;Exponential mapping: along the geodesic;Parallel translation: move tangent vector parallelly;

Problem: maybe unknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 13: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

7/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Qi [Qi11]: exponential mapping, parallel translation;

Idea: imitate the Euclidean setting;Exponential mapping: along the geodesic;Parallel translation: move tangent vector parallelly;Problem: maybe unknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 14: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

8/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Ring and Wirth [RW12]: retraction, vector transport bydifferentiated retraction, isometric vector transport;

Idea: quasi-Newton update in tangent space, then transport tonew tangent space isometrically;

Retraction: no constraints;Two vector transport: VT by differentiated retraction, andisometric VT;Problem: vector transport by differentiated retraction maybeunknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 15: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

8/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Ring and Wirth [RW12]: retraction, vector transport bydifferentiated retraction, isometric vector transport;

Idea: quasi-Newton update in tangent space, then transport tonew tangent space isometrically;Retraction: no constraints;

Two vector transport: VT by differentiated retraction, andisometric VT;Problem: vector transport by differentiated retraction maybeunknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 16: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

8/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Ring and Wirth [RW12]: retraction, vector transport bydifferentiated retraction, isometric vector transport;

Idea: quasi-Newton update in tangent space, then transport tonew tangent space isometrically;Retraction: no constraints;Two vector transport: VT by differentiated retraction, andisometric VT;

Problem: vector transport by differentiated retraction maybeunknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 17: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

8/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Ring and Wirth [RW12]: retraction, vector transport bydifferentiated retraction, isometric vector transport;

Idea: quasi-Newton update in tangent space, then transport tonew tangent space isometrically;Retraction: no constraints;Two vector transport: VT by differentiated retraction, andisometric VT;Problem: vector transport by differentiated retraction maybeunknown to users, maybe expensive to compute;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 18: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

9/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Huang, Absil, Gallivan [HGA15, HAG18]: retraction, isometricvector transport

Idea: quasi-Newton update in tangent space, then transport tonew tangent space isometrically;

Retraction: no constraints;Vector transport: Isometric VT or VT by differentiated retractionalong a direction;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 19: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

9/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Huang, Absil, Gallivan [HGA15, HAG18]: retraction, isometricvector transport

Idea: quasi-Newton update in tangent space, then transport tonew tangent space isometrically;Retraction: no constraints;

Vector transport: Isometric VT or VT by differentiated retractionalong a direction;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 20: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

9/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Existing Generic Riemannian BFGS methods

Huang, Absil, Gallivan [HGA15, HAG18]: retraction, isometricvector transport

Idea: quasi-Newton update in tangent space, then transport tonew tangent space isometrically;Retraction: no constraints;Vector transport: Isometric VT or VT by differentiated retractionalong a direction;

M

TxM

Rx(η)Rx(η)

x

M

TxM

ηx

Rx(ηx)

ξx

Tηxξx

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 21: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

10/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Implementation of an isometric vector transport

Summary:

Isometric vector transport is needed [RW12, HGA15, HAG18];

An efficient vector transport is crucial;

An efficient isometric vector transport:

Representative manifold:

the Stiefel manifold St(p, n) = X ∈ Rn×p|XTX = Ip;canonical metric: g(ηX , ξX ) = trace

(ηTX(In − 1

2XXT

)ξX);

The idea in this talk can be used for more algorithms and manycommonly-encountered manifolds.

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 22: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

10/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Implementation of an isometric vector transport

Summary:

Isometric vector transport is needed [RW12, HGA15, HAG18];

An efficient vector transport is crucial;

An efficient isometric vector transport:

Representative manifold:

the Stiefel manifold St(p, n) = X ∈ Rn×p|XTX = Ip;canonical metric: g(ηX , ξX ) = trace

(ηTX(In − 1

2XXT

)ξX);

The idea in this talk can be used for more algorithms and manycommonly-encountered manifolds.

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 23: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

11/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Representations of Tangent Vectors

E = Rw ;

Dimension of M is d ;

Stiefel manifold: E = Rn×p;

Stiefel manifold: d = np − p(p + 1)/2;

M

x

E

Figure: An embedded submanifold

Extrinsic: ηx ∈ Rw ; (TX = XΩ + X⊥K | ΩT = −Ω,XTX⊥ = 0)Intrinsic: ηx ∈ Rd such that ηx = Bx ηx , where Bx is smooth;

How to find a basis B?

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 24: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

11/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Representations of Tangent Vectors

E = Rw ;

Dimension of M is d ;

Stiefel manifold: E = Rn×p;

Stiefel manifold: d = np − p(p + 1)/2;

M

x

E

Figure: An embedded submanifold

Extrinsic: ηx ∈ Rw ; (TX = XΩ + X⊥K | ΩT = −Ω,XTX⊥ = 0)Intrinsic: ηx ∈ Rd such that ηx = Bx ηx , where Bx is smooth;

How to find a basis B?

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 25: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

12/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Extrinsic Representation and Intrinsic Representation onthe Stiefel Manifold

TX St(p, n) = XΩ + X⊥K | ΩT = −Ω,XTX⊥ = 0;

Bx =

[X X⊥

]

0 1 . . . 0−1 0 . . . 0. . . . . . . . . . . .0 0 . . . 00 0 . . . 00 0 . . . 0. . . . . . . . . . . .0 0 . . . 0

, . . . ,

[X X⊥

]

0 0 . . . 00 0 . . . 0. . . . . . . . . . . .0 0 . . . 01 0 . . . 00 0 . . . 0. . . . . . . . . . . .0 0 . . . 0

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 26: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

13/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Extrinsic Representation and Intrinsic Representation onthe Stiefel Manifold

TX St(p, n) = XΩ + X⊥K | ΩT = −Ω,XTX⊥ = 0;

Extrinsic ηX :

ηX =[X X⊥

] [ΩK

]

=[X X⊥

]

0 a12 . . . a1p

−a12 0 . . . a2p

. . . . . . . . . . . .−a1p −a2p . . . 0b11 b12 . . . b1p

b21 b22 . . . b2p

. . . . . . . . . . . .b(n−p)1 b(n−p)2 . . . b(n−p)p

Intrinsic ηX :

ηX =

a12

a13

a23

...a(p−1)p

b11

b21

...b(n−p)p

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 27: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

14/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Extrinsic Representation and Intrinsic Representation onthe Stiefel Manifold

Question

Extrinsic representation ηX ⇐⇒ Intrinsic representation ηX

ηX =[X X⊥

] [ΩK

]⇔[

ΩK

]⇔ ηX

Apply Householder transformation to X , (Done in retraction)

QTp QT

p−1 . . .QT1 X = R = In×p.[

X X⊥]

= Q1Q2 . . .Qp (Do not compute)

Extrinsic to Intrinsic: QTp QT

p−1 . . .QT1 ηX =

[ΩK

]and reshape to ηX ;

(4np2 − 2p3) flops

Intrinsic to Extrinsic: reshape ηX and ηX = Q1Q2 . . .Qp

[ΩK

];

(4np2 − 2p3) flops

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 28: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

14/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Extrinsic Representation and Intrinsic Representation onthe Stiefel Manifold

Question

Extrinsic representation ηX ⇐⇒ Intrinsic representation ηX

ηX =[X X⊥

] [ΩK

]⇔[

ΩK

]⇔ ηX

Apply Householder transformation to X , (Done in retraction)

QTp QT

p−1 . . .QT1 X = R = In×p.

[X X⊥

]= Q1Q2 . . .Qp (Do not compute)

Extrinsic to Intrinsic: QTp QT

p−1 . . .QT1 ηX =

[ΩK

]and reshape to ηX ;

(4np2 − 2p3) flops

Intrinsic to Extrinsic: reshape ηX and ηX = Q1Q2 . . .Qp

[ΩK

];

(4np2 − 2p3) flops

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 29: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

14/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Extrinsic Representation and Intrinsic Representation onthe Stiefel Manifold

Question

Extrinsic representation ηX ⇐⇒ Intrinsic representation ηX

ηX =[X X⊥

] [ΩK

]⇔[

ΩK

]⇔ ηX

Apply Householder transformation to X , (Done in retraction)

QTp QT

p−1 . . .QT1 X = R = In×p.[

X X⊥]

= Q1Q2 . . .Qp (Do not compute)

Extrinsic to Intrinsic: QTp QT

p−1 . . .QT1 ηX =

[ΩK

]and reshape to ηX ;

(4np2 − 2p3) flops

Intrinsic to Extrinsic: reshape ηX and ηX = Q1Q2 . . .Qp

[ΩK

];

(4np2 − 2p3) flops

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 30: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

14/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Extrinsic Representation and Intrinsic Representation onthe Stiefel Manifold

Question

Extrinsic representation ηX ⇐⇒ Intrinsic representation ηX

ηX =[X X⊥

] [ΩK

]⇔[

ΩK

]⇔ ηX

Apply Householder transformation to X , (Done in retraction)

QTp QT

p−1 . . .QT1 X = R = In×p.[

X X⊥]

= Q1Q2 . . .Qp (Do not compute)

Extrinsic to Intrinsic: QTp QT

p−1 . . .QT1 ηX =

[ΩK

]and reshape to ηX ;

(4np2 − 2p3) flops

Intrinsic to Extrinsic: reshape ηX and ηX = Q1Q2 . . .Qp

[ΩK

];

(4np2 − 2p3) flops

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 31: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

15/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Benefits of Intrinsic Representation

Operations on tangent vectors are cheaper since d ≤ w ;

If the basis is orthonormal, then the Riemannian metric reduces tothe Euclidean metric:

g(ηx , ξx) = g(Bx ηx ,Bx ξx) = ηTx ξx .

Stiefel: trace(ηTX(In − 1

2XXT)ξX)−→ ηTX ξX

A vector transport has identity implementation, i.e., Tη = id.

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 32: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

16/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Vector Transport by Parallelization

Vector transport by parallelization:

Tηx ξx = ByB†x ξx ;

where y = Rx(ηx) and † denotes pseudo-inverse, has identityimplementation [HAG16]:

Tηx ξx = ξx .

Example:

Extrinsic:

ζ = Tηξ = ByB†x ξ

Intrinsic:

ζ =Tηξ=B†yByB

†xBx ξ

M

xξ1

TxM

y

ζ1

ξ2

ζ2

TyM

Bx =[ξ1 ξ2

]

By =[ζ1 ζ2

]

ξ = aξ1 + bξ2

ζ = aζ1 + bζ2

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 33: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

17/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Sparse Eigenvalue Problem

Problem

Fine eigenvalues and eigenvectors of a sparse symmetric matrix A.

The Brockett cost function:

f : St(p, n)→ R : X 7→ trace(XTAXD);

D = diag(µ1, µ2, . . . , µp) with µ1 > · · · > µp > 0;

Unique minimizer: X ∗ are eigenvectors for the p smallesteigenvalues.

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 34: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

18/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Setting and Complexities

f : St(p, n)→ R : X 7→ trace(XTAXD);

Setting

A = diag(1, 2, . . . , n) + B + BT , where entries of B has probability1/n to be nonzero;

D = diag(p, p − 1, . . . , 1);

Complexities

Function evaluation: ≈ 8np

Euclidean gradient evaluation: np (After function evaluation)

Retraction evaluation (QR): 6np2

Extrinsic:

(10 + 8m)np2 +O(p3) +O(np);

Intrinsic:

14np2 + O(p3) + O(np);

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 35: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

19/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Results

Table: An average of 100 random runs. Note that m is the upper bound of thelimited-memory size m. n = 1000 and p = 8.

m 2 8 32Extr Intr Extr Intr Extr Intr

iter 1027 915 933 830 877 745nf 1052 937 941 837 883 751ng 1028 916 934 831 878 746nR 1051 936 940 836 882 750nV 1027 915 933 830 877 745

gf/gf0 9.00−7 9.11−7 9.24−7 9.25−7 9.52−7 9.49−7

t 2.94−1 2.50−1 4.84−1 2.74−1 1.27 4.31−1

t/iter 2.86−4 2.73−4 5.18−4 3.31−4 1.45−3 5.79−4

Intrinsic representation yields faster LRBFGS implementation.

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 36: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

19/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Results

Table: An average of 100 random runs. Note that m is the upper bound of thelimited-memory size m. n = 1000 and p = 8.

m 2 8 32Extr Intr Extr Intr Extr Intr

iter 1027 915 933 830 877 745nf 1052 937 941 837 883 751ng 1028 916 934 831 878 746nR 1051 936 940 836 882 750nV 1027 915 933 830 877 745

gf/gf0 9.00−7 9.11−7 9.24−7 9.25−7 9.52−7 9.49−7

t 2.94−1 2.50−1 4.84−1 2.74−1 1.27 4.31−1

t/iter 2.86−4 2.73−4 5.18−4 3.31−4 1.45−3 5.79−4

Intrinsic representation yields faster LRBFGS implementation.

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 37: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

20/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Conclusion

Framework of Riemannian BFGS method;

Review recent generic Riemannian BFGS methods;

Intrinsic representation and vector transport by parallelization

Numerical evidences of low complexity

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 38: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

21/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Riemannian Manifold Optimization Library

Most state-of-the-art methods;

Commonly-encountered manifolds;

Written in C++;

Interfaces with Matlab, Julia and R;

BLAS and LAPACK;

www.math.fsu.edu/~whuang2/Indices/index_ROPTLIB.html

Users need only provide a cost function, gradient function, an action ofHessian (if a Newton method is used) in Matlab, Julia, R or C++ andparameters to control the optimization, e.g., the domain manifold, thealgorithm, stopping criterion.

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 39: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

22/23

Riemannian OptimizationRepresentation and Complexities

Experiments

Thank you

Thank you!

Speaker: Wen Huang Tangent Vectors and Vector Transport

Page 40: A Technique in Implementations of Riemannian quasi-Newton ...whuang2/pdf/Optimization_Nanjing.pdf · Riemannian Optimization Problem: Given f(x) : M!R, solve min x2M f(x) where Mis

23/23

Riemannian OptimizationRepresentation and Complexities

Experiments

References I

W. Huang, P.-A. Absil, and K. A. Gallivan.

Intrinsic representation of tangent vectors and vector transport on matrix manifolds.Numerische Mathematik, 136(2):523–543, 2016.

Wen Huang, P.-A. Absil, and K. A. Gallivan.

A Riemannian BFGS Method without Differentiated Retraction for Nonconvex Optimization Problems.SIAM Journal on Optimization, 28(1):470–495, 2018.

W. Huang, K. A. Gallivan, and P.-A. Absil.

A Broyden Class of Quasi-Newton Methods for Riemannian Optimization.SIAM Journal on Optimization, 25(3):1660–1685, 2015.

C. Qi.

Numerical optimization methods on Riemannian manifolds.PhD thesis, Florida State University, Department of Mathematics, 2011.

W. Ring and B. Wirth.

Optimization methods on Riemannian manifolds and their application to shape space.SIAM Journal on Optimization, 22(2):596–627, January 2012.doi:10.1137/11082885X.

Speaker: Wen Huang Tangent Vectors and Vector Transport