## Introduction

Exsolution of the excess cations from a non-stoichiometric perovskite oxide has received growing attention as a facile route to form uniformly dispersed nanoparticles (NPs) on the oxide surface for applications in catalysts and renewable energy1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23. This method, compared with the conventional deposition methods of NPs1,2,3, renders more uniform dispersion of NPs with a narrower size distribution. Moreover, the socketed NP structure leads to exceptionally high thermal stability and coking resistance owing to the strong interaction between the anchored particle and the oxide support4. Additionally, the exsolution process can lead to creation of magnetic nanostructure12,19 and also significantly improve the conductivity of the host oxide14,15. As such, exsolution has emerged as a new platform for the design of supported heterogeneous NPs on functional oxides. Various efforts have been made to improve the exsolution process, including the electrochemical poling1, metal-oxygen bond strength control6, facet-dependent interfacial energy control7, co-segregation from double perovskite lattices8, and charge-balanced doping15.

The thermodynamic driving force for the exsolution is provided by lowering the chemical potential of cation and oxygen in off-stoichiometric perovskite oxide. Namely, for an A1-aBO3-x perovskite oxide where both A-site cation and oxygen are deficient, a high temperature annealing at reducing atmosphere can effectively trigger the exsolution of the B-site cations to restore the ABO3 stoichiometry3. While the thermodynamic driving force for the exsolution is clear, the mechanism that leads to the preferential formation of NPs on top of the oxide surface is not clearly understood. Some in situ transmission electron microscopy studies have been performed to explore the NP formation process in the surface area using bulk polycrystalline samples22,23. However, to elucidate the preferential nucleation site and the diffusion pathway through which excess B-site cations reach the surface, in situ cross-sectional imaging of single crystalline samples with well-defined facets are highly needed. Moreover, considering a large energy barrier for the bulk diffusion, which is in the range of 3-4 eV24, there must be energetically favored diffusion pathways to the surface other than the bulk diffusion.

Off-stoichiometry often drives the formation of extended structural defects in perovskite oxides. The defects associated with the accommodation of cation and oxygen deficiency, such as stacking faults or anti-phase boundaries (APBs), may present low energy segregation site and/or diffusion path for the excess cations to reach the surface. The well-known Ruddlesden-Popper (RP) planar faults are consistently observed in A-site rich perovskites24,25. The fast diffusion of the A-site cation along the RP planar faults leading to the resistive switching has been demonstrated for the A-site rich perovskite24. In the case of A-site deficient perovskites (A1-xBO3), defects can be considered as related to antiphase defects. In the archetype tetragonal tungsten bronze (A0.6BO3) structure, Thomas demonstrated how the defects can be considered as a rotation antiphase boundary26. In thin films of A-site deficient perovskites, also termed B-site rich perovskites, anti-phase domains (APDs) can be formed, which are bounded by the APBs on the {100} and {010} planes27. The APBs are related by the lattice displacement vector of a/2 < 011> with respect to surrounding matrix, consisting of edge-shared BO6 octahedral arrangement. It has been shown that the APBs can also provide the fast diffusion path for off-stoichiometric cations24. Thus, the extended structural defects can play a crucial role in promoting particle nucleation/migration and thereby guide the microstructure optimization.

Another important issue is how the nucleation and crystal growth of NPs occurs from the diffused species, resulting in such strong interaction with the oxide support. This is a crucial feature that leads to the exceptionally high thermal stability of exsolved NPs4. In general, it has been found that polymorphism, the ability of a system to exist in different crystalline structures, is an important phenomenon in the formation of NPs28,29,30,31. According to Ostwald’s rule of stages, the first occurring phase in polymorphism is normally the one which is closest in free energy to the mother phase, that is, the least stable phase, followed by phases in order of increasing stability. An intriguing example of Ostwald’s rule is the so-called two-step crystallization (TSC) of NPs. According to the TSC model, instead of the direct nucleation of crystalline phase, a stable nucleus first evolves as an amorphous phase and the crystallization follows within the amorphous nucleus. Considering that NPs forming on oxide film surface are subject to the force balance as well as lattice matching at the triple junction with oxide, the formation of NPs via TSC is certainly beneficial as the constituent atoms can easily migrate and adjust themselves in amorphous state to find stable position during the crystallization. However, the TSC mechanism has not been exploited for the exsolution process of NP formation.

Here, we present direct observation of the exsolution process of NP formation from epitaxial non-stoichiometric perovskite oxide films using in situ scanning transmission electron microscopy (STEM), revealing the most efficient microstructural feature governing the exsolution of NPs to the film surface. The epitaxial thin film of La0.2Sr0.7Ni0.1Ti0.9O3-δ (LSNT) with 10% A-site cation and controlled oxygen deficiency was grown on (LaAlO3)0.3(Sr2AlTaO6)0.7 (LSAT) (001) substrate by using pulsed laser deposition (PLD). We found that the non-stoichiometric epitaxial film contained APBs running across the film thickness along the {110} planes, which accommodate the oxygen deficiency by changing the corner-shared oxygen octahedra arrangement locally to the edge-shared arrangement. The in situ cross-sectional STEM observation resolving the exsolution process across the film thickness to the surface, in conjunction with density functional theory (DFT) calculations, reveal that the APBs are the key structural feature promoting the exsolution of Ni NPs as they provide energetically favored segregation sites for Ni ions due to the low segregation energy. Furthermore, we observed that the APBs provide fast diffusion pathways towards the surface, facilitating the exsolution of NPs predominantly at their intersection with the film surface. Finally, our in situ atomic-resolution imaging captured that the formation of NPs occurs through the TSC mechanism which facilitates the formation of stable triple junction and coherent interface with oxide support, leading to the distinct lattice-matched socketing of NPs to the oxide support.

### Effects of non-stoichiometry on the exsolution

To verify the nature of defects induced by the non-stoichiometry and their roles in the exsolution, we prepared the controlled non-stoichiometric as well as stoichiometric LSNT films for comparison. The strain state and microstructure of the two films with a thickness of 100 nm were characterized by various techniques including X-ray diffraction, electron diffraction (SAED), atomic-scale STEM high-angle annular dark field (HAADF) imaging, and subsequent geometric phase analysis (GPA) (Figs. 1a, b and Supplementary Fig. 1). The results show that both films are fully strained without relaxation by misfit dislocations. After the annealing at 900 °C in reducing atmosphere (~1 × 10−6 Torr), the films remained fully strained but the exsolution of Ni NPs from the perovskite lattice resulted in the contraction of the out-of-plane lattice parameter. The extent of the lattice contraction was larger in the non-stoichiometric film than the stoichiometric film, implying more Ni atoms are exsolved from the perovskite lattice. The STEM-HAADF images and their GPA strain maps showed no misfit or threading dislocation formation in the annealed films, excluding the role of dislocation in the exsolution as a preferential path for diffusion.

The Ni NPs formed via the exsolution process of the two systems were characterized by scanning electron microscopy (SEM) surface imaging of the annealed films (Fig. 1c and d). The quantitative measurement and statistical analysis of the Ni NPs images yields a much higher areal density (795 µm−2) with smaller size (8.8 nm) for the non-stoichiometric film. For the stoichiometric film, the corresponding values are 51 µm−2 and 10.7 nm, respectively. The different extent of the exsolution of Ni was further confirmed by X-ray photoelectron spectroscopy (XPS) by the deconvolution of the mixed valence states of Ni detected from near-surface region (Supplementary Fig. 2). The Ni3+ and Ni0 states are attributed to the Ni atoms bonded to the perovskite lattice and the exsolved Ni particle, respectively. The fraction of Ni0 in total Ni is determined to be 66% and 10% for the non-stoichiometric and the stoichiometric films, respectively. The SEM and XPS results reveal the crucial role of non-stoichiometry in the formation of Ni NPs by exsolution. Cross-sectional STEM-HAADF imaging and energy-dispersive X-ray spectroscopy (EDS) elemental mapping have been carried out to visualize the elemental distribution of Ni and correlated microstructural features in the annealed films (Fig. 1e, f and Supplementary Fig. 3). Compared to the stoichiometric film, a higher density of Ni NPs was detected even inside the non-stoichiometric film. Moreover, Ni NPs tend to align vertically along the extended defects formed in the non-stoichiometric film.

### Anti-phase boundaries in non-stoichiometric film

The non-stoichiometric LSNT film exhibits a high crystalline quality except for the defects running vertically from the interface to the surface. The observed extended defects are APDs formed by a lattice translation vector of a/2 < 011> with respect to the surrounding matrix; the atom-resolved EDS La map clearly shows that the La columns from two adjacent domains are related by a projected lattice translation vector of a/2[001] (Fig. 2a–c and Supplementary Fig. 4). The atomic structure of the resulting APB is found to consist of the chain of edge-sharing TiO6 octahedra, implying the local enrichment of B-site cations per formula unit (Fig. 2d–f). In fact, the EDS Ni map reveals the strong enrichment of the APBs by Ni (Fig. 2c) (note that for the APD embedded within the matrix the pronouncing Ni signal is along the two vertical (100) edge-on APBs marked by white dash lines).

To identify the origin of the Ni enrichment of APB, we calculated the segregation energy (Eseg1) of Ni, which is defined as the difference in the total free energy between a APB site and a bulk-like site for each ion substitution. This means that a positive Eseg1 suggests a tendency to move into the bulk, while a negative Eseg1 implies Ni segregation at APB. The Eseg1 of Ni at the APB site in the edge-sharing octahedra is calculated to be −0.17 eV (Fig. 2e), indicating that the substitution of Ti ions in the APBs with Ni is energetically favored. Considering that the high temperature film growth process, the Ni enrichment of APB is energetically plausible due to the thermal activation.

The solute segregation at defects such as dislocations, grain boundaries, free surface and APBs is a phenomenon that is ubiquitous in various ionic solids as well as metals32,33,34,35, attributed to various factors, including surface free energy, elastic strain energy, and electrostatic potential33,34,35. In the case of ionic solids, the segregation is influenced strongly by the electrostatic potential difference between the host and the solute ions34,35. In the present case, the valence state of the solute (Ni2+) ion is largely different from the host B-site cation (Ti4+). However, given that the APB with edge-sharing octahedra accommodates the oxygen deficiency and, as a consequence, the valence state of B-site cation is reduced, the segregation of a cation with reduced valence state can be favored at APBs. The negative Eseg1 of Ni to the Ti at the APB may have this electrostatic origin.

The existence of edge-sharing feature for TiO6 octahedra can be considered to provide the flexibility for changing their directions, thus for forming enclosed antiphase domains. The APBs lie mostly in the {100} planes and partially in the {110} planes. In the atomic-resolution STEM-HAADF images, due to overlap of the antiphase nanodomains with the surrounding matrix along the viewing direction, the domains usually appear as a complicated lattice pattern with additional atomic columns with different intensity levels. The simulated STEM image using a structural model consisted of two domains related by antiphase lattice translation by a/2 < 011> perfectly reproduces the key structural features of the experimental image. The cross-correlation factor (XCF) of ~0.96 was obtained for the simulated image (XCF of 1.0 indicates perfect match) as shown in Supplementary Fig. 5.

The change of the octahedra arrangement from corner- to edge-shared at the APB is effective in accommodating not only excess B-site cation but also oxygen deficiency. This local change in the oxygen coordination results in the change of the electronic structure, which can be assessed by electron energy-loss spectroscopy (EELS) (Fig. 2g–i). The EELS signals from the APD include the overlapping APBs and matrix, which can be compared with those from the matrix free of APB. For comparison of the two EELS data, the energy was calibrated by using zero-loss peak and the intensity was normalized with respect to the strongest peak (the whole spectra is shown in Supplementary Fig. 6). The EELS O-K edge (Fig. 2h) obtained across the antiphase domain shows that the post-peak (marked by ‘b’) in the domain is suppressed compared to the pre-peak (marked by ‘a’). This change in the EELS O-K edge originates from the reduced oxygen coordination due to the edge-shared octahedra at APB.

The EELS Ti-L2,3 edge (Fig. 2i) consists of two major peaks L3 and L2 attributed to the spin-orbit coupling in 3d orbitals. The crystal field splitting corresponding to the octahedral coordination results in the further splitting into t2g and eg sub-bands. At the matrix region, the valence state of Ti is close to 4+, results in well separated t2g and eg peaks in both L3 and L2 edges36. Accompanied by oxygen deficiency, the valence state of Ti ions in the APB is reduced from 4+ to 3+ due to the electron doping from the edge-shared oxygen. In summary, our STEM investigation reveals that the APBs in non-stoichiometric LSNT film accommodate not only the excess Ni but also oxygen deficiency by changing the corner-shared oxygen octahedra arrangement locally to the edge-shared arrangement, thereby acting as a reservoir of excess Ni.

### Anti-phase boundaries as fast diffusion paths

The formation of NPs driven by the exsolution of Ni has been observed in situ by heating a cross-sectional TEM sample at 700 °C in vacuum (~10−7 Torr). The STEM images and correlated EDS maps (Fig. 3a–e, Supplementary Figs. 7 and 8) confirm the preferential formation of a high density of NPs along the APDs. As to the diffusion species that leads to the formation of Ni NPs, it is most likely the metal cations (Ni ions). The Ni NPs form not only on the film surface but also inside the film, which is consistent with the ex situ observation of the annealed film (Fig. 1). Correlation of Ni NPs with APDs is illustrated schematically in Fig. 3f. The observed exsolution behavior indicates that the nucleation of new particles is energetically favored over the ripening or coalescence of nucleated particles in the presence of APBs. We propose that the role of APBs in the exsolution process is twofold; it reduces the energy barriers for the migration of Ni and for the heterogeneous nucleation.

To investigate how the APB affects the migration of Ni through the PV lattice, we calculated the energy barrier along the three different pathways by performing nudged-elastic band (NEB) method (Fig. 4a, b). As a reference, the migration of Ni toward the nearest neighboring B-site far from an APB was considered, which yields the energy barrier of 4.37 eV. The energy barrier for a similar path adjacent to the APB is reduced to 3.35 eV (Boundary diffusion 1 in Fig. 4a). On the other hand, the energy barrier for the migration toward the nearest B-site across the APB is calculated to be 0.68 eV (Boundary diffusion 2 in Fig. 4a). This dramatic reduction of the energy barrier for the migration of Ni originates primarily from the different electrostatic interactions of Ni with the surrounding atoms depending on the migration pathways. For the boundary diffusion 2, the migration of Ni is mainly influenced by only neighboring oxygen ions whereas Ni heavily interacts with the surrounding cations as well as oxygen ions simultaneously for bulk and boundary diffusion 1, raising the migration barrier in association with a large lattice distortion. A similar effect of APB in the migration barrier has also been reported for SrTiO324.

Next, we calculated the Eseg2 (Fig. 4c) of Ni along the APB, defined as the difference in the total free energy between the APB site at the film surface and the internal APB site for each Ni ion substitution (See Methods for calculation details). The calculated Eseg2 shows a negative value of −0.54 eV, indicating the existence of the driving force for the outward migration of Ni towards the surface along the APB pathway.

### Two-step crystallization and reactive wetting of nanoparticles

In situ atomic-resolution STEM imaging revealed that the crystalline state of Ni NP form via TSC rather than the direct nucleation of crystalline Ni (Fig. 5); first the amorphous state of Ni evolves in form of hemi-spherical droplet, and then the crystallization takes place subsequently within the amorphous droplet (See Supplementary Video 1). At an early stage of NP formation, a small amorphous Ni droplet started forming preferentially on top of APD (Fig. 5a) with establishing the contact angle ($$\theta$$) of about 90° (Fig. 5b). While the amorphous droplet continues growing up to ~3 nm in the equivalent spherical diameter (ESD) (Fig. 5g), the crystalline phase nucleates within the amorphous droplet preferentially at the interface with underlying oxide surface (Fig. 5c). Before being stabilized in the crystalline phase, the sub-critical nuclei within the amorphous droplets exhibit structural fluctuations, resulting in dissolution and crystallization back and forth several times as confirmed by fast Fourier transformation (FFT) patterns (Fig. 5c–f). Once the crystalline phase reaches the critical size ($${d}_{c}$$), it becomes stable and grows continuously without structural fluctuations. The temporal evolution of the NP size and the size of the internal crystallite are plotted in Fig. 5g and h, respectively. The $${d}_{c}$$ of the crystalline phase is measured to be ~3.83 ± 0.08 nm. The TSC of Ni NPs has been observed reproducibly throughout the in situ experiments as shown in Supplementary Fig. 9.

The amorphous state of Ni is energetically favored as the first evolving phase in the NP formation process via TSC because its lower interfacial free energy compared to that of crystalline states can effectively reduce the energy barrier. The structural fluctuations of sub-critical nuclei inside the droplet, i.e., repeated dissolution and crystallization, indicates that the energy barrier for the crystallization of amorphous phase also exists but at a reduced magnitude. Nevertheless, the subsequent nucleation of the stable crystalline phase within the amorphous droplet indicates that the amorphous phase is metastable with respect to the crystalline phase. During the crystallization the in-plane lattice fringes are resolved first (see FFT in Fig. 5c); the in-plane lattice fringes appear from the central region of amorphous droplet at the interface with support and extends towards the edges. The formation of lattice-matched coherent interface can reduce the NP-support interface energy at the expense of the elastic strain energy of NP. By carrying out control experiments at 20 °C (Supplementary Fig. 10), we can exclude the effects of the electron beam on the structural fluctuations occurring during the early stage of NP formation process.

Considering that NPs forming on top of the oxide support are subject to not only the elastic strain energy due to the lattice mismatch but also the surface/interface tension forces at the triple junction, the formation of NPs via TSC is certainly beneficial as the constituent atoms can easily migrate and adjust themselves in amorphous state to find stable position during the crystallization. Furthermore, the amorphous state of NP can easily undergo the reactive wetting with the oxide support during the crystallization, resulting in the formation of a ridge that balances the surface/interface tension forces at the triple junction, that is so-called the socketing of NP into the support (Supplementary Video 2 and Fig. 11). The formation of the ridge along the triple junction occurs through dissolution and redeposition of the oxide material, which is a well-known signature of the reactive wetting of a metallic droplet on oxide substrate, requiring the mass transport through the triple junction37. As indicated by yellow arrows in Supplementary Figs. 11c and 11d, a rim of epitaxial oxide layer with ~1-2 unit cell thickness that surrounds the NP was formed. The ridge can balance the surface/interface tension forces not only along the in-plane direction but also along the out-of-plane direction, which enhances the thermal stability of exsolved NPs. After prolonged annealing, the crystalline NP evolves with well-defined facets and the lower half about 50% of volume is submerged with strong anchoring to the perovskite support. After distinct eight-fold facets are developed both outside and inside of the perovskite support, the outside part on top of the support grows fast along the [001] and the [101] direction, while the sideways growth along the [100] direction is suppressed as depicted by white dashed line in Supplementary Fig. 11d. The lattice parameter (3.53 Å) of the exsolved particle is in good agreement with that of the Ni crystal (Supplementary Fig. 11e).

## Summary

The present in situ STEM combined with DFT calculation revealed that the APBs characterized by the a/2 < 011> type lattice displacement accommodate the excess B-site cation (Ni) via the edge sharing of BO6 octahedra in a non-stoichiometric perovskite oxide and provide the fast diffusion pathways for NP formation by exsolution. The atomic-scale mechanism of the NP exsolution in the non-stoichiometric perovskite oxide is depicted in Fig. 6. The defects are created in the form of APBs which reveal oxygen deficiency and B-cation enrichment due to the edge-sharing of octahedra, when the non-stoichiometric target is used for the film growth. The migration of the excess Ni toward the nearest B-site across the oxygen deficient APB is energetically favored as the anti-site ion configuration greatly reduces the migration barrier. The APBs further promote the outward diffusion of the excess Ni toward the surface as the segregation energy of Ni to the APB is much lower at the APB/surface intersection. As such, B-site enrichment, together with oxygen vacancy, plays an important role in the formation of APB and therefore the accelerated exsolution along the APB. The formation of NPs occurs through the TSC mechanism via reactive wetting on oxide support, which facilitates the formation of stable triple junction and coherent interface with oxide support, leading to the distinct socketing of NPs to the oxide support. The lattice matching and socketing of NP represents the origin of the unprecedentedly high thermal stability of the exsolved NPs compared to the conventional NPs deposited on an oxide support.

In future work, we expect that controlling the degree of the A/B non-stoichiometry can allow wide tuning of the exsolution behavior in thin film forms. For bulk perovskite systems, rational design of new oxide structures having extended defects such as APBs can also lead to the promoted exsolution via controlled formation of nanostructures. Indeed, the formation of cylindrical APDs were already reported in the mixed oxide system26. The atomic-scale mechanism unveiled in this study can advance the fundamental understanding on the NP formation process by exsolution and can be used in catalytic and energy applications such as thin film oxide fuel cells and electrolysis cells. Moreover, the extended defect-enhanced exsolution can be employed to control electronic and magnetic properties of host oxides and the exsolved metal particles, respectively.

## Methods

### Thin film preparation

The non-stoichiometric thin films were grown on LSAT (001) substrates using a non-stoichiometric La0.2Sr0.7Ni0.1Ti0.9O3-δ (LSNT) target having 10% A-site deficiency by PLD. A stoichiometric LSNT film was also grown using a stoichiometric La0.3Sr0.7Ni0.1Ti0.9O3 target. The oxygen partial pressure, deposition temperature, laser fluence, and repetition rate were fixed at 50 mTorr, 700 °C, 1.5 J cm−2, and 5 Hz, respectively. The 100 nm and 60 nm thick films are used for ex situ and in situ TEM measurements, respectively. The reason for using a thinner film for in situ measurements was to image the entire film at a higher magnification. The reduction of the deposited thin films was then performed in a vacuum furnace (~1 × 10−6 Torr) at 900 °C with the heating and cooling rates of 5 °C min−1.

### Film characterizations

The reciprocal space mapping (RSM) was performed using a high-resolution X-ray diffractometer (D8 Discover, Bruker) under Cu Kα radiation operated at 40 kV and 40 mA. The extent of surface NPs was characterized by a field-emission scanning-electron microscope (JSM − 7800 F PRIME, JEOL Ltd.). Elemental composition and valence states near the film surface were performed using XPS (AXIS Ultra DLD, Kratos. Inc).

### TEM sample preparation

Cross-sectional TEM specimens were prepared along the <010> zone-axis of the epitaxial LSNT thin films grown on LSAT (001) substrates by using Focused Ion Beam (FIB) milling. The prepared lamella by FIB was attached to a Wildfire heating chip for in situ heating experiments. At the final stage of FIB milling, a low energy Ga+ ion beam at 2 kV was used to reduce the beam damages.

### Scanning transmission electron microscopy

A field-emission Cs-corrected (S)TEM (Grand ARM300F, JEOL) operated at 300 kV was used for in situ heating experiments. The in situ heating were performed using a heating holder by DENSsolutions.

Atomic-scale characterization during in situ heating experiment was recorded in annular dark field (ABF) and high-angle annular dark field (HAADF) imaging modes. Detector angle ranges of 7.5 to 17 and 70 to 175 mrad were set for these imaging modes, respectively. The convergence semi-angle for forming the focused probe was 23 mrad. The statistical noise floor in all STEM images was removed using local 2-D Wiener filtering implemented using a commercial software (HRTEM Filter Pro, HREM Research Ltd.).

Energy-dispersive X-ray spectroscopy (EDS) was acquired under 36 mrad convergence angle with spectrometer of a detectable area of 100 mm2 in STEM imaging mode. EDS maps with a total number of ~2000 frames were acquired with a speed of 0.655 s per frame with 256 by 256 pixels. The specimen drift was corrected during acquisition. Each elemental map is constructed by integrating the signal from La-Lα, Sr-Lα, Ni-Kα, Ti-Kα and O-Kα characteristic X-rays, respectively. The EDS maps were processed by the average filter to minimize random noise, which do not contain artifact from filtering.

Electron energy-loss spectroscopy (EELS) line scans were recorded with energy ranges of 400 to 600 eV (for O-K edge and Ti-L2,3 edges) using an EEL spectrometer (Gatan GIF Quantum ER, USA) with an energy resolution of 0.6 eV, for detecting the oxygen vacancy and valence state of Ti atoms across anti-phase boundary. The energy dispersion and dwell time per pixel are 0.1 eV and 0.5 s, respectively. The loss energy of the core-loss EELS data was calibrated by tracking the energy drift of the zero-loss peak, which was simultaneously recorded with the core-loss data. The electron dose rate is about 106 e- nm−2 s−1. There is no noticeable e- beam damage during acquisition.

STEM image simulations were performed using the multislice method in the QSTEM software package38 using the microscope parameters that closely represent the experimental conditions.

### Geometric phase analysis (GPA)

GPA (HREM Research Inc., Japan) software was used for strain mapping of STEM-HAADF images. For determining strain state of epitaxial thin film in in-plane (εxx) and out-of-plane (εzz) direction, reference areas were selected on the substrate area of each sample.

### Segregation energy calculations

Our first-principles study of APBs electronic and structural properties of LSTO perovskite was carried out in the framework of the density functional theory (DFT) as it is implemented in the VASP (Vienna ab initio Simulation Package) code39,40. The Kohn-Sham equations41 are solved within a supercell approach considering the periodic boundary conditions and a plane-wave basis set. Expansion of the plane-wave basis set was limited by a cut-off energy of 400 eV to describe the electronic states in the system. The electron exchange and correlation effects have been taken into account using the generalized gradient approximation (GGA) in the framework of Perdew-Burke-Ernzerhof (PBE) treatment42.

For total energy and force calculations, we employed an all-electron projector augmented wave (PAW) technique43. The Monkhorst-Pack scheme44 was used for k-point sampling of the Brillouin zone (BZ), while the integration over the BZ was performed on Γ-centered 4 × 4 × 1 k-point mesh, using the tetrahedron method with Blöchl corrections45. This MP k-point mesh was found to be optimal for all APB model calculations. Gaussian smearing was used with a width of 0.05 eV to determine partial occupancies of electronic states.

The structural relaxations of APBs geometries were performed via a quasi-Newton algorithm, using the exact Hellmann-Feynman forces acting on each atom. The total energies of APB were converged up to 1 meV/atom, while the residual force acting on each atom was less than 0.01 eV/Å. We found that the chosen parameters provide enough reliability in the accuracy of the present calculations. Besides, in order to account for strong on-site Coulomb repulsion among the 3d electrons of LSNT perovskite the rotationally invariant implementation of the GGA + U method was employed, where the effective Coulomb repulsion Ueff = U-J was chosen to be 4.6 eV and 6.0 eV for Ti and Ni atomic species, respectively8.

Based on our TEM images, the APB structure was constructed using the pseudocubic La0.5Sr0.5TiO3 unit cell with optimized Pm3m structure (a = b = c = 7.89 Å). To examine the segregation tendency of Ni dopants, we assume such planar models of APBs as the most relevant facets for B-site metal exsolution in LSNT-based perovskites. A fourteen-layered periodic slab was sufficient to describe segregation phenomenon at APBs.

For this purpose the segregation energies of B-site metal dopant was defined as:

$${E}_{{seg}1}={E}_{B-{metal}}^{{Internal}\,{APB}}-{E}_{B-{metal}}^{{Bulk}}$$
(2)
$${E}_{{seg}2}={E}_{B-{metal}}^{{Surface}\,{APB}}-{E}_{B-{metal}}^{{Internal}\,{APB}}$$
(3)

where $${E}_{B-{metal}}^{{Surface\; APB}}$$, $${E}_{B-{metal}}^{{Internal\; APB}}$$, and $${E}_{B-{metal}}^{{Bulk}}$$ are the total energies of the system with B-site metal dopant located on top of APB (at the film surface), the internal APB, and the bulk perovskite, respectively. According to this definition, a negative value of Eseg1 means easier B-site metal segregation at the internal APB, while a more negative Eseg2 represents favorable metal exsolution towards the surface of APB.

### Migration energy calculations

A 164-atom supercell was constructed to model APB-containing La0.5Sr0.5TiO3. Initial lattice parameters of the supercell are $$a=b=7.89\,\AA$$ and $$c=31.56\,\AA$$ with nine TiO2 layers. Two APBs per supercell were considered. Density functional theory (DFT) calculations were performed to calculate the Ni migration barrier in APB-containing La0.5Sr0.5TiO3 with NiTi and VTi using the Vienna Ab Initio Simulation Package (VASP)40. The projected augmented wave (PAW) method43 was used to approximate the electron-ion potential. Exchange-correlation effects were treated within the Perdew-Burke-Ernzerhof (PBE)42 functional form of the generalized gradient approximation (GGA). A 450 eV cut-off energy for the plane wave basis set and $$2\times 2\times 1$$ Γ-centered $$k$$-point meshes were used. The calculations were converged in energy to 10−6 eV/cell and the structures were allowed to relax until the forces were less than 10−2 eV/Å. Minimum energy diffusion pathways of Ni ions were determined by the climbing image nudged elastic band (CI-NEB) algorithm46.