2021

[1]Michael C. Brennan

[3,4,5]Leora E. Dresselhaus-Marais

1]Department of Aeronautics and Astronautics, Center for Computational Science
and Engineering, Massachusetts Institute of Technology, 77 Massachusetts Ave,
Cambridge, 02139, MA, USA

2]Experimental Operations, Nevada National Security Site, 232 Energy Way,
North Las Vegas, 89030, NV, USA

3]Department of Materials Science and Engineering, Stanford University, 476
Lomita Mall, Stanford, 94305, CA, USA

4]Department of Photon Science, SLAC National Accelerator Laboratory, 2575
Sand Hill Rd, Menlo Park, 94025, CA, USA

5]Physics Division, Lawrence Livermore National Laboratory, 7000 East Ave,
Livermore, 94550, CA, USA

# Analytical Methods for Superresolution Dislocation Identification in Dark-
Field X-ray Microscopy

<EMAIL_ADDRESS>Marylesa Howard<EMAIL_ADDRESS>Youssef Marzouk
<EMAIL_ADDRESS><EMAIL_ADDRESS>[  [  [  [  [

###### Abstract

We develop several inference methods to estimate the position of dislocations
from images generated using dark-field X-ray microscopy (DFXM)—achieving
superresolution accuracy and principled uncertainty quantification. Using the
framework of Bayesian inference, we incorporate models of the DFXM contrast
mechanism and detector measurement noise, along with initial position
estimates, into a statistical model coupling DFXM images with the dislocation
position of interest. We motivate several position estimation and uncertainty
quantification algorithms based on this model. We then demonstrate the
accuracy of our primary estimation algorithm on synthetic realistic DFXM
images of edge dislocations in single crystal aluminum. We conclude with a
discussion of our methods’ impact on future dislocation studies and possible
future research avenues.

###### keywords:

dislocation, Bayesian inference, dark-field X-ray microscopy, metals

##  1 Introduction

Dislocations are ubiquitous in studies of the mechanical properties of
crystalline materials hull2011introduction . For roughly 70 years,
dislocations have been studied with electron microscopes that resolve the
relevant dynamics and interactions across angstrom to nanometer length scales.
As electron microscopes can only penetrate up to $2\ \mu$m, they can only
characterize surfaces or subsurface dynamics in very thin films, which have
been shown to exhibit surface and size effects non-typical of their bulk
counterparts Kubin2011 . As such, our ability to test models for crystal
plasticity are limited for macroscopic materials. X-ray imaging methods like
X-ray topography and radiography can directly measure the relevant subsurface
dynamics, but have long suffered from ambiguity in interpretation for high
dislocation-density metals, due to their limitations in spatial resolution
hull2011introduction ; Danilewsky2020 .

Dark field X-ray microscopy (DFXM) was developed over the past decade as a new
full-field imaging method that images deformations that can be hundreds of
micrometers beneath any surface, with up to $30$–$150$ nm resolution
kutsal2019esrf . Using an X-ray objective lens along the diffracted beam, DFXM
directly maps the orientation and strain (i.e., a projection of the
displacement gradient tensor field) of crystalline materials simons2015dark ;
poulsen2017x ; poulsen2020multi . Compared to other imaging methods, DFXM has
several attractive characteristics. DFXM uses high energy X-rays, which can
penetrate more deeply than a micron, and hence allows for imaging within bulk
materials. High energy X-rays also have large extinction lengths, which limits
dynamical diffraction (i.e., multiple scattering) and simplifies experiment
design and interpretation. DFXM has been employed in the study of
ferroelectrics simons2018long  and biominerals cook2018insights , and recently
has been applied to analyze populations of dislocations jakobsen2019mapping ;
poulsen2020geometrical ; gonzalez2020methods ; dresselhaus2021situ .

While DFXM holds significant promise to characterize bulk dislocation-mediated
plasticity, its application has still been limited to studies that map either
the density of dislocations or the dynamics of dislocations spread by more
than $1\,\mu$m. As DFXM’s spatial resolution is significantly higher (i.e.,
finer) than the distance between dislocations, this raises the question: _What
has prevented DFXM from accessing the $\approx$100 nm separated boundaries
that are routinely observed in TEM?_ The challenge thus far has been the high
sensitivity of DFXM’s measurements. Since DFXM maps the displacement gradient
tensor field $\nabla\bm{u}(x,y,z)$ with resolution on the order $10^{-5}$,
dislocations appear on the order of a micron in size in images, which is far
larger than it would be via TEM and significantly larger than the angstrom
dimension of the dislocation core poulsen2020geometrical .

In this work, we extend conventional DFXM analysis to TEM-scale accuracy using
statistical inference methods. We develop a numerical method that uses
Bayesian inference to improve the accuracy of our prediction of the
dislocation position based on the physics of DFXM contrast and CMOS noise
processes. We apply our new method to simulated DFXM images of edge
dislocations in single-crystal aluminum, as this well-defined system allows us
to define a ground truth for the dislocation’s position, against which we can
evaluate the accuracy of our method. To ensure that our results are robust to
the more complex features in experimental data, we add a measurement noise
model to the forward model recently developed in poulsen2020geometrical —a
formalism that may easily be extended to other materials. Our approach
achieves an accuracy that exceeds even the best $30$ nm resolution of the
imaging optics. Our inference methods also offer a complete quantification of
uncertainty in the dislocation position, along the characteristic vectors
defining the dislocation (i.e., the slip plane normal and Burger’s vector).
After demonstrating our approach, we provide guidance on use cases for each of
our algorithms, and present an outlook on how to extend our methods to
interpret experimental data collected at synchrotrons. We expect our
inferential approach to open a new range of possibilities for characterizing
subsurface dislocation dynamics—with important opportunities for structural
mechanics, dislocation theory, thermal transport, and beyond.

##  2 Simulating DFXM images

Our position estimation and uncertainty quantification algorithms require the
ability to simulate the imaging process for the material being sampled, the
configuration of the microscope, and parameters of the incident X-ray beam. In
this section we describe our method of DFXM image simulation, which builds
upon a model described previously in poulsen2020geometrical . This model uses
continuum mechanics to describe the material and a wave-optics formalism to
simulate idealized noise-free DFXM images, $\mathbf{I}^{\text{nf}}$, given the
experimental parameters describing the sample and experimental setup. In our
use of this model, we denote the position of the dislocation of interest for
these predictions as $\xi$; we denote our simulation process as $\mathcal{F}$,
which we call the _forward model_ , such that
$\mathbf{I}^{\text{nf}}=\mathcal{F}(\xi)$. We omit the full model derivation
in this work, and instead summarize its key steps and simplifying
assumptions—to contextualize its scope and highlight new elements in the
present implementation.

###  2.1 The forward model

The authors of poulsen2020geometrical  express the intensity of X-ray light
that reaches all points on the detector as the convolution of a
micromechanical model with an instrumental resolution function. The
micromechanical model describes the un-deformed and deformed regions of the
crystal lattice, taking into account the space-group and associated local
deformations. Using a continuum mechanics approach, this model relates the
displacement gradient tensor field $\nabla\bm{u}$ to reciprocal lattice
vectors, $\bf{q}$, at each position in the sample at the microscale. The
micromechanical model depends on the attributes of the material one is
sampling and on the configuration of the microscope. In this case, we describe
the dislocations using elastic theory, as described in hull2011introduction ,
because this theory adequately describes the long-range distortion fields; in
more complex systems, it may be extended to more detailed models, so long as
they can be voxelized into $\nabla\bm{u}$.

The instrumental resolution function accounts for the experimental
specifications of the instrument, including the goniometer angles to orient
the sample, the parameters of the incident X-ray beam, and the specified
imaging components. The authors of poulsen2020geometrical  assemble their
resolution function as a histogram of Monte Carlo-simulated incident rays that
diffract and transmit through the imaging optics to reach the specified
detector coordinates. The resolution function can be computed independently of
the specific dislocation type, character, and position, though the instrument
parameters must be configured to ensure that they contribute nonzero intensity
contrast from the dislocation of interest. The noise-free intensity for each
pixel is defined by integrating over the real-space voxel in the sample,
assuming a gauge volume set by the projection angle of the diffraction. For
our numerical implementation of the forward model, see
https://github.com/michael-c-brennan/DFXMTools.

For the purposes of this work, we make a small generalization to the model in
poulsen2020geometrical  in order to handle the case of multiple dislocations.
Let $\nabla\bm{u}_{\xi_{i}}$ denote the displacement gradient tensor field
emanating from a dislocation core located at position $\xi_{i}$. In this case,
the total displacement gradient tensor induced by a set of dislocations at
positions $\xi=\\{\xi_{1},\dots,\xi_{D}\\}$ is equal to the sum of the
individual tensor fields,

$\nabla\bm{u}=\sum_{i=1}^{D}\nabla\bm{u}_{\xi_{i}}.$

###  2.2 Optical parameters and material constants

Above we introduce the forward model as it is considered in setting up
experiments for effective implementation and contrast on desired dislocations,
as described in poulsen2020geometrical . While this was important to set up
our _initial_ modeling framework for this study, we emphasize that our
approach in this work views this model through a different perspective. Our
_analysis-focused_ approach takes the microscope parameters simply as inputs
that are set by the experiment being analyzed. As such, we assume that the
free variable is the micromechanical model describing the defects that _might_
describe a dataset/evaluation image. In this way, our change in perspective on
this model allows us to focus on the _interpretation_ of the results for
materials science.

We now list and categorize the inputs that define the forward model. The
parameters describing the material and microscope configuration together
define the micromechanical model, while the characteristics of the X-ray beam
and microscope configuration define the instrumental resolution function. The
material attributes are defined by the lattice parameters of the material,
$a=b=c=4.0479\text{\AA}$ and $\alpha=\beta=\gamma=90^{\circ}$ for FCC
aluminum; the length of the Burger’s vector for the relevant dislocation
system, $\|\mathbf{b}\|$; the Poisson ratio, $\nu$; and the $d$-spacing for
the relevant $hk\ell$ vector of the diffracting plane of the crystal. We use
the diffraction angle $2\theta$ of a given deformation state to define the
bounds on all goniometer angles, i.e., the angles that we use to change the
contrast mechanism/diffraction condition by re-orienting the sample ($\phi$,
$\chi$, $\omega$). The resolution function also includes the parameters of the
incident X-ray beam, which has a characteristic profile in the
$y_{\ell},z_{\ell}$ directions and its vertical and horizontal divergences
($\Delta\zeta_{v}$, $\Delta\zeta_{h}$), and Gaussian energy variation $\Delta
E/E$. We assume the incident beam’s intensity to be a top-hat function in the
$y_{\ell}$ direction, and Gaussian in the $z_{\ell}$ direction with RMS
$\Delta z_{\ell}$. This assumption is consistent with the aperture and 1D
focusing optics used in the synchrotron experiments, respectively. The imaging
distances that determine the magnification in the imaging condition are also
inputs to the resolution function: specifically the distance from the sample
to the entry point of the objective, $d_{1}$; the physical aperture, $D$; and
the numerical aperture, $N\\!A$.

Fig. 1 shows the geometry of the dark field X-ray microscope at ID06 at the
European Synchrotron Radiation Facility (ESRF), and provides a visual
representation of the parameters discussed above when applicable. For further
discussion of how each parameter enters into the physical DFXM model, see
poulsen2020geometrical . The values for all parameters used in this work
replicate the experiment presented in dresselhaus2021situ , and are included
in Table 1. All distribution widths (e.g., the vertical divergence
$\Delta\zeta_{v}$) are given in terms of the RMS value. Fig. 2 shows simulated
images for different configurations of edge dislocations, using the simulation
parameters defined in Table 1.

Figure 1: The geometry of the dark-field X-ray microscope at ID06 at the ESRF, which defines several coordinate frames relevant to our work. The laboratory coordinate system, $(x_{\ell},y_{\ell},z_{\ell})$ is aligned with the image plane set by the X-ray beam. The sample coordinate system $(x_{s},y_{s},z_{s})$, is defined as a rotation of the lab coordinates by the goniometer angles (base tilt $\mu$, rotation $\omega$, and tilts $\chi$ and $\phi$) and captures the configuration of the microscope. The dislocation coordinate system $(x_{d},y_{d},z_{d})$ is defined by the Burgers vector $\mathbf{x}_{d}=\mathbf{b}/\|\mathbf{b}\|$, slip plane normal vector $\mathbf{y}_{d}=\mathbf{n}/\|\mathbf{n}\|$, and line vector $\mathbf{z}_{d}=\mathbf{t}/\|\mathbf{t}\|$, and is shown in relation to the sample frame and image plane. This figure is adapted from poulsen2017x .  Table 1: Forward model inputs Optics parameters | Material attributes (FCC aluminum)
---|---
$N\\!A=0.72$ mrad |  $\|\mathbf{b}\|=0.286$ nm
$D=435$ $\mu$m | $\nu=0.334$
$d_{1}=274$ mm |  $2\theta$ = $20.73^{\circ}$
X-ray beam parameters | Microscope configuration
$\Delta\zeta_{v}=0.222$ mrad (top-hat) |  $\phi=2.44$ mrad
$\Delta\zeta_{h}=4.25\times 10^{-3}$ mrad (Gaussian) |  $\chi=0.262$ mrad
$\Delta z_{\ell}=254.77$ nm (Gaussian) | $\mu=\theta$
$\Delta E/E=5.95\times 10^{-5}$ | $\omega=0$

(a)

(b)

(c)

(d)

Figure 2:  Simulated images $\mathbf{I}^{\text{nf}}$ of edge dislocations with
Burgers vector $\mathbf{b}=[1\ 1\ 0]$ and slip plane normal $\mathbf{n}=[1\
\bar{1}\ 1]$. Fig. 2(a) shows a lone dislocation. Fig. 2(b) shows dislocations
spaced $4$ $\mu$m apart, Fig. 2(c) shows dislocations spaced $2$ $\mu$m apart,
and Fig. 2(d) shows dislocations spaced $1.5$ $\mu$m apart. The dislocations
are aligned along their shared Burgers vector, implying that they pack into a
stabilizing tilt boundary, as discussed in dresselhaus2021situ .

##  3 Bayesian inference for dislocation core position

In Section 2, we described the physical model that allows us to simulate the
contrast mechanism for an idealized DFXM image of a dislocation at a known
position in the sample. For real experimental data collected at synchrotrons,
identifying a dislocation’s position is difficult for several reasons. Real
DFXM images contain measurement noise from multiple sources, with a signal
that can be stochastic or deterministic, depending on the mechanism (e.g.,
cosmic rays vs pixel cross-talk) rossi2006pixel . As such, when analyzing the
DFXM images collected from a time-resolved experiment, we can use intuition
from the model poulsen2020geometrical , wavelet analysis methods
gonzalez2020methods , or a combination of methods to estimate the
_approximate_ position of the dislocation in a given frame. However, our
intuition cannot _precisely_ locate the dislocation core, nor can it quantify
uncertainty in our knowledge of it.

_Bayesian inference_ provides a natural framework to refine this
initial/imprecise knowledge of the dislocation’s position from a DFXM image,
and goes a step further by directly quantifying uncertainty in the inferred
position, accounting for noise present in the image. Bayesian inference hinges
on defining two mathematical objects: a _prior distribution_ , which describes
our initial knowledge of the dislocation position, and a _likelihood model_ ,
which describes the relationship between the dislocation position and the DFXM
images it produces. In other words, the prior distribution describes our
initial intuition for the dislocation’s position, expressed as a probability
distribution. The likelihood model describes the physics that we are using to
update our initial understanding of the system. In our work, this physics
includes the forward model and experimental noise. Together the likelihood
model and prior distribution refine our understanding of the dislocation
position, through a distribution termed the _posterior_. The posterior is the
prior _updated_ or _informed_ by our likelihood model and the DFXM image;
specifically, it is the distribution of dislocation position _conditioned_ on
the observed image. Below we discuss the likelihood model and prior
distribution we use in this work further.

###  3.1 The likelihood model

In this subsection, we introduce our likelihood model, which integrates our
idealized DFXM image simulations from section 2 (the forward model
$\mathcal{F}$) with a statistical model of detector measurement noise. Real
DFXM experimental data differ from the idealized simulations due to various
sources of random detector noise. To make our position estimation and
uncertainty quantification algorithms appropriate for experimental data, we
describe the detector using statistical models of measurement noise developed
in the literature snyder1993image ; snyder1995compensation . Including both
the deterministic forward model and a measurement noise model into the
likelihood model lets our algorithms account for both the signal of interest
caused directly by dislocations, and the effects of stochastic noise.

Following the work of snyder1993image , we describe detector noise based on
the types of stochastic processes that occur when light impinges on each pixel
of the CMOS camera. Most of these originate from conversion from photons to
electrical current. We group the different types of noise processes by their
origins and statistical trends. We denote the counts measured by a particular
pixel $n\in\\{1,\dots,N_{\text{pixels}}\\}$ by the random variable $I_{n}$. We
assume this to be a random variable given by a sum of three mutually
independent random variables,

$I_{n}={\color[rgb]{0,0,0}f_{n}}+{\color[rgb]{0,0,0}\beta_{n}}+{\color[rgb]{0,0,0}\gamma_{n}},$

where ${\color[rgb]{0,0,0}f_{n}}$ denotes the counts associated with the
feature of interest (i.e., from the material being sampled),
${\color[rgb]{0,0,0}\beta_{n}}$ denotes the number of background counts
detected (i.e., the background signal), and ${\color[rgb]{0,0,0}\gamma_{n}}$
denotes electronic readout noise for that pixel. As noted in snyder1993image ,
both ${\color[rgb]{0,0,0}f_{n}}$ and ${\color[rgb]{0,0,0}\beta_{n}}$ are
accurately modeled using Poisson random variables. Poisson random variables
are integer-valued and have equal mean and variance; we denote their means as
$\bar{f}_{n}$ and $\bar{\beta}_{n}$ respectively.

We take $\bar{f}_{n}$ to be the deterministic output of the forward model at
pixel $n$, i.e., $\bar{f}_{n}=\mathcal{F}(\xi)_{n}$, so that the random
variable ${\color[rgb]{0,0,0}f_{n}}$ encodes our forward model. This implies
that in the absence of electronic readout and detector noise, the observed
image would be the output of our image simulation. We assume the mean value of
the background noise is known and is the same for each pixel, i.e.,
$\bar{\beta}_{n}=\bar{\beta}$ for all $n$.

Unlike ${\color[rgb]{0,0,0}f_{n}}$ and ${\color[rgb]{0,0,0}\beta_{n}}$, we
model the electric readout noise measured in each pixel using a Gaussian
distribution,
${\color[rgb]{0,0,0}\gamma_{n}}\sim\mathcal{N}(\bar{\gamma}_{n},\sigma^{2})$,
for convenience. We assume the noise in each pixel to be independent of its
neighbors, an assumption that ignores the possibility of pixel _cross-talk_.
In this work, we focus on images taken with a weak beam condition, where
cross-talk is not significant due to the low integrated pixel intensities. We
assume the mean to be $\bar{\gamma}_{n}=0$ for all $n$. This value varies
greatly with the particular camera used and the gain settings of the camera.

To obtain a closed-form expression for the probability density function (pdf)
of the likelihood model, we make a common simplifying approximation that the
sum of Poisson and Gaussian variables can be approximated by a Gaussian
distribution,

$I_{n}|\xi\sim\mathcal{N}(m_{n}(\xi),\sigma_{n}^{2}(\xi))\,,$ (1)

with mean intensity measured for each pixel given by

$\displaystyle m_{n}(\xi)$
$\displaystyle=\bar{f}_{n}+\bar{\beta}_{n}+\bar{\gamma}_{n}$
$\displaystyle=\mathcal{F}(\xi)_{n}+\bar{\beta},$

and variance

$\displaystyle\sigma_{n}^{2}(\xi)$
$\displaystyle=\mathbb{V}\text{ar}\left[f_{n}\right]+\mathbb{V}\text{ar}\left[\beta_{n}\right]+\mathbb{V}\text{ar}\left[\gamma_{n}\right]$
$\displaystyle=\mathcal{F}(\xi)_{n}+\bar{\beta}+\sigma^{2}.$

This has the effect that pixels with larger intensities exhibit higher
variance, as is seen experimentally. Fig. 3 compares the noise-free idealized
simulated DFXM image as described in section 2 to a simulated noisy image, a
sample drawn from the distribution defined in eq. 1. We show traces of the
intensity pdfs at two particular pixels to demonstrate how the intensity
variance depends on its mean intensity.

Under the assumption that the counts measured by different pixels are
independent once conditioned on the dislocation position, the conditional pdf
of a full image can be expressed as

$\pi(\mathbf{I}|\xi)=\mathcal{N}\left(\mathbf{I}\mathchar
24635\relax\;\mathbf{m}(\xi),\bm{\Sigma}(\xi)\right),$ (2)

where
$\mathbf{m}(\xi)=\left[m_{1}(\xi),\dots,m_{N_{\text{pixels}}}(\xi)\right]$ and
$\bm{\Sigma}(\xi)=\operatorname{diag}\left[\sigma^{2}_{1}(\xi),\dots,\sigma^{2}_{N_{\text{pixels}}}(\xi)\right]$.
In section 3.3, we will set the variable $\mathbf{I}$ to the image being
evaluated, $\mathbf{I}^{\text{obs}}$. The _likelihood function_ is then
obtained by viewing $\pi(\mathbf{I}^{\text{obs}}|\xi)$ as function of $\xi$.

(a)

(b)

(c)

Figure 3:  (a) Noise-free and (b) noisy simulated images for an edge
dislocation with Burgers vector $\mathbf{b}=\frac{1}{2}[1\ 0\ \bar{1}]$ and
slip-plane normal vector $\mathbf{n}=[1\ \bar{1}\ 1]$, and distributions at
two particular pixels, taking $\bar{\beta}$ and $\sigma^{2}$ to be $5\%$ and
$1\%$ of the maximum noise-free intensity. (c) Intensity pdfs for two pixels
showing how a pixel with higher mean intensity also has higher variance.

###  3.2 The prior distribution

Figure 4: Simulated DFXM images for the twelve possible characters known for
edge dislocations in FCC aluminum using the parameters listed in table 1 with
the support of the prior distribution highlighted with a gray box.

The _prior distribution_ (or _the prior_) is a probability distribution that
encodes our knowledge of the dislocation position, $\xi$, before evaluating
the DFXM image. For this work, we assume the intuition afforded by the forward
model will be sufficient to discern the dislocation character based on its
image features. We found this assumption to be valid for the case of isolated
dislocations. Thus, for a known dislocation character, we describe our initial
“lower confidence” estimate of the dislocation core position with a box of
uniform probability over a region representing a reasonable margin of
uncertainty, i.e., based on the feature size, and we assign zero probability
outside of this region. This region is referred to as the _support_ of the
prior. In our simulated study, since we have a well defined ground truth, for
the dislocation position we define the prior’s support for each of the $12$
edge dislocations that appear in FCC lattices differently. To show our
assumptions for user uncertainty, we plot the support of the prior on top of
the noise-free simulated image for each dislocation character in Fig. 4. We
note that in general, the choice of the prior distribution will depend highly
on the specific experiment and application of interest. We discuss possible
modifications to our prior in section 6.

###  3.3 The posterior distribution

The _posterior distribution_ describes our knowledge of the dislocation
position after evaluating an image with our likelihood model. Let
$\mathbf{I}^{\text{obs}}$ denote the hypothetical observed image collected by
a DFXM experiment. Let $\pi(\xi)$ denote the pdf of the prior, and let
$\pi(\mathbf{I}|\xi)$ denote the likelihood function defined in eq. 2. The
prior distribution and likelihood model then define the pdf of the posterior
distribution $\pi(\xi|\mathbf{I}^{\text{obs}})$ through Bayes’ rule

$\pi(\xi|\mathbf{I}^{\text{obs}})=\frac{\pi(\mathbf{I}^{\text{obs}}|\xi)\pi(\xi)}{Z},$

where $Z$ is a normalization constant. The posterior captures our updated
understanding of which dislocation positions are more and less probable given
the observed image, weighed by our initial prior beliefs. Information that can
be extracted from the posterior thus includes _point estimates_ of the
dislocation position, as well as complete characterizations of uncertainty in
the inferred position.

##  4 Algorithms for estimating and quantifying uncertainty in dislocation
core positions

In our Bayesian framework, the tasks of position estimation and uncertainty
quantification can be accomplished by characterizing the posterior
distribution. This is commonly done by computing summary statistics of the
posterior distribution. For the task of position estimation, we can use the
posterior mean or mode, and we can measure our confidence in those predictions
using probabilistic measures of spread like the marginal posterior variances
or the entire posterior covariance matrix. To this end, we propose three
algorithms for estimation and uncertainty quantification:

  * •

Estimation via the maximum a posteriori (MAP) point.

  * •

Approximation of the posterior using the Laplace approximation.

  * •

Computing summary statistics of the posterior using a Markov chain Monte Carlo
(MCMC) method.

These approaches have increasing levels of fidelity to the posterior, at the
cost of increasing amounts of required computational time. In the following
subsections we introduction each option and discuss its strengths and
weaknesses. We provide the numerical implementation of each method and
experiment scripts at https://github.com/michael-c-brennan/DFXMTools.

###  4.1 MAP point estimation

Our primary goal is to estimate the position of each dislocation based on a
hypothetical observed image measured by DFXM. One natural choice for our
estimate is the MAP point,111In general the MAP point is not unique, as there
may be many points where the posterior pdf achieves its maximum. the position
that maximizes the posterior pdf,

$\xi^{\text{MAP}}=\operatornamewithlimits{argmax}_{\xi}\pi(\xi|\mathbf{I}^{\text{obs}}).$

Note that Bayes’ rule allows us to compute the posterior pdf up to an unknown
normalizing constant, $Z$. As such, we define the unnormalized version of the
posterior pdf as
$\widetilde{\pi}(\xi|\mathbf{I}^{\text{obs}})=\pi(\mathbf{I}^{\text{obs}}|\xi)\pi(\xi)$,
and recast the problem as

$\xi^{\text{MAP}}=\operatornamewithlimits{argmax}_{\xi}\widetilde{\pi}(\xi|\mathbf{I}^{\text{obs}}).$

For computational convenience, we consider the equivalent minimization problem
of the negative posterior log-pdf

$\xi^{\text{MAP}}=\operatornamewithlimits{argmin}_{\xi}\left\\{-\log\widetilde{\pi}(\xi|\mathbf{I}^{\text{obs}})\right\\}=\operatornamewithlimits{argmin}_{\xi}\left\\{-\log\pi(\xi)-\log\pi(\mathbf{I}^{\text{obs}}|\xi)\right\\},$

which results in a more numerically stable optimization problem. We used the
`Optim` Julia package to solve for the MAP estimate using a gradient descent
method mogensen2018optim .

###  4.2 Laplace approximation

The Laplace approximation raftery1996approximate  approximates the posterior
with a Gaussian distribution centered at the MAP point, with covariance matrix
set to match the local curvature of the posterior; specifically, the Laplace
covariance is the negative Hessian of the log posterior pdf at the MAP point.
If the posterior distribution were truly Gaussian, this approximation would
match the posterior exactly. The covariance matrix of the Laplace
approximation enables approximate uncertainty quantification, in the sense
that it can closely resemble the true posterior covariance, particularly when
the posterior is unimodal.

In our examples we plot $2$-standard deviation credibility ellipses ($2\sigma$
ellipses) to visualize this uncertainty. We note that while the posterior
distributions generated in our numerical examples do have non-Gaussian
features, the Laplace approximation still correctly captures the directions of
greatest uncertainty.

###  4.3 MCMC sampling

Finally, we describe a method to most precisely characterize the posterior
distribution, MCMC sampling brooks2011handbook . MCMC methods generate samples
according the posterior distribution by using a Markov chain designed to have
the posterior as its unique stationary measure, and to converge to this
measure from any starting point. In other words, MCMC samples are
asymptotically _exact_. Given a set of MCMC samples, $\\{\xi_{i}\\}_{i}$, one
can compute sample estimates of any posterior moment or expectation. For
example, the sample mean can be used as an estimate for the dislocation
position, and the sample variance provides a measure of uncertainty in the
position. The MCMC samples also show us if the posterior has non-isotropic,
multi-modal, or generally non-Gaussian features. In our numerical experiments,
we used a simple adaptive Metropolis method haario2001adaptive ;
vihola2014ergonomic .

##  5 Results

Figure 5:  (a) The evaluation image and MAP optimization results shown in the
image plane in respect to the algorithm plane. The true dislocation position,
MAP estimate and several iterates are shown as dislocation cores aligned with
the known line vector. (b/c) Results of the MAP optimization shown in the
algorithm and image plane respectively. We show the true contours of posterior
log-pdf to help visualize the behavior of the optimization method.

In this section we present the performance of our estimation and uncertainty
quantification algorithms for images of single edge dislocations in single-
crystal aluminum. As described in (hull2011introduction, , Chapter 4.3), the
displacement gradient tensor field $\nabla\bm{u}(x,y,z)$ induced by a
theoretical infinite length dislocation is invariant along the direction of
the dislocation line vector. Indeed, in this model system, $\nabla\bm{u}$ can
be expressed analytically at all 3D points in an arbitrary coordinate system,
or described as a 2D function along the coordinate system defined by the
Burgers vector $\mathbf{x}_{d}$ and slip plane normal $\mathbf{y}_{d}$. Since
we assume a known character and therefore line vector for the dislocation, its
core position can be represented in 2D by a point defined in the plane
orthogonal to the line vector. We define this plane to contain the original
origin from the lab frame and call this the _algorithm plane_. Expressing our
algorithms in this coordinate system captures our intuition that we should
have infinite uncertainty in the $\mathbf{z}_{d}$ direction for an idealized
infinite length dislocation. We emphasize the fictitious nature of the
algorithm plane, as we can still truthfully represent finite-length
dislocations using this system, so long as they behave this way within the
span of the observation plane. Fig. 5a. visualizes the algorithm plane along
with the observation plane and dislocation coordinate system for a dislocation
with Burgers vector $\mathbf{b}=\frac{1}{2}[1\ 1\ 0]$, and slip plane normal
$\mathbf{n}=[1\ \bar{1}\ 1]$. One may interpret inference results in the lab
frame by projecting points in the algorithm plane onto the observation plane
in the direction of the line vector as show in Fig. 5. If another coordinate
frame is of interest, one can project points from the algorithm plane into
that coordinate frame similarly.

In order to evaluate the accuracy of our estimation methods, we require
evaluation images with a known true dislocation position (i.e., the “ground
truth”). To achieve this, we focus this first study on synthetic
“experimental” images that we generate with the likelihood. Thus, for the true
position $\xi^{\text{true}}$, we draw a sample $\mathbf{I}^{\text{obs}}$ from
the likelihood distribution defined by eq. 1. We set the magnitude of the
corrupting detector-noise processes by setting $\bar{\beta}$ and $\sigma^{2}$
to be $5\%$ and $1\%$ of the maximum noise-free intensity; this value matches
the noise we have seen in our experiments, and is thus representative of real
experiments Yildirim2022 ; jakobsen2019mapping

We now show the outputs of each estimation algorithm introduced in section 3
for the edge dislocation with Burgers vector $\mathbf{b}=\frac{1}{2}[1\ 1\
0]$, and slip plane normal $\mathbf{n}=[1\ \bar{1}\ 1]$, where the true
dislocation position was generated randomly within the support of the prior.
Fig. 5b and Fig. 5c show optimization iterations, starting at the origin and
ending at the MAP point $\xi^{\text{MAP}}$ in the algorithm and image plane
respectively. In this example the MAP point is approximately $3$ nm from the
true dislocation position. We note that, given the $75$ nm pixel size, this
demonstrates a error less than $10\times$ smaller than the pixels on the
detector. Fig. 6 shows the Laplace approximation and MCMC samples for this
example in both the algorithm and image planes. We see that the Laplace
approximation closely matches the MCMC samples in both frames in terms of
shape, but slightly under-reports the uncertainty in the position, indicated
by many MCMC samples lying outside of the $2\sigma$ ellipses. The MCMC samples
also show us that the true posterior does indeed have some anisotropic
characteristics. In particular, both algorithms show that the direction of
highest uncertainty is closely aligned with $x_{\ell}$ direction in the image
plane.

Figure 6: Visualizations of the results of the Laplace approximation and MCMC
sampling algorithms (a) in the algorithm plane (b) in the image plane

Going beyond a single image, we studied this system further to acquire results
that could characterize the average performance of the MAP estimate for varied
cases of this system. For each of the twelve possible characters known for
edge dislocations in FCC aluminum, we computed the MAP estimate for $5000$
simulated experimental images. For each trial, the true dislocation position
was randomly selected from within the region supported by the prior. We chose
to randomize over the true dislocation position in our numerical study to
capture effects that could arise based on the variation of the core’s position
inside a particular pixel, i.e., whether core lies near the center or the edge
of a pixel. We considered a _low noise_ scenario where we take the noise
parameters $\bar{\beta}$ and $\sigma^{2}$ to be $5\%$ and $1\%$ of the maximum
noise-free intensity, and a _high noise_ scenario, where we take $\bar{\beta}$
and $\sigma^{2}$ to be $10\%$ and $5\%$ of the maximum noise-free intensity to
demonstrate the idealized and “worst-case” scenarios for experimental data.
Fig. 7 shows histograms of the estimation error of the MAP point for both
noise settings. In the low noise case, we see median and mean errors of $5.3$
nm and $15.0$ nm, respectively. In the high noise case, we obtain median and
mean errors of $14.2$ nm and $37.6$ nm, respectively.

(a) The low noise case

(b) The high noise case

Figure 7: Histograms of error between $\xi^{\text{true}}$ and
$\xi^{\text{MAP}}$ for the (a) low noise case and (b) high noise case

##  6 Discussion

###  6.1 Comparison and use cases

As demonstrated by our numerical examples, each of the three methods in this
work has advantages and disadvantages that connect to different use cases for
DFXM image analysis. We divide the use cases into two predominant ones
described in the literature thus far. In the first, we assume a user seeks to
estimate the position of a large set of dislocations from DFXM images, either
for the same dislocation in a series of temporally-resolved images, or for
many regions-of-interest of different dislocations across the field of view in
a single DFXM image/dataset. In the second case, we assume a small number of
dislocations must be characterized with the highest possible fidelity. We term
these use cases the “high-volume dislocation estimation” case and the “high-
precision uncertainty quantification” case, respectively.

The high-volume use case is well-suited to using the MAP point and Laplace
approximation to characterize our knowledge of the position $\xi$. As shown in
section 5, the MAP point consistently provides accurate estimates of the
dislocation position in each of the test cases we consider, and takes the
least computational effort of our algorithms. Also relevant to the high-volume
use case, the Laplace approximation provides a relatively inexpensive method
to quantify our uncertainty in the position. The computational cost of forming
the Laplace approximation is simply the cost of finding the MAP point and then
computing (and inverting) the Hessian at that point, which is trivial in the
present problem. Hence, the computational cost is essentially the same as that
of optimization. We have found that the Laplace approximation does seem to
accurately capture the direction of greatest variance, measured by its
alignment with computed MCMC samples. However, we have noted a phenomenon
common to the Laplace approximation in our examples: the Laplace approximation
seems to underestimate posterior uncertainty (see Fig. 6).

By contrast, high-precision uncertainty quantification requires a more
principled description of the posterior. While MCMC sampling provides the most
principled description of the posterior distribution, it is also the most
computationally expensive. In practice, computing posterior summaries for
large data sets using MCMC sampling may necessitate high performance computing
architectures. MCMC methods also require the user to compute and interpret
convergence and chain mixing diagnostics like autocorrelation plots or the
effective sample size of the MCMC samples brooks2011handbook . In our
numerical experiments, we saw acceptable mixing and decorrelation with a
simple adaptive MCMC method, suggesting this might not be an issue for similar
systems. We also note that the posterior mean is often very close to the
posterior mode, and so there was little benefit in using MCMC sampling over
the MAP point for position estimation. The key advantage of MCMC sampling is
it fidelity to the posterior. MCMC methods provide asymptotically unbiased
estimates of any posterior summary statistic and provide information on non-
Gaussian features of the posterior. For example, if the posterior had multiple
modes of similar strength, MCMC sampling could reveal this structure and allow
the user to develop a richer, more nuanced, sense of uncertainty in the
dislocation position.

###  6.2 DFXM and dislocation position estimation in the context of materials
science

Understanding the motion and interactions of dislocations at the single-
dislocation level in metals under various conditions is an age-old problem
whose solution helps understand the microscopic origins of changes to
macroscopic properties like strength, thermal transport, and phase
transitions. For example, in dresselhaus2021situ , the authors use DFXM to
collect movies near the melting temperature ($T_{m}$) to resolve the breakdown
in stability of a classical edge-dislocation (tilt) boundary in aluminum, as
the thermal motion increases and interaction forces break down. That work drew
its conclusions by tracking the variance in the positions of all dislocations
in the boundary with slowly increasing temperatures—made possible by previous
methods for dislocation tracking. In particular, the authors of
dresselhaus2021situ  estimated the position of each dislocation in a temporal
sequence of images using computer vision methods developed in
gonzalez2020methods . The precision of the measurements, however, was
insufficient to estimate important fundamental constants like the dislocation
mobility and residual stress fields. In contrast, the algorithms developed in
the present work achieve super-resolution accuracy for dislocation
positions—going far beyond the $150$ nm optical resolution of the imaging
system. Use of the present method offers a key opportunity to strengthen
_quantitative_ conclusions for these and other DFXM experiments.

We also point out the importance of our uncertainty quantification algorithms
to image analysis. Using either the Laplace approximation or MCMC sampling, we
obtain the directions of greatest posterior variance _in the dislocation
coordinate system_. Previous and ongoing work in this field has demonstrated a
key attribute of high-temperature dislocation dynamics: subtle positional
variance observed by DFXM indicates a combination of stochastic and locally-
driven motion in the dislocations at length-scales beyond our resolution with
DFXM. This has been demonstrated by dresselhaus2021situ  as essential to
understand the stochastic motion of dislocations in metals at the edge of the
melting temperature ($T_{m}$), and more recently by Guruthanan2022  in
evaluating the stress fields and sub-resolution point-defect clusters
necessary to describe the non-classical dislocation dynamics near $T_{m}$. At
temperatures near $T_{m}$, the density and mobility of point defects increases
exponentially as the stability of the crystal breaks down. This occurs
heterogeneously, as there are fluctuations in both the defect migration rates
and the local temperatures in the material (i.e., hotspots). As described in
cahn2001melting ; dresselhaus2021situ , these instabilities ultimately mean
that each dislocation in a boundary experiences slightly different local
forces based on fluctuations in the point defect density. These forces cause
random-walk motion that can be detected by DFXM, which encodes information
about the sub-resolution heterogeneity in the sample. The stochastic
information about the motion of these dislocations can inform the local
gradients in crystalline structure, informing the local stresses being
released by these high temperatures near $T_{m}$. As such, quantifying the
uncertainty in each dislocation position _in its climb and glide directions_
for a range of times is essential to build the necessary models for high-$T$
dislocation mobilities that are stress invariant—an important longstanding
challenge for experiments thus far.

Our position estimation and uncertainty quantification algorithms also present
an important step forward for dislocation characterization in the context of
the newly available subsurface dislocation tracking experiments. Over the past
decade, materials science experiments have built momentum in using data-
science methods to analyze microscopy results Kalinin2015 . This has enabled
key opportunities for experiments to quantify information about grain-
boundaries Zhou2022 , dislocations Li2020 , and other defects in statistically
significant populations. Similar approaches in subsurface X-ray microscopy
have struggled due to limitations in the optical resolution, and much more
difficult interpretation due to the very high strain-resolution, which can
make it difficult to interpret overlapping features. Measuring the positions
of angstrom-sized dislocation cores with only micrometer accuracy has
prevented DFXM and X-ray topography’s application to many mechanical
systems—in which the important length-scale for dislocation motion and
dynamics is often at most a few hundred nanometers. The superresolution
accuracy of our Bayesian approach demonstrates a key opportunity: to use the
physics of DFXM image formation to constrain the accuracy of position
estimation, allowing positional accuracy at similar scales to TEM, but over a
significantly wider field of view and deep below the surface. This presents
the opportunity to characterize key dislocation interactions, motion, and
dynamics in sensitive regimes over which the nm-scale accuracy is essential
for evaluation.

###  6.3 Limitations and future work

Our methods present the first implementation of Bayesian inference approaches
in the context of DFXM; however, we note that it has limitations and avenues
for improvement in its accuracy, its relevance to the high-volume use case,
and refinement in addressing the DFXM and dislocation systems.

First, we comment on the high-volume use case. In this work, we manually
select the prior for our synthetic evaluation images, however, a less
supervised approach is clearly preferable for the high-volume use case. As
noted in section 3.2, picking the prior distribution is a modeling choice made
by the user. In our numerical study, we chose our prior distribution for each
image based on the shape of the dislocation in the image and our knowledge of
the dislocation character and forward model. This lead to a uniform prior over
a region assumed to contain the true position. Other sources of information
may be incorporated into the prior distribution as well. Take for example the
application considered above and presented in gonzalez2020methods ;
dresselhaus2021situ , tracking the movement of dislocations through a time-
series of images. In this scenario, it would be natural to use the dislocation
position and velocity estimated from previous images to define the prior,
rather than defining it manually. One could also use the feature extraction
methods developed by gonzalez2020methods  to dictate the prior. In
gonzalez2020methods , the authors identify regions of the images associated
with a dislocation using a wavelet transformation. One could take the prior to
be uniform over this identified region (see (gonzalez2020methods, , Figure 3)
for an example). Both of the these situations lend themselves well to an
automated process for defining the prior, which would be necessary to apply
our methods to large data-sets of images.

A natural next step from this work would be to broaden the optimization scope
described in this model. While in this work we focused on estimating the
position of dislocations, the framework of Bayesian inversion may have further
uses in DFXM image processing. For example, we assumed that the angles of the
goniometer and the mean of the background and electric noise processes were
known. An extension of our work could include these parameters in the
inference problem, by defining the forward model as a function of any relevant
variables (e.g., dislocation position, goniometer angles, noise parameters)
and then inferring each of these using estimation algorithms analogous to
algorithms presented in this work. Future progress in this work may express
$\xi$ as a higher dimensional parameter to express uncertainty in all of these
values. This is a natural next research direction building on the results
presented in this work.

Beyond increasing the dimension of the inference problem, further progress
could also be made in extending this methodology to more accurately model the
optics in the microscope. The presented methodology relies heavily on the
image simulation model $\mathcal{F}$ and the description of measurement noise
matching the true physical imaging process accurately. The success of our
position estimation algorithms applied to real DFXM images will depend on the
fidelity of the simulation model and noise models. More recent implementations
of the forward model have been developed for X-ray free electron laser
experiments Holstad2022 , and using wavefront propagation methods, which offer
more accurate results (including dynamical diffraction), though at a higher
computational cost Carlsen2022 . As models of the imaging process are refined,
we expect the utility of the numerical methods leveraging those models to
increase.

Finally, we note that the micromechanical model used within the forward model
could also include nonlinear elasticity in the models. This work has used the
simplest possible description of dislocations, assuming infinite dislocation
lines and classical elastic theory hull2011introduction . More complex models
of dislocations have been developed—both for small well-defined dislocation
boundaries Acharya2006 , and for more complex dislocation tangles or
avalanches Papanikolaou2018 . Progress in adapting the DFXM forward model to
more complex dislocation systems is ongoing at this time.

##  7 Conclusion

This work has developed several inference methods to estimate the position of
dislocations from DFXM images with quantitative uncertainty—achieving
superresolution accuracy. We have done this by formulating the position
estimation task as a Bayesian inference problem. We demonstrate the accuracy
of these methods using different approaches and magnitudes of noise, showing
that the methods obtain super-resolution accuracy for edge dislocations in FCC
aluminum, with tractable uncertainty quantification in the position expressed
in the dislocation system. Further advances in modeling dislocations and DFXM
can be integrated into this framework directly, and our results demonstrate
the robust performance of our approach. This work presents a key step forward
for dislocation mechanics, as it offers positional accuracy previously only
accessible via TEM. As such, our methods enable accurate multiscale
characterization of _subsurface_ dislocations, and should allow for studies of
the dynamics and interactions of dislocations across many materials systems.
Future work will extend the methods presented here to higher dimensions, to
infer other important parameters of interest.

Acknowledgments We thank Henning Friis Poulsen and Grethe Winther for their
guidance and discussions as we constructed our code for the DFXM forward model
used in this work.

This manuscript has been authored in part by Mission Support and Test
Services, LLC, under Contract No. DE-NA0003624 with the U.S. Department of
Energy and supported by the Site-Directed Research and Development Program,
U.S. Department of Energy, National Nuclear Security Administration. The
United States Government retains and the publisher, by accepting the article
for publication, acknowledges that the United States Government retains a non-
exclusive, paid-up, irrevocable, worldwide license to publish or reproduce the
published form of this manuscript, or allow others to do so, for United States
Government purposes. The U.S. Department of Energy will provide public access
to these results of federally sponsored research in accordance with the DOE
Public Access Plan (http://energy.gov/downloads/doe-public-access-plan). The
views expressed in the article do not necessarily represent the views of the
U.S. Department of Energy or the United States Government. DOE/NV/03624–1304

LEDM’s intial contributions were performed under the auspices of the U.S.
Department of Energy by Lawrence Livermore National Laboratory under Contract
DE-AC52-07NA27344, and the Lawrence Fellowship. All analysis and writing were
performed at Stanford University and SLAC National Accelerator Labs.

## Declarations

The authors declare no conflicts of interest.

## References

  *   * (1) Hull, D., Bacon, D.J.: Introduction to Dislocations vol. 37. Elsevier, The Boulevard, Langford Lane, Kidlington, Oxford, OX5 1GB (2011)
  * (2) Sauzay, M., Kubin, L.P.: Scaling laws for dislocation microstructures in monotonic and cyclic deformation of FCC metals. Progress in Materials Science 56, 725–784 (2011)
  * (3) Danilewsky, A.N.: X-ray topography—more than nice pictures. Crystal Research and Technology 55(9), 2000012 (2020)
  * (4) Kutsal, M., Bernard, P., Berruyer, G., Cook, P., Hino, R., Jakobsen, A., Ludwig, W., Ormstrup, J., Roth, T., Simons, H., et al.: The ESRF dark-field X-ray microscope at ID06. In: IOP Conference Series: Materials Science and Engineering, vol. 580, p. 012007 (2019). IOP Publishing
  * (5) Simons, H., King, A., Ludwig, W., Detlefs, C., Pantleon, W., Schmidt, S., Stöhr, F., Snigireva, I., Snigirev, A., Poulsen, H.F.: Dark-field X-ray microscopy for multiscale structural characterization. Nature communications 6(1), 1–6 (2015)
  * (6) Poulsen, H.F., Jakobsen, A., Simons, H., Ahl, S.R., Cook, P., Detlefs, C.: X-ray diffraction microscopy based on refractive optics. Journal of Applied Crystallography 50(5), 1441–1456 (2017)
  * (7) Poulsen, H.F.: Multiscale hard X-ray microscopy. Current Opinion in Solid State and Materials Science 24(2), 100820 (2020)
  * (8) Simons, H., Haugen, A.B., Jakobsen, A.C., Schmidt, S., Stöhr, F., Majkut, M., Detlefs, C., Daniels, J.E., Damjanovic, D., Poulsen, H.F.: Long-range symmetry breaking in embedded ferroelectrics. Nature materials 17(9), 814–819 (2018)
  * (9) Cook, P.K., Simons, H., Jakobsen, A.C., Yildirim, C., Poulsen, H.F., Detlefs, C.: Insights into the exceptional crystallographic order of biominerals using dark-field X-ray microscopy. Microscopy and Microanalysis 24(S2), 88–89 (2018)
  * (10) Jakobsen, A., Simons, H., Ludwig, W., Yildirim, C., Leemreize, H., Porz, L., Detlefs, C., Poulsen, H.: Mapping of individual dislocations with dark-field X-ray microscopy. Journal of Applied Crystallography 52(1), 122–132 (2019)
  * (11) Poulsen, H., Dresselhaus-Marais, L., Carlsen, M., Detlefs, C., Winther, G.: Geometrical-optics formalism to model contrast in dark-field X-ray microscopy. Journal of Applied Crystallography 54(6) (2021)
  * (12) Gonzalez, A., Howard, M., Breckling, S., Dresselhaus-Marais, L.E.: Methods to quantify dislocation behavior with dark-field X-ray microscopy timescans of single-crystal aluminum. arXiv preprint arXiv:2008.04972 (2020)
  * (13) Dresselhaus-Marais, L.E., Winther, G., Howard, M., Gonzalez, A., Breckling, S.R., Yildirim, C., Cook, P.K., Kutsal, M., Simons, H., Detlefs, C., et al.: In situ visualization of long-range defect interactions at the edge of melting. Science Advances 7(29), 8311 (2021)
  * (14) Rossi, L., Fischer, P., Rohe, T., Wermes, N.: Pixel Detectors: From Fundamentals to Applications. Springer, Verlag Berlin Heidelberg (2006)
  * (15) Snyder, D.L., Hammoud, A.M., White, R.L.: Image recovery from data acquired with a charge-coupled-device camera. JOSA A 10(5), 1014–1023 (1993)
  * (16) Snyder, D.L., Helstrom, C.W., Lanterman, A.D., Faisal, M., White, R.L.: Compensation for readout noise in CCD images. JOSA A 12(2), 272–283 (1995)
  * (17) Mogensen, P.K., Riseth, A.N.: Optim: A mathematical optimization package for Julia. Journal of Open Source Software 3(24), 615 (2018). https://doi.org/10.21105/joss.00615
  * (18) Raftery, A.E.: Approximate Bayes factors and accounting for model uncertainty in generalised linear models. Biometrika 83(2), 251–266 (1996)
  * (19) Brooks, S., Gelman, A., Jones, G., Meng, X.-L.: Handbook of Markov chain Monte Carlo. CRC press, 6000 Broken Sound Parkway NW, Suite 300, Boca Raton, FL 33487-2742 (2011)
  * (20) Haario, H., Saksman, E., Tamminen, J., et al.: An adaptive Metropolis algorithm. Bernoulli 7(2), 223–242 (2001)
  * (21) Vihola, M.: Ergonomic and reliable Bayesian inference with adaptive Markov chain Monte Carlo. Wiley stats Ref: statistics reference online, 1–12 (2014)
  * (22) Yildirim, C., Winther, G., Poulsen, H.F., Detlefs, C., Huang, P.-H., Dresselhaus-Marais, L.E.: Extensive 3D mapping of dislocation boundaries by dark-field X-ray microscopy. In Preparation (2022)
  * (23) Guruthanan, R., Dresselhaus-Marais, L.E.: Vibrating string model to describe boundary migration near $T_{m}$. In Preparation (2022)
  * (24) Cahn, R.W.: Melting from within. Nature 413(6856), 582–583 (2001)
  * (25) Kalinin, S.V., Sumpter, B.G., Archibald, R.K.: Big–deep–smart data in imaging for guiding materials design. Nature Materials, 973–980 (2015)
  * (26) Zhou, X., Wei, Y., Kühbach, M., Zhao, H., Vogeld, F., Kamachali, R.D., Thompson, G.B., Raabe, D., Gaulta, B.: Revealing in-plane grain boundary composition features through machine learning from atom probe tomography data. Acta Materialia 220, 117633 (2022)
  * (27) Li, W., Field, K.G., Morgan, D.: Automated defect analysis in electron microscopic images. npj Comput Mater 4, 36 (2018)
  * (28) Holstad, T.S., Ræder, T.M., Carlsen, M., Bergbäck Knudsen, E., Dresselhaus-Marais, L.E., Haldrup, K., Simons, H., Nielsen, M.M., Poulsen, H.F.: X-ray free-electron laser based dark-field X-ray microscopy: a simulation-based study. Journal of Applied Crystallography 55(1) (2022)
  * (29) Carlsen, M., Detlefs, C., Yildirim, C., Ræder, T., Simons, H.: Simulating dark-field X-ray microscopy images with wave front propagation techniques. arXiv:2201.07549 (2022)
  * (30) Acharya, A., Roy, A.: Size effects and idealized dislocation microstructure at small scales: Predictions of a phenomenological model of mesoscopic field dislocation mechanics: Part i. Journal of the Mechanics and Physics of Solids 54, 1687–1710 (2006)
  * (31) Papanikolaou, S., Cui, Y., Ghoniem, N.: Avalanches and plastic flow in crystal plasticity: an overview. Modelling and Simulation in Materials Science and Engineering 26, 013001 (2018)


#  Sieve Method and Prime Gaps via Probabilistic Method

Buxin Su  Department of Mathematics, David Rittenhouse Lab, University of
Pennsylvania.209 South 33rd Street, Philadelphia, PA 19104-6395 E-mail:
<EMAIL_ADDRESS>The bulk of this work was performed while BS was a
student at University of Toronto.

###### Abstract

Most prime gaps results have been proven using tools from analytic or
algebraic number theory in the last few centuries. In this paper, we would
like to present some probabilistic way of proving many essential results. A
major component of the proof is a probabilistic approach to the sieve method.
In addition, we discuss their connections with Zhang and Maynard’s recent work
on small and large gaps in prime numbers.

##  1 Introduction

In last few centuries, most results in prime gaps was proven via tools from
analytic or algebraic number theory. Recently, Zhang (2014) proves the large
gaps between ${n+1}^{th}$ and $n^{th}$ primes is bounded. That is,

$\liminf_{n}p_{n+1}-p_{n}\leq 7\times 10^{7}$ (1.1)

via a refinement of the work of Goldston, Pintzand, Yıldırım on the small gaps
between consecutive primes. The proof strongly relies on a generalization of
Bombieri-Vinogradov theorem (See Fouvry and Iwaniec (1980)). Maynard (2015)
have provide alternative approach showing that

$\liminf_{n}p_{n+1}-p_{n}\leq 600$ (1.2)

Polymath groups also provided several similar results in Polymath (2012),
Castryck et al. (2014) and Polymath (2014b). However, there are still many
unsolved problems in number theory. Goldbach’s conjuncture is one the most
famous problems. So far, the most recent progress is given by Chen (1973) half
an century ago.

In this article, mainly focus on Zhang’s and Maynard’s results, I would like
to discuss about small and large gaps between primes and how Probability
Theory play an important role in those researches. By showing the connection
between Probability Theory and Analytic Number Theory, I would like to
demonstrate that probability method is an effective candidate in the future
study. In the last part of the manuscript, I would like to discusses a few
specific problems that related to our main topic or probability method.

##  2 Preliminary Results

We start with some well-known theorems and preparation. In the remaining of
this paper, we may denote $p_{n}$ by the $n^{th}$ prime number. The first
theorem is one of the most fundamental results in Number theory and it can be
proven by contradiction.

######  Theorem 2.1 (Euclidean Theorem).

There are infinitely many primes.

Now I would like to provide a slightly different version of Prime Number
Theorem. The proof is based on von Mangoldt function.

######  Theorem 2.2 (Prime Number Theorem).

$|n:p_{n}\leq x|=(1+o(1))\frac{x}{logx}$

Now, we would like to represent the following elegant theorem regarding the
least prime gaps $p_{n+1}-p_{n}$. It is one of the main theorem in Goldston et
al. (2009).

######  Theorem 2.3 (Goldston et al. (2009)).

$\liminf_{n\to\infty}{\frac{p_{n+1}-p_{n}}{log\ p_{n}}}=0$

######  Definition 2.4.

For $h_{1}<h_{2}<\mathellipsis<h_{k}$, we call $H=\\{h_{1},h_{2},\mathellipsis
h_{k}\\}$ is admissible iff for any prime $p$, exist $n$ such that
$\prod_{i=1}^{k}{(n+h_{i})}$ is coprime to $p$. Equivalently,
$h_{1}<h_{2}<\mathellipsis<h_{k}$ which avoid at least 1 congruence class
$mod\ p$ for any prime p.

In order to provide some intuition about admissible set, we have an
interesting theorem dur to J, Engelsma. For further discussion on these
results, see Granville (2015).

######  Theorem 2.5 (J. Engelsma).

There is an admissible set of size 105 contained in $[0,600]$.

The following two definitions play a crucial role in Analytic Number Theory.

######  Definition 2.6.

Define the primorial $\mathit{P(n)}$ of n by the product of all primes $\leq
n$, i.e. $\mathit{P(n)}$ = $\prod_{p\leq n}{p}$.

######  Definition 2.7.

For $(a,q)=1$,

$\pi(x;p,a)=card\\{p\leq x:p=a(mod\ q\\}$

define $E_{q}$ to be

$E_{q}=\sup_{(a,q)=1}|\pi(x;p,a)-\frac{\pi(x)}{\phi(q)}|$

we say the primes have ‘level of distribution $\theta$’ if for any $A>0$,

$\sum_{q<x^{\theta}}{E_{q}}\ll_{A}\frac{X}{(logX)^{A}}$

Equivalently, For $0<\theta<1$, denote $EH[\theta]$:

$\sum_{q\leq x^{\theta}}{\sup_{a\in(Z/qZ)^{*}}{|\sum_{\begin{subarray}{c}n\leq
X\\\ n=a(mod\ q)\end{subarray}}{\Lambda(n)}}-\frac{1}{\phi(q)}\sum_{n\leq
X}{\Lambda(n)}}|\ll X(logX)^{-A}$

for all $A>0$.

The following results is a major result of analytic number theory, obtained in
the mid-1960s, concerning the distribution of primes in arithmetic
progressions, averaged over a range of moduli. The proof details can be found
in Tenenbaum (2015) and Bombieri (1987).

######  Theorem 2.8 (Bombieri-Vinogradov Theorem).

The primes have level of distribution $\theta<\frac{1}{2}$.

Finally, we consider Dickson-Hardy-Littlewood Conjectures (see Zhang (2009)).

######  Definition 2.9 (Dickson-Hardy-Littlewood).

We define DHL(k,j) by the following: given $1\leq j\leq k$, for all admissible
k-tuple $h_{1}<h_{2}<\mathellipsis<h_{k}$, exist $\infty$ many $n$ such that
$n+h_{1}<n+h_{2}<\mathellipsis<n+h_{k}$ contain more than $j$ primes.

##  3 Small Gaps Between Primes

Let X be a large number, in this section, I would like to consider the least
prime gap $p_{n+1}-p_{n}$ in $[X,2X]$. First, we would like to present a new
probabilistic proof of the following proposition by Prime Number Theorem and
pigeon hole principle.

######  Proposition 3.1.

For X large enough, exist prime gaps in $[X,2X]$ of length $\ll logX$.

###### Probabilistic Proof of Proposition 3.1.

Let constant $H\sim logX$ for X given in the proposition. Pick n uniformly
random in [X,2X]. Then I have

$\mathbb{P}(n+i\ prime)\sim\frac{1}{logX}$

for $i=\\{0,1,2,\mathellipsis H\\}$ by Prime Number Theorem. Add them up, I
obtain

$\sum_{h\leq H}{\mathbb{P}(n+h\ prime)}>1.$

By Probability pigeon hole principle, I have prime gaps $\leq log\ x$, which
is the same result as we obtained using Prime Number Theorem. ∎

######  Remark 3.2.

Although we get the same result with even longer proof, the good aspect of
this method is it can be further generalized.

######  Remark 3.3.

One way of generalize such argument is simply by the observation that there is
nothing special about uniformly random among 0 to $H$. Indeed, lots of
randomly picking can be applied to this argument. So, an important task would
be find the optimal one.

Now, I would like to provide several results that highly related to
probability theory. In particular, the first two theorems can be proven only
involving probability and basic analysis. The proof detail can be found in
Panchenko (2018).

######  Theorem 3.4 (Hardy-Ramanujan Theorem).

let $\omega(n)$ denote the number of distinct prime factors of $n$, i.e.

$\omega(n)=card\\{p\leq n:p\ is\ prime,p|n\\}$

For any sequence $a_{n}$ such that $a_{n}\to\infty$ as $n\to\infty$, the
proportion of numbers $N\in\\{1,2,\mathellipsis n\\}$ that satisfy

$|\omega(N)-\log\log\ n|\leq a_{n}*\sqrt{\log\log\ n}$

goes to 1.

The direct consequence of Hardy-Ramanujan Theorem would be Merten’s first and
second theorem.

######  Theorem 3.5 (Merten’s Theorem).

As $n\to\infty$, the following hold:

$\sum_{p\leq n}{\frac{\log p}{p}}=\log(n)+O(1)$ $\sum_{p\leq
n}{\frac{1}{p}}=\log(\log(n))+O(1)$

where p are primes $\leq n$.

The following theorem is another generalization of Hardy-Ramanujan Theorem,
which is known as Erdős–Kac theorem, or fundamental theorem of probabilistic
number theory. It was first proven in Erdös and Kac (1940). As we may notice,
the format is very similar to Central Limit Theorem.

######  Theorem 3.6 (Erdős–Kac theorem).

For $\omega(n)$ we define above and fixed $a<b$, I have following

$\lim_{x\to\infty}{\frac{1}{x}*card\\{n\leq x:a\leq\frac{\omega(n)-\log\log\
n}{\sqrt{\log\log\ n}}\leq b\\}}=\Phi(a,b)$

where $\Phi(a,b)$ is the normal distribution.

Our goal now is to show the following theorem from Zhang (2014). The results
has been further generalized in Polymath (2014a). Zhang’s result actually can
be seen as a generalization of the method we discuss above.

######  Theorem 3.7.

Let $H=\\{h_{1},h_{2},\mathellipsis h_{k}\\}$ is admissible and $k$ sufficient
large, then exist infinite many $n$ such that at least 2 of
$\\{n+h_{1},n+h_{2},\mathellipsis n+h_{k}\\}$ are primes.

######  Remark 3.8.

What we really would like to show is for large enough X, exist $n\in[X,2X]$
such that at least 2 of $\\{n+h_{1},n+h_{2},\mathellipsis n+h_{k}\\}$ are
primes.

######  Remark 3.9.

There are two ways to think about this problem. The first one is to generalize
the argument I used in the proposition and conclude using pigeon hole
principle in Probability. Alternately, we observe that it is sufficient to
show for some $n\in[X,2X]$, I have

$\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}\geq 2$

which is equivalent to

$\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}-1>0$

It turn out two ways of thinking have the same consequence as following.

our new goal is to find optimal $f(n)>0$ for $n\in[X,2X]$, where $f(n)$ can be
viewed as probability distribution or weight. Also, in order to conclude the
claim, we also require $f(n)$ to satisfy

$\sum_{X<n<2X}{f(n)*\Bigg{(}\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}-1\Bigg{)}}>0$

Once we have this, then at least one of n such that

$\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}-1>0$

since the right hand side take value in integer, this gives us exactly what we
want.

Fortunately, we already had a smart choice of $f(n)$ by Goldston et al.
(2009), we pick $f(n)$ as following:

$f(n)=\Bigg{(}\sum_{\begin{subarray}{c}d\leq x^{b}\\\
d|(n+h_{1})(n+h_{2})\mathellipsis(n+h_{k})\end{subarray}}{\frac{1}{(k+l)!}*\mu(d)*(log\frac{x^{b}}{d})^{k+l}}\bigg{)}^{2}$

where $l>0$ depends on $k$ and $b$ is a constant in $(0,\frac{1}{2})$

######  Remark 3.10.

Here, we denote the element inside the sum by $\lambda_{d}$. In fact such
choice of weight is found by Goldston, D. A., Pintz, J. and Yildirim (GPY).
Basically, the motivation of this choice is
$\sum_{d|n}{\mu(d)*(log\frac{n}{d})^{k}}$ would vanish when $f(n)>k$.

######  Remark 3.11.

In Zhang’s paper, instead of using indicator function, he tends to use
$\theta$, which defined to be $\theta(n)=log(n)$ for n is prime and 0
otherwise.However, in the end this makes no difference.

Now, we would like check our definition of $f(n)$ does satisfy the requirement
above. We obtain the following:

$\displaystyle\sum_{X<n<2X}{f(n)*\Bigg{(}\sum_{i=1}^{k}{1_{n+h_{i}\
prime}}-1\Bigg{)}}$ (3.1)
$\displaystyle=\sum_{X<n<2X}{f(n)*\Bigg{(}\sum_{i=1}^{k}{1_{n+h_{i}\
prime}}\Bigg{)}}-\sum_{X<n<2X}{f(n)}$

Now, our task become computing two part respectively. It turn out that if
square our all the term and rearrange, we have

$\sum_{X<n<2X}{f(n)}=\sum_{d_{1},d_{2}<x^{b}}{\lambda_{d_{1}}\lambda_{d_{2}}*\Bigg{(}\sum_{\begin{subarray}{c}X\leq
n<2X\\\
gcd(d_{1},d_{2})|(n+h_{1})(n+h_{2})\mathellipsis(n+h_{k})\end{subarray}}{1}\Bigg{)}}$

Adding the characteristic function, I have

$\sum_{X<n<2X}{f(n)1_{n+h_{i}\
prime}}=\sum_{{d_{1},d_{2}}<x^{b}}{\lambda_{d_{1}}\lambda_{d_{2}}*\Bigg{(}\sum_{\begin{subarray}{c}X<n<2X\\\
gcd(d_{1},d_{2})|(n+h_{1})(n+h_{2})\mathellipsis(n+h_{k})\end{subarray}}{1_{n+h_{i}\
prime}}\Bigg{)}}$

######  Remark 3.12.

In fact, before we explicitly compute the result above, roughly speaking,
second term in the right hand side count how many primes are there in
arithmetic progression. So, we have to obtain some results about number of
primes in arithmetic progression to control this. Dirichlet theorem is clearly
one of the results, but it is too weak to estimate the right hand side.

Subtract these two expression above and compute, in Zhang’s notation, we
define $R(x;d,c)$ to be

$R(x;d,c)=\sum_{\begin{subarray}{c}X\leq n<2X\\\ n=c(mod\
d)\end{subarray}}{\Lambda(n)}-\frac{X}{\phi(d)}$

where $\Lambda(n)$ is the von Mangoldt function. Then, E is define to be

$E=\sum_{d<x^{2b}}{|\mu(d)|\sum_{c\in C_{i}(d)}{|R(x;d,c)|}}$

where the $C_{i}(d)$ is defined as

$C_{i}(d)=\Bigg{\\{}c:1\leq c\leq
d,(c,d)=1,\prod_{j=1}^{k}{c-h_{i}+h_{j}}=0(mod\ d)\Bigg{\\}}$

Then, the final computation would gives us

$\sum_{X\leq n<2X}{f(n)*\Bigg{(}\sum_{i=1}^{k}{1_{n+h_{i}\
prime}}-1\Bigg{)}}=T*X+O(E)$

for some expression T and E defined above.

Now, our main tasks become the control of E and T. In order to make the left
hand side positive, we only need to have (i)$T>0$; (ii) $|E|$ is small enough.
By small enough, I would like to show

$E\ll X(logX)^{-A}$

for large constant A.

Regarding two requirement above, we have some results from Goldston et al.
(2009) and Bombieri-Vinogradov theorem:

  1. 1.

if b $>$ $\frac{1}{4}$, say $c=\frac{1}{4}+\epsilon$, then $T>0$, (i) hold.

  2. 2.

if $b<\frac{1}{4}$, $|E|$ is relatively small, (ii) hole.

######  Remark 3.13.

Eventually, we want to obtain a better choice of b in our second point, i.e.
we want to find some $b>\frac{1}{4}$ such that $|E|$ is still relatively
small. However, even if we assume Generalized Riemann Hypothesis (GRH), the
dilemma above still does not being solved. GRH would tell us that for any R,
this error E is smaller up to the form $\sqrt{X}$. If $b>\frac{1}{4}$, than we
have at least $\sqrt{x}$ terms in the sum of E with each of them have upper
bound $\sqrt{X}$. This is still not efficient bound of E.

Zhang’s main contribution is focused on showing that we are able to
efficiently bound $E$. It turn our that $E$ is relatively small, i.e. (ii)
hold, for $b=\frac{1}{4}+\frac{1}{1168}$. Traditionally, the estimation of
term $R$ in $E$ involve zero of Dirichlet L-function. However, in Zhang’s
paper, Dirichlet L-function only appear potentially for a few times.

In order to estimate the error term, we first impose some constrain to $d$
that $d$ is divide $P$ where $P$ is the product of primes less than a small
power of $X$. This is equivalent to saying that every prime factors of $d$ is
less than a small power of $X$. As the result of this constrain, $d$ is not
small but every factor of d is small. Having such constrain, we reduce to
estimate the sum of $|\Delta(\gamma,d,c)|$ where $\gamma$ is supported on
$[X,2X)$ and $\Delta$ is defined to be

$\Delta(\gamma,d,c)=\sum_{n=c(mod\
d)}{\gamma(n)}-\frac{1}{\phi(d)}*\sum_{(n,d)=1}{\gamma(n)}$

.

If $d|P$ and $d$ is not too small, say $d>x^{\frac{1}{2}-\epsilon}$, then d
has factorization $d=qr$ where the range of r can be very flexibly chosen.
Applying combinatorial argument, we reduce the estimation of
$|\Delta(\gamma,d,c)|$ to three types of Dirichlet convolution.

  1. 1.

first two type: $\gamma=\alpha*\beta$ the Dirichlet convolution of two
function, where $\beta$ is supported on $[N,2N)$. When $N>x^{\frac{3}{8}}$, we
can reduce to estimate the sum of

$\sum_{Q<q<2Q}{\sum_{R<r<2R}{|\mu(qr)|*\sum_{c\in
C_{i}(qr)}{\Delta(\gamma,qr,c)}}}$

If we choose $R$ to be slightly smaller than $N$, then we are able to conclude
using Weil’s bound for Kloosterman sums.

  2. 2.

third type: $\gamma=\alpha*\beta_{1}*\beta_{2}*\beta_{3}$ Note in Zhang’s
paper, instead of using $\beta_{i}$, he uses $\mathcal{X}_{i}$ to emphasis
that these functions are characteristic function of certain intervals.
Applying $d=qr$ to this type, we can get an efficient upper bound using
Deligne’s proof of the Riemann Hypothesis for varieties over finite fields.

After the effort above, we are able to get an efficient bound and this would
end Zhang’s argument. Different from Zhang’s method, the method about choosing
$f(n)$ is further generalized by J. Maynard in Maynard (2015).

Instead of using $f(n)$ as above, Maynard generalize to ”multi variable” case,
which allows to conclude stronger statement.

######  Theorem 3.14 (Maynard (2015)).

The small gaps between primes are given by

$\liminf_{n}{p_{n+m}-p_{n}}\leq Cm^{3}*e^{4m+5}$

for all $m\in\mathbb{N}$ and morover,

$\liminf_{n}{p_{n+1}-p_{n}}\leq 600$

######  Remark 3.15.

In Zhang’s result, we are able to see that the main breakthrough is about the
primes in Arithmetic Progression. However, in Maynard results, what we would
do is to modify GPY sieve. It turn out that this would cause the optimization
problem and some combinatorial problem.

First, we consider the same function as we did above, let

$S=\frac{\sum_{N\leq n<2N}{1_{n+h_{i}prime}*f(n)}}{\sum_{N\leq n<2N}{f(n)}}$

######  Remark 3.16.

As we discuss above, we need $S>1$ for bound gaps. Also, if $S>m$ for all
large $N$, then $\liminf{p_{n+m}-p_{n}}<\infty$

As we said above, we used to define

$f(n)=(\sum_{\begin{subarray}{c}d\leq R\\\
d|(n+h_{1})(n+h_{2})\mathellipsis(n+h_{k})\end{subarray}}{\lambda_{d}})^{2}$

where $\lambda_{d}=\mu(d)*g(d)$ for $g(d)\approx(log\frac{R}{d})^{k+l}$

Maynard provides us a new choice of $f(n)$ as following

$f(n)=\Bigg{(}\sum_{\begin{subarray}{c}d_{1},d_{2},\mathellipsis d_{k}\\\
d_{1}*\mathellipsis*d_{k}<R\\\
d_{i}|(n+h_{1})(n+h_{2})\mathellipsis(n+h_{k})\end{subarray}}{\lambda_{d_{1},d_{2}\mathellipsis,d_{k}}}\Bigg{)}^{2}$

where
$\lambda_{d_{1},d_{2}\mathellipsis,d_{k}}=\mu(\prod_{i=1}^{k}d_{i})*h(d_{1},d_{2},\mathellipsis,d_{k})$.
The function $h$ is defined in term of a smooth function F that we are free to
choose. One advantage of such choice of weight is that our weight depends on
divisor of each of $n+h_{i}$.

Recall the theorem above has two part, they deal with $p_{n+m}$ and $p_{n+1}$
respectively. It turn out function $F$ can be slightly different for two part.
Thus, before we find the function $F$, we provide some definition and theorem.
Let $F:[0,1]^{k}\to\mathit{R}$ denote a nonzero square-integrable function
with support in
$R_{k}=\\{(x_{1},x_{2},\mathellipsis,x_{k})\in[0,1]^{k}:\sum_{i}{x_{i}}\leq
1.\\}$ we define

$I(F)=\int_{[0,1]^{k}}{F(t_{1},t_{2},\mathellipsis,t_{k})^{2}dt_{1}dt_{2}\mathellipsis
dt_{k}}$
$J(F)=\sum_{i=1}^{k}{\int_{[0,1]^{k-1}}{(\int_{[0,1]}{F(t_{1},t_{2},\mathellipsis,t_{k})dt_{i})^{2}}}dt_{1}\mathellipsis
dt_{i-1}dt_{i+1}\mathellipsis dt_{k}}$ $M_{k}=\sup_{F}\frac{J(F)}{I(F)}$

######  Theorem 3.17 (Main Theorem in Maynard (2015)).

For any $0<\theta<1$, if $EH[\theta]$ and $M_{k}>\frac{2m}{\theta}$, then
$DHL[k,m+1]$. Equivalently, let the primes have level of distribution
$\theta$. If $M_{k}>\frac{2m}{\theta}$, then there are infinitely many integer
$n$ such that at least $m+1$ of the $n+h_{i}$ are primes.

######  Remark 3.18.

As we would see in the following passage, the final result about small gaps is
based on Bombieri-Vinogradov Theorem that $\theta<\frac{1}{2}$
unconditionally.However, from the theorem above, we are able to see if we
assume Elliott-Halberstam conjecture ($\theta<1$), then we are able to see a
better result i.e. $\liminf_{n}{p_{n+1}-p_{n}}\leq 12$

So, having theorem above, our problem is to prove $M_{k}>\frac{2m}{\theta}$,
which is question about the lower bound of $M_{k}$.

###### Proof Sketches of Theorem 3.17.

Let

$F(t_{1},t_{2},\mathellipsis,t_{k})=\prod_{i=1}^{k}g(kt_{i})$

if $(t_{1},t_{2},\mathellipsis,t_{k})\in R_{k}$ and
$F(t_{1},t_{2},\mathellipsis,t_{k})=0$ otherwise for some function g.

If the center of mass of $g^{2}$ satisfy

$\mu=\frac{\int_{0}^{\infty}{tg(t)^{2}}dt}{\int_{0}^{\infty}{g(t)^{2}}dt}<1$

then by the concentration of measure we expect the restriction on support of
$F$ to be negligible.

If g is supported on $[0,T]$, we find that

$M_{k}\geq\frac{\int_{0}^{T}{tg(t)^{2}}dt}{\int_{0}^{T}{g(t)^{2}}dt}*\Bigg{(}1-\frac{T}{k(1-\frac{T}{k}-\mu)^{2}}\Bigg{)}$

For fixed $\mu$ and $T$, we optimize over all such $g$ by Calculus of
Variation. The optimal $g$ would be

$g(t)=\frac{1}{1+At}$

if $t\in[0,T]$

With the g above, we find that a suitable choice of $A$, $T$ gives

$M_{k}>\log\ k-2\log\log\ k-2$

if $k$ is large enough.

By Bombieri-Vinogradov Theorem, we can take any $\theta<\frac{1}{2}$
unconditional. With the theorem above and some effort, we are able to obtain

$\liminf_{n}{p_{n+m}-p_{n}}\leq Cm^{3}e^{4m}$

This complete the first part of theorem. When k is relatively small, we are
bale to use a different argument to bound $M_{k}$ involving symmetric
polynomials.

Let symmetric polynomial $P(t_{1},t_{2},\mathellipsis,t_{k})$ define as
following

$P(t_{1},t_{2},\mathellipsis,t_{k})=\sum_{a+2b\leq
d}{c_{a,b}(1-P_{1})^{a}{P_{2}}^{b}}$

where $P_{1}=\sum_{i}{t_{i}}$ and $P_{2}=\sum_{i}{t_{i}^{2}}$ i.e. symmetric
polynomial of degree at most $d$. Now let

$F=P(t_{1},t_{2},\mathellipsis,t_{k})$

if $(t_{1},t_{2},\mathellipsis,t_{k})\in R_{k}$ and $F=0$ otherwise. This form
of $F$ is relatively simple, so we are able to compute the integral we define
above, $I(F)$ and $J(F)$. It turn out that $\frac{J(F)}{I(F)}$ become a ratio
of quadratic forms. i.e. we are able to obtain

$M_{k}\geq\sup_{a\in\mathit{R}^{d}}{\frac{a^{T}A_{2}a}{a^{T}A_{1}a}}$

for positive definite symmetric rational matrices $A_{1},A_{2}$. From
optimization perspective, we are able to obtain that right hand side obtain
its maximal value when $a$ equal the largest eigenvalue of
${A_{1}}^{-1}A_{2}$.Thus, range over all symmetric polynomial of degree at
most $d$, we are able to obtain an efficient bound. For example, if $k=105$;
we have $M_{k}>4$ and if $k=5$, we have $M_{k}>2$.Note as a special case of
the theorem we state before, if $M_{k}>\frac{2}{\theta}$, then there are
infinitely many integer $n$ such that at least $2$ of the $n+h_{i}$ are
primes. Combined with Engelsma and Bombieri-Vinogradov Theorem, we are able to
conclude $\liminf_{n}{p_{n+1}-p_{n}}\leq 600$. ∎

##  4 Discussion

In this section, we would like to present some though for possible future
works.

  1. 1.

Notice in the beginning of discussion of small gaps between primes, we
consider the indicator function and pick $f(n)$ to satisfy

$\sum_{X<n<2X}{f(n)*\Bigg{(}\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}-1\Bigg{)}}>0$

which basically is a weighted sum. The things we really want to show is
$\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}-1>0$ for some n. The most natural way of
thinking would be improve our choice of $f(n)$ or our technical of estimating
sum. If fact, both of them can be quite difficult like Zhang (2014) and
Maynard (2015). However, in order to obtain $\sum_{i=1}^{k}{1_{n+h_{i}\
prime}}-1>0$, it is not necessary for us to use sum or weighted sum. Instead,
we can use following

consider

$\prod_{X<n<2X}{\Bigg{(}\sum_{i=1}^{k}{1_{n+h_{i}\
prime}}-\frac{3}{2}\Bigg{)}}$

Since $\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}$ are integer, subtract $\frac{1}{2}$
does not change the sign. Also, for the same reason, each term in the product
would not be zero. So, if we can prove the product are positive, there are two
cases to consider:

    1. (a)

if one of ${\sum_{i=1}^{k}{1_{n+h_{i}\ prime}}-\frac{3}{2}}>0$, then we are
done for the same reason we said before.

    2. (b)

if all of them are negative and due to our $X$, there are even number of
negative term. In this case, we can product over either $n\in[X,2X)$ or
$n\in(X,2X)$. there must be one them that only contain odd number of choice of
n. Thus, we do not need to consider this cases and suffice to show the
positivity of product.

More generally, as we did in the sum, we can add some ’weight’ $f(n)>0$ to the
product to make the calculation easier.

$\prod_{X<n<2X}{f(n)*\Bigg{(}\sum_{i=1}^{k}{1_{n+h_{i}\
prime}}-\frac{3}{2}\Bigg{)}}$

Moreover, there are nothing special about product or sum. Let F be a function
from $\mathbb{R}^{X}$ to $\mathbb{R}$ satisfying: if
$F(x_{1},x_{2},\mathellipsis x_{X})>0$, then $x_{i}>0$ for some $i\leq X$. For
such F consider

$F\Bigg{(}\sum_{i=1}^{k}{1_{X+1+h_{i}\
prime}}-1,\mathellipsis,\sum_{i=1}^{k}{1_{2X+h_{i}\ prime}}-1\Bigg{)}$

if we can show the expression is positive for some $F$ satisfying the
condition we require above, we are done. In this case, we have more
flexibility in choice of F since we input only one constrain to our function
$F$. As a special cases, weighted sum clearly satisfy the condition we impose
on $F$. Thus, weighted sum would be a special cases of $F$.

  2. 2.

In small gaps between primes, Zhang and Maynard focus on different aspects and
did the improvement independently. Zhang improves the result in arithmetic
progression, whereas Maynard modify GPY sieve. Zhang’s result allow us to have
a better bound for the estimation and Maynard’s method allows us to have a
more subtle and stronger results. Thus, is it possible that combine the two
results together with some necessary modification to have a better conclusion?
For example, using Maynard’s sieve, we somehow modify Zhang’s results in
Arithmetic Progression to have a better bound.

  3. 3.

In the studying of primes gaps, the question we are dealing with is about
$\limsup$ or $\liminf$, which basically are question asking infinite often.
However, this kind of question has been studied for a long time in Analysis or
Probability. Having this in mind, is it possible for us to model the
distribution or primes gaps for all primes, so that the results from
probability might give us some new way of thinking. Moreover, if we convert
problem in prime gaps to probability, we are able to use theorem like Borel-
Cantalli lemma, Strong/Weak Law of Large Number or Central Limit theorem. In
fact, in the proof of Erdos-Kac theorem we state in the beginning, Central
Limit theorem play an important role. The classic version of those probability
theorem above require the random variable to be iid. However, there indeed
some stronger version that only require independent, which are much easier to
obtain by only considering a sub-sequence if necessary. Since we are studying
infinite often question, prove the statement on subsequence would gives us the
result.

For example, we could set random variable to be the number of primes smaller
that $n$ or number of primes divide $n$. If we want to study $p_{n+m}-p_{n}$,
we consider the number of k in admissible set. We might set event

$A_{k}=\\{n+\\{h_{1},h_{2},\mathellipsis h_{k}\\}\ contain\ m\ primes\ for\
infinite\ many\ n\\}$

From construction of $A_{k}$ or Kolmogorov 0-1 law, we are able to see
$\mathbb{P}(A_{k})$ = 0 or 1. So we can sum up all $k\leq N$,

$\sum_{k\leq N}{\mathbb{P}(A_{k})}$

once we have a result of positive number, the $N$ would be the number we are
looking for.

  4. 4.

In probability, there are a noted inequality called Azuma’s inequality (See
Vershynin (2018) for example). It states that for random variable
$X_{1},X_{2},\mathellipsis X_{n}$ and function $f$, suppose
$\mathbb{E}(f(X_{1},\mathellipsis X_{n})$ exist and

$|f(X_{1},\mathellipsis X_{n})-f(X_{1},\mathellipsis,t_{i},\mathellipsis
X_{n})|\leq a_{i}$

for any $t_{i}$ take value in the range of random variable. Then we have

$\mathbb{P}(f(X_{1},\mathellipsis X_{n})-\mathbb{E}(f(X_{1},\mathellipsis
X_{n})\geq t)\leq e^{\frac{-t^{2}}{2\sum_{i}{a_{i}^{2}}}}$

One of the application of Azuma’s inequality is Erdo-Renyi graph. In Erdo-
Renyi graph, one considers graph $G(n,q)$ with n vertices and each pair of
vertices are represent by iid. Bernoulli(p), $e_{ij}$, where $e_{ij}=1$ if
edge $ij$ are connected in the graph and $e_{ij}=0$ otherwise. we send a
coloring to the graph $G(n,p)$ and the graph is called admissible if ’color of
i $\neq$ color of j if $e_{ij}=1$’. The question people interested in the
chromatic number of $G(n,p)$ denoted as $\chi(G(n,p))$. One important fact is
that the expectation of $\chi(G(n,p))$ is in the similar form as Prime Number
theorem. i.e.

$\mathbb{E}(\chi(G(n,p)))\sim\frac{n}{\log n}$

In probability, people are trying to improve the expectation above by
substitute the $\log n$ with expression like $\log\log n$ and etc. However,
all these have lots of similarity with primes gaps and in fact, we have
already lots of results looking like $\log\log n$. So, if we are able to find
some connection between chromatic number of Erdo-Renyi graph and primes gaps,
we are able to witness a new way of thinking. Even though, at this time, Erdo-
Renyi graph might not provide some stronger observation in prime gaps, like
what probability sometimes did to Analysis, the intuition and simpler cases
are very helpful and enlightening.

##  5 Symmetry Between Small and Large Gaps

In this section, we mainly discuss Maynard’s remarkable work which allow us to
talk about large prime gaps using progress on small prime gaps. This method is
quite different from the previous ones.

In $[1,X]$ for large X, we use $G(X)$ to denote the largest prime gaps
$p_{n+1}-p_{n}$ in $[1,X]$. We would like to deal with the problem that how
does $G(X)$ grow with respect to X. Finding large prime gaps are basically the
same thing as finding large consecutive string of composite numbers. Having
this in mind, I have following proposition:

Similar to small gaps between primes, by Prime Number Theorem and pigeon hole
principle, I have

######  Theorem 5.1.

$p_{n+1}-p_{n}\gg log(p_{n})\ i.o.$

######  Remark 5.2.

As we did in previous section, there is also an alternate proof of the
proposition above using primorial and eventually, it can be further
generalized.

###### Probabilistic proof of Theorem .

consider the primorial $P(n)$, we obtain

$P(n)+2,P(n)+3,\mathellipsis P(n)+n$

are consecutive string of composite numbers. Thus I conclude $p_{n+1}-p_{n}\gg
log\ p_{n}$ ∎

For interval $\\{2,3,\mathellipsis,n\\}$ we are able to cover all element by
residue class of all primes less than $n$. More specially, first we delete all
number that $0(mod\ 2)$, then delete all number that $0(mod\ 3)$ until all
number that $0(mod\ p)$. Generalizing the method above, for interval
$\\{a,a+1,\mathellipsis,b\\}$, suppose the interval can be covered by primes
of residue class

$c_{2}(mod\ 2),c_{3}(mod\ 3),\mathellipsis c_{p}(mod\ p)$

for $p\leq n$. Using Chinese Remainder theorem, we can find a $y$ such that

$y=-c_{2}(mod\ 2),y=-c_{3}(mod\ 3),\mathellipsis,y=-c_{p}(mod\ p).$

Then $y+\\{a,a+1,\mathellipsis,b\\}$ would a string of composite numbers. In
particular, every number is divisible by primes that are less than $n$.

Base on the same method as above, use prime $p\leq n$, we can cover

$\\{1,2,3,\mathellipsis,y\\}$

where $y=n*(\frac{\log n\log\log\log n}{\log n})$. In order to show this, we
have find some smart way to pick our $c_{i}$ residue class.

The essential ’truncation’ in the choice of $c_{i}$ is the number
$\frac{n}{2}$. Roughly speaking, for $p\leq\frac{n}{2}$, pick some congruence
class that cover all element except primes between $\frac{n}{2}$ and $y$. For
$p\geq\frac{n}{2}$, we try to cover remaining prime. Thus, the question turn
out to be given $\frac{n}{2}\leq p\leq n$, how to find $c_{p}(mod\ p)$ that
would cover at many as primes in $[1,y]$ as possible?

Originally, people focus on making a chain in the form of
$\\{c_{p},c_{p}+p,c_{p}+2p,\mathellipsis\\}$ to be all primes. However, in
order to solve this question, one do not really need all of them to be primes.
While Maynard works on small gaps between primes, he find a way to produce
many primes in $\\{n+h_{1},n+h_{2},\mathellipsis,n+h_{k}\\}$. Thus, the
question above become a special case of the result in small gaps. This would
finally be able to prove the our claim.

## References

  * Bombieri (1987) Bombieri, E. (1987).  The great sieve in analytic number theory: Second revised and expanded edition .
  * Castryck et al. (2014) Castryck, W., Fouvry, É., Harcos, G., Kowalski, E., Michel, P., Nelson, P., Paldi, E., Pintz, J., Sutherland, A., Tao, T. et al. (2014).  New equidistribution estimates of zhang type.  Algebra & Number Theory 8 2067–2199.
  * Chen (1973) Chen, J. (1973).  On the representation of a larger even integer as the sum of a prime and the product of at most two primes.
  * Erdös and Kac (1940) Erdös, P. and Kac, M. (1940).  The gaussian law of errors in the theory of additive number theoretic functions.  American Journal of Mathematics 62 738–742.
  * Fouvry and Iwaniec (1980) Fouvry, E. and Iwaniec, H. (1980).  On a theorem of bombieri–vinogradov type.  Mathematika 27 135–152.
  * Goldston et al. (2009) Goldston, D. A., Pintz, J. and Yildirim, C. Y. (2009).  Primes in tuples i.  Annals of Mathematics 819–862.
  * Granville (2015) Granville, A. (2015).  Primes in intervals of bounded length.  Bulletin of the American Mathematical Society 52 171–222.
  * Maynard (2015) Maynard, J. (2015).  Small gaps between primes.  Annals of mathematics 383–413.
  * Panchenko (2018) Panchenko, D. (2018).  Introduction to Probability Theory.  Dmitriy Panchenko.
URL https://books.google.com/books?id=MNG4wgEACAAJ

  * Polymath (2012) Polymath, D. (2012).  A new proof of the density hales-jewett theorem.  Annals of Mathematics 1283–1327.
  * Polymath (2014a) Polymath, D. (2014a).  The” bounded gaps between primes” polymath project-a retrospective.  arXiv preprint arXiv:1409.8361 .
  * Polymath (2014b) Polymath, D. (2014b).  Variants of the selberg sieve, and bounded intervals containing many primes.  Research in the Mathematical sciences 1 1–83.
  * Tenenbaum (2015) Tenenbaum, G. (2015).  Introduction to analytic and probabilistic number theory, vol. 163.  American Mathematical Soc.
  * Vershynin (2018) Vershynin, R. (2018).  High-dimensional probability: An introduction with applications in data science, vol. 47.  Cambridge university press.
  * Zhang (2009) Zhang, S. (2009).  Notes on dickson’s conjecture.  arXiv preprint arXiv:0906.3850 .
  * Zhang (2014) Zhang, Y. (2014).  Bounded gaps between primes.  Annals of Mathematics 1121–1174.