Abstract
Machine learning is the core of artificial intelligence. Using optical signals for training and converting them into electrical signals for inference, combines the strengths of both, and thus can greatly improve machine learning efficiency. Optoelectronic memories are the hardware foundation for this strategy. However, the existing optoelectronic memories cannot modulate a large number of non-volatile resistive states using ultra-short and ultra-dim light pulses, leading to low training accuracy, slow computing speed and high energy consumption. Here, we synthesized a van der Waals layered photoconductive material, (NH4)BiI3, with excellent photoconductivity and strong dielectric screening effect. We further employed it as the photosensitive control gate in a floating-gate transistor, replacing the commonly used metal control gate, to construct an optical floating gate transistor which achieves adjustable synaptic weights under ultra-dim light without gate voltage assistance. Moreover, it shows ultra-low training energy consumption to generate a non-volatile state and the largest resistive state numbers among the known non-volatile optoelectronic memories. These exceptional performances enable the construction of one-transistor-one-memory device arrays to achieve ~99% accuracy in Artificial Neural Networks. Moreover, the device arrays can match the performance of GPU in YOLOv8 while greatly reducing energy consumption.
Similar content being viewed by others
Introduction
Training and inference are two key processes in machine learning1,2. During training, synaptic devices need to adjust weights dynamically to generate a large number of resistive states. While, during inference, non-volatile storage of these weights is required to efficiently perform matrix multiplication3,4,5. Unlike machine learning which relies on electrical or optical signals alone, utilizing optical signals for training and converting them into non-volatile electrical signals for inference combines the strengths of both. This strategy leverages the wide bandwidth of optical signals and high-speed transmission capabilities, facilitating seamless integration with external circuits through the electrical output signals6,7,8,9. Non-volatile optoelectronic memories (NVOM) are the hardware foundation for this strategy, and they are expected to modulate a large number of non-volatile resistive states using ultra-short and ultra-dim light pulses, ensuring high accuracy, fast computing speed, and low energy consumption. Meanwhile, each resistive state should not decay after the removal of the light pulse.
Floating-gate transistor (FGT) is an ideal device structure for NVOM10,11. Two-dimensional (2D) van der Waals (vdW) layered materials, with no surface dangling bonds, can reduce surface state generation, prevent carrier scattering, and thus enable fast device response, providing material base for FGTs12,13,14. However, 2D materials are usually used as channels or floating gates in FGTs to store carriers15,16,17. In this case, the synaptic weights could not be modulated through light without gate voltage assistance. The additional gate electrode poses challenges for large-scale integration and leads to increased electrical energy consumption and slow response speed18. Moreover, the device suffers from limited number of resistive states, which makes it difficult to construct neural networks with high training accuracy19.
To solve these challenges, we propose using 2D photoconductive material as photosensitive control gate, instead of the commonly used metal control gate, to construct FGT. In this device, light plays a similar role to the gate voltage in traditional FGTs, and thus we call this device optical FGT (O-FGT). Besides excellent photoconductive properties, the 2D photoconductive material used in O-FGT should have low exciton binding energy (EB) and long exciton lifetime (τ0)20,21. The low EB and long τ0 allow the separation of excitons by the electric potential difference generated inside photosensitive control gate without the assistance of additional gate voltage, and further writing into or erasing out of the floating gate layer. Unfortunately, most 2D materials have poor photoconductivity22,23. Although 2D Pb-based and Bi-based halide perovskites have excellent photoconductivity, the large EB and short τ0 significantly impede effective exciton separation and transport24,25.
Here, we synthesize a dielectric 2D photoconductive material, (NH4)BiI3, which has high density of states (DOS), low EB, and long τ0 simultaneously. The O-FGT constructed with (NH4)BiI3 as photosensitive control gate exhibits adjustable synaptic weights using light without the assistance of gate voltage and achieves non-volatile storage, showing no current decay after the removal of the light pulse, simultaneously meeting the demands of both training and inference processes. Moreover, it shows ultra-low training energy consumption (~5.25 fJ) to generate a non-volatile state and the largest resistive state numbers (up to 360) among the known non-volatile optoelectronic memories. An artificial neural network (ANN) is implemented by the on-chip trained weights of one-transistors-one-memory (1T1M) device array and achieves ~99% accuracy in nonlinear localization tasks. Moreover, the device array shows comparable performance of Graphics Processing Unit (GPU) in YOLOv8 while greatly reducing energy consumption.
Results
Synthesis, structure, and properties of (NH4)BiI3
We synthesized (NH4)BiI3 crystals by chemical vapor transport (CVT) using Bi and NH4I powders as the precursors and I2 as the transport agent (details see “Methods”, Fig. 1a, and Supplementary Fig. 1). The crystals obtained have excellent ambient stability (Supplementary Fig. 2). X-ray photoelectron spectroscopy (XPS) measurements reveal 8.94 at% N, 9.33 at% Bi, and 26.69 at% I, while CHN elemental analyses show 12.50 wt% H and 55.37 wt% N, yielding a composition of (NH4)BiI3 (Supplementary Fig. 2b–d, Table 1 and 2). Moreover, they show similar solid-state nuclear magnetic resonance (ss-NMR) spectra and Fourier transform infrared (FTIR) spectra to those of NH4I (Supplementary Fig. 3), indicating the existence of ionic group (NH4+), which is further confirmed by time-of-flight secondary ion mass spectrometry (TOF-SIMS) mapping (Supplementary Fig. 4).
a Photograph of (NH4)BiI3 crystals prepared by CVT. Scale bar, 2 cm. b Plan-view HAADF-STEM image of (NH4)BiI3 crystal, showing excellent crystallinity. Scale bar, 1 nm. c Cross-sectional HAADF-STEM image of a multilayer (NH4)BiI3 along [10\(\bar{1}\)0] direction and the corresponding high-resolution EDS mappings of Bi and I elements. Scale bar, 500 pm. d Crystal structure of (NH4)BiI3 identified by DFT calculation. e Experimental and calculated XRD patterns of (NH4)BiI3 powders. f Experimental absorption spectrum of (NH4)BiI3 crystal. g Electronic band structure and DOSs of (NH4)BiI3 calculated using HSE hybrid functional. h Calculated photoconductivity of (NH4)BiI3.
We further characterized the crystal structure of (NH4)BiI3 using atomic-level high-angle annular dark-field scanning transmission electron microscopy (HAADF-STEM). A honeycomb structure constructed by alternating Bi and I atoms is observed from in-plane HAADF-STEM image (Fig. 1b). The Fast Fourier Transform pattern confirms the hexagonal symmetry (Supplementary Fig. 5a). The cross-sectional HAADF-STEM images show that it has a vdW layered structure with an interlayer spacing of 7.24 Å and AA stacking between the adjacent layers (Fig. 1c and Supplementary Fig. 5b). Atomic-scale energy dispersive spectroscopy (EDS) mapping suggests that each layer has a sandwich structure with an I-Bi-I configuration observed from the [10\(\bar{1}\)0] direction (Fig. 1c). Bi atoms locate at the center of the octahedron composed of surrounding I6. Along the [1\(\bar{2}\)10] direction, there is a Bi vacancy every two Bi atoms (Supplementary Fig. 5b).
It is worth noting that identifying the precise positions of NH4+ ions by TEM is difficult due to their small scattering cross section26. Thus, we performed extensive density functional theory (DFT) calculations (see Methods for computational details), considering all possible configurations of NH4+ ions within the framework of BiI3 halide (space group R\(\bar{3}\)). It turns out that only one structure with a space group of P\(\bar{3}\) is stable, as shown in Fig. 1d and Supplementary Table 3, which retains the BiI3 framework after structural relaxation, while others experience severe structure distortions that deviate significantly from the BiI3 halide lattice after relaxation. This DFT-identified structure is confirmed by the good agreement between the experimental and simulated XRD patterns in the 2θ range of 20°–50° (Fig. 1e). The slight difference at the low angle region is mainly due to the residual transport agent I2 and the crystal water adsorbed by the (NH4)BiI3.
We then investigated the electronic structure of (NH4)BiI3. It shows a sharp optical absorption edge at 850 nm (Fig. 1f), indicating that (NH4)BiI3 is a semiconductor with an optical bandgap of 1.45 eV. The DFT calculated electronic band structure using a Heyd-Scuseria-Ernzerhof (HSE) hybrid functional27 yields a direct bandgap of ~1.1 eV (Fig. 1g), which is slightly lower than but reasonably agrees with the experimental value. The orbital-resolved DOSs reveal that the band edges are mainly comprised of Bi-6p and I-5p states (Fig. 1g). Interestingly, the valence band maximum consists of a flat band with small dispersion, which is separated from the other two flat bands by 0.5 eV (Fig. 1g). This explains the appearance of a plateau around 500–800 nm in the experimental optical absorption spectrum (Fig. 1f). Importantly, the presence of flat band edges results in large joint DOSs, leading to a high photoconductivity28 (Fig. 1h).
Thanks to the vdW layered structure, we can easily obtain 2D (NH4)BiI3 flakes down to 5 nm by mechanical exfoliation (Fig. 2a and Supplementary Fig. 6). According to Fig. 2b, the bandgap of (NH4)BiI3 increases from 1.45 eV (bulk) to ~3.0 eV when reducing the thickness to 5 nm. The transfer curve indicates that 2D (NH4)BiI3 flake is a n-type semiconductor (Supplementary Fig. 7). Compared with conventional trivalent Bi-based halides (e.g., BiI3, AgBiI4, and CuBiI4) and Cs3Bi2I9, there are more Born effective charges (Z*) on the Bi2+ in 2D (NH4)BiI3, resulting in a stronger dielectric screening effect21,29,30. As a consequence, 2D (NH4)BiI3 exhibits a low EB and a long τ0. To further prove the stronger dielectric screening effect, we tested the dielectric constant of 2D (NH4)BiI3 flakes of different thicknesses using capacitance-voltage (C–V) curves (Fig. 2c). The results indicate that the dielectric constant of 2D (NH4)BiI3 is significantly higher than that of other 2D materials with the same bandgap (Supplementary Fig. 8).
a AFM image of 5 nm thick 2D (NH4)BiI3 flakes on SiO2/Si substrate. Inset is the corresponding height profile along the white line. Scale bar, 2 μm. b Micro- photoluminescence spectroscopy (PL) spectra of (NH4)BiI3 flakes with different thicknesses. c Capacitance/area-voltage (C/S–V) curves of (NH4)BiI3 flakes with different thicknesses at the frequency of 1 MHz. d Temperature-dependent PL mapping of a 45 nm-thick (NH4)BiI3 flake in the range of 105–295 K with a step of 20 K. e Transient photoluminescence spectroscopy (TRPL) decay curves probed at 340 nm and 485 nm wavelengths. We fitted the curves by using formula \(I={I}_{0}+{{{{\rm{Ae}}}}}^{\tau 0}\) to obtain exciton lifetime τ0 (24 ns). f Output curves in the dark (gray line) and under 638 nm light with different power densities at VGS = 0 V and VDS from −5 V to 5 V.
Figure 2d and Supplementary Fig. 9 show that the exciton peak at ~645 nm exhibits a monotonous increase in intensity with decreasing temperature. By fitting the curve using the Arrhenius equation (see Methods), we achieve an EB of 150 meV, which is much smaller than those of reported 2D semiconductors, typically larger than 400 meV31. Meanwhile, 2D (NH4)BiI3 shows a long τ0 of ~24 ns (Fig. 2e), which is the highest among all the reported 2D materials32. Such low EB and long τ0 ensure easy dissociation and fast transport of excitons, together with the high photoconductivity, leading to a large photocurrent (Ilight = 4 nA μm−1) (Fig. 2f). Furthermore, Hall effect measurements show that 2D (NH4)BiI3 has a very low electron concentration (CE) of ~4.5 × 1010 cm−3, which is more than two orders of magnitude smaller than most of 2D materials including transition metal dichalcogenide, black phosphorous, and transition metal phosphorous sulfide, typically larger than 1013 cm−322,23. According to the formula \({I}_{{\mbox{dark}}}=\frac{{{\mbox{e}}}{D}_{{\mbox{p}}}{C}_{{\mbox{E}}}}{{L}_{{\mbox{p}}}}\), where \({D}_{{\mbox{p}}}\) is the diffusion coefficient and \({L}_{{\mbox{p}}}\) is the diffusion length, the dark current Idark of (NH4)BiI3 is suppressed to 10−14 A due to the very low CE at positive voltage for a (NH4)BiI3/Au Schottky photodiode33 (Fig. 2f), corresponding to a dark current density of ~10−15 A μm−1. Thus, 2D (NH4)BiI3 exhibits a high Ilight/Idark over 105 at 5 V in full visible region (405, 516, and 638 nm) (Fig. 2f and Supplementary Fig. 10). Notably, these values represent the lowest dark current density and highest Ilight/Idark ratio among all the reported 2D materials (Supplementary Fig. 11 and Supplementary Table 4), which make 2D (NH4)BiI3 an ideal photoconductive material.
Construction of O-FGT arrays for on-chip training ANN
Using optical signals for training and converting them into electrical signals for inference, combines the strengths of both, and thus can greatly improve machine learning efficiency. To this end, we used 2D (NH4)BiI3 as the photosensitive control gate in a MoS2-FGT with BN (5 nm)/graphene (Gr)/BN (20 nm) as the floating gate layer to construct an O-FGT (Fig. 3a and Supplementary Figs. 12, 13). In this device, we used graphene with a thickness of 15 nm to ensure sufficient charge storage and (NH4)BiI3 with a thickness of 45 nm to ensure effective device response across the entire visible light spectrum (Supplementary Note 1). One side of the (NH4)BiI3 is stacked on the top BN of floating gate layer, and the other side is grounded (Fig. 3a). In dark, the ultra-low Idark renders (NH4)BiI3 open-circuit, whereas in the presence of light, the ultra-high Ilight/Idark ratio makes (NH4)BiI3 highly conductive. The O-FGT design generates an electric potential difference inside the photosensitive control gate, which can be utilized to separate excitons generated by (NH4)BiI3 (Supplementary Note 2). In O-FGT, light plays a similar role as the gate voltage in traditional FGT. The photo-generated carriers in (NH4)BiI3 can be written into or erased from the floating gate layer, and their state can be subsequently read through MoS2 transistors.
a Schematic structure of O-FGT, in which (NH4)BiI3 is used as photosensitive control gate, BN/Gr/BN as floating gate, multilayer MoS2 as channel material, Ti/Au as source and drain electrodes. b I–V curves of the O-FGT at VDS from −5 V to 5 V in the dark and the light with a wavelength of 516 nm at room temperature. Energy-band diagrams of light writing process under negative drain voltage (c) and light erasing process under positive drain voltage (d). e Output curves of O-FGT under light pulses. An O-FGT was tuned into 360 resistive states by light, and each resistive state was read by a drain voltage sweeping from 0 to −1 V. f Retention of 360 conductance states for read noise extraction at VDS = −1 V. g Six representative cycles of light writing and erasing. In each writing process, consecutive light pulses with pulse width of 100 μs and interval time of 5 s were applied. The applied VDS was ±5 V. h Retention test of O-FGT at VDS = ± 5 V under 516 nm laser. The LRS and HRS were induced by applying drain voltage of +5 V and −5 V, respectively. The pulse width was 5 ms. An exponential fit of IDS against time using the asymptotic function (y = a + bx) was made for both LRS and HRS. The parameters for the exponential fit: a = −4.28553 × 106 and b = −0.00371 for LRS; a = −5.27506 × 106 and b = 0.0023 for HRS. Comparison of energy consumption per spike as a function of response time (i) and the number of states as a function of light power density (j), for O-FGT and reported non-volatile optoelectronic memories.
Figure 3b shows the I–V curves of O-FGT at VDS from −5 V to 5 V. In dark, the I–V curve of O-FGT corresponds to the output curve of traditional MoS2 transistor at VGS = 0 V. In visible light, when a negative VDS is applied, potential on the top of the BN (VF) is smaller than VGS = 0 (\(\triangle\)V = VF – VG = VF < 0, Supplementary Fig. 16b). As a result, photo-generated holes are written into floating gate layer, increasing the gate capacitance of the MoS2 transistor and consequently the conductivity (Fig. 3c and Supplementary Fig. 17a). On the contrary, when a positive VDS is applied, VGS is smaller than VF (\(\triangle\)V > 0, Supplementary Fig. 16c). As a result, photo-generated electrons are injected into the floating gate, neutralizing the holes stored in floating gate layer. This weakens the gate capacitance of MoS2 transistor, leading to a decrease in conductivity (Fig. 3d and Supplementary Fig. 17b). Notably, after removing light, the holes cannot be dissipated because of the charge barrier between graphene and BN, enabling non-volatile storage (Supplementary Note 3).
Due to the high DOS, low EB, and long τ0 of (NH4)BiI3, O-FGT generates a large number of excitons even under ultra-short and ultra-dim light pulses (10 μs, 1.05 μW cm−2). These excitons could be separated by extremely low \(\triangle\)V, facilitating the transport of charges to the floating gate for storage without the assistance of additional gate voltage. Therefore, O-FGT shows ultra-low training energy consumption per spike of 5.25 fJ to generate a non-volatile state, which is lower than that associated with human brain computation (10 fJ) (Supplementary Note 4). We further fine-tuned the device algorithms at a drain voltage range from 0 to −1 V under light to achieve 360 resistive states, corresponding to a resolution of 8 bits, which is sufficient to support the computation of complex neural networks (Fig. 3e). Furthermore, there is no significant overlap between the nearest-neighbor states, even when each state is read for 50 s, and all states do not decay after the removal of light, which lay the foundation for high-precision calculations19,34 (Fig. 3f and Supplementary Figs. 21, 22). Six cycles of 4200 successive light pulses were then applied to O-FGT to modulate the device conductance, showing distinct conductance states with high linearity, symmetry, and cycle-to-cycle stability (Fig. 3g). O-FGT also has remarkable retention and can retain nonvolatile memory over 104 s at both low resistance state (LRS) and high resistance state (HRS) (Fig. 3h).
It is worth noting that O-FGT generates the largest number of resistive states among non-volatile optoelectronic memories and shows ultra-low training energy consumption (Fig. 3i, j and Supplementary Tables 5, 6). Moreover, the synaptic weight of O-FGT can be controlled by the light information including light wavelength, light power density, light frequency, and light pulse width (Supplementary Note 5). We also replaced (NH4)BiI3 with other common 2D materials (here, WSe2 and perovskite BA2PbI4) as the control gate of FGT to test the synaptic behavior. Due to the lack of strong dielectric shielding effect, these devices cannot achieve the same functionalities and performances as the O-FGT (Supplementary Fig. 25), confirming the necessity of use of 2D (NH4)BiI3 to achieve O-FGT.
To verify machine learning functions, we constructed a 1T1M O-FGT array as the hardware for an ANN (Fig. 4a). In the array, the source electrode of the p-type carbon nanotube (CNT) transistors was connected to the drain electrode of the O-FGT, and each O-FGT was controlled by adjacent CNT transistors (Supplementary Note 6). Since O-FGT can achieve charge writing and erasing relying on light pulses without the assistance of an additional gate, electrical connection and integration of O-FGT array become simple (Supplementary Note 7), facilitating its interconnection with external circuits and machine learning process (Supplementary Note 8). The drain electrodes of the CNT transistors in each row were connected to form the “bit line”, and the gate electrodes of the CNT transistors in each column were connected to form the “word line”. Meanwhile, the source electrodes of the O-FGTs in each column were connected and grounded to form the “ground line” (Supplementary Fig. 27c). It is worth noting that although the “bit line” activates a column of transistors simultaneously, other devices cannot change their resistive state without “word line” access, effectively preventing device crosstalk (Fig. 4b). The ANN that we constructed is composed of three neuronal layers to accomplish the nonlinear localization task within a 2D space and is physically realized by a 2 × 8 array and an 8 × 3 array of 1T1M O-FGT units (Fig. 4a, c and Supplementary Fig. 28).
a Optical image of O-FGT array for ANN operation (left). Scale bar, 100 μm. Microscopic image of an O-FGT unit in the array consisting of a CNT transistor and an O-FGT (right). Scale bar, 10 μm. b Output curves of an O-FGT unit when applying −1 V and 0 V gate voltage to CNT transistor. Under 0 V gate voltage, the CNT transistor is closed, rendering the O-FGT off. Under −1 V gate voltage, the CNT transistor would be turned on, activating the O-FGT device. c Scene illustration of the nonlinear localization task within a 2D space. This nonlinear classification requires a neural network with at least two synapse layers. The target of this ANN classifies the location data as “blue (2)” “red (1)” or “black (0)” with high accuracy. d, e Training the ANN using O-FGT array. The loss and accuracy as a function of training epoch (d). The training finished at the 70th epoch with 97.5% accuracy. Training classification results of the initial and the 10th, 19th, and 38th epochs are plotted. The distribution of synaptic weight parameters before and after training (e). The training and test sets are 720 and 180, respectively.
The machine learning process based on O-FGT array consists of two steps: light pulse training and weight storing for inference (matrix multiplication). During training process, we determined the selected device through the “bit line” and “word line”. After selecting the device, its resistance state was changed by applying light pulses to complete the training process. After training, the weights were stored non-volatilely in the floating gate layer of the O-FGT and converted into the channel conductance for subsequent inference, by applying VDS and reading the IDS on each column according to Kirchhoff’s law through the “bit line” (Supplementary Note 9). The measurement setup, software, and interface were customized to facilitate the hardware testing process (Supplementary Figs. 29, 30 and Supplementary Table 7).
Figure 4d shows a typical training process using O-FGT. As the training epoch proceeded, the classifications of the dataset became clearer, making accuracy and loss gradually converge. The 3D heatmap represents the original input data and the classification results after the 10th, 19th, and 38th training cycles. Due to a large number of resistive states and excellent non-volatile storage of O-FGT, the training accuracy reached 97.5% and the accuracy of test reached 99% after the 70th epoch. The evolution of the classification positioning during the training process is shown in Supplementary Movie 1. Figure 4e shows the histogram distribution of synaptic weights before and after training, indicating that the weights have been effectively changed through the backpropagation algorithm (Supplementary Fig. 31).
O-FGT-based neural network for microorganism motion detection
To show the good scalability of O-FGT, we fabricated devices with a minimal channel length of 80 nm (Fig. 5a). The corresponding output curves under light are plotted in Fig. 5b, which shows that the device still can produce more than 256 resistive states (8 bits), consistent with the performance of micrometer-scale devices. Furthermore, the light pulse can modulate the device conductivity with excellent linearity both in writing and erasing processes (Fig. 5c). Such excellent performances enable the successful simulation of a 128 × 128 device array to implement YOLOv8 for multi-target microorganism recognition and motion detection (MDR) on 80 nm O-FGT devices35,36,37,38.
a Optical microscopy image of the short-channel O-FGT device. Scale bar, 5 μm. The inset is a SEM image of the MoS2 channel in O-FGT. Scale bar, 500 nm. b The output curves of O-FGT with the channel length of 80 nm, which was tuned into 256 resistive states by light, and each resistive state was read by a drain voltage sweeping from 0 to −1 V. c Cumulative positive and negative photo-responses with progressive multilevel states under 516 nm laser, where the laser pulse width was 10 μs. Linear fittings were made to the variations of drain current with time for both writing and erasing processes. d Structure of the YOLOv8 network used for microorganism MDR. The input is a motion video of microorganisms. Backbone part is a residual neural network (ResNet), responsible for extracting features from the input image for subsequent processing and analysis by neck part. The neck part is a feature pyramid network (FPN), used to reduce or adjust the dimensionality of features from the backbone part for better recognition and motion tracking of microorganisms. In our network, the head part is a classifier, which is responsible for extracting target and categorizing the positions of microorganisms from the feature map output by neck, and generating the results of identification and motion tracking of microorganisms. e The annotated images with detection results for microorganisms by using O-FGT array (left) and GPU (right). Calculated loss (f), precision (g), accuracy (h), and recall (i) as a function of training epochs using O-FGT array and GPU. j The motion tracking results of microorganisms using O-FGT array.
We utilized the synaptic weights generated by O-FGT for all weights of convolutional layers in the YOLOv8 network (Fig. 5d). We randomly allocated 2933 images for the training set, then used 363 images for the validation set, and finally used 326 images for the test set to assess the recognition accuracy and tracking effect. Despite a slight increase in loss compared to the GPU, it still achieved good recognition effect (Fig. 5e, f). After 100 epochs of training, the O-FGT arrays successfully identified all the features with an accuracy of 0.9143 and showed comparable precision, recall, and accuracy to the GPU (Fig. 5g–i). We further evaluated the capability of O-FGT for tracking object motion trajectory by employing the K Nearest Neighbors (KNN) algorithm to track the detection results of adjacent frames. Notably, as shown in Fig. 5j and Supplementary Movie 2, it can accurately track the motion trajectories for all types of samples (Supplementary Fig. 32 and Supplementary Table 8).
It is important to note that the number of resistive states plays a significant role in recognition accuracy and precision. As shown in Supplementary Fig. 33, both recognition precision and accuracy significantly declined with decreasing the number of resistive states, making it challenging to capture all microorganisms. When the number of resistive states is decreased to 5 bits, the accuracy drops to below 10%, with all detection boxes becoming excessively large, rendering it impossible to recognize any samples within the field of view. Consequently, it cannot be used for trajectory tracking. Even for neural networks with 6-bit resistive states, although they can recognize some samples, some areas still exhibit excessively large detection boxes that hinder the accurate capture of each sample. This is because the number of states is directly related to the diversity of selectable weights. As the number of states decreases, the precision of selection is reduced. This leads to discrepancies between the actual selectable values and the theoretically optimal values, which consequently impact the accuracy of the final outcomes. Thus, the large number of resistive states is essential for non-volatile optoelectronic memories.
In addition, the O-FGT array exhibits significantly lower energy consumption compared to the GPU, typically tens to hundreds J. As the channel width decreases, the effective area of O-FGT reduces from 500 μm2 to 0.32 μm2. For the 128 × 128 O-FGT array we simulated, the total effective area is 5242.88 μm2, resulting in a light power consumption only 0.55 fJ. Furthermore, the writing and erasing processes of 80 nm O-FGT can be achieved at a lower VDS of 0.1 V (\(\triangle\)I = 3 nA, \(\triangle\)t = 10 μs), which further reduces the electrical energy consumption to 3 fJ (Fig. 5c). For a 128 × 128 device array operating simultaneously, the total electrical energy consumption was estimated to be ~49 pJ. Moreover, our devices do not require gate voltage to modulate synaptic weights, reducing additional power consumption from gate electrode wiring in large-scale array preparation, making integration of large-area arrays simpler and more efficient. These results highlight the significant potential of our O-FGT for constructing high-efficiency machine learning.
Discussion
We synthesize a vdW layered photoconductive material, (NH4)BiI3, which shows excellent photoconductivity and strong dielectric screening effect simultaneously. By using (NH4)BiI3 as the photosensitive control gate of a MoS2-based FGT, we fabricate an optoelectronic memory O-FGT, which utilizes the photo-generated carriers of (NH4)BiI3 and realizes non-volatile adjustable synaptic weights through light in full visible region. Moreover, O-FGT shows the fastest response down to 10 μs, the lowest energy consumption (~5.25 fJ), and the largest resistive state numbers (up to 360) under ultra-dim light (1.05 μW cm−2) among the known non-volatile optoelectronic memories, as well as excellent cyclic stability and retention. The exceptional performances enable O-FGT to serve as the foundation for neural network hardware used in multilayer neural networks and microorganism motion detection, achieving an ultra-high recognition accuracy.
The use of 2D materials as photosensitive control gates provides a new concept to construct FGT, which will greatly advance the development of optoelectronic neuromorphic computing for future artificial intelligence systems. More importantly, DFT calculations show that the elements of group VA and group VIIA could potentially substitute the corresponding elements in (NH4)BiI3. This leads to a new family of metal halides with a general formula of (NH4)AZ3, where A is Bi or Sb, and Z stands for Br or I (Supplementary Fig. 34 and Supplementary Tables 9–11). These materials exhibit high DOSs and diverse electronic band structures (Supplementary Fig. 35), offering huge possibilities for exploring intriguing applications that could not be achieved by the existing materials.
Methods
Synthesis of (NH4)BiI3 crystals
The (NH4)BiI3 crystals were synthesized by a CVT method. First, 938 mg of bismuth powder (Alfa Aesar, 99.95%, 325 mesh), 259 mg of Ammonium iodide (Aladdin, 99.999%), and 40 mg of iodine (Sinopharm Chemical Reagent Co., Ltd, 99.99%) were mixed and vacuum sealed in a quartz ampoule (13 cm in length and 16 mm in diameter). Then the sealed ampoule was placed in the middle of a tube furnace (Lindberg Blue M, TF55035KC-1) for 5 days with the hot end at 750 °C and the cold end at 650 °C. After the ampoule was cooled down to room temperature, the products were collected at the cold end, and then washed with ethanol to remove the residual iodine to obtain (NH4)BiI3 crystals.
The CVT process underwent the following reactions. Bi and I2 preferentially formed BiI3, while NH4I decomposed to produce NH3. Under the NH3 atmosphere, BiI3 was reduced to form (NH4)BiI339, which is different from most Bi-based metal halides prepared by the reported low-temperature solution method, where Bi is in the +3 oxidation state.
To validate the above mechanism, only Bi and I2 were used as raw materials in the control experiments. In this case, a black powder was obtained, which was identified as BiI3. Subsequently, NH4I was introduced for further reaction, resulting in (NH4)BiI3 crystals.
Characterizations of (NH4)BiI3
XPS (ESCALAB 250 instrument with Al Kα and He I radiation sources) and CHN elemental analyses (UNICUBE—Elementar vario MACRO Vario EL cube) were used to characterize the element compositions of (NH4)BiI3. The XPS spectra were fitted using the XPS peak 4.1 software in which a Shirley background was assumed. FTIR absorption spectra of NH4I and (NH4)BiI3 were tested by FTIR (Shimazu IRAffinity—1S Japan) ranging from 400 to 2000 cm−1 using air as the background. To this end, a small amount of NH4I or (NH4)BiI3 solid was mixed with KBr and ground into thin sheets. TOF-SIMS analyses were carried out using a TOF-SIMS 5 spectrometer (ION TOF, GmbH—Muenster, Germany). The analysis chamber was maintained at a pressure of 1 × 10−9 mbar. A pulsed 30 keV Bi+ primary ion source was employed for analyses at a current of 1.0 pA. The structure of bulk (NH4)BiI3 crystals was characterized by XRD (Rigaku, D/MAX 2400 using Cu Kα radiation). ss-NMR experiments were carried out on a BRUKER AVANCE III HD 400 spectrometer equipped with a 1.9 mm DVT probe at 1H observed frequencies of 400.2 MHz. HAADF-STEM imaging and EDS mapping were performed on a FEI Titan Cube Themis G2 300 instrument equipped with a high-brightness field-emission gun (X-FEG), double spherical aberration corrector, and a monochromator. Both plan-view and cross-sectional images were obtained at 300 kV. The morphology and thickness of (NH4)BiI3 flake were characterized by optical microscope (Nikon Eclipse LV100ND), SEM (Nova NanoSEM 430, 10 kV/5 kV), and AFM (Bruker Dimension Icon). We utilized kelvin probe force microscopy (KPFM) to analyze the built-in electrical field under light.
Raman spectra were measured using a Jobin Yvon LabRam HR800, excited by a 532/325 nm laser. PL spectroscopy measurements were performed by using a confocal μ-PL system (WITec, alpha-300) with a 532/325 nm laser excitation source. Temperature-dependent PL spectra of (NH4)BiI3 were measured from 105 to 295 K with a temperature step of 20 K. We fitted the curves of the integrated PL intensity at different temperatures using the Arrhenius equation: \(I\left(T\right)={I}_{0}/[1+C{e}^{-{E}_{B}/{k}_{B}T}]\), to calculate the EB of (NH4)BiI3, where I0, C, kB are the maximum PL intensity, a constant related to trap levels, and the Boltzmann constant, respectively.
Fabrication of O-FGT devices
We first fabricated metal electrodes (Ti/Au: 5/50 nm) on p-doped silicon wafer with 300 nm SiO2 by standard photolithography, electron-beam evaporation, and lift-off processes. The pattern of metal electrodes is shown in Supplementary Fig. 12a including drain electrode, source electrode, and gate electrode (grounded). Various 2D vdW-layered materials (MoS2, BN, graphene (Gr), (NH4)BiI3) were vertically assembled using the dry-transfer method under ambient conditions. To improve the contact between MoS2 and Au, we inserted Gr between MoS2 and Au40. Polydimethylsiloxane (PDMS) was used as the medium to transfer the 2D material flakes (MoS2, BN, Gr) layer by layer onto the target substrate. A 20-nm-thick BN layer was selected as the dielectric layer of floating-gate transistor. Subsequently, few-layer (NH4)BiI3 flakes were exfoliated from the bulk (NH4)BiI3 crystals using Scotch® tape, and then transferred onto the PDMS substrate, finally released to connect the gate electrode (grounded) and MoS2 floating gate transistor to fabricate O-FGT.
Optical and electrical measurements of devices
All the electrical measurements of (NH4)BiI3 and O-FGT were performed under ambient conditions with an Agilent-B1500A semiconductor parameter analyzer and a Cascade M150 probe station. For the transfer curve measurements of (NH4)BiI3 flake, the source electrode was kept grounded, while VDS = 5 V was applied on the drain electrode and the gate voltage varied from −80 V to 80 V. For photo-response measurements of (NH4)BiI3, the VDS ranging from −5 V to 5 V with a step of 0.5 V was applied under the light pulses of 405, 516, and 638 nm, which were controlled by a laser controller (Thorlabs, ITC4001). For photo-response measurements of O-FGT, the VDS ranging from −5 V to 5 V with a step of 0.1 V were applied under the light pulses of 405, 516, and 638 nm laser. The optical power was measured with Thorlabs’ Optical Power Meter. Regarding data retention, the O-FGT was programmed to the LRS or erased to HRS and then a current sampling test ran for thousands of seconds.
Materials for O-FGT array
To ensure each O-FGT is controlled individually and minimize crosstalk between O-FGTs in the array, we designed a 1T1M device array by connecting a p-type transistor in series with each O-FGT. In O-FGT, MoS2, BN, graphene, and (NH4)BiI3 serve as the channel layer, dielectric layer, floating gate layer, and control gate, respectively. Monolayer MoS2 film on sapphire substrate, 5-layer and 10-layer BN film on Cu substrates, and 10-layer graphene film on Cu substrate (Supplementary Fig. 36) were purchased from Shanghai Onway Technology Co., Ltd, which were all prepared by the chemical vapor deposition (CVD) method. Before use, these films were transferred onto the target substrate by a solution etching transfer method41. In detail, the transfer medium, polypropylene carbonate (PPC) was first spin-coated on the CVD-grown film. After etching away the sapphire or Cu substrates by H3PO4 or copper etchant (Alfa Chemistry), the 2D material films were lifted by the target substrate. Finally, the PPC was washed off in a benzyl ether solution. This transfer process effectively maintains the film integrity and prevents wrinkles and damage (Supplementary Fig. 36), making it suitable for constructing large-area device arrays. (NH4)BiI3 single crystals were exfoliated into 2D nanosheets via liquid-phase exfoliation using n-Butyllithium as the intercalation agent and subsequently heated at 100 °C for 1 h42. After that, the nanosheets were assembled into thin films by spin-coating. The (NH4)BiI3 film exhibits similar optoelectronic properties to the flakes made by mechanical exfoliation (Supplementary Fig. 37). The channel materials used in the p-type transistors are carbon nanotube (CNT) film (Supplementary Fig. 38), which was obtained through liquid-phase deposition of semiconducting CNT dispersion in toluene43.
Fabrication of O-FGT device array
We first transferred CVD-grown MoS2 film from sapphire onto SiO2/Si substrate and patterned it using photolithography (ABM/6/350/NUV/DCCD/M) with an exposure time of 4.5 s and oxygen plasma (PR500) technology. Then, we deposited a CNT film onto its surface by liquid-phase deposition. After patterning of CNT film like MoS2 film (Supplementary Figs. 39a and 40a), we deposited electrodes of 5 nm Ti/50 nm Au by electron beam deposition with the ULVAC ei-501z system for “bit line” of the CNT transistors and source-drain electrodes of the MoS2 transistors (Supplementary Figs. 39b and 40b). The deposition rates were 0.13 nm/s for Ti and 0.19 nm/s for Au. Then, we transferred a thick BN film onto the device surface (Supplementary Figs. 39c and 40c) and etched the BN on the top of source electrode of the MoS2 transistor by RIE-10NR reactive ion etching with a gas ratio of CHF3: O2 = 20 sccm: 4 sccm, a gas pressure of 2 Pa, a power setting of 50 W, and a reaction time of 2 min. Subsequently, we connected the source electrodes of the same column of MoS2 to form “ground line” electrodes and deposited “word line” electrodes of Ti/Au to serve as the gate electrodes of CNT transistors by electron beam deposition (Supplementary Figs. 39d and 40d). Afterward, we transferred a graphene film onto the device surface and patterned it (Supplementary Figs. 39e, f and 40e), and then transferred a thin BN film and patterned it using reactive ion etching (Supplementary Figs. 39g and 40f). Finally, we spin-coated a (NH4)BiI3 thin film onto the device surface with a speed of 2000 rpm (Supplementary Figs. 39h and 40g) and patterned it through photolithography to obtain the device array (Supplementary Figs. 39i and 40h).
DFT calculations
First-principles DFT calculations were carried out using the Vienna ab initio Simulation Package (VASP)44. The generalized gradient approximation parameterized by Perdew–Burke–Ernzerhof45 was employed for the exchange-correlation function. The plane wave cutoff energy was set to 500 eV and the Brillouin zone was sampled by a Γ-centered k-point grid with the smallest allowed spacing between k points of 0.03 2 π/Å. The convergence criteria for the total energy and ionic forces were set to 10−6 eV and 5 meV/Å, respectively. The vdW interaction was treated via the Grimme’s D3 method46. The electronic band structure and DOSs were obtained using the HSE06 hybrid functional47. Spin polarization was included (Supplementary Fig. 41).
Simulation of O-FGT-based neural network for microorganism recognition and motion detection
We employed the YOLOv8 neural network to identify and detect the motion of microorganisms using a high-quality microscopic video dataset. The videos were in a three-channel MP4 format, with each frame having a resolution of 698 × 528 × 3 pixels and a frame rate of 30 frames per second (FPS). The dataset comprises 125,880 annotated objects, each marked with rectangular bounding boxes. For all the microorganisms, ground truth (GT) images were prepared manually by four biomedical engineers and two medical doctors, where the microorganisms were labeled as foreground objects with “1” and other regions as background with “0”. We made no changes to the structure of YOLOv8 but simply redeployed the model based on the resistive states of O-FGT after training.
Data availability
The authors declare that the experimental data supporting the results of this study can be found in the paper and its Supplementary Information file. The detailed data for the study is available from the corresponding author upon request.
Code availability
The VASP code is available under the release of VASP.5.4.4. The codes in Python are available from the corresponding author upon request.
References
Indiveri, G. et al. Memory and information processing in neuromorphic systems. Proc. IEEE 103, 1379 (2015).
Cui, P. & Athey, S. Stable learning establishes some common ground between causal inference and machine learning. Nat. Mach. Intell. 4, 110–115 (2022).
Ambrogio, S. et al. Equivalent-accuracy accelerated neural-network training using analogue memory. Nature 558, 60–67 (2018).
Ning, H. et al. An in-memory computing architecture based on a duplex two-dimensional material structure for in situ machine learning. Nat. Nanotechnol. 18, 493–500 (2023).
Yao, P. et al. Fully hardware-implemented memristor convolutional neural network. Nature 577, 641–646 (2020).
He, T. et al. On-chip optoelectronic logic gates operating in the telecom band. Nat. Photon. 18, 60–67 (2024).
Shastri, B. J. et al. Photonics for artificial intelligence and neuromorphic computing. Nat. Photon. 15, 102–114 (2021).
Tan, H. W. et al. An optoelectronic resistive switching memory with integrated demodulating and arithmetic functions. Adv. Mater. 14, 2797–2803 (2015).
Xu, X. et al. 11 TOPS photonic convolutional accelerator for optical neural networks. Nature 589, 44–51 (2021).
Danial, L. et al. Two-terminal floating-gate transistors with a low-power memristive operation mode for analogue neuromorphic computing. Nat. Electron. 2, 596–605 (2019).
Agarwal, S. et al. Using floating-gate memory to train ideal accuracy neural networks. IEEE J. Exp. Solid State Comp. Dev. 5, 52–57 (2019).
Liu, C. et al. Two-dimensional materials for next-generation computing technologies. Nat. Nanotechnol. 15, 545–557 (2020).
Mennel, L. et al. Ultrafast machine vision with 2D material neural network image sensors. Nature 579, 62–66 (2020).
Marega, M. et al. Logic-in-memory based on an atomically thin semiconductor. Nature 587, 72–77 (2020).
Zhang, Z. et al. All-in-one two-dimensional retinomorphic hardware device for motion detection and recognition. Nat. Nanotechnol. 17, 27–32 (2022).
Lai, H. et al. Photoinduced multi-bit nonvolatile memory based on a van der Waals heterostructure with a 2D-perovskite floating gate. Adv. Mater. 34, 2110278 (2022).
Zhou, Y. et al. Computational event-driven vision sensors for in-sensor spiking neural networks. Nat. Electron. 6, 870–878 (2023).
Zhu, R. et al. Non-volatile optoelectronic memory based on a photosensitive dielectric. Nat. Commun. 14, 5396 (2023).
Zhang, W. et al. Neuro-inspired computing chips. Nat. Electron. 3, 3711382 (2020).
He, X. et al. Dielectric behavior as a screen in rational searches for electronic materials: metal pnictide sulfosalts. J. Am. Chem. Soc. 140, 18058–18065 (2018).
Su, R. et al. Dielectric screening in perovskite photovoltaics. Nat. Commun. 12, 2479 (2021).
Li, L. et al. Quantum oscillations in a two-dimensional electron gas in black phosphorus thin films. Nat. Nanotechnol. 10, 608–613 (2015).
Siao, M. D. et al. Two-dimensional electronic transport and surface electron accumulation in MoS2. Nat. Commun. 9, 1442 (2018).
Zhang, L. et al. High-performance quasi-2D perovskite light-emitting diodes: from materials to devices. Light Sci. Appl. 10, 61 (2021).
Wu, C. et al. From Pb to Bi: a promising family of Pb-free optoelectronic materials and devices. Adv. Energy Mater. 10, 1902496 (2020).
Pennycook, S. J. Z-contrast stem for materials science. Ultramicroscopy 30, 58–69 (1989).
Krukau, A. V., Vydrov, O. A., Izmaylov, A. F. & Scuseria, G. E. Influence of the exchange screening parameter on the performance of screened hybrid functionals. J. Chem. Phys. 125, 224106 (2006).
Jiang, Z. et al. Flat bands, non-trivial band topology and rotation symmetry breaking in layered kagome-lattice RbTi3Bi5. Nat. Commun. 14, 4892 (2023).
Zhuang, R. et al. Highly sensitive X-ray detector made of layered perovskite-like (NH4)3Bi2I9 single crystal with anisotropic response. Nat. Photonics 13, 602–608 (2019).
Zhuang, R. et al. Solution-grown BiI/BiI3 van der Waals heterostructures for sensitive X-ray detection. Nat. Commun. 14, 1621 (2023).
Gunnar, B. et al. Analytical approach to excitonic properties of MoS2. Phys. Rev. B 89, 125309 (2014).
Mueller, T. & Malic, E. Exciton physics and device application of two-dimensional transition metal dichalcogenide semiconductors. npj 2D Mater. Appl. 2, 29 (2018).
Chen, Y. et al. Unipolar barrier photodetectors based on Van der Waals heterostructures. Nat. Electron. 4, 357–363 (2021).
Rao, M. et al. Thousands of conductance levels in memristors integrated on CMOS. Nature 615, 823–829 (2023).
Zhu, X. et al. High-contrast bidirectional optoelectronic synapses based on 2D molecular crystal heterojunctions for motion detection. Adv. Mater. 35, 2301468 (2023).
Choo, K. D. et al. Energy-efficient low-noise CMOS image sensor with capacitor array-assisted charge-injection SAR ADC for motion-triggered low-power IoT application. In Proc. IEEE International Solid-State Circuits Conference (ISSCC) 96–98 (IEEE, 2019).
Chen, T. & Lu, S. Object-level motion detection from moving cameras. IEEE Trans. Circuits Syst. Video Technol. 27, 2333–2343 (2016).
Li, X. et al. Foldover features for dynamic object behaviour description in microscopic videos. IEEE Access 8, 114519–114540 (2020).
Wang, H. Y. et al. Exceptional high and reversible ammonia uptake by two dimensions few-layer BiI3 nanosheets. ACS Appl. Mater. Interfaces 13, 25918–25925 (2021).
Qi, D. et al. Graphene-enhanced metal transfer printing for strong Van der Waals contacts between 3D metals and 2D semiconductors. Adv. Funct. Mater. 33, 2301704 (2023).
Mondal, A. et al. Low Ohmic contact resistance and high on/off ratio in transition metal dichalcogenides field-effect transistors via residue-free transfer. Nat. Nanotechnol. 19, 34–43 (2024).
Yang, R. et al. Synthesis of atomically thin sheets by the intercalation-based exfoliation of layered materials. Nat. Synth. 2, 101–118 (2023).
Liu, D. et al. A mixed-extractor strategy for efficient sorting of semiconducting single-walled carbon nanotubes. Adv. Mater. 29, 1603565 (2017).
Kresse, G. & Furthmuller, J. Efficient iterative schemes for ab initio total-energy calculations using a plane-wave basis set. Phys. Rev. B 54, 11169–11186 (1996).
Perdew, J. P., Burke, K. & Ernzerhof, M. Generalized gradient approximation made simple. Phys. Rev. Lett. 77, 3865 (1996).
Grimme, S. et al. A consistent and accurate ab initio parametrization of density functional dispersion correction (DFT-D) for the 94 elements H-Pu. J. Chem. Phys. 132, 154104 (2010).
Krukau, A. V. et al. Influence of the exchange screening parameter on the performance of screened hybrid functionals. J. Chem. Phys. 125, 224106 (2006).
Acknowledgements
We thank Dr. Yan Liang at the Institute of Metal Research, Chinese Academy of Sciences for the fabrication of (NH4)BiI3 FIB samples. We also thank Prof. Lei Ye and Zheng Li at Huazhong University of Science and Technology for PL and TRPL measurements. This work was supported by the National Natural Science Foundation of China (52188101 [WCR], 52172057 [JHD], 52002375 [DDZ], and 52422112 [PTL]), the Chinese Academy of Sciences (ZDBS-LY-JSC027 [WCR]), the Ministry of Science and Technology of China (2021YFA1200804 [JHD]), LiaoNing Revitalization Talents Program (No. XLYC2201003 [WCR]), the Special Projects of the Central Government in Guidance of Local Science and Technology Development (2024010859-JH6/1006 [WCR]) and Guangdong Basic and Applied Basic Research Foundation (2020B0301030002 [WCR]).
Author information
Authors and Affiliations
Contributions
W.R. conceived and supervised the project; B.T. and J.X. performed the experiments with the help of Y.W., J.Liang, C.Liu, L.M., and Y.C.; Q.W. and Z.L. characterized the crystal structure of (NH4)BiI3; P.L. and J.Li performed theoretical calculations; T.D., L.L. and C.Li provided support in neural network simulation and discussion; B.T., J.X., J.D., Y.C., and W.R. analyzed the data and wrote the manuscript; All the authors discussed the results and commented on the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks the anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available.
Additional information
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-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, 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 licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence 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 licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Tong, B., Xu, J., Du, J. et al. 2D (NH4)BiI3 enables non-volatile optoelectronic memories for machine learning. Nat Commun 16, 1609 (2025). https://doi.org/10.1038/s41467-025-56819-5
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41467-025-56819-5
This article is cited by
-
Influence of Silver Incorporation on the Optoelectronic Properties of Iodine/Iodide–Poly N-Methyl Pyrrole for Enhanced Optical Sensing
Plasmonics (2025)
-
One-Pot Synthesis of Highly Crystalline Plasmonics Iodine/intercalated Iodide-Poly N-methylPyrrole Porous Spherical Complex Nanocomposite for Optoelectronic Applications
Plasmonics (2025)