# Topological derivative

The topological derivative is, conceptually, a derivative of a shape functional with respect to infinitesimal changes in its topology, such as adding an infinitesimal hole or crack. When used in higher dimensions than one, the term topological gradient is also used to name the first-order term of the topological asymptotic expansion, dealing only with infinitesimal singular domain perturbations. It has applications in shape optimization, topology optimization, image processing and mechanical modeling.

## Definition

Let $\Omega$ be an open bounded domain of $\mathbb {R} ^{d}$, with $d\geq 2$, which is subject to a nonsmooth perturbation confined in a small region $\omega _{\varepsilon }({\tilde {x}})={\tilde {x}}+\varepsilon \omega$ of size $\varepsilon$ with ${\tilde {x}}$ an arbitrary point of $\Omega$ and $\omega$ a fixed domain of $\mathbb {R} ^{d}$. Let $\Psi$ be a characteristic function associated to the unperturbed domain and $\Psi _{\varepsilon }$ be a characteristic function associated to the perforated domain $\Omega _{\varepsilon }=\Omega \backslash {\overline {\omega _{\varepsilon }}}$. A given shape functional $\Phi (\Psi _{\varepsilon }({\tilde {x}}))$ associated to the topologically perturbed domain, admits the following topological asymptotic expansion:
$\Phi (\Psi _{\varepsilon }({\tilde {x}}))=\Phi (\Psi )+f(\varepsilon )g({\tilde {x}})+o(f(\varepsilon ))$
where $\Phi (\Psi )$ is the shape functional associated to the reference domain, $f(\varepsilon )$ is a positive first order correction function of $\Phi (\Psi )$ and $o(f(\varepsilon ))$ is the remainder. The function $g({\tilde {x}})$ is called the topological derivative of $\Phi$ at ${\tilde {x}}$.

## Applications
### Structural mechanics

The topological derivative can be applied to shape optimization problems in structural mechanics. The topological derivative can be considered as the singular limit of the shape derivative. It is a generalization of this classical tool in shape optimization. Shape optimization concerns itself with finding an optimal shape. That is, find $\Omega$ to minimize some scalar-valued objective function, $J(\Omega )$. The topological derivative technique can be coupled with level-set method.
In 2005, the topological asymptotic expansion for the Laplace equation with respect to the insertion of a short crack inside a plane domain had been found. It allows to detect and locate cracks for a simple model problem: the steady-state heat equation with the heat flux imposed and the temperature measured on the boundary. The topological derivative had been fully developed for a wide range of second-order differential operators and in 2011, it had been applied to Kirchhoff plate bending problem with a fourth-order operator.

### Image processing

In the field of image processing, in 2006, the topological derivative has been used to perform edge detection and image restoration. The impact of an insulating crack in the domain is studied. The topological sensitivity gives information on the image edges. The presented algorithm is non-iterative and thanks to the use of spectral methods has a short computing time. Only $O(Nlog(N))$ operations are needed to detect edges, where $N$ is the number of pixels. During the following years, other problems have been considered: classification, segmentation, inpainting and super-resolution. This approach can be applied to gray-level or color images. Until 2010, isotropic diffusion was used for image reconstructions. The topological gradient is also able to provide edge orientation and this information can be used to perform anisotropic diffusion.
In 2012, a general framework is presented to reconstruct an image $u\in L^{2}(\Omega )$ given some noisy observations $Lu+n$ in a Hilbert space $E$ where $\Omega$ is the domain where the image $u$ is defined. The observation space $E$ depends on the specific application as well as the linear observation operator $L:L^{2}(\Omega )\rightarrow E$. The norm on the space $E$ is $\|.\|_{E}$. The idea to recover the original image is to minimize the following functional for $u\in H^{1}(\Omega )$:
$\|C^{1/2}\nabla u\|_{L^{2}(\Omega )}^{2}+\|Lu-v\|_{E}^{2}$
where $C$ is a positive definite tensor. The first term of the equation ensures that the recovered image $u$ is regular, and the second term measures the discrepancy with the data. In this general framework, different types of image reconstruction can be performed such as
* image denoising with $E=L^{2}(\Omega )$ and $Lu=u$,
* image denoising and deblurring with $E=L^{2}(\Omega )$ and $Lu=\phi \ast u$ with $\phi$ a motion blur or Gaussian blur,
* image inpainting with $E=L^{2}(\Omega \backslash \omega )$ and $Lu=u|_{\Omega \backslash \omega }$, the subset $\omega \subset \Omega$ is the region where the image has to be recovered.
In this framework, the asymptotic expansion of the cost function $J_{\Omega }(u_{\Omega })={\frac {1}{2}}\int _{\Omega }u_{\Omega }^{2}$ in the case of a crack provides the same topological derivative $g(x,n)=-\pi c(\nabla u_{0}.n)(\nabla p_{0}.n)-\pi (\nabla u_{0}.n)^{2}$ where $n$ is the normal to the crack and $c$ a constant diffusion coefficient. The functions $u_{0}$ and $p_{0}$ are solutions of the following direct and adjoint problems.
$-\nabla (c\nabla u_{0})+L^{*}Lu_{0}=L^{*}v$
$\Omega$
$\partial _{n}u_{0}=0$
$\partial \Omega$
$-\nabla (c\nabla p_{0})+L^{*}Lp_{0}=\Delta u_{0}$
$\Omega$
$\partial _{n}p_{0}=0$
$\partial \Omega$
Thanks to the topological gradient, it is possible to detect the edges and their orientation and to define an appropriate $C$ for the image reconstruction process.
In image processing, the topological derivatives have also been studied in the case of a multiplicative noise of gamma law or in presence of Poissonian statistics.

### Inverse problems

In 2009, the topological gradient method has been applied to tomographic reconstruction. The coupling between the topological derivative and the level set has also been investigated in this application. In 2023, topological derivative was used to optimize shapes for inverse rendering.