• Ei tuloksia

Quasi-Newton method: Broyden-Fletcher-Goldfarb-Shanno

2.5 Optimisation methods

2.5.3 Quasi-Newton method: Broyden-Fletcher-Goldfarb-Shanno

Quasi-Newtonmethods try to combine the best properties of both Newton and gradient descent methods - their ultimate goal is to achieve fast converging without calculating possibly huge Hessian matrices at each iteration. In short, they accomplish that by

mimicking the Hessian∇2f(xj) by a similar enough, positive definite, matrix Bi, which is the main ingredient for fast converging. Otherwise the Quasi-Newton methods are similar to the basic Newton method, so Equation (65) with line search is needed in practise.

Broyden-Fletcher-Goldfarb-Shanno (BFGS) is one of the most common and powerful algorithms to find a good approximation Bi of the exact Hessian. In BFGS, the ap-proximate Hessian matrix is updated after a new iteration xi+1 is generated according to the formula:

Bi+1= Bi+ rirTi

rTi qi − BiqiqTi Bi

qTi Biqi

ri =∇f(xi+1)− ∇f(xi) qi = xi+1−xi.

(66)

Even though the Bi is just a rather crude iterative approximation of the Hessian, BFGS method has proved to be powerful, at least when it is compared to gradi-ent descgradi-ent methods. The drawback of the normal BFGS is that it still requires a lot of memory to store a dense approximation matrix, if the optimisation problem is high-dimensional. Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) solves the memory problem by storing a fixed number m of vectors qi and ri from previous iterations into matrices, which are used to update a new approximation for the Hessian (Brust et al., 2017):

Bi = B0+ YiUiYTi Yi = [B0MiRi] Ui =−

"

MTi B0Mi tril(MTi Ri) tril(QTi Ri)T −diag(MTi Ri)

#−1

Mi = [qi−m. . .qi−1] Ri = [ri−m. . .ri−1].

(67)

Matrix B0 is often just a scaled identity matrix (Brust et al., 2017). Ui is of size 2m×2m only, which renders the calculations at each iteration to be very fast.

L-BFGS is the algorithm, which is commonly used in large-scale differentiable nonlin-ear optimisation problems. It may not converge as fast as Newton method or even the normal BFGS, but thanks to its memory efficiency, it is definitely one of the best algorithms, if not the best, at high dimensions. The algorithm is also used in this thesis to calculate MAP-estimates from X-ray tomography model. A ready-made implemen-tation from SciPy library is used.

3 RANDOM FIELD PRIORS

Our objective is to compare common priors in X-ray tomography, since no compre-hensive comparison have been done previously. The priors we are interested in are Gaussian difference prior, total variation prior, Cauchy difference prior and Besov-space priors. All of these priors have not been compared to each other in sparse and limited angle tomography, while little is known about how effective they are sample from by various MCMC methods. Gaussian difference and total variation priors are widely used in tomography, whereas the Cauchy difference prior and the Besov space priors are more rare, although their strengths in certain cases have been demonstrated.

Besov space -based priors are known to work quite well in sparse angle tomography, while Cauchy difference prior preserves the possible edges in the domain much better than total variation prior, for instance.

3.1 Gaussian difference prior

Discretised Gaussian difference prior for numerical applications can be induced from an infinite-dimensional Gaussian random field, which has a certain covariance. One way to construct such a prior is to find a Green function c(x,y) of ap(th) order differential operator Lp, so that (Lasanen and Roininen, 2005):

Lpc=hX

(−1)|a|ka,bDaDbi

c(x,y) =δ(x−y). (68) In Equation (68), x and y are the arguments of the kernel c. Then, if Lp operates to a white noise processW with orthonormal expansion{λi}i=1 and multiplies it withσ, one gets a process

This means that covariance operator Q for process X is the integral operator LpLTp

which has kernel c(x1,x2), and which of boundary value is zero. The kernel of a dis-cretised covariance operator Q with n lattice points is then (Lasanen and Roininen, 2005) where gp denotes a discrete lattice point. This formulation makes it easy to construct also fractional finite difference priors thanks to the generalised binomial coefficient

formula. In two dimensions, this so called Green prior is based on the equation if ¯x means a lattice position vector without the component number d, since in two dimensions, the kernel arguments arex= (x1,x2) and y= (y1,y2).

The discrete, finite difference approximations for the covariance can be calculated with a suitable two-dimensional difference operator matrix. For example, second order fi-nite difference matrices can be built by Kronecker product (Bardsley, 2018). If one constructs a matrix which finite differences are let to flip over the lattice boundaries, then the domain of the interest isT2, instead of R2.

Fixing the boundary conditions of a random process at the lattice for example to zero is necessary in theory, since otherwise one would getimproper orintrisic priors, which do not have an invertible precision matrix, and thus no covariance matrix either. However, it is common at numerical simulations to not fix the boundary values, but rather let the likelihood of the model to actually fix the posterior proper. This is numerically equivalent to thegeneralised Tikhonov regularisation, in which one wants to limit finite differences of each component xi, so

xi ∼ N([Dx]i−cipr2 ), (74) where D is a suitable finite difference matrix. More complex and flexible Gaussian priors are formulated directly via correlation priors. While the priors based on Green functions obviously lead to correlated Gaussian random fields, it is sometimes better to control the degree and length of correlation more explicitly. One way to accomplish that is to use Whittle-Mat´ern correlation priors (Roininen et al., 2014). In such a formulation, an inverse Q−1 of a covariance Q can be expressed via fractional stochastic partial differential equation. Mat´ern-Whittle correlation priors are versatile, and it has

been applied it at finite element grids also (Roininen et al., 2014).