Acceleration of Atomistic NEGF: Algorithms, Parallelization, and Machine Learning Thanks: This work was supported by the Swiss National Science Foundation (SNSF) under grant n ∘ \mathrm{n^{\circ}} 209358 (QuaTrEx). We acknowledge support from CSCS under projects lp16 and lp82. This research used resources of the Oak Ridge Leadership Computing Facility at the Oak Ridge National Laboratory, which is supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC05-00OR22725 (project NEL107). 1 st Mathieu Luisier, 2 nd Nicolas Vetsch, 3 rd Alexander Maeder, 4 th Vincent Maillou, 5 th Anders Winka, 6 th Leonard Deuschle, 7 th Chen Hao Xia, 8 th Manasa Kaniselvan, 9 th Marko Mladenović, 10 th Jiang Cao, 11 th Alexandros Nikolaos Ziogas Abstract The Non-equilibrium Green’s function (NEGF) formalism is a particularly powerful method to simulate the quantum transport properties of nanoscale devices such as transistors, photo-diodes, or memory cells, in the ballistic limit of transport or in the presence of various scattering sources such as electron-phonon, electron-photon, or even electron-electron interactions. The inclusion of all these mechanisms has been first demonstrated in small systems, composed of a few atoms, before being scaled up to larger structures made of thousands of atoms. Also, the accuracy of the models has kept improving, from empirical to fully ab-initio ones, e.g., density functional theory (DFT). This paper summarizes key (algorithmic) achievements that have allowed us to bring DFT+NEGF simulations closer to the dimensions and functionality of realistic systems. The possibility of leveraging graph neural networks and machine learning to speed up ab-initio device simulations is discussed as well. I Introduction The continuous shrinking of transistors’ dimensions is posing significant design and fabrication challenges to the semiconductor industry. At the same time, it is bringing the featured sizes of nanoscale devices closer to what ab-initio quantum transport (QT) simulators can handle within the framework of the atomistic non-equilibrium Green’s function (NEGF) formalism, i.e., a few thousands [ 2 ] . To reach this number, several progresses have been made since the pioneering works of Taylor et al. [ 11 ] and Brandbyge et al., combining density-functional theory (DFT) and NEGF at the beginning of the 2000s. Efficient numerical algorithms have been developed [ 9 ] , the parallelization of the workload has been widely popularized [ 3 ] , collaborations with high-performance computing engineers have been established [ 6 ] , while the emergence of efficient hardware, in particular graphics processing units (GPUs), has paved the way for computer-aided investigations of complex phenomena in nano-transistors [ 14 ] . Despite impressive evolution, most ab-initio QT simulations are still restricted to the ballistic limit of transport, while electron-phonon or electron-electron interactions might play a detrimental role in nanoscale devices and should therefore be accounted for. Here, we give a brief overview of how the current limitations of QT tools can be addressed, present our implementation of the required models and algorithms into a novel, open source package called QuaTrEx , and illustrate it with one example, the simulation of a silicon nano-ribbon in the presence of carrier-carrier scattering. We also suggest how machine learning can be used to bypass the generation of Hamiltonian matrices from first-principles. II Ab-initio Quantum Transport Our approach relies on the combination of DFT with NEGF to shed light on the characteristics of nanostructures driven out of equilibrium by an external perturbation (voltage, thermal gradient, or optical signal). The first step consists of creating the Hamiltonian matrix of the system of interest with DFT. Packages relying on a localized basis set, such as CP2K [ 4 ] or transformations of plane-wave data into maximally localized Wannier functions (MLWFs) [ 8 ] , can be utilized for that purpose. The dynamical, bare Coulomb, or electron-phonon coupling matrices can be constructed similarly. Fig. 1: Iterative scheme to compute the non-equilibrium Green’s functions (NEGF) for electrons (retarded: \mathbf{G}^{R} ) and lesser/greater: \mathbf{G}^{\lessgtr} in the presence of electron-phonon and/or electron-electron interactions. To determine the corresponding scattering self-energies ( \mathbf{\Sigma}^{R,\lessgtr} ), the phonon ( \mathbf{D}^{R,\lessgtr} ) and screened Coulomb ( \mathbf{W}^{R,\lessgtr} ) Green’s functions must be evaluated, which requires the knowledge of the phonon self-energy ( \mathbf{\Pi}^{R,\lessgtr} ) and/or of the polarization function ( \mathbf{P}^{R,\lessgtr} ). All these quantities are matrices \mathbf{M} that depend on the energy ( E ) or frequency ( \omega ). Their entries ( M_{ij} ) represent correlations between two points located at R_{i} and R_{j} . The calculation of all these matrices involves solving linear systems of equations and open boundary conditions (LSE+OBC, red blocks) or performing energy convolutions through fast Fourier transforms (FFT, blue blocks). In a parallel implementation, it is convenient to store all M_{ij} entries for one or a few E / \omega points when dealing with LSE+OBC, while it is preferable to have access to a few M_{ij} for multiple E / \omega when computing the \mathbf{\Sigma}^{R,\lessgtr} , \mathbf{\Pi}^{R,\lessgtr} , or \mathbf{P}^{R,\lessgtr} terms with FFT. Data can be “transposed” with all-to-all communication operations from one representation ( E , \omega ; i,j ) to the other ( i,j ; E , \omega ). Regardless of the particles (electron, phonon, photon, screened Coulomb) and interactions (electron-phonon, electron-photon, phonon-phonon, electron-electron) considered, the NEGF equations can be written in the following form \mathbf{C}^{R}(\mathcal{E})=(\mathbf{A}(\mathcal{E})-\mathbf{B}^{R}(\mathcal{E}))^{-1}, (1) \left[\mathbf{C}^{R}(\mathcal{E})\right]^{-1}\cdot\mathbf{C}^{\gtrless}(\mathcal{E})\cdot\left[\left(\mathbf{C}^{R}(\mathcal{E})\right)^{H}\right]^{-1}=\mathbf{B}^{\gtrless}(\mathcal{E}), (2) \mathbf{B}(\mathcal{E})\propto\int d\mathcal{E}^{\prime}\left(\mathbf{M_{1}}\cdot\mathbf{C}_{1}(\mathcal{E}-\mathcal{E}^{\prime})\cdot\mathbf{M_{2}}\right)\odot\mathbf{C}_{2}(\mathcal{E}^{\prime}), (3) where \mathcal{E}\in\{E,\omega\} is the energy ( E ) or frequency ( \omega ) of the Green’s function matrix \mathbf{C}(\mathcal{E}) and “self-energy” \mathbf{B} , which can be of retarded ( R ), lesser ( < ), or greater ( > ) type. Note that the momentum dependence is omitted for simplicity. The \mathbf{C} , \mathbf{C_{1}} , and \mathbf{C_{2}} matrices are either equal to \mathbf{G} (electron), \mathbf{D} (phonon/photon), or \mathbf{W} (screened Coulomb interaction), while \mathbf{B} refers to the interactions between different physical systems and corresponds to either \mathbf{P} (polarization), \mathbf{\Sigma} (electron scattering self-energy), or \mathbf{\Pi} (phonon/photon scattering self-energy). It also contains an open boundary condition term not shown here. The matrix \mathbf{A} is made of the operator describing the system’s intrinsic properties, i.e., of the Hamiltonian, dynamical, or bare Coulomb matrices. Finally, the \mathbf{M_{1}} and \mathbf{M_{2}} matrices represent the coupling between different populations (they are equal to the identity matrix in some cases), whereas \odot indicates an element-wise or standard matrix-matrix multiplication. Fig. 2: Simplified representation of the Serinv algorithm [ 7 ] for the parallel calculation of the NEGF equations (retarded and lesser/greater). It relies on the repeated application of Schur complements. Starting from a block tri-diagonal input matrix, P partitions are created, each of them being attributed to different computing units (CPUs or GPUs). After local processing, a reduced system of equations arises, which must be solved sequentially before reconstructing selected entries of the Green’s functions locally. Note the mapping between the large and reduced systems (blocks with the same color). Typically, a block tri-diagonal (BT) shape is imposed on all \mathbf{A} and \mathbf{B} matrices by capping the maximum distance over which two particles can interact. As a consequence, only selected entries of \mathbf{C} are needed, those corresponding to the sparsity pattern of \mathbf{A} and \mathbf{B} [ 2 ] . From a numerical point of view, Eqs. ( 1 ) and ( 2 ) are linear systems of equations (LSE) whose outputs are the desired entries of \mathbf{C} . Each \mathcal{E} is independent of the other and can therefore be treated in parallel. On the other hand, the solution of Eq. ( 3 ) involves an energy convolution (EC) where a large number of energies is needed for a few of the \mathcal{C} matrix entries. We have set up a parallel data transposition scheme to adapt the distribution of the multi-dimensional \mathbf{B} and \mathbf{C} tensors in memory, depending on the task at hand (LSE or EC). It is schematized in Fig. 1 in the case of electron-electron and electron-phonon interactions. Concretely, Eqs. ( 1 ) and ( 2 ) can be solved with the so-called recursive Green’s function (RGF) algorithm, which is sequential in essence [ 10 ] . To simulate larger device structures, we have devised a parallel strategy and implemented it into an open-source, GPU-based library, Serinv. It takes advantage of the Schur complement of BT matrices [ 7 ] to divide all input/output matrices into multiple partitions. Its principle is summarized in Fig. 2 . The energy convolution in Eq. ( 3 ) is performed more efficiently in the time domain after a fast Fourier transform (FFT) [ 12 ] . Fig. 3: (a) Schematic view of a Si nano-ribbon with a height of 1.5 nm, a width of 5 nm, and a varying length L_{tot} . The surface of the nano-ribbon is passivated with hydrogen atoms. (b) Weak scaling results for the Si nano-ribbon in (a) with L_{tot} =52.1 nm and a total of N_{A} =25,344 atoms, in the presence of electron-electron interactions within the GW approximation, on the Frontier supercomputer. The experiment starts by measuring the execution time on 1 node of the machine with N_{E} =2 energy points, each of them being handled by 4 GPUs. Subsequently, N_{E} increases proportionally with the number of nodes, reaching 18,800 on 9,400 nodes. The total time is decomposed into its communication and computation components. III Results As an example, we consider a silicon nano-ribbon with cross-section dimensions similar to experiments [ 1 ] (Fig. 3 (a)), including electron-electron interactions (self-consistent GW approximation). Its length is first set to 52.1 nm for a total of N_{A} =25,344 atoms, each of them expressed in a MLWF basis. By leveraging the parallelization approach of Fig. 1 and the distributed NEGF solver of Fig. 2 , we could simulate this device up to the full scale (9,400 nodes, 8 GPUs each) of the Frontier supercomputer at Oak Ridge National Laboratory, reaching a weak scaling parallel efficiency of 80% when going from 1 to 9,400 nodes (Fig. 3 (b)). Due to the high computational burden of such calculations, we could not execute a self-consistent Schrödinger-Poisson simulation of a transistor with this nano-ribbon as channel material. Instead, we had to reduce its length to 21.7 nm, keeping the cross section the same, and imposed a 10 nm-long linear potential drop with a 5 nm-long flat region on each side of the structure. The potential difference was set to 0.2 V. Selected results are presented in Fig. 4 . From the density-of-states plots in (a), it can be observed that turning on electron-electron interactions (slightly) increases the nano-ribbon band gap, as expected. This limited increase can be explained by the fact that we employ a self-consistent GW scheme, contrary to most DFT packages which implement the G 0 W 0 method. Secondly, the electron concentration is high enough (in the order of 1e16 cm -3 ) to reduce the impact of carrier-carrier scattering on the band gap correction. The influence of electron-electron interactions on the electronic current distribution is moderate, as can be seen in Fig. 4 (b). While the magnitude of the current’s peak and its low-energy tail vary along the nano-ribbon transport direction ( x ), they nevertheless remain very close to each other. Still, it is worth noticing that in spite of these variations, the electronic current remains perfectly conserved from one side of the device to the other, validating the implementation of the model, as also demonstrated in [ 2 ] . Fig. 4: Simulation results for the Si nano-ribbon in Fig. 3 (a) with L_{tot} =21.7 nm. A linear potential drop is applied with a voltage difference of 0.2 V between both ribbon extremities. (a) Local density-of-states extracted at x =0 in the ballistic limit of transport (thin blue line) and in the presence of electron-electron interactions within the GW approximation (thick red curve). (b) Spectral current distribution extracted at x =2.2, 10.9, and 19.5 nm. The inset shows the integral of this quantity (electrical current) as a function of x , demonstrating current conservation. Fig. 5: Illustration on how machine learning can be inserted to accelerate ab-initio quantum transport simulations by predicting the entries of Hamiltonian matrices H based on training from DFT. A single device structure (left), here a valence change memory (VCM) cell, is divided into several partitions and fed to an equivariant graph neural network (EGNN). Once trained with DFT data from the original VCM on multiple GPUs, this EGNN can accurately predict the Hamiltonian matrix of different VCM configurations with various oxygen vacancy distributions. During prediction, the average error of the H entries does not exceed \sim 2 meV with respect to DFT [ 13 ] . Note that EGNNs scale with O(N) , where N is the number of atoms, and DFT with O(N^{3}) . Fig. 6: Transmission function through a TiN-HfO 2 -Ti/TiN valence change memory cell as computed from ab-initio quantum transport with a DFT Hamiltonian (solid blue curve) and with a Hamiltonian predicted from machine learning after proper training (dashed red curve). The band gap of the HfO 2 insulator layer, E_{G,HfO_{2}} , is indicated with a double arrow. IV Outlook: Machine Learning Through parallelization and dedicated algorithms, the solution of the NEGF equations can be massively accelerated, which enables the treatment of large atomic systems at unprecedented levels of accuracy. However, the construction of the key ingredient for ab-initio QT simulations, the DFT Hamiltonian matrix, remains a challenge, especially in structures made of thousands of atoms. Indeed, DFT scales with O(N^{3}) , N being the number of atoms. Recently, machine-learning techniques based on equivariant graph neural networks (EGNNs) have been proposed to accurately predict the entries of Hamiltonian matrices, after training with DFT data [ 5 ] . Such approaches scale with O(N) , significantly outperforming DFT, but the training cost can be expensive, and most implementations are limited to small domains ( < 150 atoms). To be of practical relevance, machine-learned methods should allow for the prediction of multiple Hamiltonian matrices from a single training set. Devices with atomic geometries evolving over time are ideal candidates for that. For example, by applying a voltage to a valence change memory (VCM) cell, oxygen vacancies start moving from one electrode to the other, altering the resistance of this component in the process. To simulate the “current vs. voltage” characteristics of VCMs, their Hamiltonian matrix must therefore be recomputed at each applied voltage. To speed up such calculations, we have developed an EGNN capable of producing the Hamiltonian matrix of devices containing thousands of atoms and have shown that it can return the desired entries for different oxygen vacancy distributions using one single configuration as training [ 13 ] . Our methodology is displayed in Fig. 5 , whereas the energy resolved transmission function through a VCM cell with a DFT and predicted Hamiltonian is reported in Fig. 6 . Although the average error in the machine-learned Hamiltonian entries ( \sim 2 meV) is comparable to the state-of-the-art for molecules, it is not yet accurate enough to fully reproduce the behavior of the transmission function. V Conclusion In this paper, we outlined a parallelization strategy and numerical algorithm tailored to ab-initio quantum transport simulations based on DFT and NEGF. Together, they unlock the possibility to explore close-to-experiment device sizes, including relevant physical effects, e.g., carrier-carrier scattering. By further exploiting machine learning, novel opportunities arise, such as the partial elimination of DFT calculations.