Loading [MathJax]/jax/output/HTML-CSS/jax.js

How to Set Up Monte Carlo Simulations of Diffusion
Hong-Hsi Lee1
1NYU School of Medicine, New York, NY, United States

Synopsis

To validate biophysical models of diffusion MRI, Monte Carlo (MC) simulations are flexible and straightforward to set up for all kinds of tissue properties and micro-geometries. The ensemble averages of numerous particles' random walks provide estimates of diffusion propagators and statistically meaningful diffusion metrics. Here, we introduce the basic principles of MC simulations and the common mistakes especially for simulations of permeable membranes. Finally, we propose a short to-do list for the near future of this field.

Introduction of diffusion simulations

Numerical simulations provide the flexibility to validate biophysical models and optimize NMR sequences under a wide range of acquisition parameters and tissue properties, thanks to the total control over phan- tom properties and the possibility of creating substrates mimicking specific biological tissue microstructure. Numerical simulations could be performed in several ways, based on (1) matrix formalisms, (2) finite- difference and finite-element methods, and (3) Monte Carlo (MC) simulations.

The matrix formalism relies on finding solutions for the eigenmodes of the diffusion propagator, and is computationally fast due to its implementation using matrix multiplications. Practically, these eigenmodes were only found analytically for diffusion within simple shapes. To extend the applicability of the matrix formalism for a complicated geometry, the eigenmodes of corresponding Laplace equations can potentially be estimated numerically.

To numerically solve the mesoscopic Bloch-Torrey equations for complex micro-geometries with permeable membranes, finite-difference methods were proposed to simulate the diffusion. Also, Bloch-Torrey equations can be solved numerically by finite-element methods for various geometries with impermeable or permeable membranes.

MC simulations are computationally expensive since they collect the ensemble average of numerous particles' random walks, resulting in statistically meaningful parameter estimates. Nonetheless, MC simulations are by far the most popular since they offer great flexibility to simulate diffusion along with other contrast mechanisms in all kinds of micro-geometries.

How to set up Monte Carlo simulations?

Microstructure geometry
To mimic a realistic microstructure geometry, we can arrange, pack and combine multiple simple shapes, in either 2d or 3d, with a length scale similar to the biological tissue of interest. For simulations including a non-porous medium, simulation results depend dramatically on the packing geometry. The size of a numerical phantom geometry should be much larger than the diffusion length (depending on the total simulated diffusion time t and intrinsic diffusivity D0).

Particle number Np
Based on the central limit theorem, MC simulations necessitate including as many particles as possible to achieve an accurate parameter estimation of the ensemble average, i.e. error 1/Np. A clear cut-off for a minimally required number of particles has not been proposed so far, but a rule of thumb often used is that 105106 particles diffusing from random initial positions generally provide reliable simulation results.

Step size
The step size is limited by the smallest microstructural length scales in a numerical phantom. The time for each step δt, as well as the step size
δx=2dD0δt,(1)
can be limited by the diffusion gradient waveform spectrum. For MC simulations of pulsed gradient, δt is limited by the gradient pulse width δ via δtδ, whereas for oscillating gradient, δt is limited by the gradient frequency f via δtf. For the simulation of water exchange, MT and surface relaxation, extra conditions related to the permeation probability need to be satisfied.

Step number Nstep
The step number is proportional to the diffusion time. Empirically, the first few thousand steps provide unreliable results, caused by the discretization of a realistic continuous diffusion process into separate steps. This can be evaluated by simulating the kurtosis, which due to discretization, results in K(t)1/Nstep, suggesting a minimal Nstep>1000 for an error <0.1%.

Boundary condition (substrate edge)
A numerical phantom's finite boundary box, if treated inappropriately, may influence the simulation result. To further expand the finite numerical phantom, periodic or mirroring (hard wall) boundary conditions are often used.

Impermeable and permeable membranes
If a particle encounters an impermeable membrane within a step, the particle is reflected back by the membrane and experiences a perfectly elastic collision. The displacements before and after the collision are then summed up to the step size given by Eq. (1).

While encountering a permeable membrane, the particle has a probability 1PEX to be reflected elastically by the membrane, and a probability PEX to penetrate through, where
PEXκ0D0δxCd,(2)
with permeability κ0 and Cd=1,π/4, and 2/3 for dimensionality d=1,2,3.

Particle-membrane interaction
The most commonly implemented interaction is elastic collision (specular reflection), which works well for impermeable membranes and for permeable and/or absorbing membranes. Other kinds of interaction include diffuse reflection and equal-step-length random leap for non-permeable membranes. For diffuse reflection, the particle reflected by a membrane consumes the rest of its step length in a random direction over the same side of the membrane. For equal-step-length random leap, the particle encountering a membrane cancels the original step and randomly chooses another direction to leap until the chosen step does not cross any membranes.

Relieve the computational bottleneck
For simulations within a medium composed of multiple compartments, the most computationally expensive calculation is to identify which compartment a particle resides in at a given time. A way to solve this problem is to build a lookup table. Such algorithm reduces the search to a local sub-volume scale and thereby significantly speeds up simulation run times.

Other contrast
Diffusion simulations can be performed by incorporating other MR contrasts, such as T1 and T2 relaxation, water exchange, magnetization transfer/surface relaxation, susceptibility effect/BOLD effect, and IVIM.

Simulation results
The simulated diffusion displacements Δx yields the diffusivity and kurtosis along ˆn via
D(t,ˆn)=(Δxˆn)22t,
and
K(t,ˆn)=(Δxˆn)4(Δxˆn)223,
and the simulated trajectories x(t) yields the diffusional signals by S=eiϕ, where ϕ=γg(t)x(t)dt with the gyromagnetic ratio γ and diffusional gradient g(t).

Oh, No! Common mistakes

Diffusion propagator: Sphere point picking
The single-step diffusion propagator is modeled by a binomial distribution in 1d, a circle in 2d, and a spherical surface in 3d. A potential mistake in 3d simulations is to sample the step orientation over θ=πv and ϕ=2πuof a spherical coordinate, rather than over cosθ=12v and ϕ=2πu with two uniformly distributed random numbers u,v between 0 and 1.

Particle-membrane interaction and exchange
To speed up MC simulations, diffuse reflection and equal-step-length random leap are often used to replace the elastic collision. When the step number is sufficiently large and the step size is reasonable small (compared with the length scale in the microstructure), the two non-elastic interactions results agree with results from elastic collision with impermeable membranes. However, for permeable and absorbing membranes, the two non-elastic interactions could lead to bias in simulated diffusion metrics/signals due to the particle density re-distribution around the membranes.

Membrane permeation: permeability based
The original form of the permeation probability P through a membrane of permeability κ depends on the distance δs between the random walker and the encountered membrane when δs is smaller than the step size δx:
P1PκδsD0.
To reduce the computational load, we would like to approximate δs with δx, by averaging over all possible δs up to δx. This approximation leads to the probability in Eq. (2), which is applicable when P1 is satisfied, i.e.
κ0D02dδt1Cd,
indicating that, for a large κ0, a sufficient small time step δt should be applied. In this case, κκ0.

Actually, the choice of the small time step is surprisingly strict; for example, when P5%, Eq. (2) is biased by roughly 5%.

Membrane permeation: diffusivity based
Instead of assigning a nominal permeability κ for a permeable membrane, the permeation probability could be defined based on the spin concentration (C1,C2) and intrinsic diffusivity (D1,D2) over the left and right side of the membrane:
P12=C2D2C1D1,P21=1.
It seems that this method introduces neither adjustable parameters for membrane permeability nor particle density transition (offset) over the membrane; however, this is true only for infinitely small time step. For a finite time step δt, an extra δt-dependent permeability κ0 may pronounce in simulations:
κ0=D22dδt1Cd,
complicating the choice of time step, especially in 2d and 3d geometries.

Outlook: To do list

So far, most of the diffusion simulation studies, including non-MC studies, are implemented in geometries containing artificial geometrical shapes. Benefitting from recent advances in histology analysis techniques, it is possible now to perform simulations in realistic microstructure reconstructed from microscopy images of biological tissues. Furthermore, advances in computational resources, including the use of clusters and GPUs, enable ones to perform diffusion simulations along with complicated MR contrast within a reasonable amount of time. Here, we provide a to do list for the near future of this field:

1. Where is my extra-cellular space? Realistic microstructure generation
2. Fast and Fabulous: Parallel computation
3. Diffusion simulation and Bloch simulator in MRI system

Acknowledgements

I would like to thank Els Fieremans, Dmitry S Novikov, and Marco Palombo for the discussion.

References

Callaghan, P. T. (1997). A simple matrix formalism for spin echo analysis of restricted diffusion under generalized gradient waveforms. Journal of Magnetic Resonance, 129(1), 74-84.

Chin, C. L., Wehrli, F. W., Hwang, S. N., Takahashi, M., & Hackney, D. B. (2002). Biexponential diffusion attenuation in the rat spinal cord: computer simulations based on anatomic images of axonal architecture. Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine, 47(3), 455-460.

Fieremans, E., & Lee, H. H. (2018). Physical and numerical phantoms for the validation of brain microstructural MRI: A cookbook. Neuroimage, 182, 39-61.

Hagslätt, H., Jönsson, B., Nydén, M., & Söderman, O. (2003). Predictions of pulsed field gradient NMR echo-decays for molecules diffusing in various restrictive geometries. Simulations of diffusion propagators based on a finite element method. Journal of Magnetic Resonance, 161(2), 138-147.

Hall, M. G., & Alexander, D. C. (2009). Convergence and parameter choice for Monte-Carlo simulations of diffusion MRI. IEEE transactions on medical imaging, 28(9), 1354-1364.

Lee, H. H., Papaioannou, A., Novikov, D. S., & Fieremans, E. (2020). In vivo observation and biophysical interpretation of time-dependent diffusion in human cortical gray matter. arXiv preprint arXiv:2001.06529.

Stanisz, G. J., Wright, G. A., Henkelman, R. M., & Szafer, A. (1997). An analytical model of restricted diffusion in bovine optic nerve. Magnetic Resonance in Medicine, 37(1), 103-111.

Szafer, A., Zhong, J., & Gore, J. C. (1995). Theoretical model for water diffusion in tissues. Magnetic resonance in medicine, 33(5), 697-712.

Proc. Intl. Soc. Mag. Reson. Med. 28 (2020)