Molecular ferroelectric/semiconductor interfacial memristors for artificial synapses

With the burgeoning developments in artificial intelligence, hardware implementation of artificial neural network is also gaining pace. In this pursuit, ferroelectric devices (i.e., tunneling junctions and transistors) with voltage thresholds were recently proposed as suitable candidates. However, their development is hindered by the inherent integration issues of inorganic ferroelectrics, as well as poor properties of conventional organic ferroelectrics. In contrast to the conventional ferroelectric synapses, here we demonstrated a two-terminal ferroelectric synaptic device using a molecular ferroelectric (MF)/semiconductor interface. The interfacial resistance can be tuned via the polarization-controlled blocking effect of the semiconductor, owing to the high ferroelectricity and field amplification effect of the MF. Typical synaptic features including spike timing-dependent plasticity are substantiated. The introduction of the semiconductor also enables the attributes of optoelectronic synapse and in-sensor computing with high image recognition accuracies. Such interfaces may pave the way for the hardware implementation of multifunctional neuromorphic devices.


INTRODUCTION
With the ubiquitous dissemination and increasing reliance on electronic devices, as well as the rapid development of sophisticated computing processes, the proliferating data volumes markedly raised the demand for corresponding computational hardware [1][2][3] . The physical separation between data processing and storage domains significantly affects the computing and processing capabilities of the contemporary von Neumann architecture based hardwares 4 . Hence, with the shrinking chip size, the prevailing issues of transmission delays, power consumption, and heat dissipation are also amplified. The fast pace emergence of artificial intelligence necessitating large-scale data processing in convolutional neural networks is getting incompatible with the narrow access memory bandwidth 5,6 . During the past few decades, resistive memory devices (memristors) [7][8][9] primarily with conductive filaments or Shottky-type mechanisms 10,11 , were proposed for hardware implementation of artificial synaptic simulations and neuromorphic computation 12 . Being capable of data storage and computation within one device (inmemory computing), the neuromorphic devices exhibit multi-level non-volatile promising memory function for neuromorphic computational systems 13 . Notwithstanding, the electroforming process in the development of memristors with conductive filaments demonstrates randomness, hence, the variability, endurance, and memory window of resistive memories still face challenges 14 .
Recently, ferroelectric devices including ferroelectric field-effect transistors (FeFET) [15][16][17][18][19] and ferroelectric tunneling junctions (FTJ) 20,21 with non-volatile resistive memory function and voltage thresholds were also proposed for artificial synaptic devices 22 . Resistive memory is achieved by tuning the ferroelectric polarization states of the devices, similar to the polarization procedure of synaptic membranes. However, the incompatibility with the CMOS technology, difficulty in scalability, inclusions of heavy and toxic metals, and poor biocompatibility still shadow the future of inorganic neuromorphic devices, as they did for common ferroelectric memories with high fabrication cost. Ferroelectric polymer-based FeFETs 23,24 and FTJs 25 were also investigated for neuromorphic devices, though other device architecture, i.e., bulkheterojunction diodes with the polymer and organic semiconductors usually lacking voltage thresholds, is rarely proposed for neuromorphic devices 26 . In spite of the advantages of solution processing, environmental friendliness, flexibility, and biocompatibility, the polymer devices still suffer from their poor ferroelectric properties, i.e., large coercive electric field (E c ) and small spontaneous polarization (P s ). For instance, the E c of poly (vinylidenefluoride-trifluoroethylene) (P(VDF-TrFE)) 27 with the highest performance among polymer ferroelectrics can be as large as 500 kV cm −1 which implies a large operating voltage. Moreover, the P s of P(VDF-TrFE) 28 is merely around 10 μC cm −2 , much smaller than inorganic ferroelectrics, thus having smaller amount of memory states.
Fortunately, the breakthroughs in organic ferroelectrics, including the discovery of molecular ferroelectrics (MFs) with properties comparable to those of inorganics, can open promising avenues for the neuromorphic devices. For instance, the P s of croconic acid (CA) 29 can achieve~30 μC cm −2 with a small E c of~11-29 kV cm −1 , while the P s of diisopropylammonium bromide (DIPAB) 30 can be around 23 μC cm −2 with its E c only~5 kV cm −1 . However, highquality films and high-density arrays for the promising MFs are usually difficult to be fabricated 31,32 , which impedes the development of high-performance devices. Recently, various solution processes including spin coating and in-plane liquid-phase growth was employed for the growth of MF (e.g., (R)-(-)-3-hydroxlyquinuclidinium chloride 33 and imidazolium perchlorate 34 ) films as well as their electric devices. Resistive memory functions with long retention time were observed, though related MF films are discontinuous or show bamboo-like morphology structures. We also proposed a solution strategy, i.e., surface tension-assisted drop casting strategy, for large-area high-quality DIPAB films 32 and patterned micro-device arrays 35 with high ferroelectricity. These may facilitate the conventional memory device applications for MFs. However, merely the achievements of long retention time are still not enough for neuromorphic devices, which should also demonstrate short-term memory. The potential of MFs for neuromorphic devices are still not explored to date.
Here, we demonstrate a prototype of light-sensitive molecular ferroelectric (DIPAB)/semiconductor interfacial memristors for neuromorphic devices with tunable conductive path and voltage thresholds. In contrast to the conventional P(VDF-TrFE) bulk-heterojunction memory diodes with organic semiconductors 27,33 in which P(VDF-TrFE) directly bridges top and bottom electrodes 36 , as well as the recent MF-based diodes 33,34 for conventional memory applications, organic semiconductor interlayers are sandwiched between electrodes and MF layers to intentionally introduce depolarization fields. The compensation degree of ferroelectric polarization can be tuned by the amount of free charges injected through the interlayer due to ohmic and tunneling effect caused by the MF layer's field amplification effect. It is found that the injected charges, captured by the MF/semiconductor interface as compensation charges, can contribute to the conductivity of the interface while exhibiting resistive memory functions. The introduction of semiconductor layers also provides optoelectronic functionality to the memristor, which can be self-powered and analogous to visual synaptic activity. High image recognition accuracy based on the optoelectronic memristors can be obtained by a neural network. The MF/semiconductor interfacial memristors with tunable depolarization fields and light sensitivity may lay the foundation for MF-based neuromorphic perception, and computation, as well as hardware-implemented artificial neural network (ANN) image recognition and machine vision 37 .

RESULTS AND DISCUSSION Ferroelectric properties of DIPAB/CuPc heterostructures
The interfacial devices were fabricated on multiple substrates (Supplementary Fig. 1) including SiO 2 /Si (Fig. 1a). Copper phthalocyanine (CuPc) films (50 nm) were employed as the semiconductor layers with two symmetric gold (Au) electrodes at their bottom. A high-quality DIPAB film (500 nm) was produced by using surface tension-assisted drop-casting methods (see the cross-sectional scanning electron microscope (SEM) image in Fig.  1b). As we expected 32 , the air-stable DIPAB films show a high crystallinity with a crystallographic preferential orientation along the out-of-plane c-axis ( Supplementary Fig. 2), suggesting lateral ferroelectricity. Figure 1c demonstrates a single device with a 5µm length channel and a width/length ratio of~50. It should be pointed out that electrode patterns do not show significant influence on the film properties ( Supplementary Fig. 3).
To validate the ferroelectric properties of the DIPAB film, surface morphology, and piezoresponse force microscope (PFM) images were collected as shown in Fig. 2. The root mean square roughness of the DIPAB film on CuPc films was determined to be~2 nm (Fig. 2a). Lateral (LPFM) and vertical (VPFM) piezoelectric responses were collected after poling the squared area with a 30 V tip bias, as illustrated in Fig. 2a. Mainly in-plane polarization can be observed for the DIPAB films, which is polarized by the lateral components of tip electric fields 32 . As shown in Fig. 2b, large lateral piezoelectric response was collected with a phase contrast of~180° (Fig. 2c). Instead, the amplitude and phase response of VPFM is quite weak (Fig. 2d, e). Notably, the left and right borders of the square area exhibit a zig-zag shape, suggesting that charged domain walls 38 are produced after the poling. It is natural since only screened ferroelectric polarization can be stable. Typical phase-voltage and amplitude-voltage hysteresis curves of ferroelectricity were also collected as displayed in Fig. 2f. Therefore, the as-grown DIPAB films on CuPc can still hold their ferroelectric properties with a smooth surface.
Resistive memory effect of the DIPAB/CuPc interfaces Though CuPc is a typical p-type organic semiconductor that can lead to unipolar injection (i.e., injecting merely free holes for compensation), stable ferroelectric polarization is still observed. As shown in Supplementary Fig. 4, switchable in-plane polarization is demonstrated by poling with PFM tips directly in-contact with one of the Au electrodes. The phase change for the DIPAB between the two electrodes is~180°after polarization reversal. Apparently, electron injection via CuPc for compensation also occurs, which can be ascribed to tunneling effect or breakdown of the CuPc layer due to the large fields inside, strengthened by the MF layer during poling 36 . Therefore, the DIPAB layers can also be switched using bias voltages applied to the two bottom electrodes, in spite of the existence of the CuPc interlayer.
The MF/CuPc interfacial horizontal devices were also electrically characterized, as shown in Fig. 3. It is noted that the interface between the two layers can demonstrate memristive currentvoltage (I-V) hysteresis loops (see Fig. 3a and inset) once the applied bias voltages exceed a threshold value of~5 V. For the sweep range < 5 V, no loops can be collected (see the red line). The resistive memory behavior is more distinct with a larger ON/ OFF ratio for wider sweep ranges. The ratio within the range of −10 V-+10 V can be estimated to be about 10 3 . It was noted that the behavior does not exhibit any dependence on electrodes thickness if it is not too large ( Supplementary Fig. 5). Identical to other memristors, the conductance/resistance largely depends upon the history of charge flux (Fig. 3b, Supplementary Fig. 6a, b) through the interface. Charge injection by the predecessor pulses can induce a larger current and a smaller resistance for the successive pulses with the same voltage magnitude. These are in contrast with the single MF or CuPc devices, as demonstrated in Fig. 3c. Without the CuPc layer, the MF devices exhibit typical clockwise I-V curves of ferroelectric capacitors with two displacement current peaks at around 5 V, caused by ferroelectric polarization reversal (red curve, Supplementary Fig. 7a). The coercive voltage (V c ) can thus be estimated to be around 5 V, matching well with the threshold values for the resistive memory switching in Fig. 3a. In the case of the CuPc device without MF layers, however, no distinct hysteresis loops can be obtained and ohmic behavior is observed ( Supplementary Fig. 7b). Hence, the electric properties are mainly attributed to the interface and ferroelectric polarization P of the MF layer, instead of the bulk CuPc layer. We also note that the resistance of pure CuPc devices slightly decreases even with a larger current inside (Supplementary Fig. 8) and thus a more distinct thermal effect, while a quick exponential resistance decline for the interfacial device was observed. These indicate that the current increase of the interfacial device mainly originates from an enlarged charge density determined by the history of charge flux, instead of current-induced thermal effect.
The operation of the interfacial memristors can be ascribed to the tunable blocking effect of the CuPc layer for electrons due to the field amplification effect 39 of MF layers, serving as a polarization-controlled valve for charge injection. The evolution of the ferroelectric polarization reversal for an MF/CuPc interface are labeled as 'State 1' to 'State 4' with their corresponding energy diagrams ( Fig. 3d-g), which can be regarded as a metal/ semiconductor/MF/semiconductor/metal (MSFSM) structure (Supplementary Fig. 9). Such states are also assigned in Fig. 3a. For a device pre-poled by an electric field E < -E c (Fig. 3d, 'State 1'), stable ferroelectric polarization can be achieved with compensation charges on both sides, thus generating an opposite-field E sc to the depolarization field inside the MF layer (see the arrows). Band bending occurs only in the thin compensation charges layers. Subsequently, a field E > E c is applied to the device for poling, leading to a fast ferroelectric reversal (Fig. 3e, State 2). The compensation charges in State 1 can be immediately extracted or depleted, leading to a larger extent of band bending. With the exhaustion of the free holes, the right CuPc layer becomes an insulator which also shares a part of the applied poling voltage.
The field E s in the CuPc layer at this moment can be roughly estimated based on 36 where d f and d s denote the thicknesses of the MF (d f = 5 μm) and CuPc (d s = 50 nm) layers, respectively. ε 0 is vacuum permittivity, while ε f and ε s are the relative permittivity of the MF (ε f = 85) 30 and CuPc (ε s = 3.6). By adopting the spontaneous polarization for P (23 μC cm −2 ) at V = 10 V, E s is obtained to be 59 MV/cm, much larger than the breakdown field of CuPc (~2.5 MV/cm) 36

DIPAB/CuPc interfacial synaptic devices
Since the compensating holes can move along the horizontal MF/ CuPc interface in the semiconductor side (Fig. 4a), they also contribute to the conductivity of the horizontal interface, similar to the role of conductive filaments in conventional memristors. If a negative field E reading smaller than its E c is applied to the device in state 4, polarization will not be reversed. However, partial compensation charges can be extracted, which decreases the charge density inside the CuPc layer and causes a high resistance state. For the low resistance state, the memristive conductivity enhancement in Fig. 3b can be ascribed to the transition from multi-domain to single-domain 40 (Supplementary Fig. 9), which can store more injected charges for compensation and conductivity. Only the bias voltages larger than its V c can induce the charge injections for the enhancement of the interfacial conductivity ( Fig. 3a and Supplementary Fig. 10a, b). This resembles that action potential firing in synapses can be evoked when the membrane potential reaches a threshold. It is notable that continuous charge injection induces a continuous current increasing even when the voltage bias starts to decrease (i.e., the small region of current increasing in Fig. 3a). This behavior can be suppressed by multiple sweeps (Supplementary Fig. 6a, b), confirming that full polarization could be achieved after multiple poling processes and the stored compensation charge density for conductivity becomes saturated. Finally, the device is in a thermal equilibrium state. The injected charges play the same role of released neurotransmitters in synapses 41,42 , resultantly changing the connection strength for the synapses which can be emulated by the conductivity variation of the interfacial devices. The injection-determined multi-level P r and the conductivity, make the horizontal molecular ferroelectric/semiconductor interface possible to act as a neuromorphic device.
To emulate biological synapses, the synaptic properties of the MF/CuPc interfaces were characterized. The device was poled using pulses of 10 V with a 30-ms duration and a 50-ms interval. A reading pulse of 1 V was utilized to read the conductivity (or weight) of the interface after each poling pulse. The weight increases with the number of the positive pulses (red curve in Fig.  4b), similar to the behavior of excitatory synapses. It is notable that the conductivity can also be decreased if a short pulse of −10 V is applied before reading at 1 V, exhibiting the behavior of inhibitory synapses. This can be ascribed to that the polarization is gradually reversed by the successive short negative (−10 V) pulses ( Supplementary Fig. 10c), though a single pulse cannot induce a full polarization reversal keeping the polarity of the net polarization unchanged. Partial compensation charges can be extracted, leading to a poor conductivity for the positively poled interface. Hence, the interface can emulate the behavior of synapses with synaptic connections more efficient or inefficient by repeated training 43 . It is natural since the repeated injection or extraction with short duration can change compensation charges for the stabilization of remnant polarization P r in the MF, and for the conductivity as well. Supplementary Fig. 11 shows the stability and endurance of the MF/CuPc devices under repeated multiple pulses. The on/off ratio of the interfacial conductance can still retain over 50% of its initial values even after 2000 sweeps. The  [50][51][52] . e and f Intermediate states in response to a positive poling field E > E c . The amplification effect of the MF layer can induce large stray fields in the right CuPc interlayer. Electron injection for compensation occurs due to the large stray fields inside the CuPc. g Final state, which was then read by a negative field <E c .
high reproducibility indicates that the tunneling effect or breakdown of the CuPc layer does not degrade the performance of the device. We also note that 90% (>100 devices) of our samples can exhibit the synaptic behavior. The energy consumption 40 for each event can be estimated to be 113.2 pJ-37.8 nJ during the potentiation process, which can be further improved by decreasing device sizes.
STDP as a form of competitive Hebbian learning 44 for the MF/ CuPc devices was also investigated. In such a mechanism, synaptic connections can be strengthened or weakened based on the relations between presynaptic nerve impulses and postsynaptic firing. For the MF/CuPc interfacial device, its two electrodes play the roles of pre-and post-synaptic neurons, respectively (Fig. 4c). Stimulus spikes consist of a short square pulse (500 ms width), followed by a negative pulse with a linear decay five times longer than the square pulse. The time interval between pre-and postspikes can be expressed as Δt, which is defined as the arrival time of pre-spike ahead of post-spike with their superimposed waveform as illustrated in the insets of Fig. 4d. With the change of Δt, device conductivity/synaptic weight change (ΔW) can emulate asymmetric STDP rule (Fig. 4d). The strength of synaptic connection reaches a peak value of 700% when Δt is~700 ms. As Δt increases, the causality between pre-and post-spikes becomes weaker, and ΔW tends to be zero. Therefore, the MF/ CuPc interfacial device exhibits typical features of a synapse.

DIPAB/CuPc optoelectronic synapses
In addition to the memristive behavior of the MF/CuPc interfaces with a tunable horizontal conductive path, the introduction of semiconductor CuPc layers may provide another degree of freedom for neuromorphic devices, i.e., light sensitivity for optical signal input. This enables a combination of optical and electrical stimuli to emulate synaptic behaviors, identical to the threeterminal optoelectronic synapses 45 . Photoresponses from the two terminal horizontal devices were collected by using a 633-nm laser which is only absorbed by the CuPc layer (Supplementary Fig.   12a). Though no photoresponse can be observed for a pristine device with the symmetric Au electrodes under a zero bias voltage, photocurrent can be obtained at the zero voltage after poling with a bias voltage of >V c , as shown in Fig. 5a. For a poling voltage of 10 V, it is notable that the photocurrent is proportional to the poling time with a laser pulse intensity of 25.68 mW cm −2 (duration: 100 ms, period: 200 ms). Longer poling pulses can induce a lager photoresponse which is a self-driven or selfpowered process. Hence the photocurrent also exhibits multi-level memory behavior. Commonly, strong electric fields or donor/ acceptor interfaces are always employed to dissociate excitons with strong binding energy into free holes/electrons in organic semiconductors. The photocurrent generation due to the extraction of the free charges can be ascribed to the potential difference or electrical fields between the two electrodes. Considering the symmetric inert Au electrodes, the potential difference/built-in fields are presumably the result of ferroelectric polarization. The stray fields at MF/CuPc interfaces, caused by incomplete compensation of polarization, result in the exciton dissociation and the photocurrent.
Similar to our electrical synapses, the multi-level ferroelectric polarization substantiates a neuromorphic device, combining the functions of photoreceptors and synapses. After poling with a 10 V impulse train (duration: 50 ms, period: 100 ms), photocurrent is collected from the device stimulated by 25.68 mW cm −2 laser pulses at a zero bias voltage. As the number of the poling pulses increases (i.e., stronger stimuli), the photocurrent (synaptic weight) gradually increases and reaches a peak value at about 600 pulses (see the red curve in Fig. 5b). The photoresponsivity of the saturated PSCs can achieve a value of 3.62 mA W −1 . Therefore, the light-induced PSC shows the similar behavior with the dark PSC (Fig. 4b) from the MF/CuPc interface. Importantly, the polarity of the photocurrent can be reversed by applying a voltage pulse of −10 V with a longer duration (i.e., a strong stimulus, see Supplementary Fig. 12b), which can be ascribed to the polarization reversal of the MF layer. Similar to the case of dark conditions, polarization reversal can be gradually switched in case of weak stimuli (short pulses or smaller pulse numbers of the negative poling voltage). As shown in Fig. 5b (blue curve), the photocurrent gradually decreases with weak stimuli, which emulates synaptic depression. Hence, the increasing or decreasing of the photocurrent induced by light stimuli simulates the generation of nerve impulses from retinal photoreceptors, which elicits excitatory and inhibitory synaptic responses. The retention time of the photoresponse after positive poling (10 V with a duration of 60 s) was also collected (Supplementary Fig. 12c). After 1000 s, the photocurrent can still maintain about 90% of the initial value, suggesting the LTP property. The transition from STP to LTP, which is the basis for memory, can be observed using light pulses with variable width (Fig. 5c) and intensity (Fig. 5d) 46 . The device was pre-poled with a 15 V bias for 30 s and photoresponse was collected at a constant 0.1 V bias. Strong stimuli with a pulse width of 100 ms or longer illumination time induce a larger PSC with a slower decay. Both the STP and LTP curves can be fitted with the first-order exponential decay function (Supplementary Fig. 13). These resemble the transition from short-term to long-term memory in biological synapses after repeated training. Therefore, the combination of light sensitivity and ferroelectric controllable conductivity enables a wider degree of freedom for the ferroelectric synaptic devices.

Simulations of image recognition
Since the photosensing and neuromorphic properties may emulate bio-vision functions (Fig. 6a), the MF/CuPc synapses were adopted for ANN-based image recognition. It is known that retinal photoreceptors generate nerve impulses after receiving images (i.e., light stimuli) and transmitted the impulses through synapses in the optic nerve connected with visual centers in brains for image recognition. The MF/CuPc synapses integrated functions of the retinal photoreceptors, brain-like computing, and memory behavior into a single device, while enabling the capability of insensor computing (ISC) 47 . The simulation for the in-situ recognition and classification of optical images is conducted as shown in Fig. 6b, which describes the structure of a neural network image sensor based on the proposed optoelectronic synapse 48 . Details of the training algorithm and process of mapping are given in Supplementary Fig. 14 and Methods section. Figure 6c describes the process of creating 7 × 11 pseudo optical patterns. First, the ideal binary patterns (i.e., 'F', 'U', 'D', 'A' and 'N') are generated, where '0' implies dark and '1' implies light. Based on the ideal patterns, 2 pixels are randomly turned to be '0' to generate incomplete patterns. Gaussian white noise with constant mean µ = 0 and various standard deviations σ is added to obtain noisy patterns. The pseudo optical pattern dataset ( Supplementary Fig. 15) is used to simulate actual light during the training and testing of the neural network. The network is trained on the dataset with σ = 0.7 and tested on the datasets with σ = 0.65-0.2. When the network training is over, the weight and the photoresponsivity obtained will be quantified to 4-bit width. The results (Fig. 6d) show the classification accuracy decreases with the noise growth. Furthermore, the accuracy is >95% in all cases, while virtually 100% if the noise is no more than σ = 0.4 ( Supplementary Fig. 16). Hence, the proposed device has shown its potential applications for neural network optical image sensors, thus combining the functionalities of sensing and computing on one chip.
In conclusion, we demonstrated a two-terminal optoelectronic memristor for artificial synapses with molecular ferroelectric/ semiconductor horizontal interfaces. Benefitting from the solution-processed highly crystalline DIPAB films with in-plane polarization and field amplification effect in adjacent organic semiconductors, light-sensitive MF/CuPc horizontal interfaces as a conductive path exhibit a promising memristive behavior. It is Fig. 5 The optical synaptic behavior of the MF/CuPc interfaces. a Self-driven photocurrents after poling at 10 V with different pulse duration. b Synaptic weight or conductance of the interfaces regulated by the numbers of the voltage pulses. The red line represents potentiation responses after stimulation by +10 V pulses, while the blue represents depression after stimulation by −10 V pulses. Transition from STP and LTP can be obtained by increasing the light pulse width (c) or intensity (d).
found that the electron injection at CuPc/Au contacts for the interfacial devices can be tuned by the large stray fields from the MF layer after poling. The tunable injection leads to a tunable remnant polarization and thus multi-level memory functionality resembling synaptic features. The semiconductor CuPc layer also enables the devices to materialize optoelectronic synapses, implying a possibility for artificial vision systems. Furthermore, an ANN based on the MF/CuPc devices was actualized for optical image sensing, transformation, and processing, with high recognition accuracy. Though the intrinsic large spontaneous polarization and small coercive field of DIPAB may ensure more memory states and smaller device operation voltages, other MFs including molecular ferroelectric semiconductors for optoelectronic neuromorphic devices can also be expected if multi-step polarization with tunable depolarization fields can be achieved. These observations can lay the foundation for the applications of MF/semiconductor interfaces in artificial ferroelectric synapses and hardware-implemented ANNs for neuromorphic sensing and computing.

Device fabrication
All the materials including solvents were commercially obtained, except DIPAB which was synthesized as described in ref. 30 . Various substrates including silicon, glass, and polyimide (PI) were employed which are ultrasonically cleaned with acetone, isopropanol, and deionized water for 30 min each. The residuals on the substrates were blown off using nitrogen. Subsequently, electrode patterns were developed on a spin-coated photoresist film by deep ultraviolet lithography. Cr (5 nm)/Au (60 nm) electrodes were then deposited by thermal evaporation. After lifting the resist, Au electrode pairs with a gap of 5 μm were obtained. Semiconductor interlayers of CuPc thin film were thermally evaporated. The thickness of these films was estimated to be around 50 nm. Finally, a 500-nm DIPAB film was prepared by surface tension-assisted drop casting on the CuPc layers, which can exhibit a large P r 35 of~20 μC cm −2 . To remove residual solvents, the samples are heated at 100°C in air for 1 h. The thicknesses were tested by a step profiler (Alpha-Step D-500 Stylus Profiler).

Characterizations
To characterize the devices, SEM images were recorded using a Zeiss Sigma HD scanning electron microscope. Piezoresponse force microscopy (PFM, Asylum Research, Cypher) was utilized to obtain the surface morphology and ferroelectric properties of the DIPAB films at room temperature in air. Samples were characterized with an AC tip bias of 1 V. For poling, a DC tip bias of 30 V was applied with electrodes disconnected to measurement circuits. Electrical characterization was carried out by fixing samples on a probe station with electrodes connected to the source meter (Agilent B1500A). In addition, a laser with a wavelength of 633 nm was employed for the photoconductivity measurements.

Image recognition simulation
Voltage-pulse-regulated photoresponsivity with different stimulus intensities (extracted from Fig. 5b, d) was employed for the simulation of optical image recognition. The neural network image sensor based on the proposed optoelectronic memristors, possessing the functions of sensing, storage, and computing, consists of 77 pixels which are arranged in 7 × 11 arrays to receive optical images. Each pixel serves as an input neuron, Fig. 6 Biological vision process and the ANN for sensing and recognition. a A biological visual illustration is depicted, focusing on the details of nerve cell signaling as well as synaptic connections. b The structure and principles of the ANN image sensor. c The process of creating pseudo optical patterns. d The classification accuracy decreases with the noise growth. The green bar indicates the accuracy after 4-bit weight quantization, and the purple bar indicates that of an unquantized model. The image above is a representation of the 'F' image corresponding to the different σ. The dataset includes five letters with 200 samples each. which is divided into 5 sub-pixels corresponding to five synaptic weights (SWs). Similarly, each sub-pixel is composed of two optoelectronic memristors to implement negative weight values. When each optoelectronic synapse receives the light, it will generate a corresponding photocurrent I = R × P, where P is the received illumination power and R (proportional to trained weight value W as shown in Fig. 6b) denotes the photoresponsivity of the devices which can be pre-programmed with the voltage pulses. Meanwhile, P n (1 ≤ n ≤ 77) denotes the received illumination power of each pixel, and R n,m (1 ≤ m ≤ 5) denotes photoresponsivity of each sub-pixels. The photoresponsivity R programmed by poling voltage is quantized in our simulation (R min and R max were extracted from Fig. 5b which also describes the mapping relation between R and poling pulses). Photocurrent of the sub-pixels representing the same SW are summed up according to Kirchhoff's law and collected with a differential sense amplifier, forming the Multiply-Accumulate (MAC) arithmetic 49 . After adding a bias value B m , each output can be written as Eq. (2) (Fig. 6b) R n;m P n þ B m ; 1 m 5: The result obtained is passed through the sigmoid activation function to achieve the output, where the sigmoid function is a bounded, differentiable, and real function commonly defined as σ(x) = 1/(1 + e −x ) which introduces non-linearity into the neural network model 44 . Among five output neurons, the one with the largest output value represents the classification result.
Normalized input image patterns are generated with MATLAB by turning off individual pixels and adding Gaussian white noise based on the ideal patterns. Each pattern's value is mapped with a various standard deviations range of 0-1, corresponding to the normalized optical power. Weight values are trained and quantized to 4-bit width. In the training process of the neural network, we select the Cross-entropy loss function, whose gradient will be used to update the weight of the network and photoresponsivity of the devices. As Supplementary Fig. 17 shows, the loss fast converges to the final value after four epochs, and the loss at this time is 0.038. Subsequently, a 2-layer fully connected network, which is defined with the output layer using a sigmoid activation function, is trained and tested with the noisy patterns.

DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding author upon request.