Abstract
The physics of ferroelectric domain walls is explored using the Bayesian inference analysis of atomically resolved STEM data. We demonstrate that domain wall profile shapes are ultimately sensitive to the nature of the order parameter in the material, including the functional form of GinzburgLandauDevonshire expansion, and numerical value of the corresponding parameters. The preexisting materials knowledge naturally folds in the Bayesian framework in the form of prior distributions, with the different order parameters forming competing (or hierarchical) models. Here, we explore the physics of the ferroelectric domain walls in BiFeO_{3} using this method, and derive the posterior estimates of relevant parameters. More generally, this inference approach both allows learning materials physics from experimental data with associated uncertainty quantification, and establishing guidelines for instrumental development answering questions on what resolution and information limits are necessary for reliable observation of specific physical mechanisms of interest.
Introduction
Unique phenomena emerging at ferroelectric domain walls^{1,2,3,4,5,6,7} have attracted the attention of researchers for many decades. Since the early days of ferroelectricity, it was recognized that the minimization of electrostatic energy of depolarization fields necessitates formation of ferroelectric domains, with the domain walls containing excess free energy compared to the bulk phase^{8,9,10,11,12}. For several decades, the attention of the condensed matter physics and materials sciences communities alike was focused preponderantly on the domain properties and dynamics, whereas the walls were essentially treated as 2D objects. Correspondingly, even though remarkably advanced GinzburgLandau theory based theoretical models of wall structures were available as early as the late 1950s^{13,14}, these theories were experimentally unverifiable beyond macroscopic thermodynamic descriptors due to the lack of the highresolution imaging tools capable of probing wall structures on the nanometer and atomic levels.
This situation has changed drastically in the last fifteen years, in which the improvements in characterization tools made such studies possible and the interest of physics community shifted to the intrinsic physics and applications of the ferroelectric domain walls. After the discovery of enhanced local conductivity at ferroelectric domain walls^{1}, tunable electronic properties have been demonstrated^{4,15} and given rise to continuous research efforts towards domain wall electronics^{2,3,4,7,15,16}. In conjunction with these experimental advances, a number of groups have theoretically explored the physics of the ferroic domain walls using the mesoscopic^{17,18,19} and DFT models^{20,21,22,23}, and have demonstrated that suppression of the primary order parameter at the wall core can give rise to additional magnetic or polar functionalities^{5,24,25,26,27}. The internal wall structure and hence conductivity are further strongly affected by the presence of flexoelectric interactions^{28,29}, and can thus be used to establish the strength of the latter^{30}. In addition to purely physical functionalities, the domain walls were also shown to interact with the chemical subsystem in materials^{31}, giving rise to phenomena ranging from ferroelectric aging to vacancy segregation. While many of these theoretical advances suggest potential emergent physics at domain walls, experimental verification often remains a challenge even for atomicscale, realspace imaging tools like (Scanning) Transmission Electron Microscopy (STEM).
Indeed, the equilibrium domain walls in proper ferroelectrics are usually very narrow, of the order of the atomic lattice parameter. Thus, STEM characterization of their internal structure has been enabled in the last decade by the introduction and proliferation of atomicresolution spherical aberration corrected microscopes, allowing direct observations of the ferroelectric domain wall (and other interfaces) on the atomic level^{32,33,34,35,36,37,38,39,40,41,42}. Quantitative information on the wall structure has been compared to Ginzburg–Landau–Devonshire (GLD) based models to yield materials parameters^{40,43,44,45}, and to validate DFT calculations^{21}. However, despite the advance in imaging capabilities, the amount of materialspecific information remains highly limited. Indeed, from early works of Ivanchik and Zhirnov it has been known that the order parameter profile across the domain wall is determined by the type of ferroelectric (second or first order), polarization behavior at the wall (Bloch, Ising, or Néel), and presence of the secondary order parameters or flexoelectric interactions^{46,47}. Yet, while this information can theoretically be extracted from the wall profile, the experimental manifestation in the atomic structure can be subtle against instrumental noise or artifacts, is discretized at the level of atom positions, and is viewed in projection, precluding information from the 3rd spatial dimension (e.g., observation of Bloch character). This raises the statistical question of certainty in comparing multiple models to STEM profiles, or conversely, an estimation of the level of spatial resolution/information limit of the imaging system required to distinguish separate models.
Bayesian inference provides the probability of a model/hypothesis given a set of experimental observations, a powerful statistical technique rising in popularity with corresponding computational and statistical tools (we refer interested readers to more comprehensive texts such as refs. ^{48,49,50}). Here we develop this Bayesian inference framework for the analysis of material physics from structural imaging data. We demonstrate its application to the exploration of domain wall physics in the prototypical ferroelectric BiFeO_{3} deriving the posterior probabilities for three GLD domain wall models from atomic resolution STEM experimental observations. Predicted domain wall shapes are dependent on parameters of the underpinning Landau theory. Under the assumptions of the validity of the theory, this then suggests that the domain wall profiles observed allow inversion to yield the parameters of the underlying Landau model, and thus, infer the order of the phase transition. We incorporate the effects of imaging noise and lattice discretization, and demonstrate how these can affect inferred materials properties. The required resolution limits to explore progressively fine details of domain wall physics are established, providing an answer to questions such as “how good of a microscope is necessary to address specific aspects of physics in a given materials system”.
Results
As the first step in this analysis, we discuss the relationship between the physics of the ferroelectric material and the order parameter profile across the domain wall. For multiferroic materials with the general form of the longrange order parameters, the wall profiles can be found using the classical LGD approach. Two vector longrange order parameters, polarization components P_{i} and oxygen octahedral tilts Φ_{i}, were used for the description of the antiferrodistortive (AFD), ferroelectric (FE), and antiferroelectric (AFE) longrange orders in the rareearth doped R_{x}Bi_{1−x} FeO_{3}, where R = Sm, La, Pr, Eu, etc.^{27,51,52,53}. For completeness, we also add the antiferroelectric (AFE) longrange orders to the description. The bulk part of LGD thermodynamic potential consists of several contributions, which are listed in Supplementary Methods of Supplementary Information. For further explanations, we list only the compact form of the FE and AFE contributions as:
where the FE and AFE order parameters, \(P_i = \frac{1}{2}\left( {P_i^a + P_i^b} \right)\)and \(A_i = \frac{1}{2}\left( {P_i^a  P_i^b} \right)\), are introduced, \(P_i^a\) and \(P_i^b\) are the polarization components of two equivalent sublattices “a” and “b”^{54,55,56}. As usual for proper and incipient ferroelectrics, the coefficients a_{k} are temperature dependent and obey the linear law, a_{k}(T) = α_{T}[T–T_{C}], where T_{C} is the Curie temperature, and T is the absolute temperature; negative a_{k}(T) supports FE or AFE state. The sign and value of \(\gamma _{ij}^{ab}\)determines the AFE and FE phases coexistence.
For a general case of domain structured or spatially modulated system, one should solve the coupled Euler–Lagrange (EL) equations of states, which are expressed via the variational derivatives of the functional (1), \(\frac{{\delta G}}{{\delta P_i}} = E_i\), \(\frac{{\delta G}}{{\delta A_i}} = 0\). External and depolarization fields, \(E_i^{{\mathrm{ext}}}\) and \(E_i^d\), which contribute to the electric field, \(E_i = E_i^{{\mathrm{ext}}}\)+\(E_i^d\), can be found from the electrostatic equation for electric displacement D, div D = 0, with boundary conditions at the surfaces, interfaces and/or electrodes. Elastic fields, which are, in fact, the secondary order parameters, satisfy equation of state and mechanical equilibrium equations, whereas the strains and/or stresses should be defined at the system boundaries.
As a rule, the biquadratic coupling to the polar subsystem is small, and depolarization field is absent for uncharged walls. In this case, it is possible to reduce the nonlocal free energies to the decoupled system of equations for the order parameters:
where \(g_{ijkl}^P = g_{ijkl}^{aa} + g_{ijkl}^{ab}\) and \(g_{ijkl}^A = g_{ijkl}^{aa}  g_{ijkl}^{ab}\) Since “aa” constants are for nextnearest neighbors sublattices, while “ab” constants are for the nearest neighbors sublattices, one can assume that, \(\left {g_{ijkl}^{aa}} \right \ll \left {g_{ijkl}^{ab}} \right\), and so \(g_{ijkl}^P \approx g_{ijkl}^{ab}\) and \(g_{ijkl}^A \approx  g_{ijkl}^{ab}\). Here, we derive analytical solutions for Eq. (1) for several specific cases as described below.
Model 1. For the ferroelectrics with the second order phase transition the order parameter P across the uncharged domain wall can be found in the one component and onedimensional approximations. Namely:
where \(P_S^2 =  a_1/a_{11}\) is the spontaneous polarization, x_{3}–x_{0} is the distance from center of the domain wall plane, and \(L_c = 2\sqrt {g_{44}/\left( {a_1 + 3a_{11}P_S^2} \right)}\) is the correlation length^{57}. Eq. (3a) is valid at a_{1 }< 0, a_{11 }> 0, a_{111 }= 0 [see Fig. 1a, d].
Model 2. For the ferroelectrics with the first order phase transition, the order parameter profile is more complex:
where \(P_S^2 = \left( {\sqrt {a_{11}^2  4a_1a_{111}}  a_{11}} \right)/2a_{111}\) and dimensionless parameter \(\eta = 2a_{111}P_S^2/\left( {3a_{11} + 4a_{111}P_S^2} \right)\) is positive and its increase indicates the deviation from tanhlike profile (Eq. 3a). The correlation length is \(L_c = 2\sqrt {g_{44}/\left( {a_1 + 3a_{11}P_S^2 + 5a_{111}P_S^4} \right)}\). Eq. (3b) is valid at \(a_1 \,< \,0,a_{111} \,> \,0\) and arbitrary sign of a_{11}. Exact Eq. (3b) describe 180° Isingtype uncharged domain wall in uniaxial and multiaxial ferroelectrics [see Fig. 1b, e].
Model 3. For the ferroelectrics with the second order phase transition in the presence of possible polarization rotation, Pprofile can be found for the specific case, a_{12 }= 6a_{11}^{46}, and the solution is the superposition of two tanhprofiles:
where \(P_S^2 =  a_1/\left( {2a_{11}} \right)\) is the spontaneous polarization (a_{1 }< 0, x_{3}–x_{0} is the distance from center of the domain wall plane \(x_0 = \frac{{x_a + x_b}}{2}\), the correlation length is \(L_c = \sqrt {  g_{44}/\left( {2a_1} \right)}\), and R_{0 }= x_{b}–x_{a} is an arbitrary constant. Exact expressions (4) describe rotational Ising–Blochtype uncharged domain wall with Landau free energy density \(g_{LGD} = \frac{{a_1}}{2}\left( {P_1^2 + P_2^2} \right) + \frac{{a_{11}}}{4}\left( {P_1^4 + P_2^4} \right) + \frac{{a_{12}}}{2}P_1^2P_2^2 + \frac{{g_{ijkl}}}{2}\frac{{\partial P_i}}{{\partial x_j}}\frac{{\partial P_k}}{{\partial x_l}}\). [see Fig. 1c, f].
The ranges of the possible values for the 4 parameters in Eqs. (3–4) are P_{S }= (0.1−1) C/m^{2}, L_{c }= (0.5–5) nm, η = (0–100), and R_{0}/L_{c }= (0–10). Experimentally, an additional variable is the wall position, x_{0}. Note that within the LGD approach, the “true” independent parameters are the coefficients in the GLD expansion, a_{1}, a_{11}, a_{111}, and g_{44}. However, for the analysis of the experimental data we treat the phenomenological wall parameters as independent.
Note that similar analysis can be performed for more complex physical mechanisms, albeit in these cases the numerical solutions are generally required. Further note that Model 1, Eq. (3a) is a special case of Model 2, Eq. (3b) for η = 0, as well as of Model 3, Eqs. (4) at R_{0 }= 0, as it can be expected from the physics of the problem. At the same time, Models 2 and 3 are alternative models, corresponding to the dissimilar physics of the material.
While the solutions (Eqs. 3–4) are limited for specific numerical values of free energy expansion, finite element analysis (FEM) confirms that a direct variational method with slightly more complex trial functions can be used to describe the rotation domain wall at a_{12 }≠ 6a_{11}:
where P_{a,b,c}, x_{a,b,c}, a, b, c, and μ are variational parameters.
These analyses set the context for the problem of physics determination from experimental data. Namely, the question we seek to answer is in which cases the more complex behaviors defined by Model 2, Eq. (3b), can be reliably differentiated from the simplest behavior of Model 1, Eq. (3a), thus differentiating materials with first and second order phase transitions. Similarly, how well can Models 1, 2, and 3, or the more complex models in Eq. (5), be separated given the noise level of the measurement system and the discretization in measurements induced by the underlying lattice. How can prior knowledge of the material system be used to narrow down the answers? And finally, given the possible range of materials properties, can we establish the requirements on microscope resolution/information limit required for these to be determinable?
The answers for these questions can be naturally explored in the context of Bayesian inference. Bayes formula relates the prior and posterior probabilities as
where D represents the experimental data, p(Dθ_{i}) is the likelihood of the data given the model, i, with model parameters, θ_{i}, and p(θ_{i}) is the prior, i.e., probability of the model. Finally, p(D) is the denominator that defines the total possible outcomes.
Despite the long history of Bayesian theory, its adoption by the basic science fields has been slow. Part of the reason is that only a few special distribution classes allow analytical solutions of Eq. (6), whereas many realistic model classes require numerical methods and extremely cumbersome integrations. Secondly, the classical argument against a Bayesian approach is the need for the prior distributions, and dependence of the answers on the priors. Here we note that while problemic in medicine, sociology, or economics, in physical areas domain knowledge is often sufficiently developed to provide meaningful priors, as explored below. The main point to note here is that in Bayesian inference we are aiming to compute the posterior distributions of the parameters of some model, conditioned on data, which is usually done with an appropriate sampling method such as the Metropolis algorithm. This allows one to numerically estimate the posterior in (Eq. 6) for all model parameters. Note that the variance in the data can itself be modeled by a parameter, as noted below.
Here, we formulate a Bayesian regression models based on Models 1, 2, and 3. We note that STEM data does not provide an absolute calibration for polarization magnitude and the wall position is a priori unknown. Correspondingly, we chose weakly informative priors for these parameters. Similarly, for a second order ferroelectric described by Eq. (3a), the correlation length, L_{c}, is the sole parameter defining wall structure, and hence the corresponding prior can also be weak. For a first order ferroelectric described by Eq. (3b), the correlation length, L_{c}, and η are parameters to be inferred. Note that model (3a) is the special case of (3b) for η = 0, and hence the target of Bayesian analysis is to establish whether η is practically equivalent to zero (and hence the material is second order), or nonzero, and hence the material is first order. Finally, model Eq. (4a) has a different functional form than Eq. (3b), and hence determination of the parameters L_{c}, R_{0} and separation of models 2 and 3 is the task for Bayesian inference.
The behavior of the posterior distributions was extensively explored using synthetic data made via apriori known models (see Python notebook Supplementary Data 1) as a function of parameter values, noise level, and digitization step. It was established that for very thin domain walls with the thickness comparable with the lattice spacing, the lattice discretization becomes the most limiting factor in the analysis. Correspondingly, the inference allows only to distinguish the main features of the observed physical behaviors. Hence here as priors, we choose weakly informative priors for all associated parameters, as shown in Table 1.
Domain walls in the rhombohedral properferroelectric archetype BiFeO_{3} were taken as the model system for this analysis. A pseudocubic (pc) perovskite, BiFeO_{3} adopts spontaneous polarization spatially degenerate along the eight <111>_{pc} directions with three possible rotation angles between adjacent domains: 71°, 109°, and 180°. A BiFeO_{3} thin film was grown on a SrTiO_{3} substrate by pulsed laser deposition, the electrostatic energy from the insulating substrate interface promoting polydomain formation. A cross section of the film was imaged along the <100>_{pc} direction by highangle annular dark field (HAADF) STEM, producing a massthickness sensitive picture of the atomic columns (Fig. 2a). This does not provide a direct measure of electric polarization, however BiFeO_{3} exhibits a strong lattice coupling in the form of noncentrosymmetric Bisite displacements, which can be used as a proxy, and we hereafter refer to them with the same P notation. This cation polar displacement was calculated for the 4atom nearest neighbors after a 2orthogonal image scanartifact reconstruction^{58} and Gaussian fitting. A colorized vector map of this polar displacement is shown in Fig. 2b, clearly illustrating the polydomain structure of the film. In this case, typical equilibrium 109° and 180° domain walls are found forming on the [100]_{pc} and \([\bar 101]\)_{pc} planes, respectively. Subregions indicated by the white boxes are used as the input experimental data for Bayesian network analysis.
A magnified view of the 109° domain wall from the region of interest (ROI) in Fig. 2b is shown in Fig. 2c, d, the boundary dictated by kinks in the domain wall. The change in the [010]_{pc} component is not visible as it is along the viewing direction, leaving a project 90° rotation corresponding to a transition in the [001]_{pc} component as seen in the overlaid vector field in Fig. 2d. A lattice coordinate space is utilized for subsequent analysis, defining the normal distance from the domain wall in lattice parameter units. The polarization components are defined in reference to the domain wall plane, the perpendicular (P[100]_{pc}) and parallel (P[001]_{pc}) axes for the 109° domain wall. A latticecoordinate spatial plot of these two components (Fig. 2e, f) and view of their profile data (Fig. 2g, h) illustrate the polarization transition occurring parallel to the plane. This component is used as the input for the Bayesian network analysis.
The model parameters for the 109° domain wall are shown in Fig. 3. The 90% highest posterior density interval is illustrated in the vicinity of the domain wall for all three models, overlaying mean values of the experimental data for each unit lattice distance, Fig. 3a. A least squares fit curve is also shown along with corresponding fit parameters. However, the power of the Bayesian analysis over a minimum value optimization is the probability information it provides. The posterior probabilities for the wall position and saturation polarization show near Gaussian distributions, allowing localized wall position and the bulk polarization, and an estimate of their associated errors. The use of strongly informative priors, e.g., constraining polarization to almost constant values, leads to the nearly uniform posterior densities and hence was avoided here. The posterior distributions for L_{c} and η show considerably more interesting behavior. The distribution for the L_{c} is skewed towards large values, with the 3–97% Probability Density Function (PDF) being in the range (0.35–1.21). The corresponding η distribution has the PDF range (0.0–15.0), with the clear maximum at L_{c}~0.5.
Further insight into the wall behavior can be inferred from the selected pairwise joint probability distributions as shown in Fig. 3b–d. Here, for most parameters the pairwise distributions are clearly marginalizable, i.e., the joint probability distribution can be well approximated as a product of the marginal distributions for individual parameters. This behavior implies that the variables are statistically independent, and the knowledge of one variable does not improve understanding of the other one. This behavior is clearly shown for wall position and polarization, P_{s}–x_{0}, pair. Similarly, P_{s}–L_{c} and x_{0}–η are close to marginalizable.
At the same time, the posterior distribution for the L_{c} and η shows very different behavior. The joint distribution is not marginalizable and shows strong parameter dependence. This implies that the knowledge of one of the parameters can significantly affect the amount of information we learn about the other one. As an example, the fit with the narrow parameter for L_{c} in the (0.9–1.1) interval is compared to the elements in Fig. 3b–f in the Supplementary Fig. 1. Other combinations of the model parameters can be explored using the notebook provided as Supplementary Data 1.
This analysis clearly illustrates the natural way in which the Bayesian inference allows to explore the available data given the past knowledge of the physics of the system. We have further performed the analysis for the third model Eq. (4a) and associated parameters and distribution functions are provided in the Supplementary Data 1.
To compare the models, we apply the widely applicable information criteria (WAIC)^{59}. Most model selection criteria are based on two terms: one term that describes how well the model fits to the observed data, and a second term that penalizes models with greater degrees of freedom. As such, the WAIC is equal to (LL–p_{WAIC}), where
where LL is the log likelihood, which is calculated by drawing S samples from the posteriors of the parameters of a model, and the second term represents the effective number of parameters of the model, which is calculated by summing the variance of the loglikelihood. This is done for each model to compute the WAIC, and then the weights are calculated using a pseudoBayesian model averaging approach with AICtype weighting^{60}. The WAIC scores for the models are shown in Table 2. Based on the Bayesian analysis Model 1, the secondorder ferroelectric, is the most likely. However, the relative probabilities of all three models are very close and demonstrate that given the observations for weakly informative priors the models cannot be distinguished. We argue (and confirm later) that this indistinguishability of the models in this case is due to the small domain width (compared to lattice spacing), which precludes the subtle differences in domain wall structure between models from being reliably identified.
We repeat this analysis for the case of the 180° domain wall ROI in Fig. 2a, the experimental data shown in Fig. 4. The 180° domain wall corresponds to a reversal of the polarization along the same axis, also appearing as a 180° transition in [010]_{pc} projection, albeit the P[010]_{pc} component is again not being observed. The polar displacement is again broken into perpendicular and parallel components. For the \([\bar 101]\)_{pc} domain wall, this corresponds to \([\bar 101]\)_{pc} and [101]_{pc}, respectively, and the latter is used as the input to the Bayesian analysis. There is an observable asymmetry with P not centered around zero, a known artifact of small offaxis mistilts which manifests in a similar polar cation asymmetry^{61}. Since we are concerned with the polarization delta of the domain wall, this component is treated with a fixed offset term, P_{0}, added to the fitting function.
The model parameters for the 180° domain wall are shown in Fig. 5. The 90% highest posterior density interval for the three models and least squares fits (Fig. 1a) are, like the 109° case, very similar, with Models 2 and 3 adopting parameters that approach Model 1, the secondorder ferroelectric Eq. 3a. WAIC scores for the three models again also suggest Model 1 is most likely (Table 2). Selected pairwise joint probability distributions from Model 2 are shown in Fig. 5bg with results similar to the 109° case, albeit with an additional P_{0} parameter. P_{0}–P_{S} (Fig. 5b), x_{0}–P_{S} (Fig. 5c), and η–x_{0} (Fig. 5f) are clearly marginalizable, whereas L_{c}–P_{S} (Fig. 5d), and P_{0}–x_{0} (Fig. 5e) are somewhat close, and η–L_{c} (Fig. 5g) is not. Although parameter correlations may not be linear, and clearly aren’t in cases such as η–L_{c}, Pearson correlation coefficients are helpful to highlight this distinction, with P_{0}–P_{S} (0.11), x_{0}–P_{S} (−0.04), η–x_{0} (0.14), L_{c}–P_{S} (0.20), P_{0}–x_{0} (−0.27), and η–L_{c} (−0.80).
The analysis above illustrates the determination of the physically relevant parameters of the material given the experimental observations as STEM atomic coordinates, and past knowledge in the form of the Bayesian priors on relevant materials parameters. As expected for ferroelectric materials with the extremely narrow domain walls, ultimately this consideration becomes the limiting factor in these studies. In other words, while domain wall shape is a measure of the physics of the order parameter in the system, practically the STEM observations are limited by the discreteness of the lattice and the noise in the system.
To explore the effect of the noise and sampling on the differentiability of specific physical behaviors from the observational data, we perform a range of numerical experiments on synthetic data. Here, the synthetic data set is generated using Model 2, Eq. (3b), for a first order ferroelectric with a specific set of ground truth parameters, chosen here to be (P_{s}, L_{c}, η) = (0.5, 2.0, 2.0). Varied parameters are noise level, chosen to be Gaussian with the dispersion σ, and number of sampling points in the interval, N, with the x varying from −15 to 15. Correspondingly, the pixel spacing 30/N provides the measure of the discreteness of the measurements, and should be compared to the domain wall width, controlled by L_{c} and η. The center position of the wall is chosen always at x_{0} = 0 and there is no offset P_{0}. The generated synthetic data set is fit by the Bayesian model corresponding to Model 1, Eq. (3a), and Model 2, Eq. (3b), for a range of N and σ values. The point estimates of the recovered domain wall parameters \(\hat P_s\), \(\hat L_c\), \(\hat \eta\), and \(\hat \sigma\) are determined and can be compared with the ground truth values. Similarly, the WAIC score for the Models 1 and 2 can be determined.
Shown in Fig. 6 is the simulated domain wall profile for N = 40 and noise level σ = 0.001, 0.03, and 0.1. Weight values from comparison of WAIC scores from Models 1 and 2 as a function of noise level are shown in Fig. 6b. Here, 0 corresponds to identification of the correct Model (#2) of the generated data. The correct physical model can be determined from data only for noise levels below ~0.02. For higher noise values the weight centers round 50% (chance), and the model cannot be established from experiment alone. However, as shown in Supplementary Fig. 1, if the model and its parameters are partially known, they can be used as physicsbased prior to determine materials properties more precisely.
The corresponding inferred parameters are shown in Fig. 6c–e. Here, in all cases the inferred noise level \(\hat \sigma\) is very close to the ground truth level, σ. The point estimates of the domain wall parameters \(\widehat P_s\), \(\hat L_c\), \(\hat \eta\) coincide with the ground truth values for small noises, and start to deviate for large noise level (above ~0.01–0.02). For parameters \(\widehat P_s\) and \(\hat x_0\) (reconstructed wall position), the uncertainty grows ~linearly with the noise, as can be expected from the functional form of the model. For parameters \(\hat L_c\) and \(\hat \eta\) the dependence is more complicated, and particularly for \(\hat L_c\) the inferred value is centered at the ground truth value and is weakly affected by noise.
Finally, we explore the combined effect of the sampling and the noise level on the separability of the physical models given experimental data and only weak physicsbased priors. In this approach, we aim to answer the fundamental questions as to what level of microscope resolution/information limit is required to reliably determine the generative physics model from the data. Note that the issue of the information limit in the measured atomic positions and its relationship to microscope parameters is not explored here and we refer to other publications where these studies are performed^{62,63,64}. Here, we seek to explore only the question as to which extent the correct (here, a priori known) physical model can be determined from experimental data given the sampling induced by lattice, and to which extent uncertainty in atomic positions (here, noise) affect this inference. However, we do not address the origin and mitigation strategies for the uncertainties for atomic positions,
To explore this issue, we introduce the ground truth model corresponding to Model 2 with (P_{s}, L_{c}, η) = (0.5, 2.0, 2.0). We further create the calculated profiles at different samplings and noise levels. Bayesian inference is used to calculate the WAIC for Models 1 and 2. Where the WAIC comparison weight is close to 0, the models can be reliably separated, i.e., the physics of material can be established from the data. Where the value is 0.5 or larger the correct model cannot be determined from the data. The modeling results are shown in Fig. 7, where for convenience the units for pixel spacing are chosen to be comparable to domain wall width, i.e., 30/(N L_{c}). Figure 7a clearly illustrates that models can be distinguished as long as pixel size is comparable to the wall width, with the threshold value ~1.9. At the same time, for the noise levels above 0.02 the model cannot be established. This threshold seems to be only weakly dependent on the pixel size.
We further explore the effect of prior physical knowledge on physics extraction. Figure 7b, c illustrates the effect of transition from weak to strong physical priors, where distributions of possible parameter values are much better defined. During the inference, such strong priors tend to produce uniform posteriors or posteriors sharply concentrated on the boundary or interval, as opposed to the Gaussianlike posteriors for weak priors. Note that the effect of strong prior can be roughly compared to the threefold reduction in the noise level (compare Fig. 7a, c). Notably, the absolute knowledge of priors (Fig. 7c) does not considerably improve analysis compared to strong priors (Fig. 7b). However, incorrect priors, Fig. 7d, has strongly deleterious effect on analysis, effectively precluding model inference for all but extremely highquality data. Overall, the additional physical knowledge can provide significant improvement in the analysis. However, incorrect knowledge provides a much stronger effect, calling for care with analysis.
Discussion
To summarize, the physics of ferroelectric domain walls in BFO is explored via Bayesian inference analysis of atomically resolved STEM data. This approach allows for determination of materials parameters in the form of a relevant posterior distribution, based on prior materials knowledge in the form of prior distributions and available experimental data. The Bayesian inference can further be extended to analyze the likelihood of alternative models for materials physics. Here, we show that for noninformative or weakly informative priors (equivalent to classical point estimates in leastsquare fits) we can establish the model parameters and their posterior distributions, as well as attempt to distinguish the models. For the specific case of 109° and 180° domain walls in BiFeO_{3}, the combination of sampling and noise preclude a reliable differentiation of physical mechanisms. However, incorporation of materials knowledge in the form of prior distributions of parameters can significantly narrow posterior distributions and allow for differentiation of generative mechanisms.
As a future perspective, we note that rather than using analytical models, Bayesian inference can be based on numerical solvers or even atomistic methods. However, this approach will considerably increase computational complexity, and may require approximate models based on Gaussian Processing^{48,50} or deep learningbased interpolators. Similarly, this approach can be applied to other physical models, including those with more complex order parameters, in the presence of electronic or ionic screening. This includes nonequilibrium cases, e.g., strain during preparation or heating profile, as long as the numerical schemes for forward modeling are available.
More generally, Bayesian methods allow for a natural framework to distinguish possible physical mechanisms in observations, and allows us to very clearly ascertain to what extent we learn more from knowledge of the microscope and materials. This analysis clearly illustrates that additional physics or knowledge leads to the increase of the value of physical experiment. However, incorrect knowledge can strongly obviate any potential information gain. Taken over the multiple domains, it provides clear and quantifiable stimulus towards development of highresolution microscopies and high information content probes such as fourdimensional (4D) STEM, and allows exploring costbenefit considerations in the microscope development.
Methods
FE domain wall models are based on the Ginzburg–Landau–Devonshire (LGD) approach, detailed in Supplementary Methods of Supplementary Information
The Bayesian inference is implemented via the PyMC3 library in Python^{59}. Weakly informative priors were chosen consisting of uniform distributions for wall position, polarization, and correlation length and halfnormal distributions for η and data variance. The Metropolis MonteCarlo algorithm was used with 5 k tuning steps, 50 k computational steps, and 16 chains. The total computation time on Google Colab is ~12 min. The joint posterior probability densities are visualized using Arviz library. Select posterior densities are shown in Figs. 3, 5, and Supplementary Fig. 1. The analysis presented in this work, posterior densities, Markov–Chain Monte–Carlo traces, and plotting methods are available in the accompanied Python notebook Supplementary Data 1.
Epitaxial BiFeO_{3} thin films were synthesized on (001) SrTiO_{3} substrates by Pulsed Laser Deposition at a laser fluence of ~0.8 J/cm^{2}, growth temperature of 600 °C, and deposition pressure of ~100 mTorr from Oxygen flow after a base pressure of ~2 × 10^{−8 }Torr.
The STEM sample was fabricated by a Focused Ion Beam crosssectional liftout and subsequent Argon ion milling in a Fischione NanoMill with a final energy of 0.5 keV. STEM was performed on a NION UltraSTEM operating at 200 keV, the data utilized here corresponding to the HighAngle Annular Dark Field (HAADF) detector. Cation polar displacements were calculated for the 4atom nearest neighbors after a 2orthogonal image scanartifact reconstruction^{58} and Gaussian atomfitting.
Data availability
The supporting data is publicly available in a Zenodo repository with identifier https://doi.org/10.5281/zenodo.4122471.
Code availability
Analysis code for this work is available in a Python notebook as Supplementary Data 1.
References
 1.
Seidel, J. et al. Conduction at domain walls in oxide multiferroics. Nat. Mater. 8, 229–234 (2009).
 2.
Guyonnet, J., Gaponenko, I., Gariglio, S. & Paruch, P. Conduction at domain walls in insulating Pb(Zr0.2ti0.8)O3 thin films. Adv. Mater. 23, 5377–5382 (2011).
 3.
Sluka, T., Tagantsev, A. K., Bednyakov, P. & Setter, N. Freeelectron gas at charged domain walls in insulating Batio3. Nat. Commun. 4, 1808 (2013).
 4.
Maksymovych, P. et al. Tunable metallic conductance in ferroelectric nanodomains. Nano Lett. 12, 209–213 (2012).
 5.
Daraktchiev, M., Catalan, G. & Scott, J. F. Landau theory of domain wall magnetoelectricity. Phys. Rev. B 81, 224118 (2010).
 6.
Yang, S. Y. et al. Abovebandgap voltages from ferroelectric photovoltaic devices. Nat. Nanotechnol. 5, 143–147 (2010).
 7.
Farokhipoor, S. & Noheda, B. Conduction through 71 degrees domainwalls in Bifeo(3) thin films. Phys. Rev. Lett. 107, 229–234 (2011).
 8.
Tagantsev, A. K., Cross, L. E. & Fousek, J. Domains in Ferroic Crystals and Thin Films. (Springer, 2010).
 9.
Setter, N. et al. Ferroelectric thin films: review of materials, properties, and applications. J. Appl. Phys. 100, 051606 (2006).
 10.
Damjanovic, D. Ferroelectric, dielectric and piezoelectric properties of ferroelectric thin films and ceramics. Rep. Prog. Phys. 61, 1267–1324 (1998).
 11.
Damjanovic, D. Stress and frequency dependence of the direct piezoelectric effect in ferroelectric ceramics. J. Appl. Phys. 82, 1788–1797 (1997).
 12.
Miller, S. L. & McWhorter, P. J. Physics of the ferroelectric nonvolatile memory fieldeffect transistor. J. Appl. Phys. 72, 5999–6010 (1992).
 13.
Cao, W. W. & Barsch, G. R. LandauGinzburg model of interphase boundaries in improper ferroelastic perovskites of D(18)4h symmetry. Phys. Rev. B 41, 4334–4348 (1990).
 14.
Haun, M. J., Furman, E., Jang, S. J. & Cross, L. E. Thermodynamic theory of the lead zirconatetitanate solidsolution system, .1. phenomenology. Ferroelectrics 99, 13–25 (1989).
 15.
Mundy, J. A. et al. Functional electronic inversion layers at ferroelectric domain walls. Nat. Mater. 16, 622–627 (2017).
 16.
Meier, D. et al. Anisotropic conductance at improper ferroelectric domain walls. Nat. Mater. 11, 284–288 (2012).
 17.
Morozovska, A. N., Vasudevan, R. K., Maksymovych, P., Kalinin, S. V. & Eliseev, E. A. Anisotropic conductivity of uncharged domain walls in Bifeo3. Phys. Rev. B 86, 085315 (2012).
 18.
Eliseev, E. A., Morozovska, A. N., Svechnikov, G. S., Maksymovych, P. & Kalinin, S. V. Domain wall conduction in multiaxial ferroelectrics. Phys. Rev. B 85, 045312 (2012).
 19.
Gureev, M. Y., Tagantsev, A. K. & Setter, N. Headtohead and tailtotail 180 degrees domain walls in an isolated ferroelectric. Phys. Rev. B 83, 184104 (2011).
 20.
Dieguez, O., GonzalezVazquez, O. E., Wojdel, J. C. & Iniguez, J. Firstprinciples predictions of lowenergy phases of multiferroic Bifeo(3). Phys. Rev. B 83, 094105 (2011).
 21.
Wang, Y. et al. Bifeo3 domain wall energies and structures: a combined experimental and density functional theory +U study. Phys. Rev. Lett. 110, 267601 (2013).
 22.
Lubk, A., Gemming, S. & Spaldin, N. A. Firstprinciples study of ferroelectric domain walls in multiferroic bismuth ferrite. Phys. Rev. B 80, 104110 (2009).
 23.
Wang, Y. J., Chen, D., Tang, Y. L., Zhu, Y. L. & Ma, X. L. Origin of the blochtype polarization components at the 180° domain walls in ferroelectric Pbtio3. J. Appl. Phys. 116, 224105 (2014).
 24.
GoncalvesFerreira, L., Redfern, S. A. T., Atacho, E. & Salje, E. K. H. The INtrinsic Elasticity of Twin Walls: Ferrielectric Twin Walls in Ferroelastic Catio(3). Appl. Phys. Lett. 94, 081903 (2009).
 25.
Lee, W. T., Salje, E. K. H. & Bismayer, U. Ionic transport in twin domain walls. Ferroelectrics 303, 601–605 (2004).
 26.
Lee, W. T., Salje, E. K. H. & Bismayer, U. Domainwall structure and domainwall strain. J. Appl. Phys. 93, 9890–9897 (2003).
 27.
Borisevich, A. Y. et al. Atomicscale evolution of modulated phases at the ferroelectricantiferroelectric morphotropic phase boundary controlled by flexoelectric interaction. Nat. Commun. 3, 1–8 (2012).
 28.
Eliseev, E. A. et al. Universal emergence of spatially modulated structures induced by flexoantiferrodistortive coupling in multiferroics. Phys. Re. B 88, 224105 (2013).
 29.
Eliseev, E. A. et al. Conductivity of twindomainwall/surface junctions in ferroelastics: interplay of deformation potential, octahedral rotations, improper ferroelectricity, and flexoelectric coupling. Phys. Rev. B 86, 085416 (2012).
 30.
Li, Q. et al. Quantification of flexoelectricity in Pbtio3/Srtio3 superlattice polar vortices using machine learning and phasefield modeling. Nat. Commun. 8, 1–8 (2017).
 31.
Rojac, T. et al. Domainwall conduction in ferroelectric bifeo3 controlled by accumulation of charged defects. Nat. Mater. 16, 322–327 (2017).
 32.
Jia, C. L., Urban, K. W., Alexe, M., Hesse, D. & Vrejoiu, I. Direct observation of continuous electric dipole rotation in fluxclosure domains in ferroelectric Pb(Zr,Ti)O(3). Science 331, 1420–1423 (2011).
 33.
Jia, C. L. et al. Unitcell scale mapping of ferroelectricity and tetragonality in epitaxial ultrathin ferroelectric films. Nat. Mater. 6, 64–69 (2007).
 34.
Chisholm, M. F., Luo, W. D., Oxley, M. P., Pantelides, S. T. & Lee, H. N. Atomicscale compensation phenomena at polar interfaces. Phys. Rev. Lett. 105, 197602 (2010).
 35.
Yadav, A. K. et al. Observation of polar vortices in oxide superlattices. Nature 530, 198–201 (2016).
 36.
Nelson, C. T. et al. Spontaneous vortex nanodomain arrays at ferroelectric heterointerfaces. Nano Lett. 11, 828–834 (2011).
 37.
Tang, Y. L. et al. Observation of a periodic array of fluxclosure quadrants in strained ferroelectric Pbtio3 films. Science 348, 547 (2015).
 38.
Mundy, J. A. et al. Atomically engineered ferroic layers yield a roomtemperature magnetoelectric multiferroic. Nature 537, 523–527 (2016).
 39.
Zeches, R. J. et al. A straindriven morphotropic phase boundary in Bifeo3. Science 326, 977 (2009).
 40.
Borisevich, A. Y. et al. Suppression of octahedral tilts and associated changes in electronic properties at epitaxial oxide heterostructure interfaces. Phys. Rev. Lett. 105, 087204 (2010).
 41.
Das, S. et al. Observation of roomtemperature polar skyrmions. Nature 568, 368–372 (2019).
 42.
Wang, Y. J. et al. Polar meron lattice in strained oxide ferroelectrics. Nat. Mater. 19, 881–886 (2020).
 43.
Kim, Y. M. et al. Interplay of octahedral tilts and polar order in Bifeo3 films. Adv. Mater. 25, 2497–2504 (2013).
 44.
Borisevich, A. Y. et al. Exploring mesoscopic physics of vacancyordered systems through atomic scale observations of topological defects. Phys. Rev. Lett. 109, 065702 (2012).
 45.
Borisevich, A. Y. et al. Interface dipole between two metallic oxides caused by localized oxygen vacancies. Phys. Rev. B 86, 140102 (2012).
 46.
Ivanchyk, I. I. To macroscopic theory of ferroelectrics. Solid State Phys. 3, 3731 (1961).
 47.
Zhirnov, V. A. A Contribution to the theory of domain walls in ferroelectrics. Sov. Phys. JETP 35, 822–825 (1959).
 48.
Kruschke, J. Doing Bayesian Data Analysis: A Tutorial with R, Jags, and Stan. 2nd edn. (Academic Press, 2014).
 49.
Lambert, B. A Student’s Guide to Bayesian Statistics. 1st edn. (SAGE Publishing, 2018).
 50.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A. & Rubin, D. B. Bayesian Data Analysis (Chapman & Hall/Crc Texts in Statistical Science) 3rd edn. (Chapman and Hall/CRC, 2013).
 51.
Troyanchuk, I. O. et al. Phase transitions, magnetic and piezoelectric properties of rareearthsubstituted Bifeo3 ceramics. J. Am. Ceram. Soc. 94, 4502–4506 (2011).
 52.
Maran, R. et al. Interface control of a morphotropic phase boundary in epitaxial samarium modified bismuth ferrite superlattices. Phys. Rev. B 90, 245131 (2014).
 53.
Maran, R. et al. Enhancement of dielectric properties in epitaxial bismuth ferrite–bismuth samarium ferrite superlattices. Adv. Electron. Mater. 2, 1600170 (2016).
 54.
Balashova, E. V., Lemanov, V. V., Tagantsev, A. K., Sherman, A. B. & Shomuradov, S. H. Betaine arsenate as a system with 2 instabilities. Phys. Rev. B 51, 8747–8752 (1995).
 55.
Balashova, E. V. & Tagantsev, A. K. Polarization response of crystals with structural and ferroelectric instabilities. Phys. Rev. B 48, 9979–9986 (1993).
 56.
Kittel, C. Theory of antiferroelectric crystals. Phys. Rev. 82, 729–732 (1951).
 57.
Behera, R. K. et al. Structure and energetics of 180° domain walls in Pbtio3by density functional theory. J. Phys. 23, 175902 (2011).
 58.
Ophus, C., Ciston, J. & Nelson, C. T. Correcting nonlinear drift distortion of scanning probe and scanning transmission electron microscopies from image pairs with orthogonal scan directions. Ultramicroscopy 162, 1–9 (2016).
 59.
Martin, O. Bayesian Analysis with Python: Introduction to Statistical Modeling and Probabilistic Programming Using Pymc3 and Arviz, 2nd edn. (Packt Publishing, 2018).
 60.
Yao, Y., Vehtari, A., Simpson, D. & Gelman, A. Using stacking to average bayesian predictive distributions (with discussion). Bayesian Anal. 13, 917–1007 (2018).
 61.
Liu, Y., Zhu, Y. L., Tang, Y. L. & Ma, X. L. An effect of crystal tilt on the determination of ions displacements in perovskite oxides under bf/haadfstem imaging mode. J. Mater. Res. 32, 947–956 (2017).
 62.
Fatermans, J., Van Aert, S. & den Dekker, A. J. The maximum a posteriori probability rule for atom column detection from haadf stem images. Ultramicroscopy 201, 81–91 (2019).
 63.
Kimoto, K. et al. Local crystal structure analysis with several picometer precision using scanning transmission electron microscopy. Ultramicroscopy 110, 778–782 (2010).
 64.
Jones, L. & Nellist, P. D. Identifying and correcting scan noise and drift in the scanning transmission electron microscope. Microsc. Microanalysis 19, 1050–1060 (2013).
Acknowledgements
This effort (electron microscopy, Bayesian inference) is based upon work supported by the U.S. Department of Energy (DOE), Office of Science, Basic Energy Sciences (BES), Materials Sciences and Engineering Division (S.V.K., C.T.N., R.K.V.) and was performed and partially supported (M.Z.) at the Oak Ridge National Laboratory’s Center for Nanophase Materials Sciences (CNMS), a U.S. Department of Energy, Office of Science User Facility. The work at the University of Maryland (X.Z., I.T.) was supported in part by the National Institute of Standards and Technology Cooperative Agreement 70NANB17H301 and the Center for Spintronic Materials in Advanced infoRmation Technologies (SMART) one of the centers in nCORE, a Semiconductor Research Corporation (SRC) program sponsored by NSF and NIST. A.N.M. acknowledges the Target Program of Basic Research of the National Academy of Sciences of Ukraine “Prospective basic research and innovative development of nanomaterials and nanotechnologies for 2020  2024”, Project № 1/20Н (state registration number: 0120U102306) and the European Union’s Horizon 2020 research and innovation program under the Marie SkłodowskaCurie (grant agreement No 778070). This manuscript has been authored by UTBattelle, LLC, under Contract No. DEAC0500OR22725 with the U.S. Department of Energy. The United States Government retains and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a nonexclusive, paidup, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for the United States Government purposes. The 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/doepublicaccessplan).
Author information
Affiliations
Contributions
S.V.K. designed and led the project. S.V.K., C.T.N., R.K.V., M.Z., contributed to the Bayesian analysis code and data analysis. C.T.N. performed STEM experiments and data parameterization. X.Z. and I.T. synthesized the BFO thin films. E.A.E. and A.N.M. contributed the ferroelectric domain wall models. S.V.K., C.T.N., and R.K.V. prepared the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Peer review information Nature Communications thanks Xiuliang Ma and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Nelson, C.T., Vasudevan, R.K., Zhang, X. et al. Exploring physics of ferroelectric domain walls via Bayesian analysis of atomically resolved STEM data. Nat Commun 11, 6361 (2020). https://doi.org/10.1038/s41467020199072
Received:
Accepted:
Published:
Further reading

Artificial intelligence for search and discovery of quantum materials
Communications Materials (2021)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.