Main

Traditional artificial intelligence (AI) hardware has an architecture in which sensing, information processing and memory are physically separated. This leads to large energy and time overheads due to the frequent data shuttling between the separated hardware modules and the sequential analogue–digital conversion1,2,3. Biological nervous systems outperform artificial neural networks (NNs) based on conventional silicon hardware in terms of energy–area efficiency4,5. This efficiency is the result of the co-location of sensing, processing and memory functionalities in biological nervous systems and is essential for supporting complicated behaviours such as conditioned reflexes. The development of biologically inspired hardware could, thus, provide more efficient AI, which could be of particular value in applications that are subject to tight power and form-factor constraints such as edge computing.

The development of biologically inspired hardware that fuses sensing, memory and processing is, however, challenging. This is due to the complexities of the building blocks of the biological nervous system, which includes the receptors in the peripheral nervous system for sensing, and the synapses and neurons in the central nervous system for signal processing. Heterogeneous module integration has been used to create artificial olfactory6, tactus7 and gesture recognition8 applications. However, the sensors and processing cores in these systems are still physically separated and structurally different, impacting fabrication compatibility, integration density and conductance matching as the device dimensions are scaled down. Recent developments with in-sensor computing using a single device based on two-dimensional materials are promising9,10. However, such devices lack non-volatile memory for signal processing. Phase-change materials3,11 and redox memristors (resistive random-access memories (RRAMs))1,12 can be used for in-memory computing, but do not have sensing capabilities. High-performance devices for the homogeneous hardware implementation of artificial biological nervous systems are, thus, still unavailable13.

Solution-processed organic electrochemical transistors (OECTs), which are based on mixed ionic–electronic conductor (OMIEC) components and ion-mediated mechanisms, can operate in wet environments and with low power consumption. These devices have been shown to have either sensing or analogue memory14 capabilities similar to biological nerve cells. OECTs typically perform well in sensing applications that target certain types of signal such as chemical15,16 and electrophysical17,18 stimuli. But multi-modal sensing capabilities—which emulate biological multi-modal receptors such as TRPV1—remain limited19. Moreover, to achieve faster response times, the injected ions need to be able to freely diffuse back to the electrolyte and reinstate the channel to its initial state. This makes it difficult to implement non-volatile conductance modulation in the same device. By confining the ionic drift through enforced gate-channel open-circuit, non-volatile OECTs have been demonstrated with more than 500 analogue states and 100 s state retention20,21,22,23. However, such open-circuit conditions can only be met when heterogeneous devices, such as conductive bridge memories, are integrated with the OECTs (Supplementary Table 1). Combining reconfigurable volatile and non-volatile behaviour in an OECT that could be homogeneously integrated into hardware that can sense multiple stimuli and perform memory and processing functions (Fig. 1a) is challenging because of the contradictory ion kinetics required for volatile and non-volatile OECT behaviour.

Fig. 1: Design of the mode-switchable cv-OECT.
figure 1

a, Comparison between the biological nervous system and cv-OECT-based artificial nervous system, where cv-OECT can act as both volatile receptor and non-volatile synapse. Optical micrographs display the top view of a v-OECT (scale bar, 100 μm). b, Device architecture of v-OECT; the two dashed boxes show the ion contribution in the volatile/non-volatile mode and the chemical structure of PTBT-p, respectively. c, Cryo-EM images of the 200 °C-thermal annealed (TA) and as-cast PTBT-p films. d, Transfer curves of cv-OECT with polarizable/non-polarizable gate electrode. e, Normalized 0–1 absorbance as a function of doping potential; the inset shows the setup for UV–vis measurement. Stages I and II correspond to the doping of amorphous and crystalline regions, respectively. f, Time-resolved UV–vis spectra of channels correspond well with the device performance. g, XPS spectra of as-cast and annealed p-OECT channels doped at LGP and HGP. The pink and blue lines are the signals from [TFSI] before and after 30 nm etching. h, One-dimensional GIWAXS profile of the annealed film samples. Before measurement, the samples were doped at LGP or HGP and then grounded (Methods). Reversible displacement of the (100) peak between the high/low resistance state (HRS/LRS) suggests that the anions firmly embed among the glycol side chains in the crystalline region. i, Schematic explaining the mode-switching mechanism. The special channel dimensions and crystallization provide a high-barrier eVb between the two ionic states (1 and 2), resulting in a non-volatile behaviour. Vb denotes the voltage bias that drives the ions to overcome the barrier. LGP can only inject ions into the amorphous regions and lead to volatile behaviour. When the non-polarizable gate was used, the counterions cannot be reduced on the gate and thus they migrate into and neutralize the channel because of the reversed electric field, making the device volatile.

In this Article, we report an OECT that can provide sensing, memory and processing functions. The approach uses a vertical traverse architecture and electrode process, together with a crystalline–amorphous channel that can be selectively doped by ions to enable reconfigurable operation as a volatile receptor or a non-volatile synapse. As a receptor, the flexible device is capable of multi-modal sensing, and we use it to sense ion concentration changes in plants and record the electrocardiogram (ECG) signals, as well as for temperature sensations, gustation and artificial vision. As a non-volatile synapse, we show that it can offer 1,024 (10-bit) distinct states, wide dynamic range and state retention of more than 10,000 s. Homogeneous integration of such devices enables spike-timing-dependent plasticity (STDP) for spiking neural network (SNN) applications and conditioned reflex behaviour. We also explore, via simulations, the potential of the integrated devices to be used in real-time cardiac disease diagnoses using reservoir computing (RC).

Design strategies for dual-mode OECT

Typically, non-volatile OECTs are achieved by compensating the counterions in electrolyte, or by increasing the hopping energy barrier of ions through bonding effects or channel microstructure control24. However, for these devices, the electric field between the channel and gate reverses when the gate voltage is removed, which yields a driving force that results in the ions drifting out of the channel when extra devices are absent25,26. To realize true non-volatility, the energy barrier has to be large enough to prevent ion diffusion. Ideally, the ions should not only be blocked by the surrounding crystallites but also be firmly trapped among the compact, ordered and bulky side chains. Steps should also be taken to prevent the counterions from compensating the trapped ions. Moreover, the reversed electric field has to be weak, which indicates the importance of a deep channel. Regarding the performance of volatile OECTs, increasing the dimensions of crystalline domains may reduce the volume capacitance (C*) and ion mobility, making it difficult to capture faint signals such as electrophysical and thermal stimuli.

To achieve dual operation modes using a single OECT, we target the following features: a device architecture with large channel depth to flatten the electric field within the channel combined with a large depth/length (d/L) geometric ratio to compensate the loss of C* and ion mobility to achieve highly sensitive multi-modal perception; crystallization control to ensure the ions are trapped inside the ordered and compact molecular chains or are blocked by the bulky crystallites, which ensures the ions can easily shuttle among the amorphous chains to achieve volatile behaviour; and gate electrode process control to prevent the counterions from compensating the trapped ions.

Vertical traverse architecture design

We create a vertical traverse OECT (v-OECT; Fig. 1b and Supplementary Fig. 1) architecture gated by a 1-ethyl-3-methylimidazolium bis(trifluoromethylsulfonyl)imide ([EMIM+][TFSI]):PVDF-HFP ion gel or aqueous solution, with a naturally formed crossbar structure. The channel length L of our v-OECT ranges from 40 to 80 nm, as determined by the film thickness, whereas the channel thickness d is 100 μm, which yields a high d/L ratio of around 2,000, and can offer a high amplifying capability in the volatile mode. More importantly, the large d/L ratio leads to smaller electric potential gradients along the d direction, which prevents the trapped ions from drifting out of the channel after the gate voltages are removed, as corroborated by the non-volatile performance of p-OECTs with different channel thicknesses (Supplementary Fig. 7).

Figure 1g shows that for a p-OECT with an ultrathick channel (~2 μm), the relative quantity of F (the characteristic element of [TFSI]) in the bulk channel can be higher than at the electrolyte–channel interface. This suggests that only a small number of anions travel back to the electrolyte after the gate voltage is withdrawn. This leaves a narrow neutral interface and the majority of anions are still confined inside or are blocked by the bulky crystallites (domain size of ~30 nm, as evaluated from the cryogenic electron microscopy (cryo-EM) imaging and grazing-incidence wide-angle X-ray scattering (GIWAXS) data; Fig. 1c and Supplementary Figs. 46), resulting in the non-volatile behaviour.

Crystallization and electrode process control

We studied the effect of channel crystallinity on the volatile and non-volatile behaviour of v-OECT by tracing the fingerprint of ions using in operando ultraviolet–visible (UV–vis) absorption spectra (Supplementary Figs. 2 and 3) and synchrotron radiation X-ray scattering27,28. The measurement setup is shown in Fig. 1e (inset). The OMIEC (PTBT-p) films were annealed at different temperatures to tune the crystallinity (Fig. 1c and Supplementary Figs. 4 and 5). Figure 1e and Supplementary Fig. 2 show that the normalized 0–1 absorption peaks versus doping potential has two different slopes, which we proposed correspond to anion doping in the amorphous (stage I) and crystalline (stage II) regions, respectively, as they may reflect two different C* values (Supplementary Text). The breaking point between the two stages appears earlier with stronger absorbance and correlates with an enhancement in crystallinity and with an increasing crystal ratio, and results in a wider memory window (Supplementary Figs. 4 and 5). For both as-cast films and films annealed at 200 °C, [TFSI] can p dope the OMIEC under a high-gate potential (HGP) of −1.5 V, as indicated by the disappearance of the 0–1 absorption peak and emerged polaron signals (Fig. 1f and Supplementary Fig. 3). However, when the gate is grounded, the absorption signals of the as-cast film relax back to the initial state within 5 s, whereas the film annealed at 200 °C maintains its p-doped state, which confirms the non-volatile behaviour. When the same samples are pre-biased at a low-gate potential (LGP) of −0.7 V, the OMIEC can be partially p doped and it rapidly recovers its neutral state when the gate is grounded. We argue that the LGP can dope the amorphous region in a volatile manner. Moreover, we traced the anions in a crystalline channel directly using X-ray scattering (Fig. 1h) and observe that lamellar stacking expands from 1.39 to 1.53 nm only when sufficient HGP is supplied, suggesting that anions are trapped among the ordered and compact glycol side chains and can de-trap only when a sufficient positive potential is applied. This trapping/de-trapping process corresponds to the reversible potentiation/depression of v-OECT synapses.

The energy barrier to embed [TFSI] into the crystalline glycol side chains is around 0.8 eV when using a polarizable gold (Au) electrode, as revealed by the breakpoint potential of the 200 °C-annealed sample (Fig. 1e). If non-polarizable Ag/AgCl is used as the gate electrode, only volatile behaviour is observed. The GIWAXS and X-ray photoelectron spectroscopy (XPS) measurements show that [TFSI] can still be trapped inside the channel (Fig. 1g,h). We argue that this volatility is because the counterions ([EMIM+]) are attracted by the trapped anions in the channel and therefore compensate them. To demonstrate this, the cyclic voltammetry measurements of Au and Ag/AgCl in [EMIM+][TFSI] were conducted and we found that [EMIM+] can only be reversibly reduced to a neutral product on the Au gate when a negative voltage was applied. This redox reaction prevents the compensating effect postulated above and ensures the non-volatile behaviour of the cv-OECT at HGP (Supplementary Text and Supplementary Figs. 8 and 9). By carefully controlling the crystallinity and electrode process (Fig. 1i), volatile/non-volatile properties can be simultaneously achieved in a single cv-OECT.

Volatile receptor behaviours

To evaluate the volatile performance of v-OECTs for multi-modal biosensing functions, we applied the LGP (Fig. 2a). The signal amplification capability of the OECT depends on the channel dimensions and figure of merit (μC*). Figure 2b shows the volatile transfer curves at different channel crystallinity values. The μC* value, and thus the transconductance of v-OECTs, increases with crystallinity (Fig. 2b,c and Supplementary Figs. 10 and 11). Compared with p-OECT, the hole mobility (μ) of v-OECT benefits from the crystallinity when gated by both ion gel and aqueous solutions (Fig. 2c and Supplementary Figs. 1518), which indicates that ultrashort channel lengths may restrain the heterogeneous swelling effect in crystalline OMIECs (Supplementary Figs. 18 and 19; Supplementary Text provides a detailed discussion)29. The crystalline v-OECT annealed at 200 °C (called cv-OECT) shows a normalized peak transconductance of gm/VDS = 27 mS V–1, an on/off ratio of 5 × 105 and a subthreshold swing (SS) of 65 mV dec–1. The SS value is close to the thermodynamic limit (59.6 mV dec–1) in the subthreshold regime with VGS = 0 V, which is in contrast to the SS value of p-OECTs (121 mV dec–1) and other reported vertical electrolyte-gated transistors such as poly(diketopyrrolopyrrole-terthiophene) polymer-based vertical electrolyte gated organic field effect transistors (v-EGOFETs) (90.5 mV dec–1) (ref. 30). As a key parameter, the on/off ratio of cv-OECT can be as high as 8 × 106 through tailoring the channel geometry (Supplementary Fig. 12), a record-high value in OMIEC-based transistors.

Fig. 2: Volatile receptor behaviour.
figure 2

a, Schematic of a cv-OECT acting as a volatile multi-sensory receptor. b, Transfer curves and related transconductance of ion-gel-gated v-OECT annealed at various temperatures (pink, 200 °C; purple, 150 °C; blue, 100 °C; black, as-cast film); transfer curves (inset) with IDS plotted on a logarithmic axis show decent SS and on/off ratio (L = 40 nm and W = 100 μm, which are similar hereafter). c, Volume capacitance and normalized operando mobility of v-OECT and p-OECT (representative data from n = 3 independent devices, presented as mean values ± s.d.). d, Stability of cv-OECT tested in the ambient environment; high on/off ratio and switching speed can be maintained during the cycles. A close-up shows high-speed switching of cv-OECT operated in the volatile mode. e, Comparison of SS at around 0 V and on/off ratios for different electrolyte-gated transistors. f, Recorded IDS as a function of time on stimulating Mimosa pudica by light from a light-emitting diode and paired touch, and the paired-pulse facilitation (PPF) behaviour was captured. g, Circuit diagram and measurement setup of ECG/EMG recording using flexible cv-OECTs with ultralow power supply. h, Sample trace of the acquired ECG/EMG signals.

The ion-permeable OMIEC-based channel enables the devices to work in aqueous environments (0.1 M NaCl; Supplementary Figs. 13 and 14) without performance degradation. As for the transient behaviour, the volatile switching time of cv-OECT, calculated by a single exponential fitting, is τon = 6.67 and 0.82 ms for 104 and 400 μm2 devices, respectively (Fig. 2d and Supplementary Fig. 25). These switching times are shorter than that of p-OECT with a similar footprint (>100 ms; Supplementary Fig. 11) because of the smaller doping area of v-OECT, which also mitigates the instability issue. Hence, the cv-OECT maintains a high on/off ratio of 106 and identical switching speed after 30 min of cycling in air (Fig. 2d).

Figure 2e and Supplementary Table 2 summarize the performance of several state-of-the-art electrolyte-gated transistors in terms of their SS at 0 V and on/off ratios, which are benchmarks of power efficiency and amplification capability16,17,30,31,32,33,34,35,36. The low SS with a high on/off ratio, together with a faster response time, means our cv-OECT can be used as a power-efficient multi-sensory biological receptor. As a proof of concept, the local ion concentration changes in Mimosa pudica and Venus flytrap caused by light and mechanical stimuli were measured using our cv-OECT (Fig. 2f and Supplementary Figs. 20 and 21), without using additional amplifying circuits. Moreover, ECG recording was carried out using a flexible cv-OECT working in the subthreshold regime with low energy consumption (<1 μW) compared with PEDOT:PSS-based OECTs (typically >500 μW) (Fig. 2g and Supplementary Fig. 22)17. We also demonstrate that our cv-OECT is suitable for multi-modal sensory NNs for edge computing37 applications (Fig. 2h and Supplementary Fig. 23). As a proof of concept, cv-OECT shows gustation and temperature sensation with a high normalized response of 19.0% per decade and 3.2% per °C, respectively. The ultrashort channel together with the trap-filling effect is also promising for artificial vision applications (Supplementary Fig. 23e)38.

Non-volatile synaptic behaviours

The device architecture of the non-volatile synaptic v-OECT is the same as that of the volatile v-OECT (Fig. 3a); however, a higher gate operation voltage is used in the latter. As shown in Fig. 3b, the cv-OECT conductance change, when gated by the ion gel, can be modulated in the long term by applying gate pulses with amplitudes larger than |−0.8| V. Below this, the cv-OECT is volatile (Supplementary Fig. 27). In contrast, the as-cast device can only work in the volatile mode (Supplementary Fig. 29). The non-volatile behaviour is observed by the transfer curves that show a centrosymmetric hysteretic behaviour (Fig. 3c), providing a memory window of 2.1 V (ref. 39). We evaluated the state retention of the cv-OECT (Fig. 3d) with the gate grounded (a prerequisite for large-scale homogeneous integration in NNs). The conductance of the cv-OECT was switched between six analogue states with a wide dynamic range of 32. Each state was maintained for more than 10,000 s in ambient air with a conductance drift coefficient of γ ≈ 0.003–0.006 (R(t) = R0(t/t0)γ; Fig. 3d), which is comparable with the state-of-the-art heterostructure based on phase-change random-access memories11.

Fig. 3: Non-volatile synaptic behaviour and NNs.
figure 3

a, Schematic of the cv-OECT acting as a non-volatile synapse. b, Non-volatile conduction changes in the cv-OECT as a function of gate pulse amplitude (representative data from n = 15 continuous pulses, presented as mean values ± s.d.). The pulse greater than |−0.8| V can switch the cv-OECT to the non-volatile mode. Signals are filtered to eliminate the instrument noise and volatile spikes. c, Cyclic transfer curves of cv-OECT with polarizable gate under HGP. The centrosymmetric drain and gate currents with obvious hysteresis demonstrate the non-volatile nature. d, State retention of six specific analogue states (with the gate grounded, which are similar hereafter). Each state can be maintained for longer than 10,000 s with low drift. e, Cyclic LTP under current control (2,000 pulses, ±200 nA, 40 ms). Three reproducible LTPs with linear, symmetrical programming and one-to-one correspondence are shown (top). f, LTP of cv-OECT under voltage control. The blue/pink boxes display 1,024/50 analogue states with low switching stochasticity. g, Architecture of the homogeneous SNN based on cv-OECT. The inset shows a homogeneous 1T1R unit that contains two identical cv-OECTs. Here, SL, WL and BL denote sourceline, wordline and bitline, respectively. h, Plot of the conductance change in STDP and time delay (Δt) between the pre-/post-spike (representative data from n = 5 continuous spikes, presented as mean values ± s.d.). The inset shows the sequence and amplitude of the pulses used for the training of SNN. i, Recognition accuracies of the handwritten images from the MNIST dataset using the experimental non-ideal factors of cv-OECTs and RRAMs.

Energy- and time-efficient analogue in-memory computing requires linear, symmetric and precise conductance update, as well as a large number of states over a wide dynamic range40. As shown in Fig. 3f, the cv-OECT shows 1,024 (10-bit) distinct states over a wide dynamic conductance range in the LTP. The number of bits can be further increased by reducing the programming pulse width/amplitude (Fig. 3b and Supplementary Figs. 27 and 28). The low intrinsic conductance of our OMIEC and large transconductance of the cv-OECT are beneficial for this behaviour. As a result, the device is more resilient to memory and computing errors due to write/read noise and conductance drift even with a large density of conductance states. Although the write noise of the cv-OECT can be confined under both voltage and current control, as the nonlinearity of υP/υD = 0.20/1.63 and a high signal-to noise level of (ΔGDS/σ)2 ≈ 179 were achieved using standard 50-state programming (Fig. 3f and Supplementary Figs. 24 and 25), where σ is the standard deviation (s.d.) of the conductance update. When current pulses were applied, the cv-OECT shows (ΔGDS/σ)2 ≈ 290 together with a low cycle-to-cycle variation of ~0.49% during 2,000 potentiation/depression events in 50 cycles (Fig. 3e and Supplementary Fig. 25). The one-to-one correspondence was established between each state in the potentiation/depression process. Note that the programming pulse width and energy consumption of the cv-OECT can be shorter when the device is scaled down. For example, the 20 × 20 μm2 device enables a 200 ns write pulse followed by a short write–read delay of ~800 ns, and the switching time of the 100 × 100 nm2 device is estimated to be in almost nanoseconds (Supplementary Figs. 2628)21,41. In addition, the cv-OECT also provides a platform for mode-switchable transistors based on other channel materials (Supplementary Fig. 30). Long retention, low switching stochasticity, large number of analogue states and fast-pulsed operation make cv-OECTs a promising candidate for analogue in-memory computing to process sensory information feedback from receptors in real time.

Beyond LTP, we also demonstrated STDP, which is a fundamental local learning rule practiced by the human brain42. Our STDP synapse consists of two identical cv-OECTs, forming a homogeneous 1-transistor–1-resistor (1T1R) architecture (Fig. 3g (inset) and Supplementary Fig. 31). The source of transistor T is in series with the gate of resistor R and the IDS value of R is monitored through a read pulse (Vread). Paired nervous impulses (named pre-spike/post-spike) are applied to the synapse with a time delay (Δt). The post-spike (HGP) drops on the gate of R decrease with the increase in Δt, and they are the same as the non-volatile conductance change in R because T is volatilely tuned by the pre-spike (LGP). This relation is well fitted to a single exponential function (Fig. 3h and Supplementary Fig. 31) with a time constant of ~60 ms, which is similar to its biological counterpart42. The advantages of our hardware implementation of STDP include non-volatile, analogue and highly accurate conductance tuning compared with other emerging electronic synapses43; the large off-state resistance of the T channel is less prone to conductance drift caused by the sneak gate current21; and no need for heterogeneous integration (for example, diffusive and drift memristors) or complex pulse engineering44, providing the building blocks of a homogeneous bioplausible SNN (ref. 2).

We monolithically integrated the cv-OECTs on the same chip to implement SNNs equipped with the hardware-encoded supervised STDP learning rule (Fig. 3g). The array consists of 18 cv-OECTs, (9 Ts and 9 Rs; Fig. 4a and Supplementary Fig. 32). Every two cv-OECTs on the same row form an STDP synapse. The input to the SNN is mapped to the pulse width of the spikes. Pre-spikes (−0.8 V, 100 ms) are applied to the gates of T of different rows and the output currents are integrated by post-neurons. The neuronal states are then compared with a ‘teacher’ signal to decide whether a set or reset (−2 V or +2 V, 2 ms) post-spike should be applied to the drains of the Ts in different columns to potentiate/depress the synapses via the aforementioned STDP rule. As a result, neurons that fire together tend to wire together, a manifestation of the Hebbian learning rule. When the post-spike/pre-spike is completely overlapped, the network can also function as an artificial neural network (ANN) with parallel programming capability because of the 1T1R architecture (Supplementary Fig. 33). We compare the simulated performance of such a homogeneous single-layer SNN or ANN with the alternative implementations using RRAMs for classifying handwritten digits from the Modified National Institute of Standards and Technology (MNIST) database (Fig. 3h) based on the experimentally measured nonlinearity and cycle-to-cycle and device-to-device variation of the cv-OECT arrays (Supplementary Fig. 34). The resultant SNN shows a classification accuracy of ~89% (Fig. 3i), comparable with the result of the ANN based on a homogeneous cv-OECT array (~91%), which is higher than that of a six-bit heterogeneous RRAM-based SNN (~83%) and ANN (~87%). For practical hardware implementation, the SNN could also be homogeneously integrated with a cv-OECT-based RC to reduce the network dimensions (from 15,680F2 to 80F2 for a classification task involving MNIST database digits, where F denotes the footprint of a single cv-OECT; Methods and Supplementary Fig. 35 provide a detailed discussion).

Fig. 4: Fused sensing–processing functions.
figure 4

a, Schematic of the 1T1R learning unit that contains two identical cv-OECTs, where T and R act as the receptor and synapse, respectively. b, Image of a 9 × 2 cv-OECT array comprising 9 Ts and 9 Rs. Scale bar, 5 mm. A close-up image of the bionic learning unit in a and Fig. 3g. Scale bar, 300 μm. c, Learning process of the conditioned reflex. The inset shows the learning result (representative data from n = 3 experiments, presented as mean values ± s.d.). d, Real-time cardiac disease diagnosed by the all-homogenous integration of cv-OECTs. The 12-lead ECG signals of five kinds of cardiac patient can be captured by a 12 × 1 cv-OECT-based receptor array, which also acts as a volatile neuron under LGP for RC. The output of each receptor was divided into 13 sample points. Thus, the output of the reservoir was delivered to a 12 × 13 × 5 cv-OECT-based ANN for classification (Methods). Here, trans-impedance amplifier (TIA) and analog-to-digital converter (ADC) were used for the further processing of ANN output current. The grey dashed box shows a 1T1R unit in b. e, Simulated recognition accuracy of five kinds of ECG waveform during 800 training epochs. The inset shows the confusion matrix of classification after training.

Integrated functions for fused sensing–processing

For leveraging the dual operation mode of our cv-OECT, we mimicked the fused sensing–processing function of a biological nervous system. First, a conditioned reflex—a commonly observed behaviour that helps biocreatures to better survive—was demonstrated using a circuit similar to that of STDP (Fig. 4a,b and Supplementary Fig. 31), where T is gated via an aqueous solution with varied ion concentrations and species to perceive information, whereas R is gated by ion gel for memory. A d.c. voltage (VDD = −0.8 V) is supplied to the drain of T. When the ‘Bell’ (represented by +0.4 V signal spikes) rings, VDD has a negligible influence on the conductance (memory level) of R due to the large off-state resistance of the cv-OECT. Once the ‘Food’ signal (−0.8 V) spikes together with the ‘Bell’ signal, the GDS value of T can be temporally switched by the LGP, resulting in VGD becoming higher than −0.8 V so that the conductance of R can be tuned in a non-volatile manner. More importantly, the learning rate strongly depends on the learning environment. The effective gate potential of T is sensitive to the ion concentration and species due to the Nernst potential, resulting in the memory level of R being correlated to the anion activity (Fig. 4c, inset).

Finally, as a proof of concept, real-time cardiac disease diagnoses were achieved using an RC with all-homogeneous integration sensing–processing with identical cv-OECTs. As shown in Fig. 4d, 12-lead ECG signals of five kinds of cardiac disease were captured by a 12 × 1 cv-OECT-based receptor array, which also acted as neurons or computing nodes of a dynamic reservoir. The captured ECG signals were leaky integrated on receptors and the IDS output was then sampled and used as feedback to a 156 × 5 cv-OECT-based ANN readout map for classification. The accuracy of the simulated diagnoses based on the experimentally calibrated device models reached 100% after 700 training epochs (Fig. 4e and Methods). Note that the aforementioned multi-modal sensing, such as body temperature, fluid monitoring and virus detection, could be potentially integrated seamlessly into the reservoir, leading to portable and efficient edge AI hardware for healthcare applications.

Conclusions

We have reported OECTs that provide reconfigurable multi-modal sensing and non-volatile analogue memory capabilities. This was achieved by controlling the device architecture, channel microstructure and electrode process. Through the homogeneous integration of transistors, we created SNN chips with hardware-encoded STDP learning rules and showed that this system could provide functions such as environment-aware conditioned reflexes. Our approach could be of use in the development of edge AI devices.

Methods

Device fabrication

The synthesis method of PTBT-p can be found in the Supplementary Information. The PTBT-p was dissolved in chlorobenzene at a concentration of 20 mg ml–1. To enhance the crystallinity, 3% v/v 1-phenylnaphthalene was used as the additive, and the solution was stirred at 80 °C overnight. For the fabrication of the ion gel, ionic liquid and poly(vinylidene fluoride-co-hexafluoropropylene) (PVDF-HFP) were purchased from Sigma-Aldrich. PVDF-HFP and EMIMTFSI were completely dissolved in acetone at 50 °C, with a weight proportion of 1:4:7 (PVDF-HFP:EMIMTFSI:acetone).

Then, 5 nm Cr and 30 nm patterned Au or patterned indium tin oxide (ITO) were deposited onto the cleaned quartz wafers (or polydimethylsiloxane substrate for a flexible device) as the bottom electrode using a shadow mask. To reduce the contact resistance, the patterned electrode was treated by ultraviolet–ozone or oxygen plasma. Next, the OMIEC solution was cast onto the bottom electrode using the solution shear method under a substrate temperature of 50 °C to acquire high-quality films, followed by annealing at 100–200 °C for 1 h in a nitrogen atmosphere to enhance the crystallinity of the channels. Then, 80 nm Au was deposited as the top electrode and 50 nm Au or Ag was deposited as the gate electrode, followed by plasma-reactive ion-etching process (Oxford Plasmalab 80, 10 W, 20 s.c.c.m. O2, 10 min) to form the channel area. The channel length ranges from 40 to 60 nm to maximize the switching speed and off-state resistance. For the devices gated by the ion gel, 10 μl gel solution was directly drop coated onto the gate and channel area using a dispenser and then evacuated for 30 min. For the devices gated by the aqueous solution, to reduce the contact area between the electrode and electrolyte, a polydimethylsiloxane well was pasted onto the channel area to contain the electrolyte. To evaluate the volatile performance, a Ag/AgCl pallet was directly inserted into the ion gel or NaCl aqueous solution to provide the gate potential. For the fabrication of the p-OECTs, 5 nm Cr and 50 nm Au were deposited onto the cleaned quartz wafers and patterned through a metal lift-off process. The channel film with the thickness range from 100 to 1,000 nm was processed by the drop-cast method; after that, the OMIEC was removed everywhere except for the channel area. For p-OECTs, Au or Ag/AgCl electrode (Warner Instruments) were directly inserted into the electrolyte and used as the gate electrodes. For the fabrication of poly(styrene sulfonic acid) (PSSH)-gated organic field effect transistors, the PSSH solution was spin coated onto the PTBT-p film (600 rpm, 90 s) to form the dielectric layer with a thickness of 300 nm. The devices were then evacuated overnight to remove the residual water. A Au pallet was used as the gate electrode. The other parts of this method are identical with p-OECTs.

Electrical characterization of volatile and non-volatile operation modes

The steady-state volatile characteristics of OECTs were measured with a Keithley 2602B source measurement unit (SMU) using two channels. The first channel supplied VDS and measured the IDS, whereas the second channel provided VGS. The transient behaviour of the volatile mode is measured by a Keithley DMM 6500 digital multi-meter. For the non-volatile characteristics, the write pulse was supplied by a Tektronix TBS2000B arbitrary wave function generator and the read current was recorded by a Keithley 2602B SMU connected to the source terminal: the conductance was evaluated as GDS = Iread/Vread. For the sub-microsecond fast-pulsed operation, the conductance change channel was derived by measuring the voltage fluctuations across a load resistor in series with the cv-OECT using a Keysight DSOX3104T oscilloscope.

Physiology signal recording

During the recording, the cv-OECT-based circuit operated at VDD = −0.8 V (supplied by a 2602B SMU) and VGS = 0 V. The ECG recording was performed on a healthy volunteer. Before the ECG recording, the skin at the recording sites was totally cleaned using soap and 50% v/v isopropyl alcohol. Next, two medical gel-assisted Ag/AgCl ECG electrodes were pasted onto the skin over the left chest and right wrist, and then connected to the gate and grounded source of the cv-OECT using two Teflon-shielded cables, respectively. The ECG signal was recorded by monitoring the IDS value using a DMM 6500 digital multimeter with a sampling rate of 1 kHz. For the recording of the plant physiology signal, a Ag/AgCl wire covered with biocompatible ion gel was pasted onto the leaves or stems of plants and connected to the gate electrode of the cv-OECT. Moreover, a grounded Ag wire wrapped around a wooden stick was inserted into the soil adjacent to the plant. Other parts of this method are identical with the ECG recording. The experiment was performed in a dark room to prevent a possible light response.

Evaluation of STDP function

For the STDP function, EMIMTFSI-based ion gel was used as the gate electrode and electrolyte for both T and R OECTs. Two channels of the 2602B SMU were used to generate the pre-spike and post-spike and a Keithley 2400 SMU was used to supply the read pulse and measure the conductance change; the time delay between the spikes was controlled by customized LabVIEW 2018 software.

GIWAXS

GIWAXS measurements were performed at beamline 7.3.3 at the Advanced Light Source. Samples were prepared on p-doped Si substrates using an identical method as those used in the devices. To ensure the ions can only enter into and get out from the film from the cross section like they do in the devices, a layer of amorphous polystyrene film was deposited onto the OMIEC film using the solution shear method, which acts as the ion-blocking layer. Then, about 10 μl EMIMTFSI was dropped onto the exposed cross section followed by doping the samples at various potentials for 10 s with the substrate grounded. Potential control was carried out with a 2602B SMU with customized LabVIEW software. After doping, the ionic liquid was removed from the sample using a syringe. The 10 keV X-ray beam was incident at a grazing angle of 0.12°–0.16°, selected to maximize the scattering intensity from the samples. The scattered X-rays were detected using a Dectris Pilatus 2M photon-counting detector.

Operando UV–vis spectroscopy

Probe station and in situ UV–vis spectroscopy were combined here to carry out the measurement. Polystyrene-coated samples were prepared as mentioned in the GIWAXS section except for replacing the p-doped Si with an ITO substrate. A Au pallet was used as the working electrode with the ITO substrate grounded. Potential control was carried out with a 2602B SMU with customized LabVIEW software. Simultaneous absorption spectroscopy was carried out with a halogen white-light source (Ocean Optics, DH-2000-BAL) and an optical-fibre light path split to separate the UV–vis (Ocean Optics, FLAME-S) and near-infrared (Ocean Optics, NQ512) spectrometers. The spectroscopic data were recorded with the OceanView software.

XPS

The XPS spectra of the films doped at various potentials were taken using Thermo Fisher ESCALAB Xi+ equipped with a monochromatic Kr Al X-ray source (spot size, around 500 μm). A flood gun was used for charge compensation. The PTBT-p films used as the XPS samples were deposited onto a clean p-doped Si substrate using the drop-coating method, and the film thickness was about 2 μm.

Cyclic voltammetry and electrochemical impedance spectroscopy

The cyclic voltammetry measurements of the polarizable/non-polarizable electrode and electrochemical impedance spectroscopy measurements of the films annealed at various temperatures were taken using an Autolab electrochemical workstation. For cyclic voltammetry, a Au pallet or Ag/AgCl electrode (Warner Instruments) was used as the working electrode. For electrochemical impedance spectroscopy, PTBT-p films were deposited onto the Au-coated ITO substrate using the solution shear method, which serve as the working electrode. In both cases, a platinum plate and Ag/AgCl (saturated KCl) were used as the counter electrode and reference electrode, respectively. EMIMTFSI ionic liquid was chosen as the electrolyte.

Cryo-EM

The cryo-EM specimens were prepared as follows. In brief, the samples were floated on a glow-discharged holey-carbon-film-coated copper grid (Quantifoil R 2/2, Electron Microscopy Sciences). The grids were manually blotted using a custom-built manual plunger at room temperature. The samples were blotted for 4–5 s with Whatman No. 1 filter paper immediately before plunge freezing in liquid ethane cooled by liquid nitrogen. The flash-frozen grids were transferred into liquid nitrogen for storage. The cryo-EM samples were examined using an FEI Talos F200C TEM operating at 200 kV (high tension) at −178 °C in the low-dose mode. A Gatan 626 cryo-holder was used. The micrographs were acquired with a high-sensitivity 4,000 × 4,000 pixel FEI CETA complementary metal–oxide–semiconductor camera under magnifications of 92,000–120,000.

Simulation and training principle of ANNs/SNNs

Simulated in situ training of a single-layer ANN and SNN with both OECT and RRAM synapses have been compared. For the simulated ANN training (Fig. 3g), standard MNIST datasets are used to benchmark the learning performance. During the training phase, hardware programming inaccuracy physically extracted from the experimental measurements has been accounted. The network parameters are optimized using the stochastic gradient descent (SGD) method with a learning rate of 0.01 and batch size of 256. The training takes 25 epochs until reaching convergence.

For the simulation of cv-OECT- or RRAM-based SNNs, the same MNIST dataset is employed for easy comparison with ANNs. Here each handwritten digit of the MNIST dataset is reshaped into a 784 × 1 vector and normalized. Thus, a 784 × 2 × 10 cv-OECT-based array is required. For cv-OECT-based SNNs, each element of the input vector will be encoded as the width of a voltage pulse (with a fixed amplitude of 0.1 V). The STDP synapse comprises two identical cv-OECTs, where T works in the volatile mode and R in the same synapse works in the non-volatile mode. Synapses of the same row share a common bitline and sourceline (Fig. 3g) interfacing the input and pre-spike signals with the drains of Rs and gates of Ts, respectively. In addition, synapses of the same column share a common wordline, connecting the sources of Rs and drains of Ts with the integrate-and-fire neurons and post-spike signals, respectively. The input pulses of different widths are applied to the bitlines, immediately followed by short pre-spikes (−0.8 V) applied to the associated wordlines to switch on the Ts that experience subsequent conductance decay. The neurons integrate currents along the time. The winner-takes-all scheme is implemented using lateral inhibition between the neurons. Once an input sample is presented, one of the post-neurons will receive a teacher signal. If the winner neuron misses the teacher signal, set/reset (−V/+V) post-spikes will be applied to the drains of the Ts in different columns (sourcelines) to potentiate the synapses associated with the neuron that receives the teacher signal and depresses the synapses of the winner neuron.

The STDP characteristic of a discrete synapse was experimentally measured (Fig. 3h) and numerically fitted to the following equations.

$$\Delta {{{{W}}}}_{{{{\mathrm{depression}}}}}(\Delta t) = 0.06 - 1.81\mathrm{e}^{ - \frac{{\Delta t}}{{65.34}}}$$
$$\Delta {{{{W}}}}_{{{{\mathrm{excitation}}}}}(\Delta t) = 0.24 + 1.43\mathrm{e}^{ - \frac{{\Delta t}}{{57.73}}}$$

Here Δt is the time difference between a pre-spike and the associated post-spike. Figure 3h also illustrates the variance in programming the non-volatile OECTs under different Δt values. The deviations obey normal distributions, which have been taken into consideration of the simulation. The simulation of RRAM-based SNNs follows the same protocol. The STDP characteristic is based on another work43 where the programming noise of RRAMs has also been taken into consideration like that of OECT-based SNN simulation.

One main issue that hinders the hardware implementation of OECT-based ANN/SNN is poor device uniformity and yield, as a result of quality issues of the OMIEC thin film such as pinholes, thickness uniformity and other microscopic film defects. These issues make it difficult for the practical use of such arrays with large dimensions. To reduce the number of devices that are required for a specific task (such as image and disease classification), devices with volatile behaviour can be introduced for RC, which can reduce the dimensions of the input data of the ANN/SNN. To prove the potential of cv-OECT in hardware implementation, we proposed a homogeneous network architecture that consists of a cv-OECT reservoir and two 4 × 2 cv-OECT arrays (fully connected layer in SNN) (Supplementary Fig. 35a). RC can reduce the dimensions of the input data and thus reduce the required number of devices and dimensions of SNN. For single-layer SNN used for the classification task involving 28 × 28 digits in the MNIST dataset, the estimated network dimensions are 784F × 10F × 2 = 15,680F2 (784 inputs and 10 outputs), where F denotes the footprint of a single cv-OECT. When integrated with the RC, the network can be scaled down to F × 10F × 2 = 80F2 (four inputs and ten outputs). Importantly, in this homogeneous network, both volatile (for reservoir and T) and non-volatile (for R) behaviours of cv-OECT are indispensable. We verified the practicability of the hardware in the classification of handwritten digits in the MNIST database. The image will first be binarized, and then split and combined into an 88 × 5-bit image. These 88 × 5-bit data act as the input of the reservoir. The reservoir output is extracted from the current decay curves of the OECT (Supplementary Fig. 35c) with a fixed time delay (Δt = 20 ms) after the input. Thus, as shown in Supplementary Fig. 35b, the five-bit input can be simplified to analogue data. These data will be encoded as the width of the input pulses of the fully connected layer. The training of the fully connected layer also follows the same protocol mentioned above.

Simulation and training principle of RC for real-time cardiac disease diagnoses

In the simulation of RC for real-time cardiac disease diagnoses, the ECG signals of five categories (normal and four disease signals, namely, normal ECG (Norm.), conduction disturbance (Cd.), myocardial infarction (Mi.), ST/T change (STTC.) and hypertrophy (Hyp.)) are randomly selected from the PTB-XL, a large-scale publicly available electrocardiography dataset45, as the inputs. Each category contains 10 samples, with a total sample size of 50. Each selected sample has no significant drift in the baseline of the signal in its 12 channels of the ECG recordings. The recording of each channel consists of 10 to 13 complete heartbeats. For convenience, if the number of heartbeats is less than 13, zeros will be appended. Each heartbeat has a temporal dimension of 90. Therefore, the shape of the dataset is 50 × 12 × 13 × 90. To classify the ECG signals using an OECT-based reservoir, the ECG signal is first converted into a current signal, serving the input to the gate of a volatile OECT. A fixed-bias voltage is maintained across its source and drain. The final output is the drain current sampled at the end of the input ECG waveform. The volatile conductance evolution of the cv-OECT follows the memristive dynamics:

$$\frac{{\mathrm{d}G(t)}}{{\mathrm{d}t}} = ki\left( t \right) + nG(t).$$

Here k and n are the fitting parameters of the device, which are 10 and 2 in this simulation, respectively. Each heartbeat recording (dimension, 90) is mapped to a scalar current reading owing to the volatile behaviour of cv-OECTs under LGP, such that the shape of the output dataset is (50, 12, 13), and then the relevant results are imported into the ANN readout network that works as a linear classifier. Here seven samples of each category are used for training and three samples are used for testing.