Chambolle–Pock algorithm

Original image and damaged
Original test image and damaged one
Original image and damaged
Example of application of the Chambolle-Pock algorithm to image reconstruction

In mathematics, the Chambolle–Pock algorithm is an algorithm used to solve convex optimization problems. It was introduced by Antonin Chambolle and Thomas Pock in 2011 and has since become a widely used method in various fields, including image processing, computer vision, and signal processing.

The Chambolle–Pock algorithm is specifically designed to efficiently solve convex optimization problems that involve the minimization of a non-smooth cost function composed of a data fidelity term and a regularization term. This is a typical configuration that commonly arises in ill-posed imaging inverse problems such as image reconstruction, denoising and inpainting.

The algorithm is based on a primal-dual formulation, which allows for simultaneous updates of primal and dual variables. By employing the proximal operator, the Chambolle–Pock algorithm efficiently handles non-smooth and non-convex regularization terms, such as the total variation, specific in imaging framework.

Problem statement

Let be 𝒳,𝒴 two real vector spaces equipped with an inner product ⟨⋅,⋅⟩ and a norm ‖⋅‖=⟨⋅,⋅⟩12. From now on, a function F is called simple if its proximal operator proxτF has a closed-form representation or can be accurately computed, for τ>0, where proxτF is referred to

x=proxτF(x~)=arg minx′∈𝒳{‖x′−x~‖22τ+F(x′)}

Consider the following constrained primal problem:

minx∈𝒳F(Kx)+G(x)

where K:𝒳→𝒴 is a bounded linear operator, F:𝒴→[0,+∞),G:𝒳→[0,+∞) are convex, lower semicontinuous and simple.

The minimization problem has its dual corresponding problem as

maxy∈𝒴−(G∗(−K∗y)+F∗(y))

where F∗,G∗ and K∗ are the dual map of F,G and K, respectively.

Assume that the primal and the dual problems have at least a solution (x̂,ŷ)∈𝒳×𝒴, that means they satisfy

Kx̂∈∂F∗(ŷ)−(K∗ŷ)∈∂G(x̂)

where ∂F∗ and ∂G are the subgradient of the convex functions F∗ and G, respectively.

The Chambolle–Pock algorithm solves the so-called saddle-point problem

minx∈𝒳maxy∈𝒴⟨Kx,y⟩+G(x)−F∗(y)

which is a primal-dual formulation of the nonlinear primal and dual problems stated before.

Algorithm

The Chambolle–Pock algorithm primarily involves iteratively alternating between ascending in the dual variable y and descending in the primal variable x using a gradient-like approach, with step sizes σ and τ respectively, in order to simultaneously solve the primal and the dual problem. Furthermore, an over-relaxation technique is employed for the primal variable with the parameter θ.

Algorithm Chambolle-Pock algorithm
Input:  F,G,K,τ,σ>0,θ∈[0,1],(x0,y0)∈𝒳×𝒴 and set x‾0=x0, stopping criterion.
k←0
do while stopping criterion not satisfied
    yn+1←proxσF∗(yn+σKx‾n)
    xn+1←proxτG(xn−τK∗yn+1)
    x‾n+1←xn+1+θ(xn+1−xn)
    k←k+1
end do
  • "←" denotes assignment. For instance, "largest ← item" means that the value of largest changes to the value of item.
  • "return" terminates the algorithm and outputs the following value.

Chambolle and Pock proved that the algorithm converges if θ=1 and τσ‖K‖2≤1, sequentially and with 𝒪(1/N) as rate of convergence for the primal-dual gap. This has been extended by S. Banert et al. to hold whenever θ>1/2 and τσ‖K‖2<4/(1+2θ).

The semi-implicit Arrow-Hurwicz method coincides with the particular choice of θ=0 in the Chambolle–Pock algorithm.

Acceleration

There are special cases in which the rate of convergence has a theoretical speed up. In fact, if G, respectively F∗, is uniformly convex then G∗, respectively F, has a Lipschitz continuous gradient. Then, the rate of convergence can be improved to 𝒪(1/N2), providing a slightly changes in the Chambolle–Pock algorithm. It leads to an accelerated version of the method and it consists in choosing iteratively τn,σn, and also θn, instead of fixing these values.

In case of G uniformly convex, with γ>0 the uniform-convexity constant, the modified algorithm becomes

Algorithm Accelerated Chambolle-Pock algorithm
Input:  F,G,τ0,σ0>0 such that τ0σ0L2≤1,(x0,y0)∈𝒳×𝒴 and set x‾0=x0., stopping criterion.
k←0
do while stopping criterion not satisfied
    yn+1←proxσnF∗(yn+σnKx‾n)
    xn+1←proxτnG(xn−τnK∗yn+1)
    θn←11+2γτn
    τn+1←θnτn
    σn+1←σnθn
    x‾n+1←xn+1+θn(xn+1−xn)
    k←k+1
end do
  • "←" denotes assignment. For instance, "largest ← item" means that the value of largest changes to the value of item.
  • "return" terminates the algorithm and outputs the following value.

Moreover, the convergence of the algorithm slows down when L, the norm of the operator K, cannot be estimated easily or might be very large. Choosing proper preconditioners T and Σ, modifying the proximal operator with the introduction of the induced norm through the operators T and Σ, the convergence of the proposed preconditioned algorithm will be ensured.

Application

Denoising example
Fishing boat image original
Original test image
Fishing boat GIF with noise
Application of the Chambolle-Pock algorithm to the test image with noise

A typical application of this algorithm is in the image denoising framework, based on total variation. It operates on the concept that signals containing excessive and potentially erroneous details exhibit a high total variation, which represents the integral of the absolute value gradient of the image. By adhering to this principle, the process aims to decrease the total variation of the signal while maintaining its similarity to the original signal, effectively eliminating unwanted details while preserving crucial features like edges. In the classical bi-dimensional discrete setting, consider 𝒳=ℝNM, where an element u∈𝒳 represents an image with the pixels values collocated in a Cartesian grid N×M.

Define the inner product on 𝒳 as

⟨u,v⟩𝒳=∑i,jui,jvi,j,u,v∈𝒳

that induces an L2 norm on 𝒳, denoted as ‖⋅‖2.

Hence, the gradient of u is computed with the standard finite differences,

(∇u)i,j=((∇u)i,j1(∇u)i,j2)

which is an element of the space 𝒴=𝒳×𝒳, where

(∇u)i,j1={ui+1,j−ui,jh if i<M0 if i=M,(∇u)i,j2={ui,j+1−ui,jh if j<N0 if j=N

On 𝒴 is defined an L1− based norm as

‖p‖1=∑i,j(pi,j1)2+(pi,j2)2,p∈𝒴.

Then, the primal problem of the ROF model, proposed by Rudin, Osher, and Fatemi, is given by

h2minu∈𝒳‖∇u‖1+λ2‖u−g‖22

where u∈𝒳 is the unknown solution and g∈𝒳 the given noisy data, instead λ describes the trade-off between regularization and data fitting.

The primal-dual formulation of the ROF problem is formulated as follow

minu∈𝒳maxp∈𝒴−⟨u,divp⟩𝒳+λ2‖u−g‖22−δP(p)

where the indicator function is defined as

δP(p)={0,if p∈P+∞,if p∉P

on the convex set P={p∈𝒴:maxi,j(pi,j1)2+(pi,j2)2≤1}, which can be seen as L∞ unitary balls with respect to the defined norm on 𝒴.


Observe that the functions involved in the stated primal-dual formulation are simple, since their proximal operator can be easily computedp=proxσF∗(p~)⟺pi,j=p~i,jmax⁡{1,|p~i,j|}u=proxτG(u~)⟺ui,j=u~i,j+τλgi,j1+τλThe image total-variation denoising problem can be also treated with other algorithms such as the alternating direction method of multipliers (ADMM), projected (sub)-gradient or fast iterative shrinkage thresholding.

Implementation

See also