Walk-on-spheres method explained

In mathematics, the walk-on-spheres method (WoS) is a numerical probabilistic algorithm, or Monte-Carlo method, used mainly in order to approximate the solutions of some specific boundary value problem for partial differential equations (PDEs).[1] [2] The WoS method was first introduced by Mervin E. Muller in 1956 to solve Laplace's equation,[1] and was since then generalized to other problems.

It relies on probabilistic interpretations of PDEs, and simulates paths of Brownian motion (or for some more general variants, diffusion processes), by sampling only the exit-points out of successive spheres, rather than simulating in detail the path of the process. This often makes it less costly than "grid-based" algorithms, and it is today one of the most widely used "grid-free" algorithms for generating Brownian paths.

Informal description

Let

\Omega

be a bounded domain in

Rd

with a sufficiently regular boundary

\Gamma

, let h be a function on

\Gamma

, and let

x

be a point inside

\Omega

.

Consider the Dirichlet problem:

\begin{cases}\Deltau(x)=0&ifx\in\Omega\\ u(x)=h(x)&ifx\in\Gamma.\end{cases}

It can be easily shown that when the solution

u

exists, for

x\in\Omega

:

u(x)=Ex[h(W\tau)]

where is a -dimensional Wiener process, the expected value is taken conditionally on, and is the first-exit time out of .

To compute a solution using this formula, we only have to simulate the first exit point of independent Brownian paths since with the law of large numbers:

Ex[h(W\tau)]\sim

1
n
n
\sum
i=1
i
h(W
\tau)

The WoS method provides an efficient way of sampling the first exit point of a Brownian motion from the domain, by remarking that for any -sphere centred on, the first point of exit of out of the sphere has a uniform distribution over its surface. Thus, it starts with equal to, and draws the largest sphere

l{S}0

centered on and contained inside the domain. The first point of exit from

l{S}0

is uniformly distributed on its surface. By repeating this step inductively, the WoS provides a sequence of positions of the Brownian motion.

According to intuition, the process will converge to the first exit point of the domain. However, this algorithm takes almost surely an infinite number of steps to end. For computational implementation, the process is usually stopped when it gets sufficiently close to the border, and returns the projection of the process on the border. This procedure is sometimes called introducing an

\varepsilon

-shell, or

\varepsilon

-layer.

Formulation of the method

Choose

\varepsilon>0

. Using the same notations as above, the Walk-on-spheres algorithm is described as follows:
  1. Initialize :

x(0)=x

  1. While

d(x(n),\Gamma)>\varepsilon

:
    1. Set

rn=d(x(n),\Gamma)

.
    1. Sample

\gamman

a vector uniformly distributed over the unit sphere, independently from the preceding ones.
    1. Set

x(n+1):=x(n)+rn\gamman

  1. When

d(x(n),\Gamma)\le\varepsilon

:

xf:=p\Gamma(x(n))

, the orthogonal projection of

x(n)

on

\Gamma

  1. Return

xf

The result

xf

is an estimator of the first exit point from

\Omega

of a Wiener process starting from

x

, in the sense that they have close probability distributions (see below for comments on the error).

Comments and practical considerations

Radius of the spheres

In some cases the distance to the border might be difficult to compute, and it is then preferable to replace the radius of the sphere by a lower bound of this distance. One must then ensure that the radius of the spheres stays large enough so that the process reaches the border.[1]

Bias in the method and GFFP

As it is a Monte-Carlo method, the error of the estimator can be decomposed into the sum of a bias, and a statistical error. The statistical error is reduced by increasing the number of paths sampled, or by using variance reduction methods.

The WoS theoretically provides exact (or unbiased) simulations of the paths of the Brownian motion. However, as it is formulated here, the

\varepsilon

-shell introduced to ensure that the algorithm terminates also adds an error, usually of order

l{O}(\varepsilon)

.[3] This error has been studied, and can be avoided in some geometries by using Green's Functions First Passage method:[4] one can change the geometry of the "spheres" when close enough to the border, so that the probability of reaching the border in one step becomes positive. This requires the knowledge of Green's functions for the specific domains. (see also Harmonic measure)

When it is possible to use it, the Green's function first-passage (GFFP) method is usually preferred, as it is both faster and more accurate than the classical WoS.[3]

Complexity

It can be shown that the number of steps taken for the WoS process to reach the

\varepsilon

-shell is of order

l{O}(|log(\varepsilon)|)

.[2] Therefore, one can increase the precision to a certain extent without making the number of steps grow notably.

As it is commonly the case for Monte-Carlo methods, this algorithm performs particularly well when the dimension is higher than

3

, and one only needs a small set of values. Indeed, the computational cost increases linearly with the dimension, whereas the cost of grid dependant methods increase exponentially with the dimension.[2]

Variants, extensions

This method has been largely studied, generalized and improved. For example, it is now extensively used for the computation of physical properties of materials (such as capacitance, electrostatic internal energy of molecules, etc.). Some notable extensions include:

Elliptic equations

The WoS method can be modified to solve more general problems. In particular, the method has been generalized to solve Dirichlet problems for equations of the form

\Deltau=cu+f

[5] (which include the Poisson and linearized Poisson−Boltzmann equations) or for any elliptic partial differential equation with constant coefficients.[6]

More efficient ways of solving the linearized Poisson–Boltzmann equation have also been developed, relying on Feynman−Kac representations of the solutions.[7]

Time dependency

Again, within a regular enough border, it possible to use the WoS method to solve the following problem :

\begin{cases}\partialtu(x,t)+

1
2

\Deltaxu(x,t)=0&ifx\in\Omegaandt<T\\ u(x,T)=h(x,T)&ifx\in\bar{\Omega}\\ u(x,t)=h(x,t)&ifx\in\Gamma.\end{cases}

of which the solution can be represented as:[8]

u(x,t)=Et,x(h(XT,T\wedge\tau))

,

where the expectation is taken conditionally on

Xt=x

To use the WoS through this formula, one needs to sample the exit-time from each sphere drawn, which is an independent variable

\tau0

with Laplace transform (for a sphere of radius

R

):[9]

E(\exp(-s\tau0))=

R\sqrt{2s
}

The total time of exit from the domain

\tau

can be computed as the sum of the exit-times from the spheres. The process also has to be stopped when it has not exited the domain at time

T

.

Other extensions

The WoS method has been generalized to estimate the solution to elliptic partial differential equations everywhere in a domain, rather than at a single point.[10]

The WoS method has also been generalized in order to compute hitting times for processes other than Brownian motions. For example, hitting times of Bessel processes can be computed via an algorithm called "Walk on moving spheres".[11] This problem has applications in mathematical finance.

The WoS can be adapted to solve the Poisson and Poisson–Boltzmann equation with flux conditions on the boundary.[12]

Finally, WoS can be used to solve problems where coefficients vary continuously in space, via connections with the volume rendering equation.[13]

See also

Further reading

External links

Notes and References

  1. Muller. Mervin E.. Mervin E. Muller. Some continuous Monte-Carlo Methods for the Dirichlet Problem. The Annals of Mathematical Statistics. Sep 1956. 27. 3. 569–589. 2237369. 10.1214/aoms/1177728169. free.
  2. Book: Sabelfeld. Karl K.. Monte Carlo methods in boundary value problems. 1991. Springer-Verlag. Berlin [etc.]. 978-3540530015.
  3. Mascagni. Michael. Hwang. Chi-Ok. ϵ-Shell error analysis for "Walk On Spheres" algorithms. Mathematics and Computers in Simulation. June 2003. 63. 2. 93–104. 10.1016/S0378-4754(03)00038-7.
  4. Given. James A.. Hubbard. Joseph B.. Douglas. Jack F.. A first-passage algorithm for the hydrodynamic friction and diffusion-limited reaction rate of macromolecules. The Journal of Chemical Physics. 1997. 106. 9. 3761. 10.1063/1.473428. 1997JChPh.106.3761G.
  5. Elepov. B.S.. Mikhailov. G.A.. Solution of the dirichlet problem for the equation Δu − cu = −q by a model of "walks on spheres". USSR Computational Mathematics and Mathematical Physics. January 1969. 9. 3. 194–204. 10.1016/0041-5553(69)90070-6.
  6. Booth. Thomas E. Exact Monte Carlo solution of elliptic partial differential equations. Journal of Computational Physics. February 1981. 39. 2. 396–404. 10.1016/0021-9991(81)90159-5. 1981JCoPh..39..396B.
  7. Hwang. Chi-Ok. Mascagni. Michael. Given. James A.. A Feynman–Kac path-integral implementation for Poisson's equation using an h-conditioned Green's function. Mathematics and Computers in Simulation. March 2003. 62. 3–6. 347–355. 10.1016/S0378-4754(02)00224-0. 10.1.1.123.3156.
  8. Book: Gobet. Emmanuel. Méthodes de Monte-Carlo et processus stochastiques du linéaire au non-linéaire. 2013. Editions de l'Ecole polytechnique. Palaiseau. 978-2-7302-1616-6.
  9. Book: Salminen. Andrei N. Borodin; Paavo. Handbook of Brownian motion : facts and formulae. 2002. Birkhäuser. Basel [u.a.]. 978-3-7643-6705-3. 2..
  10. Booth. Thomas. Regional Monte Carlo solution of elliptic partial differential equations. Journal of Computational Physics. August 1982. 47. 2. 281–290. 10.1016/0021-9991(82)90079-1. 13. 1982JCoPh..47..281B.
  11. Deaconu. Madalina. Herrmann. Samuel. Hitting time for Bessel processes—walk on moving spheres algorithm (WoMS). The Annals of Applied Probability. December 2013. 23. 6. 2259–2289. 10.1214/12-AAP900. 1111.3736. 25036031 .
  12. Book: Simonov. Nikolai A.. Numerical Methods and Applications . Random Walks for Solving Boundary-Value Problems with Flux Conditions. 2007. 4310. 181–188. 10.1007/978-3-540-70942-8_21. Lecture Notes in Computer Science. 978-3-540-70940-4. 10.1.1.63.3780.
  13. Sawhney. Rohan. Seyb. Dario. Jarosz. Wojciech. Crane. Keenan. Grid-Free Monte Carlo for PDEs with Spatially Varying Coefficients. ACM Transactions on Graphics. July 2022. 41. 4. 1–17. 10.1145/3528223.3530134. 2201.13240. 246430740 .