Optimization#

bartorch.optim provides BART’s iterative algorithms for linear inverse problems. A solver is configured by its constructor and called as solver(y, A, x0=None), with y the data and A a LinearOperator; it reproduces BART’s iteration, including its step sizes, penalty updates and stopping rules. An iteration block is one step of the same iteration as a torch.nn.Module. A leading axis of y beyond the codomain of A is a batch of independent problems. Inverse problems and their solvers states the problems and algorithms, and Differentiation through reconstruction the backward pass of each solver.

Solver

Problem

Regularization

Backward pass

CG

\(\min_x \lVert Ax-y\rVert^2 + \lambda\lVert x\rVert^2 + \sum_i w_i \lVert G_i x - b_i\rVert^2\)

Tikhonov terms

Implicit: one further conjugate-gradient solve

IST

\(\min_x \tfrac12\lVert Ax-y\rVert^2 + g(x)\)

One term with \(G = I\)

Unrolled

FISTA

As IST, with momentum

One term with \(G = I\)

Unrolled

ADMM

\(\min_x \tfrac12\lVert Ax-y\rVert^2 + \sum_j g_j(G_j x)\)

Any number of terms, any \(G_j\)

Unrolled; each x-update implicit

PRIDU

As ADMM

Any number of terms, any \(G_j\)

Unrolled

POCS

Feasibility: repeated projections

Projections and terms at unit weight

Unrolled

Terms are the objects of bartorch.priors; an ImplicitPrior is accepted wherever a regularization term is.

Linear least squares#

Object

Description

CG

Conjugate gradients on the normal equations, with Tikhonov terms

Tikhonov

Quadratic penalty \(w \lVert G x - b\rVert^2\) for CG

Regularized least squares#

Object

Description

IST

Iterative soft thresholding (proximal gradient)

FISTA

Fast iterative soft thresholding (accelerated proximal gradient)

ADMM

Alternating direction method of multipliers

PRIDU

Chambolle-Pock primal-dual iteration

maxeigen

Power-iteration estimate of the largest eigenvalue of \(A^H A\)

Projection methods#

Object

Description

POCS

Projection onto convex sets, repeated sweeps

POCSBlock

One sweep of the projections

Functional interface#

Each function constructs the corresponding solver and calls it: optim.fista(y, A, term, maxiter=30) is optim.FISTA(term, maxiter=30)(y, A).

Object

Description

cg

CG in one call

ist

IST in one call

fista

FISTA in one call

admm

ADMM in one call

pridu

PRIDU in one call

pocs

POCS in one call, with the projections in place of an encoding

Iteration blocks#

state = block.start(y, A, x0) initializes a run, state = block(state, A) takes one step and block.output(state, A) returns the image. Step sizes and penalty weights are torch.nn.Parameter objects, frozen until requires_grad_() is called on them.

Object

Description

ISTBlock

One iterative soft-thresholding step

FISTABlock

One fast iterative soft-thresholding step

ADMMBlock

One ADMM step

PRIDUBlock

One primal-dual step

Fixed-point methods#

Object

Description

FixedPoint

An iteration block iterated to its fixed point and differentiated implicitly there (deep equilibrium)

Data scaling#

Object

Description

data_scaling

BART’s estimate of the data scale by which pics divides the data before it iterates

Operators and solvers assembles a BART reconstruction from an operator, a term and a solver.