1Elliptic PDEs and Boundary Value Problems
Many real-world phenomena are governed by elliptic partial differential equations (PDEs): heat conduction, electrostatics, path planning, steady-state potential flow, and more. These are often cast as boundary value problems (BVPs), where values are prescribed on the boundary of a domain and we seek the solution to the PDE in the interior.
Consider for example the Laplace equation with Dirichlet boundary conditions:
$$ \begin{cases} \Delta u = 0 & \text{in } \Omega \\ u = g & \text{on } \partial\Omega_D \end{cases} $$
Feel free to play with the interactive figure below to get an intuition for what this does:
−1 (cold)+1 (hot)
Click and paint inside the outer boundary band to paint Dirichlet values $g$. The interior satisfies $\Delta u=0$.
Dirichlet problem. Solving the Laplace equation with Dirichlet boundary conditions on a square.
We can make things more interesting by considering more complex geometries and boundary conditions. For example,
people are often interested in solving mixed boundary value problems with Neumann boundary conditions
$$ \begin{cases} \Delta u = 0 & \text{in } \Omega \\ u = g & \text{on } \partial\Omega_D \\ \frac{\partial u}{\partial n} = 0 & \text{on } \partial\Omega_N \end{cases} $$
The interactive figure below illustrates this. Notice how the isolines bend to meet the zero-Neumann obstacle at right angles to satisfy $\frac{\partial u}{\partial n} = 0$.
−1 (cold)+1 (hot)
Click and paint the Dirichlet band as before. The interior obstacle (dashed, grey) enforces $\partial u/\partial n = 0$ — isolines bend to meet it at right angles.
Mixed problem. Laplace equation with Dirichlet values painted on the outer boundary and zero-Neumann geometry inside.
If you look closely, you'll see that the solution is actually "pixelated". This is because it is computed with
finite
differences on a grid. Finite differences are very easy to
understand and to implement but they don't deal very well with complex geometries, often requiring extreme grid
refinement. Another common alternative is to use finite elements. The
problem is that finite elements require
careful mesh generation, which can be particularly challenging and time-consuming for complex geometries
Wind around a city. This scene contains hundreds of buildings with intricate geometry. Our method characterizes their influence on wind patterns, visualized here as steady-state potential streamlines.
2Grid-Free Monte Carlo Methods
Luckily, the computer graphics community has recently revived an old idea: grid-free Monte Carlo methods. The canonical algorithm underpinning this approach is the Walk on Spheres (WoS) algorithm.
The intuition, from stochastic calculus, is that if you were to simulate a Brownian motion (a continuous random walk) starting from an interior point $x$, it would eventually hit the boundary at some random location $Z_\tau$. The expected value $\mathbb{E}[g(Z_\tau)]$ of the boundary condition at that random location is exactly the solution to the Dirichlet problem given by .
Brownian motion and Laplace equation. A particle starts at the interior point $x$ and diffuses until it is absorbed at a random boundary location $Z_\tau$. The boundary is colored by $g$; averaging $g(Z_\tau)$ over many such walks recovers $u(x)$.
Doing this independently at every interior point gives us the whole solution. With only a few walks per point the estimate is noisy, but as we average more and more, variance progressively vanishes and the smooth harmonic solution emerges as shown in the figure below.
Progressive Monte Carlo estimate. The same square Dirichlet problem, now solved at every pixel by Monte Carlo. Each pixel averages many random walks: with few samples the interior is noisy, and the noise gradually fades as the number of samples grows.
However, simulating Brownian
motion is computationally expensive and often biased
The entire process is illustrated in the interactive figure below. For Neumann boundary conditions, it turns out
that there is a special variant of WoS called Walk on Stars
(WoSt)
Walk on Spheres/Stars. Monte Carlo methods proceed recursively by sampling spheres (or stars) until they hit the boundary. When more Neumann obstacles are present, walks get "trapped" and take a long time to hit the boundary, leading to high variance and slow convergence. The histogram shows the distribution of walk lengths; as Neumann obstacles are added, it shifts to the right.
Monte Carlo methods are truly magic! However, as you can see by playing with the interactive figure above, random
walks take a lot of steps before they hit the boundary. This is particularly true for problems with complex
geometries and Neumann-dominated boundaries
In our work, we address this issue in two complementary ways
3Divide to Conquer: Shorter Walks
When a problem is complicated, the natural solution is to break it down into smaller, more manageable pieces. This is a common strategy in numerical methods: domain decomposition, multigrid, hierarchical matrices, and so on. And this is precisely the path we also followed in our paper.
First, observe that a beautiful property of $\Delta u = 0$ in is that this holds everywhere, including on subdomains of the entire domain $\Omega$. As such, a key intuition is that walks can naturally be made shorter by decomposing the domain into smaller subdomains.
More formally, we propose to decompose the domain into a partition of smaller non-overlapping subdomains $\mathcal{D}=\{\Omega_i\}$, for example regular tiles. On each tile, the Dirichlet boundary is the union of (a) physical Dirichlet pieces inherited from $\partial\Omega_D$ and (b) artificial Dirichlet pieces — the interfaces with neighboring tiles. Note that this decomposition does not require any meshing. Subdomains can be totally arbitrary, are free to intersect Neumann boundaries, and can cover parts outside of the domain $\Omega$.
Walks within a tile now stop at the tile's boundary as shown in the interactive figure below. Feel free to adjust the tiling resolution and see how it affects walk lengths in the histogram.
Walks in Decomposed Subdomains. Rather than executing random walks across the entire domain, we decompose it into smaller subdomains. This leads to much shorter walks with lower variance.
This strategy gives us Walks in Decomposed Subdomains. So why does our paper title say Walks on Decomposed Subdomains? There's still some way to go. On their own, these walks don't tell us much yet: we still don't know the values at the interfaces between subdomains.
This is where the connection to grid-based solvers will come into play. But before that, we need to understand Poisson kernels and solution operators.
4Poisson Kernels and Solution Operators
Within a single tile $\Omega_i$, is also satisfied, so knowing the boundary values fully determines the interior solution. Concretely, we can encode this as a linear operator $\mathcal{H}_i$ that maps boundary values to interior values:
$$\mathcal{H}_i : \partial\Omega_i \to \Omega_i $$
In other words, $u(x) = \mathcal{H}_i[u](x)$ for all $x \in \Omega_i$. But how do we get $\mathcal{H}_i$? It's locally the solution of the PDE after all...
The idea is to observe that $\mathcal{H}_i$ can be written in integral form
$$ u(x) = \int_{\partial\Omega_i} P_{\Omega_i}(x, z)\, u(z)\, dz $$
where $P_{\Omega_i}(x, z)$ is called the Poisson kernel. The key observation is that $P_{\Omega_i}(x, z)$ is exactly the first-passage probability density of a Brownian motion starting at $x$ and hitting the boundary at $z$. Wait — isn't that precisely what Walk on Spheres computes?
Exactly, and that gives us an easy recipe to approximate it: for a point $x \in \Omega_i$, we run many random walks from $x$ and bin where they exit on $\partial\Omega_i$. The interactive figure below visualizes the Poisson kernel for various domains tabulated using this strategy.
Estimating P(x, ·)…
Drag $x$ to move the source. Drag the dashed Neumann obstacle to move it; or adjust shape parameters with the sliders. Histograms on the boundary show the Poisson kernel $P(x, z)$, i.e., the first-passage probability density along $\partial\Omega_D$.
Poisson kernel. For a chosen interior source $x$, the histograms along $\partial\Omega_D$ show $P(x, z)$, the first-passage density of a Brownian walk from $x$. The corresponding statistics are estimated in real-time using Monte Carlo.
The Poisson kernel has a dual interpretation: instead of fixing $x$ and asking where the walk exits, fix a boundary point $z$ and ask which interior points are most likely to send walks there. In other words, how a unit point source at $z$ on the Dirichlet boundary affects the interior — this is precisely the solution operator!
Precomputing…
Drag $z$ anywhere along $\partial\Omega_D$. The interior is the Poisson kernel $P(\cdot, z)$ — the response to a point source at $z$. The "source width" smooths the source to emphasize the effect.
Solution operator. The same kernel $P(x, z)$, viewed in $z$ instead of $x$. For each scene, the kernel matrix is precomputed on-the-fly with Monte Carlo samples; dragging $z$ then queries a column of it instantly.
Subdomain Poisson kernel. Picking one tile of the decomposition (left) and estimating its local first-passage solution operator (right). Every tile edge — whether physical Dirichlet boundary or an artificial interface — acts as an absorbing exit, while interior obstacles stay Neumann.
Pick a subdomain, then click “Precompute”.
Click a tile on the left to choose a subdomain, then Precompute its boundary first-passage histogram for every interior bucket (buckets inside the Neumann geometry are skipped). Drag $x$ — it snaps to the nearest bucket — to inspect each precomputed kernel. Nothing runs until you click Precompute.
Precomputed binned solution operator of a subdomain. Pick a tile of the decomposition (left); its interior is split into an $R\times R$ grid of buckets (right). For each bucket, short Monte-Carlo walks estimate the first-passage distribution over the $R$ boundary bins per edge. Dragging $x$ snaps to a bucket and shows its precomputed kernel — the subdomain's discrete solution operator, one row at a time.
As implied by the interactive figures above, there's a natural and simple way of precomputing and discretizing
solution operators as a simple matrix $\mathbf{H}$
Discrete solution operator. Discretizing the interior with collocation points $\{x_i\} \subset \Omega$ and the Dirichlet boundary $\partial\Omega_D$ into panels $\{\Gamma_j\}$ with collocation points $\{z_j\}$ yields a matrix $\mathbf{H}$ that approximates the solution operator. Row-wise, $H_{ij}$ is the first-passage probability that a walk launched at $x_i$ exits through panel $\Gamma_j$; column-wise, $H_{ij}$ gives the interior response at $x_i$ to a unit source localized at $z_j$.
By tabulating one discrete solution operator $\mathbf{H}_i$ for each tile $\Omega_i$, we can solve the discrete Dirichlet problem within each tile by a simple matrix-vector multiplication. However, this still doesn't tell us how to find the values at the interfaces between tiles. Enter absorbing Markov chains!
5Absorbing Markov Chains
An absorbing Markov chain is also a random walk, but this time on a discrete (and finite) set of states $\mathcal{S}$. Some states $\mathcal{T}$ are called transient (the walker may pass through them, possibly many times) and the rest $\mathcal{A}$ are absorbing (once entered, the walker never leaves), such that $\mathcal{S} = \mathcal{T} \sqcup \mathcal{A}$. The figure below provides a simple example.
Absorbing Markov chain. Three transient states $\mathcal{T}=\{t_1,t_2,t_3\}$ sit between two absorbing states $\mathcal{A}=\{a_L,a_R\}$. At each step a walker hops to a random neighbor; the absorbing states carry a self-loop, so once a walker lands there it stays forever.
A key observation is that we can also define a boundary value problem on the absorbing Markov chain analogous to . Concretely, as shown in the interactive example below, we can prescribe values on absorbing states, run walks from transient states until they are absorbed, and average the absorbing values to get a solution defined on the transient states, i.e., $$u(t) = \mathbb{E}[g(A_\tau) \mid X_0 = t]$$ for any transient state $t \in \mathcal{T}$, where $A_\tau \in \mathcal{A}$ is the absorbing state where the walk ends and $g$ holds the prescribed values at absorbing states. This is very reminiscent of the Walk on Spheres algorithm, isn't it?
The interactive figure below provides an example for a simple Markov chain linking two absorbing endpoints.
walks: 0
Drag the vertical sliders next to each absorbing endpoint to set its boundary value. Click on any transient node to start a walk. Drag the slider beneath each node to change its transition probability. The inner color of each interior circle is the running Monte Carlo estimate. You can launch many walks with "Run walks" or show the exact solution with "Show exact solve".
Discrete boundary value problem. By launching walks from transient states and accumulating the values obtained at absorbing states, we can approximate the solution to a discrete boundary value problem.
Note how we're absolutely free to choose arbitrary transition probabilities and how they influence the
solution
You may have also noticed that, even with a handful of states, you need to launch quite a few walks before the Monte Carlo estimate stops wiggling around. So here is the natural question: do we really have to simulate random walks?
Look at any transient state $i$. By the memoryless property of Markov chains, a walker sitting at $i$ takes a single step to a neighbor $j$ with probability $P_{ij}$, and from there the rest of the walk is statistically identical to a fresh walk launched at $j$. In other words, the expected absorbed value at $i$ is just the weighted average of the expected absorbed values at its neighbors:
$$ \begin{aligned} u(i) &\;=\; \sum_{j \in \mathcal{S}} P_{ij}\, u(j) && \text{on } \mathcal{T}, \\ u(a) &\;=\; g(a) && \text{on } \mathcal{A}. \end{aligned} $$
This is exactly a discrete analog of the Laplace equation : each
interior value is the average of its neighbors, with prescribed values on the boundary
To make this concrete, split the transition matrix into transient-to-transient and transient-to-absorbing blocks,
$$ \mathbf{P} \;=\; \begin{bmatrix} \mathbf{Q} & \mathbf{R} \\ \mathbf{0} & \mathbf{I} \end{bmatrix}, $$
and collect the unknown transient values into a vector $\mathbf{u}_{\mathcal{T}}$ and the prescribed absorbing values into $\mathbf{g}$. The averaging identity above becomes $\mathbf{u}_{\mathcal{T}} = \mathbf{Q}\,\mathbf{u}_{\mathcal{T}} + \mathbf{R}\,\mathbf{g}$, i.e.,
$$ (\mathbf{I} - \mathbf{Q})\, \mathbf{u}_{\mathcal{T}} \;=\; \mathbf{R}\, \mathbf{g}. $$
That's it. As long as every walk is eventually absorbed (which it is, with probability one), $\mathbf{I} - \mathbf{Q}$ is invertible, and a single linear solve hands us the exact expected absorbed value at every transient state at once: no sampling, no variance, no waiting for the estimator to settle. Try it in the figure above with "Show exact solve": the colors should snap to their final values immediately!
One last fun thing for the road! It turns out that you can see $\mathbf{I}-\mathbf{P}$ as a random-walk Laplacian. In 1D, if we choose a symmetric random walk, the corresponding random-walk Laplacian should be very familiar to you: it's exactly the three-point finite difference Laplacian in 1D (up to a scaling factor).
$i-2$
$i-1$
$i$
$i+1$
$i+2$
$h$
$h$
$\tfrac{1}{2}$
$\tfrac{1}{2}$
$$ \begin{aligned} \big[(\mathbf{I}-\mathbf{P})\,\mathbf{u}\big]_i &\;=\; u_i - \tfrac{1}{2}u_{i-1} - \tfrac{1}{2}u_{i+1} \\ &\;=\; -\tfrac{h^2}{2}\,\underbrace{\frac{u_{i-1} - 2u_i + u_{i+1}}{h^2}}_{\Delta_h u_i}. \end{aligned} $$
1D random-walk Laplacian. For a symmetric random walk on a uniform grid of spacing $h$, the operator $\mathbf{I}-\mathbf{P}$ is exactly the standard three-point finite-difference Laplacian $\Delta_h$, up to the rescaling $-h^2/2$.
And in 2D, the random-walk Laplacian for a symmetric walk on a regular grid recovers the standard five-point finite-difference stencil.
$i,\,j+1$
$i-1,\,j$
$i,\,j$
$i+1,\,j$
$i,\,j-1$
$h$
$h$
$\tfrac{1}{4}$
$\tfrac{1}{4}$
$\tfrac{1}{4}$
$\tfrac{1}{4}$
$$ \begin{aligned} \big[(\mathbf{I}-\mathbf{P})\,\mathbf{u}\big]_{i,j} &\;=\; u_{i,j} - \tfrac{1}{4}\big(u_{i-1,j} + u_{i+1,j} + u_{i,j-1} + u_{i,j+1}\big) \\ &\;=\; -\tfrac{h^2}{4}\,\underbrace{\frac{u_{i-1,j} + u_{i+1,j} + u_{i,j-1} + u_{i,j+1} - 4u_{i,j}}{h^2}}_{\Delta_h u_{i,j}}. \end{aligned} $$
2D random-walk Laplacian. For a symmetric random walk on a uniform square grid of spacing $h$, the operator $\mathbf{I}-\mathbf{P}$ is exactly the standard five-point finite-difference Laplacian $\Delta_h$, up to the rescaling $-h^2/4$.
From there, you probably see the pattern. What if instead of these canonical probabilities, we considered more general transition probabilities based on the geometry of the subdomains?
6Coupling Tiles via an Absorbing Markov Chain
Now we have almost all the pieces to recover values at interfaces between subdomains! The trick is to Walk on Decomposed Subdomains, or more precisely on their interfaces.
The last problem is that, so far, we've only seen
in how to jump from the
inside of a subdomain to one of its interfaces and not from one interface to another.
The fix is to view each interface through another decomposition
Current co-edge subdomain
Walk on Co-edge Subdomains. From a point $x$ on an interface, we take a step by walking on its co-edge subdomain — the union of the two tiles that share that interface. Each exit lands on a new interface, with a new subdomain for the next step, until the walk is absorbed on the global Dirichlet boundary at $Z_\tau$.
With this, we can define a discrete Markov chain where the interfaces are the transient states, the global Dirichlet boundary gives the absorbing states, and the first-passage probabilities between interfaces define the transitions and are estimated using the strategy defined in applied to the co-edge subdomains. The Markov chain formalism from lets us solve for interface values directly through a deterministic (sparse) linear solve — sidestepping the relatively long, high-variance random walks that would otherwise be required.
Once interface values are known, the boundary of every tile is fully determined, and we recover each tile's interior with a single matrix–vector product using precomputed solution operators for the interior, i.e., $\mathbf{H}_i$ as defined in . These per-tile reconstructions are independent and thus trivially parallelizable.
The interactive figure below summarizes all steps of the pipeline. Feel free to slide through the various stages and play with the different parameters.
The Walk on Decomposed Subdomains (WoDS) pipeline. (1) Partition $\Omega$ into tiles $\{\Omega_i\}$ separated by interfaces. (2) For each tile, estimate first-passage transition probabilities between its interfaces with short local Walk-on-Stars walks; assemble these into per-tile operators $\mathbf{H}_i$. (3) Stitch the corresponding probabilities into one global absorbing Markov chain over all interfaces and recover interface values via a single sparse solve $(\mathbf{I}-\mathbf{Q})\,\mathbf{u}_{\mathcal{T}} = \mathbf{R}\,\mathbf{g}$. (4) With every tile's boundary now known, reconstruct the interior in parallel by applying local interior solution operators, i.e., $\mathbf{H}_i$.
7Additional Benefits
One thing that I haven't mentioned is that in practice, we needn't compute solution operators for every tile of
the domain. If a tile does not intersect geometry, its solution operator is the same everywhere and we can
precompute it only once across all scenes
MC-estimated tiles: —
Precomputed (shared): —
Intersects geometry — needs Monte Carlo Empty tile — shared operator
Pick a scene and adjust $T$. Only the highlighted tiles must have their solution operator estimated; all empty tiles share a single closed-form operator computed once.
Locality of solution-operator estimation. Our method inherits the locality of grid-based approaches by requiring the estimation of solution operators only in regions near the geometry. As a result, the actual Monte Carlo cost scales with geometric complexity rather than domain size.
Another beautiful thing is that our approach exposes an adjustable trade-off between the cost of stochastic
Monte
Carlo
estimation of solution operators (which is highly parallelizable within each individual tile) and the cost of
the
deterministic global solve on interfaces. As can be seen in the interactive figure below, at fixed output
resolution $N$, increasing the size $B$ of each tile requires more Monte Carlo effort per tile, but the
deterministic global solve becomes cheaper because the interfaces it couples are fewer and farther apart. In
other
words, we can directly amortize the $O(N^2)$ degrees of freedom of the global solve to $O(N^2/B)$ degrees of
freedom if we can afford more Monte Carlo
Interface values at fixed $N$. Tile interfaces are the only unknowns of the global solve.
System size of the deterministic global solve as a function of subtile resolution $B$.
Trade-off between local Monte Carlo and global solve. At fixed output resolution $N$, sliding $B$ from 1 to $N$ continuously interpolates between a grid-like regime — where the global solve carries all $O(N^2)$ degrees of freedom — and a pure solution-operator regime — where the global solve is trivial ($O(1)$) but every tile requires a fully tabulated interior operator.
8Reflections and Future Work
I am very excited by our work and the doors it opens for future research. One thing people often bring up is
the
analogy to radiosity and Monte Carlo path tracing in rendering
In this context, Peter Shirley famously said in an email thread in 1997:
In summary, pure MCPT has only two advantages — it is so dumb that it doesn't get hit by big scenes, and it is easy to implement. […]
I think the solution is hybrid methods — add bias! (This is blasphemy in MC circles :^) ). I do want to keep the good parts of MC methods — they are damned robust and are possible to implement correctly — my MC code does not bomb on weird untweaked inputs — tell me with a straight face that is true of most non-MC implementations. However, you are right that the results are too noisy!!! We can keep these benefits and reduce noise if we add bias the right way (not that I know what that right way is).
One thing I highlighted here is that Peter Shirley was right: to be adopted, Monte Carlo methods needed "hybrid methods". And the solution was denoising! Without denoising, existing visual effects and animated films would probably not be path traced! People even won an Academy Award for that.
So, to be competitive with classical numerical methods, do Monte Carlo PDE solvers also need hybrid approaches? Probably yes! But is denoising the right answer? Maybe not.
In our paper, we take a different route and instead try to reconcile grid-free Monte Carlo methods with grid-based solvers. One thing that I learned with this project is that grid-based methods just work so well: if you want convergence, you simply cannot beat them! And it's not a surprise, ask anyone doing numerical analysis and they will tell you something like:
Monte Carlo is an extremely bad method; it should be used only when all alternative methods are worse.
My take is: lean on the well-known benefits of grid-based methods as much as possible (e.g., strong and fast convergence guarantees), and bring in grid-free Monte Carlo where grid-based methods suffer most (e.g., complex geometry).
That said, there is still a long way to go: generalizing to other PDEs or boundary conditions, better discretization schemes, dedicated global solvers, improved Monte Carlo estimators, etc. Rest assured that we are working on that...