# The Riemannian Trust-Regions Solver

The aim is to solve an optimization problem on a manifold

by using the Riemannian trust-regions solver. It is number one choice for smooth optimization. This trust-region method uses the Steihaug-Toint truncated conjugate-gradient method `truncated_conjugate_gradient_descent`

to solve the inner minimization problem called the trust-regions subproblem. This inner solve can be preconditioned by providing a preconditioner (symmetric and positive deﬁnite, an approximation of the inverse of the Hessian of $F$). If no Hessian of the cost function $F$ is provided, a standard approximation of the Hessian based on the gradient $\operatorname{grad}F$ with `ApproxHessianFiniteDifference`

will be computed.

## Initialization

Initialize $x_0 = x$ with an initial point $x$ on the manifold. It can be given by the caller or set randomly. Set the initial trust-region radius $\Delta =\frac{1}{8} \bar{\Delta}$ where $\bar{\Delta}$ is the maximum radius the trust-region can have. Usually one uses the root of the manifold dimension $\operatorname{dim}(\mathcal{M})$. For accepting the next iterate and evaluating the new trust-region radius one needs an accept/reject threshold $\rho' ∈ [0,\frac{1}{4})$, which is $\rho' = 0.1$ on default. Set $k=0$.

## Iteration

Repeat until a convergence criterion is reached

- Set $η$ as a random tangent vector if using randomized approach. Else set $η$ as the zero vector in the tangential space $T_{x_k}\mathcal{M}$.
- Set $η^{* }$ as the solution of the trust-region subproblem, computed by the tcg-method with $η$ as initial vector.
- If using randomized approach compare $η^{* }$ with the Cauchy point $η_{c}^{* } = -\tau_{c} \frac{\Delta}{\operatorname{norm}(\operatorname{Grad}[f] (x_k))} \operatorname{Grad}[F] (x_k)$ by the model function $m_{x_k}(⋅)$. If the model decrease is larger by using the Cauchy point, set $η^{* } = η_{c}^{* }$.
- Set ${x}^{* } = \operatorname{Retr}_{x_k}(η^{* })$.
- Set $\rho = \frac{F(x_k)-F({x}^{* })}{m_{x_k}(η)-m_{x_k}(η^{* })}$, where $m_{x_k}(⋅)$ describes the quadratic model function.
- Update the trust-region radius: $\Delta = \begin{cases} \frac{1}{4} \Delta & \rho < \frac{1}{4} \, \text{or} \, m_{x_k}(η)-m_{x_k}(η^{* }) \leq 0 \, \text{or} \, \rho = \pm ∈ fty , \\ \operatorname{min}(2 \Delta, \bar{\Delta}) & \rho > \frac{3}{4} \, \text{and the tcg-method stopped because of negative curvature or exceeding the trust-region}, \\ \Delta & \, \text{otherwise.} \end{cases}$
- If $m_{x_k}(η)-m_{x_k}(η^{* }) \geq 0$ and $\rho > \rho'$ set $x_k = {x}^{* }$.
- Set $k = k+1$.

## Result

The result is given by the last computed $x_k$.

## Remarks

To the Initialization: A random point on the manifold.

To step number 1: Using randomized approach means using a random tangent vector as initial vector for the approximal solve of the trust-regions subproblem. If this is the case, keep in mind that the vector must be in the trust-region radius. This is achieved by multiplying `η`

by `sqrt(4,eps(Float64))`

as long as its norm is greater than the current trust-region radius $\Delta$. For not using randomized approach, one can get the zero tangent vector.

To step number 2: Obtain $η^{* }$ by (approximately) solving the trust-regions subproblem

with the Steihaug-Toint truncated conjugate-gradient (tcg) method. The problem as well as the solution method is described in the `truncated_conjugate_gradient_descent`

.

To step number 3: If using a random tangent vector as an initial vector, compare the result of the tcg-method with the Cauchy point. Convergence proofs assume that one achieves at least (a fraction of) the reduction of the Cauchy point. The idea is to go in the direction of the gradient to an optimal point. This can be on the edge, but also before. The parameter $\tau_{c}$ for the optimal length is defined by

To check the model decrease one compares $m_{x_k}(η_{c}^{* }) = F(x_k) + \langle η_{c}^{* }, \operatorname{Grad}[F] (x_k)\rangle_{x_k} + \frac{1}{2}\langle η_{c}^{* }, \operatorname{Hess}[F] (η_{c}^{* })_ {x_k}\rangle_{x_k}$ with $m_{x_k}(η^{* }) = F(x_k) + \langle η^{* }, \operatorname{Grad}[F] (x_k)\rangle_{x_k} + \frac{1}{2}\langle η^{* }, \operatorname{Hess}[F] (η^{* })_ {x_k}\rangle_{x_k}$. If $m_{x_k}(η_{c}^{* }) < m_{x_k}(η^{* })$ then is $m_{x_k}(η_{c}^{* })$ the better choice.

To step number 4: $\operatorname{Retr}_{x_k}(⋅)$ denotes the retraction, a mapping $\operatorname{Retr}_{x_k}:T_{x_k}\mathcal{M} \rightarrow \mathcal{M}$ wich approximates the exponential map. In some cases it is cheaper to use this instead of the exponential.

To step number 6: One knows that the `truncated_conjugate_gradient_descent`

algorithm stopped for these reasons when the stopping criteria `StopWhenCurvatureIsNegative`

, `StopWhenTrustRegionIsExceeded`

are activated.

To step number 7: The last step is to decide if the new point ${x}^{* }$ is accepted.

## Interface

`Manopt.trust_regions`

— Function`trust_regions(M, F, gradF, hessF, x)`

evaluate the Riemannian trust-regions solver for optimization on manifolds. It will attempt to minimize the cost function F on the Manifold M. If no Hessian H is provided, a standard approximation of the Hessian based on the gradient `gradF`

will be computed. For solving the the inner trust-region subproblem of finding an update-vector, it uses the Steihaug-Toint truncated conjugate-gradient method. For a description of the algorithm and more details see

- P.-A. Absil, C.G. Baker, K.A. Gallivan, Trust-region methods on Riemannian manifolds, FoCM, 2007. doi: 10.1007/s10208-005-0179-9
- A. R. Conn, N. I. M. Gould, P. L. Toint, Trust-region methods, SIAM, MPS, 2000. doi: 10.1137/1.9780898719857

**Input**

`M`

– a manifold $\mathcal M$`F`

– a cost function $F : \mathcal M → ℝ$ to minimize`gradF`

- the gradient $\operatorname{grad}F : \mathcal M → T \mathcal M$ of $F$`x`

– an initial value $x ∈ \mathcal M$`HessF`

– the hessian $\operatorname{Hess}F(x): T_x\mathcal M → T_x\mathcal M$, $X ↦ \operatoname{Hess}F(x)[X] = ∇_ξ\operatorname{grad}f(x)$

**Optional**

`evaluation`

– (`AllocatingEvaluation`

) specify whether the gradient and hessian work by allocation (default) or`MutatingEvaluation`

in place`max_trust_region_radius`

– the maximum trust-region radius`preconditioner`

– a preconditioner (a symmetric, positive definite operator that should approximate the inverse of the Hessian)`randomize`

– set to true if the trust-region solve is to be initiated with a random tangent vector. If set to true, no preconditioner will be used. This option is set to true in some scenarios to escape saddle points, but is otherwise seldom activated.`retraction`

– (`default_retraction_method(M)`

) approximation of the exponential map`stopping_criterion`

– (`StopWhenAny`

(`StopAfterIteration`

`(1000)`

,`StopWhenGradientNormLess`

`(10^(-6))`

) a functor inheriting from`StoppingCriterion`

indicating when to stop.`trust_region_radius`

- the initial trust-region radius`ρ_prime`

– Accept/reject threshold: if ρ (the performance ratio for the iterate) is at least ρ', the outer iteration is accepted. Otherwise, it is rejected. In case it is rejected, the trust-region radius will have been decreased. To ensure this, ρ' >= 0 must be strictly smaller than 1/4. If ρ_prime is negative, the algorithm is not guaranteed to produce monotonically decreasing cost values. It is strongly recommended to set ρ' > 0, to aid convergence.`ρ_regularization`

– Close to convergence, evaluating the performance ratio ρ is numerically challenging. Meanwhile, close to convergence, the quadratic model should be a good fit and the steps should be accepted. Regularization lets ρ go to 1 as the model decrease and the actual decrease go to zero. Set this option to zero to disable regularization (not recommended). When this is not zero, it may happen that the iterates produced are not monotonically improving the cost when very close to convergence. This is because the corrected cost improvement could change sign if it is negative but very small.`return_options`

– (`false`

) – if activated, the extended result, i.e. the complete`Options`

are returned. This can be used to access recorded values. If set to false (default) just the optimal value`x_opt`

is returned

**Output**

`x`

– the last reached point on the manifold

**see also**

`Manopt.trust_regions!`

— Function`trust_regions!(M, F, gradF, hessF, x; kwargs...)`

evaluate the Riemannian trust-regions solver for optimization on manifolds in place of `x`

.

**Input**

`M`

– a manifold $\mathcal M$`F`

– a cost function $F: \mathcal M → ℝ$ to minimize`gradF`

- the gradient $\operatorname{grad}F: \mathcal M → T \mathcal M$ of $F$`x`

– an initial value $x ∈ \mathcal M$`H`

– the hessian $H( \mathcal M, x, ξ)$ of $F$

for more details and all options, see `trust_regions`

## Options

`Manopt.AbstractHessianOptions`

— Type`AbstractHessianOptions <: Options`

An `Options`

type to represent algorithms that employ the Hessian. These options are assumed to have a field (`gradient`

) to store the current gradient $\operatorname{grad}f(x)$

`Manopt.TrustRegionsOptions`

— Type`TrustRegionsOptions <: AbstractHessianOptions`

describe the trust-regions solver, with

**Fields**

a default value is given in brackets if a parameter can be left out in initialization.

`x`

: a point as starting point`stop`

: a function s,r = @(o,iter) returning a stop indicator and a reason based on an iteration number and the gradient`trust_region_radius`

: the (initial) trust-region radius`max_trust_region_radius`

: the maximum trust-region radius`randomize`

: indicates if the trust-region solve is to be initiated with a random tangent vector. If set to true, no preconditioner will be used. This option is set to true in some scenarios to escape saddle points, but is otherwise seldom activated.`ρ_prime`

: a lower bound of the performance ratio for the iterate that decides if the iteration will be accepted or not. If not, the trust-region radius will have been decreased. To ensure this, ρ'>= 0 must be strictly smaller than 1/4. If ρ' is negative, the algorithm is not guaranteed to produce monotonically decreasing cost values. It is strongly recommended to set ρ' > 0, to aid convergence.`ρ_regularization`

: Close to convergence, evaluating the performance ratio ρ is numerically challenging. Meanwhile, close to convergence, the quadratic model should be a good fit and the steps should be accepted. Regularization lets ρ go to 1 as the model decrease and the actual decrease go to zero. Set this option to zero to disable regularization (not recommended). When this is not zero, it may happen that the iterates produced are not monotonically improving the cost when very close to convergence. This is because the corrected cost improvement could change sign if it is negative but very small.

**Constructor**

`TrustRegionsOptions(x, stop, delta, delta_bar, uR, rho_prime, rho_reg)`

construct a trust-regions Option with the fields as above.

**See also**

## Approximation of the Hessian

`Manopt.ApproxHessianFiniteDifference`

— Type`approxHessianFiniteDifference{T, mT, P, G}`

A functor to approximate the Hessian by a finite difference of gradient evaluations