Chambolle-Pock algorithm

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 $$ \mathcal{X}, \mathcal{Y} $$ two real vector spaces equipped with an inner product $$ \langle \cdot, \cdot \rangle $$ and a norm $$ \lVert \,\cdot \,\rVert = \langle \cdot, \cdot \rangle^{\frac{1}{2}} $$. From up to now, a function $$F$$ is called simple if its proximal operator $$ \text{prox}_{\tau F} $$ has a closed-form representation or can be accurately computed, for $$\tau >0$$, where $$ \text{prox}_{\tau F} $$ is referred to


 * $$ x = \text{prox}_{\tau F}(\tilde{x}) = \text{arg } \min_{x'\in \mathcal{X}}\left\{

\frac{\lVert x'-\tilde{x}\rVert^2}{2\tau} + F(x') \right\}$$

Consider the following constrained primal problem:
 * $$ \min_{x\in\mathcal{X}} F(Kx) + G(x) $$

where $$K:\mathcal{X} \rightarrow \mathcal{Y}$$ is a bounded linear operator, $$F:\mathcal{Y} \rightarrow [0, +\infty), G:\mathcal{X} \rightarrow [0, +\infty) $$ are convex, lower semicontinuous and simple.

The minimization problem has its dual corresponding problem as


 * $$ \max_{y\in\mathcal{Y}} -\left(G^*(-K^*y) + F^*(y)\right)

$$

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 $$ (\hat{x}, \hat{y}) \in \mathcal{X}\times \mathcal{Y} $$, that means they satisfies

$$ \begin{align} K\hat{x} &\in \partial F^*(\hat{y})\\ -(K^*\hat{y}) &\in \partial G(\hat{x}) \end{align} $$

where $$ \partial F^* $$ and $$ \partial G$$ are the subgradient of the convex functions $$ F^* $$ and $$ G $$, respectively.

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


 * $$ \min_{x\in\mathcal{X}} \max_{y\in\mathcal{Y}} \langle Kx, y \rangle + 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 $$\sigma$$ and $$\tau$$ 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 $$\theta$$. Input: $ F, G, K, \tau, \sigma >0, \, \theta \in[0,1],\, (x^0,y^0)\in\mathcal{X}\times\mathcal{Y}$ and set $ \overline{x}^0 = x^0$, stopping criterion.

$ k \leftarrow 0 $ do while stopping criterion not satisfied $ y^{n+1} \leftarrow \text{prox}_{\sigma F^*}\left(y^{n} + \sigma K\overline{x}^{n}\right) $ $ x^{n+1} \leftarrow \text{prox}_{\tau G}\left(x^{n} - \tau K^*y^{n+1}\right) $ $ \overline{x}^{n+1} \leftarrow x^{n+1} + \theta\left( x^{n+1} -x^{n}\right)$ $k\leftarrow k+1$ end do

Chambolle and Pock proved that the algorithm converges if $$\theta = 1$$ and $$\tau \sigma \lVert K \rVert^2 \leq 1$$, sequentially and with $$\mathcal{O}(1/N)$$ as rate of convergence for the primal-dual gap. This has been extended by S. Banert et al. to hold whenever $$\theta>1/2$$ and $$\tau \sigma \lVert K \rVert^2 < 4 / (1+2\theta)$$.

The semi-implicit Arrow-Hurwicz method coincides with the particular choice of $$\theta = 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 $$ \mathcal{O}(1/N^2)$$, providing a slightly changes in the Chambolle-Pock algorithm. It leads to an accelerated version of the method and it consists in choosing iteratively $$ \tau_n, \sigma_n$$, and also $$ \theta_n$$, instead of fixing these values.

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

Input: $ F, G, \tau_0, \sigma_0 >0$ such that $ \tau_0\sigma_0 L^2 \leq 1,\, (x^0,y^0)\in\mathcal{X}\times\mathcal{Y}$ and set $ \overline{x}^0 = x^0.$, stopping criterion.

$ k \leftarrow 0 $ do while stopping criterion not satisfied $ y^{n+1} \leftarrow \text{prox}_{\sigma_n F^*}\left(y^{n} + \sigma_n K\overline{x}^{n}\right) $ $ x^{n+1} \leftarrow \text{prox}_{\tau_n G}\left(x^{n} - \tau_n K^*y^{n+1}\right) $ $ \theta_n \leftarrow \frac{1}{\sqrt{1+2\gamma \tau_n}}$|undefined $ \tau_{n+1} \leftarrow \theta_n \tau_n$ $ \sigma_{n+1} \leftarrow \frac{\sigma_n}{\theta_n}$ $ \overline{x}^{n+1} \leftarrow x^{n+1} + \theta_n\left( x^{n+1} -x^{n}\right)$ $k\leftarrow k+1$ end do

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 $$\Sigma$$, modifying the proximal operator with the introduction of the induced norm through the operators $$T$$ and $$\Sigma$$, the convergence of the proposed preconditioned algorithm will be ensured.

Application
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 $$\mathcal{X} = \mathbb{R}^{NM}$$, where an element $$ u\in\mathcal{X} $$ represents an image with the pixels values collocated in a Cartesian grid $$N\times M$$.

Define the inner product on $$ \mathcal{X} $$ as that induces an $$ L^2$$ norm on $$ \mathcal{X} $$, denoted as $$ \lVert \, \cdot \, \rVert_2 $$.

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



which is an element of the space $$ \mathcal{Y}=\mathcal{X}\times \mathcal{X} $$, where



On $$\mathcal{Y}$$ is defined an $ L^1-$ based norm as Then, the primal problem of the ROF model, proposed by Rudin, Osher, and Fatemi, is given by

h^2 \min_{u\in \mathcal{X}} \lVert \nabla u \rVert_1 + \frac{\lambda}{2} \lVert u-g\rVert^2_2 $$ where $$ u \in \mathcal{X}$$ is the unknown solution and $$ g \in \mathcal{X}$$ the given noisy data, instead $$ \lambda $$ describes the trade-off between regularization and data fitting.

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

\min_{u\in \mathcal{X}}\max_{p\in \mathcal{Y}} -\langle u, \text{div}\, p\rangle_{\mathcal{X}} + \frac{\lambda}{2} \lVert u-g\rVert^2_2 - \delta_P(p) $$ where the indicator function is defined as

\delta_P(p) = \left\{ \begin{aligned} &0, & \text{if } p \in P\\ &+\infty,& \text{if } p \notin P \end{aligned} \right. $$ on the convex set $$ P = \left\{ p\in \mathcal{Y}\, : \, \max_{i,j}\sqrt{\left(p_{i,j}^1\right)^2 + \left(p_{i,j}^2\right)^2} \leq 1 \right\}, $$ which can be seen as $$ L^\infty $$ unitary balls with respect to the defined norm on $$ \mathcal{Y}$$.

Observe that the functions involved in the stated primal-dual formulation are simple, since their proximal operator can be easily computed $$ \begin{align} p &= \text{prox}_{\sigma F^*}(\tilde{p}) &\iff p_{i,j} &= \frac{\tilde{p}_{i,j}}{\max\{1,| \tilde{p}_{i,j}| \}}\\ u &= \text{prox}_{\tau G}(\tilde{u}) &\iff u_{i,j} &= \frac{ \tilde{u}_{i,j}+\tau\lambda g_{i,j}}{1+\tau \lambda} \end{align} $$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

 * The Manopt.jl package implements the algorithm in Julia
 * Gabriel Peyré implements the algorithm in MATLAB, Julia, R and Python
 * In the Operator Discretization Library (ODL), a Python library for inverse problems, chambolle_pock_solver implements the method.