diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzzgrwc" "b/data_all_eng_slimpj/shuffled/split2/finalzzgrwc" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzzgrwc" @@ -0,0 +1,5 @@ +{"text":"\\section{Introduction}\\label{sec:intro}\n\n\\section{Introduction}\\label{sec:intro}\n\n\n\nHamiltonian ordinary differential equations and their generalisation, Poisson systems, \nare extensively used as mathematical models to describe the dynamical evolution of various physical systems \nin science and engineering. The flow of a Hamiltonian system is known to be a symplectic map, whereas the flow of a Poisson system is a Poisson map.\nThis is a key property that the flow of a numerical method should also have. \nThe recent years have thus witnessed a large amount of research activities in the design and numerical analysis of symplectic numerical schemes, resp. Poisson integrators, for deterministic (non-canonical) Hamiltonian systems, see for instance the classical monographs \\cite{Sanz-Serna1994,rl,HLW02,bcGNI15} and references therein. \n\nThis research has naturally come to the realm of stochastic Hamiltonian systems. Without being too exhaustive, we mention the works \n\\cite{Milstein2002,Milstein2002a,w07,MR2491434,m10,bb12,\nmdd12,MR3094570,MR3218332,MR3195572,MR3552716,MR3579605,MR3882980,MR3873562,MR3952248,chjs21} \non the numerical analysis of symplectic methods for stochastic Hamiltonian systems. \n\nSince symplectic methods for stochastic Hamiltonian systems offer advantages compared to \nstandard numerical methods, as observed in the above list of references, \nit is natural to ask if one can derive numerical integrators respecting the structure of \nstochastic Poisson systems of the Stratonovich form \n\\begin{equation*}\n\\left\\lbrace\n\\begin{aligned}\n\\,\\mathrm{d} y(t)&=B(y(t))\\nabla H(y(t))\\,\\,\\mathrm{d} t+\\sum_{k=1}^mB(y(t))\\nabla \\widehat H_k(y(t))\\circ\\,\\,\\mathrm{d} W_k(t)\\\\\ny(0)&=y_0,\n\\end{aligned}\n\\right.\n\\end{equation*}\nwith Hamiltonian functions $H,\\widehat{H}_1,\\ldots,\\widehat{H}_m\\colon\\mathbb{R}^d\\to\\mathbb{R}$, \na structure matrix $B\\colon \\mathbb{R}^d \\to \\mathbb{R}^{d\\times d}$, and independent \nstandard real-valued Wiener processes $W_1,\\ldots,W_m$, see Section~\\ref{sec:poisson} for details on the notation. \n\n\n\n{Stochastic Poisson systems are popular models to describe diverse random phenomena, see below and \\cite{MR629977,misawa94,misawa99,MR2198598,MR2408499,MR2502472,MR3747641,MR2644322,MR2970274,MR3210739,wwc21} for instance. However, to the best of our knowledge, there has been no general study of integrators for stochastic Poisson systems which respect their geometric properties in the literature so far except the recent work~\\cite{hong2020structurepreserving}. In this manuscript, we intend to fill this gap and we study the notion of stochastic Poisson integrators \n(see Definition~\\ref{defPI} and \\cite[Theorem~3.1]{hong2020structurepreserving}): such integrators need to be Poisson maps (see Definition~\\ref{def:Pmap}) and to preserve the Casimir functions of the system. Imposing these conditions is natural: indeed we prove that the flow of the stochastic Poisson system is a Poisson map (see Theorem~\\ref{th:flowP}) and also preserves Casimir functions. In addition, the present notion of stochastic Poisson integrators is a natural generalisation of the notion of Poisson integrators for deterministic Poisson systems.\n\nThe main contribution of this manuscript is the analysis of a class of explicit stochastic Poisson integrators, see equation~\\eqref{slpI}, based on a splitting strategy. The splitting strategy is often applicable for stochastic Lie--Poisson systems, which have a structure matrix $B(y)$ which depends linearly on $y$. The construction of the scheme is illustrated for stochastic perturbations of three systems which have been studied extensively in the deterministic case: Maxwell--Bloch, rigid body and sine--Euler equations. Note that these examples give stochastic differential equations (SDEs) with non-globally Lipschitz drift and diffusion coefficients, thus standard explicit schemes such as the Euler--Maruyama method are not expected to converge (strongly or weakly) or even to satisfy moment bounds. Instead, under appropriate assumptions, we prove that the proposed integrators converge strongly and weakly, with rates $1\/2$ and $1$ respectively, see Theorem~\\ref{thm-general}. Indeed, if one assumes that the system admits a Casimir function with compact level sets (which is the case for the rigid body and the sine--Euler equations), both the exact and the numerical solutions of the stochastic Poisson systems remain bounded almost surely, uniformly with respect to the time step size. Our main convergence result, Theorem~\\ref{thm-general}, is illustrated with extensive numerical experiments.\n}\n\n{\nOn top of that, we study the properties of the stochastic Poisson systems (see Subsection~\\ref{sec:multi}) and stochastic Poisson integrators (see Subsection~\\ref{APsplit}) in a multiscale regime, namely when the Wiener processes are approximated by a smooth noise. The proposed splitting schemes are asymptotic preserving in this diffusion approximation regime, in the sense of the notion recently introduced in~\\cite{BRR}. This property, which is not satisfied by standard integrators, is illustrated with numerical experiments.\n}\n\n\n\n\n\n\n{\nLet us now compare our contributions with existing works. As already mentioned, the notion of stochastic Poisson integrators is a natural generalisation of the notion of Poisson integrators for deterministic systems. In the stochastic case, we are only aware of the recent work~\\cite{hong2020structurepreserving}, where techniques which differ from ours are employed. First, in~\\cite{hong2020structurepreserving}, the proof that the flow is a Poisson map consists in using the Darboux--Lie theorem to rewrite the stochastic Poisson system into a canonical form, i.\\,e. as a stochastic Hamiltonian system, for which it is already known that the flow is a symplectic map. On the contrary, our approach to prove Theorem~\\ref{th:flowP} below is more direct and extends the approach considered in~\\cite[Chapter VII]{HLW02} for the deterministic case. Second, the authors of~\\cite{hong2020structurepreserving} design stochastic Poisson integrators by starting from a stochastic symplectic scheme for the canonical version, and then by coming back to the original variables. Note that the transformations between the non canonical and canonical variables are often found by solving partial differential equations, and that symplectic schemes are usually implicit. Our approach is more direct and leads to explicit splitting schemes. In particular, for the stochastic rigid body system, the scheme proposed in~\\cite{hong2020structurepreserving} is based on the midpoint rule and is thus implicit, whereas the scheme proposed in our work is explicit, and we are able to prove strong and weak convergence results.\n}\n\n\n\n\n\n\n\nThe paper is organized as follows. Section~\\ref{sec:poisson} is devoted to the setting and to the description of the main properties of stochastic Poisson systems, namely the preservation of Casimir functions and the Poisson map property (Theorem~\\ref{th:flowP}, see Subsection~\\ref{sec:Pmap}). The three main examples of stochastic Lie--Poisson systems (Maxwell--Bloch, rigid body and sine--Euler equations) are introduced in Subsection~\\ref{sec:examples}. The diffusion approximation regime is presented in Subsection~\\ref{sec:multi}. Section~\\ref{sec:integrators} presents the main theoretical contributions of this work: we introduce the notion of stochastic Poisson integrators (Definition~\\ref{defPI}) and we propose a class of such integrators using a splitting technique. The main convergence result (Theorem~\\ref{thm-general}) is stated and proved in Subsection~\\ref{sec:cv} (using an auxiliary result proved in Appendix~\\ref{app-auxlem}): under appropriate assumptions, the proposed explicit splitting stochastic Poisson integrators converge in strong and weak senses, with orders $1\/2$ and $1$ respectively. The asymptotic preserving property in the diffusion approximation regime is studied in Section~\\ref{APsplit}. Finally, Section~\\ref{sect-numexp} presents numerical experiments using the proposed splitting stochastic Poisson integrators and variants for the three examples of stochastic Lie--Poisson systems (Maxwell--Bloch, rigid body and sine--Euler equations). We illustrate various qualitative and quantitative properties, which show the superiority of the proposed schemes compared with existing methods.\n\n\n\n\n\n\n\n\\section{Stochastic Poisson and Lie--Poisson systems}\\label{sec:poisson}\n\nIn this section, we set notation and introduce the stochastic differential equations studied in this article, \nnamely \\emph{stochastic (Lie--)Poisson systems}. \nWe then state the main properties of such systems and give several examples\nfor which stochastic Poisson integrators are designed and analysed in Sections~\\ref{sec:integrators}~and~\\ref{sect-numexp}. \nWe conclude this section with a diffusion approximation result justifying why considering stochastic Poisson systems \nwith a Stratonovich interpretation of the noise is relevant.\n\n\\subsection{Setting and stochastic Poisson dynamics}\n\nLet $d,m$ be positive integers: $d$ is the dimension of the considered system and $m$ is the dimension \nof the stochastic perturbation. We study \\emph{stochastic Poisson systems} of the type\n\\begin{equation}\\label{prob}\n\\left\\lbrace\n\\begin{aligned}\n\\,\\mathrm{d} y(t)&=B(y(t))\\nabla H(y(t))\\,\\,\\mathrm{d} t+\\sum_{k=1}^mB(y(t))\\nabla \\widehat H_k(y(t))\\circ\\,\\,\\mathrm{d} W_k(t),\\\\\ny(0)&=y_0,\n\\end{aligned}\n\\right.\n\\end{equation}\nwith \\emph{Hamiltonian functions} \n$H,\\widehat{H}_1,\\ldots,\\widehat{H}_m\\colon\\mathbb{R}^d\\to\\mathbb{R}$, with \\emph{structure matrix} \n$B\\colon \\mathbb{R}^d \\to \\mathbb{R}^{d\\times d}$,\nand with independent standard real-valued Wiener processes $W_1,\\ldots,W_m$ \ndefined on a probability space $(\\Omega, \\mathcal F, \\mathbb P)$. \nThe noise in the SDE~\\eqref{prob} is understood in the Stratonovich sense. \nThe initial value $y_0$ is assumed to be non-random for ease of presentation, but\nthe results of this paper can be extended to the case of random $y_0$ (independent of $W_1,\\ldots,W_m$ and satisfying appropriate moment bounds). \n\nHenceforth we assume at least that $H\\in\\mathcal{C}^2$, $\\widehat{H}_1,\\ldots,\\widehat{H}_m \\in \\mathcal{C}^3$,\nand that $B\\in\\mathcal{C}^2$. The gradient is denoted by $\\nabla$, e.g.\n$\\nabla H(y)=\\bigl(\\frac{\\partial H(y)}{\\partial y_1},\\ldots,\\frac{\\partial H(y)}{\\partial y_d})\\in\\mathbb{R}^d$.\nThe structure matrix $B$ is assumed to satisfy the following properties.\n\\begin{itemize}\n\\item Skew-symmetry: for every $y\\in\\mathbb{R}^d$ and for all $i,j\\in\\{1,\\ldots,d\\}$, one has\n\\[\nB_{ij}(y)=-B_{ji}(y);\n\\]\n\\item Jacobi identity: for every $y\\in\\mathbb{R}^d$ and for all $i,j,k\\in\\{1,\\ldots,d\\}$, one has\n\\[\n\\sum_{\\ell=1}^d\\left( \\frac{\\partial B_{ij}(y)}{\\partial y_\\ell}B_{lk}(y)+\n\\frac{\\partial B_{jk}(y)}{\\partial y_\\ell}B_{li}(y)+\\frac{\\partial B_{ki}(y)}{\\partial y_\\ell}B_{lj}(y) \\right)=0.\n\\]\n\\end{itemize}\nSometimes the structure matrix $B$ is referred to as the Poisson matrix. \nIn many applications the structure matrix $B$ depends linearly on $y$: \nif there is a family of real numbers $\\bigl(b_{ij}^k\\bigr)_{1\\le i,j,k\\le d}$ such that\n\\begin{align}\n\\label{Lie-Poisson.B}\nB_{ij}(y)=\\sum_{k=1}^db_{ji}^ky_k\n\\end{align}\nfor all $y\\in\\mathbb{R}^d$ and $i,j=1,\\ldots,d$, then the system~\\eqref{prob} is called a stochastic \\emph{Lie--Poisson system}. \nExamples are provided below in Section~\\ref{sec:examples}.\nA stochastic \\emph{Hamiltonian} system is obtained if $d$ is even and $B(y)=J^{-1}$ for all $y\\in\\mathbb{R}^d$, \nwhere \n$$J=\\begin{pmatrix} 0 & Id \\\\ -Id & 0\\end{pmatrix}.$$\nIf $ \\widehat{H}_k = 0 $ for all $k=1,\\ldots,m$, then the SDE \\eqref{prob} reduces to a classical deterministic (Lie--)Poisson or Hamiltonian system; cf.~\\cite{HLW02}.\n\nProperties and numerical approximations of stochastic Hamiltonian systems and of deterministic Poisson systems \nhave been extensively studied in the literature, see the references in the introduction. \nThe results presented in this work are generalisations to the above stochastic Poisson case, with a special focus on\nstochastic Lie--Poisson systems.\n\nUnder the previous regularity assumptions, the drift coefficient $y\\mapsto B(y)\\nabla H(y)$ is of class $\\mathcal{C}^1$, and, for all $k=1,\\ldots,m$, \nthe diffusion coefficient $y\\mapsto B(y)\\nabla \\widehat{H}_k(y)$ is of class $\\mathcal{C}^2$. \nAs a consequence, the stochastic differential equation~\\eqref{prob} \nis locally well-posed: for any deterministic initial condition $y_0\\in\\mathbb{R}^d$, there exists a random time $\\tau$, which is almost surely positive, such that~\\eqref{prob} admits a unique solution $t\\in[0,\\tau)\\mapsto y(t)$ with $y(0)=y_0$. Below we will present a criterion to ensure global well-posedness ($\\tau=\\infty$ almost surely for any initial condition $y_0$). This criterion is applied to study the examples presented below.\n\n\n\\subsection{Properties of stochastic Poisson systems}\n\nDeterministic and stochastic Poisson systems have several geometric properties which we discuss in this section.\nLet $\\mathcal{H} \\colon\\mathbb{R}^d\\to\\mathbb{R}$ be a mapping of class $\\mathcal{C}^2$. The evolution of \n$\\mathcal{H}(y)$ along a solution $y(t)$ of the stochastic Poisson system~\\eqref{prob} is described by \n\\begin{align}\n\\label{dH.Poisson.bracket}\n\\,\\mathrm{d}\\mathcal{H}(y(t))=\\{\\mathcal{H},H\\}(y(t))\\,\\mathrm{d} t+\\sum_{k=1}^m \\{\\mathcal{H},\\widehat H_k\\}(y(t))\\circ\\,\\,\\mathrm{d} W_k(t),\n\\end{align}\nwhere the Poisson bracket $\\{\\cdot,\\cdot\\}$ associated with the structure matrix $B$ is defined by\n\\begin{align}\n\\label{Poisson.bracket}\n\\{F,G\\}(y)=\\displaystyle\\sum_{i,j=1}^d\\frac{\\partial F(y)}{\\partial y_i}B_{ij}(y)\\frac{\\partial G(y)}{\\partial y_j}=\\nabla F(y)^T B(y)\\nabla G(y).\n\\end{align}\nThe identity~\\eqref{dH.Poisson.bracket} is proved using the chain rule for solutions of SDEs written in the Stratonovich formulation. The fact that the same structure matrix $B$ appears in both the deterministic and stochastic parts of the system~\\eqref{prob} is important to express~\\eqref{dH.Poisson.bracket} using the Poisson bracket defined by~\\eqref{Poisson.bracket}, which depends only on $B$ but not on the Hamiltonian functions $H,\\widehat H_1,\\ldots,\\widehat H_m$. This assumption on the system~\\eqref{prob} is the key to study the geometric properties of such a system and its numerical discretisation, such as the preservation of Casimir functions or the Poisson map property. Most of the properties stated below would not hold if different structure matrices were considering \nin the stochastic terms. If $\\{\\mathcal{H},H\\}=0$ and if the system is deterministic (i.e. if $ \\widehat{H}_k = 0 $ for all $k=1,\\ldots,m$), then\nthe equality~\\eqref{dH.Poisson.bracket} implies that $t\\mapsto\\mathcal{H}(y(t))$ is constant, i.e. that\n$\\mathcal{H}$ is preserved by the flow of the deterministic Poisson system. Since every smooth Hamiltonian has the property that\n$\\{H,H\\}=0$ this means, in particular, that the flow of a deterministic Poisson systems $\\dot{y}=B(y)\\nabla H(y)$ preserves the Hamiltonian $H$ (see for instance~\\cite[Sect. IV.1 and VII.2]{HLW02}).\nIn the stochastic case, however, the Hamiltonian is in general not preserved. Precisely, Equation~\\eqref{dH.Poisson.bracket} yields the following sufficient condition\n\\[\n\\{\\mathcal{H},H\\}=\\{\\mathcal{H},\\widehat H_1\\}=\\ldots=\\{\\mathcal{H},\\widehat H_m\\}=0\n\\]\nto obtain $\\,\\mathrm{d} \\mathcal{H}(y(t))=0$ and hence preservation of $\\mathcal{H}$ by the flow of the stochastic Poisson system~\\eqref{prob}.\n\nIn addition, deterministic and stochastic Poisson systems may have conserved quantities called Casimir functions.\n\\begin{definition}\nA function $C\\colon\\mathbb{R}^d\\to\\mathbb{R}$ of class $\\mathcal{C}^2$ is called a \\emph{Casimir} function \nof the stochastic Poisson system~\\eqref{prob} if for all $y\\in\\mathbb{R}^d$ one has\n$$\n\\nabla C(y)^TB(y)=0.\n$$\n\\end{definition}\nObserve that the definition of a Casimir function for stochastic and deterministic Poisson systems only depends on the structure matrix $B$, but not on the Hamiltonian functions $H,\\widehat{H}_1,\\ldots,\\widehat{H}_m$.\nA Casimir function $C$ satisfies\n\\[\n\\{C,H\\}=\\{C,\\widehat H_1\\}=\\ldots=\\{C,\\widehat H_m\\}=0,\n\\]\nsee the definition of the Poisson bracket in equation~\\eqref{Poisson.bracket}. As a consequence, owing to~\\eqref{dH.Poisson.bracket}, any Casimir function $C$ is preserved by the flow of the stochastic Poisson system~\\eqref{prob}, i.e. $C(y(t))=C(y_0)$ for all $t\\in[0,\\tau]$, independently of the choice of the Hamiltonian functions $H,\\widehat{H}_1,\\ldots,\\widehat{H}_m$ (since the same structure matrix $B$ appears in both the deterministic and stochastic parts of~\\eqref{prob} \nin order to have preservation of Casimir functions). The preservation of Casimir functions is a desirable feature for a numerical method when applied to the problem~\\eqref{prob}.\n\n\n\n\n\n\nA criterion to ensure global well-posedness of the dynamics can be stated based on the preservation of Casimir functions by solutions of stochastic Poisson systems: it suffices to assume the existence of a Casimir function with compact level sets.\n\\begin{proposition}\\label{propo:global}\nAssume that the stochastic Poisson system~\\eqref{prob} admits a Casimir function $C$ such that \nfor all $c\\in\\mathbb R$ the level sets $\\{y\\in\\mathbb{R}^d\\,\\colon\\, C(y)=c\\}$ are compact. \nThen for any initial condition $y_0\\in\\mathbb{R}^d$ the SDE~\\eqref{prob} admits a unique global solution $\\bigl(y(t)\\bigr)_{t\\ge 0}$, with $y(0)=y_0$, \nsuch that almost surely one has, for all $t\\ge0$, $C(y(t))=C(y_0)$ and \n\\[\n\\|y(t)\\|\\le R(y_0)=\\max_{y\\in\\mathbb R^d, C(y)=C(y_0)}\\|y\\|.\n\\]\n\\end{proposition}\n\n\\begin{proof}\nThe proof of Proposition~\\ref{propo:global} follows from a straightforward truncation argument: \nlet $R=R(y_0)+1$, and introduce mappings $H^R$ of class $\\mathcal{C}^2$ and $\\widehat H_1^R,\\ldots,\\widehat H_m^R:\\mathbb{R}^d\\to\\mathbb{R}$, of class $\\mathcal{C}^3$, with compact support included in the ball $\\{y\\in\\mathbb{R}^d\\,\\colon\\, \\|y\\|\\le R\\}$, and such that $H^R(y)=H(y)$, $\\widehat H_k^R(y)=\\widehat H_k(y)$ for all $y$ with $\\|y\\|\\le R(y_0)$ and $k=1,\\ldots,m$. Set $f^R(y)=B(y)\\nabla H^R(y)$ and $\\hat{f}_k^R(y)=B(y)\\widehat{H}_k^R(y)$ for all $y\\in\\mathbb{R}^d$ and $k=1,\\ldots,m$. Then $f^R$ is globally Lipschitz continuous and, for all $k=1,\\ldots,m$, $\\hat{f}_k^R$ is of class $\\mathcal{C}^2$, bounded and with bounded derivatives. By the standard well-posedness result for SDEs with globally Lipschitz continuous nonlinearities (when written in It\\^o form), the SDE\n\\[\n\\,\\mathrm{d} y^R(t)=f^R(y^R(t))\\,\\,\\mathrm{d} t+\\sum_{k=1}^m\\hat{f}_k^R(y^R(t))\\circ\\,\\,\\mathrm{d} W_k(t)\n\\]\nadmits a unique global solution $\\bigl(y^R(t)\\bigr)_{t\\ge 0}$ with $y^R(0)=y_0$. Due to the discussion above, this solution preserves the Casimir function $C$: $C(y^R(t))=C(y^R(0))=C(y_0)$ for all $t\\ge 0$. Since the level sets of the Casimir function $C$ are assumed to be compact, by the definition of $R(y_0)$, one has $\\|y^R(t)\\|\\le R(y_0)0$. The It\\^o interpretation of the noise is not consistent with this preservation property, whereas the Stratonovich one is, due to the chain rule. As a consequence, the Stratonovich interpretation is the natural candidate for the diffusion approximation limit. Checking rigorously that indeed $y^\\epsilon(t)\\to y(t)$ in distribution requires additional arguments which are omitted in this work.\n\n\\begin{remark}\nLet $(t,y,\\xi_1,\\ldots,\\xi_m)\\mapsto \\varphi^\\epsilon(t,y,\\xi_1,\\ldots,\\xi_m)$ define the flow map associated with~\\eqref{prob_eps}. Then for all $t\\ge 1$, $\\epsilon\\in(0,1)$ and all $\\xi_1,\\ldots,\\xi_m\\in\\mathbb{R}$, the mapping\n\\[\ny\\in \\mathbb{R}^d\\mapsto \\varphi^\\epsilon(t,y,\\xi_1,\\ldots,\\xi_m)\n\\]\nis a Poisson map in the sense of Definition~\\ref{def:Pmap}. This may be proved by modifications of the proof of Theorem~\\ref{th:flowP}, using the chain rule. The details are left to the reader.\n\\end{remark}\n\nThe multiscale system~\\eqref{prob_eps} has components evolving at different time scales: the component $y^\\epsilon$ evolves at a time scale of order ${\\rm O}(1)$, whereas the Ornstein--Uhlenbeck processes $\\xi_1^\\epsilon,\\ldots,\\xi_m^\\epsilon$ evolve at a time scale of order ${\\rm O}(\\epsilon^{-2})$. The definition of effective integrators for the multiscale system~\\eqref{prob_eps}, which avoid prohibitive time step size restrictions of the type $h={\\rm O}(\\epsilon^2)$, and which lead to consistent discretisation of $y(t)$ when $\\epsilon\\to 0$, is a crucial and challenging problem. This question is briefly studied in Section~\\ref{APsplit} below: we define so-called asymptotic preserving schemes (in the spirit of~\\cite{BRR}), \nemploying the preservation of the geometric structure satisfied by the stochastic Poisson integrators introduced in the next section.\n\n\n\n\n\n\n\\section{Stochastic Poisson integrators}\\label{sec:integrators}\n\nIn Section~\\ref{sec:poisson}, we have proved that the flow of a stochastic Poisson system of the type~\\eqref{prob} satisfies two key properties: it is a Poisson map (see Theorem~\\ref{th:flowP}) and it preserves Casimir functions which are associated with the structure matrix $B$. Having the methodology of geometric numerical integration in mind, this motivates us to introduce the concept of a stochastic Poisson integrator for the stochastic Poisson system~\\eqref{prob}, see Definition~\\ref{defPI}. We then present and analyse a general strategy to derive \nefficient stochastic Poisson integrators, based on a splitting technique, which can be implemented easily for some stochastic Lie--Poisson systems. \nWe then proceed with a convergence analysis of the proposed splitting integrators: Theorem~\\ref{thm-general} states that, under appropriate conditions, the scheme has in general strong and weak convergence rates equal to $1\/2$ and $1$, respectively. First, the analysis is performed for an auxiliary problem~\\eqref{auxSDE} with globally Lipschitz continuous nonlinearities, see Lemma~\\ref{lemm-aux}. Second, if the system admits a Casimir function with compact level sets, the auxiliary convergence result is applied to get strong and weak error estimates for the SDE~\\eqref{prob}. Finally, we show that the proposed stochastic Poisson integrators based on a splitting technique satisfy an asymptotic preserving property when considering the multiscale SDE~\\eqref{prob_eps} in the diffusion approximation regime.\n\n\\subsection{Definition and splitting integrators for stochastic (Lie--)Poisson systems}\\label{ssec:LP}\n\nLet us recall that symplectic, respectively Poisson, integrators preserve the key features of deterministic and stochastic Hamiltonian systems, respectively deterministic Poisson systems. Such geometric numerical integrators offer various benefits over \nclassical time integrators in the deterministic setting, see for instance \\cite{HLW02,rl,bcGNI15}. \nWe shall now state the definition and study the properties of stochastic Poisson integrators for stochastic Poisson systems~\\eqref{prob}. On the one hand, this extends the definition and analysis of deterministic Poisson integrators (see~\\cite[Th. 3.1]{hong2020structurepreserving} for another approach). On the other hand, this extends the definition and analysis of stochastic symplectic integrators for stochastic Hamiltonian systems.\n\n\nWe first consider general stochastic Poisson integrators, and then focus the discussion on a class of splitting integrators.\n\n\\subsubsection{Stochastic Poisson integrators}\\label{sssec:PI}\nThe following notation is used below. The time step size is denoted by $h>0$. \nA numerical scheme is defined as follows: for all $n\\ge 1$,\n\\begin{equation}\\label{eq:integrator}\ny^{[n]}=\\Phi_h(y^{[n-1]},\\Delta_n W_1,\\ldots,\\Delta_n W_m),\n\\end{equation}\nwith Wiener increments $\\Delta_nW_k=W_k(nh)-W_k((n-1)h)$, $k=1,\\ldots,m$. The Wiener increments are independent centered real-valued Gaussian random variables with variance $h$. The mapping $\\Phi_h$ is referred to as the integrator.\n\n\\begin{definition}\\label{defPI}\nA numerical scheme~\\eqref{eq:integrator} for the stochastic Poisson system~\\eqref{prob} is called \na \\emph{stochastic Poisson integrator} if\n\\begin{itemize}\n\\item for all $h>0$ and all $\\Delta w_1,\\ldots,\\Delta w_m\\in \\mathbb{R}$, \nthe mapping $$y\\mapsto \\Phi_h(y,\\Delta w_1,\\ldots,\\Delta w_m)$$ is a Poisson map (in the sense of Definition~\\ref{def:Pmap}),\n\\item if $C$ is a Casimir of the stochastic Poisson system~\\eqref{prob}, then $\\Phi_h$ preserves $C$, precisely\n\\[\nC(\\Phi_h(y,\\Delta w_1,\\ldots,\\Delta w_m))=C(y)\n\\]\nfor all $y\\in\\mathbb{R}^d$, $h>0$ and $\\Delta w_1,\\ldots,\\Delta w_m\\in\\mathbb{R}$.\n\\end{itemize}\n\\end{definition}\nAs in the deterministic case, it is seen that standard integrators like the Euler--Maruyama scheme are \nnot (stochastic) Poisson integrators. In addition, it is a difficult task to construct Poisson integrators for the general Poisson systems, see \\cite[Chapter VII.4.2]{HLW02} for deterministic problems. Therefore, the design of stochastic Poisson integrators requires to exploit the special structure for each considered problem. In this article, we focus \non constructing and analyzing stochastic Poisson integrators for stochastic Lie--Poisson systems. More precisely, we propose \nexplicit Poisson integrators for a large class of stochastic \nLie--Poisson systems using a splitting strategy. In Section~\\ref{sect-numexp}, we will exemplify this strategy for three models introduced in Section~\\ref{sec:poisson}: \nthe stochastic Maxwell--Bloch equations (Example~\\ref{expl-MB} and Subsection~\\ref{ssec:PMB}), \nthe stochastic free rigid body equations~\\eqref{srb} (Example~\\ref{expl-SRB} and Subsection~\\ref{ssec:PRB}), \nas well as the stochastic sine--Euler equations (Example~\\ref{expl-SE} and Subsection~\\ref{ssec:PSE}). \n\n\\subsubsection{Splitting integrators for stochastic Poisson systems}\\label{sssec:SP}\n\nWe first propose an abstract splitting integrator for general stochastic Poisson systems~\\eqref{prob}. \nWe then focus on stochastic Lie--Poisson systems~\\eqref{slp} and propose implementable stochastic Poisson integrators for this class of SDEs, which includes \nthe three examples mentioned above.\n\n\nThe key observation made in \\cite[p.3044]{MR1246065} is that a wide class of deterministic Lie--Poisson systems can be split into subsystems which are all linear. This was used in \\cite{MR1246065}\nfor the construction of very efficient geometric integrators for deterministic Lie--Poisson systems.\nInspired by~\\cite{MR1246065}, we propose and analyse efficient explicit Poisson integrators for stochastic Lie--Poisson systems. On an abstract level, our splitting approach is not restricted to Lie--Poisson systems and could also be applied to general stochastic Poisson systems~\\eqref{prob}.\n\n\n\n\n\nLet us consider a stochastic Poisson system of the type~\\eqref{prob}, and assume that the Hamiltonian $H$ can be split as follows:\n\\[\nH=\\sum_{k=1}^{p}H_k.\n\\]\nfor some $p\\ge 1$, where the Hamiltonian functions $H_1,\\ldots,H_p$ have the same regularity as $H$.\n\nTo define the abstract splitting schemes for~\\eqref{prob}, it is convenient to define the flows associated to the subsystems:\n\\begin{itemize}\n\\item for each $k=1,\\ldots,p$, let $(t,y)\\in\\mathbb{R}^+\\times\\mathbb{R}^d\\mapsto \\varphi_k(t,y)$ be the flow associated with the ordinary differential equation $\\dot{y}_k=B(y_k)\\nabla H_k(y_k)$;\n\\item for each $k=1,\\ldots,m$, let $(t,y)\\in\\mathbb{R}\\times\\mathbb{R}^d\\mapsto \\widehat{\\varphi}_k(t,y)$ be the flow associated with the ordinary differential equation $\\dot{y}_k=B(y_k)\\nabla \\widehat H_k(y_k)$.\n\\end{itemize}\nNote that it is sufficient to consider $\\varphi_1(t,\\cdot),\\ldots,\\varphi_p(t,\\cdot)$ for $t\\ge 0$, however the mappings $\\widehat{\\varphi}_1(t,\\cdot),\\ldots,\\widehat{\\varphi}_k(t,\\cdot)$ need to be considered for $t\\in\\mathbb{R}$.\n\nBelow, we shall also use the notation $\\exp(hY_{H_k})=\\varphi_k(h,\\cdot)$ and \n$\\exp(hY_{\\widehat H_k})=\\widehat \\varphi_k(h,\\cdot)$, where $Y_{H_k}=B\\nabla H_k$, resp. $Y_{\\widehat H_k}=B\\nabla\\widehat H_k$, to denote the vector fields of the corresponding differential equations. \nFor the definition of the splitting integrators below, it is essential to note \nthat the exact solution of the Stratonovich stochastic differential equation \n$\\,\\mathrm{d} y_k=B(y_k)\\nabla \\widehat H_k(y_k)\\circ \\,\\mathrm{d} W_k(t)$ is given by \n$y_k(t)=\\widehat \\varphi_k(W_k(t),y_k(0))$.\n\nAs explained above, closed-form expressions for the flows $\\varphi_k$ and $\\widehat\\varphi_k$ are unknown in general but can be obtained for a wide class of stochastic Lie--Poisson systems\n\\begin{equation}\\label{slp}\n\\left\\lbrace\n\\begin{aligned}\n&\\,\\mathrm{d} y(t)=B(y(t))\\nabla H(y(t))\\,\\,\\mathrm{d} t+\nB(y(t))\\sum_{k=1}^m\\nabla \\widehat H_k(y(t))\\circ\\,\\,\\mathrm{d} W_k(t),\\\\\n&B_{ij}(y)=\\sum_{k=1}^db_{ji}^ky_k\\quad\\text{for}\\quad i,j=1,\\ldots,d, \n\\end{aligned}\n\\right.\n\\end{equation}\nwhere the structure matrix $B(y)$ depends linearly on $y$. For the examples of stochastic Lie--Poisson systems introduced in Section~\\ref{sec:examples}, \nbelow we design explicit splitting schemes which can be easily implemented by a splitting strategy. In the sequel, we analyse the geometric and convergence properties of splitting integrators in an abstract framework, where it is not assumed that the flows $\\varphi_k$ and $\\hat{\\varphi}_k$ can be computed exactly. In particular, the assumption that the structure matrix $B$ depends linearly on $y$ is not required in the analysis. Note also that expressions of the flows may also be known for some stochastic Poisson systems which are not Lie--Poisson problems, in which case the abstract analysis would also be applicable.\n\n\n\n\n\nWe are now in position to define splitting integrators for the stochastic Poisson system~\\eqref{prob}, \nwhich will be exemplified in the case of stochastic Lie--Poisson systems~\\eqref{slp}. This general splitting integrator is given by\n\\begin{align}\\label{slpI}\n\\Phi_h(\\cdot)&=\\Phi_h(\\cdot,\\Delta W_1,\\ldots,\\Delta W_m)=\\exp(hY_{H_p})\\circ\\exp(hY_{H_{p-1}})\\circ\\ldots\\circ\\exp(hY_{H_1}) \\nonumber\\\\\n&\\circ\\exp(\\Delta W_mY_{\\widehat H_m})\\circ\\exp(\\Delta W_{m-1}Y_{\\widehat H_{m-1}})\n\\circ\\ldots\\circ\\exp(\\Delta W_1Y_{\\widehat H_1}).\n\\end{align}\n\nIt is immediate to check the following fundamental result.\n\\begin{proposition}\\label{propo:sPi}\nThe splitting integrator~\\eqref{slpI} is a stochastic Poisson integrator, in the sense of Definition~\\ref{defPI}, \nfor the stochastic Poisson system~\\eqref{prob}.\n\\end{proposition}\n\\begin{proof}\nObserve that for any $h>0$ and any real numbers $\\Delta w_1,\\ldots,\\Delta w_m$, the mapping $\\Phi_h(\\cdot,\\Delta w_1,\\ldots,\\Delta w_m)$ is a composition of flow maps $\\varphi_k(h,\\cdot)$, $k=1,\\ldots,p$ and $\\widehat\\varphi_k(\\Delta w_k,\\cdot)$, $k=1,\\ldots,m$.\nOwing to Theorem~\\ref{th:flowP}, all of these flow maps are Poisson maps (since they are flow maps of either deterministic or stochastic Poisson systems).\n\nIn addition, if $C$ is a Casimir function of the stochastic Poisson system~\\eqref{prob}, then $C$ is preserved by each of the flow maps $\\varphi_k(h,\\cdot)$, $k=1,\\ldots,p$ and $\\widehat\\varphi_k(\\Delta w_k,\\cdot)$, $k=1,\\ldots,m$. Indeed, recall that the definition of a Casimir only depends on the structure matrix $B$, and not on the Hamiltonian functions, and all the associated vectors fields are of the type $Y_{H_k}=B\\nabla H_k$ and $Y_{\\widehat H_k}=B\\nabla\\widehat H_k$: the associated flow maps thus preserve $C$.\nAs a consequence, the general splitting integrator $\\Phi_h(\\cdot,\\Delta w_1,\\ldots,\\Delta w_m)$ also preserves the Casimir functions $C$ of the stochastic Poisson system~\\eqref{prob}.\nThis concludes the proof that the splitting scheme~\\eqref{slpI} is a stochastic Poisson integrator.\n\\end{proof}\n\n\n\n\nBefore proceeding to the convergence analysis for the splitting integrators~\\eqref{slpI}, \nit is worth exploiting the fact that they are stochastic Poisson integrators \nto state that the numerical solution remains bounded if the considered stochastic Poisson system~\\eqref{prob} admits a Casimir function $C$ with compact level sets. We refer to Proposition~\\ref{propo:global} for the statement of a similar result for the solution of the stochastic Poisson system~\\eqref{prob}, in particular the assumption on compact level sets.\n\n\\begin{proposition}\\label{propo:numerik}\nAssume that the stochastic Poisson system~\\eqref{prob} admits a Casimir function $C$ which has compact level sets. Consider the stochastic Poisson integrator $y^{[n+1]}=\\Phi_h(y^{[n]})$ \ngiven by \\eqref{slpI}. Then, for any initial condition $y^{[0]}=y_0\\in\\mathbb R^d$, for all $t\\geq0$, \nalmost surely one has the following bound for the numerical solution\n\\[\n\\underset{h>0}\\sup~\\underset{n\\ge 0}\\sup~\\|y^{[n]}\\|\\le R(y^{[0]})=\\max_{y\\in\\mathbb R^d, C(y)=C(y^{[0]})}\\|y\\|.\n\\]\n\\end{proposition}\n\\begin{proof}\nThe splitting scheme~\\eqref{slpI} is a stochastic Poisson integrator (owing to Proposition~\\ref{propo:sPi}), thus it preserves the Casimir function $C$: therefore for all $n\\ge 1$,\n\\[\nC(y^{[n]})=C(y^{[n-1]})=\\ldots=C(y^{[0]}).\n\\]\nNote that $R(y^{[0]})<\\infty$, since by assumption the Casimir function $C$ has compact level sets. Therefore one obtains\n\\[\n\\|y^{[n]}\\|\\le R(y^{[0]})\n\\]\nfor all $n\\ge 0$ by the definition of $R(y^{[0]})$. This concludes the proof.\n\\end{proof}\n\n\n\\begin{remark}\\label{rem-xchange}\nThe stochastic Poisson integrator~\\eqref{slpI} employs a Lie--Trotter splitting strategy. \nChanging the orders of integration of the deterministic and stochastic parts yields the following alternative to~\\eqref{slpI}\n\\begin{align*}\n\\Phi_h(\\cdot)&=\\Phi_h(\\cdot,\\Delta W_1,\\ldots,\\Delta W_m)\\\\\n=&\\exp(\\Delta W_mY_{\\widehat H_m})\\circ\\exp(\\Delta W_{m-1}Y_{\\widehat H_{m-1}})\\circ\\ldots\\circ\\exp(\\Delta W_1Y_{\\widehat H_1})\\\\\n&\\circ\\exp(hY_{H_p})\\circ\\exp(hY_{H_{p-1}})\\circ\\ldots\\circ\\exp(hY_{H_1}).\n\\end{align*}\nThis alternative scheme is also a stochastic Poisson integrator, which satisfies Propositions~\\ref{propo:sPi} and~\\ref{propo:numerik}. The theoretical analysis of that scheme and associated numerical experiments are not reported in the present article.\n\\end{remark}\n\n\\begin{remark}\\label{rem:order2}\nA numerical method of weak order $2$ can be designed using the strategy developed in~\\cite{MR3570281}. The integrator is a combination of three mappings and depends on an additional random variable $\\gamma_n$, uniformly distributed in $\\{-1,1\\}$:\n\\begin{equation}\\label{eq:order2}\ny^{[n]}=\\Phi_{h,\\gamma_n}(y^{[n-1]})=\\Phi_{h\/2}^{det,S}\\circ \\Phi_{h,\\gamma_n}^{sto}(\\cdot,\\Delta_n W_1,\\ldots,\\Delta_n W_m)\\circ \\Phi_{h\/2}^{det,S}(y^{[n-1]}),\n\\end{equation}\nwhere\n\\[\n\\Phi_{h\/2}^{det,S}=\\exp(\\frac{h}{4}Y_{H_{1}})\\circ\\ldots\\circ\\exp(\\frac{h}{4}Y_{H_{p-1}})\\circ\\exp(\\frac{h}{2}Y_{H_p})\\circ\\exp(\\frac{h}{4}Y_{H_{p-1}})\\circ\\ldots\\circ\\exp(\\frac{h}{4}Y_{H_1})\n\\]\nis obtained using a Strang splitting integrator with time step size $h\/2$ for the deterministic part of the equation, and\n\\[\n\\Phi_{h,\\gamma_n}^{sto}(\\cdot,\\Delta_n W_1,\\ldots,\\Delta_n W_m)=\\begin{cases}\n\\exp(\\Delta W_mY_{\\widehat H_m})\\circ\\ldots\\circ\\exp(\\Delta W_1Y_{\\widehat H_1}),\\quad \\gamma_n=1\\\\\n\\exp(\\Delta W_1Y_{\\widehat H_1})\\circ\\ldots\\circ\\exp(\\Delta W_mY_{\\widehat H_{m}}),\\quad \\gamma_n=-1\n\\end{cases}\n\\]\nis obtained using a Lie--Trotter splitting integrator $\\Phi_{h,\\gamma_n}^{sto}$ with time step size $h$ applied to the stochastic part of the equation, where the order of the integration depends on $\\gamma_n$.\n\nIt is straightforward to check that the numerical scheme~\\eqref{eq:order2} is a stochastic Poisson integrator, using the same arguments as in the proof of Proposition~\\ref{propo:sPi}. Numerical experiments which illustrate the behaviour of this scheme and weak convergence with order $2$ will be reported below in Section~\\ref{sect-numexp}. However, we do not give details concerning the theoretical analysis of the scheme~\\eqref{eq:order2}. \n\nWe also refer to~\\cite{MR3927434,MR2409419} for other possible constructions of higher order splitting methods for SDEs. Finally, another possible strategy to design higher order integrators would be to use modified equations, like in~\\cite{MR2970274}.\n\\end{remark}\n\n\n\n\n\n\\subsection{Convergence analysis}\\label{sec:cv}\nThe objective of this section is to prove a general strong and weak convergence result for stochastic Poisson integrators~\\eqref{slpI} defined by the splitting strategy. Note that we assume that the stochastic Poisson system~\\eqref{prob} \nadmits a Casimir function with compact level sets: as explained above, this condition ensures global well-posedness for the continuous problem, and provides almost sure bounds for the exact and numerical solutions (Propositions~\\ref{propo:global} and~\\ref{propo:numerik}). As a consequence, the general convergence result can be applied to get strong and weak convergence rates for the proposed explicit stochastic Poisson integrator~\\eqref{slpI}, when applied to the stochastic rigid body system (Example~\\ref{expl-SRB}) and to the stochastic sine--Euler system (Example~\\ref{expl-SE}), see Theorems~\\ref{thm-srb} and~\\ref{thm-se} below respectively. Note that these two SDEs do not have globally Lipschitz continuous coefficients, so for those examples standard explicit schemes such as the Euler--Maruyama method may fail to converge strongly. The fact that the proposed scheme is a stochastic Poisson integrator is essential to perform the convergence analysis.\nHowever, the general convergence result below cannot be applied to the stochastic Maxwell--Bloch system -- \nthe generalisation of the result to that example is not treated in the present work.\n\n\n\n\n\\begin{theorem}\\label{thm-general}\nAssume that the stochastic Poisson system~\\eqref{prob} admits a Casimir function with compact level sets.\n\n\n\n\\begin{itemize}\n\\item[Strong convergence] Assume that $B$ is of class $\\mathcal{C}^2$, that the mappings $H_1,\\ldots,H_p$ are of class $\\mathcal{C}^2$, and that the mappings $\\widehat{H}_1,\\ldots,\\widehat{H}_m$ are of class $\\mathcal{C}^3$. \nThen the stochastic Poisson integrator~\\eqref{slpI} has strong order of convergence equal to $1\/2$: for all $T\\in(0,\\infty)$ and all $y_0\\in\\mathbb{R}^d$, there exists a real number $c(T,y_0)\\in(0,\\infty)$ such that\n\\[\n\\underset{0\\le n\\le N}\\sup~\\left(\\mathbb E\\left[ \\norm{ y\\left(nh\\right)-y^{[n]} }^2 \\right] \\right)^{1\/2}\\le c(T,y_0)h^{\\frac12},\n\\]\nwith time step size $h=T\/N$, and $y^{[0]}=y_0=y(0)$. \n\nIf $m=1$, then the strong order of convergence is equal to $1$.\n\n\n\\item[Weak convergence] Assume that $B$ is of class $\\mathcal{C}^5$, that the mappings $H_1,\\ldots,H_p$ are of class $\\mathcal{C}^5$, and that the mappings $\\widehat{H}_1,\\ldots,\\widehat{H}_m$ are of class $\\mathcal{C}^6$. Then the stochastic Poisson integrator~\\eqref{slpI} has weak order of convergence equal to $1$: for all $T\\in(0,\\infty)$ and all $y_0\\in\\mathbb{R}^d$, and any test function $\\phi\\colon\\mathbb{R}^d\\to\\mathbb{R}$ of class $\\mathcal{C}^4$ with bounded derivatives, there exists a real number $c(T,y_0,\\phi)\\in(0,\\infty)$ such that\n\\[\n\\underset{0\\le n\\le N}\\sup~\\left|\\mathbb E\\left[\\phi\\left(y\\left(nh\\right)\\right)\\right]-\\mathbb E\\left[\\phi\\left(y^{[n]}\\right)\\right]\\right|\\leq c(T,y_0,\\phi)h.\n\\]\n\\end{itemize}\n\\end{theorem}\n\nThe convergence theorem stated above concerning the strong and weak rates of convergence of the stochastic Poisson integrator~\\eqref{slpI} applied to the stochastic Poisson system~\\eqref{prob} is an immediate consequence of the following auxiliary result, which is stated for a general SDE of the type\n\\begin{equation}\\label{auxSDE}\n\\,\\mathrm{d} z(t)=\\sum_{k=1}^{p}f_k(z(t))\\,\\,\\mathrm{d} t+\\sum_{k=1}^m\\widehat f_k(z(t))\\circ\\,\\,\\mathrm{d} W_k(t),\n\\end{equation}\nwith functions $f_k$ and $\\widehat{f}_k$ which are globally Lipschitz continuous.\n\n\\begin{lemma}\\label{lemm-aux}\nConsider the auxiliary splitting scheme\n\\begin{equation}\\label{auxscheme}\nz^{[n]}=\\varphi_p(h,\\cdot)\\circ\\ldots\\circ \\varphi_1(h,\\cdot)\\circ\\widehat\\varphi_m(\\Delta W_m^n,\\cdot)\\circ \\ldots\\circ \\widehat\\varphi_1(\\Delta W_1^n,\\cdot)(z^{[n-1]}),\n\\end{equation}\nwith $z^{[0]}=z_0=z(0)$, associated with the auxiliary SDE~\\eqref{auxSDE}, where $\\varphi_k$ is the flow associated with the ODE $\\dot{z}_k=f_k(z_k)$, $k=1,\\ldots,p$, and $\\widehat \\varphi_k$ is the flow associated with the ODE $\\dot{z}_k=\\widehat f_k(z_k)$.\n\n\n\\begin{itemize}\n\\item[Strong convergence] Assume that the mappings $f_1,\\ldots,f_p$ are of class $\\mathcal{C}^1$ with bounded derivatives, and that the mappings $\\widehat{f}_1,\\ldots,\\widehat{f}_m$ are bounded and of class $\\mathcal{C}^2$ with bounded first and second order derivatives. Then the auxiliary scheme~\\eqref{auxscheme} has strong order of convergence equal to $1\/2$: for all $T\\in(0,\\infty)$ and all $z_0\\in\\mathbb{R}^d$, there exists a real number $c(T,z_0)\\in(0,\\infty)$ such that\n\\begin{equation}\\label{eq:strongaux}\n\\underset{0\\le n\\le N}\\sup~\\left(\\mathbb E\\left[ \\norm{ z\\left(nh\\right)-z^{[n]} }^2 \\right] \\right)^{1\/2}\\le c(T,z_0)h^{\\frac12}.\n\\end{equation}\n\nIn the commutative noise case, {\\it i.e.} if $\\widehat{f}_k'(z)\\widehat{f}_\\ell(z)=\\widehat{f}_\\ell'(z)\\widehat{f}_k(z)$ for all $k,\\ell=1,\\ldots,m$, the strong order of convergence is equal to $1$.\n\n\\item[Weak convergence] Assume that the mappings $f_1,\\ldots,f_p$ are of class $\\mathcal{C}^4$ with bounded derivatives, and that the mappings $\\widehat{f}_1,\\ldots,\\widehat{f}_m$ are bounded and of class $\\mathcal{C}^5$ with bounded first and second order derivatives. Then the auxiliary scheme~\\eqref{auxscheme} has weak order of convergence equal to $1$: for all $T\\in(0,\\infty)$ and all $z_0\\in\\mathbb{R}^d$, and any test function $\\phi:\\mathbb{R}^d\\to\\mathbb{R}$ of class $\\mathcal{C}^4$, there exists a real number $c(T,z_0,\\phi)\\in(0,\\infty)$ such that\n\\begin{equation}\\label{eq:weakaux}\n\\underset{0\\le n\\le N}\\sup~\\left|\\mathbb E\\left[\\phi\\left(z\\left(nh\\right)\\right)\\right]-\\mathbb E\\left[\\phi\\left(z^{[n]}\\right)\\right]\\right|\\leq c(T,z_0,\\phi)h.\n\\end{equation}\n\\end{itemize}\n\\end{lemma}\nThe proof of Lemma~\\ref{lemm-aux} is postponed to Appendix~\\ref{app-auxlem}. Let us now check how Theorem~\\ref{thm-general} is a straightforward corollary of Lemma~\\ref{lemm-aux}. Note that if $m=1$, the commutative noise case condition is satisfied.\n\n\n\\begin{proof}[Proof of Theorem~\\ref{thm-general}]\nOwing to Propositions~\\ref{propo:global} and~\\ref{propo:numerik}, the exact and numerical solutions of the SDE~\\eqref{prob}, resp. scheme~\\eqref{slpI}, \nsatisfy the almost sure bounds\n\\[\n\\underset{t\\in[0,T]}\\sup~\\norm{y(t)}\\le R(y_0),\\quad \\underset{N\\ge 1}\\sup~\\underset{0\\le n\\le N}\\sup~\\norm{y^{[n]}}\\le R(y_0),\n\\]\nwhere $R(y_0)=\\max_{y\\in\\mathbb R^d, C(y)=C(y_0)}\\|y\\|$, and $R(y_0)<\\infty$ since $C$ has compact level sets by assumption.\n\nUsing the same construction as in the proof of Proposition~\\ref{propo:global}, one can define compactly supported functions $f_k$ and $\\widehat{f}_k$, such that $f_k(y)=B(y)\\nabla H_k(y)$ and $\\widehat{f}_k(y)=B(y)\\nabla \\widehat H_k(y)$ for all $y\\in \\mathbb{R}^d$ such that $\\|y\\|\\le R(y_0)$. \nIn addition, $f_k$ is at least of class $\\mathcal{C}^1$ and $\\widehat{f}_k$ is at least of class $\\mathcal{C}^2$.\n\nNote that with this choice, $y(t)=z(t)$ and $y^{[n]}=z^{[n]}$ for all $t\\in[0,T]$ and all $n\\in\\{0,\\ldots,N\\}$, where $\\bigl(z(t)\\bigr)_{t\\ge 0}$ is the solution of the auxiliary SDE~\\eqref{auxSDE} and $\\bigl(z^{[n]}\\bigr)_{n\\ge 0}$ is obtained by the auxiliary scheme~\\eqref{auxscheme}. It remains to apply Lemma~\\ref{lemm-aux} to conclude. Note also that it is not necessary to assume that the functions $\\phi$, $B$, $H_1,\\ldots,H_p$, $\\widehat H_1,\\ldots,\\widehat H_m$ and their derivatives are bounded. This is due to the boundedness of the exact and numerical solutions provided by the preservation of the Casimir function $C$ and the compact level sets assumption.\n\\end{proof}\n\n\\begin{remark}\\label{rem-consistent}\nIf one considers the following variant of the stochastic Poisson system~\\eqref{prob}\n\\[\n\\,\\mathrm{d} y(t)=B(y(t))\\nabla H(y(t))\\,\\,\\mathrm{d} t+\\sum_{k=1}^mB(y(t))\\nabla \\widehat H_k(y(t))\\circ\\,\\,\\mathrm{d} W(t)\n\\]\ndriven by a single Wiener process $W$ (that is $W_1=\\ldots=W_m=W$), the associated variant of the proposed stochastic Poisson \nintegrator~\\eqref{slpI} reads\n\\begin{align*}\n\\Phi_h&=\\exp(hY_{H_p})\\circ\\exp(hY_{H_{p-1}})\\circ\\ldots\\circ\\exp(hY_{H_1}) \\nonumber\\\\\n&\\circ\\exp(\\Delta WY_{\\widehat H_m})\\circ\\exp(\\Delta WY_{\\widehat H_{m-1}})\n\\circ\\ldots\\circ\\exp(\\Delta WY_{\\widehat H_1}).\n\\end{align*}\nThis scheme is not consistent when $m\\ge 2$. In the proof of the convergence result Theorem~\\ref{thm-general}, more precisely in the proof of Lemma~\\ref{lemm-aux}, the independence of the Wiener processes $W_1,\\ldots,W_m$ plays a crucial role.\n\\end{remark}\n\n\n\n\n\n\n\n\n\n\n\\subsection{Asymptotic preserving schemes in the diffusion approximation regime}\\label{APsplit}\n\n\nThe objective of this section is to use the proposed splitting stochastic Poisson integrators~\\eqref{slpI} in order to define effective numerical schemes for the discretisation of the multiscale system~\\eqref{prob_eps} described in Section~\\ref{sec:multi}. The challenge is to obtain a good behaviour of the numerical scheme when $\\epsilon\\to 0$. On the one hand, one needs to avoid time step size restrictions of the type $h={\\rm O}(\\epsilon)$ or $h={\\rm O}(\\epsilon^2)$, which would be prohibitive when $\\epsilon$ is small. On the other hand, it would be desirable to have a convergence (in distribution) of the type $y^{\\epsilon,[n]}\\underset{\\epsilon\\to 0}\\to y^{[n]}$, for all fixed $h>0$ and $n\\ge 1$, to reproduce the diffusion approximation result Proposition~\\ref{propo:multi} at the discrete time level. Indeed, if the two requirements above are satisfied, the integrator can be used to approximate both~\\eqref{prob} and~\\eqref{prob_eps}, without the need to adapt the time step size $h$ when $\\epsilon$ vanishes.\n\nThe class of numerical methods which satisfy the two requirements above is known as \\emph{asymptotic preserving} schemes. We refer to the recent work~\\cite{BRR} where asymptotic preserving schemes were introduced for a class of stochastic differential equations of the type~\\eqref{prob_eps}. Note that a standard Euler--Maruyama scheme does not satisfy the asymptotic preserving property. Recall that for this notion of asymptotic preserving schemes, the convergence is understood in the sense of convergence in distribution of random variables. Using the splitting strategy allows us to design other examples of asymptotic preserving schemes for~\\eqref{prob_eps}, such that the corresponding limit scheme (obtained when $\\epsilon\\to 0$ with fixed time step size $h>0$) is the splitting stochastic Poisson integrator~\\eqref{slpI}.\n\n\nWe propose the following integrator for the multiscale system~\\eqref{prob_eps}: for any $\\epsilon\\in(0,1)$ and any time step size $h>0$, for all $n\\ge 1$, set\n\\begin{align}\\label{APscheme}\ny^{\\epsilon,[n]}&=\\exp(hY_{H_p})\\circ\\ldots\\circ\\exp(hY_{H_1}) \\nonumber\\\\\n&\\circ\\exp\\left(\\frac{h\\xi_{m}^{\\epsilon,[n]}}{\\epsilon}Y_{\\widehat H_m}\\right)\\circ\\ldots\n\\circ\\exp\\left(\\frac{h\\xi_{1}^{\\epsilon,[n]}}{\\epsilon}Y_{\\widehat H_1}\\right)(y^{\\epsilon,[n-1]}),\n\\end{align}\nwhere, for each $k=1,\\ldots,m$, the Ornstein--Uhlenbeck process $\\xi_k^\\epsilon$ is discretised using the linear implicit Euler scheme\n\\[\n\\xi_k^{\\epsilon,[n]}=\\xi_{k}^{\\epsilon,[n-1]}-\\frac{h}{\\epsilon^2}\\xi_{k}^{\\epsilon,[n]}+\\frac{\\Delta_n W_k}{\\epsilon}=\\frac{1}{1+\\frac{h}{\\epsilon^2}}\\Bigl(\\xi_k^{\\epsilon,[n-1]}+\\frac{\\Delta_n W_k}{\\epsilon}\\Bigr).\n\\]\nNote that $C(y^{\\epsilon,[n]})=C(y^{\\epsilon,[0]})$ for all $n\\ge 0$, if $C$ is a Casimir function of the stochastic Poisson system~\\eqref{prob}. If $C$ has compact level sets, this yields the following variant of the bound of Proposition~\\ref{propo:numerik},\n\\[\n\\underset{\\epsilon\\in(0,1)}\\sup~\\underset{h>0}\\sup~\\underset{n\\ge 0}\\sup~\\|y^{[n]}\\|\\le R(y^{[0]})=\\max_{y\\in\\mathbb R^d, C(y)=C(y^{[0]})}\\|y\\|,\n\\]\nwhich is uniform over $\\epsilon$.\n\nObserve that for all $n\\ge 1$ and $h>0$, one has\n\\[\n\\frac{h\\xi_{k}^{\\epsilon,[n]}}{\\epsilon}=\\Delta_nW_k+\\epsilon\\bigl(\\xi_k^{\\epsilon,[n-1]}-\\xi_k^{\\epsilon,[n]}\\bigr)\\underset{\\epsilon\\to 0}\\to \\Delta_nW_k.\n\\]\n\nBy a recursion argument, it is then straightforward to check that\n\\[\ny^{\\epsilon,[n]}\\underset{\\epsilon\\to 0}\\to y^{[n]},\n\\]\nfor all $n\\ge 0$ and for all fixed $h>0$, where $y^{[n]}$ is given by the splitting scheme~\\eqref{slpI}. \nAs a consequence, the scheme~\\eqref{APscheme} is an asymptotic preserving scheme, in the sense of~\\cite{BRR}: the following diagram commutes\n\\[\n\\begin{CD}\ny^{\\epsilon,[N]} @>{N\\to\\infty}>> y^\\epsilon(T) \\\\\n@VV{\\epsilon\\to 0}V @VV{\\epsilon\\to 0}V\\\\\ny^{[N]} @>{\\Delta t\\to 0}>> y(T)\n\\end{CD}\n\\]\nwhen the time step size is given by $h=T\/N$. In other words:\n\\begin{itemize}\n\\item for each fixed $\\epsilon>0$, the scheme~\\eqref{APscheme} is consistent with~\\eqref{prob_eps} when $h\\to 0$,\n\\item for each fixed $h>0$, the proposed scheme~\\eqref{APscheme} converges to a limiting scheme when $\\epsilon\\to 0$, which is given here by \nthe abstract splitting scheme~~\\eqref{slpI},\n\\item the limiting scheme~\\eqref{slpI} is consistent when $h\\to 0$ with~\\eqref{prob}, which is the limit when $\\epsilon\\to 0$ of~\\eqref{prob_eps}.\n\\end{itemize}\nWe refer to the recent work~\\cite{BRR} for a general analysis of asymptotic preserving schemes for stochastic differential equations. As explained in~\\cite{BRR}, the construction of asymptotic preserving schemes for SDEs, in particular to obtain equations interpreted in the Stratonovich sense, may be subtle. Here we do not employ a predictor-corrector strategy as in~\\cite{BRR} (which is used to get the Stratonovich interpretation instead of the It\\^o one), \nsince we directly use exact flows of the appropriate subsystems in the splitting procedure: in the present paper, the Stratonovich interpretation is obtained in a natural way.\n\nThe property of being asymptotic preserving is a qualitative property of a numerical scheme. Let us now briefly discuss the behaviour of weak error estimates of the asymptotic preserving scheme~\\eqref{APscheme} when $\\epsilon$ is small. For each fixed $\\epsilon>0$, it is expected that the proposed asymptotic preserving scheme~\\eqref{APscheme} has a weak order of convergence equal to $1$ in general: for test functions $\\phi\\colon\\mathbb{R}^d\\to\\mathbb{R}$ of class $\\mathcal{C}^4$, one has\n\\[\n\\left|\\mathbb E[\\varphi(y^{\\epsilon,[N]})]-\\mathbb E[\\varphi(y^\\epsilon(T))]\\right|\\le c_\\epsilon(T,\\varphi)h,\n\\]\nwhere $h=\\frac{T}{N}$ and the real number $c_\\epsilon(T,\\varphi)$ may depend on $\\epsilon$ and diverge when $\\epsilon\\to 0$. \nIn order to have a computational cost independent of the parameter $\\epsilon$, it would be desirable to establish that the proposed scheme is \\emph{uniformly accurate}: one would need to prove error estimates of the type\n\\[\n\\underset{\\epsilon\\in(0,\\epsilon_0)}\\sup~\\big|\\mathbb E[\\varphi(y^{\\epsilon,[N]})]-\\mathbb E[\\varphi(y^\\epsilon(T))]\\big|\\le c(T,\\varphi)h^\\alpha,\n\\]\nwhich are uniform with respect to $\\epsilon\\in(0,\\epsilon_0)$ (with arbitrary $\\epsilon_0>0$), in other words $c(T,\\varphi)$ is independent of $\\epsilon$. \nObserve that a reduction of the order of convergence, namely $\\alpha<1$, may happen. \nProving the uniform accuracy property of the scheme~\\eqref{APscheme} is beyond the scope of this work. \nHowever, in the numerical experiments reported below, we investigate whether such uniform weak error estimates hold for the considered problems. \n\n\n\\begin{remark}\nIt is possible to define a variant of the asymptotic preserving scheme~\\eqref{APscheme}, using a midpoint approximation for the the Ornstein--Ulenbeck components:\n\\[\n\\xi_k^{\\epsilon,[n]}=\\xi_{k}^{\\epsilon,[n-1]}-\\frac{h}{2\\epsilon^2}\\left(\\xi_k^{\\epsilon,[n-1]}+\\xi_{k}^{\\epsilon,[n]}\\right)+\\frac{\\Delta_n W_k}{\\epsilon},\n\\]\nin which case the definition of $y^{\\epsilon,[n]}$ needs to be modified as follows:\n\\begin{align*}\ny^{\\epsilon,[n]}&=\\exp(hY_{H_p})\\circ\\exp(hY_{H_{p-1}})\\circ\\ldots\\circ\\exp(hY_{H_1}) \\nonumber\\\\\n&\\circ\\exp\\left(\\frac{h(\\xi_k^{\\epsilon,[n-1]}+\\xi_{k}^{\\epsilon,[n]})}{2\\epsilon}Y_{\\widehat H_m}\\right)\\circ\\ldots\\circ\\exp\\left(\\frac{h(\\xi_k^{\\epsilon,[n-1]}+\\xi_{k}^{\\epsilon,[n]})}{2\\epsilon}Y_{\\widehat H_1})(y^{\\epsilon,[n-1]}\\right).\n\\end{align*}\nThat scheme is also asymptotic preserving.\n\\end{remark}\n\n\n\\section{Numerical experiments}\\label{sect-numexp}\n\nIn this section, we illustrate the behaviour of the stochastic Poisson integrators which have been proposed and analysed in Section~\\ref{sec:integrators}. \nWe choose to present numerical experiments for the three examples of stochastic Lie--Poisson systems introduced in Section~\\ref{sec:poisson}. \nOn the one hand, we illustrate the qualitative properties of the proposed splitting stochastic Poisson integrators, compared with standard methods, \nby considering the temporal evolution of Casimir functions. On the other hand, we investigate and state strong and weak orders of convergence (which are consequences of Theorem~\\ref{thm-general}), \nand we illustrate the quantitative error estimates obtained above. In addition, we illustrate the asymptotic preserving property for the multiscale versions of the considered systems. Note that, in general, the theoretical convergence results cannot be \napplied to the stochastic Maxwell--Bloch system (Example~\\ref{expl-MB}), \nsince no Casimir functions with compact level sets is known for that example. \nHowever, the theoretical results can be applied to the stochastic rigid body system (Example~\\ref{expl-SRB}) and to the stochastic sine--Euler system (Example~\\ref{expl-SE}). \n\n\\subsection{Explicit stochastic Poisson integrators for stochastic Maxwell--Bloch equations}\\label{ssec:PMB} \n\nThis subsection presents explicit stochastic Poisson integrators for the stochastic Maxwell--Bloch system~\\eqref{smb} (Example~\\ref{expl-MB}). We first give a detailed construction of the splitting scheme, which gives a stochastic Poisson integrator. We then illustrate its qualitative properties (preservation of the Casimir function) and strong and weak error estimates of the proposed scheme by numerical experiments. Finally, we illustrate the asymptotic preserving property (Section~\\ref{APsplit}) for a multiscale version of the system.\n\n\n\\subsubsection{Presentation of the splitting scheme for the stochastic Maxwell--Bloch system}\n\nRecall that the stochastic Maxwell--Bloch system~\\eqref{smb} introduced in Example~\\ref{expl-MB} is of the type\n\\begin{equation*}\n\\,\\mathrm{d} y=B(y)\\left(\\nabla H(y)\\,\\,\\mathrm{d} t+\\sigma_1\\nabla \\widehat H_1(y)\\circ\\,\\,\\mathrm{d} W_1(t)+\\sigma_3\\nabla \\widehat H_3(y)\\circ\\,\\,\\mathrm{d} W_3(t) \\right).\n\\end{equation*}\n\nTo apply the strategy described in Section~\\ref{ssec:LP} and construct explicit stochastic Poisson integrators, we follow the approach from~\\cite{MR1702129} for the deterministic Maxwell--Bloch system. The Hamiltonian function $H$ is split as $H=H_1+H_3$, with $H_1(y)=\\widehat H_1(y)=\\frac12y_1^2$ and $H_3(y)=\\widehat H_3(y)=y_3$. The two associated deterministic subsystems can be solved exactly as follows. \nOn the one hand, the deterministic subsystem corresponding with the vector field $Y_{H_1}=B\\nabla H_1$ is given by\n\\begin{equation*}\n\\left\\lbrace\n\\begin{aligned}\n\\dot y_1&=0\\\\\n\\dot y_2&=y_3y_1\\\\\n\\dot y_3&=-y_2y_1.\n\\end{aligned}\n\\right.\n\\end{equation*}\nObserve that $y_1$ may be considered as a constant and thus $(y_2,y_3)$ is solution of a linear ordinary differential equation (it is the standard harmonic oscillator): the exact solution of the first subsystem is thus given by\n\\begin{equation*}\n\\exp(tY_{H_1})y(0)\n=\n\\begin{pmatrix}1 & 0 & 0\\\\ 0 & \\cos(y_1(0)t) & \\sin(y_1(0)t)\\\\ 0 & -\\sin(y_1(0)t) & \\cos(y_1(0)t)\\end{pmatrix}y(0)\n\\end{equation*}\nfor all $t\\in\\mathbb{R}$ and $y(0)\\in\\mathbb{R}^3$.\n\nOn the other hand, the deterministic subsystem corresponding with the vector field $Y_{H_3}=B\\nabla H_3$ is given by\n\\begin{equation*}\n\\left\\lbrace\n\\begin{aligned}\n\\dot y_1&=y_2\\\\\n\\dot y_2&=0\\\\\n\\dot y_3&=0.\n\\end{aligned}\n\\right.\n\\end{equation*}\nThe exact solution of the second subsystem is thus given by\n\\begin{equation*}\n\\exp(tY_{H_3})y(0)\n=\n\\begin{pmatrix}1 & t & 0\\\\ 0 & 1 & 0\\\\ 0 & 0 & 1\\end{pmatrix}y(0)\n\\end{equation*}\nfor all $t\\in\\mathbb{R}$ and $y(0)\\in\\mathbb{R}^3$.\n\nIn the case of the stochastic Maxwell--Bloch system~\\eqref{smb}, the splitting integrator~\\eqref{slpI} then reads\n\\begin{equation}\\label{smbI}\n\\Phi_h=\\exp(hY_{H_3})\\circ\\exp(hY_{H_1})\\circ\\exp(\\sigma_3\\Delta W_3Y_{\\widehat H_3})\\circ\\exp(\\sigma_1\\Delta W_1Y_{\\widehat H_1}),\n\\end{equation} \nwhere for all $y\\in\\mathbb{R}^3$ one has\n\\[\n\\exp(\\sigma_1\\Delta W_1Y_{\\widehat H_1})y\n=\n\\begin{pmatrix}1 & 0 & 0\\\\ 0 & \\cos(y_1\\sigma_1\\Delta W_1) & \\sin(y_1\\sigma_1\\Delta W_1)\\\\ 0 & -\\sin(y_1\\sigma_1\\Delta W_1) & \\cos(y_1\\sigma_1\\Delta W_1)\\end{pmatrix}y\n\\]\nand\n\\[\n\\exp(\\sigma_3\\Delta W_3Y_{\\widehat H_3})y=\\begin{pmatrix}1 & \\sigma_3\\Delta W_3 & 0\\\\ 0 & 1 & 0\\\\ 0 & 0 & 1\\end{pmatrix}y.\n\\]\nOwing to Proposition~\\ref{propo:sPi}, the explicit splitting scheme~\\eqref{smbI} is a stochastic Poisson integrator.\n\n\n\n\n\\subsubsection{Preservation of the Casimir of the stochastic Maxwell--Bloch system}\n\nLet us first illustrate the qualitative behaviour of the stochastic Poisson integrator~\\eqref{smbI} introduced above. Figure~\\ref{fig:CasMaxBloc} illustrates the preservation of the Casimir $C(y)=\\frac{1}{2}(y_2^2+y_3^2)$ by the stochastic Poisson integrator~\\eqref{smbI}. In this numerical experiment, the initial value is $y(0)=(1,2,3)$ and the final time is $T=1$. We consider the two cases where the system~\\eqref{smb} is driven by a single Wiener process: $(\\sigma_1,\\sigma_3)=(1,0)$ and $(\\sigma_1,\\sigma_3)=(0,1)$. Similar results would be obtained if the system was driven by two independent Wiener processes ($\\sigma_1=\\sigma_3=1$ for instance). In Figure~\\ref{fig:CasMaxBloc}, we compare the numerical solutions given by the classical Euler--Maruyama scheme (applied to the It\\^o formulation of the system), the stochastic midpoint scheme from~\\cite{Milstein2002a}, and the explicit splitting scheme~\\eqref{smbI}. The time step size is equal to $h=0.01$. To implement the implicit stochastic midpoint scheme, a truncation of the noise with threshold $A=\\sqrt{4|\\log(h)|}$ is applied (see~\\cite{Milstein2002a} for details). To be able to compare the results for different schemes, we use this truncation in all experiments where the implicit stochastic midpoint scheme is involved. As shown in Proposition~\\ref{propo:sPi}, we observe that the Casimir function $C(y)=\\frac12(y_2^2+y_3^2)$ is preserved when using the stochastic Poisson integrator~\\eqref{smbI}. The Casimir function is also preserved when using the stochastic midpoint scheme: indeed, this integrator is known to preserve quadratic invariants, see~\\cite{MR3210739}.\n\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{newCasMaxBloc}\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{rev-casMaxBloc}\n\\caption{Stochastic Maxwell--Bloch system: preservation of the Casimir by\nthe Euler--Maruyama scheme ($\\times$), the midpoint scheme ($\\circ$), \nand the explicit stochastic Poisson integrator ($\\diamond$). Left: $(\\sigma_1,\\sigma_3)=(1,0)$. Right: $(\\sigma_1,\\sigma_3)=(0,1)$.}\n\\label{fig:CasMaxBloc}\n\\end{figure}\n\n\n\n\\subsubsection{Strong and weak convergence of the explicit stochastic Poisson integrator for the stochastic Maxwell--Bloch system}\n\nThe preservation of the Casimir $C$ is not sufficient to ensure almost sure boundedness of the numerical solution, which is instrumental to deduce Theorem~\\ref{thm-general} from Lemma~\\ref{lemm-aux}. As a consequence, we are not able to state a convergence result for the stochastic Poisson integrator~\\eqref{smbI} in general. However, when $\\sigma_3=0$, it is possible to show the following result.\n\\begin{proposition}\\label{thm-smb}\nConsider a numerical discretisation of the stochastic Maxwell--Bloch system~\\eqref{smb} by the stochastic Poisson integrator~\\eqref{smbI}. Assume that $\\sigma_3=0$. Then, the strong order of convergence and the weak order of convergence of this scheme are equal to $1$.\n\\end{proposition}\n\n\\begin{proof}\nLet us prove that, when $\\sigma_3=0$, the following bounds are satisfied almost surely:\n\\begin{equation}\\label{boundsMB}\n\\left\\lbrace\n\\begin{aligned}\n\\|y^{[n]}\\|&\\le (1+h)^n\\|y^{[0]}\\|\\\\\n\\|y(t)\\|&\\le e^{t}\\|y(0)\\|\n\\end{aligned}\n\\right.\n\\end{equation}\nfor all $n\\ge 0$, $h\\in(0,h_0)$ and $t\\ge 0$.\n\nThe proof of the bounds above is straightforward. On the one hand, for all $y\\in\\mathbb{R}^3$, all $h>0$ and $t\\in\\mathbb{R}$, one has\n\\[\n\\|e^{tY_{H_1}}y\\|=\\|e^{tY_{\\widehat H_1}}y\\|=\\|y\\|\n\\]\nand\n\\begin{align*}\n\\|e^{hY_{H_3}}y\\|^2&=(y_1+hy_2)^2+y_2^2+y_3^2=\\|y\\|^2+2hy_1y_2+h^2y_2^2\\\\\n&\\le (1+h)^2\\|y\\|^2.\n\\end{align*}\nTherefore\n\\[\n\\|y^{[n]}\\|\\le \\|e^{hY_{H_3}}\\circ e^{hY_{H_1}}\\circ e^{\\sigma_1\\Delta_n W_1 Y_{\\widehat H_1}}(y^{[n-1]})\n\\|\n\\le (1+h)\\|y^{[n-1]}\\|\n\\]\nthus $\\|y^{[n]}\\|\\le (1+h)^n\\|y^{[0]}\\|$.\n\nOn the other hand, let $\\mathcal{H}(y)=\\|y\\|^2$. Then one has $\\{\\mathcal{H},H_1\\}=\\{\\mathcal{H},\\widehat H_1\\}=0$ and $\\{\\mathcal{H},H_3\\}(y)=2y_1y_2\\le \\mathcal{H}(y)$ for all $y\\in\\mathbb{R}^3$ (recall that the Poisson bracket is defined by~\\eqref{Poisson.bracket}). Using~\\eqref{dH.Poisson.bracket}, one thus obtains $\\,\\mathrm{d} \\mathcal{H}(y(t))\\le \\mathcal{H}(y(t))$ for all $t\\ge 0$ and the bound for the exact solution follows from Gronwall's lemma.\n\nLet $T\\in(0,\\infty)$, one can then repeat the arguments used in the proof of Theorem~\\ref{thm-general} as a corollary of Lemma~\\ref{lemm-aux}, using the almost sure bounds\n\\[\n\\underset{t\\in[0,T]}\\sup~\\norm{y(t)}\\le R(y_0,T),\\quad \\underset{N\\ge 1}\\sup~\\underset{0\\le n\\le N}\\sup~\\norm{y^{[n]}}\\le R(y_0,T)\n\\]\nwith $R(y_0,T)=e^{T}\\|y_0\\|$. The details are omitted. Note that the strong order of convergence is equal to $1$ since the system is driven by a single Wiener process ($m=1$, the commutative noise case condition is satisfied). This concludes the proof of Proposition~\\ref{thm-smb}.\n\\end{proof}\n\nWhen $\\sigma_3>0$, one can prove the following moment bound for the numerical solution:\n\\[\n\\E[\\|y^{[n]}\\|^2]\\le e^{(1+\\frac{\\sigma_3^2}{2})nh}\\E[\\|y^{[0]}\\|^2].\n\\]\nThis follows from the inequality\n\\begin{align*}\n\\E[\\|e^{\\sigma_3\\Delta W_3Y_{H_3}}y\\|^2]&=\\E\\bigl[(y_1+\\sigma_3\\Delta W_3y_2)^2+y_2^2+y_3^2\\bigr]=\\|y\\|^2+\\sigma_3^2h|y_2|^2\\\\\n&\\le (1+\\sigma_3^2h)\\|y\\|^2\n\\end{align*}\nand a recursion argument. A similar moment bound holds for the exact solution, however these moment bounds are not sufficient to prove a strong convergence result.\n\n\nThe objectives of this subsection are first to illustrate Proposition~\\ref{thm-smb}, and second to investigate the behaviour of the strong and weak errors when the condition $\\sigma_3=0$ is removed. Whether it is possible to prove strong and weak convergence estimates, or convergence in probability results, for this problem in the general case is left open for future works.\n\nWe first illustrate the convergence of the strong error. In this numerical experiment, the initial value is $y(0)=(1,2,3)$ and the final time is $T=1$. We consider the two cases where the system~\\eqref{smb} is driven by a single Wiener process: $(\\sigma_1,\\sigma_3)=(1,0)$ and $(\\sigma_1,\\sigma_3)=(0,1)$. Similar results would be obtained if the system was driven by two independent Wiener processes ($\\sigma_1=\\sigma_3=1$ for instance). The reference solution is computed using each scheme with time step size $h_{\\text{ref}}=2^{-16}$, and the schemes are applied with the range of time step sizes $h=2^{-5},\\ldots,2^{-13}$. The expectation is approximated averaging the error over $M_s=500$ independent Monte Carlo samples.\n\nLike in Figure~\\ref{fig:CasMaxBloc}, we compare the splitting integrator~\\eqref{smbI} with the standard Euler--Maruyama scheme, and the stochastic midpoint scheme from \\cite{Milstein2002a}. A truncation of the noise is used, see above for details. To be able to compare the results for different schemes, we use this truncation in all experiments where the implicit stochastic midpoint scheme is involved. \n\nFor the cases where the system is driven by a single Wiener process ($\\sigma_3=0$ or $\\sigma_1=0$), the results of the numerical experiment are presented in Figure~\\ref{fig:msMaxBloc}: we observe a strong order of convergence equal to $1$ for the proposed explicit stochastic Poisson integrator~\\eqref{smbI}. This confirms the result of Proposition~\\ref{thm-smb} when $\\sigma_3=0$. We also conjecture that the stochastic Poisson integrator~\\eqref{smbI} has strong order of convergence equal to $1$ when $\\sigma_1=0$.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{newMsMaxBloc}\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{rev-msMaxBloc}\n\\caption{Stochastic Maxwell--Bloch system with a single Wiener process: Strong errors of the Euler--Maruyama scheme ($\\times$), the midpoint scheme ($\\circ$), \nand the explicit stochastic Poisson integrator ($\\diamond$). Left: $(\\sigma_1,\\sigma_3)=(1,0)$. Right: $(\\sigma_1,\\sigma_3)=(0,1)$.}\n\\label{fig:msMaxBloc}\n\\end{figure}\n\n\nFor the case where the system is driven by two Wiener processes, the results of the numerical experiment are presented in Figure~\\ref{fig:msMaxBloc2}, with $\\sigma_1=\\sigma_3=1$.\nBased on the observed convergence behaviour, we conjecture that the strong order of the proposed integrator is $1\/2$.\nThis result is not covered by the theoretical analysis performed in this article.\n\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{rev-msMaxBloc2}\n\\caption{Stochastic Maxwell--Bloch system with $(\\sigma_1,\\sigma_3)=(1,1)$: \nStrong errors of the Euler--Maruyama scheme ($\\times$), the midpoint scheme ($\\circ$), \nand the explicit stochastic Poisson integrator ($\\diamond$).}\n\\label{fig:msMaxBloc2}\n\\end{figure}\n\nWe now illustrate the weak convergence of the stochastic Poisson integrator~\\eqref{smbI}. For this numerical experiment, \nwe set $\\sigma_1=\\sigma_3=1$, the initial value is $y(0)=(1,2,3)$ and the final time is $T=1$. The reference solution is computed using each scheme with time step size $h_{\\text{ref}}=2^{-16}$, and the schemes are applied with the range of time step sizes $h=2^{-6},\\ldots,2^{-12}$. The expectation is approximated averaging the error over $M_s=10^9$ independent Monte Carlo samples. Finally, the test function is given by $\\phi(y)=\\sin(2\\pi y_1)+\\sin(2\\pi y_2)+\\sin(2\\pi y_3)$.\n\n\nThe results are presented in Figure~\\ref{fig:weakMaxBloc}. According to the observed rate of convergence, we conjecture that the weak order of the proposed integrator is $1$, but this result is not covered by the theoretical analysis performed in this article.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{plotmatlabMB0rdre1}\n\\caption{Stochastic Maxwell--Bloch system: Weak errors of the explicit stochastic Poisson integrator.} \n\\label{fig:weakMaxBloc}\n\\end{figure}\n\nNumerical experiments illustrating the behaviour of the weak error when the system is driven by a single noise are not reported: indeed, as seen in Figure~\\ref{fig:msMaxBloc}, the stochastic Poisson integrator has strong order of convergence equal to $1$ if $\\sigma_3=0$ (rigorous result, Proposition~\\ref{thm-smb}) or if $\\sigma_1=0$ (conjecture). In those cases, the weak error behaves like the strong error and the rate of convergence is $1$.\n\n\nTo conclude this subsection, let us provide a numerical experiment using the scheme~\\eqref{eq:order2} of weak order $2$ presented in Remark~\\ref{rem:order2}. \nFor this numerical experiment, all the values of the parameters are the same as for Figure~\\ref{fig:weakMaxBloc}, except $\\sigma_1=\\sigma_3=10^{-3}$. The results are presented on Figure~\\ref{fig:weakMaxBloc2}. We observe that the weak convergence seems to be of order $2$ for the scheme~\\eqref{eq:order2}, but for small values of $h$ the error saturates due to the Monte Carlo approximation. This is illustrated on the right figure, which gives results for different values of the Monte Carlo sample size.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{plotmatlabMB0rdre2a}\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{plotmatlabMB0rdre2b}\n\\caption{Stochastic Maxwell--Bloch system: Weak errors for the weak order $2$ scheme~\\eqref{eq:order2}. Left: $10^9$ Monte Carlo samples. Right: $10^6$ to $10^9$ Monte Carlo samples.} \n\\label{fig:weakMaxBloc2}\n\\end{figure}\n\n\n\\subsubsection{Asymptotic preserving splitting scheme for the stochastic Maxwell--Bloch system}\n\nIn this subsection, we consider the multiscale version~\\eqref{prob_eps}, parametrized by $\\epsilon$, of the stochastic Maxwell--Bloch system. Based on the expression~\\eqref{smbI} for the stochastic Poisson integrator, applying the general asymptotic preserving scheme~\\eqref{APscheme} introduced in Section~\\ref{APsplit} gives the scheme\n\\begin{equation}\\label{smbIAP}\n\\left\\lbrace\n\\begin{aligned}\ny^{\\epsilon,[n]}&=\\exp(hY_{H_3})\\circ\\exp(hY_{H_1})\\circ\\exp(\\frac{\\sigma_3h\\xi_{3}^{\\epsilon,[n]}}{\\epsilon}Y_{\\widehat H_3})\\circ\\exp(\\frac{\\sigma_1h\\xi_{1}^{\\epsilon,[n]}}{\\epsilon}Y_{\\widehat H_1})(y^{\\epsilon,[n-1]}),\\\\\n\\xi_k^{\\epsilon,[n]}&=\\xi_{k}^{\\epsilon,[n-1]}-\\frac{h}{\\epsilon^2}\\xi_{k}^{\\epsilon,[n]}+\\frac{\\Delta_n W_k}{\\epsilon}=\\frac{1}{1+\\frac{h}{\\epsilon^2}}\\Bigl(\\xi_k^{\\epsilon,[n-1]}+\\frac{\\Delta_n W_k}{\\epsilon}\\Bigr),\\quad k=1,2.\n\\end{aligned}\n\\right.\n\\end{equation}\nThe initial values are $y^{\\epsilon,[0]}=y^{[0]}=y(0)$ and $\\xi_{k}^{\\epsilon,[0]}=0$, $k=1,2$.\n\nFirst, let us illustrate the qualitative behaviour of the scheme, for different values of $\\epsilon$. For this numerical experiment, \n$\\sigma_1=\\sigma_3=0.1$, the initial value is $y(0)=(1,2,3)$ and the final time is $T=1$. The time step size is equal to $h=10^{-3}$. In Figure~\\ref{fig:trajMBAPa}, we illustrate the preservation of the Casimir, up to an error of size $O(10^{-14})$, for the asymptotic preserving scheme applied with $\\epsilon= 1,0.1,0.001$ (left) and for the stochastic Poisson integrator~\\eqref{srbI}, formally $\\epsilon=0$ (right). In Figure~\\ref{fig:trajMBAPb}, we plot the evolution of the approximation of the trajectory $t_n\\mapsto y(t_n)=(y_1(t_n),y_2(t_n),y_3(t_n))$, for different values of $\\epsilon=1,0.1,0.001,0$. We observe that the trajectories are more regular when $\\epsilon$ is large and converge to the solution of the stochastic Poisson integrator~\\eqref{srbI} as $\\epsilon$ tends to $0$.\n \n\n\\begin{figure}[h]\n\\begin{subfigure}{.5\\textwidth}\n\\centering\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{revcasMaxBloc_APa}\n\\end{subfigure}\n~\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{revcasMaxBloc_0a}\n\\end{subfigure}\n\\caption{Stochastic Maxwell--Bloch with a single noise: evolution of the Casimir using the asymptotic preserving scheme~\\eqref{smbIAP}. Left: $\\epsilon=1,0.1,0.001$. Right: $\\epsilon=0$.\n}\n\\label{fig:trajMBAPa}\n\\end{figure}\n\n\\begin{figure}[h]\n\\centering\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{revcasMaxBloc_APb}\n\\end{subfigure}\n~\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{revcasMaxBloc_APc}\n\\end{subfigure}\n\\newline\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{revcasMaxBloc_APd}\n\\end{subfigure}\n~\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{revcasMaxBloc_0b}\n\\end{subfigure}\n\\caption{Stochastic Maxwell--Bloch system: trajectories of the numerical solution using the asymptotic preserving scheme~\\eqref{smbIAP}. Top: left $\\epsilon=1$, right $\\epsilon=0.1$. Bottom: left $\\epsilon=0.001$, right $\\epsilon=0$.}\n\\label{fig:trajMBAPb}\n\\end{figure}\n\n\n\n\n\nFinally, the last experiment of this subsection illustrates the uniform accuracy property of the splitting scheme~\\eqref{smbIAP} with respect to the parameter $\\epsilon$ in the weak sense. For this numerical experiment, $\\sigma_1=\\sigma_3=0.1$, the initial value is $y(0)=(1,2,3)$ and the final time is $T=1$. The reference solution is computed using each scheme with time step size $h_{\\text{ref}}=2^{-16}$, and the schemes are applied with the range of time step sizes $h=2^{-6},\\ldots,2^{-12}$. The expectation is approximated averaging the error over $M_s=10^9$ independent Monte Carlo samples. Finally, the test function is given by $\\phi(y)=\\sin(2\\pi y_1)+\\sin(2\\pi y_2)+\\sin(2\\pi y_3)$. The parameter $\\epsilon$ takes the following values: $\\epsilon=10^{-2}, 10^{-3}, 10^{-4}, 10^{-5}$. The results are seen in Figure~\\ref{fig:weakMaxBlocAP}. We observe that the weak error seems to be bounded uniformly with respect to $\\epsilon$, with an order of convergence $1$. For a standard method such as the Euler--Maruyama scheme, the behaviour would be totally different: for fixed time step size $h$, the error is expected to be bounded away from $0$ when $\\epsilon$ goes to $0$. Based on this numerical experiment, we conjecture that the asymptotic preserving scheme is uniformly accurate.\n\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{plotmatlabMBAP}\n\\caption{Stochastic Maxwell--Bloch: Weak errors of the asymptotic preserving scheme~\\eqref{smbIAP} \nfor $\\epsilon=10^{-2}, 10^{-3}, 10^{-4}, 10^{-5}$.} \n\\label{fig:weakMaxBlocAP}\n\\end{figure}\n\n\n\n\n\n\n\n\n\n\n\n\\subsection{Explicit stochastic Poisson integrators for the stochastic rigid body system}\\label{ssec:PRB}\n\n\nThis subsection presents explicit stochastic Poisson integrators for the stochastic rigid body system~\\eqref{srb} (Example~\\ref{expl-SRB}). We first give a detailed construction of the splitting scheme, which gives a stochastic Poisson integrator. We then illustrate its qualitative properties (preservation of the Casimir function) and strong and weak error estimates of the proposed scheme by numerical experiments. Finally, we illustrate the asymptotic preserving property (see Section~\\ref{APsplit}) for a multiscale version of the system.\n\nBelow we state and prove Proposition~\\ref{thm-srb}, which gives strong and weak rates of convergence of the proposed explicit scheme. This is a non-trivial result since the coefficients of the considered stochastic differential equation are not globally Lipschitz continuous.\n\n\n\\subsubsection{Presentation of the splitting scheme for the stochastic rigid body system}\n\n\nTo apply the strategy described in Section~\\ref{ssec:LP} and construct explicit stochastic Poisson integrators, we first follow the approach from~\\cite{MR1246065,MR2009376} for the deterministic rigid body system. The Hamiltonian function $H$ is split as $H=H_1+H_2+H_3$, with $H_j=\\frac12\\frac{y_j^2}{I_j}$ for $j=1,2,3$. Recall also that the Hamiltonian functions appearing in the stochastic part of the dynamics are given by $\\widehat H_j=\\frac12\\frac{y_j^2}{\\widehat I_j}$, for $j=1,2,3$.\n\nThe application of the general splitting integrator~\\eqref{slpI} for the stochastic rigid body system~\\eqref{srb} requires to compute the exact solutions of the deterministic subsystems\n\\[\n\\dot{y}_j=B(y_j)\\nabla H_j(y_j)\n\\]\nand of the stochastic subsystems\n\\[\n\\,\\mathrm{d} y_j=B(y_j)\\nabla \\widehat H_j(y_j)\\circ \\,\\mathrm{d} W_j(t).\n\\]\nAs explained for instance in~\\cite{MR1246065,MR2009376} for the deterministic system, it is straightforward to solve such subsystems. \nWe only provide the details when $j=1$. In that case, the deterministic subsystem is of the type\n$$\n\\begin{cases}\n\\dot y_1&=0 \\\\\n\\dot y_2&=y_1y_3\/I_1 \\\\\n\\dot y_3&=-y_1y_2\/I_1.\n\\end{cases}\n$$\nThe first equation yields that $y_1$ is constant, i.\\,e. $y_1(t)=y_1(0)$ for all $t\\ge 0$. As a consequence, $(y_2,y_3)$ is a solution of a linear ordinary differential equation.\n\nThe deterministic subsystem when $j=1$ thus admits the exact solution\n$$\n\\begin{pmatrix}y_1(t)\\\\y_2(t)\\\\y_3(t)\\end{pmatrix}=\n\\begin{pmatrix}1 & 0 & 0\\\\ 0 & \\cos(\\theta t) & \\sin(\\theta t)\\\\ 0 & -\\sin(\\theta t) & \\cos(\\theta t)\\end{pmatrix}y(0),\n$$\nwhere $\\theta=\\frac{y_1(0)}{I_1}$. Similarly, the stochastic subsystem when $j=1$ is written as\n$$\n\\begin{cases}\n\\,\\mathrm{d} y_1&=0\\\\\n\\,\\mathrm{d} y_2&= y_1y_3\/\\widehat I_1\\circ\\,\\,\\mathrm{d} W_1\\\\\n\\,\\mathrm{d} y_3&=-y_1y_2\/\\widehat I_1 \\circ\\,\\,\\mathrm{d} W_1\n\\end{cases}\n$$\nand it admits the exact solution\n$$\n\\begin{pmatrix}y_1(t)\\\\y_2(t)\\\\y_3(t)\\end{pmatrix}=\n\\begin{pmatrix}1 & 0 & 0\\\\ 0 & \\cos(\\theta W_1(t)) & \\sin(\\theta W_1(t))\\\\ 0 & -\\sin(\\theta W_1(t)) & \\cos(\\theta W_1(t))\\end{pmatrix}y(0).\n$$\nwhere $\\theta=\\frac{y_1(0)}{\\widehat I_1}$.\n\nThe solutions of the deterministic and stochastic subsystems when $j=2,3$ have similar expressions, which are not written here for brevity.\n\n\n\n\n\n\nFinally, setting $\\Phi_h^{\\text{det}}=\\exp(hY_{H_3})\\circ\\exp(hY_{H_2})\\circ\\exp(hY_{H_1})$ and $\\Phi_{\\Delta W}^{\\text{stoch}}=\\exp(\\Delta W_3Y_{\\widehat H_3})\\circ \n\\exp(\\Delta W_2Y_{\\widehat H_2})\\circ\\exp(\\Delta W_1Y_{\\widehat H_1})$, the general splitting integrator~\\eqref{slpI} applied to the stochastic rigid body system~\\eqref{srb} gives \n\\begin{align}\\label{srbI}\n\\Phi_h=\\Phi_h^{\\text{det}}\\circ\\Phi_{\\Delta W}^{\\text{stoch}}&=\\exp(hY_{H_3})\\circ\\exp(hY_{H_2})\\circ\\exp(hY_{H_1})\n\\nonumber\\\\\n&\\quad \\circ\\exp(\\Delta W_3Y_{\\widehat H_3})\\circ \\exp(\\Delta W_2Y_{\\widehat H_2})\\circ\\exp(\\Delta W_1Y_{\\widehat H_1}).\n\\end{align}\nOwing to Proposition~\\ref{propo:sPi}, the explicit splitting scheme~\\eqref{srbI} is a stochastic Poisson integrator. In particular, it preserves the Casimir function $C(y)=y_1^2+y_2^2+y_3^2$, which has compact level sets.\n\n\n\n\\subsubsection{Preservation of the Casimir of the stochastic rigid body system}\n\n\n\nLet us first illustrate the qualitative behaviour of the stochastic Poisson integrator~\\eqref{srbI} introduced above. In this numerical experiment, \nthe moments of inertia are $I=(2,1,2\/3)$, $\\widehat I=(1,2,3)$, the initial value is $y(0)=(\\cos(1.1),0,\\sin(1.1))$ and the final time is $T=20$.\nIn Figure~\\ref{fig:RB}, we compare the numerical solutions given \nby the classical Euler--Maruyama scheme (applied to the It\\^o formulation of the system), the stochastic midpoint scheme from~\\cite{Milstein2002a}, and the explicit splitting scheme~\\eqref{srbI}. The time step size is equal to $h=0.2$ ($T\/h=100$). A truncation of the noise is used for this experiment, \nsee above for details. As proved in Proposition~\\ref{propo:sPi}, we observe that the Casimir function $C(y)=y_1^2+y_2^2+y_3^2$ is preserved when using the stochastic Poisson integrator~\\eqref{srbI}. The Casimir function is also preserved when using the stochastic midpoint scheme: indeed, this integrator is known to preserve quadratic invariants, see~\\cite{MR3210739}.\n\nIn addition, a plot of the evolution of the Hamiltonian for the three schemes (middle figure), and of the trajectory on the sphere of the proposed splitting scheme (right figure) are presented in Figure~\\ref{fig:RB}. \n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.3\\textwidth,keepaspectratio]{trajSRBL2}\n\\includegraphics*[width=0.3\\textwidth,keepaspectratio]{trajSRBL1}\n\\includegraphics*[width=0.3\\textwidth,keepaspectratio]{trajSRBL3.pdf}\n\\caption{Stochastic rigid body system: Qualitative behaviour of the Euler--Maruyama scheme ($\\times$), the midpoint scheme ($\\circ$), \nand the explicit stochastic Poisson integrator ($\\diamond$). Left: preservation of the Casimir. Middle: evolution of the Hamiltonian. Right: trajectory on the sphere for the scheme~\\eqref{srbI}.}\n\\label{fig:RB}\n\\end{figure}\n\n\\subsubsection{Strong and weak convergence of the explicit stochastic Poisson integrator for the stochastic rigid body system}\n\n\nThe general Theorem~\\ref{thm-general} is applicable in the case of stochastic rigid body system since the Casimir function $C$ has compact level sets.\n\n\\begin{proposition}\\label{thm-srb}\nConsider a numerical discretisation of the stochastic rigid body system~\\eqref{srb} by the stochastic Poisson integrator~\\eqref{srbI}. \nThen, the strong order of convergence of this scheme is $1\/2$ and the weak order of convergence is $1$.\n\\end{proposition}\n\n\\begin{proof}\nThe stochastic Poisson system~\\eqref{srb} admits the Casimir function $y\\mapsto C(y)=y_1^2+y_2^2+y_3^2$, which has compact level sets. \nIt then suffices to apply the general convergence result, Theorem~\\ref{thm-general}, which \nconcludes the proof of Proposition~\\ref{thm-srb}.\n\\end{proof}\n\nLet us first illustrate the strong convergence result. We compare the behaviours of the three integrators introduced above: the Euler--Maruyama scheme, the stochastic midpoint scheme, \nand the explicit stochastic Poisson integrator~\\eqref{srbI}. Note that Proposition~\\ref{thm-srb} is valid only for the splitting scheme~\\eqref{srbI}. For this numerical experiment, the moments of inertia are $I=(2,1,2\/3)$, $\\widehat I=(1,2,3)$, the initial value is $y(0)=(\\cos(1.1),0,\\sin(1.1))$ and the final time is $T=1$. The reference solution is computed using each scheme with time step size $h_{\\text{ref}}=2^{-16}$, and the schemes are applied with the range of time step sizes $h=2^{-5},\\ldots,2^{-13}$. The expectation is approximated averaging the error over $M_s=500$ independent Monte Carlo samples.\n\n\nThe results are presented in Figure~\\ref{fig:msSRBL}: we observe a strong order of convergence equal to $1\/2$ for the proposed explicit stochastic Poisson integrator~\\eqref{srbI}, which confirms the result of Proposition~\\ref{thm-srb}.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{msSRBL}\n\\caption{Stochastic rigid body system: Strong errors for the Euler--Maruyama scheme ($\\times$), the midpoint scheme ($\\circ$), and the explicit stochastic Poisson integrator ($\\diamond$).}\n\\label{fig:msSRBL}\n\\end{figure}\n\nWe now illustrate the weak convergence of the stochastic Poisson integrator~\\eqref{srbI}. For this numerical experiment, the moments of inertia are $I=\\hat{I}=(2,1,2\/3)$, the initial value is $y(0)=(\\cos(1.1),0,\\sin(1.1))$ and the final time is $T=1$. The reference solution is computed using each scheme with time step size $h_{\\text{ref}}=2^{-16}$, and the schemes are applied with the range of time step sizes $h=2^{-6},\\ldots,2^{-12}$. The expectation is approximated averaging the error over $M_s=10^9$ independent Monte Carlo samples. Finally, the test function is given by $\\phi(y)=\\sin(2\\pi y_1)+\\sin(2\\pi y_2)+\\sin(2\\pi y_3)$.\nThe results are presented in Figure~\\ref{fig:weakRGB}. We observe a weak order $1$ for the proposed explicit stochastic Poisson integrator~\\eqref{srbI}, which confirms the result of Proposition~\\ref{thm-srb}.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{plotmatlabRGB0rdre1}\n\\caption{Stochastic rigid body system: Weak error for the explicit stochastic Poisson integrator~\\eqref{srbI}.}\n\\label{fig:weakRGB}\n\\end{figure}\n\nTo conclude this subsection, let us provide a numerical experiment using the scheme of weak order $2$ presented in Remark~\\ref{rem:order2}. To do so, we consider the following variant of the stochastic rigid body system~\\eqref{srb}:\n\\begin{align*\n\\,\\mathrm{d}\\begin{pmatrix}y_1\\\\y_2\\\\y_3\\end{pmatrix}&=\nB(y)\n\\left(\\nabla H(y)\\,\\,\\mathrm{d} t+\\sigma_1\\nabla \\widehat H_1(y)\\circ\\,\\,\\mathrm{d} W_1(t)\n+\\sigma_2\\nabla \\widehat H_2(y)\\circ\\,\\,\\mathrm{d} W_2(t)\\right.\\nonumber\\\\\n&\\quad+\\left.\\sigma_3\\nabla \\widehat H_3(y)\\circ\\,\\,\\mathrm{d} W_3(t) \\right),\n\\end{align*}\nwith nonnegative real numbers $\\sigma_1,\\sigma_2,\\sigma_3$. For this numerical experiment, all the values of the parameters are the same as for Figure~\\ref{fig:weakRGB}, except the values of the additional parameters $\\sigma_1,\\sigma_2,\\sigma_3$: one has either three Wiener processes with $(\\sigma_1,\\sigma_2,\\sigma_3)=(10^{-3},10^{-3},10^{-3})$ (left figure), or a single Wiener process, with three possible choices $(\\sigma_1,\\sigma_2,\\sigma_3)=(10^{-3},0,0)$, $(\\sigma_1,\\sigma_2,\\sigma_3)=(0,10^{-3},0)$ and $(\\sigma_1,\\sigma_2,\\sigma_3)=(0,0,10^{-3})$ (right figure). The results are presented in Figure~\\ref{fig:weakRGBorder2}. We observe that the weak convergence seems to be of order $2$ for the scheme~\\eqref{eq:order2}, however for small values of $h$ the error saturates due to the Monte Carlo approximation.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{weakRGB2a}\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{weakRGB2b}\n\\caption{Stochastic rigid body system: Weak error for the integrator~\\eqref{eq:order2}. Left: $(\\sigma_1,\\sigma_2,\\sigma_3)=(10^{-3},10^{-3},10^{-3})$. Right: $(\\sigma_1,\\sigma_2,\\sigma_3)=(10^{-3},0,0)$, $(\\sigma_1,\\sigma_2,\\sigma_3)=(0,10^{-3},0)$ and $(\\sigma_1,\\sigma_2,\\sigma_3)=(0,0,10^{-3})$.} \n\\label{fig:weakRGBorder2}\n\\end{figure}\n\n\\subsubsection{Asymptotic preserving splitting scheme for the stochastic rigid body system}\n\nIn this subsection, we consider the multiscale version~\\eqref{prob_eps}, parametrized by $\\epsilon$, of the stochastic rigid body system. Based on the expression~\\eqref{srbI} for the stochastic Poisson integrator, applying the general asymptotic preserving scheme~\\eqref{APscheme} introduced in Section~\\ref{APsplit} gives the scheme\n\\begin{equation}\\label{srbIAP}\n\\left\\lbrace\n\\begin{aligned}\ny^{\\epsilon,n}&=\\exp(hY_{H_3})\\circ\\exp(hY_{H_2})\\circ\\exp(hY_{H_1})\\\\\n&\\quad \\circ\\exp(\\frac{h\\xi_{3}^{\\epsilon,[n]}}{\\epsilon}Y_{\\widehat H_3})\\circ \\exp(\\frac{h\\xi_{2}^{\\epsilon,[n]}}{\\epsilon}Y_{\\widehat H_2})\\circ\\exp(\\frac{h\\xi_{1}^{\\epsilon,[n]}}{\\epsilon}Y_{\\widehat H_1})\\\\\n\\xi_k^{\\epsilon,[n]}&=\\xi_{k}^{\\epsilon,[n-1]}-\\frac{h}{\\epsilon^2}\\xi_{k}^{\\epsilon,[n]}+\\frac{\\Delta_n W_k}{\\epsilon}=\\frac{1}{1+\\frac{h}{\\epsilon^2}}\\Bigl(\\xi_k^{\\epsilon,[n-1]}+\\frac{\\Delta_n W_k}{\\epsilon}\\Bigr),\\quad k=1,2,3.\n\\end{aligned}\n\\right.\n\\end{equation}\nThe initial values are $y^{\\epsilon,[0]}=y^{[0]}=y(0)$ and $\\xi_{k}^{\\epsilon,[0]}=0$, $k=1,2,3$.\n\n\nFirst, let us illustrate the qualitative behaviour of the scheme~\\eqref{srbIAP}, for different values of $\\epsilon$. For this numerical experiment, the moments of inertia are $I=\\hat{I}=(2,1,2\/3)$, the initial value is $y(0)=(\\cos(1.1),0,\\sin(1.1))$ and the final time is $T=1$. The time step size is equal to $h=10^{-4}$. In Figure~\\ref{fig:trajSRBAPa}, we plot the evolution of the Hamiltonian (top) and the Casimir (bottom) for the asymptotic preserving scheme~\\eqref{srbIAP} applied with $\\epsilon= 1,0.1,0.001$ (left) and for the stochastic Poisson integrator~\\eqref{srbI}, formally $\\epsilon=0$ (right). We observe the preservation of the Casimir function. In Figure~\\ref{fig:trajSRBAPb}, we plot the evolution of the approximation of the trajectory $t_n\\mapsto y(t_n)=(y_1(t_n),y_2(t_n),y_3(t_n))$, for different values of $\\epsilon=1,0.1,0.001,0$. We observe that the trajectories are more regular when $\\epsilon$ is large and converge to the solution of the stochastic Poisson integrator~\\eqref{srbI} as $\\epsilon$ tends to $0$.\n\n\n\n\\begin{figure}[h]\n\\begin{subfigure}{.5\\textwidth}\n\\centering\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL1_AP}\n\\end{subfigure}\n~\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL1_0}\n\\end{subfigure}\n\\newline\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL2_AP}\n\\end{subfigure}\n~\n\\begin{subfigure}{.5\\textwidth}\n\\centering\n\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL2_0}\n\\end{subfigure}\n\\caption{Stochastic rigid body system: evolution of the Hamiltonian (top) and the Casimir (bottom) of the numerical solution using the asymptotic preserving scheme~\\eqref{srbIAP}. Left: $\\epsilon=1,0.1,0.001$. Right: $\\epsilon=0$.}\n\\label{fig:trajSRBAPa}\n\\end{figure}\n\n\\begin{figure}[h]\n\\centering\n\\begin{subfigure}{.5\\textwidth}\n\\centering\n\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL3_APa}\n\\end{subfigure}\n~\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL3_APb}\n\\end{subfigure}\n\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL3_APc}\n\\end{subfigure}\n~\n\\begin{subfigure}{.5\\textwidth}\n\\centering\\includegraphics*[width=0.8\\textwidth,keepaspectratio]{trajSRBL3_0}\n\\end{subfigure}\n\\caption{Stochastic rigid body system: Trajectory of the numerical solutions using the asymptotic preserving scheme~\\eqref{srbIAP}. Top: $\\epsilon=1,0.1$. Bottom: $\\epsilon=0.001,0$.}\n\\label{fig:trajSRBAPb}\n\\end{figure}\n\n\nFinally, the last experiment of this subsection illustrates the uniform accuracy property of the splitting scheme~\\eqref{srbIAP} with respect to the parameter $\\epsilon$ in the weak sense. For this numerical experiment, the moments of inertia are $I=(2,1,2\/3)$ and $\\hat{I}=(20,10,20\/3)$, the initial value is $y(0)=(\\cos(1.1),0,\\sin(1.1))$ and the final time is $T=1$. The reference solution is computed using each scheme with time step size $h_{\\text{ref}}=2^{-16}$, and the schemes are applied with the range of time step sizes $h=2^{-6},\\ldots,2^{-12}$. The expectation is approximated averaging the error over $M_s=10^8$ independent Monte Carlo samples. The test function is given by $\\phi(y)=\\sin(2\\pi y_1)+\\sin(2\\pi y_2)+\\sin(2\\pi y_3)$. The parameter $\\epsilon$ takes the following values: $\\epsilon=10^{-2}, 10^{-3}, 10^{-4}, 10^{-5}$. The results are seen in Figure~\\ref{fig:plotmatlabRGBAP}. We observe that the weak error seems to be bounded uniformly with respect to $\\epsilon$, with an order of convergence $1$. For a standard method such as the Euler--Maruyama scheme, the behaviour would be totally different: for fixed time step size $h$, the error is expected to be bounded away from $0$ when $\\epsilon$ goes to $0$. Based on this numerical experiment, we conjecture that the asymptotic preserving scheme is uniformly accurate.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{plotmatlabRGBAP}\n\\caption{Stochastic rigid body system: Weak errors of the asymptotic preserving scheme~\\eqref{srbIAP} for $\\epsilon=10^{-2}, 10^{-3}, 10^{-4}, 10^{-5}$.} \n\\label{fig:plotmatlabRGBAP}\n\\end{figure}\n\n\n\n\\subsection{Explicit stochastic Poisson integrators for the stochastic sine--Euler system}\\label{ssec:PSE} \n\nThe last example of a stochastic Lie--Poisson system studied in this work is the stochastic version of the sine--Euler equations~\\eqref{stochSE} introduced in Example~\\ref{expl-SE}. Like for the previous examples, an explicit stochastic Poisson integrator is designed using a splitting strategy. We both illustrate the qualitative behaviour of the proposed integrator (preservation of Casimir functions) and strong error estimates. Note that numerical experiments which would illustrate weak error estimates or the asymptotic preserving property are not reported for this example: indeed, the results would be similar to those presented for the two other examples above.\n\n\nRecall that the stochastic sine--Euler system~\\eqref{stochSE} is of the type\n\\begin{align*}\n\\,\\mathrm{d} \\omega&=B(\\omega)\\left(\\nabla H(\\omega)\\,\\,\\mathrm{d} t+\n\\sigma_{(1,0)}\\nabla \\widehat H_{(1,0)}(\\omega)\\circ\\,\\,\\mathrm{d} W_{(1,0)}(t)+\\sigma_{(1,1)} \\nabla \\widehat H_{(1,1)}(\\omega)\\circ\\,\\,\\mathrm{d} W_{(1,1)}(t) \\right.\\nonumber\\\\\n&\\quad\\left.+\\sigma_{(0,1)}\\nabla \\widehat H_{(0,1)}(\\omega)\\circ\\,\\,\\mathrm{d} W_{(0,1)}(t) \n+\\sigma_{(-1,1)}\\nabla \\widehat H_{(-1,1)}(\\omega)\\circ\\,\\,\\mathrm{d} W_{(-1,1)}(t)\\right),\n\\end{align*}\nThis is a stochastic Lie--Poisson system. In order to design a splitting integrator, note that the Hamiltonian function $H$ can be split as $H=H_{(1,0)}+H_{(1,1)}+H_{(0,1)}+H_{(-1,1)}$, with $H_{\\bf k}(\\omega)=\\widehat H_{\\bf k}(\\omega)=\\frac{\\omega_{\\bf k}\\omega_{\\bf k}^\\star}{|\\bf k|^2}$. \n\nLike for the other examples, the deterministic subsystems\n\\[\n\\dot{\\omega}_{\\bf k}=B(\\omega_{\\bf k})\\nabla H_{\\bf k}(\\omega_{\\bf k})\n\\]\nand the stochastic subsystems\n\\[\n\\,\\mathrm{d} \\omega_{\\bf k}=B(\\omega_{\\bf k})\\nabla \\widehat H_{\\bf k}(\\omega_{\\bf k})\\circ \\,\\mathrm{d} W_{\\bf k}(t)\n\\]\ncan be solved exactly: indeed, for each subsystem, the variable $\\omega_{\\bf k}$ is preserved and the three other variables evolve following a linear differential equation. We refer to~\\cite{MR1860719,MR1246065} for the explanation of this idea for the deterministic subsystems. The treatment of the stochastic subsystems is straightforward using the exact solution of the subsystems $\\dot{\\omega}_{\\bf k}=B(\\omega_{\\bf k})\\nabla \\widehat H_{\\bf k}(\\omega_{\\bf k})$. \nThe splitting scheme for the stochastic sine--Euler SDE \\eqref{stochSE} then reads \n\\begin{align}\\label{stochSEI}\n\\Phi_h=\\Phi_h^{\\text{det}}\\circ\\Phi_{\\Delta W}^{\\text{stoch}}&=\n\\exp(h\\Omega_{H_{(-1,1)}})\\circ\\exp(h\\Omega_{H_{(0,1)}})\\circ\\exp(h\\Omega_{H_{(1,1)}})\\circ\\exp(h\\Omega_{H_{(1,0)}})\\nonumber \\\\\n&\\quad\\circ\n\\exp(\\sigma_{(-1,1)}\\Delta W_{(-1,1)}\\Omega_{\\widehat H_{(-1,1)}})\\circ\\exp(\\sigma_{(0,1)}\\Delta W_{(0,1)}\\Omega_{\\widehat H_{(0,1)}})\\nonumber\\\\\n&\\quad\\circ \\exp(\\sigma_{(1,1)}\\Delta W_{(1,1)}\\Omega_{\\widehat H_{(1,1)}})\n\\circ\\exp(\\sigma_{(1,0)}\\Delta W_{(1,0)}\\Omega_{\\widehat H_{(1,0)}}),\n\\end{align}\nwhere we denote by $\\Omega_{H_{\\bf k}}$, resp. by $\\Omega_{\\widehat H_{\\bf k}}$, the exact flow of the ODE subsystem, resp. SDE subsystem, with index ${\\bf k}\\in\\{(1,0),(1,1),(0,1),(-1,1)\\}$.\n\n\\subsubsection{Preservation of Casimir functions for the stochastic sine--Euler system}\n\nRecall that the stochastic sine--Euler system admits two Casimir functions $C_1$ and $C_2$ given in Example~\\ref{expl-SE}. Owing to Proposition~\\ref{propo:sPi}, the numerical scheme~\\eqref{stochSEI} is a stochastic Poisson integrator, in particular it preserves the two Casimir functions $C_1$ and $C_2$. \nWe numerically illustrate this property in Figure~\\ref{fig:trajSE}, where one sample of the numerical solution is computed with the time step size $h=0.02$.\nThe initial value is \n$\\omega(0)=(\\omega_{(1,0)}(0),\\omega_{(1,1)}(0),\\omega_{(0,1)}(0),\\omega_{(-1,1)}(0))=(0.1+0.3i, 0.2+0.3i, 0.3+0.2i, 0.4+0.1i)$. In addition, $\\sigma_k=1$ for all $k$ in this experiment. Figure~\\ref{fig:trajSE} confirms that the two Casimir functions are preserved by the proposed integrator~\\eqref{stochSEI}.\n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{trajSE}\n\\caption{Stochastic sine--Euler system: Preservation of the two Casimir functions by the explicit stochastic Poisson integrator~\\eqref{stochSEI}.}\n\\label{fig:trajSE}\n\\end{figure}\n\n\\subsubsection{Strong convergence of the explicit stochastic Poisson integrator for the stochastic sine--Euler system}\n\n\n\n\nLike for the stochastic rigid body system, we have the following convergence result due to the preservation of the Casimir function $C_1$. \n\\begin{proposition}\\label{thm-se}\nConsider a numerical discretisation of the stochastic sine--Euler system~\\eqref{stochSE} by the explicit stochastic Poisson integrator~\\eqref{srbI}. \nThen, the strong order of convergence of this scheme is $1\/2$, and the weak order of convergence is $1$. If the system is driven by a single Wiener process, the strong order of convergence is $1$.\n\\end{proposition}\n\nAs already explained, the convergence result above is not trivial since the scheme is explicit: since the coefficients of the equations are not globally Lipschitz continuous, the explicit Euler--Maruyama scheme does not converge in the strong sense.\n\n\\begin{proof}\nThe stochastic Poisson system~\\eqref{stochSE} admits the Casimir function $\\omega\\mapsto C_1(\\omega)=|\\omega_1|^2+\\ldots+|\\omega_4|^2$, which has compact level sets. \nIt then suffices to apply the general convergence result, Theorem~\\ref{thm-general}, which \nconcludes the proof of Proposition~\\ref{thm-se}.\n\\end{proof}\n\n\nWe now numerically illustrate the strong rate of convergence of the proposed integrator~\\eqref{stochSEI}\nwhen applied to the SDE \\eqref{stochSE}. The final time is $T=1$ and the initial value is \n\n$\\omega(0)=(\\omega_{(1,0)}(0),\\omega_{(1,1)}(0),\\omega_{(0,1)}(0),\\omega_{(-1,1)}(0))=(0.1+0.3i, 0.2+0.3i, 0.3+0.2i, 0.4+0.1i)$. The reference solution is computed using the proposed scheme with time step size $h_{\\text{ref}}=2^{-15}$, and the scheme is applied with the range of time step sizes $h=2^{-5},\\ldots,2^{-13}$. The expectation is approximated averaging the error over $M_s=500$ independent Monte Carlo samples. The results are presented in Figure~\\ref{fig:msSE}. On the left, $\\sigma_1=1$ and $\\sigma_j=0$, for $j=2,\\ldots,4$: we observe an order of convergence equal to $1$, which confirms the result in Proposition~\\ref{thm-se} when the system is driven by a single Wiener process. On the right, $\\sigma_j=1$, for $j=1,\\ldots,4$, which means that the system is driven by four independent Wiener processes. We observe an order of convergence equal to $1\/2$, which confirms the result in Proposition~\\ref{thm-se}.\n\n\n \n\n\\begin{figure}[h]\n\\centering\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{msSE1}\n\\includegraphics*[width=0.48\\textwidth,keepaspectratio]{msSE}\n\\caption{Stochastic sine--Euler system: Strong errors of the explicit stochastic Poisson integrator~\\eqref{stochSEI}. Left: single noise. Right: multiple noise.}\n\\label{fig:msSE}\n\\end{figure}\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n \\label{sec:introduction}}\n\n \\IEEEPARstart{D}{eep} convolutional neural networks (CNNs) are dominating in most visual recognition problems and applications, including semantic segmentation \\cite{FCN}, action recognition \\cite{simonyan2014two}\n and object detection \\cite{girshick2014rich}, among many others. When full supervision is available, CNNs can achieve outstanding performances, but this type of supervision may not be available in a breadth of applications. In semantic segmentation, for instance, full supervision involves annotating all the pixels in each training image. The problem is further amplified when such annotations require expert knowledge or involves volumetric data, as is the case in medical imaging \\cite{Litjens2017}. Therefore, the supervision of semantic segmentation with partial or weak labels, for example, scribbles \\cite{scribblesup,ncloss:cvpr18,tang2018regularized}, image tags \\cite{pathak2015constrained,papandreou2015weakly}, bounding boxes \\cite{deepcut} or points \\cite{Bearman2016}, has received significant research efforts in the last years.\n\n Imposing prior knowledge on the network's prediction via some unsupervised loss is a well-established technique in semi-supervised learning \\cite{weston2012deep,goodfellow2016deep}. Such a prior acts as a regularizer that leverages unlabeled data with domain-specific knowledge. For instance, in semantic segmentation, several recent works showed that adding loss terms such as dense conditional random fields (CRFs) \\cite{tang2018regularized,Marin2019CVPR}, graph clustering \\cite{ncloss:cvpr18} or priors on the sizes of the target regions \\cite{kervadec2019constrained, Zhou2019ICCV, Kervadec2019MICCAI} can\n achieve outstanding performances with only fractions of full supervision labels. However, imposing hard inequality or equality constraints on the output of deep CNNs is still in a nascent stage, and only a few recent works have focused on the subject \\cite{pathak2015constrained,Marquez-Neila2017,Ravi2018,kervadec2019constrained}.\n\n \\subsection{Problem formulation}\n We consider a general class of semi- or weakly-supervised semantic segmentation problems, where {\\em global inequality constraints} are enforced on the network's output. \n Consider a training image $I: \\Omega \\subset \\mathbb{R}^2 \\rightarrow \\mathbb{R}$, with $\\Omega_{\\cal L} \\subset \\Omega$ a set of labeled pixels, which corresponds to a fraction of the pixels in image domain $\\Omega$. For $K$ classes, let $\\mathbf{y}_p = (y_p^1, \\dots y_p^K) \\in \\{ 0,1 \\}^K$ denotes the ground-truth label of pixel $p \\in \\Omega_{\\cal L}$, and $S_{\\boldsymbol{\\theta}} \\in [0, 1]^{|\\Omega| \\times K}$ a standard K-way softmax probability output, with $\\boldsymbol{\\theta}$ the network's parameters.\n In matrix $S_{\\boldsymbol{\\theta}}$, each row $\\boldsymbol{s}_{p,\\boldsymbol{\\theta}} = (s_{p,\\boldsymbol{\\theta}}^1, \\dots, s_{p,\\boldsymbol{\\theta}}^K) \\in [0,1]^K$ corresponds to the predictions for a pixel $p$ in $\\Omega$, which can be either unlabeled or labeled.\n We focus on constrained problems of the following general form:\n \\begin{align}\n \\label{Constrained-CNN}\n &\\min_{\\boldsymbol{\\theta}} \\, {\\cal E}(\\boldsymbol{\\theta}) \\nonumber \\\\\n &\\mbox{s.t.} \\, f_i(S_{\\boldsymbol{\\theta}}) \\leq 0, \\quad i=1, \\dots N\n \\end{align}\n where ${\\cal E}(\\boldsymbol{\\theta})$ is some standard loss for labeled pixels $p \\in \\Omega_{\\cal L}$, e.g., the\n cross entropy\\footnote{We give the cross entropy as an example but our framework is not restricted to a specific form of loss for the set of labeled points.}:\n ${\\cal E}(\\boldsymbol{\\theta}) = -\\sum_{p \\in \\Omega_{\\cal L}} \\sum_{k} y_p^k \\log(s_{p,\\boldsymbol{\\theta}}^k)$.\n Inequality constraints of the general form in \\eqref{Constrained-CNN} can embed very useful prior knowledge on the network's predictions for unlabeled\n pixels. Assume, for instance, that we have prior knowledge about the size of the target region (i.e., class) $k$. Such a knowledge can be in the form of lower or upper bounds on region size, which is common in medical image segmentation problems \\cite{kervadec2019constrained,Niethammer2013,Gorelick2013}. In this case, one can impose constraints of the form\n $f_i(S_{\\boldsymbol{\\theta}}) = \\sum_{p \\in \\Omega} s_{p,\\boldsymbol{\\theta}}^k - a$, with $a$ denoting an upper bound on the size of region $k$. The same type of constraints can impose image-tag priors,\n a form of weak supervision enforcing whether a target region is present or absent in a given training image, as in multiple instance learning (MIL)\n scenarios \\cite{pathak2015constrained,kervadec2019constrained}. For instance, constraint of the form $f_i(S_{\\boldsymbol{\\theta}}) = 1- \\sum_{p \\in \\Omega} s_{p,\\boldsymbol{\\theta}}^k$ forces class $k$ to be present in a given training image.\n \n\n\\subsection{Challenges of constrained CNN optimization}\n \nAs pointed out in several recent studies \\cite{pathak2015constrained,Marquez-Neila2017,kervadec2019constrained}, imposing hard constraints on deep CNNs involving millions of trainable parameters is challenging. This is the case of problem \\eqref{Constrained-CNN}, even when the constraints are convex with respect to the outputs of the network. In optimization, a standard way to handle constraints is to solve the Lagrangian primal and dual problems in an alternating scheme \\cite{Boyd2004}. For \\eqref{Constrained-CNN}, this corresponds to alternating the optimization of a CNN for the primal with stochastic optimization, e.g., SGD, and projected gradient-ascent iterates for the dual. However, despite the clear benefits of imposing global constraints on CNNs, such a standard Lagrangian-dual optimization is mostly avoided in modern deep networks. As discussed recently in \\cite{pathak2015constrained, Marquez-Neila2017,Ravi2018}, this might be explained by the computational complexity and stability\/convergence issues caused by alternating between stochastic optimization and dual updates\/projections.\n\nIn standard Lagrangian-dual optimization, an unconstrained problem needs to be solved after each iterative dual step. This is not feasible for deep CNNs, however, as it would require re-training the network at each step. To avoid this problem, Pathak et al. \\cite{pathak2015constrained} introduced a latent distribution, and minimized a KL divergence so that the CNN output matches this distribution as closely as possible. Since the network's output is not directly coupled with constraints, its parameters can be optimized using standard techniques like SGD. While this strategy enabled adding inequality constraints in weakly supervised segmentation, it is limited to linear constraints. Moreover, the work in \\cite{Marquez-Neila2017} imposed hard equality constraints on 3D human pose estimation. To alleviate the ensuing computational complexity, they used a Kyrlov sub-space approach, limiting the solver to a randomly selected subset of constraints within each iteration. Therefore, constraints that are satisfied at one iteration may not be satisfied at the next, which might explain the negative results obtained in \\cite{Marquez-Neila2017}. In general, updating the network parameters and dual variables in an alternating fashion leads to a higher computational complexity than solving a loss function directly.\n\nAnother important difficulty in Lagrangian optimization is the interplay between stochastic optimization (e.g., SGD) for the primal and the iterates\/projections for the dual. Basic gradient methods have well-known issues with deep networks, e.g., they are sensitive to the learning rate and prone to weak local minima. Therefore, the dual part in Lagrangian optimization might obstruct the practical and theoretical benefits of stochastic optimization (e.g., speed and strong generalization performance), which are widely established for unconstrained deep network losses \\cite{Hardt2016}. More importantly, solving the primal and dual separately may lead to instability during training or slow convergence, as shown recently in \\cite{kervadec2019constrained}.\n\n \\subsection{Penalty approaches}\n In the context of deep networks, ``hard'' inequality or equality constraints are typically handled in a ``soft'' manner by augmenting the loss with a {\\em penalty}\n function \\cite{He2017,Jia2017,kervadec2019constrained}. Such a penalty approach is a simple alternative to Lagrangian optimization, and is well-known in the general context of constrained optimization;\n see \\cite{Bertsekas1995}, Chapter 4. In general, penalty-based methods approximate a constrained minimization problem with an unconstrained one by adding a term (penalty) ${\\cal P}(f_i(S_{\\boldsymbol{\\theta}}))$, which increases when constraint $f_i(S_{\\boldsymbol{\\theta}}) \\leq 0$ is violated. By definition, a penalty ${\\cal P}$ is a non-negative, continuous and differentiable function, which verifies: ${\\cal P}(f_i(S_{\\boldsymbol{\\theta}})) = 0$ if and only if constraint $f_i(S_{\\boldsymbol{\\theta}}) \\leq 0$ is satisfied. In semantic segmentation \\cite{kervadec2019constrained} and, more generally, in deep learning \\cite{He2017}, it is common to use a quadratic penalty for imposing an inequality constraint: ${\\cal P}(f_i(S_{\\boldsymbol{\\theta}})) = [f_i(S_{\\boldsymbol{\\theta}})]_+^2$, where $[x]_+ = \\max (0,x)$ denotes the rectifier function. Fig. \\ref{fig:logBarrier} depicts different penalty functions. Penalties are convenient for deep networks because they remove the requirement for explicit Lagrangian-dual optimization. The inequality constraints are fully handled within stochastic optimization, as\n in standard unconstrained losses, avoiding gradient ascent iterates\/projections over the dual variables and reducing the computational load for training \\cite{kervadec2019constrained}. However, this simplicity of\n penalty methods comes at a price. In fact, it is well known that penalties do not guarantee constraint satisfaction and require careful and {\\em ad hoc} tuning of the relative importance (or weight)\n of each penalty term in the overall function. More importantly, in the case of several competing constraints, penalties do not act as {\\em barriers} at the boundary of the feasible set (i.e., a satisfied constraint yields a null penalty and null gradient). As a result, a subset of constraints that are satisfied at one iteration may not be satisfied at the next. Take the case of two competing constraints $f_1$ and $f_2$ at the current iteration (assuming gradient-descent optimization), and suppose that $f_1$ is satisfied but $f_2$ is not. The gradient of a penalty $\\cal P$ w.r.t the term of satisfied constraint $f_1$ is null, and the the penalty approach will focus solely on satisfying $f_2$. Therefore, due to a null gradient, there is nothing that prevents satisfied constraint $f_1$ from being violated. This could lead to oscillations between competing constraints during iterations, making the training unstable (we will give examples in the experiments).\n \n \n Lagrangian optimization can deal with these difficulties, and has several well-known theoretical\n and practical advantages over penalty methods \\cite{Fletcher1987,Gill1981}: it finds automatically the optimal weights of the constraints, acts as a barrier for satisfied constraints and guarantees constraint satisfaction when feasible solutions exist.\n Unfortunately, as pointed out recently in \\cite{Marquez-Neila2017,kervadec2019constrained}, these advantages of Lagrangian optimization do not materialize in practice in the context of deep CNNs. Apart from the computational-feasibility aspects, which the recent works in \\cite{Marquez-Neila2017,pathak2015constrained} address to some extent with approximations, the performances of Lagrangian optimization are, surprisingly, below those obtained with simple, much less computationally intensive penalties \\cite{Marquez-Neila2017,kervadec2019constrained}. This is, for instance, the case of the recent weakly supervised CNN semantic segmentation results in \\cite{kervadec2019constrained}, which showed that a simple quadratic-penalty formulation of inequality constraints outperforms substantially the Lagrangian method in \\cite{pathak2015constrained}. Also, the authors of \\cite{Marquez-Neila2017} reported surprising results in the context of 3D human pose estimation. In their case, replacing the equality constraints with simple quadratic penalties yielded better results\n than Lagrangian optimization.\n\n \\subsection{Contributions}\n \n Interior-point and log-barrier methods can approximate Lagrangian optimization by starting from a feasible solution and solving unconstrained problems, while completely avoiding explicit dual steps and projections. Unfortunately, despite their well-established advantages over penalties, such standard log-barriers were not used before in deep CNNs because finding a feasible set of initial network parameters is not trivial, and is itself a challenging constrained-CNN problem. We propose {\\em log-barrier extensions}, which approximate Lagrangian optimization of constrained-CNN problems with a sequence of unconstrained losses, without the need for an initial feasible set of network parameters. Furthermore, we provide a new theoretical result, which shows that the proposed extensions yield a duality-gap bound. This generalizes the standard duality-gap result of log-barriers, yielding sub-optimality certificates for feasible solutions in the case of convex losses. While sub-optimality is not guaranteed for non-convex problems, our result shows that log-barrier extensions are a principled way to approximate Lagrangian optimization for constrained CNNs via {\\em implicit} dual variables. Our approach addresses the well-known limitations of penalty methods and, at the same time, removes the explicit dual updates of Lagrangian optimization. We report comprehensive experiments showing that our formulation outperforms various penalty-based methods for constrained CNNs, both in terms of accuracy and training stability.\n\n \\section{Background on Lagrangian-dual optimization and the standard log-barrier}\n \\label{sec:log-barrier}\n\n This section reviews both standard Lagrangian-dual optimization and the log-barrier method for constrained problems \\cite{Boyd2004}. We also present basic concepts of duality theory, namely the {\\em duality gap} and $\\epsilon${-suboptimality}, which will be needed when introducing our log-barrier extension and the corresponding duality-gap bound. We also discuss the limitations of standard constrained optimization methods in the context of deep CNNs.\n\n {\\em Lagrangian-dual optimization:} Let us first examine standard Lagrangian optimization for problem \\eqref{Constrained-CNN}:\n \\begin{equation}\n \\label{Lagrangian}\n {\\cal L}(S_{\\boldsymbol{\\theta}}, \\boldsymbol{\\lambda}) = {\\cal E}(\\boldsymbol{\\theta}) + \\sum_{i=1}^{N} \\lambda_i f_i (S_{\\boldsymbol{\\theta}})\n \\end{equation}\n where $\\boldsymbol{\\lambda}=(\\lambda_1, \\dots, \\lambda_N)$ is the dual variable (or Lagrange-multiplier) vector, with $\\lambda_i$ the multiplier associated with\n constraint $f_i (S_{\\boldsymbol{\\theta}}) \\leq 0$. The dual function is the minimum value of Lagrangian \\eqref{Lagrangian} over $\\boldsymbol{\\theta}$: $g(\\boldsymbol{\\lambda}) = \\min_{\\boldsymbol{\\theta}} {\\cal L}(S_{\\boldsymbol{\\theta}}, \\boldsymbol{\\lambda})$. A dual feasible $\\boldsymbol{\\lambda}\\geq0$ yields a lower bound on the optimal value of constrained problem \\eqref{Constrained-CNN}, which we denote ${\\cal E}^*$: $g(\\boldsymbol{\\lambda}) \\leq {\\cal E}^*$. This important inequality can be easily verified, even when the problem \\eqref{Constrained-CNN} is not convex; see \\cite{Boyd2004}, p. 216. It follows that a dual feasible $\\boldsymbol{\\lambda}$ gives a sub-optimality certificate for a given feasible point $\\boldsymbol{\\theta}$, without knowing the exact value of ${\\cal E}^*$:\n ${\\cal E}(\\boldsymbol{\\theta}) - {\\cal E}^* \\leq {\\cal E}(\\boldsymbol{\\theta}) - g(\\boldsymbol{\\lambda})$. Nonnegative quantity ${\\cal E}(\\boldsymbol{\\theta}) - g(\\boldsymbol{\\lambda})$ is the duality gap for primal-dual pair $(\\boldsymbol{\\theta}, \\boldsymbol{\\lambda})$. If we manage to find a feasible primal-dual pair $(\\boldsymbol{\\theta}, \\boldsymbol{\\lambda})$ such that the duality gap is less or equal than a certain $\\epsilon$, then primal feasible $\\boldsymbol{\\theta}$ is $\\epsilon${-suboptimal}.\n \\begin{Defn}\n A primal feasible point $\\boldsymbol{\\theta}$ is $\\epsilon${\\em-suboptimal} when it verifies: ${\\cal E}(\\boldsymbol{\\theta}) - {\\cal E}^* \\leq \\epsilon$.\n \\end{Defn}\n This provides a non-heuristic stopping criterion for Lagrangian optimization, which alternates two iterative steps, one primal and one dual, each decreasing\n the duality gap until a given accuracy $\\epsilon$ is attained\\footnote{Strong duality should hold if we want to achieve arbitrarily small tolerance $\\epsilon$.\n Of course, strong duality does not hold in the case of CNNs as the primal problem is not convex.}. In the context of CNNs \\cite{pathak2015constrained}, the primal step minimizes the Lagrangian w.r.t. $\\boldsymbol{\\theta}$, which corresponds to training a deep network with stochastic optimization, e.g., SGD: $\\argmin_{\\boldsymbol{\\theta}} {\\cal L}(S_{\\boldsymbol{\\theta}}, \\boldsymbol{\\lambda})$. The dual step is a constrained maximization of the dual function\\footnote{Notice that the dual function is always concave as it is the minimum of a family of affine functions, even when the original (or primal) problem is not convex, as is the case for CNNs.} via projected gradient ascent: $\\max_{\\boldsymbol{\\lambda}} g(\\boldsymbol{\\lambda}) \\, \\, \\mbox{s.t} \\, \\, \\boldsymbol{\\lambda}\\geq0$. As mentioned before, direct use of Lagrangian optimization for deep CNNs increases computational complexity and can lead to instability or poor convergence due to the interplay between stochastic optimization for the primal and the iterates\/projections for the dual.\n Our work approximates Lagrangian-dual optimization with a sequence of unconstrained log-barrier-extension losses, in which the dual\n variables are {\\em implicit}, avoiding explicit dual iterates\/projections. Let us first review the standard log-barrier method.\n\n {\\em The standard log-barrier:} The log-barrier method is widely used for inequality-constrained optimization, and belongs to the\n family of {\\em interior-point} techniques \\cite{Boyd2004}. To solve our constrained CNN problem \\eqref{Constrained-CNN} with this\n method, we need to find a strictly feasible set of network parameters $\\boldsymbol{\\theta}$ as a starting point, which can then be used in an\n unconstrained problem via the standard log-barrier function. In the general context of optimization, log-barrier methods proceed in two steps.\n The first, often called {\\em phase I} \\cite{Boyd2004}, computes a feasible point by Lagrangian minimization of a constrained problem, which in the\n case of \\eqref{Constrained-CNN} is:\n \\begin{align}\n \\label{Feasible_point_computation}\n &\\min_{x, \\boldsymbol{\\theta}} \\ x \\ \\ \\nonumber \\\\ &\\mathrm{s.t.} \\ f_i(S_{\\boldsymbol{\\theta}}) \\leq x, \\, i=1, \\dots N\n \\end{align}\n For deep CNNs with millions of parameters, Lagrangian optimization of problem \\eqref{Feasible_point_computation} has the same difficulties as with the\n initial constrained problem in \\eqref{Constrained-CNN}. To find a feasible set of network parameters, one needs to alternate CNN training and projected gradient ascent for the dual variables. This might explain why such interior-point methods, despite their substantial impact in optimization \\cite{Boyd2004}, are mostly overlooked in modern deep networks\\footnote{Interior-point methods were investigated for artificial neural networks before the deep learning era \\cite{Trafalis1997}.}, as is generally the case for other Lagrangian-dual optimization methods.\n\n The second step, often referred to as {\\em phase II}, approximates \\eqref{Constrained-CNN} as an unconstrained problem:\n \\begin{equation}\n \\label{log-barrier-problem}\n \\min_{\\boldsymbol{\\theta}} \\, {\\cal E}(\\boldsymbol{\\theta}) + \\sum_{i=1}^{N} \\psi_t \\left ( f_i(S_{\\boldsymbol{\\theta}}) \\right )\n \\end{equation}\n where $\\psi_t$ is the log-barrier function: $\\psi_t (z) = -\\frac{1}{t} \\log (-z)$. When $t \\rightarrow + \\infty$, this convex, continuous and\n twice-differentiable function approaches a hard indicator for the constraints: $H(z) = 0$ if $z \\leq 0$ and $+\\infty$ otherwise; see Fig. \\ref{fig:logBarrier} (a) for an illustration.\n The domain of the function is the set of feasible points. The higher $t$, the better the quality of the approximation. This suggest that large $t$ yields a good approximation of the initial constrained problem in \\eqref{Constrained-CNN}. This is, indeed, confirmed with the following standard duality-gap result for the log-barrier method \\cite{Boyd2004}, which shows that optimizing \\eqref{log-barrier-problem} yields a solution that is $N\/t$-suboptimal.\n\n \\begin{Prop}\n \\label{prop:duality-gap-log-barrier}\n Let $\\boldsymbol{\\theta}^*$ be the feasible solution of unconstrained problem \\eqref{log-barrier-problem} and $\\boldsymbol{\\lambda}^*=(\\lambda^*_1, \\dots, \\lambda^*_N)$, with $\\lambda^*_i= - 1\/(t f_i(S_{\\boldsymbol{\\theta}}))$. Then, the duality gap associated with primal feasible $\\boldsymbol{\\theta}^*$ and dual feasible $\\boldsymbol{\\lambda}^*$ for the initial constrained problem in \\eqref{Constrained-CNN} is: \n \\[{\\cal E}(\\boldsymbol{\\theta}^*) - g(\\boldsymbol{\\lambda}^*) = N\/t \\]\n \\end{Prop}\n\n {\\em Proof}: The proof can be found in \\cite{Boyd2004}, p. 566. \\qed\n\n \\begin{figure*}[h!]\n \\centering\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/log_barrier}\n \\caption{Standard log-barrier}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/extended_log_barrier}\n \\caption{Proposed log-barrier extension}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/quadra_relu}\n \\caption{Examples of penalty functions}\n \\end{subfigure}\n \\caption{A graphical illustration of the standard log-barrier in (a), the proposed log-barrier extension in (b) and several examples of \n penalty functions in (c). The solid curves in colors illustrate several values of $t$ for functions $\\psi_t (z)$, $\\tilde \\psi_t (z)$ \n and the ReLU penalty given by $f_t(z) = \\max(0, tz)$. The dashed lines depict both barrier and penalty functions when $t \\rightarrow + \\infty$.}\n \\label{fig:logBarrier}\n \\end{figure*}\n\n An important implication that follows immediately from proposition \\eqref{prop:duality-gap-log-barrier} is that a feasible solution of approximation \\eqref{log-barrier-problem} is $N\/t$-suboptimal: ${\\cal E}(\\boldsymbol{\\theta}^*) - {\\cal E}^* \\leq N\/t$. This suggests a simple way for solving the initial constrained problem with a guaranteed $\\epsilon${-suboptimality}: We simply choose large $t = N\/\\epsilon$ and solve unconstrained problem \\eqref{log-barrier-problem}. However, for large $t$, the log-barrier function is difficult to minimize because its gradient varies rapidly near the boundary of the feasible set. In practice, log-barrier methods solve a sequence of problems of the form \\eqref{log-barrier-problem}\n with an increasing value $t$. The solution of a problem is used as a starting point for the next, until a specified $\\epsilon$-suboptimality is reached.\n\n \\section{Log-barrier extensions}\n \\label{sec:extensions}\n\n We propose the following unconstrained loss for approximating Lagrangian optimization of constrained problem \\eqref{Constrained-CNN}:\n \\begin{equation}\n \\label{log-barrier-extension-problem}\n \\min_{\\boldsymbol{\\theta}} \\, {\\cal E}(\\boldsymbol{\\theta}) + \\sum_{i=1}^{N} \\tilde{\\psi}_t \\left ( f_i(S_{\\boldsymbol{\\theta}}) \\right )\n \\end{equation}\n where $\\tilde{\\psi}_t$ is our {\\em log-barrier extension}, which is convex, continuous and twice-differentiable:\n \\begin{equation}\n \\label{log-barrier extension}\n \\tilde{\\psi}_{t}(z) =\n \\begin{cases}\n -\\frac{1}{t} \\log (-z) & \\text{if } z \\leq -\\frac{1}{t^2} \\\\\n tz - \\frac{1}{t} \\log (\\frac{1}{t^2}) + \\frac{1}{t} & \\text{otherwise}\n \\end{cases}\n \\end{equation}\n Similarly to the standard log-barrier, when $t \\rightarrow + \\infty$, our extension \\eqref{log-barrier extension} can be viewed a smooth approximation of hard indicator function $H$; see Fig. \\ref{fig:logBarrier} (b). However, a very important difference is that the domain of our extension $\\tilde{\\psi}_{t}$ is not restricted to feasible points $\\boldsymbol{\\theta}$.\n Therefore, our approximation \\eqref{log-barrier-extension-problem} removes completely the requirement for\n explicit Lagrangian-dual optimization for finding a feasible set of network parameters. In our case, the inequality constraints are fully handled within stochastic optimization, as in standard unconstrained losses, avoiding completely gradient ascent iterates and projections over {\\em explicit} dual variables. As we will see in the experiments, our formulation yields better results in terms of accuracy and stability than the recent penalty constrained CNN method in \\cite{kervadec2019constrained}.\n\n In our approximation in \\eqref{log-barrier-extension-problem}, the Lagrangian dual variables for the initial inequality-constrained problem of \\eqref{Constrained-CNN}\n are {\\em implicit}. We prove the following duality-gap bound, which yields sub-optimality certificates for feasible solutions of our approximation\n in \\eqref{log-barrier-extension-problem}. Our result\\footnote{Our result applies to the general context of convex optimization. In deep CNNs, of course, a feasible solution of our approximation may not be unique and is not guaranteed to be a global optimum as ${\\cal E}$ and the constraints are not convex.} can be viewed as an extension of the standard result in proposition \\ref{prop:duality-gap-log-barrier}, which expresses the duality-gap as a function of $t$ for the log-barrier function.\n \\begin{Prop}\n \\label{prop:duality-gap-log-barrier-extension}\n Let $\\boldsymbol{\\theta}^*$ be the solution of problem \\eqref{log-barrier-extension-problem} and $\\boldsymbol{\\lambda}^*=(\\lambda^*_1, \\dots, \\lambda^*_N)$ the corresponding vector of\n implicit Lagrangian dual variables given by:\n \\begin{equation}\n \\label{implicit-dual-barrier-extension-initial}\n \\lambda^*_i = \\begin{cases}\n -\\frac{1}{t f_i(S_{\\boldsymbol{\\theta}^*})} & \\text{if } f_i(S_{\\boldsymbol{\\theta}^*}) \\leq -\\frac{1}{t^2} \\\\\n t & \\text{otherwise}\n \\end{cases} .\n \\end{equation}\n Then, we have the following upper bound on the duality gap associated with primal $\\boldsymbol{\\theta}^*$ and implicit dual feasible $\\boldsymbol{\\lambda}^*$ for the initial inequality-constrained problem \\eqref{Constrained-CNN}:\n \\[ {\\cal E}(\\boldsymbol{\\theta}^*) - g(\\boldsymbol{\\lambda}^*) \\leq N\/t \\]\n \\end{Prop}\n {\\em Proof:} We give a detailed proof of Prop. \\ref{prop:duality-gap-log-barrier-extension} in the Appendix. \\qed\n\n From proposition \\ref{prop:duality-gap-log-barrier-extension}, the following important fact follows immediately: If the solution $\\boldsymbol{\\theta}^*$ that we obtain from\n unconstrained problem \\eqref{log-barrier-extension-problem} is feasible and global, then it is $N\/t$-suboptimal for constrained problem \\eqref{Constrained-CNN}:\n ${\\cal E}(\\boldsymbol{\\theta}^*) - {\\cal E}^* \\leq N\/t$.\n\n Finally, we arrive to our constrained CNN learning algorithm, which is fully based on SGD. Similarly to the standard log-barrier algorithm, we use a varying parameter $t$. We optimize a sequence of losses of the form \\eqref{log-barrier-extension-problem} and increase gradually the value $t$ by a factor $\\mu$. The network parameters obtained for the current $t$ and epoch are used as a starting point for the next $t$ and epoch. Steps of the proposed constrained CNN learning algorithm are detailed in Algorithm \\ref{algo:logbarrier}.\n \n {\\em On the fundamental differences between our log-barrier extensions and penalties:} It is important to note that making the log-barrier extension gradually harder by increasing parameter $t$ is not a crucial difference between our formulation and standard penalties. In fact, we can also make standard penalties stricter with a similar gradual increase of $t$ (we will present experiments on this in the next section). The fundamental differences are: \n \\begin{itemize}\n \\item A penalty does not act as a barrier near the boundary of the feasible set, i.e., a satisfied constraint yields null penalty and gradient. Therefore, at a given gradient update, there is nothing that prevents a satisfied constraint from being violated, causing oscillations between competing constraints and making the training unstable; See Figs. \\ref{fig:learning_curves} (a) and (d) for an illustration. On the contrary, the strictly positive gradient of our log-barrier extension gets higher when a satisfied constraint approaches violation during optimization, pushing it back towards the feasible set.\n \\vspace{0.25cm}\n \\item Another fundamental difference is that the derivatives of our log-barrier extensions yield the implicit dual variables in Eq. \\eqref{implicit-dual-barrier-extension-initial}, with sub-optimality and duality-gap guarantees, which is not the case for penalties. Therefore, our log-barrier extension mimics Lagrangian optimization, but with implicit rather than explicit \n dual variables. The detailed proof of Prop. \\ref{prop:duality-gap-log-barrier-extension} in the Appendix clarifies how the $\\lambda^*_i$'s in Eq. \\eqref{implicit-dual-barrier-extension-initial} can be viewed as implicit dual variables. \n \\end{itemize}\n \n \\begin{algorithm\n \\BlankLine\n \\textbf{Given} initial non-strictly feasible $\\theta, t:=t^{(0)} > 0, \\mu > 1$ \\\\\n \\BlankLine\n \\textbf{Repeat} (for \\textit{n} epochs) \\\\\n \\BlankLine\n \\qquad Compute $\\theta^*(t)$ by minimizing \\eqref{log-barrier-extension-problem} via SGD, starting at $\\theta$ \\\\\n \\qquad Update $\\theta. \\rightarrow \\quad \\theta:=\\theta^*(t)$ \\\\\n \\qquad Increase $t. \\rightarrow \\quad t :=\\mu t$\\\\\n \\BlankLine\n \\caption{Log-barrier-extension training for constrained CNNs}\n \\label{algo:logbarrier}\n \\end{algorithm}\n\n \\section{Experiments}\n \n Both the proposed log-barrier extension and the standard quadratic penalty in \\cite{kervadec2019constrained}, i.e., ${\\cal P}(f_i(S_{\\boldsymbol{\\theta}})) = [f_i(S_{\\boldsymbol{\\theta}})]_+^2$, are compatible with any differentiable function $f_i(S_{\\boldsymbol{\\theta}})$, including non-linear and fractional terms, as in Eqs. \\eqref{eq:soft_size} and \\eqref{eq:soft_centroid} introduced further in the paper. However, we hypothesize that our log-barrier extension is better for handling the interplay between multiple competing constraints. To validate this hypothesis, we compare both strategies on the joint optimization of two segmentation constraints related to region size and centroid. Furthermore, we included comparisons with a ReLU penalty, which parameterized by a gradually increasing $t$, in a way exactly similar to our log-barrier extension: $f_t(z) = \\max(0, tz)$.\n Also, the ReLU penalty has a linear behaviour on the non-feasible set, similarly to our log-barrier extension. Therefore, a comparison with a gradually stricter ReLU on multiple constraints will confirm the importance of the barrier effect of our log-barrier extensions on the feasible set, which we discussed in the previous section. We will not compare directly to the Lagrangian optimization in \\cite{pathak2015constrained} because the recent weakly supervised CNN segmentation results in \\cite{kervadec2019constrained} showed that a quadratic-penalty formulation of inequality constraints outperforms substantially the Lagrangian method in \\cite{pathak2015constrained}, in terms of performance and training stability. Therefore, we focus our comparisons on several penalties. \n\n{\\em Region-size constraint:}\n For a partially-labeled image, we define the size (or volume) of a segmentation for class $k$ as the sum of its softmax predictions over the image domain:\n \\begin{equation}\n \\label{eq:soft_size}\n \\mathcal{V}_{\\boldsymbol{\\theta}}^k = \\sum_{p \\in \\Omega} s^k_{p,\\boldsymbol{\\theta}}\n \\end{equation}\n Notice that we use the softmax predictions to approximate size because using the discrete binary values after thresholding would not be differentiable. In practice, we can make network predictions $s^k_{p,\\boldsymbol{\\theta}}$ close to binary values using a large enough temperature parameter in the softmax function. We use the following inequality constraints on region size:\n $0.9 \\tau_{\\mathcal{V}^k} \\leq \\mathcal{V}_{\\boldsymbol{\\theta}}^k \\leq 1.1 \\tau_{\\mathcal{V}^k}$,\n where, similarly to the experiments in \\cite{kervadec2019constrained}, $\\tau_{\\mathcal{V}^k} = \\sum_{p \\in \\Omega} y_p^k$ is determined from the ground truth of each image\\footnote{Since our focus is on evaluating and comparing constrained-optimization methods, we did not add additional processes to estimate the bounds without complete annotations of each training image. One can, however, use a single fully annotated training image to obtain such bounds or use an auxiliary learning to estimate region attributes such as size \\cite{Kervadec2019MICCAI}.}. \n\n {\\em Region-centroid constraints:}\n The centroid of the predicted region can be computed as a weighted average of the pixel coordinates:\n \\begin{equation}\n \\label{eq:soft_centroid}\n \\mathcal{C}_{\\boldsymbol{\\theta}}^k = \\frac{\\sum_{p\\in\\Omega} s_{p,\\boldsymbol{\\theta}}^k c_p}{\\sum_{p \\in \\Omega} s_{p,\\boldsymbol{\\theta}}^k},\n \\end{equation}\n where $c_p \\in \\mathbb{N}^2$ are the pixel coordinates on a 2D grid.\n We constrain the position of the centroid in a box around the ground-truth centroid:\n $ \\tau_{\\mathcal{C}^k} - 20 \\leq \\mathcal{C}_{\\boldsymbol{\\theta}}^k \\leq \\tau_{\\mathcal{C}^k} + 20$,\n with $\\tau_{\\mathcal{C}^k} = \\frac{\\sum_{p\\in\\Omega} y_p^k c_p}{\\sum_{p \\in \\Omega} y_p^k}$ corresponding to the bound values associated\n with each image.\n\n \\subsection{Datasets and evaluation metrics}\n \\label{ssec:dataset}\n Our evaluations and comparisons were performed on three different segmentation scenarios using synthetic, medical and color images. The data sets used in each of these problems are detailed below. \n\n \\begin{figure}[ht!]\n \\centering\n \\includegraphics[width=.85\\textwidth]{Images\/prostate_labels}\n \\caption{Full mask of the prostate (\\textit{top}) and the generated point annotations (\\textit{bottom}). The background is depicted in red, and the foreground in green. No color means that no information is provided about the pixel class. The figures are best viewed in colors.}\n \\label{fig:prostate_labels}\n \\end{figure}\n\n \\begin{itemize}\n \\item \\textbf{Synthetic images:}\n We generated a synthetic dataset composed of 1100 images with two different circles of the same size but different colors, and different levels of Gaussian noise added to the whole image. The target region is the darker circle. From these images, 1000 were employed for training and 100 for validation; See Fig. \\ref{fig:cherry_toy}, first column, for illustration. No pixel annotation is used during training ($\\Omega_{\\mathcal{L}} = \\{ \\emptyset \\}$). The objective of this simple dataset is to compare our log-barrier extension with several penalties \n \n in three different constraint settings: 1) only size, 2) only centroid, and 3) both constraints. For the first two settings, we expect both methods to fail since the corresponding segmentation problems are under-determined (e.g., size is not sufficient to determine which circle is the correct one). On the other hand, the third setting provides enough information to segment the right circle, and the main challenge here is the interplay between the two different constraints.\n\n \\item \\textbf{Medical images:} We use the PROMISE12 \\cite{litjens2014evaluation} dataset, which was made available for the MICCAI 2012 prostate segmentation challenge. Magnetic Resonance (MR) images (T2-weighted) of 50 patients with various diseases were acquired at different locations with several MRI vendors and scanning protocols. We hold 10 patients for validation and use the rest for training. As in \\cite{kervadec2019constrained}, we use partial cross entropy for the weakly supervised setting, with weak labels derived from the ground truth by placing random dots inside the object of interest (Fig. \\ref{fig:prostate_labels}).\n \n For this data set, we impose constraints on the size of the target region, as in \\cite{kervadec2019constrained}.\n\n \\item \\textbf{Color images:} We also evaluate our method on the Semantic Boundaries Dataset (SBD), which can be seen as a scaling of the original PascalVOC segmentation benchmark. We employed the 20 semantic categories of PascalVOC. This dataset contains 11318 fully annotated images, divided into 8498 for training and 2820 for testing. We obtained the scribble annotations from the public repository of ScribbleSup \\cite{scribblesup}, and took the intersection between both datasets for our experiments. Thus, a total of 8829 images were used for training, and 1449 for validation.\n \\end{itemize}\n\n For the synthetic and PROMISE12 datasets, we resort to the common \\text{Dice index} (DSC) = $\\frac{2|S \\bigcap Y|}{|S|+|Y|}$ to evaluate the performance of tested methods. For PascalVOC, we follow most studies on this dataset and use the mean Intersection over Union (mIoU) metric.\n\n \\begin{figure*}[ht!]\n \n \n\n \n\n \n\n \n \n \n \\centering\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/toy_tra_dice}\n \\caption{Synthetic dataset training dice.}\n \\label{fig:toy_training_dice_suplt}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/prostate_tra_dice}\n \\caption{PROMISE12 dataset training dice.}\n \\label{fig:prostate_training_dice_suplt}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/train_mIoU_plot}\n \\caption{PascalVOC training mIoU.}\n \\label{fig:pascal_training_miou_suplt}\n \\end{subfigure}\n \\\\\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/toy_val_dice}\n \\caption{Synthetic dataset validation dice}\n \\label{fig:toy_validation_dice}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/prostate_val_batch_dice}\n \\caption{PROMISE12 dataset validation dice}\n \\label{fig:prostate_validation_dice}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.33\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/val_mIoU_plot}\n \\caption{PascalVOC validation mIoU}\n \\label{fig:pascal_validatio_miou}\n \\end{subfigure}\n\n \\caption{Learning curves on the three data sets, for both the training and validation sets. Best viewed in colors.}\n \\label{fig:learning_curves}\n \\end{figure*}\n\n \\subsection{Training and implementation details}\n Since the three datasets have very different characteristics, we considered a specific network architecture and training strategy for each of them.\n\n For the dataset of synthetic images, we used the ENet network \\cite{paszke2016enet}, as it has shown a good trade-off between accuracy and inference time. The network was trained from scratch using the Adam optimizer and a batch size of 1. The initial learning rate was set to $5 \\times 10\\textsuperscript{-4}$ and decreased by half if validation performance did not improve for 20 epochs. Softmax temperature value was set to 5. To segment the prostate, we used the same settings as in \\cite{kervadec2019constrained}, reporting their results for the penalty-based baselines.\n \n For PascalVOC, we used a Pytorch implementation of the FCN8s model \\cite{FCN}, built upon a pre-trained VGG16 \\cite{simonyan2014very} from the Torchvision model zoo\\footnote{\\url{https:\/\/pytorch.org\/docs\/stable\/torchvision\/models.html}}. We trained this network with a batch size of 1 and a constant learning rate of 10$\\textsuperscript{-5}$ over time. Regarding the weights of the penalties and log-barrier terms we investigated several values and we obtained the best performances with 10$\\textsuperscript{-4}$ and 10$\\textsuperscript{-2}$, respectively.\n\n For all tasks, we set to 5 the initial $t$ value of our extended log-barrier (Algorithm \\ref{algo:logbarrier}). We increased it by a factor of $\\mu=1.1$ after each epoch. This strategy relaxes constraints in the first epochs so that the network can focus on learning from images, and then gradually makes these constraints harder as optimization progresses. The same scheduling is used for the ReLU baseline.\n Experiments on the toy example and PascalVOC were implemented in Python 3.7 with PyTorch 1.0.1 \\cite{paszke2017automatic}, whereas\n we followed the same specifications as \\cite{kervadec2019constrained} for the prostate experiments, employing Python 3.6 with PyTorch 1.0. All the experiments were carried out on a server equipped with a NVIDIA Titan V. The code is publicly available\\footnote{\\url{https:\/\/github.com\/LIVIAETS\/extended_logbarrier}}.\n\n \\subsection{Results}\n \\label{sssec:results}\n The following sections report the experimental results and comparisons on the three datasets introduced in Sec. \\ref{ssec:dataset}.\n\n \\subsubsection{Synthetic images}\n Results on the synthetic example for our log-barrier extensions and the penalty-based approaches are reported in Table \\ref{tab:numbers_toy}. As expected, constraining the size only is not sufficient to locate the correct circle (2nd, 5th and 8th columns in Fig. \\ref{fig:cherry_toy}), which explains the very low DSC values in the second column of Table \\ref{tab:numbers_toy}. However, we observe that the different optimization strategies lead to very different solutions, with sparse unconnected dots for the penalty-based methods and a continuous shape for our log-barrier extension. This difference could be due to the high gradients of the penalty method in the first iterations, which strongly biases the network toward bright pixels. Constraining the centroid only locates the target region, but misses the correct boundaries (3rd, 6th and 9th columns in Fig. \\ref{fig:cherry_toy}). Notice that for the centroid constraint, which corresponds to a difficult fractional term, our log-barrier yielded a much better performance than the penalties, with about $12\\%$ improvement over the quadratic penalty and $6\\%$ improvement over the paramterized ReLU penalty. \n The most interesting scenario is when both the size and centroid are constrained. In Fig. \\ref{fig:toy_validation_dice}, we can see that the penalty-based methods, both quadratic and ReLU with parameter $t$, are unstable during training, and have significantly lower performances than log-barrier extension; see the last column of Table \\ref{tab:numbers_toy}. This demonstrates the barrier's effectiveness in preventing predictions from going out of bounds (Fig. \\ref{fig:logBarrier}), thereby making optimization more stable. Notice that the gradually harder ReLU has the same performances and unstable behaviour as the quadratic penalty, which confirms the importance of the barrier effect when dealing with multiple constraints.\n \n \n \n \n\n \\begin{table}[ht!]\n \\centering\n \\footnotesize\n \\begin{tabular}{l|c|c||c}\n \\toprule\n & \\multicolumn{3}{c}{\\textbf{Constraints}} \\\\\n \\hline\n \\textbf{Method} & \\textbf{Size} & \\textbf{Centroid} & \\textbf{Size \\& Centroid} \\\\\n \\hline\n ReLU penalty (w\/ param. $t$) & 0.0087 & 0.3770 & \\textbf{0.8731} \\\\\n Quadratic penalty \\cite{kervadec2019constrained} & 0.0601 & 0.3197 & \\textbf{0.8514} \\\\\n Log-barrier extensions & 0.0018 & 0.4347 & \\textbf{0.9574} \\\\\n \\bottomrule\n \\end{tabular}\n \\caption{Validation Dice on the synthetic example for several optimization methods and constraint settings. }\n \\label{tab:numbers_toy}\n \\end{table}\n\n \\begin{figure*}[h!]\n \n \\centering\n \\includegraphics[width=\\textwidth]{Images\/toy_cherrypick}\n \\caption{Results of constrained CNNs on a synthetic example using the penalty-based methods and our log-barrier extension. The background is depicted in red, and foreground in green. Best viewed in colors. }\n \\label{fig:cherry_toy}\n \\end{figure*}\n\n \\subsubsection{PROMISE12 dataset}\n Quantitative results on the prostate segmentation task are reported in Table \\ref{tab:numbers_prostate_pascal} (\\textit{left} column). Without prior information, i.e., using only the scribbles, the trained model completely fails to achieve a satisfactory performance, with a mean Dice coefficient of 0.032. It can be observed that integrating the target size during training significantly improves performance. While constraining the predicted segmentation with a penalty-based method \\cite{kervadec2019constrained} achieves a DSC value of nearly 0.83, imposing the constraints with our log-barrier extension increased the performance by an additional 2\\%. The use of log-barrier extensions to constrain the CNN predictions reduces the gap towards the fully supervised model, with only 4\\% of difference between both.\n\n \n \n\n \\begin{table}[ht!]\n \\footnotesize\n \\centering\n \\begin{tabular}{l|c|c}\n \\toprule\n & \\multicolumn{2}{c}{\\textbf{Dataset}} \\\\\n \\hline\n \\textbf{Method} & PROMISE12 (DSC) & VOC2012 (mIoU) \\\\\n \\hline\\hline\n Partial cross-entropy & 0.032 (0.015) & 48.48 (14.88) \\\\\n \\quad w\/ quadratic penalty \\cite{kervadec2019constrained} & 0.830 (0.057) & 52.22 (14.94) \\\\\n \\quad w\/ extended log-barrier & \\textbf{0.852} (0.038) & \\textbf{53.40} (14.62) \\\\\n \\hline\n Full supervision & 0.891 (0.032) & 59.87 (16.94) \\\\\n \\bottomrule\n \\end{tabular}\n \\caption{Mean and standard deviation on the validation set of the PROMISE12 and PascalVOC datasets when networks are trained with several levels of supervision.}\n \\label{tab:numbers_prostate_pascal}\n \\end{table}\n\n \\begin{figure}[ht!]\n \\centering\n \\includegraphics[width=1\\textwidth]{Images\/prostate_cherrypick}\n \\caption{Results on the PROMISE12 dataset. Images are cropped for visualization purposes. The background is depicted in red, and foreground in green. The figures are best viewed in colors.}\n \\label{fig:cherry_prostate}\n \\end{figure}\n\n \\subsubsection{PascalVOC}\n Table \\ref{tab:numbers_prostate_pascal} (\\textit{right} column) compares the results of our log-barrier extension to those obtained with\n quadratic penalties and partial cross-entropy (i.e., using scribble annotations only), using region-size constraints. \n For reference, we also include the full-supervision results, which serve as an upper bound. From the results, we can see that the quadratic-penalty constraints improve the performances over learning from scribble annotations only by approximately 4\\%, in terms of mIoU. With the proposed log-barrier extension, the mIoU increases up to 53.4\\%, yielding a 1.2\\% of improvement over the quadratic penalty and only a 6.4\\% of gap in comparison to full supervision. The visual results in Fig. \\ref{fig:pascal_cherry} show how the proposed framework for constraining CNN training helps reducing over-segmentation and false positives.\n\n \\begin{figure*}[ht!]\n \n \n \\centering\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_3\/img_2007_005331}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_3\/gt_2007_005331}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_3\/partial_2007_005331}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_3\/penalty_2007_005331}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_3\/log_barrier_2007_005331}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_3\/fs_2007_005331}\n \\end{subfigure}\n\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/img_2011_000479}\n \n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/gt_2011_000479}\n \n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/partial_2011_000479}\n \n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/penalty_2011_000479}\n \n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/log_barrier_2011_000479}\n \n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/fs_2011_000479}\n \n \\end{subfigure}\n\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_000661\/JPEGImages}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_000661\/SegmentationClass}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_000661\/PARTIAL}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_000661\/PENALTY}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_000661\/LOG_BARRIER}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_000661\/FS}\n \\end{subfigure}\n\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001457\/JPEGImages}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001457\/SegmentationClass}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001457\/PARTIAL}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001457\/PENALTY}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001457\/LOG_BARRIER}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001457\/FS}\n \\end{subfigure}\n\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001526\/JPEGImages}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001526\/SegmentationClass}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001526\/PARTIAL}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001526\/PENALTY}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001526\/LOG_BARRIER}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_001526\/FS}\n \\end{subfigure}\n\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_003101\/JPEGImages}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_003101\/SegmentationClass}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_003101\/PARTIAL}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_003101\/PENALTY}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_003101\/LOG_BARRIER}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_003101\/FS}\n \\end{subfigure}\n\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_002618\/JPEGImages}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_002618\/SegmentationClass}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_002618\/PARTIAL}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_002618\/PENALTY}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_002618\/LOG_BARRIER}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/2007_002618\/FS}\n \\end{subfigure}\n\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/img_2011_000479}\n \\caption*{{\\scriptsize Input\\\\image}}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/gt_2011_000479}\n \\caption*{{\\scriptsize GT\\\\~}}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/partial_2011_000479}\n \\caption*{{\\scriptsize Scribbles\\\\only}}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/penalty_2011_000479}\n \\caption*{{\\scriptsize w\/\\\\penalty}}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/log_barrier_2011_000479}\n \\caption*{{\\scriptsize w\/ ext.\\\\log-barrier}}\n \\end{subfigure}\n \\begin{subfigure}[b]{0.158\\textwidth}\n \\includegraphics[width=\\textwidth]{Images\/pascal_cherry\/example_2\/fs_2011_000479}\n \\caption*{{\\scriptsize Full\\\\supervision}}\n \\end{subfigure}\n\n \\caption{Several visual examples on PascalVOC validation set. Best viewed in colors}\n \\label{fig:pascal_cherry}\n \\end{figure*}\n\n\n\n \\section{Conclusion}\n \n \n \n \n \n \n \n We proposed log-barrier extensions, which approximate Lagrangian optimization of constrained-CNN problems with a sequence of unconstrained losses. Our formulation relaxes the need for an initial feasible solution, unlike standard interior-point and log-barrier methods. This makes it convenient for deep networks. We also provided an upper bound on the duality gap for our proposed extensions, thereby generalizing the duality-gap result of standard log-barriers and showing that our formulation has dual variables that mimic implicitly (without dual projections\/steps) Lagrangian optimization. \n Therefore, our implicit Lagrangian formulation can be fully handled with SGD, the workhorse of deep networks. \n We reported comprehensive constrained-CNN experiments, showing that log-barrier extensions outperform several types of penalties, in terms of accuracy and training stability.\n \n While we evaluated our approach in the context of weakly supervised segmentation, log-barrier extensions can be useful in breadth of problems in vision and learning, where constraints occur naturally. This include, for instance, adversarial robustness \\cite{Rony2019CVPR}, stabilizing the training of GANs \\cite{GulrajaniNIPS17}, domain adaptation for segmentation \\cite{curriculumDA2019}, pose-constrained image generation \\cite{poseconstraintsneurips2018}, \n 3D human pose estimation \\cite{Marquez-Neila2017}, and deep reinforcement learning \\cite{He2017}. To our knowledge, for these problems, among others in the context of deep networks, constraints (either equality\\footnote{Note that our framework can also be used for equality constraints as one can transform an equality constraint into two inequality constraints.} or inequality) are typically handled with basic penalties. Therefore, it will be interesting to investigate log-barrier extensions for these problems. \n \n Since our focus was on evaluating and comparing constrained-optimization methods, we defined the constraints from prior knowledge about a few segmentation-region attributes (size and centroid). Such image-level attributes can also be learned from data using auxiliary regression networks, which could be useful in semi-supervision \\cite{Kervadec2019MICCAI} and domain-adaptation \\cite{curriculumDA2019} scenarios. It would interesting to investigate log-barrier extensions in such scenarios and with a much broader set of constraints, for instance, region connectivity or compactness, inter-region relationships and higher-order shape moments\\footnote{Size and centroid are $0^{\\mbox{th}}$ and $1^{\\mbox{st}}$ shape moments.}.\n\n \\appendices\n \\section{Proof of Proposition \\ref{prop:duality-gap-log-barrier-extension}}\n In this section, we provide a detailed proof for the duality-gap bound in Prop. \\ref{prop:duality-gap-log-barrier-extension}.\n Recall our unconstrained approximation for inequality-constrained CNNs:\n \\begin{equation}\n \\label{log-barrier-extension-problem-supp}\n \\min_{\\boldsymbol{\\theta}} \\, {\\cal E}(\\boldsymbol{\\theta}) + \\sum_{i=1}^{N} \\tilde{\\psi}_t \\left ( f_i(S_{\\boldsymbol{\\theta}}) \\right )\n \\end{equation}\n where $\\tilde{\\psi}_t$ is our log-barrier extension, with $t$ strictly positive. Let $\\boldsymbol{\\theta}^*$ be the solution of problem \\eqref{log-barrier-extension-problem-supp}\n and $\\lll^*=(\\lambda^*_1, \\dots, \\lambda^*_N)$ the corresponding vector of implicit dual variables given by:\n \\begin{equation}\n \\label{implicit-dual-barrier-extension}\n \\lambda^*_i = \\begin{cases}\n -\\frac{1}{t f_i(S_{\\boldsymbol{\\theta}^*})} & \\text{if } f_i(S_{\\boldsymbol{\\theta}^*}) \\leq -\\frac{1}{t^2} \\\\\n t & \\text{otherwise}\n \\end{cases}\n \\end{equation}\n We assume that $\\boldsymbol{\\theta}^*$ verifies approximately\\footnote{When optimizing unconstrained loss via stochastic gradient descent (SGD), there is no guarantee that the obtained solution verifies exactly the optimality conditions.} the optimality condition for a minimum of \\eqref{log-barrier-extension-problem-supp}:\n \\begin{equation}\n \\label{optimality-condition-supp}\n \\nabla {\\cal E}(\\boldsymbol{\\theta}^*) + \\sum_{i=1}^{N} \\tilde{\\psi'}_t \\left ( f_i(S_{\\boldsymbol{\\theta}^*}) \\right ) \\nabla f_i(S_{\\boldsymbol{\\theta}^*}) \\approx 0\n \\end{equation}\n It is easy to verify that each dual variable $\\lambda^*_i$ corresponds to the derivative of the log-barrier extension at $f_i(S_{\\boldsymbol{\\theta}^*})$: \n \\begin{equation}\n \\lambda^*_i = \\tilde{\\psi'}_t \\left ( f_i(S_{\\boldsymbol{\\theta}^*}) \\right ) \\nonumber \n \\end{equation}\n Therefore, Eq. \\eqref{optimality-condition-supp} means that\n $\\boldsymbol{\\theta}^*$ verifies approximately the optimality condition for the Lagrangian corresponding to the original inequality-constrained problem in Eq. \\eqref{Constrained-CNN} when $\\lll = \\lll^*$:\n \\begin{equation}\n \\nabla {\\cal E}(\\boldsymbol{\\theta}^*) + \\sum_{i=1}^{N} \\lambda^*_i \\nabla f_i(S_{\\boldsymbol{\\theta}^*}) \\approx 0\n \\end{equation}\n It is also easy to check that the implicit dual variables defined in \\eqref{implicit-dual-barrier-extension} corresponds to a feasible dual, i.e., $\\lll^*>0$\n element-wise. Therefore, the dual function evaluated at $\\lll^*>0$ is:\n \\[ g(\\lll^*) = {\\cal E}(\\boldsymbol{\\theta}^*) + \\sum_{i=1}^{N} \\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}),\\]\n which yields the duality gap associated with primal-dual pair $(\\boldsymbol{\\theta}^*, \\lll^*)$:\n \\begin{equation}\n \\label{duality-gap-supp}\n {\\cal E}(\\boldsymbol{\\theta}^*) - g(\\lll^*) = - \\sum_{i=1}^{N} \\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*})\n \\end{equation}\n Now, to prove that this duality gap is upper-bounded by $N\/t$, we consider three cases for each term in the sum in \\eqref{duality-gap-supp} and verify that, for all the cases, we have $\\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}) \\geq -\\frac{1}{t}$.\n \\begin{itemize}\n \\item $f_i(S_{\\boldsymbol{\\theta}^*}) \\leq -\\frac{1}{t^2}$: In this case, we can verify that $\\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}) = -\\frac{1}{t}$ using the first line of \\eqref{implicit-dual-barrier-extension}.\n\n \\item $-\\frac{1}{t^2} \\leq f_i(S_{\\boldsymbol{\\theta}^*}) \\leq 0$: In this case, we have $\\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}) = t f_i(S_{\\boldsymbol{\\theta}^*})$ from the second line of \\eqref{implicit-dual-barrier-extension}. As $t$ is strictly positive and $f_i(S_{\\boldsymbol{\\theta}^*}) \\geq -\\frac{1}{t^2}$, we have $t f_i(S_{\\boldsymbol{\\theta}^*}) \\geq -\\frac{1}{t}$, which means $\\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}) \\geq -\\frac{1}{t}$.\n\n \\item $ f_i(S_{\\boldsymbol{\\theta}^*}) \\geq 0$: In this case, $\\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}) = t f_i(S_{\\boldsymbol{\\theta}^*}) \\geq 0 > -\\frac{1}{t}$ because $t$ is strictly positive.\n \\end{itemize}\n\n In all the three cases, we have $\\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}) \\geq -\\frac{1}{t}$. Summing this inequality over $i$ gives $- \\sum_{i=1}^N \\lambda_i^* f_i(S_{\\boldsymbol{\\theta}^*}) \\leq \\frac{N}{t}$. Using this inequality in \\eqref{duality-gap-supp} yields the following upper bound on the duality gap associated with primal $\\boldsymbol{\\theta}^*$ and implicit dual feasible $\\lll^*$ for the original inequality-constrained problem:\n \\[{\\cal E}(\\boldsymbol{\\theta}^*) - g(\\lll^*) \\leq N\/t\\]\n \\qed\n\n This bound yields sub-optimality certificates for feasible solutions of our approximation in \\eqref{log-barrier-extension-problem-supp}. If the solution $\\boldsymbol{\\theta}^*$ that we obtain from our unconstrained problem \\eqref{log-barrier-extension-problem-supp} is feasible, i.e., it satisfies\n constraints $f_i(S_{\\boldsymbol{\\theta}^*}) \\leq 0$, $i=1, \\dots, N$, then $\\boldsymbol{\\theta}^*$ is $N\/t$-suboptimal for the original inequality constrained problem: ${\\cal E}(\\boldsymbol{\\theta}^*) - {\\cal E}^* \\leq N\/t$. Our upper-bound result can be viewed as a generalization of the duality-gap equality for the standard log-barrier function \\cite{Boyd2004}. Our result applies to the general context of convex optimization. In deep CNNs, of course, a feasible solution for our approximation may not be unique and is not guaranteed to be a global optimum as ${\\cal E}$ and the constraints are not convex.\n\n \n \\ifCLASSOPTIONcompsoc\n \n \\section*{Acknowledgments}\n \\else\n \n \\section*{Acknowledgment}\n \\fi\n\n This work is supported by the National Science and Engineering Research Council of\nCanada (NSERC), via its Discovery Grant program. \n\n \n \n \\ifCLASSOPTIONcaptionsoff\n \\newpage\n \\fi\n\n \n \n \n \n \n \\bibliographystyle{ieee}\n ","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\nResponses of polyelectrolytes (PEs) to the changes in ionic environment and chain stiffness have been extensively studied in polymer sciences \\cite{OosawaBook,SkolnickMacro77,Barrat93EL,ha1995macromolecules,schiessel1999macromolecules}. \nHowever, new discoveries on the properties of PE are still being made through studies on biopolymers \\cite{Caliskan05PRL,moghaddam09JMB,liu2016BJ,emanuel2009PhysBiol}. \nAlso under active investigation are the effects of other variables and constraints on the higher order organization and dynamics of PE found in biological systems \\cite{needleman2004PNAS,hud2005ARBBS,2015Hyeon198102}.\n\nDemonstrated in both experiments and computational studies \\cite{2000Williams106,2006Hud8174,2001Stevens130,2001Lee3446,2005Muthukumar074905,2013Bachmann028103,2014Maritan064902}, \neven the conformational adaptation of a single PE chain can be highly complex. \nWhereas flexible PE chains form compact globules in the presence of counterions \\cite{schiessel1999macromolecules}, \nthe same condition drives semiflexible PE chains (e.g., dsDNA) to toroidal conformations or metastable rod-like bundles comprised of varying number of racquet structures. \nGeometrical constraints such as confinement \\cite{morrison2009PRE,spakowitz2003PRL} and increasing density of PE could add another level of complexity to the system.\nFor example, DNA chain in a viral capsid or nuclear envelope adopts a densely packed structure with the swelling due to the volume exclusion being suppressed by the confinement and counterions \\cite{2001Kenneth14925,2013Leforestier201,Berndsen14PNAS,2015Hyeon198102}. \nFurther, statistically distinct conformations of DNA emerge depending on the amount and type of counterions being added \\cite{2015Nordenskiold8512,yoo2016NatComm}.\n\n\nPE brush \\cite{1991Pincus2912,1994Zhulina3249}, \na spatial organization with one end of many PE chains densely grafted to 2D surface, is another system of interest to be studied. \nIn particular, the novel functions and adaptability discovered in biopolymer brush \\cite{2007Israelachvili1693} deserve much attention. \nFor example, brush layer of hyaluronic acid, a negatively charged flexible polysaccharide molecule serving as a main component of the extracellular matrix \\cite{2012Richter1466}, modulates the interaction between cells and their environment \\cite{2004Addadi1393}. \nThe brush of Ki-67, a disordered protein bearing a large positive net charge, found on the surface of mitotic chromosomes prevents aggregation of chromosomes \\cite{2016Daniel308}. \n\n\n\nMorphology of a polymer brush condensed in poor solvent has been studied by using theories and simulations for decades \n\\cite{1992Binder586,1993Murat3108,1993Williams1313,1998Zhulina1175,2005Pereira214908,2009Dobrynin13158,2010Szleifer5300,2014Sommer104911,2016Terentjev1894}. \nDepending on the chain stiffness, brush condensates adopt diverse morphological patterns that vary from semi-spherical octopus-like micelle domains to cylindrical bundles of rigid chains which protrude from the grafting surface. \nIt was shown that when the grafting density is in a proper range, multivalent counterions can collapse flexible PE brush even in \\emph{good} solvent into octopus-like surface micelles displaying substantial lateral heterogeneity \\cite{2016Tirrell284,2017Hyeon1579,2017dePablo155}, which has recently been confirmed experimentally for polystyrene sulfonate brush condensates in \\ce{Y(NO_3)_3} solution \\cite{2017Tirrell1497}.\n\nHowever, we note that the aforementioned studies on the formation of surface micelles from ion-induced collapse of PE brush are still at odds with the findings by Bracha \\emph{et al.} \\cite{2014BarZiv4945} which reported fractal-like dendrite domains as a result of multivalent counterion (\\ce{Spd^3+}) induced collapse of DNA brush.\nAlthough the previous studies on flexible PE brush \\cite{2016Tirrell284,2017Hyeon1579,2017dePablo155} captured a number of essential features reported by Bracha \\emph{et al.} \\cite{2014BarZiv4945}, \nqualitative difference in the morphology of brush condensate still exists, thus requiring further investigation.\nTo our knowledge, \nPE brush condensates with dendritic morphology remain unexplored both in theory and computation.\nTo this end, we extended our former work \\cite{2017Hyeon1579} to scrutinize the effect of semiflexibility of PE chain on the brush morphology and dynamics in trivalent counterion solution.\n\n\\begin{figure*}[t]\n\\centering\\includegraphics[width=0.6\\linewidth]{cfg_v2.pdf\n\\caption{\nModel and morphologies of the brush condensates at varying chain stiffness. \n(A) The polyeletrolyte brush was modeled by $16\\times16$ polymer chains, each carrying $N = 80$ negatively charged monomers, \ngrafted in a triangular lattice of spacings $d=16 a$ on the surface at $z=0$. \nIn the presence of trivalent cations (blue dots), \na pre-equilibrated brush forms mutiple bundles, and eventually fully collapses onto the surface. \nFor the sake of visual clarity, monovalent cations releasd from the chains, as well as monovalent anions added with trivalent cations, are not shown. \nIndividual chains are color-coded from blue to red based on their end-to-end distance $R_{ee}$.\n(B) Brush height $H$ and apparent persistence length $l_{p}$ of chains in the brush (see {\\bf Model and Methods}) normalized by $L(=Na)$ at different $\\kappa$ (main panel). \nSix snapshots of brush condensates obtained from simulations performed with different $\\kappa$ are depicted in the smaller panels.\n}\n\\label{cfg}\n\\end{figure*} \n\nIn this study, we adapted a well tested coarse-grained model of strong polyelectrolyte PE brush \\cite{2000Seidel2728,2003Stevens3855,2014Hsiao2900,2017Hyeon1579}. \nAs shown in Fig.~\\ref{cfg}A, total $M (= 16\\times16)$ PE chains were grafted to the triangular lattice on uncharged surface. \nEach PE chain consists of $N (= 80)$ negatively charged monomers and a neutral terminal monomer grafted to the surface.\nThe lattice spacing was selected to ensure the lateral overlap between neighboring chains. \nThe rigidity of PE chains was adjusted by varying the bending rigidity parameter $\\kappa$.\nWe added trivalent salts to the pre-equlibrated PE brush in salt-free condition, and induced the collapse into brush condensate. \nDetails of the model and simulation methods are given in {\\bf Model and Methods}.\nThe results of this work are organized such that we first address the overall morphology of brush condensate under 1:3 stoichiometric condition of trivalent counterion with respect to a monovalent charge on each monomer. \nNext, the local structure of brush chain is characterized by exploiting the liquid crystal order parameters. \nFinally, we investigate the dynamics of brush condensates and of condensed counterion at varying $\\kappa$ by calculating the intermediate scattering function. \n\n\n\n\n\\section{Results}\n{\\bf Morphology of brush condensates. }\nRegardless of the value of $\\kappa$, the PE brush fully collapses onto the grafting surface due to the osmotic pressure of ions, which differs from neutral semiflexible polymer brushes or salt-free PE brushes in poor solvent where the aggregated bundles protrude out of the grafting surface \\cite{2013Zippelius042601,2009Dobrynin13158,2014Sommer104911}. \nThe morphology of the condensate depends critically on $\\kappa$ (Fig.~\\ref{cfg}B).\n(i) For small $\\kappa$ ($\\alt 3$ $k_{B}T\/\\text{rad}^2$, $l_{p} < L\/10$),\nthe PE brush forms octopus-like surface micelle domains demarcated by the chain-depleted grain boundaries. \nThe average height of the brush $H$\nincreases with $\\kappa$ ($\\leq 3$ $k_{B}T\/\\text{rad}^2$). \nSo does the surface area of the domain projected onto the $xy$-plane (see also Fig.~S1).\n(ii) For large $\\kappa$ ($> 15$ $k_{B}T\/\\text{rad}^2$, $l_{p} > L\/2$), \nthe condensed chains are organized into a dendritic assembly. \nNeighboring chains are assembled together, forming axially coaligned branches of varying thickness. \nThe density of chain monomer slightly increases as the chain gets stiffer (see Fig.~S2A), \nwhich reduces brush height.\nIt is also noted that the end-to-end distance $R_{ee}$ of the collapsed polymers, color-coded from blue to red for individual chains, displays the broadest distribution at an intermediate stiffness $3 < \\kappa < 15$ $k_{B}T\/\\text{rad}^2$, \nwhich indicates that the conformational ensemble displays the most heterogeneous distribution in this range of $\\kappa$ (see also Fig.~S3A,B).\n\n\\begin{figure}[t]\n\\centering\\includegraphics[width=\\gsz\\linewidth]{static.pdf\n\\caption{Structure of brush condensates. \n(A) In-plane static structure factor $S_{xy}(k)$ as a function of wave number $k$ for brushes of different $\\kappa$. \nThe gray solid bar demarcates the range $2\\pi\/L_{x} \\leq k \\leq 2\\pi\/L_{y}$, i.e., the periodic boundary of the simulation box.\nThe red circles highlight the position of primary peak when $\\kappa \\leq 5$ $k_{B}T\/\\text{rad}^2$. \n(B) Area of the condensate on $z=0$ plane $n(r)$, as a function of a linear dimension $r$ with respect to its center. \nOne exemplary illustration is provided in the inset. \nFor visual clarity, the curves in (A,B) are shifted upward progressively.\n}\n\\label{static}\n\\end{figure}\n\nTo quantify the in-plane lateral configuration of the brush, we calculated the 2D static structure factor \n\\begin{equation}\nS_{xy}(k) = \\Big \\langle \\Big \\langle \\frac{1}{N_{m}} \\bigg \\arrowvert \\sum_{i,j=1}^{N_{m}} e^{i \\vec{k} \\cdot (\\vec{r}_i-\\vec{r}_{j})} \\bigg \\arrowvert\\Big \\rangle_{|\\vec{k}|} \\Big \\rangle,\n\\label{eq-ssf} \n\\end{equation} \nwhere $N_{m} = M \\times N$ is the total number of non-grafted chain monomers, \n$\\vec{r}_{i}$ is the position of the $i$-th monomer, and $\\vec{k}$ is a 2D wave vector in the $xy$ plane.\n$S_{xy}(k)$ is evaluated by first integrating over the space of $| \\vec{k} | = k$, followed by averaging over the ensemble of MD trajectories.\n$S_{xy}(k)$ exhibits distinct profiles when $\\kappa$ is varied (Fig.~\\ref{static}A).\nFor octopus-like micelles, there is a primary peak (indicated by red circles) characterizing the size (area) of the domain, \nwhose position shifts to a smaller wave number as $\\kappa$ increases, indicating that the domain size grows with $\\kappa$.\nHowever, this peak gradually vanishes as the stiffness of chain is increased. \nThe absence of the peak in $S_{xy}(k)$ is due to the morphological transition from the finite-sized surface micelles to the scale-free dendritic assembly.\n\nTo quantify the dendritic patterns in 2D, we further analyzed their fractal dimensions $\\mathcal{D}_{f}$. \nWe divide the grafting surface into square lattices with each cell size of $a \\times a$. \nWhen at least one chain monomer is present in a cell, the cell contributes to the ``area\" of the condensate. \nThe area of dendritic pattern within a radius $r$ is $n(r) =\\langle a^2 \\sum_{p,q} o_{p,q} \\Theta(r - r_{p,q})\\rangle$, \nwhere $\\Theta(\\ldots)$ is the Heaviside step function, $o_{p,q} = \\Theta[\\sum_{i=1}^{N_{m}} \\delta(x_{i} - pa)] \\times \\Theta[\\sum_{i=1}^{N_{m}} \\delta(y_{i} - qa)]$, \nand $r_{p,q}$ is the distance of the cell from a center of high monomer density. \n$n(r)$ was obtained by averaging over the cells with the five highest monomer density in each snapshot. \n\n$n(r)$ scales as $n(r) \\sim r^{\\mathcal{D}_f}$, and the value of the scaling exponent $\\mathcal{D}_{f}$ varies at different length scale (Fig.~\\ref{static}B).\n(i) In the range of $6 < r\/a < 40$, $\\mathcal{D}_f\\approx 1.35$ for brushes of rigid chains, \nwhereas $\\mathcal{D}_f\\approx 0$ for flexible brushes. \nThe transition from micelle domain with finite size ($\\mathcal{D}_f \\approx 0$) to scale-free dendritic assembly ($\\mathcal{D}_f> 0$) is observed at $\\kappa\\approx 5$ $k_{B}T\/\\text{rad}^2$ (see Fig.~\\ref{cfg}B).\n(ii) At $r\/a > 50$, $\\mathcal{D}_f \\approx 1.75$ for rigid brushes ($\\kappa > 15$ $k_{B}T\/\\text{rad}^2$), \nand $\\mathcal{D}_f\\approx 2$ for flexible brushes ($\\kappa \\leq 5$ $k_{B}T\/\\text{rad}^2$).\nThe scaling exponent $\\mathcal{D}_{f}\\approx 2$ arises when the monomer is uniformly distributed on the surface such that the density of condensates $\\rho_{m} = n(r)\/{\\pi r^2}$ is constant with respect to $r$. \nUnlike the octopus-like micelles surrounded by the chain-depleted zone, the dendritic condensate percolates over the entire surface.\nAnalyzing fluorescence images of dendritic condensate of dsDNA brush through a similar method \\cite{2014BarZiv4945}, \nBracha \\emph{et al.} reported $\\mathcal{D}_{f} = 1.75$.\n\nAnother quantity often being used to address the fractality is the 2D version of radial distribution function, \ndefined as $C_{xy}(r) = \\sum_{i>j} \\delta(r_{i,j}-r) \/ \\pi r^2 N_{m}$.\n$C_{xy}$ scales as $r^{\\mathcal{D}_{f} - 2}$ in a fractal aggregate of dimension $\\mathcal{D}_{f}$ \\cite{1986Sander789,2016Dossetti,2017Dossetti3523}. \nConsistent with the analysis of $n(r)$, \n$C_{xy}$ of chain monomers indeed follows a scaling $C_{xy} \\sim r^{1.35 - 2} = r^{-0.65}$ in the intermediate range of $r$ when $\\kappa$ is large (Fig.~S4C). \n\\\\\n\n\n\n{\\bf Local chain organization. }\nThe local structure of chains in the brush condensates also changes with $\\kappa$ (see the insets of Fig.~\\ref{bdOrder}A). \nWhen chains are flexible, the adjacent chains condensed to the same micelle appear highly entangled.\nIt is not visually clear whether two monomers close in space are in the same chain or in different chains. \nIn contrast, when chains are rigid, they are parallelly aligned, \nand the strong orientational correlation between consecutive bonds allows us to easily discern one chain from another. \nTo characterize the local ordering of polymer segments in the collapsed brush, \nwe employed the liquid crystal order parameter \\cite{1986Eppenga1776,2000Frenkel10034}.\nFor any two consecutive monomers ${i,i+1}$ in the same chain, \na unit bond vector $\\hat{b}_{i}$ is defined by its orientation $\\vec{u}_{i} = (\\vec{r}_{i+1} - \\vec{r}_{i}) \/ |\\vec{r}_{i+1} - \\vec{r}_{i}|$, \nand its position $\\vec{v}_{i} = (\\vec{r}_{i+1} + \\vec{r}_{i}) \/ 2$.\nThe radial distribution of such two bond vectors can be evaluated as \n\\begin{equation}\ng_{0}^{b}(r_{\\perp},r_{\\parallel}) = \\frac{\\sum_{i,j} \\delta(r_{ij,\\perp} - r_{\\perp}) \\delta(r_{ij,\\parallel} - r_{\\parallel})}{\\pi r_{\\perp}^2 r_{\\parallel} N_{b}},\n\\label{eg0}\n\\end{equation}\nwhere $\\vec{r}_{ij}^b = \\vec{v}_{j} - \\vec{v}_{i}$, $\\vec{r}_{ij,\\parallel} = \\vec{r}_{ij}^b \\cdot \\vec{u}_{i}^b$, \n$\\vec{r}_{ij,\\perp} = \\vec{r}_{ij}^b - \\vec{r}_{ij,\\parallel}$, and $N_b = M \\times N$ is the total number of bonds in the brush. \nThe vector $\\vec{r}_{ij}^{b}$, pointing from bond $\\hat{b}_{i}$ to another bond $\\hat{b}_{j}$, \nwas decomposed into the parallel and perpendicular components ($\\vec{r}_{ij,\\parallel}$ and $\\vec{r}_{ij,\\perp}$ ) \nwith respect to the orientation of $\\hat{b}_{i}$.\nThe heat map of $g_{0}^{b}(r_{\\perp},r_{\\parallel})$ in Fig.~\\ref{bdOrder}A, indicates that the bonds of flexible chains in a micelle are isotropically distributed. \nAs $\\kappa$ increases, density correlation first rises along the axis of $r_{\\parallel}$. \nBecause the effective attraction between monomers from neighboring chains increases with $\\kappa$ (Fig.~S4B), \nbond density correlation also appears on the $r_{\\perp}$ axis when $\\kappa > 10$ $k_{B}T\/\\text{rad}^2$.\n\n\\begin{figure}[tb]\n\\centering\\includegraphics[width=\\gsz\\linewidth]{bdorder.pdf\n\\caption{\nLocal chain organizations.\n(A) Heat map of the density distribution of bonds $g_{0}^{b}$ (Eq.\\ref{eg0}), and (B) orientation order parameter $g_{2}^{b}$ (Eq.\\ref{eg2}) as a function of $r_{\\perp}$ and $r_{\\parallel}$.\nFrom left to right panels, $\\kappa = 0,5,60$ $k_{B}T\/\\text{rad}^2$, respetively.\nInsets are snapshots of a small region, with a size of $32 a\\times 32 a$, in the corresponding brush condensates.\n(C) Inter-chain bond orientational order $g_{2}^{b}(r_{\\perp}^{\\ast},0)$ as a function of $\\kappa$, where $r_{\\perp}^{\\ast}$ is the position of the highest peak in $g_{0}^{b}(r_{\\perp},0)$. \n}\n\\label{bdOrder}\n\\end{figure}\n\nThe relative orientational correlation between bond vectors, which cannot be described by $g_{0}^{b}(r_{\\perp},r_{\\parallel})$ alone, is quantified by calculating \\cite{1986Eppenga1776,2000Frenkel10034}\n\\begin{equation}\ng_{2}^{b}(r_{\\perp},r_{\\parallel}) = \\frac {\\sum_{i,j} \\cos(2 \\theta_{ij}) \\delta(r_{ij,\\perp} - r_{\\perp}) \\delta(r_{ij,\\parallel} - r_{\\parallel})} {\\sum_{i,j} \\delta(r_{ij,\\perp} - r_{\\perp}) \\delta(r_{ij,\\parallel} - r_{\\parallel})},\n\\label{eg2}\n\\end{equation}\nwhere $\\theta_{ij}$ is the angle between $\\hat{b}_{i}$ and $\\hat{b}_{j}$, thus $\\cos(2 \\theta_{ij}) = (\\vec{u}_{i} \\cdot \\vec{u}_{j})^2 - 1$. \n$\\cos(2\\theta) \\leq 0$ if $\\pi\/4 \\leq \\theta \\leq 3\\pi\/4$.\nIn the case of an isotropic distribution, $g_{2}^{b*} = \\int_{0}^{\\pi} \\sin(\\theta) \\cos(2\\theta) d\\theta \/ \\int_{0}^{\\pi} \\sin(\\theta) d\\theta = -1\/3$. \nFor flexible chains with $\\kappa=0$ $k_{B}T\/\\text{rad}^2$ (Fig.~\\ref{bdOrder}B left), \nthe positive correlation arises only from their nearest neighboring bond along the chain, \nand $g_{2}^{b}$ converges to $-1\/3$ within a very short range ($r < 2a$).\nAt $\\kappa=5$ $k_{B}T\/\\text{rad}^2$, intra-chain bonds are well ordered, but on the $r_{\\perp}$ axis $g_{2}^{b} \\approx -1\/3$ when $r_{\\perp} > 2.5a$, \nwhich suggests that except for the nearest neighbors, the bonds from different chains are still poorly aligned.\nLastly, at $\\kappa=60$ $k_BT\/\\text{rad}^2$, $g_{2}^{b} (r_{\\perp},r_{\\parallel})> 0$ in both $r_{\\perp}$ and $r_{\\parallel}$ directions with $r_{\\perp}$, $r_{\\parallel}\\gg 1$, \nin agreement with the observation that rigid chains are bundled together forming the branches of the condensate.\n\nTo highlight the effect of $\\kappa$ on the local \\emph{inter}-chain organization in the condensate, \nwe plotted $g_{2}^{b}(r_{\\perp}^{\\ast},0)$ (Fig.~\\ref{bdOrder}C) against $\\kappa$, by considering it as a single-valued estimate of the inter-chain bond alignment, \nwhere $r_{\\perp}^{\\ast}$ is position of the highest peak of $g_{0}^{b}(r_{\\perp}^{\\ast},0)$ (see also Fig.~S5). \nIn the brush condensate, chains are randomly entangled with each other when $\\kappa \\leq 3$ $k_{B}T\/\\text{rad}^2$, \nbut they display nearly perfect alignment when $\\kappa > 30$ $k_{B}T\/\\text{rad}^2$.\nThis disorder-to-order ``transition\" takes place around $\\kappa \\approx 5$ $k_{B}T\/\\text{rad}^2$ (Fig.~\\ref{bdOrder}C).\n\\\\\n\n\\begin{figure}[tb]\n\\centering\\includegraphics[width=\\gsz\\linewidth]{dynamics.pdf\n\\caption{\nDynamic properties of brush condensate and counterions. \n(A) Normalized intermediate scattering function $f_{xy}(k,t) = F_{xy}(k,t) \/ F_{xy}(k,0)$ (Eq.\\ref{eq-isf}) of chain monomers at wave numbers $2\\pi\/k_{1} = 1.1$ $a$ and $2\\pi\/k_{3} = 3.6$ $a$. \n(B) Conformational relaxation time of chains $\\tau_{i} = \\int f_{xy}(k_{i},t) dt$ with different $\\kappa$.\n(C) Mean square displacement of trivalent cations, either trapped in the condensate or free in the bulk. Symbols have the same meanings as in (A).\n(D) Diffusion coefficients of trapped trivalent cations (3+) and chain monomers.\n}\n\\label{dynamics}\n\\end{figure}\n\n\\begin{figure*}[t]\n\\centering\\includegraphics[width=0.6\\linewidth]{sum.pdf\n\\caption{\nTime-averaged monomer density heat maps of PE brush condensates as a function of the bending rigidity parameter $\\kappa$ and the grafting distance $d$.\nVisually distinct morphologies are colored differently: homogeneous compact layer (black), octopus-like surface micelles (blue), \nsingle-chain tadpole-like condensate (green), dendritic domains and networks (red and purple).\nThose labeled with asterisks (*) depict the simulation results of a smaller brush ($M=4\\times4$) from our previous study \\cite{2017Hyeon1579}.\n}\n\\label{sum}\n\\end{figure*}\n\n{\\bf Dynamics of brush condensates. }\nIn order to quantify the dynamics of PE brush, \nwe calculated the intermediate scattering function, which is the density-density time correlation function (van Hove correlation function) in Fourier domain, \n\\begin{align}\nF_{xy}(k,t) = \\Big\\langle \\Big \\langle \\frac{1}{N_{m}} \\sum_{m=1}^{N_{m}} e^{i \\vec{k} \\cdot \\vec{r}_{m}(t+t_{0})} \\sum_{n=1}^{N_{m}} e^{-i \\vec{k} \\cdot \\vec{r}_{n}(t_{0})} \\Big \\rangle_{|\\vec{k}|} \\Big \\rangle_{t_{0}} \n\\label{eq-isf}\n\\end{align} \nwhere $\\langle \\langle \\ldots \\rangle_{|\\vec{k}|} \\rangle_{t_0}$ is an average over time $t_0$ and over the direction of a 2D wave vector $\\vec{k}$ of magnitude $k$.\nThe dynamics of brush chain at different length scales can be probed in terms of \n$F_{xy}(k,t)$ evaluated at different $k$ ($k_{i} = 2\\pi\/r_{i}^{\\ast}$ where $i=1$, 2, 3 and $r_{i}^{\\ast}\/a = 1.1$, 2.0, 3.6 are the positions of the three highest peaks in the radial distribution function of chain monomers (see Fig.~S4C,D)).\nThe normalized function $f_{xy}(k,t) = F_{xy}(k,t) \/ F_{xy}(k,0)$, with $k_{1}$ and $k_{3}$, are shown in Fig.~\\ref{dynamics}A, \nand the corresponding mean relaxation time $\\tau_{i} = \\int_{0}^{\\infty} f_{xy}(k_i,t) dt$ is presented in Fig.~\\ref{dynamics}B. \nAt a small length scale $k^{-1}_{1}$, $f_{xy}(k_1,t)$ decays to zero within the timescale of $t< 10 \\tau_{\\text{BD}}$, which implies that chain monomers are fluidic beyond this time scale. \nBut, compared to octopus-like micelle with $\\kappa=0$ $k_{B}T\/\\text{rad}^2$, \nthe dendritic assembly made of brush chains with $\\kappa=120$ $k_{B}T\/\\text{rad}^2$ displays $\\sim 14$-fold slower relaxation profile of $f_{xy}(t)$.\nThe relaxation becomes much slower at larger length scale $k^{-1}_{3}$, \nand $\\tau_{3}$ for rigid chain comprising the dendritic assembly is as long as our total simulation time ($\\sim \\mathcal{O}(10^3) \\tau_{\\text{BD}}$). \nWe also notice that the ratio of relaxation times, $\\eta_{i} = \\tau_{i}(\\kappa=120 \\text{ }k_BT\/\\text{rad}^2) \/ \\tau_{i}(\\kappa=0 \\text{ }k_BT\/\\text{rad}^2)$ at the three position of $r^{\\ast}_i$ (with $i=1$, 2, 3) takes an order of $\\eta_{3} > \\eta_{2} > \\eta_{1}$. \nThis is expected because the contribution from inter-chain relaxation to the total relaxation time is higher at $r_{3}$ than at $r_{1}$. \nA tight and well aligned chain organization at $\\kappa = 120$ $k_{B}T\/\\text{rad}^2$ further increases $\\tau_{3}$ in comparison to $\\tau_{1}$.\nFor the most rigid dendrite, $\\tau_{3}$ is $\\sim 60$-fold greater than that of the surface micelle formed by flexible PE brush.\n\n\n\n\nNext, the mobility of trivalent cations, either trapped in the condensate (within $\\lambda_{B}$ from the chains) or free in the bulk solution, were quantified using an ensemble- and time-averaged mean squared displacement, \n$\\text{MSD}(t) = \\langle \\langle |\\vec{r}_{i}(t+t_0) - \\vec{r}_{i}(t_0)| \\rangle_{t_0} \\rangle$, as shown in Fig.~\\ref{dynamics}C. \nWhen $\\kappa \\leq 5$ $k_{B}T\/\\text{rad}^2$, although trapped ions are mobile, \nMSD shows a long-time subdiffusive behavior because ions are confined in individual micelles \\cite{2017Tirrell1497} (Supplementary Movie 1).\nBy contrast, for $\\kappa > 10$ $k_{B}T\/\\text{rad}^2$, condensed ions can freely diffuse along the dendritic branches. \nAs a result, MSD grows linearly with time. \n\n\nThe diffusion coefficient of trapped trivalent cation, estimated using $D = \\text{MSD}(t) \/ 6 \\Delta t$ for $\\Delta t = 1\\times 10^{3}$ to $1.5 \\times 10^{3} \\tau_{\\text{BD}}$, is non-monotonic with $\\kappa$. \nThis change agrees with the change of the brush morphology where ions are confined.\nIn the micelle phase, micelle size grows with $\\kappa$, which provides larger space for the trapped ions to navigate. \nIn the dendrite phase, the effective attraction between neighboring chains, mediated by the counterions, increases with $\\kappa$ (see Figs.~S2A, ~S4B) and tightens the bundling of PE, which in turn reduces the mobility of the condensed ions. \nThe trapped trivalent ions diffuse $>$ 10-fold slower than those in the bulk, \nbut still $\\sim $ 100-fold faster than chain monomers in the dendritic assembly, \neven though the same value of bare diffusion coefficient was assumed for all ions and chain monomers.\nThe bundles of rigid chains form a network of ``highway\", on which the condensed trivalent ions freely diffuse (Supplementary Movie 2).\n\n\n\n\n\n\\section{Discussion}\n\n{\\bf Effect of grafting density on the morphology of brush condensates. } \nThe morphological transitions from the octopus-like surface micelles to the dendritic condensates are reminiscent of sol-to-gel transition. \nAnalogous to gelation transition, the ``bond probability\" $p$ can be tuned by changing either the chain stiffness ($\\kappa$) or grafting distance ($d$). \nBelow the gelation point ($pp_c$) the domains are all connected together, covering the entire space. \nWe further performed simulations of a semiflexible brush, at $\\kappa=10$ $k_{B}T\/\\text{rad}^2$, by varying the inter-chain spacing $d$ (see Fig.~\\ref{sum} and Fig.~S6). \nTime-averaged monomer density heat maps of PE brushes $\\langle \\rho(x,y) \\rangle$ (Fig.~\\ref{sum}) visualize how the morphology of brush condensates changes as a function of the chain bending rigidity parameter $\\kappa$ and the inter-chain spacing $d$. \n\nNotably, changes in $\\kappa$ and $d$ display qualitatively different effects on the morphologies below and above the ``gelation point.\" \nAt $d=16a$ with increasing $\\kappa$ (panels enclosed by the magenta boundary in Fig.\\ref{sum}), the initially sol-like micelles domain are percolated into gel-like dendritic pattern whose branches span the entire surface. \nIn contrast, when the chain stiffness is fixed to $\\kappa=10$ $k_BT\/\\text{rad}^2$ and grafting distance is varied from a large value ($d=32a$) to a small one ($d=8a$) (panels enclosed by the cyan boundary in Fig.\\ref{sum}), \nthe initial sol-like isolated domains are characterized by the heterogeneous condensates made of semiflexible chains, collapsed into toroids or rod-like bundles on site, not by the tadpole or octopus-like micelle condensates; and with decreasing $d$ the chains collapse and further assemble into a dendritic pattern and a non-uniform fractal-like meshwork layer. \n\\\\\n\n\n\n\n{\\bf Size of octopus-like surface micelle. } \nFor octopus-like surface micelle, a scaling argument is developed based on equilibrium thermodynamics \\cite{2017Hyeon1579}. \nThe domain size is determined by the balance between the surface tension resulting from the counterion-mediated attraction \nand the elastic penalty to stretch the grafted chains to form a surface micelle. \nWhen $\\kappa \\leq 3$ $k_{B}T\/\\text{rad}^2$, $l_{p}$ is small enough to approximate the individual PE as a flexible chain with Kuhn length $2 l_{p}$. \nFor an octopus-like domain containing $n$ chains within a surface area $\\sim R_{c}^2 \\simeq l_{p}^{2} (n N \/ l_{p})^{2 \\nu}$, \nthe surface energy is $F_{n,\\text{surf}} = \\xi k_{B}T l_{p}^{2} (n N a\/ l_{p})^{2 \\nu}$, \nwhere $\\xi$ sets the scale of attraction between chain segments and $\\nu$ is the Flory exponent. \nMeanwhile, the elastic penalty is $F_{n,\\text{el}} = n k_{B} T R_{c}^2 \/ l^2_pN_{s} = n k_{B} T R_{c} \/l_{p} = k_{B} T \\sigma R_{c}^{3} \/ l_{p}$,\nwhere $N_{s} = R_{c}\/l_{p}$ is the number of statistical segments in each chain to be stretched to reach the micelle, \nand $\\sigma = n\/R_{c}^2$ is the chain grafting density.\nThe total free energy per area in the octopus-like condensate with $n$ arms is \n\\begin{align}\n\\frac{f_{\\text{octo}}}{k_{B}T} &= \\frac{1}{k_BT}\\frac{F_{n,\\text{surf}}+F_{n,\\text{el}}}{R_c^2}\\nonumber\\\\\n&= \\frac{\\xi (\\sigma Na)^{2\\nu} l_{p}^{2-2\\nu}}{R_{c}^{2-4\\nu}} + \\frac{\\sigma R_{c}}{l_p}. \n\\label{eq-oct}\n\\end{align}\nMinimization of $f_{octo}$ with respect to $R_{c}$ provides the micelle size corresponding to a minimum free energy \n$R_c^* \\sim l_{p}^{\\frac{3-2\\nu}{3-4\\nu}} (Na)^{\\frac{2\\nu}{3-4\\nu}} \\sigma^{\\frac{2\\nu-1}{3-4\\nu}}$.\nFor $\\nu = 1\/3$, $R^*_{c}$ increases as $\\sim l_{p}^{7\/5}$ (thus with $\\kappa$), until neighboring micelles is about to overlap.\nBeyond this overlap point, the picture of isolated semispherical micelles no longer holds.\n\\\\\n\n{\\bf Fractal dimension of dendritic condensate. } \nIn the case of dendritic condensate, we found that $n(r)\\sim r^{\\mathcal{D}_f}$. \nIn particular, $\\mathcal{D}_{f} \\approx 1.75$, observed at large $r$ ($r\/a > 50$) was also reported in Bracha \\emph{et al.}'s experiment \\cite{2014BarZiv4945}. \nIncidentally, the morphology of aggregate changes depending on how trivalent salt is added \\cite{2014BarZiv4945}. \nThus, the formation of dendritic morphologies are effectively made under kinetic gelation rather than equilibrium one. \n \n\n\n\n\nThe premise that the process of dendritic assembly is kinetically controlled guides the direction of our theoretical analysis.\nSince the collapse is effectively irreversible and the bundles grow preferentially from the ``active front\" of the preexisting domain \\cite{1999Liu624},\nwe use the principle underlying the diffusion-limited aggregation \\cite{1981Sander1400} (DLA)\nto explain the observed fractal dimension. \nDLA describes a far-from-equlibrium growth phenomenon, \nwhere each particle diffuse with a fractal dimension $d_{w}$ until it binds irreversibly to any particles of the aggregate. \nA generalized Honda-Toyoki-Matsushita mean-field approximation \\cite{1984Kawasaki337,1986Kondo2618} suggests that, the fractal dimension of the aggregate is\n\\begin{equation}\n\\mathcal{D}_{\\text{MF}} = \\frac{d_s^2 + \\eta (d_{w}-1)}{d_s + \\eta (d_{w}-1)},\n\\label{eq-dla} \n\\end{equation} \nwhere in the presence of long-range attractive interactions the probability of growth at a certain position is assumed to be proportional to the gradient of a scalar field (e.g. monomer density) as $\\sim |\\nabla\\phi|^\\eta$. \nFor DLA ($\\eta = 1$, $d_w=2$) in 2 dimension ($d_s=2$), Eq.\\ref{eq-dla} gives $\\mathcal{D}_{\\text{MF}} =\\mathcal{D}_{f,\\text{DLA}} = 5\/3$.\nNumerical simulations report $\\mathcal{D}_{f,\\text{DLA}} = 1.71$ \\cite{2016Dossetti,2017Dossetti3523}. \n\nDLA has also been exploited to explain the dynamics and aggregation of a 3D gel-like network formed by rigid PE chains in a poor solvent \\cite{2017Asahi5991}. \nThe fractal nature of the dendritic pattern may well be an outcome of premature quenching of brush configuration to condensates during the competition \nbetween the gain in energy upon aggregation and the entropic gain of chain fluctuations.\n\\\\\n\n\n\n\n\\section{Concluding Remarks}\nCollapse of the brush condensate into either surface micelles \\cite{2017Tirrell1497} or a dendritic pattern \\cite{2014BarZiv4945} is controlled by the chain flexibility.\nFundamental differences are found in the the dynamics of chains and condensed ions as well as in the microscopic chain arrangement.\nThe new insights into the link between the micro-scale details and brush morphology will be of great use to design material properties and understand biological functions of PE brushes. \n\n\\section{Model and Methods}\n\\label{MaM}\n{\\bf Model and energy potential. } As in our previous study \\cite{2017Hyeon1579}, we used a well tested coarse-grained model of strong polyelectrolyte (PE) brush \\cite{2000Seidel2728,2003Stevens3855,2014Hsiao2900}. \nTotal $M (= 16\\times16)$ polymer chains were grafted to the uncharged surface of a 2D triangular lattice (Fig.~\\ref{cfg}A). \nThe lattice spacing $d$ was set to $16 a$, which is small enough to ensure the lateral overlap between neighboring chains, where $a$ is the diameter of chain monomers and ions.\nEach chain consists of $N (= 80)$ negatively charged monomers and a neutral terminal monomer grafted to the surface. \nThe simulation box has a dimension of \n$L_{x}\\times L_{y}\\times L_{z} = {(\\sqrt{M} d)} \\times {(\\sqrt{3M} d\/2)} \\times {(2 N a)} = 256 a \\times 128\\sqrt{3} a \\times 160 a$. \nPeriodic boundary conditions were applied along the $x$ and $y$ axes, \nand impenetrable neutral walls were placed at $z=0$ and $2 N a$. \n\nWe considered the following energy potentials to model a semiflexible PE brush in \\emph{good} solvents with multivalent salts. \nFirst, the distance between the neighboring chain monomers was constrained by a finite extensible nonlinear elastic bond potential \n\\begin{equation}\nU_{bond}(r) = -\\frac{k_{0} R_{0}^{2}}{2} \\log\\left(1-\\frac{r^{2}}{R_{0}^{2}}\\right),\n\\label{ub}\n\\end{equation}\nwith a spring constant $k_{0} = 5.83 ~k_{B}T\/a^2$ and a maximum extensible bond length $R_{0} = 2a$.\nSecond, the chain stiffness was modulated with an angular potential \n\\begin{equation}\nU_{angle}(\\theta) = \\kappa (\\theta - \\pi)^{2},\n\\label{ua}\n\\end{equation}\nwhere $\\kappa$ is the bending rigidity parameter and $\\theta$ is the angle between three consecutive monomers along the chain. \nThird, the excluded volume interaction was modeled in between ions and chain monomers \nby using the Weeks-Chandler-Andersen potential \n\\begin{equation}\nU_{excl}(r) = 4 \\epsilon \\left[\\left(\\frac{a}{r}\\right)^{12}-\\left(\\frac{a}{r}\\right)^{6}+\\frac{1}{4}\\right] \\Theta(2^{1\/6} a - r),\n\\label{ue}\n\\end{equation}\nin which $\\epsilon = 1 ~k_{B}T$ and $\\Theta(\\ldots)$ denotes a Heaviside step function.\nFourth, the Columbic interactions were assigned between charged particles $i$, $j$, which include both chain monomers and ions, \n\\begin{equation}\nU_{elec}(r) = \\frac{k_{B} T \\lambda_{B} z_{i} z_{j}}{r},\n\\label{uq}\n\\end{equation} \nwhere $z_{i,j}$ is the valence of charge. \nThe Bjerrum length is defined as $\\lambda_{B}=e^{2}\/(4 \\pi \\epsilon_{0} \\epsilon_{r} k_{B}T)$, \nwhere $\\epsilon_{0}$ is the vacuum permittivity and $\\epsilon_{r}$ is the relative dielectric constant of the solvent. \nLastly, the confinement of the wall was considered to repel any monomer, \nthat approaches the wall closer than $a\/2$ such that\n\\begin{equation}\nU_{wall}(z) = 4 \\epsilon \\left[\\left(\\frac{a}{z+\\Delta}\\right)^{12}-\\left(\\frac{a}{z+\\Delta}\\right)^{6}+\\frac{1}{4}\\right] \\Theta(a\/2 - z),\n\\label{uw}\n\\end{equation} \nwith $\\Delta = (2^{1\/6}-1\/2) a$. \nFor simplicity, we assume the same diameter $a$ for all the ions and chain monomers.\nFor dsDNA, the mean bond length ${\\langle b \\rangle} = 1.1 a$ $(\\approx a)$ in our model maps to \nthe effective charge separation ($\\approx 1.7$ {\\AA}) along the chain.\nConsidering $\\lambda_{B} = 7.1$ {\\AA} in water at room temperature, we set $\\lambda_{B}=4 a$ $(\\approx 7.1\/1.7\\times a)$.\nSince the focus of this study is on the effects of the bending rigidity of PE chain, $\\kappa$ in Eq.\\ref{ua} was adjusted in the range, $0\\leq \\kappa\\leq 120$ $k_{B}T\/\\textrm{rad}^2$. \n\\\\\n\n{\\bf Simulation. } \nFor conformational sampling of the brush, we integrated the Langevin equation at underdamped condition \\cite{1992Thirumalai695}, \n\\begin{align}\nm\\frac{d^2\\vec{r}_i}{dt^2}=-\\zeta_{\\text{MD}}\\frac{d\\vec{r}_i}{dt}-\\vec{\\nabla}_{\\vec{r}_i}U(\\vec{r}_1,\\vec{r}_2,\\ldots)+\\vec{\\xi}(t), \n\\end{align}\nusing a small friction coefficient $\\zeta_{\\text{MD}} = 0.1 m\/\\tau_{\\text{MD}}$ and a time step $\\delta t = 0.01 \\tau_{\\text{MD}}$, \nwith the characteristic time scale $\\tau_{\\text{MD}} = (ma^2\/{\\epsilon})^{1\/2}$. \nWe started from an initial configuration where polymer chains were vertically stretched, \nand monovalent counterions were homogeneously distributed in the brush region.\nThis salt-free brush was first equilibrated for the time of $10^4$ $\\tau_{\\text{MD}}$, then trivalent cations at a 1:3 stoichiometric concentration ratio \nwith respect to the polyelectrolyte charges \\cite{2017Hyeon1579} were randomly added together with its monovalent coions (anions) into the brush-free zone (see Fig.~\\ref{cfg}A). \nDepending on the value of $\\kappa$, \ntrivalent cations induce an immediate collapse or bundling of neighboring chains in the brush. \nIn the latter case, an intermediate bundle either merges into a thicker one with other bundles nearby, \nor collapses onto the grafting surface \\emph{irreversibly}.\nFor stiff chains with $\\kappa = 60$ or $120$ $k_{B}T\/\\textrm{rad}^2$, it takes longer than $ 10^{6}$ $\\tau_{\\text{MD}}$ \nbefore the whole brush collapses and the mean height of chains reaches the steady state. \nProduction runs was generated further for $5\\times10^{4} \\tau_{\\text{MD}}$. \nBrush configurations were collected every $50 \\tau_{\\text{MD}}$ for the analysis of static properties.\nUnless stated otherwise, all the conformational properties reported here were averaged over the ensemble of trajectories.\n\nTo probe the dynamics of condensates, \nwe performed Brownian dynamics (BD) simulations by integrating the following equation of motion \n\\begin{equation}\n\\frac{d \\vec{r}_{i}}{dt} = - \\frac{D_{i0}}{k_B T}{\\vec{\\nabla}}_{\\vec{r}_{i}} U(\\vec{r}_1,...,\\vec{r}_N) +\\vec{R}_{i}(t),\n\\end{equation}\nwhere $D_{i0}$ is the bare diffusion coefficient of the $i$-th particle, \nand $\\vec{R}_{i}(t)$ is the Gaussian noise satisfying $\\langle\\vec{R}_i(t)\\rangle=0$ and \n$\\langle \\vec{R}_{i}(t) \\cdot \\vec{R}_{j}(t')\\rangle = 6 D_{i0} \\delta_{ij} \\delta(t-t')$. \n$D_{i0}$ was estimated via $k_{B}T \/ 6 \\pi \\eta R$, where $\\eta = 0.89\\times 10^{3}$ Pa$\\cdot$s is the viscosity of water \nand $R$ is the hydration radius of all the particles. \nWe chose an integration time step $\\delta t_{\\text{BD}} = 2 \\times 10^{-4} \\tau_{\\text{BD}}$ \nwith the Brownian time $\\tau_{\\text{BD}} = a^{2}\/D_{i0}$ ($\\sim 4$ ns, assuming that $R \\sim 10$ {\\AA}).\nStarting from the last configuration of brush in MD simulations, the BD simulation was performed for $4 \\times 10^{3} \\tau_{\\text{BD}}$.\nSimulations were all carried out by using ESPResSo 3.3.1 package \\cite{2006Holm704,2013Holm1}. More details can be found in Ref.\\cite{2017Hyeon1579}. \n\\\\\n\n{\\bf Apparent persistence length of brush chain. } \nBy using a simplifying assumption that as an isolated semiflexible chain the correlation between bond vectors exponentially decays with the their separation along the chain ($g(s)=\\langle \\vec{u}_i\\cdot\\vec{u}_{i+s}\\rangle \\sim e^{-s\/l_p}$, where $\\vec{u}_i=(\\vec{r}_{i+1} - \\vec{r}_{i}) \/ |\\vec{r}_{i+1} - \\vec{r}_{i}|$) (Fig.~S7), \nwe quantified an ``apparent\" persistent length $l_{p}$. \n\n\n\n\n\n\n\n\\section{Supplementary Material}\nSupplementary material contains the Supplementary Figures S1 -- S7 and Supplementary Movies 1 and 2. \n\n\\begin{acknowledgments}\nWe thank the Center for Advanced Computation in KIAS for providing computing resources. \n\\end{acknowledgments}\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\n\\section{Introduction\\label{intro}}\nThe first computer models of quantum systems based on the Bohm-de Broglie causal interpretation \\cite{B52,DEBR60} were developed by Dewdney in his Ph.D thesis (1983) \\cite{DEWD83}. These models include the two-slit experiment and scattering from square barriers and square wells. Some of the results appeared in earlier articles with Phillipides, Hiley (1979) \\cite{DEWD79} and with Hiley (1982) \\cite{DEWD82}. In later years, Dewdney developed a computer model of Rauch's Neutron interferometer (1982) \\cite{DEWD85} and, with Kyprianidis and Holland, models of a spin measurement in a Stern-Gerlach experiment (1986) \\cite{DEWD86}. He also went on, with Kyprianidis and Holland, to develop computer models of spin superposition in neutron interferometry (1987) \\cite{DEWD87} and of Bohm's spin version of the Einstein, Rosen, Podolsky experiment (EPR-experiment) (1987) \\cite{DEWDEPR87}. A review of this work appears in a 1988 {\\it Nature} article \\cite{DEWD88}. The computer models of spin were based on the 1955 Bohm-Schiller-Toimno causal interpretation of spin \\cite{BST55}. Home and Kaloyerou in 1989 reproduced the computer model of the two-slit interference experiment \\cite{K89} in the context of arguing against Bohr's Principle of Complementarity \\cite{BR28}. \n\nThough computer models of the two-slit experiment with each slit modeled by a one-dimensional Gaussian wave-packet have existed for many years, the extension to pinholes has never been made. We thought, therefore, that it might be interesting to attempt such an extension by modeling each pinhole by a two-dimensional Gaussian wave-packet. Though no new conceptual results are expected, we thought it might be interesting to see if the trajectories, now in three dimensional space, retain the characteristic features of the two-slit case. We shall see that a quantum potential structure is produced which guides the particles to the bright fringes as in the two-slit case. With the pinholes along the $x$-axis, trajectories in the $xy$-plane (see Fig. \\ref{OrAxes}) show the same interference behaviour as in the two-slit case, while trajectories in the $zy$-plane show no interference.\n\n\\section{The mathematical model\\label{MM}}\nPhillipides et al \\cite{DEWD79} derived the Gaussian function they used to model each of the two slits in the two-slit experiment using Feynman's path integral formulation. We, instead, have generalised the one dimensional Gaussian solutions of the Schr\\\"{o}dinger equation developed by Bohm in chapter three of his book \\cite{B51} to two-dimensions. Phillipides et al \\cite{DEWD79} considered Young's two-slit experiment for electrons and used the values of an actual Young's two-slit experiment for electrons performed by J\\\"{o}nsson in 1961 \\cite{jon61}. We will also model the interference of electrons and use J\\\"{o}nsson's values, except that we will vary slightly the distance between the pinholes and the detecting screen in order to obtain clearer interference or quantum potential plots. We will, in any case, give the values used for each case we consider. \n\nThe orientation of the axes and the position of the pinholes are shown in Figs. \\ref{OrAxes} and \\ref{figPos}, respectively.\nThe pinholes are represented by two dimensional Gaussian wave-packets $\\psi_1$ and $\\psi_2$ given by\n\\begin{eqnarray}\n\\psi_1(x,y,z,t)&=&A_1\\tilde{R}_{1}\\nonumber\\\\\n&&\\times\\exp\\left[{- \\frac{(x+x_0-v_x t)^2}{2\\Delta x_n^2}}\\right]\\exp\\left[{\\frac{i\\alpha t(x+x_0-v_x t)^2}{2\\Delta x_{n1}^2}}\\right]\\nonumber\\\\\n&&\\times\\exp\\left[{- \\frac{(z+z_0-v_z t)^2}{2\\Delta z_n^2}}\\right] \\exp\\left[{\\frac{i\\alpha t(z+z_0-v_z t)^2}{2\\Delta z_{n1}^2}}\\right]\\exp\\left[ik_x(x+x_0)\\right]\\nonumber\\\\\n&&\\times\\exp\\left[ik_z(z+z_0)\\right]\\exp\\left(ik_y y\\right)\\exp\\left[-i(\\omega_x+\\omega_z) t\\right],\\label{psi1}\n\\end{eqnarray}\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{1.3in}\\includegraphics[width=3.4in,height=1.8in]{figure1.jpg} \n\\caption{The orientation of the axes.\\label{OrAxes}}\n\\end{figure}\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{1.3in}\\includegraphics[width=3.4in,height=1.8in] {figure2.jpg} \n\\caption{Positions of the pinholes: The two pinholes, represented by the two-dimensional Gaussian wave-packets $\\psi_1$ and $\\psi_2$, are placed at $x_0=\\pm5\\times10^{-7}$ m and $z_0=0$ m. The width of the Gaussian packet on the negative $x$-side is $\\Delta x_{n0}=\\Delta z_{n0}=7\\times 10^{-8}$ m, while the width of the Gaussian packet on the positive $x$-side is $\\Delta x_{p0}=\\Delta z_{p0}=\\Delta x_{n0}$ or $\\Delta x_{p0}=\\Delta z_{p0}=2\\Delta x_{n0}$ for the case of unequal widths. The velocity components are $v_x=150\\;\\mathrm{ms}^{-1}$, $v_y=1.3\\times 10^{8}\\;\\mathrm{ms}^{-1}$ and $v_z=0\\;\\mathrm{ms}^{-1}$.\\label{figPos} }\n\\end{figure}\n\\newpage\n\\mbox{}\\\\\nand\n\\begin{eqnarray}\n\\psi_2(x,y,z,t)&=&A_2\\tilde{R}_{2}\\nonumber\\\\\n&&\\times\\exp\\left[{- \\frac{(x-x_0+v_x t)^2}{2\\Delta x_p^2}}\\right]\\exp\\left[{\\frac{i\\alpha t(x-x_0+v_x t)^2}{2\\Delta x_{p1}^2}}\\right]\\nonumber\\\\\n&&\\times\\exp\\left[{- \\frac{(z-z_0+v_z t)^2}{2\\Delta z_p^2}}\\right] \\exp\\left[{\\frac{i\\alpha t(z-z_0+v_z t)^2}{2\\Delta z_{p1}^2}}\\right]\\exp\\left[-ik_x(x-x_0)\\right]\\nonumber\\\\\n&&\\times\\exp\\left[-ik_z(z-z_0)\\right]\\exp\\left(ik_yy\\right)\\exp\\left[-i(\\omega_x+\\omega_z) t+i\\chi)\\right].\\label{psi2}\n\\end{eqnarray}\nThe various functions and constants used are given by:\n\\begin{eqnarray}\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\tilde{R}_{1}=\\cos^2\\frac{\\pi}{4},\\;\\;\\;\\tilde{R}_{2}=\\sin^2\\frac{\\pi}{4}\\;\\;\\;\\mathrm{(for\\; equal\\; amplitudes)},\\nonumber\\\\\n\\alpha&=&\\frac{\\hbar}{m},\\; \\;\\;v_x=\\frac{\\hbar k_x}{m}, \\;\\;\\;\\omega_x=\\frac{\\hbar k_x^2}{2m},\\;\\;\\;v_z=\\frac{\\hbar k_z}{m}, \\;\\;\\;\\omega_z=\\frac{\\hbar k_z^2}{2m},\\nonumber\\\\ \\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\Delta x_{n0}=\\mathrm{width \\;of\\; the}\\;-x_0\\;\\mathrm{wavepacket}, \\;\\;\\;\\Delta z_{n0}=\\Delta x_{n0}\\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\Delta x_{p0}=\\mathrm{width \\;of\\; the}\\;+x_0\\;\\mathrm{wavepacket}, \\;\\;\\;\\Delta z_{p0}=\\Delta x_{p0}\\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!A_1(t)=A_{xn}(t)A_{zn}(t)= \\left( \\frac{2\\pi}{\\Delta x_{n0}^2+i\\alpha t} \\right)^{\\frac{1}{2}}\\left(\\frac{2\\pi}{\\Delta z_{n0}^2+i\\alpha t}\\right)^{\\frac{1}{2}} \\nonumber \\\\ \\nonumber\\\\\n&&\\;\\;=\\beta_{xn} (t)e^{i\\theta_{xn}(t)}\\beta_{zn}(t)e^{i\\theta_{zn}(t)}=\\beta_1e^{ i2\\theta_1}, \\label{AA11}\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!A_2(t)=A_{xp}(t)A_{zp}(t)= \\left( \\frac{2\\pi}{\\Delta x_{p0}^2+i\\alpha t} \\right)^{\\frac{1}{2}}\\left(\\frac{2\\pi}{\\Delta z_{p0}^2+i\\alpha t}\\right)^{\\frac{1}{2}} \\nonumber\\\\ \\nonumber\\\\\n&&\\;\\;=\\beta_{xp} (t)e^{i\\theta_{xp}(t)}\\beta_{zp}(t)e^{i\\theta_{zp}(t)}=\\beta_2 e^{ i2\\theta_2}, \\label{AA22}\n\\end{eqnarray}\nwhere\n\\begin{eqnarray}\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\beta_{xn}(t)=\\beta_{zn}(t) =\\left( \\frac{4\\pi^2}{\\Delta x_{n0}^4+\\alpha^2 t^2}\\right)^{\\frac{1}{4}},\\;\\;\\;\\beta_{1}(t)=\\left( \\frac{4\\pi^2}{\\Delta x_{n0}^4+\\alpha^2 t^2}\\right)^{\\frac{1}{2}}\\nonumber\\\\ \\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\theta_1=\\theta_{xn}(t)=\\theta_{zn}(t) =\\frac{1}{2} \\tan^{-1} \\left(-\\frac{\\alpha t}{\\Delta x_{n0}^2} \\right)+2k\\pi,\\;\\;\\;k=0,1,\\ldots,\\nonumber\\\\ \\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\beta_{xp}(t)=\\beta_{zp}(t) =\\left( \\frac{4\\pi^2}{\\Delta x_{p0}^4+\\alpha^2 t^2}\\right)^{\\frac{1}{4}},\\;\\;\\;\\beta_{2}(t)=\\left( \\frac{4\\pi^2}{\\Delta x_{p0}^4+\\alpha^2 t^2}\\right)^{\\frac{1}{2}}\\nonumber\\\\ \\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\theta_2=\\theta_{xp}(t)=\\theta_{zp}(t) =\\frac{1}{2} \\tan^{-1} \\left(-\\frac{\\alpha t}{\\Delta x_{p0}^2} \\right)+2k\\pi,\\;\\;\\;k=0,1,\\ldots,\\nonumber\\\\ \\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\Delta x_n^2=\\Delta z_n^2 =\\left(\\Delta x_{n0}^2+\\frac{\\alpha^2 t^2}{\\Delta x_{n0}^2}\\right),\\;\\;\\;\\Delta x_{n1}^2=\\Delta z_{n1}^2=\\left(\\Delta x_{n0}^4+\\alpha^2 t^2\\right),\\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\Delta x_p^2= \\Delta z_p^2 =\\left(\\Delta x_{p0}^2+\\frac{\\alpha^2 t^2}{\\Delta x_{p0}^2}\\right),\\;\\;\\;\\Delta x_{p1}^2=\\Delta z_{p1}^2=\\left(\\Delta x_{p0}^4+\\alpha^2 t^2\\right),\\nonumber\n\\end{eqnarray}\nFurther definitions and values of quantities used in the plots are given in Table \\ref{COMPP}.1. Note that the Gaussian wave packets are functions of $x$ and $z$, while the $y$-behaviour is represented by a plane wave. Plane waves are useful idealisations that are not realisable in practice. This leads to a computer model in which the intensity $R^2$ and quantum potential $Q$ at a given time maintain the same form from $y=-\\infty$ to $+\\infty$.\tHowever, both the intensity and quantum potential evolve in time so that an electron at each position of its trajectory sees an evolving intensity and quantum potential. \n\nThe total wave function is the sum of the two wave packets:\n\\begin{equation}\n\\psi=\\psi_1+\\psi_2\n\\end{equation}\n\nOur computer model is based on the Bohm-de Broglie causal interpretation and we refer the reader to Bohm's original papers for details of the interpretation \\cite{B52}. Here we will give only a very brief outline in order to introduce the elements we will need to develop the formulae and equations needed for the model. The interpretation is obtained by substituting $\\phi(x,y,z,t)=R(x,y,z,t)\\exp(iS(x,y,z,t\/\\hbar)$, where $R$ and $S$ are two fields which codetermine one another, into the Schr\\\"{o}dinger equation\n\\[\ni\\hbar\\frac{\\partial \\psi}{\\partial t}=-\\frac{\\hbar^2}{2m}\\nabla^2\\psi+V\\psi,\n\\]\nwhere $V=V(x,y,z,t)$. Differentiating and equating real and imaginary terms gives two equations. One is the usual continuity equation,\n\\begin{equation}\n\\frac{\\partial R^{2}}{\\partial t}+\\nabla\\cdot\\left(R^{2}\\frac{\\nabla S}{m}\\right)=0,\n\\end{equation}\nwhich expresses the conservation of probability $R^2$. The other is a Hamilton-Jacobi type equation\n\\begin{equation}\n -\\frac{\\partial S}{\\partial t}= \\frac{(\\nabla S)^{2}}{2m}+V+\\left (-\\frac{\\hbar^{2}}{2m}\\frac{\\nabla^{2} R}{R}\\right).\n\\end{equation}\nThis differs from the classical Hamilton-Jacobi equation by the extra term\n\\begin{equation}\nQ=-\\frac{\\hbar^{2}}{2m}\\frac{\\nabla^{2} R}{R},\n\\end{equation}\nwhich Bohm called the quantum potential. The classical Hamilton-Jacobi equation describes the behaviour of a particle with energy $E$, momentum $p$ and velocity $v$ under the action of a potential $V$, with the energy, momentum and velocity given by\n\\begin{eqnarray}\nE&=&-\\frac{\\partial S}{\\partial t}, \\nonumber\\\\\np&=&\\nabla S,\\nonumber\\\\\nv_p(\\mbox{$\\vec{r}$})&=&\\frac{d \\mbox{$\\vec{r}$}}{dt}=\\frac{\\nabla S}{m}. \\label{ENMOM}\n\\end{eqnarray}\nBohm retain's these definitions, while de-Broglie focused the third definition and called it the guidance formula. This allows quantum entities such as electrons, protons, neutrons etc. (but not photons\\footnote{The causal interpretation based on the Schr\\\"{o}dinger is obviously non-relativistic, but it is more than adequate for the description of the behaviour of electrons, protons, neutrons etc., in a large range of circumstances. This is not so for photons, the proper description of which requires quantum optics, which is based on the second-quantisation of Maxwell's equation. Photons, more generally, the electromagnetic field are described by the causal interpretation of boson fields, which includes the electromagnetic field \\cite{K85}.}) to be viewed as particles (always) with energy, momentum and velocity given by (\\ref{ENMOM}). Particle trajectories are found by integrating $v(\\mbox{$\\vec{r}$})$ given in (\\ref{ENMOM}). The extra $Q$ term produces quantum behaviour such as the interference of particles (which is what we will model in this article). Strictly, since the $R$ and $S$-fields codetermine one another, the $S$-field is as much responsible for quantum behaviour as the $R$-field; the $S$-field through the guidance formula, and the $R$-field through the quantum potential. \n\nThe Born probability rule is an essential interpretational element that links theory with experiment. As such it will remain a part of any interpretation of the quantum theory. This is certainly true for the causal interpretation, where probability enters because the initial positions of particles cannot be determined precisely. Instead, initial positions are given with a probability found from the usual probability density $|\\psi(x,y,z,t=0)|^2=R(x,y,z,t=0)^2$.\n\nThe results of the usual interpretation are identical with those of the causal interpretation as long as the following assumptions are satisfied:\n \\begin{enumerate}\n \\item[(1)] The $\\psi$-field satisfies Schr\\\"{o}dinger equation.\n \\item[(2)] Particle momentum is restricted to $\\mbox{$\\vec{p}$}=\\nabla S$.\n \\item[(3)] Particle position at time $t$ is given by the\n probability density $|\\psi(\\mbox{$\\vec{r}$},t)|^2$.\n \\end{enumerate}\n\nTo obtain the intensity, $Q$ and trajectories we must first find the $R$ and $S$-fields defined by $\\psi=Re^{iS\/\\hbar}$ in terms of $R_1$, $R_2$, $S_1$ and $S_2$ defined by $\\psi_1=A_1 R_1e^{iS'_1\/\\hbar} =\\beta_1R_1e^{iS_1\/\\hbar}$ and $\\psi_2=A_2 R_2e^{iS'_2\/\\hbar} =\\beta_2 R_2e^{iS_2\/\\hbar}$. We do this by first noting Eq. (\\ref{AA11}) for $A_1$ and Eq. (\\ref{AA22}) for $A_2$ and then comparing $\\psi_1=A_1 R_1e^{iS'_1\/\\hbar} =\\beta_1R_1e^{iS_1\/\\hbar}$ and $\\psi_2=A_2 R_2e^{iS'_2\/\\hbar} =\\beta_2 R_2e^{iS_2\/\\hbar}$ with Eqs. (\\ref{psi1}) and (\\ref{psi2}) to get\n\\begin{eqnarray}\nR_1(x,z,t)&=& \\beta_1 \\tilde{R}_{1}\\exp\\left[{-\\frac{(x+x_0-v_x t)^2}{2\\Delta x_n^2}}\\right]\\exp\\left[{- \\frac{(z+z_0-v_z t)^2}{2\\Delta z_n^2}}\\right] \\nonumber\\\\\nR_2(x,z,t)&=& \\beta_2 \\tilde{R}_{2}\\exp\\left[{-\\frac{(x-x_0+v_x t)^2}{2\\Delta x_p^2}}\\right] \\exp\\left[{- \\frac{(z-z_0+v_z t)^2}{2\\Delta z_p^2}} \\right] \\nonumber\\\\\nS_1(x,y,z,t)&=&{\\frac{\\hbar\\alpha t(x+x_0-v_x t)^2}{2\\Delta x_{n1}^2}}+{\\frac{\\hbar\\alpha t(z+z_0-v_z t)^2}{2\\Delta z_{n1}^2}}\\nonumber\\\\\n&& + \\hbar k_x(x+x_0)+\\hbar k_z(z+z_0)+\\hbar k_y y-\\hbar(\\omega_x+\\omega_z) t+2\\hbar\\theta_1\\nonumber \\nonumber\\\\\nS_2(x,y,z,t)&=&\\frac{\\hbar\\alpha t(x-x_0+v_x t)^2}{2\\Delta x_{p1}^2}+\\frac{\\hbar\\alpha t(z-z_0+v_z t)^2}{2\\Delta z_{p1}^2}\\nonumber\\\\\n&&-\\hbar k_x(x-x_0)-\\hbar k_z(z-z_0)+\\hbar k_y y-\\hbar(\\omega_x+\\omega_z) t+\\hbar\\chi+2\\hbar\\theta_2. \\nonumber\\\\\n\\end{eqnarray}\nThe intensity (probability density) is easily found from $|\\psi|^2=R^2$:\n\\begin{equation}\nR^2= R_1^2+R_2^2+2R_1^2R_2^2\\cos\\left( \\frac{S_1-S_2}{\\hbar}\\right).\\label{RSQ}\n\\end{equation}\nThe quantum potential ($Q$) is found from:\n\\begin{eqnarray}\nQ&=&-\\frac{\\hbar^{2}}{2m}\\frac{\\nabla^{2} R}{R}\\nonumber\\\\\n&=&-\\frac{\\hbar^{2}}{2m}\\frac{1}{R}\\left(\\frac{\\partial^2 R}{\\partial x^2}+ \\frac{\\partial^2 R}{\\partial y^2}+ \\frac{\\partial^2 R}{\\partial z^2} \\right)=Q_x+Q_y+Q_z,\\nonumber\n\\end{eqnarray}\nwhere\n\\begin{equation}\nQ_x=-\\frac{\\hbar^{2}}{2mR}\\frac{\\partial^2 R}{\\partial x^2}=\\frac{\\hbar^{2}}{8mR^4}\\left(\\frac{\\partial R^2}{\\partial x}\\right)^2 -\\frac{\\hbar^{2}}{4mR^2}\\frac{\\partial^2 R^2}{\\partial x^2}, \\label{QPF}\n\\end{equation}\nwith similar formulae for $Q_y$ and $Q_z$. Substituting Eq. (\\ref{RSQ}) into the formulae for $Q_x$ and $Q_y$ and differentiating gives $Q_y=0$ and\n\\begin{eqnarray}\nQ_x&=&- \\frac{\\hbar^2}{4mR^4} \\left[ \\frac{(x+x_0-v_x t)}{\\Delta x_n^2}R_1^2+\\frac{(x-x_0+v_x t)}{\\Delta x_p^2}R_2^2 \\right. \\nonumber\\\\\n&&+ \\left. R_1^2 R_2^2 \\left[ \\left( \\frac{(x+x_0-v_x t)}{\\Delta x_n^2}+\\frac{(x-x_0+v_x t)}{\\Delta x_p^2} \\right) \\cos(S_{12}) +S_{x12}\\sin(S_{12})\n \\right]\\right]^2\\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!-\\frac{\\hbar^2}{2mR^2} \\left[ R_1^2 \\left( \\frac{2(x+x_0-v_x t)^2}{\\Delta x_n^4}-\\frac{1}{\\Delta x_n^2} \\right) + R_2^2\\left(\\frac{2(x-x_0+v_x t)^2}{\\Delta x_p^4}-\\frac{1}{\\Delta x_p^2} \\right) \\right] \\nonumber\\\\\n&&\\;\\;-\\frac{\\hbar^2R_1 R_2}{2mR^2} \\left( \\frac{(x+x_0-v_x t)^2}{\\Delta x_n^4}-\\frac{1}{\\Delta x_n^2}+2\\frac{(x+x_0-v_x t)(x-x_0+v_x t)}{\\Delta x_n^2 \\Delta x_p^2} \\right. \\nonumber\\\\\n&&\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\; \\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;+ \\left. \\frac{(x-x_0+v_x t)^2}{\\Delta x_p^4} - \\frac{1}{\\Delta x_p^2} \\right)\\cos(S_{12}) \\nonumber\\\\\n&&\\;\\,-\\frac{\\hbar^2R_1 R_2}{2mR^2} \\left[ 2\\left( \\frac{(x+x_0-v_x t)}{\\Delta x_n^2}+\\frac{(x-x_0+v_x t)}{\\Delta x_p^2} \\right)S_{x12} \\sin(S_{12}) \\right. \\nonumber\\\\\n&&\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\;\\; \\left. - S_{xx12}\\sin(S_{12}) - S_{x12}^2 \\cos(S_{12}) \\right]\\label{QPX}\n\\end{eqnarray}\nwhere \n\\begin{eqnarray}\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\! S_{12}=S_1-S_2 \\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\! S_{x12}= \\frac{\\alpha t(x+x_0-v_x t)}{\\Delta x_{n1}^2} - \\frac{\\alpha t(x-x_0+v_x t)}{\\Delta x_{p1}^2} + 2k_x\\nonumber\\\\\n&&\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\!\\! S_{xx12}= \\frac{\\alpha t}{\\Delta x_{n1}^2} - \\frac{\\alpha t}{\\Delta x_{p1}^2}\\nonumber\n\\end{eqnarray}\nThe formulae for $Q_z$ is identical to that of $Q_x$, except that $x$ is replaced by $z$ everywhere it appears.\n\nThe trajectories, as we have said, are found by integrating Eq. (\\ref{ENMOM}). Therefore, to find the trajectories we do not need to find $S$, only its derivatives with respect to $x,y,z$. This can be done using the formula\n\\begin{equation}\n\\nabla S=\\frac{\\hbar}{2i}\\left( \\frac{\\nabla \\psi}{\\psi}-\\frac{\\nabla \\psi*}{\\psi*} \\right).\n\\end{equation}\nWe get\n\\begin{equation}\n\\frac{\\partial S}{\\partial y}=\\hbar k_y,\n\\end {equation}\nand\n\\begin{eqnarray}\n\\frac{\\partial S}{\\partial x}&=&\\frac{\\hbar}{R^2}\\left[ \\frac{x}{\\Delta x_n^2\\Delta x_p^2 }R_1 R_2\\sin(S_{12}) (\\Delta x_n^2-\\Delta x_p^2) \\right. \\nonumber\\\\\n&&+ \\frac{\\alpha t x}{\\Delta x_{n1}^2\\Delta x_{p1}^2}\\left[ R_1^2\\Delta x_{p1}^2 + R_2^2\\Delta x_{n1}^2 + R_1 R_2\\cos(S_{12}) \\right](\\Delta x_{n1}^2+\\Delta x_{p1}^2) \\nonumber\\\\\n&&\\;- \\frac{(x_0-v_xt)}{\\Delta x_n^2\\Delta x_p^2 } R_1 R_2\\sin(S_{12}) (\\Delta x_n^2+\\Delta x_p^2) \\nonumber\\\\\n&&\\;+ \\frac{(\\alpha t x_0-\\alpha t^2v_x)}{\\Delta x_{n1}^2\\Delta x_{p1}^2}\\left[R_1^2\\Delta x_{p1}^2 - R_2^2\\Delta x_{n1}^2 + R_1 R_2\\cos(S_{12}) \\right](\\Delta x_{p1}^2-\\Delta x_{n1}^2) \\nonumber\\\\\n&&\\;\\;\\;+ k_x( R_1^2 - R_2^2) \\nonumber\\\\\n\\end{eqnarray}\nThe $z$-derivative $\\frac{\\partial S}{\\partial z}$ is identical to $\\frac{\\partial S}{\\partial x}$, except that $x$ is everywhere replaced by $z$. From Eq. (\\ref{ENMOM}),\n\\begin{equation}\nv_p=v_{px}\\hat{i}+v_{py}\\hat{j}+v_{pz}\\hat{k}=\\frac{dx}{dt}\\hat{i}+\\frac{dy}{dt}\\hat{j}+\\frac{dz}{dt}\\hat{k}=\\frac{1}{m}\\left( \\frac{\\partial S}{\\partial x}\\hat{i}+\\frac{\\partial S}{\\partial y}\\hat{j}+\\frac{\\partial S}{\\partial z}\\hat{k} \\right),\n\\end{equation}\nwe see that to obtain the electron trajectories $\\mbox{$\\vec{r}$}(t)=x(t)\\hat{i}+y(t)\\hat{j}+z(t)\\hat{k}$, we must solve the following differential equations with various initial conditions:\n\\begin{eqnarray}\n\\frac{dx(t)}{dt} =\\frac{1}{m}\\frac{\\partial S}{\\partial x}, \\label{DXDT}\\\\\n\\frac{dy(t)}{dt} =\\frac{1}{m}\\frac{\\partial S}{\\partial y}, \\label{DYDT}\\\\\n\\frac{dz(t)}{dt} =\\frac{1}{m}\\frac{\\partial S}{\\partial z}. \\label{DZDT}\n\\end{eqnarray}\nNote that the components of the particle veloctiy $v_p$ are different from the velocities of the wave packets $v_x$, $v_y$ and $v_z$. Eq. (\\ref{DYDT}) can be solved immediately to give $y(t)=\\hbar k_y t$. Eqs. (\\ref{DXDT}) and (\\ref{DZDT}) are coupled non-linear differential equations. These were solved numerically using a Fortran program we wrote based on an adapted fourth-order Runge-Kutta algorithm \\cite{BF89} with fixed step size. This completes the various elements of he mathematical model. In the following section we show the various plots. \n \\section{The Computer plots\\label{COMPP}}\nFor the sake of comparison, we first reproduce plots of the intensity, $Q$ and trajectories for the two-slit experiment modeled by one-dimensional Gaussian wave-packets. These are shown in Figs. \\ref{INT1DG}, \\ref{QP1DG}, and \\ref{TRAJ1DG}. \\\\ \\mbox{}\\\\\n\\begin{center}\n\\begin{tabular}{|l|} \\hline \n\\hspace*{.1in}{\\bf Table \\ref{COMPP}.1} Definition and values of the quantities used in the plots. \\hspace*{0.4cm}\\\\ \n\\end{tabular}\n\\begin{tabular}{|l|l|l|} \\hline\\hline \n\\textbf{Quantity}&\\hspace*{.8in}\\textbf{Definition} & \\textbf{Value} \\\\ \\hline\\hline \n$b$ & Angle for equal amplitudes & $\\pi\/4$\\\\ \\hline\n$b$ & Angle for unequal amplitudes & $\\arccos(1\/\\sqrt{4})$ \\\\ \\hline\n$\\tilde{R_1}$& Amplitude of $\\psi_1$ &$\\cos^2 (b)$ \\\\ \\hline\n$\\tilde{R_2}$& Amplitude of $\\psi_2$ &$\\sin^2 (b)$\\\\ \\hline\n$x_0$ & $x$-distance of the center of the& $5\\times 10^{-7}$ m\\\\ \n & pinhole from the origin & \\\\ \\hline\n$z_0$ & $z$-distance of the center of the& $0$ m \\\\ \n & pinhole from the origin & \\\\ \\hline\n$h$ & Planck's constant & $6.62607004\\times10^{-34}$ Js \\\\ \\hline\n$\\hbar$ & Planck's constant\/$2\\pi$ & $1.05457180\\times10^{-34}$ Js \\\\ \\hline\n$m$ & mass of electron & $9.10938356*10^{-31}$ kg \\\\ \\hline\n$\\alpha$ & $\\hbar\/m$ & $0.00011576764$ Jsm$^{-1}$ \\\\ \\hline\n$k_x$ & Magnitude of $x$-wavenumber & $1.295698717\\times10^6$ m$^{-1}$ \\\\ \\hline\n$k_y$ & Magnitude of $y$-wavenumber & $1.122938132\\times10^{12}$ m$^{-1}$ \\\\ \\hline\n$k_z$ & Magnitude of $z$-wavenumber & $0$ \\\\ \\hline\n$v_x$ & $x$-component of the velocity & $\\alpha k_x=150$ ms$^{-1}$ \\\\ \n & of the Gaussian wave-packet & \\\\ \\hline\n$v_y$ & $y$-component of the velocity & $\\alpha k_y=1.3\\times 10^8$ ms$^{-1}$ \\\\ \n & of the Gaussian wave-packet & \\\\ \\hline\n$v_z$ & $z$-component of the velocity & $\\alpha k_z=0$ ms$^{-1}$ \\\\ \n & of the Gaussian wave-packet & \\\\ \\hline\n$\\omega$ & Angular frequency $\\omega$ & $\\hbar(k_x^2+k_y^2)\/2m$ \\\\ \\hline\n$\\chi$ & phase shift of $\\psi_2$ & $0$ \\\\ \\hline\n$\\Delta x_{n0}=\\Delta z_{n0}$ & Width of the $-x_0$ wave-packet & $\\Delta x_{n0}=7\\times 10^{-8}$ m \\\\ \\hline\n$\\Delta x_{p0}=\\Delta z_{p0}$ & Width of the $+x_0$ wave-packet & $\\Delta x_{p0}=\\Delta x_{n0}$ \\\\ \\hline\n$\\Delta x_{n0}=\\Delta z_{n0}$ & Width of the $-x_0$ wave-packet & $\\Delta x_{n0}=7\\times 10^{-8}$ m \\\\ \n & for unequal pinhole widths & \\\\ \\hline\n$\\Delta x_{p0}=\\Delta z_{p0}$ & Width of the $+x_0$ wave-packet & $\\Delta x_{p0}=2\\Delta x_{n0}$ \\\\ \n & for unequal pinhole widths & \\\\ \\hline\n\\end{tabular}\n\\end{center}\n\\newpage\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{0.7in}\\includegraphics[width=4.6in,height=2.3in]{figure3.jpg}\n\\caption{Two orientations of the intensity in a two-slit interference experiment modeled by one-dimensional Gaussian wave-packets.\\label{INT1DG}}\n\\end{figure}\n\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{0.7in}\\includegraphics[width=4.6in,height=2.3in] {figure4.jpg} \n\\caption{Two orientations of the quantum potential in a two-slit interference experiment modeled by one-dimensional Gaussian wave-packets.\\label{QP1DG}}\n\\end{figure}\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{1.4in}\\includegraphics[width=3in,height=2.6in] {figure5v3_3.pdf} \n\\vspace*{0.0in\n\\caption{The Trajectories in a two-slit interference experiment modeled by a one-dimensional Gaussian wave-packet.\\label{TRAJ1DG}}\n\\end{figure}\nThe quantities used for the two-pinhole experiment plots are given in Table 3.1. Note that the slit width used by J\\\"{o}nsson is $2\\times 10^{-7}$ m. The width of the Gaussian \nwavepackets $\\psi_1$ and $\\psi_2$ are defined at half their amplitude. We have chosen the widths of $\\psi_1$ and $\\psi_2$ to be $\\Delta x_{n0}=\\Delta z_{n0}=\\Delta x_{p0}=\\Delta z_{p0}=7\\times 10^{-8}$ m so that the width of the base of $\\psi_1$ and $\\psi_2$ approximately corresponds to $2\\times10^{-7}$ m. For unequal pinhole widths $\\Delta x_{p0}=\\Delta z_{p0}=2\\Delta x_{n0}$. We will consider three configurations: (1) Equal pinhole widths and equal amplitudes, (2) Equal pinhole widths and unequal amplitudes and (3) Unequal pinhole widths and equal amplitudes. \n\nIn the two-dimensional case, i.e., pinhole case, the intensity $R^2$ and quantum potential $Q$ are functions of four variables $x,y,x$ and $t$. To produce plots we note that because the $y$-behaviour is represented by a plane-wave, $Q_y=0$, while $Q_x$ and $Q_z$ depend only on $x$, $z$ and $t$. Similarly, the intensity does not depend on $y$. This means that the values of $R^2$ and $Q$ in the $xy$-plane at a given instant of time are the same from $y=-\\infty$ to $y=+\\infty$, as mentioned in \\S \\ref{MM}. At a later instant, the form of $R^2$ and $Q$ change instantaneously from $y=-\\infty$ to $y=+\\infty$. This unphysical behaviour is due to the use of the plane-wave idealisation to represent the $y$-behaviour. A more realistic picture would be to also use a Gaussian in the $y$-direction. However, as we shall see, the model produces a realistic picture of particle trajectories which depend on $x,y,z,t$. Since the quantum potential and intensity change in time, the electron `sees' evolving values of these quantities. All the plots below show what the electron `sees' at a particular instant of time $t$ and a particular position $x,y,z$.\n\nTo graphically represent $R^2$ and $Q$ we proceeded two ways. First, we produced animations of $R^2$ and $Q$. We produced animations of six frames, so that the sequence of frames is short enough to be reproduced in this article. In any case, our commuter did not have enough memory to produce animations of more than six frames. The animations are produced in the $xz$-plane and show the form of intensity and quantum potential that the electron `sees' at each instant of time as it moves along its trajectory. Second, we produced animations of density plots in the $xz$-plane. These results are presented by placing three two-dimensional $xz$-slices (three frames of the animation) along the $t$-axis, i.e., we pick out three slices of a fully three dimensional density plot. \n\n\\subsection{Computer plots for equal pinhole widths and equal amplitudes}\n\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.1in}\\includegraphics[width=4in,height=5.33in] {figure6.jpg} \n\\caption{The intensity in a two-pinhole interference experiment with equal widths and equal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths and equal amplitudes.\\label{INT2DG}}\n\\end{figure}\nThe animation sequence for the intensity $R^2$ for equal widths and equal amplitudes (EQEA) is shown in Fig. \\ref{INT2DG}. The animation ranges are $x=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $z=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $R^2 = 0$ to $1.8\\times 10^{-11}$ Jm$^{-2}$s$^{-1}$ and $t=0$ to $1.5\\times 10^{-9}$ s. The plots show the time evolution of the intensity in the $xz$-plane. The first frame shows the Gaussian peaks at the two pinholes. Frames two and three show the spreading Gaussian packets beginning to overlap and also show the beginning of the formation of interference fringes. Frames four to six show the time evolution of distinct interference fringes. Frame six shows the intensity distribution at time $t=1.5\\times 10^{-9}$ s which corresponds to a pinhole screen to detecting screen separation of $y = 0.195$ m given that the electron velocity in the y-direction is $v_y = 1.3 \\times 10^{-8}$ ms$^{-1}$. Our pinhole screen and detecting separation therefore differs from that in J\\\"{o}nssons experiment which was $0.35$ m corresponding a time evolution of $t=0$ to $2.6923\\times 10^{-9}$ s. We chose this time in order to show the beginnings of the overlap of the Gaussian wave packets. Using the J\\\"{o}nsson time of $t=0$ to $2.6923\\times 10^{-9}$ s resulted in a clear interference pattern in the second frame, missing out the early overlap.\n\nWe can make an approximate calculation of the visibility of the central fringe by taking readings from `face-on' plots, i.e., plots with the $xz$-plane in the plane of the paper (not shown here). Readings can be taken from the plots shown by taking due consideration of the orientation, but even then, readings are less accurate than with face-on plots. Similarly, to calculate the visibility of the interference fringes for the case of unequal amplitudes and for the case of unequal widths, readings are taken from face-on plots not included here. The visibility of the central fringe for the EWEA case is:\n\\[\nV_{EWEA}=\\frac{I_{max}-I_{min}}{I_{max}+I_{min}}=\\frac{10\\times 10^{10}-0}{10\\times 10^{10}+0}=1.\n\\]\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.0in}\\includegraphics[width=4in,height=3in] {figure7.jpg} \n\\caption{A sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ in a two-pinhole interference experiment with equal widths and equal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths and equal amplitudes.\\label{INT2DGDP}}\n\\end{figure}\nA sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ for equal widths and equal amplitudes is shown in Fig. \\ref{INT2DGDP}. The plot ranges are $x=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m, $z=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. The first $xz$-slice shows the high intensity emerging from the two pinholes, the middle $xz$-slice shows the beginning of the formation of interference as the Gaussian packets begin to overlap, while the final $xz$-slice shows a fully formed interference pattern.\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{1.1in}\\includegraphics[width=4in,height=5.33in] {figure8.jpg} \n\\caption{The quantum potential in a two-pinhole interference experiment with equal widths and equal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths and equal amplitudes.\\label{QPAnim}}\n\\end{figure}\n\nThe animation sequence for the quantum potential $Q$ for equal widths and equal amplitudes is shown in Fig. \\ref{QPAnim}. The animation ranges are $x=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $z=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $Q=-1\\times 10^{-23}$ to $1\\times 10^{-23}$ J and $t=0$ to $2.6923\\times 10^{-9}$ s. This time we used the same pinhole to detecting screen separation, 0.35 m, (corresponding to a time of flight of $t=2.6923\\times10^{-9}$ s) as J\\\"{o}nsson, since this resulted in a clear plateau-valley formation in the final frame. The first frame shows that the quantum potential is restricted to the width of the two pinholes. The second frame shows the beginning of the formation of quantum potential plateaus and valleys corresponding to the beginning of the overlap of the Gaussian wave packets. Subsequent frames show the continued widening of the plateaus and the deepening of the valleys. The final frame, as mentioned, shows clear plateau and valley formation. \nThe gradient of the quantum potential gives rise to a quantum force. Where the gradient is zero, as on the flat plateaus, the quantum force is zero and electrons progress along their trajectory to a bright fringe on the detecting screen unhindered. At the edges of the plateaus the quantum potential slopes steeply down to the valleys. The steep gradient of these slopes gives rise to a large quantum force that pushes particles with trajectories along these slopes to adjacent plateaus, after which they proceed unhindered to a bright fringe on the detecting screen. In this way, the quantum potential guides the electrons to the bright fringes and prevents electrons reaching the dark fringes. Note though, as mentioned earlier, that since the $R$ and $S$-fields codetermine each other, the $S$-field can also be said to guide the electrons to the bright fringes. \n\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.0in}\\includegraphics[width=4in,height=3in] {figure9.jpg} \n\\caption{A sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ in a two-pinhole interference experiment with equal widths and equal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths and equal amplitudes.\\label{T2DGQPDP}}\n\\end{figure}\nA sequence of density plots (3 slices of a 3D-plot) of the quantum potential for equal widths and equal amplitudes is shown in Fig. \\ref{T2DGQPDP}. The plot ranges are $x=-3\\times 10^{-6}$ to $3\\times 10^{-6}$ m, $z=-3\\times 10^{-6}$ to $3\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. When producing the density animation we found that part of the image in the $t=0$ s frame was missing, hence, we have left out this frame, beginning instead with the $t=3\\times 10^{-10}$ s frame. The reason for the missing image is not clear, but is most likely due to the density plotting algorithm not handling difficult numbers very well, unlike the 3-D plotting algorithm. The first slice shows the beginning of the overlap of the Gaussian packets and the beginning of plateau and valley formation. The middle slice shows the more developed plateaus and valleys, while the final slice shows distinct plateaus and valleys. The wide bright blue bands indicate the quantum potential plateaus where the quantum force is zero. The narrower dark bands show the quantum potential sloping down to the valleys, slopes were electrons experience a strong quantum force. The darker the bands the steeper the quantum potential slopes.\n\n\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{0.8in}\\includegraphics[width=4.5in,height=2.36in] {figure10.jpg} \n\\caption{The trajectories in a two-pinhole interference experiment with equal widths and equal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths and equal amplitudes.\\label{TRAJEWEA}}\n\\end{figure}\nThe trajectories for equal widths and equal amplitudes is shown in Fig. \\ref{TRAJEWEA}. The trajectory ranges are $x=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $z=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. Though the axes are labeled at the edges, the plots correspond to axes with their origin placed centrally between the pinholes. We have chosen to label the axis at the edges of the plot frame in order to show the trajectories clearly. In a real experiment, the initial position of the electrons can lie anywhere within the pinholes. But, to clearly show the behaviour of the trajectories we have chosen square initial positions within each pinhole. It is clear, that interference occurs only along the $x$-direction; there is no interference along the $z$-direction. We also see clearly how the quantum potential (and $S$-field)\nguides the electron trajectories to the bright fringes. Electrons whose trajectories lie within the quantum potential plateaus, therefore experiencing no quantum force, move along straight trajectories to the bright fringes. Electrons whose trajectories lie along the quantum potential slopes are pushed by the quantum force to an adjacent plateau, thereafter proceeding along straight trajectories to the bright fringes.\n\n\\subsection{Computer plots for equal pinhole widths and unequal amplitudes}\n\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.1in}\\includegraphics[width=4in,height=5.33in] {figure11.jpg} \n\\caption{The intensity in a two-pinhole interference experiment with equal widths but unequal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths but unequal amplitudes.\\label{INT2DGUA}}\n\\end{figure}\nThe animation sequence for the intensity $R^2$ for equal widths and unequal amplitudes (EWUA) is shown in Fig. \\ref{INT2DGUA}. The animation ranges are $x=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $z=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $R^2 = 0$ to $1.8\\times 10^{-11}$ Jm$^{-2}$s$^{-1}$ and $t=0$ to $1.5\\times 10^{-9}$ s. As indicated in Table 3.1, for the case EWUA the angle $b=\\frac{\\pi}{3}$. This results in an increase in the intensity through the $+x_0$-pinhole from $\\frac{1}{2}$ to $\\frac{3}{4}$ and a reduction in the intensity at the $-x_0$-pinhole from $\\frac{1}{2}$ to $\\frac{1}{4}$. From Fig. \\ref{INT2DGUA}, we see that as the Gaussian wave-packets begin to combine to form a single peak envelope with interference fringes beginning to form, the intensity peak is shifted toward the larger intensity $+x_0$-pinhole. This shift becomes less pronounced, almost disappearing, as the interference fringes become more distinct as in the last $t=0$ to $1.5\\times 10^{-9}$ s frame. Comparing the $t=1.5\\times10^{-9}$ frame for EWUA with the corresponding intensity frame for EWEA we can see visually that fringe visibility is reduced. We can confirm this visual observation by calculating the visibility of the central fringe:\n\\[\nV_{EWUA}=\\frac{I_{max}-I_{min}}{I_{max}+I_{min}}=\\frac{8\\times 10^{10}-2\\times 1^{10}}{8\\times 10^{10}+2\\times 1^{10}}=0.6\n\\]\nClearly, the visibility is lower for the EWUA case.\n\n\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.0in}\\includegraphics[width=4in,height=3in] {figure12.jpg} \n\\caption{A sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ in a two-pinhole interference experiment with equal widths but unequal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths but unequal amplitudes.\\label{INT2DGDPUA}}\n\\end{figure}\nA sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ for equal widths and unequal amplitudes is shown in Fig. \\ref{INT2DGDPUA}. The plot ranges are $x=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m, $z=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. Again, comparing with EWUA case, we see that the intensity is reduced by noticing that the dark bands are not as distinct as for the case EWEA.\n\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{1.1in}\\includegraphics[width=4in,height=5.33in] {figure13.jpg} \n\\caption{The quantum potential in a two-pinhole interference experiment with equal widths but unequal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths but unequal amplitudes.\\label{QPAnimUA}}\n\\end{figure}\nThe animation sequence for the quantum potential $Q$ for equal widths and unequal amplitudes is shown in Fig. \\ref{QPAnimUA}. The animation ranges are $x=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $z=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $Q=-2\\times 10^{-25}$ to $4\\times 10^{-25}$ J and $t=0$ to $1.5\\times 10^{-9}$ s. The quantum potential in the early frames, perhaps unexpectedly, peaks on the side of the lower intensity $-x_0$-pinhole. This behaviour is most pronounced in frames two and three. As the peaks and valleys become more pronounced, the envelope peak spreads and flattens as shown in frames 5 and 6. However, the valleys on the side of the lower intensity $-x_0$-pinhole are deeper. Correspondingly, the gradient of quantum potential sloping down to the deeper valleys is greater giving rise to a stronger quantum force. This results in the formation of more distinct fringes on the side of the lower intensity pinhole.This feature is hardly visible in either the intensity animation frames, Fig. \\ref{INT2DGUA}, or in the intensity density plots, Fig. \\ref{INT2DGDPUA}. However, as we shall see below, the trajectory plots, Fig. \\ref{TRAJEWUA}, shows this feature more clearly.\n\n\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.0in}\\includegraphics[width=4in,height=3in] {figure14.jpg} \n\\caption{A sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ in a two-pinhole interference experiment with equal widths but unequal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths but unequal amplitudes.\\label{T2DGQPDPUA}}\n\\end{figure}\nA sequence of density plots (3 slices of a 3D-plot) of the quantum potential for equal widths and unequal amplitudes is shown in Fig. \\ref{T2DGQPDPUA}. The plot ranges are $x=-3\\times 10^{-6}$ to $3\\times 10^{-6}$ m, $z=-3\\times 10^{-6}$ to $3\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. As for the EWEA case, the first $t=0$ s slice is not shown, this time, because the image it is badly formed. Instead, we begin with the $t=3\\times 10^{-9}$ s slice. This slice clearly shows that the deeper valleys, indicated by blacker bands, are on the side of lower intensity $-x_0$-pinhole. As above, the bright blue bands represent regions where the quantum potential gradient is either zero or very small, giving rise to either a zero or small quantum force. In the final $t=1.5\\times 10^{-9}$ s slice, the peaks and valleys even out though a slight bias to deeper valleys on the $-x_0$ side is still discernible.\n\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{0.8in}\\includegraphics[width=4.5in,height=2.36in] {figure15.jpg} \n\\caption{The trajectories in a two-pinhole interference experiment with equal widths but unequal amplitudes modeled by two-dimensional Gaussian wave-packets with equal widths but unequal amplitudes.\\label{TRAJEWUA}}\n\\end{figure}\nThe trajectories for equal widths and unequal amplitudes are shown in Fig. \\ref{TRAJEWUA}. The trajectory ranges are $x=-4.5\\times 10^{-6}$ to $4.5\\times 10^{-6}$ m, $z=-4.5\\times 10^{-6}$ to $4.5\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. We notice that some electron trajectories reach what were the dark regions for the case of EWEA. This indicates the reduction of fringe visibility that we saw above in the intensity plots for this case. We also notice that this reduced intensity is less pronounced on the side of the lower intensity $-x_0$-pinhole, so that interference fringes on this side are more distinct, a feature we noted above for the quantum potential for this case. The overall reduction in visibility is clear to see.\n\n\\subsection{Computer plots for unequal pinhole widths and equal amplitudes}\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.1in}\\includegraphics[width=4in,height=5.33in] {figure16.jpg} \n\\caption{The intensity in a two-pinhole interference experiment with unequal widths but equal amplitudes modeled by two-dimensional Gaussian wave-packets with unequal widths but equal amplitudes.\\label{INT2DGUW}}\n\\end{figure}\nThe animation sequence for the intensity $R^2$ for unequal widths and equal amplitudes is shown in Fig. \\ref{INT2DGUW}. The animation ranges are $x=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $z=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $R^2 = 0$ to $1.8\\times 10^{11}$ Jm$^{-2}$s$^{-1}$ and $t=0$ to $1.5\\times 10^{-9}$ s. From Table 3.1, we note that the width of the $+x_0$ Gaussian wave-packet is twice that of the $-x_0$ Gaussian wave-packet. The first frame clearly shows the narrower $-x_0$ wave-packet. A narrower wave-packet spreads more rapidly than a wider packet, as seen in the second frame. The more rapid spread of the narrower wave-packet results in the wave-packets beginning to overlap on $+x$-side, as is shown in the second frame. As the wave-packets spread, the interference pattern becomes ever more distinct. Though becoming a little more symmetrical about $x=0$, the fringe pattern is shifted toward the $+x$-side, with the fringes on the $+x$-side being slightly more pronounced. This feature is seen more clearly in the intensity density plots, which we will describe next. The visibility of the central fringe for this case is:\n\\[\nV_{UWEA}=\\frac{I_{max}-I_{min}}{I_{max}+I_{min}}=\\frac{1.6\\times 10^{11}-0.1\\times 1^{11}}{1.6\\times 10^{11}+0.1\\times 10^{11}}=0.88.\n\\]\nWe see that the visibility is less than in the EWEA case, but greater than in the EWUA case.\n\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.0in}\\includegraphics[width=4in,height=3in] {figure17.jpg} \n\\caption{A sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ in a two-pinhole interference experiment with unequal widths and equal amplitudes modeled by two-dimensional Gaussian wave-packets with unequal widths but equal amplitudes.\\label{INT2DGDPUW}}\n\\end{figure}\nA sequence of density plots (3 slices of a 3D-plot) of the intensity $R^2$ for unequal widths and equal amplitudes is shown in Fig. \\ref{INT2DGDPUW}. The plot ranges are $x=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m, $z=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. Again, the first slice clearly shows the difference in the size of the pinholes, while the second slice shows interference fringes beginning to form on the $+x$-side. The final slice shows that the interference pattern develops into a more symmetric form, though still shifted more to the $+x$-side and slightly more pronounced on this side. The dark bands are less distinct than in the EWEA case, reflecting the reduction in fringe visibility for this case. \n\n\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{1.1in}\\includegraphics[width=4in,height=5.33in] {figure18.jpg} \n\\caption{The quantum potential in a two-pinhole interference experiment with unequal widths but equal amplitudes modeled by two-dimensional Gaussian wave-packets with unequal widths but equal amplitudes.\\label{QPAnimUW}}\n\\end{figure}\nThe animation sequence for the quantum potential $Q$ for unequal widths and equal amplitudes is shown in Fig. \\ref{QPAnimUW}. The animation ranges are $x=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $z=-3.5\\times 10^{-6}$ to $3.5\\times 10^{-6}$ m, $Q=-2\\times 10^{-25}$ to $4\\times 10^{-25}$ J and $t=0$ to $1.5\\times 10^{-9}$ s. As for the interference animation, the first frame shows the difference in size of the pinholes, while the second frame shows the more rapid spread of the narrower wave-packet. The overlap of the wave-packets, as for the intensity, begins on the $+x$-side, as does the formation of plateaus and valleys. Subsequent frames show the skewed formation to the $+x$-side of plateaus and valleys. The shift to the $+x$-side is maintained even in the last frame, even though the pattern looks more symmetrical. This can be seen by noticing that in the last frame there are three quantum potential peaks on the $+x$-side, compared to two peaks on the $-x$-side.\n\n\n\\begin{figure}[h]\n\\unitlength=1in \n\\hspace*{1.0in}\\includegraphics[width=4in,height=3in] {figure19.jpg} \n\\caption{A sequence of density plots (3 slices of a 3D-plot) of the quantum potential in a two-pinhole interference experiment with unequal widths but equal amplitudes modeled by two-dimensional Gaussian wave-packets with unequal widths but equal amplitudes.\\label{T2DGQPDPUW}}\n\\end{figure}\nA sequence of density plots (3 slices of a 3D-plot) of the quantum potential for unequal widths and equal amplitudes is shown in Fig. \\ref{T2DGQPDPUW}. The plot ranges are $x=-3\\times 10^{-6}$ to $3\\times 10^{-6}$ m, $z=-3\\times 10^{-6}$ to $3\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. As with the quantum potential density plots for the EWUA case, the image in the first slice is problematic. This time, the image is complete but it does not reflect the two-pinhole structure. As before, this is probably because the density plotting algorithm does not handle difficult numbers very well. The middle slice shows the early formation of plateaus and valleys skewed to the $+x$-side, with the plateau regions narrower than the valley regions. In the final slice, the plateau regions become wider than the valley regions, but are less distinct as compared to the EWEA case, or even as compared to the EWUA case. Despite this, the fringe visibility is greater than for the EWUA case, though of course, less than for EWEA case, as we saw above. Again, the shift of quantum potential peaks to the $+x$-side can be seen.\n\n\\begin{figure}[h]\n\\unitlength=1in\n\\hspace*{0.8in}\\includegraphics[width=4.5in,height=2.36in] {figure20.jpg} \n\\caption{The trajectories in a two-pinhole interference experiment with unequal widths but equal amplitudes modeled by two-dimensional Gaussian wave-packets with unequal widths but equal amplitudes.\\label{TRAJEWEAUW}}\n\\end{figure}\nThe trajectories for unequal widths and equal amplitudes is shown in Fig. \\ref{TRAJEWEAUW}. The trajectory ranges are $x=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m, $z=-4\\times 10^{-6}$ to $4\\times 10^{-6}$ m and $t=0$ to $1.5\\times 10^{-9}$ s. The electron trajectories clearly show the rapid spread of the narrower $-x_0$-Gaussian wave-packet. It can also be seen that electron trajectories from the $-x_0$-pinhole are more evenly spread on the detecting screen parallel to the $x$-axis than for the EWEA case, indicating a reduced interference pattern. The electron trajectories from the $+x_0$-pinhole, spread much less. Though only one bright and one dark fringe is shown on the $+x$-side, they appear more distinct than on the $-x$-side, reflecting the shift of the interference fringes to the $+x$-side\n\\section{Conclusion}\nWe have seen that the behaviour of the intensity, quantum potential and electron trajectories is similar to that for the two-slit experiment modeled by one-dimensional Gaussian wave-packets. In particular, the distinctive kinked behaviour of the electron trajectories is seen in directions parallel to the $x$-axis. We saw in addition, as could possibly be guessed at the outset, that there is no interference in the vertical $z$-direction. We also saw the expected reduction in interference for the cases of unequal amplitudes and unequal widths.The reduction in interference is interpreted, as in the classical case, in terms of wave profiles with reduced coherence. This is a far more intuitive explanation for the reduction in fringe visibility (and in my view more appealing) than the common interpretation based on the Wootters-Zureck version of complementarity \\cite{WZ79}, where the reduction of interference for the cases of unequal amplitudes and unequal widths is attributed to partial particle behaviour and partial wave-behaviour. The partial particle behaviour is attributed to the increase in knowledge of the electrons path in the sense that an electron it is more likely to pass through the larger pinhole or the pinhole with the larger intensity. In references \\cite{K92} and \\cite{K2016} we argued that the Wootters-Zureck version of complementarity as commonly interpreted actually contradicts Bohr's principle of complementary. In reference \\cite{K2016} we also indicated that by reference to two future, mutually exclusive experimental arrangements, an interpretation of the Wootters-Zureck version of complementarity consistent with Bohr's principle of complementarity can be achieved.\n\nUsing the weak measurement protocol introduced by Aharanov, Albert and Vaidman (see reference \\cite{K2017} for a brief overview and further references), Kocsis et al reproduced experimentally Bohm's trajectories in a two-slit interference experiment \\cite{KOCSIS2011}. We might guess that it would not be difficult to modify the experiment slightly to reproduce the electron trajectories calculated here for the case of unequal widths and the case of unequal amplitudes. \n\n\\include{Kaloyerou_Ilunga_2Slit_2DG_Bib_JPA}\n\n\\end{document}\n\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n\n\n\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction} \\label{sec:intro}\n\n\n\\begin{figure}[!t]\n \n \\hspace{0mm}\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=0.8\\linewidth]{latex\/figures\/overview5.png}\n \n \n \\end{subfigure}\n \\hfill\n \\vspace{5mm}\n \\begin{subfigure}[b]{0.45\\textwidth}\n \\centering\n \\includegraphics[width=0.9\\linewidth]{latex\/figures\/results.png}\n \n \n \\end{subfigure}\n \\hfill\n \\caption{{\\bf Model and performance overview. (top)} TSViT architecture. A more detailed schematic is presented in Fig.\\ref{fig:TSViT_submodules}. {\\bf (bottom) TSViT performance} compared with previous arts (Table \\ref{tab:results}).}\n \\label{fig:overview}\n\\end{figure}\n\n\nThe monitoring of the Earth surface man-made impacts or activities is essential to enable the design of effective interventions to increase welfare and resilience of societies. One example is the sector of agriculture in which monitoring of crop development can help design optimum strategies aimed at improving the welfare of farmers and resilience of the food production system. \nThe second of United Nations Sustainable Development Goals (SDG) of Ending Hunger relies on increasing the crop productivity and revenues of farmers in poor and developing countries \\cite{ungoals} - approximately 2.5 billion people's livelihoods depend mainly on producing crops \\cite{Conway2012}. Achieving SDG 2 goals requires to be able to accurately monitor yields and the evolution of cultivated areas in order to measure the progress towards achieving several goals, as well as to evaluate the effectiveness of different policies or interventions. \nIn the European Union (EU) the Sentinel for Common Agricultural Policy program (Sen4CAP) \\cite{sen4cap} focuses on developing tools and analytics to support the verification of direct payments to farmers with underlying environmental conditionalities such as the adoption of environmentally-friendly \\cite{practices} and crop diversification \\cite{diversification} practices based on real-time monitoring by the European Space Agency's (ESA) Sentinel high-resolution satellite constellation \\cite{EUa} to complement on site verification. \nRecently, the volume and diversity of space-borne Earth Observation (EO) data \\cite{50yearsEO} and post-processing tools \\cite{googleearth,deepsatdata,TrainingDML-AI} has increased exponentially. This wealth of resources, in combination with important developments in machine learning for computer vision \\cite{alexnet, resnet, fcn}, provides an important opportunity for the development of tools for the automated monitoring of crop development. \n\nTowards more accurate automatic crop type recognition, we introduce TSViT, the first fully-attentional\\footnote{without any convolution operations} architecture for general SITS processing. An overview of the proposed architecture can be seen in Fig.\\ref{fig:overview} (top). Our novel design introduces some inductive biases that make TSViT particularly suitable for the target domain:\n\\begin{itemize}\n \\item Satellite imagery for monitoring land surface variability boast a high revisit time leading to long temporal sequences, for example Sentinel-2 ({\\it S2}) satellites have an average revisit time of 5 days resulting in 60-70 acquisitions per year. To reduce the amount of computation we factorize input dimensions into their temporal and spatial components, providing intuition (section \\ref{sec:tsvit_encoder}) and experimental evidence (section \\ref{sec:ablation}) about why the order of factorization matters. \n \\item TSViT uses a Transformer backbone \\cite{aiayn} following the recently proposed ViT framework \\cite{vit}. As a result, every TSViT layer has a global receptive field in time or space, in contrast to previously proposed convolutional and recurrent architectures \\cite{Ruwurm2,Rustowicz2019SemanticSO,garnot_iccv,duplo,tempcnn}.\n \\item To make our approach more suitable for SITS modelling we propose a tokenization scheme for the input image timeseries and propose acquisition-time-specific temporal position encodings in order to extract date-aware features and to account for irregularities in SITS acquisition times (section \\ref{sec:position_encodings}). \n \\item We make modifications to the ViT framework (section \\ref{sec:tsvit_backbone}) to enhance its capacity to gather class-specific evidence which we argue suits the problem at hand and design two custom decoder heads to accommodate both global and dense predictions (section \\ref{sec:tsvit_decoder}).\n\\end{itemize}\nOur provided intuitions are tested through extensive ablation studies on design parameters presented in section \\ref{sec:ablation}. \nOverall, our architecture achieves state-of-the-art performance in three publicly available datasets for classification and semantic segmentation presented in Table \\ref{tab:results} and Fig.\\ref{fig:overview}.\n\n\n\n\n\n\n \n\\section{Related work}\n\\label{sec:related_work}\n\n\\subsection{Crop type recognition}\nCrop type recognition is a subcategory of land use recognition which involves assigning one of $K$ crop categories (classes) at a set of desired locations on a geospatial grid. For successfully doing so modelling the temporal patterns of growth during a time period of interest has been shown to be critical \\cite{temp_var,spacetime}. As a result, model inputs are timeseries of $T$ satellite images of spatial dimensions $H \\times W$ with $C$ channels, $\\mathbf{X} \\in \\mathbb{R}^{T \\times H\\times W \\times C}$ rather than single acquisitions. \nThere has been a significant body of work on crop type identification found in the remote sensing literature \\cite{cc1, ndvi1, ndvi2, ndvi3, hmm, pel_rand}. These works typically involve multiple processing steps and domain expertise to guide the extraction of features, e.g. NDVI \\cite{dvi}, that can be separated into crop types by learnt classifiers. More recently, Deep Neural Networks (DNN) trained on raw optical data \\cite{Ruwurm1,Ru_wurm_2018,dnn2,dnn3,dnn4,emb_earth} have been shown to outperform these approaches.\nAt the object level, (SITS classification) \\cite{tempcnn, duplo, transformer_sat} use 1D data of single-pixel or parcel-level aggregated feature timeseries, rather than the full SITS record, learning a mapping $f: \\mathbb{R}^{T \\times C} \\rightarrow \\mathbb{R}^{K}$. Among these works, TempCNN \\cite{tempcnn} employs a simple 1D convolutional architecture, while \\cite{transformer_sat} use the Transformer architecture \\cite{aiayn}. DuPLo \\cite{duplo} consists of an ensemble of CNN and RNN streams in an effort to exploit the complementarity of extracted features. Finally, \\cite{garnot2019satellite} view satellite images as un-ordered sets of pixels and calculate feature statistics at the parcel level, but, in contrast to previously mentioned approaches, their implementation requires knowledge of the object geometry.\nAt the pixel level (SITS semantic segmentation), models learn a mapping $f(\\mathbf{X}) \\in \\mathbb{R}^{H \\times W \\times K}$. For this task, \\cite{Ru_wurm_2018} show that convolutional RNN variants (CLSTM, CGRU) \\cite{conv_lstm} can automatically extract useful features from raw optical data, including cloudy images, that can be linearly separated into classes. The use of CNN architectures is explored in \\cite{Rustowicz2019SemanticSO} who employ two models: a UNET2D feature extractor, followed by a CLSTM temporal model (UNET2D-CLSTM); and a UNET3D fully-convolutional model. Both are found to achieve equivalent performances. In a similar spirit, \\cite{fpn_clstm} use a FPN \\cite{fpn} feature extractor, coupled with a CLSTM temporal model (FPN-CLSTM). The UNET3Df architecture \\cite{cscl} follows from UNET3D but uses a different decoder head more suited to contrastive learning. The U-TAE architecture \\cite{garnot_iccv} follows a different approach, in that it employs the encoder part of a UNET2D, applied on parallel on all images, and a subsequent temporal attention mechanism which collapses the temporal feature dimension. These spatial-only features are further processed by the decoder part of a UNET2D to obtain dense predictions. \n\n \n\\subsection{Self-attention in vision}\n\nConvolutional \\cite{alexnet,vgg,resnet} and fully-convolutional networks (FCN) \\cite{overfeat,fcn} have been the de-facto model of choice for vision tasks over the past decade. The convolution operation extracts translation-equivariant features via application of a small square kernel over the spatial extent of the learnt representation and grows the feature receptive field linearly over the depth of the network. In contrast, the self-attention operation, introduced as the main building block of the Transformer architecture \\cite{aiayn}, uses self-similarity as a means for feature aggregation and can have a global receptive field at every layer. Following the adoption of Transformers as the dominant architecture in natural language processing tasks \\cite{aiayn,bert,gpt3}, several works have attempted to exploit self-attention in vision architectures. Because the time complexity of self-attention scales quadratically with the size of the input, its naive implementation on image data, which typically contain more pixels than text segments contain words, would be prohibitive. To bypass this issue, early works focused on improving efficiency by injecting self-attention layers only at specific locations within a CNN \\cite{nonlocal,attn_augm_cnn} or by constraining their receptive field to a local region \\cite{image_transformer,stand_sa,axial_deeplab}, however, in practice, these designs do not scale well with available hardware leading to slow throughput rates, large memory requirements and long training times.\nFollowing a different approach, the Vision Transformer (ViT) \\cite{vit}, presented in further detail in section \\ref{sec:vit_backbone}, constitutes an effort to apply a pure Transformer architecture on image data, by proposing a simple, yet efficient image tokenization strategy. \nSeveral works have drawn inspiration from ViT to develop novel attention-based architectures for vision. For image recognition, \\cite{tokens2token,swin_transformer} re-introduce some of the inductive biases that made CNNs successful in vision, leading to improved performances without the need for long pre-training schedules, \\cite{dense_vit,segmenter} employ Transformers for dense prediction, \\cite{detr, vit_yolo, song2022vidt} for object detection and \\cite{video_transformer,video_instance_vit,vivit} for video processing. \nAmong these works, our framework is more closely related to \\cite{vivit} who also use a spatio-temporal factorization of input dimensions, and \\cite{segmenter} who use multiple learnable tokens for semantic segmentation. However, we deviate significantly from \\cite{vivit} by introducing acquisition-time-specific temporal encodings to accommodate an uneven distribution of images in time, reverse the order of factorization and are interested in both global and dense predictions (section \\ref{sec:tsvit_encoder}). Additionally, we differ from \\cite{segmenter} in that we introduce the {\\it cls} tokens as an input to the encoder in order to collapse the time dimension and obtain class-specific features, while they use them as class queries inputs to the decoder similar to their use in \\cite{detr}. We also differ significantly from \\cite{segmenter} in terms of the decoder design as they resize the output of the penultimate layer to match the input size and further process that to obtain pixel-level logits, while we decode each token directly into a region matching input patch dimensions and reassemble these into a dense probability map (section \\ref{sec:tsvit_decoder}).\n\n\n\\section{Method}\nIn this section we present the TSViT architecture in detail. First, we give a brief overview of the ViT (section \\ref{sec:vit_backbone}) which provided inspiration for this work. In section \\ref{sec:tsvit_backbone} we present our modified TSViT backbone, followed by our tokenization scheme (section \\ref{sec:tokenization}), encoder (section \\ref{sec:tsvit_encoder}) and decoder (section \\ref{sec:tsvit_decoder}) modules. Finally, in section \\ref{sec:position_encodings}, we discuss several considerations behind the design of our position encoding scheme. \n\n\\begin{figure}\n \\centering\n \\includegraphics[width=0.9\\linewidth]{latex\/figures\/transformer6.png}\n \\caption{{\\bf Backbone architectures. (a)} Transformer backbone, {\\bf (b)} ViT architecture, {\\bf (c)} TSViT backbone employs additional {\\it cls} tokens (red), each responsible for predicting a single class. }\n \\label{fig:vit}\n\\end{figure}\n\n\\subsection{Primer on ViT} \\label{sec:vit_backbone}\nInspired by the success of Transformers in natural language processing tasks \\cite{aiayn} the ViT \\cite{vit} is an application of the Transformer architecture to images with the fewest possible modifications. Their framework involves the tokenization of a 2D image $\\mathbf{X} \\in \\mathbb{R}^{H\\times W \\times C}$ to a set of {\\it patch} tokens $\\mathbf{Z} \\in \\mathbb{R}^{N \\times d}$ by splitting it into a sequence of $N=\\lfloor\\frac{H}{h}\\rfloor \\lfloor\\frac{W}{w}\\rfloor$ same-size and non-overlapping patches of spatial extent $(h \\times w )$ which are flattened into 1D tokens $\\mathbf{x_i} \\in \\mathbb{R}^{hwC}$ and linearly projected into $d$ dimensions. Overall, the process of token extraction is equivalent to the application of 2D convolution with kernel size $(h \\times w )$ at strides $(h, w)$ across respective dimensions. The extracted patches are used to construct model inputs as follows:\n\n\\begin{equation}\\label{eq:vit_inputs}\n \\mathbf{Z^0} = concat(\\mathbf{z_{cls}}, \\mathbf{Z} + \\mathbf{P}) \\in \\mathbb{R}^{N+1\\times d}\n\\end{equation}\n\nA set of learned positional encoding vectors $\\mathbf{P} \\in \\mathbb{R}^{N\\times d}$, added to $\\mathbf{Z}$, are employed to encode the absolute position information of each token and break the permutation invariance property of the subsequent Transformer layers. A separate learned class ({\\it cls}) token $\\mathbf{z_{cls}} \\in \\mathbb{R}^{d}$ \\cite{bert} is prepended to the linearly transformed and positionally augmented {\\it patch} tokens leading to a length $N+1$ sequence of tokens $\\mathbf{Z^0}$ which are used as model inputs. The Transformer backbone consists of $L$ blocks of alternating layers of Multiheaded Self-Attention (MSA) \\cite{aiayn} and residual Multi-Layer Perceptron (MLP) (Fig.\\ref{fig:vit}(a)). \n\n\\begin{equation}\\label{block1}\n \\mathbf{Y^l} = MSA(LN(\\mathbf{Z^l})) + \\mathbf{Z^l}\n\\end{equation}\n\n\\begin{equation}\\label{block2}\n \\mathbf{Z^{l+1}} = MLP(LN(\\mathbf{Y^l})) + \\mathbf{Y^l}\n\\end{equation}\n\nPrior to each layer, inputs are normalized following Layernorm (LN) \\cite{ln}. MLP blocks consist of two layers of linear projection followed by GELU non-linear activations \\cite{gelu}. In contrast to CNN architectures, in which spatial dimensions are reduced while feature dimensions increase with layer depth, Transformers are isotropic in that all feature maps $\\mathbf{Z}^l \\in \\mathbb{R}^{1+N\\times d}$ have the same shape throughout the network.\nAfter processing by the final layer L, all tokens apart from the first one (the state of the {\\it cls} token) are discarded and unormalized class probabilities are calculated by processing this token via a MLP. A schematic representation of the ViT architecture can be seen in Fig.\\ref{fig:vit}(b).\n\n\n\\begin{figure}[!t]\n \\centering\n \\includegraphics[width=0.9\\linewidth]{latex\/figures\/tokenization2.png}\n \\caption{{\\bf SITS Tokenization}. We embed each satellite image independently following ViT \\cite{vit}}\n \\label{fig:tokenization}\n\\end{figure}\n\n\\subsection{Backbone architecture}\\label{sec:tsvit_backbone}\nIn the ViT architecture, the {\\it cls} token progressively refines information gathered from all {\\it patch} tokens to reach a final global representation used to derive class probabilities. \nOur TSViT backbone, shown in Fig.\\ref{fig:vit}(c), essentially follows from ViT, with few modifications in the tokenization and decoder layers. More specifically, we introduce $K$ (equal to the number of object classes) additional learnable {\\it cls} tokens $\\mathbf{Z_{cls}} \\in \\mathbb{R}^{K \\times d}$, compared to ViT which uses a single token. \n\\begin{equation}\\label{eq:tsvit_inputs}\n \\mathbf{Z^0} = concat(\\mathbf{Z_{cls}}, \\mathbf{Z} + \\mathbf{P}) \\in \\mathbb{R}^{N+K\\times d}\n\\end{equation}\nWithout deviating from ViT, all {\\it cls} and positionally augmented {\\it patch} tokens are concatenated and processed by the $L$ layers of a Transformer encoder. After the final layer, we discard all {\\it patch} tokens and project each {\\it cls} token into a scalar value. By concatenating these values we obtain a length $K$ vector of unormalised class probabilities. \nThis design choice brings the following two benefits: 1) it increases the capacity of the {\\it cls} token relative to the {\\it patch} tokens, allowing them to store more patterns to be used by the MSA operation; 2) it allows for more controlled handling of the interactions between evidence gathered for each class.\nRegarding the first point, introducing multiple {\\it cls} tokens can be seen as equivalent to increasing the dimension of a single {\\it cls} token to an integer multiple of the {\\it patch} token dimension $d_{cls} = k d_{patch}$ and split the {\\it cls} token into $k$ separate subspaces prior to the MSA operation. In this way we can increase the capacity of the {\\it cls} tokens while avoiding issues such as the need for asymmetric MSA weight matrices for {\\it cls} and {\\it patch} tokens, which would effectively more than double our model's parameter count. Furthermore, by choosing $k=K$ and enforcing a bijective mapping from {\\it cls} tokens to class predictions, the state of each {\\it cls} token becomes more focused to a specific class with network depth. In TSViT we go a step further and explicitly separate {\\it cls} tokens by class after processing with the temporal encoder to allow only same-{\\it cls}-token interactions in the spatial encoder. In section \\ref{sec:tsvit_encoder} we argue why this is a very useful inductive bias for modelling spatial relationships in crop type recognition.\n\n\n\\subsection{Tokenization of SITS inputs}\\label{sec:tokenization}\nA SITS record $\\mathbf{X} \\in \\mathbb{R}^{T \\times H\\times W \\times C}$ consists of a series of $T$ satellite images of spatial dimensions $H \\times W$ with $C$ channels. \nFor the tokenization of our 3D inputs, we can extend the tokenization-as-convolution approach to 3D data and apply a 3D kernel with size $(t \\times h \\times w)$ at stride $(t,h,w)$ across temporal and spatial dimensions. In this manner $N=\\lfloor\\frac{T}{t}\\rfloor \\lfloor\\frac{H}{h}\\rfloor \\lfloor\\frac{W}{w}\\rfloor$ non-overlapping tokens $\\mathbf{x_i} \\in \\mathbb{R}^{thwC}$ are extracted, and subsequently projected to $d$ dimensions. \nUsing $t>1$, all extracted tokens contain spatio-temporal information. For the special case of $t=1$ each token contains spatial-only information for each acquisition time and temporal information is accounted for only through the encoder layers. Since the computation cost of global self-attention layers is quadratic w.r.t. the length of the token sequence $\\mathcal{O}(N^2)$, choosing larger values for $t,h,w$ can lead to significantly reduced number of FLOPS. In our experiments, however, we have found small values for $t,h,w$ to work much better in practice. For all presented experiments we use a value of $t=1$ motivated in part because this choice simplifies the implementation of acquisition-time-specific temporal position encodings, described in section \\ref{sec:position_encodings}. With regards to the spatial dimensions of extracted patches we have found small values to work best for semantic segmentation, which is reasonable given that small patches retain additional spatial granularity. In the end, our tokenization scheme is similar to ViT's applied in parallel for each acquisition as shown in Fig.\\ref{fig:tokenization}, however, at this stage, instead of unrolling feature dimensions, we retain the spatial structure of the original input as reshape operations will be handled by the TSViT encoder submodules.\n\n\\begin{figure*}\n \\centering\n \\includegraphics[width=0.999\\linewidth]{latex\/figures\/TSViT2.png}\n \\caption{{\\bf TSViT submodules. (a)} Temporal encoder. We reshape tokenized inputs, retaining the spatio-temporal structure of SITS, into a set of timeseries for each spatial location, add temporal position encodings $\\mathbf{P_T[t,:]}$ for acquisition times $\\mathbf{t}$, concatenate local {\\it cls} tokens $\\mathbf{Z_{Tcls}}$ (eq.\\ref{eq:temp_transf_input}) and process in parallel with a Transformer. Only the first $K$ output tokens are retained. {\\bf (b)} Spatial encoder. We reshape the outputs of the temporal encoder into a set of spatial feature maps for each {\\it cls} token, add spatial position encodings $\\mathbf{P_S}$, concatenate global {\\it cls} tokens $\\mathbf{Z_{Scls}}$ (eq.\\ref{eq:spatial_encoder_input}) and process in parallel with a Transformer. {\\bf (c)} Segmentation head. Each local {\\it cls} token is projected into $hw$ values denoting class-specific evidence for every pixel in a patch. All patches are then reassembled into the original image dimensions. {\\bf (d)} Classification head. Global {\\it cls} tokens are projected into scalar values, each denoting evidence for the presence of a specific class.}\n \\label{fig:TSViT_submodules}\n\\end{figure*}\n\\subsection{Encoder architecture}\\label{sec:tsvit_encoder}\nIn the previous section we presented a motivation for using small values $t,h,w$ for the extracted patches. Unless other measures are taken to reduce the model's computational cost this choice would be prohibitive for processing SITS with multiple acquisition times. To avoid such problems, we choose to factorize our inputs across their temporal and spatial dimensions, a practice commonly employed for video processing \\cite{spatial_temp1,spatial_temp2,spatial_temp3,spatial_temp4,spatial_temp5,spatial_temp6}. We note that all these works use a spatial-temporal factorization order, which is reasonable when dealing with natural images, given that it allows the extraction of higher level, semantically aware spatial features, whose relationship in time is useful for scene understanding. However, we argue that in the context of SITS, reversing the order of factorization is a meaningful design choice for the following reasons: \n1) in contrast to natural images in which context can be useful for recognising an object, in crop type recognition context can provide little information, or can be misleading. This arises from the fact that the shape of agricultural parcels, does not need to follow its intended use, i.e. most crops can generally be cultivated independent of a field's size or shape. Of course there exist variations in the shapes and sizes of agricultural fields \\cite{agri_land_patterns}, but these depend mostly on local agricultural practices and are not expected to generalize over unseen regions. Furthermore, agricultural parcels do not inherently contain sub-components or structure. Thus, knowing what is cultivated in a piece of land is not expected to provide information about what grows nearby. This is in contrast to other objects which clearly contain structure, e.g. in human face parsing there are clear expectations about the relative positions of various face parts. To test this hypothesis we enumerate over all agricultural parcels belonging to the most popular crop types in the T31TFM {\\it S2} tile in France for year 2018 and take crop-type-conditional pixel counts over a 1km square region from their centers. Then, we calculate the cosine similarity of these values with unconditional pixel counts over the extent of the T31TFM tile and find a high degree of similarity, suggesting that there are no significant variations between these distributions; \n2) a small region in SITS is far more informative than its equivalent in natural images, as it contains more channels than regular RGB images ({\\it S2} imagery contains 13 bands in total) whose intensities are averaged over a relatively large area (highest resolution of {\\it S2} images is $10 \\times 10$ m$^2$); \n3) SITS for land cover recognition do not typically contain moving objects. As a result, a timeseries of single pixel values can be used for extracting features that are informative of a specific object part found at that particular location. \nTherefore, several objects can be recognised using only information found in a single location; plants, for example, can be recognised by variations of their spectral signatures during their growth cycle. Many works performing crop classification do so using only temporal information in the form of timeseries of small patches \\cite{Ru_wurm_2018}, pixel statistics over the extent of parcels \\cite{Ruwurm1} or even values from single pixels \\cite{transformer_sat, tempcnn}. \nOn the other hand, the spatial patterns in a single image are uninformative of the crop type, as evidenced by the low performance of systems relying on single images \\cite{garnot_iccv}. Our encoder architecture can be seen in Fig.\\ref{fig:TSViT_submodules}(a,b). We now describe the temporal and spatial encoder submodules.\n \n\n{\\bf Temporal encoder} Thus, we tokenize a SITS record $\\mathbf{X} \\in \\mathbb{R}^{T \\times H\\times W \\times C}$ into a set of tokens of size $(N_T \\times N_H \\times N_W \\times d)$, as described in section \\ref{sec:tokenization} and subsequently reshape to $\\mathbf{Z_T} \\in \\mathbb{R}^{N_H N_W \\times N_T \\times d}$, to get a list of token timeseries for all patch locations. The input to the temporal encoder is:\n\\begin{equation}\\label{eq:temp_transf_input}\n \\mathbf{{Z^0_T}} = concat(\\mathbf{Z_{Tcls}}, \\mathbf{Z_T} + \\mathbf{P_T[t,:]}) \\in \\mathbb{R}^{N_HN_W \\times K+N_T\\times d}\n\\end{equation}\n\nwhere $\\mathbf{P_T[t,:]} \\in \\mathbb{R}^{N_T \\times d}$ and $\\mathbf{Z_{Tcls}} \\in \\mathbb{R}^{K \\times d}$ are respectively added and prepended to all $N_HN_W$ timeseries and $\\mathbf{t} \\in \\mathbb{R}^T$ is a vector containing all $T$ acquisition times. \nAll samples are then processed in parallel by a Transformer module. Consequently, the final feature map of the temporal encoder becomes $\\mathbf{Z^L_T} \\in \\mathbb{R}^{N_H N_W \\times K + N_T \\times d}$ in which the first $K$ tokens in the temporal dimension correspond to the prepended {\\it cls} tokens. We only keep these tokens, discarding the remaining $N_T$ vectors.\n\n{\\bf Spatial encoder} We now transpose the first and second dimensions in the temporal encoder output, to obtain a list of patch features $\\mathbf{Z_S} \\in \\mathbb{R}^{K \\times N_H N_W \\times d}$ for all output classes. In a similar spirit, the input to the spatial encoder becomes:\n\\begin{equation}\\label{eq:spatial_encoder_input}\n \\mathbf{{Z^0_S}} = concat(\\mathbf{Z_{Scls}}, \\mathbf{Z_S} + \\mathbf{P_S}) \\in \\mathbb{R}^{K \\times 1 + N_H N_W \\times d}\n\\end{equation}\n\nWhere $\\mathbf{P_S} \\in \\mathbb{R}^{N_H N_W \\times d}$ are respectively added to all $K$ spatial representations and each element of $\\mathbf{Z_{Scls}} \\in \\mathbb{R}^{K \\times 1 \\times d}$ is prepended to each class-specific feature map. We note, that while in the temporal encoder {\\it cls} tokens were prepended to all patch locations, now there is a single {\\it cls} token per spatial feature map such that $\\mathbf{Z_{Scls}}$ are used to gather global SITS-level information. Processing with the spatial encoder leads to a similar size output feature map $\\mathbf{{Z^L_S}} \\in \\mathbb{R}^{K \\times 1 + N_H N_W \\times d}$. \n\n\\subsection{Decoder architecture}\\label{sec:tsvit_decoder}\nThe TSViT encoder architecture described in the previous section is designed as a general backbone for SITS processing. To accommodate both global and dense prediction tasks we design two decoder heads which feed on different components of the encoder output. We view the output of the encoder as $\\mathbf{{Z^L_S}} = [\\mathbf{{Z^L_{Sglobal}}} | \\mathbf{{Z^L_{Slocal}}}]$ respectively corresponding to the states of the global and local {\\it cls} tokens.\nFor {\\bf image classification}, we only make use of $\\mathbf{{Z^L_{Sglobal}}} \\in \\mathbb{R}^{K \\times d}$. We proceed, as described in sec.\\ref{sec:tsvit_backbone}, by projecting each feature into a scalar value and concatenate these values to obtain global unormalised class probabilities as shown in Fig.\\ref{fig:TSViT_submodules}(d).\nComplementarily, for {\\bf semantic segmentation} we only use $\\mathbf{{Z^L_{Slocal}}} \\in \\mathbb{R}^{K \\times N_HN_W \\times d}$. These features encode information for the presence of each class over the spatial extent of each image patch. By projecting each feature into $hw$ dimensions and further reshaping the feature dimension to $(h \\times w)$ we obtain a set of class-specific probabilities for each pixel in a patch. It is possible now to merge these patches together into an output map $(H \\times W \\times K)$ which represents class probabilities for each pixel in the original image. This process is presented schematically in Fig.\\ref{fig:TSViT_submodules}(c).\n\n\n\n\n\\vspace{-0.1cm}\n\n\n\\subsection{Position encodings}\\label{sec:position_encodings}\nAs described in section \\ref{sec:tsvit_encoder}, positional encodings are injected in two different locations in our proposed network. First, temporal position encodings are added to all {\\it patch} tokens before processing by the temporal encoder as shown in eq.(\\ref{eq:temp_transf_input}). This operation aims at breaking the permutation invariance property of MSA by introducing time-specific position biases to all extracted {\\it patch} tokens. For crop recognition encoding the absolute temporal position of features is important as it helps identifying a plant's growth stage within the crop cycle. Furthermore, the time interval between successive images in SITS varies depending on acquisition times and other factors, such as the degree of cloudiness or corrupted data. To introduce acquisition-time-specific biases into the model, our temporal position encodings $\\mathbf{P_T[t,:]}$ depend directly on acquisition times $\\mathbf{t}$. More specifically, we make note of all the dates $\\mathbf{t'} = [t_1, t_2, ..., t_{T'}]$ corresponding to the acquisition times found in the training data and construct a lookup table $\\mathbf{P_T} \\in \\mathbb{R}^{T' \\times d}$ containing all learnt temporal position encodings indexed by date. Finding the date-specific encodings that need to be added to {\\it patch} tokens (eq.\\ref{eq:temp_transf_input}) reduces to looking up appropriate indices from $\\mathbf{P_T}$. In this way temporal position encodings introduce a dynamic prior of where to look at in the models' global temporal receptive field, rather than simply encoding the order of SITS acquisitions which would discard valuable information. \nFollowing token processing by the temporal encoder, spatial position embeddings $\\mathbf{P_S}$ are added to the extracted {\\it cls} tokens. These are not dynamic in nature and are similar to the position encodings used in the original ViT architecture, with the difference that these biases are now added to $K$ feature maps instead of a single one. \n\n\\vspace{-0.2cm}\n\\section{Experiments}\\label{sec:experiments}\nWe apply TSViT to two tasks using SITS records $\\mathbf{X} \\in \\mathbb{R}^{T \\times H\\times W \\times C}$ as inputs: classification and semantic segmentation. \nAt the object level, classification models learn a mapping $f(\\mathbf{X}) \\in \\mathbb{R}^{K}$ for the object occupying the center of the $H \\times W$ region. Semantic segmentation models learn a mapping $f(\\mathbf{X}) \\in \\mathbb{R}^{H \\times W \\times K}$, predicting class probabilities for each pixel over the spatial extent of the SITS record. We use an ablation study on semantic segmentation to guide model design and hyperparameter tuning and proceed with presenting our main results on three publicly available SITS semantic segmentation and classification datasets. \n\n\\vspace{-0.1cm}\n\n\\subsection{Training and evaluation}\n{\\bf Datasets} To evaluate the performance of our proposed semantic segmentation model we are using three publicly available {\\it S2} land cover recognition datasets. \nThe dataset presented in \\cite{Ru_wurm_2018} covers a densely cultivated area of interest of $102 \\times 42$ km$^2$ north of Munich, Germany and contains 17 distinct classes. Individual image samples cover a $240 \\times 240$ m$^2$ area ($24 \\times 24$ pixels) and contain 13 bands. \nThe PASTIS dataset \\cite{garnot_iccv} contains images from four different regions in France with diverse climate and crop distributions, spanning over 4000 km$^2$ and including 18 crop types. In total, it includes 2.4k SITS samples of size $128 \\times 128$, each containing 33-61 acquisitions and 10 image bands. Because the PASTIS sample size is too large for efficiently training TSViT with available hardware, we split each sample into $24 \\times 24$ patches and retain all acquisition times for a total of 57k samples. To accommodate a large set of experiments we only use fold 1 among the five folds provided in PASTIS.\nFinally, we use the T31TFM-1618 dataset \\cite{cscl} which covers a densely cultivated {\\it S2} tile in France for years 2016-18 and includes 20 distinct classes. In total, it includes 140k samples of size $48 \\times 48$, each containing 14-33 acquisitions and 13 image bands.\nFor the SITS classification experiments, we construct the datasets from the respective segmentation datasets. More specifically, for PASTIS we use the provided object instance ids to extract $24 \\times 24$ pixel regions whose center pixel falls inside each object and use the class of this object as the sample class. The remaining two datasets contain samples of smaller spatial extent, making the above strategy not feasible in practice. Here, we choose to retain the samples as they are and assign the class of the center pixel as the global class. We note that this strategy forces us to discard samples in which the center pixels belongs to the background class. Additional details are provided in the supplementary material.\n\n{\\bf Implementation details} \nFor all experiments presented we train for the same number of epochs using the provided data splits from the respective publications for a fair comparison. More specifically, we train on all datasets using the provided training sets and report results on the validation sets for Germany and T31TFM-1618, and on the test set for PASTIS. For training TSViT we use the AdamW optimizer \\cite{adamw} with a learning rate schedule which includes a warmup period starting from zero to a maximum value $10^{-3}$ at epoch 10, followed by cosine learning rate decay \\cite{loshchilov2017sgdr} down to $5*10^{-6}$ at the end of training. For Germany and T31TFM-1618 we train with the above settings and report the best performances between what we achieve and the original studies. Since we split PASTIS, we are training with both settings and report the best results. Overall, we find that our settings improve model performance. We train with a batch size of 16 or 32 and no regularization on $\\times 2$ Nvidia Titan Xp gpus in a data parallel fashion. All models are trained with a Masked Cross-Entropy loss, masking the effect of the background class in both training loss and evaluation metrics. We report overall accuracy (OA), averaged over pixels, and mean intersection over union (mIoU) averaged over classes.\nFor SITS classification, in addition to the 1D models presented in section \\ref{sec:related_work} we modify the best performing semantic segmentation models by aggregating extracted features across space prior to the application of a classifier, thus, outputing a single prediction. Classification models are trained with Focal loss \\cite{focal_loss}. We report OA and mean accuracy (mAcc) averaged over classes.\n\n\\begin{table}[!t]\n\\begin{center}\n\\begin{tabular}{c|cc|c}\n\\hline\nAblation & \\multicolumn{2}{c|}{Settings} & mIoU \\\\\n\\hline \\hline\n\\multirow{2}{*}{Factorization order}& \\multicolumn{2}{c|}{Spatial \\& Temporal} & 48.8\\\\\n &\\multicolumn{2}{c|}{{\\bf Temporal \\& Spatial}} & {\\bf 78.5}\\\\% & & & \n\\hline\n\\multirow{2}{*}{\\#{\\it cls} tokens} & \\multicolumn{2}{c|}{1} & 78.5\\\\\n & \\multicolumn{2}{c|}{{\\bf K}} & {\\bf 83.6}\\\\\n\\hline\n\\multirow{2}{*}{Position encodings} & \\multicolumn{2}{c|}{Static} & 80.8\\\\\n& \\multicolumn{2}{c|}{{\\bf Date lookup}} & {\\bf 83.6}\\\\\n\\hline\n\\multirow{4}{*}{ \\makecell{Interactions between \\\\ {\\it cls} tokens }} & Temporal & Spatial & \\\\\n\\cline{2-3}\n \n \n & \\pmb{\\checkmark} & \\checkmark & 81.5\\\\\n & \\checkmark & \\pmb{X} & {\\bf 83.6}\\\\\n\\hline\n\\multirow{3}{*}{Patch size}& \\multicolumn{2}{c|}{$\\mathbf{2 \\times 2}$} & {\\bf 84.8}\\\\\n & \\multicolumn{2}{c|}{$3 \\times 3$} & 83.6\\\\\n & \\multicolumn{2}{c|}{$4 \\times 4$} & 81.5\\\\\n & \\multicolumn{2}{c|}{$6 \\times 6$} & 79.6\\\\% & & & \\\\\n\\hline\n\\end{tabular}\n\\end{center}\n\\caption{{\\bf Ablation on design choices for TSViT}. All proposed design choices are found to have a positive effect on performance.}\n\\label{tab:ablation}\n\\end{table}\n\n\n\\begin{table*}[!h]\n\\tiny\n\\centering\n\\resizebox{0.9\\textwidth}{!}{\n\\begin{tabular}{l|ccc}\n\\hline\n\\textbf{Dataset} & \\textbf{Germany} \\cite{Ru_wurm_2018} & \\textbf{PASTIS} \\cite{garnot_iccv} & \\textbf{T31TFM-1618} \\cite{cscl} \\\\\n \\hline\n \\textbf{Model} & & \\textbf{Semantic segmentation (OA \/ mIoU)} & \\\\\n \\hline \n BiCGRU \\cite{Ru_wurm_2018} & 91.3 \/ 72.3 & 80.5 \/ 56.2 & 88.6 \/ 57.7 \\\\\n FPN-CLSTM \\cite{fpn_clstm} & 91.8 \/ 73.7 & 81.9 \/ 59.5 & 88.4 \/ 57.8 \\\\ \n UNET3D \\cite{Rustowicz2019SemanticSO} & 92.4 \/ 75.2 & 82.3 \/ 60.4 & 88.4 \/ 57.6 \\\\\n UNET3Df \\cite{cscl} & 92.4 \/ 75.4 & 82.1 \/ 60.2 & 88.6 \/ 57.7 \\\\\n UNET2D-CLSTM \\cite{Rustowicz2019SemanticSO} & 92.9\/ 76.2 & 82.7 \/ 60.7 & 89.0 \/ 58.8 \\\\\n U-TAE \\cite{garnot_iccv} & 93.1 \/ 77.1 & 82.9 \/ 62.4 (83.2 \/ 63.1) & 88.9 \/ 58.5 \\\\ \n{\\bf TSViT (ours)} & {\\bf 95.0 \/ 84.8} & {\\bf 83.4 \/ 65.1 (83.4\/ 65.4)} & {\\bf 90.3 \/ 63.1} \\\\ \n\\hline\n \\textbf{Model} & & \\textbf{Object classification (OA \/ mAcc)} & \\\\\n \\hline\n TempCNN$^*$ \\cite{tempcnn} & 89.8 \/ 78.4 & 84.8 \/ 69.1 & 84.7 \/ 62.6 \\\\\n DuPLo$^*$ \\cite{duplo} & 93.1 \/ 82.2 & 84.8 \/ 69.4 & 83.9 \/ 69.5 \\\\\n Transformer$^*$ \\cite{transformer_sat} & 92.4\/ 84.3 & 84.4 \/ 68.1 & 84.3 \/ 71.4 \\\\\n UNET3D \\cite{Rustowicz2019SemanticSO} & 92.7 \/ 83.9 & 84.8 \/ 70.2 & 84.8 \/ 71.4\\\\\n UNET2D-CLSTM \\cite{Rustowicz2019SemanticSO} & 93.0 \/ 84.0 & 84.7 \/ 70.3 & 84.7 \/ 71.6 \\\\\n U-TAE \\cite{garnot_iccv} & 92.6 \/ 83.7 & 84.9 \/ 71.8 & 84.8 \/ 71.7 \\\\ \n {\\bf TSViT (ours)} & {\\bf 94.7 \/ 88.1} & {\\bf 87.1 \/ 75.5} & {\\bf 87.8 \/ 74.2} \\\\\n\\hline\n\\end{tabular} \n}\n\\caption{{\\bf Comparison with state-of-the-art models from literature}. {\\bf (top)} Semantic segmentation. {\\bf (bottom)} Object classification. $^*$1D temporal only models. We report overall accuracy (OA), mean intersection over union (mIoU) and mean accuracy (mAcc). For PASTIS we report results for fold-1 only; average test set performance across all five folds is shown in parenthesis for direct comparison with \\cite{garnot_iccv}.}\n\\label{tab:results}\n\\end{table*}\n\n\\subsection{Ablation studies}\\label{sec:ablation}\nWe perform an ablation study on design parameters of our framework using the Germany dataset \\cite{Ru_wurm_2018}. Starting with a baseline TSViT with $L=4$ for both encoder networks, a single {\\it cls} token, $h=w=3, t=1, d=128$ we successively update our design after each ablation. Here, we present the effect of the most important design choices; additional ablations are presented in the supplementary material.\nOverall, we find that the {\\bf order of factorization} is the most important design choice in our proposed framework. Using a spatio-temporal factorization from the video recognition literature performs poorly at $48.8\\%$ mIoU. Changing the factorization order to temporo-spatial raises performance by an absolute $+29.7\\%$ to $78.5\\%$ mIoU. \nIncluding {\\bf additional \\textit{cls} tokens} increases performance to $83.6\\%$mIoU ($+5.1\\%$), so we proceed with using $K$ {\\it cls} tokens in our design. \nWe test the effect of our date-specific {\\bf position encodings} compared to a fixed set of values and find a significant $-2.8\\%$ performance drop from using fixed size $\\mathbf{P_T}$ compared to our proposed lookup encodings.\nAs discussed in section \\ref{sec:tsvit_encoder} our spatial encoder blocks cross \\textbf{\\textit{cls}-token interactions}. Allowing interactions among all tokens comes at a significant increase in compute cost, $\\mathcal{O}(K^2)$ to $\\mathcal{O}(K)$, and is found to decrease performance by $-2.1\\%$ mIoU.\nFinally, we find that smaller {\\bf patch sizes} generally work better, which is reasonable given that tokens retain a higher degree of spatial granularity and are used to predict smaller regions. Using $2\\times2$ patches raises performance by $+1.2\\%$mIoU to $84.8\\%$ compared to $3 \\times 3$ patches. \nOur final design which is used in the main experiments presented in Table \\ref{tab:results} employs a temporo-spatial design with $K$ {\\it cls} tokens, acquisition-time-specific position encodings, $2\\times 2$ input patches and four layers for both encoders. \n\n\n\n\n\\vspace{-0.1cm}\n\n\\begin{figure}[!t]\n\\begin{center}\n \\includegraphics[width=0.925\\linewidth]{latex\/figures\/sota_qualitative.png}\n\\end{center}\n \\caption{{\\bf Visualization of predictions} in Germany. The background class is shown in white, \"x\" indicates a false prediction.}\n\\label{fig:sota_qualitative}\n\\end{figure}\n\n\\vspace{-0.1cm}\n\n\\subsection{Comparison with SOTA}\nIn Table \\ref{tab:results} and Fig.\\ref{fig:overview}, we present performance results of our final TSViT design compared to state-of-the-art models presented in section \\ref{sec:related_work}. For semantic segmentation, we find that all models from literature perform similarly, with the BiCGRU being overall the worst performer, matching CNN-based architectures only in T31TFM-1618. For all datasets, TSViT outperforms previously suggested approaches by a very large margin. A visualization of predictions in Germany for the top-3 performers is shown in Fig.\\ref{fig:sota_qualitative}.\nIn object classification, we observe that 1D temporal models are generally outperformed by spatio-temporal models, with the exception of the Transformer \\cite{transformer_sat}. All 1D models perform poorly in PASTIS. Again, TSViT trained for classification consistently outperforms all other approaches by a large margin across all datasets. In both tasks, we find smaller improvements for the pixel-averaged compared to class-averaged metrics, which is reasonable given the large class imbalance that characterizes the datasets. \n\n\n\\vspace{-0.2cm}\n\n\\section{Conclusion}\\label{sec:conclusion}\nIn this paper we proposed TSViT, the first fully-attentional architecture for general SITS processing. By taking advantage of the Transformer's global receptive field, capacity to learn a rich feature space and by incorporating inductive biases that suit SITS data, we surpass the state-of-the-art performance by a large margin in object classification and semantic segmentation using three publicly available land cover recognition datasets. \n\n{\\small\n\\bibliographystyle{ieee_fullname}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}}