Skip to main content
Science Advances logoLink to Science Advances
. 2024 Mar 22;10(12):eadl3135. doi: 10.1126/sciadv.adl3135

Stochastic neuro-fuzzy system implemented in memristor crossbar arrays

Tuo Shi 1,2, Hui Zhang 2, Shiyu Cui 2, Jinchang Liu 2, Zixi Gu 2, Zhanfeng Wang 3, Xiaobing Yan 3,*, Qi Liu 4,*
PMCID: PMC10959402  PMID: 38517972

Abstract

Neuro-symbolic artificial intelligence has garnered considerable attention amid increasing industry demands for high-performance neural networks that are interpretable and adaptable to previously unknown problem domains with minimal reconfiguration. However, implementing neuro-symbolic hardware is challenging due to the complexity in symbolic knowledge representation and calculation. We experimentally demonstrated a memristor-based neuro-fuzzy hardware based on TiN/TaOx/HfOx/TiN chips that is superior to its silicon-based counterpart in terms of throughput and energy efficiency by using array topological structure for knowledge representation and physical laws for computing. Intrinsic memristor variability is fully exploited to increase robustness in knowledge representation. A hybrid in situ training strategy is proposed for error minimizing in training. The hardware adapts easier to a previously unknown environment, achieving ~6.6 times faster convergence and ~6 times lower error than deep learning. The hardware energy efficiency is over two orders of magnitude greater than field-programmable gate arrays. This research greatly extends the capability of memristor-based neuromorphic computing systems in artificial intelligence.


A memristive neuro-fuzzy hardware was realized, achieving >100 times greater energy efficiency than that of CMOS-based one.

INTRODUCTION

The objective of neuro-symbolic artificial intelligence is to leverage the computational strength of symbolic knowledge representation in conjunction with the adaptive learning abilities of deep neural networks (DNNs). Deep learning methods use massive amounts of data to extract information or knowledge (1). However, labeling vast amounts of data is time-consuming, resource-intensive, and expensive. In some fields, including medicine (2) and robotics (3), it is difficult to obtain enormous amounts of data. Their inability to be interpreted may violate commercial and medical ethics (4, 5). Neuro-symbolic computing have the potential to enhance the interpretability, generalization, and robustness of deep learning systems by effectively combining perception, reasoning, and learning. Furthermore, neuro-symbolic approaches have the capability to integrate prior symbolic knowledge into the training aim of DNNs, hence addressing the issue of insufficient supervision from annotated instances (6). As a result, neuro-symbolic methods are widely used in domain-specific areas where a balance between performance, interpretability and robustness is preferred, e.g., automatic control (7) and data analyzing (8).

The memristor is a two-terminal electronic component sometimes referred to as a “memory resistor” (911). It operates by leveraging physical principles to conduct computational tasks directly at the location where information is stored. This characteristic effectively eliminates the necessity of data transfer between the memory and computation. Memristors, integrated within a crossbar architecture, have been effectively used in feed-forward fully connected neural networks (1223). These networks have demonstrated notable benefits in terms of power consumption and inference delay when compared to their complementary metal oxide semiconductor (CMOS)–based equivalents (2426). However, experimental demonstrations of neuro-symbolic computing using memristors are yet to be achieved. In conventional CMOS-based hardware, the implementation of neuro-sybolic system is limited by the complexity in representing knowledge in symbolic form, which imposes a notable increase in storage, computing time and power consumption (27). Moreover, the intrinsic variability of memristors usually leads to performance degradation, especially in large arrays. Thus, two main challenges should be solved in implementation of memristive neuro-symbolic hardware: (i) an energy-efficient and compact realization of symbolic knowledge representation and (ii) utilization or depression of intrinsic memristor variability.

Here, we report experimental implementation of neuro-fuzzy computing in one-transistor–one-resistor (1T1R) crossbar array and its applications in edge detection, nonlinear system identification, and robotic navigation. The symbolic knowledge in the form of fuzzy logic and rules are represented directly using the topological structure of memristive crossbar array. Intrinsic memristor variability is found to be a source of stochastic uncertainty that enhances the robustness in knowledge representation and improves system performance, challenging the conventional perception of memristive non-idealities as negative factors. Furthermore, this study proposes a hybrid in situ training technique within the framework of software-hardware co-optimization. The objective of this strategy is to address the issue of accumulated error in computing by using crossbar arrays, hence ensuring low error in computational processes. The memristor neuro-fuzzy hardware effectively capitalizes on the computing capability of matrix-vector multiplication (MVM) and the high parallelism offered by crossbar arrays. This results in an energy efficiency of 2.61 tera-operations per second per watt (TOP s−1 W−1) at integer 8-bit (INT8) (INT8), surpassing that of state-of-the-art field-programmable gate array (FPGA) by more than two orders of magnitude. In the domain of robotic navigation, the neuro-fuzzy hardware demonstrates superior adaptability to previously unknown environments, resulting in a convergence rate around 6.6 times faster and an error rate approximately six times lower compared to deep learning approaches. Consequently, the application scope of memristor-based neuromorphic computing systems in the field of artificial intelligence is notably broadened.

RESULTS

Memristor-based neuro-fuzzy architecture

The neuro-fuzzy system based on fuzzy symbolic knowledge consists of the following parts (Fig. 1A, left): (i) fuzzifier. It accepts the input variables and converts the numerical value to linguistic variables, i.e., the conversion of a crisp set to a fuzzy set based on membership functions (MFs). The MF can be defined by domain knowledge or learned from data. (ii) Rule base and inference engine. The rule or knowledge base consists of fuzzy inference rules in a form of “if-then” formula defined by human knowledge or data learning. The inference engine simulates human thinking and decision-making modes to achieve the main purpose of problem solving. It applies fuzzy rules from the knowledge base and produce the fuzzy output. (iii) Defuzzifier. It is the reverse process of the fuzzifier, converting the conclusions generated after fuzzy inference into clear values. It should be noted that the difference between a neuro-symbolic system and a programmable fuzzy logic system is that, in a neuro-symbolic or neuro-fuzzy system, the parameters in the fuzzifier and defuzzifier are learned from training data using a learning algorithm, while a programmable fuzzy logic system may refer to an original fuzzy logic hardware in which its parameters can be configured flexibly due to the use or design of specific electric circuits or modules. As a result, the neuro component in the system is from its learning ability from training data.

Fig. 1. Architecture of a memristor-based neuro-fuzzy system.

Fig. 1.

(A) Schematic diagrams of a fuzzy inference system and the proposed neuro-fuzzy system. A typical fuzzy inference system consists of fuzzifier, knowledge or rule base, inference engine, and defuzzifier. The input and output are crisp values, while the other intermediate data are fuzzy values. Human knowledge represented as linguistic variables and if-then rules is realized implicitly using single-layer perceptrons with dedicated activation functions and explicitly using sparse connectivity. Defuzzification is based on weighted average of rule weight r and consequent output z, which is suitable to be implemented with memristive crossbar array. (B) Implicit implementation of the membership function (MF) using the neuron model in artificial neural network (ANN). (C) Explicit implementation of the MF using memristive crossbar array. The discretized MF is stored in a row/column, with each device conductance represents a discretized membership value. (D) Realization of antecedent of the fuzzy rule via sparse connections. (E) Hardware implementation of defuzzification using MVM of memristive crossbar array.

To implement the neuro-fuzzy system with memristive crossbar array using its intrinsic physics, we propose an architecture, as shown in Fig. 1A (right). The architecture is like a multilayer perceptron (MLP). Here, we take the tipping problem as an example to illustrate the implementation. The problem is how to determine the amount of tip, given two sets of numbers that, respectively, represent the quality of the service and the quality of the food at a restaurant. The fuzzifier can be implemented implicitly or explicitly. For the implicit approach (Fig. 1B), the fuzzifier is implemented as a single-layer perceptron at the first layer with particular activation functions. MFs, for example, Cauchy, Gaussian, linear, or sigmoid one, can be decomposed into a linear part and a nonlinear part. The linear part is in a form of “ax + b” and can be easily realized using the MVM computation capability of memristive crossbar arrays. While the nonlinear part is implemented as the activation function of a neuron in software. The activation functions for Cauchy, Gaussian, linear, and sigmoid MFs are 1/(1 + y2), ey2, 1 − |y| and 1/(1 + e–y), respectively. Here, y = ax + b. For the explicit approach (Fig. 1C), an MF is first discretized and then mapped to column of the array (28). MF values are represented as device conductance. As a result, memristor array in the explicit approach is used as a non-volatile memory or lookup table but not a MVM computation unit. The explicit approach has the advantage of potentially representing MFs of any form without requiring a neuronal peripheral circuit. However, it has the disadvantage of consuming a relatively large area in the memristor array. Moreover, in situ updating the MFs is very complicated because an additional computation unit is needed to first compute the updated MFs. Afterward, the calculated MFs are mapped onto the array by write-and-verify of multiple devices. For the connectivity, each input xm (m = number of input) only connects to neurons that represent its own MFs. The connection weights are learnable. The rule base and inference engine are implemented implicitly. The if-then rule is typically in a form of “If A and/or B, then C,” e.g., “If service is excellent or food is delicious, then tip is generous.” The rule and its inference engine can be categorized into Mamdani-type and Sugeno-type. The main difference is that Sugeno consequent part “C” or “tip is generous” are either linear or constant, while Mamdani consequent part is fuzzified. Thus, Sugeno-type inference is computationally efficient. Here, we implement Sugeno-type inference and leave the question of Mamdani-type one open. The antecedent part “If service is excellent or food is delicious” is implemented at the second layer, as shown in Fig. 1D; this rule defines that there is a connection between the “excellent” neuron from the “service” input and the “delicious” neuron from the “food” input. The fuzzified values after the MFs (membership degree of “poor”, “good,” or “excellent” for service input and “rancid” or “delicious” for food input) at the first layer are then calculated according to the antecedent operators (“or” in this example) to obtain the rule weight r. The input to the antecedent operators or the connectivity is defined according to the if-then rules. The connection weights are fixed at 1 in training and inference. The consequent part “then tip is generous” is realized at the first layer with the same input xm, its output “generous,” “average,” or “cheap” is represented by z = ax1 + bx2 + … + mxm + c. The connection weights of the consequent part are tunable. The defuzzifier output the weighted average of the rule weight r and rule output z. As shown in Fig. 1E, the weighted average can be implemented in memristive arrays by decomposing into MVM operations. The pairing between the antecedent and consequent defines the matching of the multiplier and multiplicand in the defuzzification. The inference engine executes the operations in the rule base, for example, the MVM operation in fuzzification and defuzzification based on memristor crossbar array, the logic operations (such as “or” and “and”) and other nonlinear operations (activation functions) using CPU in an upper computer.

Memristor-based neuro-fuzzy hardware

The hardware system used for neuro-fuzzy computing with memristor technology is developed in cooperation with the College of Electronic Science and Technology, National university of Defense Technology (Changsha, China), as depicted in Fig. 2A. It includes a universal serial bus port for communication with the upper computer, an FPGA for double-ended data transmission, and matrix switches for multichannel switching. In addition, the system comprises digital-to-analog converters (DACs) and analog-to-digital converters (ADCs) for digital and analog signal conversion. At the memristor crossbar, the input and output signals are analog. The selection of array elements is controlled by the FPGA through the matrix switches. Furthermore, a DAC is used to convert the digital input voltage signal from the FPGA into an analog input signal (voltage pulse) on the crossbar array. As for the output signal, a current-to-voltage module [transimpedance amplifier (TIA)] is used to convert the accumulated current signal of the crossbar array into the input voltage signal of the ADC. Subsequently, the ADC transforms the TIA’s analog output voltage into a digital output voltage signal. The memristor test chip is packaged using Quad Flat Pack technology, as illustrated in Fig. 2B. A close-up optical microscopy image of the cross array (64 × 128) and a cross-sectional transmission electron microscopy of the array cell are presented in Fig. 2 (C and D), respectively. Figure 2E shows typical resistive switching behavior of the array cell (100 switching cycles). The hardware system is connected to the upper computer, as shown in fig. S1. The MVM operations are executed by the memristor chip via a library-based toolchain that consists of operator libraries, runtime, application programming interfaces, and drivers. Whereas, the nonlinear operations like activation functions are performed by the CPU.

Fig. 2. Memristor neuro-fuzzy hardware.

Fig. 2.

(A) An image of the printed circuit board (PCB) hardware. A universal serial bus (USB) 3.0 port is used to communicate with a host computer. A FPGA chip is used to realize control logics. The signal conversion between analog and digital domains is realized with analog-to-digital converters (ADCs) and digital-to-analog converters (DACs). Transimpedance amplifiers (TIAs) are used to convert the current through the array to voltage signals that are then fed into the ADCs. Matrix switches control the selection of desired array cells. The RRAM chip is placed in a socket. (B) Image of a packaged RRAM chip. (C) Optical microscope image of the cells in an 8 kb (64 × 128) RRAM chip. (D) Cross-sectional transmission electron microscopy image of an array cell fabricated on metal 5 via (W plug). TE, top electrode; BE, bottom electrode; RL, resistive switching layer. (E) Typical resistive switching I-V (current-voltage relation) curves of the RRAM chip after 100 switching cycles. Gate voltages for set and reset are 1.5 and 4 V, respectively.

A typical Gaussian MF in the neuro-fuzzy system is shown in fig. S2A, where linguistic non-stochastic uncertainty is realized with the membership degree. The stochastic uncertainty is introduced into the MF by replacing the deterministic value of the membership degree with a probability distribution. A schematic of the MF, in which its membership degree obeys a Gaussian probability distribution that is commonly observed in natural processes, is shown in fig. S2B. In the three-dimensional MF, the x axis is the input, the y axis is the membership degree of the input, and the z represents the probability of the membership degree. In applications, the membership degree is truncated in the range of 0 to 1 to ensure its mathematical meaning. To implement such stochastic uncertainty with memristive variability, the variability is measured in TiN/TaOx/HfOx/TiN resistance random-access memory (RRAM) integrated in a 1T1R crossbar array chip and fabricated at 180-nm technology node (detailed in Materials and Methods). Intra-device variability is measured in a single device by programing it to 100 different conductance states and read each one for 250 times. The write-and-verify strategy for conductance tuning is shown in fig. S3. The statistical result is shown in fig. S2C, where the mean and SD of intra-device variability is 0.06065 and 1.1243 μS, respectively. Inter-device variability is characterized by performing the above measurements on 1024 devices. As shown in fig. S2D, the mean and SD of inter-device variability is 0.08119 and 1.15086 μS, respectively. The absolute skewness and kurtosis of intra- and inter-device variability are both less than 2 and 7, respectively, indicating that their distribution obeys the assumption of normality (29). An experimental realization of the most used five MFs, namely, Gaussian, Cauchy, linear, sigmoid, and difference between two sigmoid functions (DSig) in implicit and explicit approaches is shown in fig. S4. The explicit approach is realized on the 8-kb RRAM array, and the MFs are discretized to 64 parts (6 bit). The details of the MF implementation are presented in Supplementary Text and table S1. The stochastic MFs are successfully realized with memristors; other MFs can be implemented accordingly.

Image edge detection

We first demonstrate the unsupervised learning ability of the memristive neuro-fuzzy hardware in a simple image edge detection task. Edge detection is one of the most important and fundamental problems in the field of computer vision and image processing (30). The flow chart for edge detection is shown in fig. S5. First, a colored original image (Fig. 3A) is transformed to a grayscale image. Then, the following task procedure can be divided into two parts. The first part is a gradient solver. The solver calculates horizontal gradient I_x and vertical gradient I_y of the grayscale image. The gradients are then used to locate breaks in uniform regions. Calculation of gradients are based on convolutional operation. The filters are Gx = [−1, 1] for horizontal gradient and transposed Gx for vertical gradient. The gradient solver is experimentally implemented on memristive crossbar array with pixel value being represented by input voltage and filters mapped on cell conductance (detailed in Supplementary Text). The experimentally calculated horizontal and vertical gradients are shown in Fig. 3 (B and C), respectively. The second part of the procedure is performed by the memristive neuro-symbolic system. The two inputs to the system are the obtained horizontal and vertical gradients, respectively. The MFs used for the inputs are shown in fig. S6 (A and B). The Gaussian MFs are designed on the basis of human knowledge. The knowledge base is composed of two if-then rules (table S2): “If I_x is zero and I_y is zero, then I_out is white” and “If I_x is not zero or I_y is not zero, then I_out is black.” The singleton defuzzification MF is shown in fig. S6C. The weighted average of rule weights and defuzzification output is calculated on the crossbar array (detailed in Supplementary Text). The experimental edge detection result of the memristive neuro-fuzzy system using implicit fuzzifier is illustrated in Fig. 3D. Edges in the original image are clearly distinguished. Simulation results of software and the system using explicit fuzzifier (6-bit discretization of the MFs) are shown in Fig. 3 (E and F), respectively. Simply with visual observation, the results obtained by neuro-fuzzy techniques are notably better than those by Canny operator (Fig. 3G) (31) and self-organizing map (SOM; Fig. 3H) (32). Quantitative evaluations in terms of mean square error (MSE) are shown in Fig. 3I. MSE represents the average square error between the obtained edge and the original gray image, as shown in eq. S2 in Supplementary Text. The lower the MSE, the better the edge detection result. The experimental result of our system has the lowest MSE (0.08145), in comparison with software (0.08332), 6-bit explicit fuzzifier (0.08346), Canny operator (0.2593), and SOM (0.28182). The software result is obtained in an ideal neuro-fuzzy system (32-bit input and 32-bit weight) without stochastic uncertainty. While in the experiment of the memristive hardware, the intrinsic memristor conductance variability (fig. S2, C and D) can bring stochastic uncertainty to the system and thus improves system robustness and lowers the MSE. Besides, in comparison with connectionism approaches like SOM, our system can provide better interpretability because the fuzzy sets in our system are constructed on the basis of linguistic labels and are linked together through linguistic rules, which offers understanding into the reasons and mechanisms behind the generated outcomes. To further study the influence of the magnitude of stochastic uncertainty, the performances of the neuro-fuzzy system are evaluated in simulation by repeating the inference process at various variability levels for 100 times and the MSE distributions are presented in Fig. 3J. The variability is simulated as a noise of normal distribution added to device conductance. Noise level refers to the SD. It is obvious that the system performance can be improved greatly by memristor noises (≤2 μS). With increasing noise level, the performance gradually decreases because too large stochastic uncertainty exceeds the handling capability of the neuro-fuzzy system. For explicit fuzzifier, a ≥8-bit discretization can guarantee an equivalent performance to software (Fig. 3K). It should be noted that the system is highly robust to discretization because the MSE only shows a minor increase of 0.0013 when reducing the discretization levels from 10 to 6 bit. The effect of noise on explicit fuzzifier is studied in Fig. 3L. For 6- and 7-bit fuzzifier, the performance improvement capability of noise is not notable because the error brought by discretization is too huge. While for 8- to 10-bit fuzzifier, discretization error is negligible, and the effect of noise on performance improvement is notable.

Fig. 3. An unsupervised image edge detection task.

Fig. 3.

(A) An original colored image with a size of 280 × 334 × 3 where edge detection is performed. (B) Hardware-calculated image gradient along the x axis. The gray image is transformed into a two-dimensional matrix with the matrix values mapped to applied voltage pulse amplitudes. The gradient filter is [−1, 1]. (C) Hardware-calculated image gradient along the y axis, the gradient filter is [−1; 1]. (D) Experimental edge detection result obtained by the memristive hardware. (E) Simulated edge detection result obtained by software using 32-bit input and 32-bit weight. (F) Simulated edge detection results using explicit fuzzifier, the MFs are discretized to 64 levels (6 bit). (G) Simulated edge detection based on Canny operator. (H) Simulated edge detection using self-organizing map (SOM). (I) Performance evaluation of the edge detection methods. The experimental result based on the memristive neuro-fuzzy system outperforms the other methods. Because of the introduction of stochastic uncertainty, the hardware system shows lower mean square error (MSE) than that of ideal software. (J) Simulation study on the effect of noise. The performance can be improved if the noise is restricted in a reasonable region (<2 μS), which agrees with the experimental results. For each noise level, the simulation is performed for 100 times. (K) Effect of discretized bits in explicit fuzzifier. A fuzzifier with ≥8-bit discretized levels can perform as good as software. (L) Effect of noise on system performance using explicit fuzzifier with various discretized levels, each data point represents the mean value after 100 simulations. For 6-bit discretization, the noise cannot improve performance. While for other high-bit ones, performance is clearly improved by introducing reasonable noise.

Nonlinear system identification

The supervised learning ability of the memristive neuro-fuzzy hardware is demonstrated in a nonlinear system identification task of a hair dryer system (Fig. 4A) (33). In the system, air is fanned through a tube and heated at the inlet. Air temperature is measured by a thermocouple. The input u(k) is the voltage on resistor wires that heat the fanned air, and the output y(k) is the outlet air temperature, where k represents time step. The dataset, i.e., collection of input/output pairs, is obtained from literature (34). The neuro-fuzzy system for nonlinear system prediction uses three inputs and one output (Fig. 4B). The three inputs are y(k − 1), y(k − 2), and u(k − 3), and the output is y(k). The system architecture has eight sigmoid MFs for each input associated with the antecedent part of the if-then rules and eight linear MFs for the consequent part. There are 512 if-then rules in the knowledge base, of which 15 rules are listed in table S3.

Fig. 4. A supervised nonlinear system identification task.

Fig. 4.

(A) Schematic of the hair dryer system. (B) A memristive neuro-fuzzy system that predicts the dryer temperature y(k) based on historical data y(k − 2), y(k − 2), and u(k − 3) as inputs. (C) A flow chart of the proposed hybrid in situ training method. Operations implemented with memristive hardware are marked by blue boxes, while operations performed by software are indicated by orange boxes. Here, N = 1200 and M = 200. (D) Experimental training curve of the memristive neuro-fuzzy system. The blue circles are real output in the dataset, while the orange line is the predicted output in the training phase. (E) Experimental test results of the memristive hardware. (F) Performance comparison of various nonlinear system identification methods. The statistics are obtained by running each method for 100 times. The experimental results of the memristive neuro-fuzzy system (implicit fuzzifier) using hybrid in situ training method are statistically better than those of software (32-bit input and 32-bit weight), simulated explicit fuzzifier (6-bit discretization) and DNN. (G) Simulation studies of RMSE at various noise levels, confirming that device noise (≤2 μS) improves performances. At each noise level, the simulation is performed for 100 times. (H) Experimental results of ex situ inference and in situ training. Each experiment is performed for 100 times. The proposed hybrid in situ training method improves system performance notably. (I) An experimental investigation of the influence of the number of interval iterations M on RMSE. For each M value, the experiment is performed for five times. The mean RMSE at M = 200 is the lowest. (J) Study of the contributions of noises at fuzzifier and defuzzifier (tested for 100 times). Both noises contribute to the improved performance.

In in situ training of memristive neural networks, the situation is more complicated than ex situ inference because some devices may accidentally stuck at certain conductance levels. To deal with such device failure and control the overall device noise in a reasonable region to guarantee low error in error-sensitive regression tasks like nonlinear system identification, a hybrid in situ training technique is proposed under the concept of hardware-software co-optimization. As shown in Fig. 4C, the in situ training process is divided into two parts: hardware in situ training (detailed in Materials and Methods) and software in situ training. The training process (total number of training epoch is N) is a combination of hardware and software in situ training. An interval of M between software and hardware training epoch is defined. If the number of current training epoch is evenly divisible by M, then the hardware in situ training is performed at this epoch. The last training epoch is forced to be carried out with hardware in situ training. In previous works, either the last layer of the network is fine-tuned (26) or the whole network is retrained multiple times in a “chip-in-the-loop” manner (13). The first approach is limited in effectiveness because the nonlinear approximation capability of neural network is not fully exploited. Whereas, the second approach is time-consuming. Our proposed approach fully exploits the network capability and saves training time. In the in situ training of the memristive neuro-fuzzy system, we choose N = 1200 and M = 200. The weight is updated using the Adam optimizer, as detailed in Materials and Methods and table S4. The weights shown in Fig. 4C represent the conductance states of the cells in the 1T1R memristor array. After the weight is updated, the conductance value of RRAM will also be rewritten according to the needs.

The experimental training and testing result of the memristive system to nonlinear identification of the hair dryer system is shown in Fig. 4 (D and E), respectively. The real data are marked as blue circle, and the predicted data by the memristive neuro-fuzzy system are marked as orange line. The predicted data agree well with the real data. The performances and convergence speed of sigmoid, linear, Gaussian, and Cauchy MFs are studied in simulation, as shown in fig. S7A, where the sigmoid MF shows the best performance. The effect of the number of the sigmoid MF is simulated in fig. S7B. The performance of the system is evaluated by root MSE (RMSE; described in eq. S3 in Supplementary Text). The increase of MF number can notably decrease RMSE of the system, but, for more than eight functions, the RMSE stagnates. The shapes of the eight sigmoid MFs for antecedent before training are shown in fig. S8, they are initialized with random parameters (fig. S8, top). After training, the learned MFs show notable difference with the ones before training (fig. S8, bottom). The RMSE of the hardware system after the hybrid in situ training is compared with those of software, system with explicit fuzzifier, and DNN (the hyperparameters are detailed in table S5) by repeating the training for 100 times. The statistical results are shown in Fig. 4F. The RMSE mean and median of the memristive hardware are both the lowest. This experimental result is in consistence with the simulation one (Fig. 4G) and previous example of edge detection. Moreover, the performance of the hybrid in situ training is notably better than ex situ inference and in situ training, as shown in Fig. 4H. The average RMSE of in situ training (7.252) is reduced by ~78.4% via hybrid in situ training (RMSE of 1.5664). This is probably because the proposed method learns the nonidealities in real time, compared with ex situ inference, but, at the same time, avoids the error accumulation problem that originates from certain failure devices in in situ training. The influence of interval M in the hybrid in situ training is investigated experimentally in Fig. 4I. The memristive neuro-fuzzy system is experimentally trained with the values of M from 100 to 500 with a step of 50. For each M value, the experiment runs for 100 times. The mean of the RMSE first decreases from 2.66 at M = 50 to 1.607 at M = 200, then increases to 2.449 at M = 400, and stabilizes. Thus, an optimal M value exists for the proposed technique to reach the lowest RMSE. We further investigate whether the noises at fuzzifier or defuzzifier contribute to the performance improvement. In simulation, a noise of 1 μS is added to the fuzzifier, defuzzifier, and both. As shown in Fig. 4J, for system with implicit fuzzifier, the performance improvements from noisy fuzzifier and defuzzifier are almost the same. If the fuzzifier and defuzzifier are both noisy, then the performance is further improved. For system with explicit fuzzifier (6 bit), the findings on the impact of fuzzifier precision and noise on performance align with those seen in edge detection, as shown in fig. S9.

Robotics

To demonstrate the adaptation ability of the memristive neuro-fuzzy hardware to a previously unknown environment, a transfer learning task in robotics is experimentally demonstrated. A commercial two-wheel differential-drive robot is used in the robot navigation experiment (Fig. 5A). A schematic of the hardware system for robot obstacle avoidance and path planning based on the memristive neuro-fuzzy hardware system is shown in fig. S10. The perception units of the robot consist of laser radars, inertial measurement unit sensors, and odometry sensors. After sensor fusion, the position parameters, e.g., the position and orientation of the robot, the distance to obstacles, and target, are obtained by the kinematics of the two-wheel differential drive robot, as detailed in Supplementary Text and fig. S11. The parameters are then sent to a host computer. The path planning is implemented by the computer (detailed in Supplementary Text), because it is a straightforward task without uncertainties, while the obstacle avoidance is implemented with the memristive neuro-fuzzy hardware system.

Fig. 5. Robot navigation.

Fig. 5.

(A) An image of the differential-drive robot used for demonstration. (B) Navigation of the robot in a virtual cluttered environment. Robot experimentally trained using the memristive neuro-fuzzy hardware with complete knowledge outperforms the hardware with incomplete knowledge and DNN hardware without knowledge, reaching the destination successfully. (C) Convergency speed and test RMSE of angular velocity in experimental in situ training of the neuro-fuzzy hardware with complete knowledge, incomplete knowledge and DNN. By incorporating symbolic knowledge into the neuro-fuzzy system, it converges faster and shows better performance than learning totally from data. (D) Convergency speed and test RMSE of linear velocity in the above three situations. (E) Images captured during experimental robot navigation using the memristive hardware system, the obstacles that are being avoided by the robot is indicated with red triangles. (F) Real-time constructed map with visualization of the robot movement trajectory in the navigation experiment. (G) Real-time linear and angular velocity by the memristive hardware in the navigation.

Considering the situation that people have already a Mamdani-type neuro-fuzzy system for robot navigation at hand (illustrated in table S6 and fig. S12), now, a more energy-efficient Sugeno-type system is need to be constructed for a previously unknown environment, e.g., in an edge equipment. Because the difference between Mamdani- and Sugeno-type fuzzy controller only exists in their consequent part, the antecedent part of the Mamdani one can be used as prior knowledge to construct the Sugeno one. Therefore, the prior knowledge can be used to implement the antecedent part of the memristive neuro-fuzzy system, while the consequent part is learned from dataset. The calculation of the linear velocity and angular velocity of the robot involves the sharing of antecedent, as show in fig. S13. The consequent part of rule base is then calculated separately. The final weighted average defuzzification operation entails the implementation of MVM operations in parallel. Notably, the representation of each weight (positive or negative) using RRAM necessitates the conductance values of two devices, resulting in a twofold increase in the final device usage, as shown in tables S7 and S8. For comparison, a memristive neuro-fuzzy system that only preserves the network structure without prior knowledge about the weight (incomplete symbolic knowledge) and a DNN (without symbolic knowledge) that learn solely from the dataset are constructed. The network hyperparameters are listed in table S5. The three systems are experimentally trained and then tested in a virtual environment shown in Fig. 5B (the setup of the environment is detailed in Supplementary Text). The experimental training processes of the memristive neuro-fuzzy hardware are shown in fig. S14. The output singletons of memristive neuro-fuzzy system after training are listed in table S9. It is obvious that the predicted angular and linear velocities of the robot trained with complete symbolic knowledge are more accurate than those with incomplete symbolic knowledge. A direct comparison of the three systems in Fig. 5B shows that the neuro-fuzzy hardware with incomplete symbolic knowledge and DNN hardware without symbolic knowledge failed in obstacle avoidance task and bump into the wall, while the neuro-fuzzy hardware with complete symbolic knowledge successfully reaches the destination without collision. The results are easily understood because, in Fig. 5 (C and D), the angular and linear velocities of the system with complete knowledge show the lowest RMSE and fastest convergence than the other ones, respectively. Then, the navigation capability of the system is experimentally demonstrated in an in-door scene with obstacles, as shown in Fig. 5E. The robot successfully avoids the obstacles when moving from the starting point to the target 1 and then target 2. The robot navigation trajectory is visualized in Fig. 5F (map construction is detailed in Supplementary Text). The real-time angular and linear velocities of the robot obtained by the memristive hardware are shown in Fig. 5G. A detailed comparison of the hardware overhead and performance between the explicit and implicit methods is conducted to accurately assess the energy consumption of memristor neuro-fuzzy systems. Specifically, we propose that the nonlinear part of the MF can be implemented implicitly using an 8-bit digital circuit based on look up table (detailed in Supplementary Text and fig. S15). The statistics on the number of operators, including multiply-accumulate (consisting of one multiply and one addition operation) and nonlinear operators (activation functions), and device consumption of the two methods are provided in tables S7 and S8, respectively. The explicit method uses notably larger number of devices (5152) than that of the implicit one (562). Furthermore, tables S10 and S11 illustrate the energy consumption of individual components of implicit and explicit approaches, respectively. The device overhead of the two approaches is summarized in table S12. The calculated energy efficiency of the implicit approach can achieve 2.61 TOP s−1 W−1, notably outperforming the explicit method that has an energy efficiency of 1.528 TOP s−1 W−1. Notably, the energy efficiency of the implicit method surpasses that of FPGA by two orders of magnitude (further details on the hardware evaluation are available in the Supplementary Text). In addition, as shown in table S13, the implicit method demonstrates a throughput of 14.05 GOP s−1, while the explicit method achieves 13.6 GOP s−1, representing an increase of at least one time compared to FPGA. The energy consumption per inference of the implicit memristor hardware is estimated to be only 215.4286 pJ, whereas the explicit mode has slightly higher energy consumption of 356.0734 pJ due to the large number of RRAM devices used. Comparatively, the energy consumption of CMOS-based application-specific integrated circuit per inference exceeds 103.2 nJ. Furthermore, the implicit memristor hardware is estimated to occupy an area of 10.306 mm2, which is smaller than the explicit memristor hardware, requiring 13.1612 mm2 (detailed in Supplementary Text).

DISCUSSION

Our experimental demonstration validated neuro-fuzzy learning using memristive crossbar arrays in unsupervised, supervised, and transfer learning tasks. Our work provided a highly feasible solution to symbolic knowledge representation based on memristive crossbar arrays, revealed as a guidance for implementing other knowledge-based technique, e.g., metacognition, knowledge graph representation or incremental concept learning. Our findings challenged the conventional perception of memristive non-idealities as negative factors and suggested their potential in improving system performance. The proposed hardware-software co-optimization technique is a typical research paradigm that can be applied to various analog computing disciplines. Moreover, our findings are notable from the cognitive science perspective because all natural intelligent systems are hybrid, performing mental operations on both the symbolic and sub-symbolic levels (3537). Therefore, this work represents an intriguing way toward the realization of future artificial general intelligence hardware.

MATERIALS AND METHODS

Device fabrication

The crossbar arrays are composed of 1T1Rcells with each cell consisting of a TiN/TaOx/HfOx/TiN memristor stacked on the via of metal layer 5 and a NMOS transistor for sneak current suppression and current compliance. Metal layers 1 to 4 of the arrays are fabricated in a commercial standard 180-nm process, while the left metal layers 5 and 6 are fabricated in a laboratory 180-nm process. After fabrication, the arrays are sliced and packaged.

In situ training

The loss function of networks was cross-entropy loss. To minimize the error on a set of training samples, the derivatives were calculated by the standard backpropagation. We used the Adam optimizer to calculate the required change for each trainable parameter (38). The forward passes of the networks were implemented on the hybrid analog-digital test platform. To get the memristor conductance update, we multiplied the calculated weight update by ΔG/ΔW (see table S4, marked as Rgw). Each weight, (ggb)/Rgw, is proportional to the conductance difference (ggb). When we updated a weight, the gb was freezing and we just updated g, of which the change was equal to the gradient of weight Wgrad/Rgw. Here, we used a pair of memristors from the same row to express a weight.

Acknowledgments

Funding: This work was supported by the National Key R&D Program of China under grant no. 2021YFB3601200; the National Natural Science Foundation of China under grant nos. U20A20220, U22A6001, 61821091, 61888102, and 61825404; the Key R&D Program of Zhejiang (no. 2022C01048); the Strategic Priority Research Program of the Chinese Academy of Sciences under grant XDB44000000; and Exploratory Research Project of Zhejiang Lab (no. 2022PF0AN01).

Author contributions: T.S. conceived the idea. T.S. and H.Z. implemented neuro-fuzzy simulation. T.S., H.Z., and J.L. performed device test and characterization. H.Z., J.L., and T.S. set up the hardware and conducted the measurements. T.S. and S.C. performed robot modeling and simulation. Z.G. and Z.W. carried out electrical circuit simulation. T.S. and H.Z. benchmarked the system performance. T.S., H.Z., J.L., Z.G., X.Y., and Q.L. performed the data analysis. T.S., H.Z., S.C., J. L., X.Y., and Q.L. wrote the manuscript. X.Y. and Q.L. supervised the project. All authors discussed the results and implications and commented on the manuscript at all stages.

Competing interests: The authors declare that they have no competing interests.

Data and materials availability: All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials.

Supplementary Materials

This PDF file includes:

Supplementary Text

Figs. S1 to S15

Tables S1 to S13

Legend for movie S1

References

sciadv.adl3135_sm.pdf (1.6MB, pdf)

Other Supplementary Material for this manuscript includes the following:

Movie S1

REFERENCES AND NOTES

  • 1.LeCun Y., Bengio Y., Hinton G., Deep learning. Nature 521, 436–444 (2015). [DOI] [PubMed] [Google Scholar]
  • 2.Singh R., Bharti V., Purohit V., Kumar A., Singh A. K., Singh S. K., MetaMed: Few-shot medical image classification using gradient-based meta-learning. Pattern Recognit. 120, 108111 (2021). [Google Scholar]
  • 3.Lázaro-Gredilla M., Lin D., Guntupalli J. S., George D., Beyond imitation: Zero-shot task transfer on robots by learning concepts as cognitive programs. Sci. Robot. 4, eaav3150 (2019). [DOI] [PubMed] [Google Scholar]
  • 4.Elmarakeby H. A., Hwang J., Arafeh R., Crowdis J., Gang S., Liu D., AlDubayan S. H., Salari K., Kregel S., Richter C., Arnoff T. E., Park J., Hahn W. C., Van Allen E. M., Biologically informed deep neural network for prostate cancer discovery. Nature 598, 348–352 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Lundberg S. M., Erion G., Chen H., DeGrave A., Prutkin J. M., Nair B., Katz R., Himmelfarb J., Bansal N., Lee S.-I., From local explanations to global understanding with explainable AI for trees. Nat. Mach. Intell. 2, 56–67 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Xian Y., Lampert C. H., Schiele B., Akata Z., Zero-shot learning-a comprehensive evaluation of the good, the bad and the ugly. IEEE Trans. Pattern Anal. Mach. Intell. 41, 2251–2265 (2018). [DOI] [PubMed] [Google Scholar]
  • 7.Hannan M. A., Ali J. A., Hossain Lipu M. S., Mohamed A., Ker P. J., Indra Mahlia T. M., Mansor M., Hussain A., Muttaqi K. M., Dong Z. Y., Role of optimization algorithms based fuzzy controller in achieving induction motor performance enhancement. Nat. Commun. 11, 3792 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Janssens J., Aibar S., Taskiran I. I., Ismail J. N., Gomez A. E., Aughey G., Spanier K. I., De Rop F. V., González-Blas C. B., Dionne M., Grimes K., Quan X. J., Papasokrati D., Hulselmans G., Makhzami S., De Waegeneer M., Christiaens V., Southall T., Aerts S., Decoding gene regulation in the fly brain. Nature 601, 630–636 (2022). [DOI] [PubMed] [Google Scholar]
  • 9.M. Lanza, in 2023 International VLSI Symposium on Technology, Systems and Applications (VLSI-TSA/VLSI-DAT) (IEEE, 2023), pp. 1–1. [Google Scholar]
  • 10.Lanza M., Sebastian A., Lu W. D., Le Gallo M., Chang M.-F., Akinwande D., Puglisi F. M., Alshareef H. N., Liu M., Roldan J. B., Memristive technologies for data storage, computation, encryption, and radio-frequency communication. Science 376, eabj9979 (2022). [DOI] [PubMed] [Google Scholar]
  • 11.Strukov D. B., Snider G. S., Stewart D. R., Williams R. S., The missing memristor found. Nature 453, 80–83 (2008). [DOI] [PubMed] [Google Scholar]
  • 12.Prezioso M., Merrikh-Bayat F., Hoskins B. D., Adam G. C., Likharev K. K., Strukov D. B., Training and operation of an integrated neuromorphic network based on metal-oxide memristors. Nature 521, 61–64 (2015). [DOI] [PubMed] [Google Scholar]
  • 13.Wan W., Kubendran R., Schaefer C., Eryilmaz S. B., Zhang W., Wu D., Deiss S., Raina P., Qian H., Gao B., Joshi S., Wu H., Wong H. P., Cauwenberghs G., A compute-in-memory chip based on resistive random-access memory. Nature 608, 504–512 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Du C., Cai F., Zidan M., Ma W., Lee S. H., Lu W., Reservoir computing using dynamic memristors for temporal information processing. Nat. Commun. 8, 2204 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Duan Q., Jing Z., Zou X., Wang Y., Yang K., Zhang T., Wu S., Huang R., Yang Y., Spiking neurons with spatiotemporal dynamics and gain modulation for monolithically integrated memristive neural networks. Nat. Commun. 11, 3399 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Lin P., Li C., Wang Z., Li Y., Jiang H., Song W., Rao M., Zhuo Y., Upadhyay N. K., Barnell M., Wu Q., Yang J. J., Xia Q., Three-dimensional memristor circuits as complex neural networks. Nat. Electron. 3, 225–232 (2020). [Google Scholar]
  • 17.Moon J., Ma W., Shin J. H., Cai F., Du C., Lee S. H., Lu W. D., Temporal data classification and forecasting using a memristor-based reservoir computing system. Nat. Electron. 2, 480–487 (2019). [Google Scholar]
  • 18.Wang Z., Li C., Song W., Rao M., Belkin D., Li Y., Yan P., Jiang H., Lin P., Hu M., Strachan J. P., Ge N., Barnell M., Wu Q., Barto A. G., Qiu Q., Williams R. S., Xia Q., Yang J. J., Reinforcement learning with analogue memristor arrays. Nat. Electron. 2, 115–124 (2019). [Google Scholar]
  • 19.Zidan M. A., Jeong Y., Lee J., Chen B., Huang S., Kushner M. J., Lu W. D., A general memristor-based partial differential equation solver. Nat. Electron. 1, 411–420 (2018). [Google Scholar]
  • 20.Li J., Ren S.-G., Li Y., Yang L., Yu Y., Ni R., Zhou H., Bao H., He Y., Chen J., Jia H., Miao X., Sparse matrix multiplication in a record-low power self-rectifying memristor array for scientific computing. Sci. Adv. 9, eadf7474 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Gao B., Lin B., Pang Y., Xu F., Lu Y., Chiu Y.-C., Liu Z., Tang J., Chang M.-F., Qian H., Wu H., Concealable physically unclonable function chip with a memristor array. Sci. Adv. 8, eabn7753 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Sun L., Wang Z., Jiang J., Kim Y., Joo B., Zheng S., Lee S., Yu W. J., Kong B.-S., Yang H., In-sensor reservoir computing for language learning via two-dimensional memristors. Sci. Adv. 7, eabg1455 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Mou X., Tang J., Lyu Y., Zhang Q., Yang S., Xu F., Liu W., Xu M., Zhou Y., Sun W., Zhong Y., Gao B., Yu P., Qian H., Wu H., Analog memristive synapse based on topotactic phase transition for high-performance neuromorphic computing and neural network pruning. Sci. Adv. 7, eabh0648 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Cai F., Correll J. M., Lee S. H., Lim Y., Bothra V., Zhang Z., Flynn M. P., Lu W. D., A fully integrated reprogrammable memristor–CMOS system for efficient multiply–accumulate operations. Nat. Electron. 2, 290–299 (2019). [Google Scholar]
  • 25.Li C., Wang Z., Rao M., Belkin D., Song W., Jiang H., Yan P., Li Y., Lin P., Hu M., Ge N., Strachan J. P., Barnell M., Wu Q., Williams R. S., Yang J. J., Xia Q., Long short-term memory networks in memristor crossbar arrays. Nat. Mach. Intell. 1, 49–57 (2019). [Google Scholar]
  • 26.Yao P., Wu H., Gao B., Tang J., Zhang Q., Zhang W., Yang J. J., Qian H., Fully hardware-implemented memristor convolutional neural network. Nature 577, 641–646 (2020). [DOI] [PubMed] [Google Scholar]
  • 27.De La Fuente-Cortes G., Diaz-Mendez A., Flores-Verdad G. E., Gonzalez-Diaz V. R., On-chip fuzzy logic synthesis of a new ischemic and non-ischemic heartbeat classifier. IEEE T. Circuits II 68, 476–480 (2020). [Google Scholar]
  • 28.F. Merrikh-Bayat, S. B. Shouraki, F. Merrikh-Bayat, in 2011 Eighth International Conference on Fuzzy Systems and Knowledge Discovery (FSKD), vol. 1 (IEEE, 2011), pp. 645–649. [Google Scholar]
  • 29.Kim H.-Y., Statistical notes for clinical researchers: Assessing normal distribution (2) using skewness and kurtosis. Restor. Dent. Endod. 38, 52–54 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Jing J., Liu S., Wang G., Zhang W., Sun C., Recent advances on image edge detection: A comprehensive review. Neurocomputing. 503, 259–271 (2022). [Google Scholar]
  • 31.Xu Z., Ji X., Wang M., Sun X., Edge detection algorithm of medical image based on Canny operator. J. Phys: Conf. Ser. 1955, 012080 (2021). [Google Scholar]
  • 32.M. Emambakhsh, M. H. Sedaaghi, in 2009 IEEE International Conference on Signal and Image Processing Applications (IEEE, 2009), pp. 123–128. [Google Scholar]
  • 33.B. F. Feeny, “Nonlinear system identification” in Encyclopedia of Vibration (Elsevier, 2001), pp. 924–928. [Google Scholar]
  • 34.V. Balakrishnan, in System Identification: Theory for the User, vol. 38 (Automatica, Prentice-Hall, ed. 2, 2002), pp. 375–378. [Google Scholar]
  • 35.Lake B. M., Ullman T. D., Tenenbaum J. B., Gershman S. J., Building machines that learn and think like people. Behav. Brain Sci. 40, e253 (2017). [DOI] [PubMed] [Google Scholar]
  • 36.P. Hitzler, M. K. Sarker, Neuro-Symbolic Artificial Intelligence: The State of the Art (IOS Press, 2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Haikonen P. O. A., The role of associative processing in cognitive computing. Cognit. Comput. 1, 42–49 (2009). [Google Scholar]
  • 38.D. P. Kingma, J. Ba, in International Conference on Learning Representations (OpenReview.net, 2015), pp. 1–13.
  • 39.N. Koenig, A. Howard, in IEEE/RSJ International Conference on Intelligent Robots and Systems (IEEE, 2004), pp. 2149–2154. [Google Scholar]
  • 40.K. Konolige, G. Grisetti, R. Kümmerle, W. Burgard, B. Limketkai, R. Vincent, in IEEE/RSJ International Conference on Intelligent Robots and Systems (IEEE, 2010), pp. 22–29. [Google Scholar]
  • 41.Kam H. R., Lee S.-H., Park T., Kim C.-H., Rviz: A toolkit for real domain data visualization. Telecommun. Syst. 60, 337–345 (2015). [Google Scholar]
  • 42.E. Oyekanlu, S. Onidare, P. Oladele, in 2018 First International Colloquium on Smart Grid Metrology (SmaGriMet) (IEEE, 2018), pp. 1–6. [Google Scholar]
  • 43.Ramakrishna M. N. P., Kakarla H., A low power 8-bit current-steering DAC using CMOS technology. Int. J. Innovative Tech. Explor. Eng. 8, 137–140 (2019). [Google Scholar]
  • 44.Dosi H., Agrawal R., Low power 8 bit analog to digital converter (ADC) in 180 nm CMOS technology. Int. J. Sci. Res. 2, 417–418 (2013). [Google Scholar]
  • 45.Raut N. B. A., Rathod S., Comparative analysis of transimpedance amplifier of 45 nm and 180nm CMOS technology. Int. J. Sci. Eng. 2, 1022–1025 (2013). [Google Scholar]
  • 46.H. O. Ahmed, in 2020 Integrated Communications Navigation and Surveillance Conference (ICNS) (IEEE, 2020), pp. 5D2-1–5D2-11. [Google Scholar]
  • 47.H. O. Ahmed, in 2020 3rd International Conference on Intelligent Robotic and Control Engineering (IRCE) (IEEE, 2020), pp. 11–17. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary Text

Figs. S1 to S15

Tables S1 to S13

Legend for movie S1

References

sciadv.adl3135_sm.pdf (1.6MB, pdf)

Movie S1


Articles from Science Advances are provided here courtesy of American Association for the Advancement of Science

RESOURCES