Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with...

6
Fault-Tolerant Training with On-Line Fault Detection for RRAM-Based Neural Computing Systems Lixue Xia 1 , Mengyun Liu 2 , Xuefei Ning 1 , Krishnendu Chakrabarty 2 , Yu Wang 1 1 Dept. of E.E., Tsinghua National Laboratory for Information Science and Technology (TNList), Tsinghua University, Beijing, China 2 Department of Electrical and Computer Engineering, Duke University, Durham, NC, USA e-mail: [email protected] ABSTRACT An RRAM-based computing system (RCS) is an attractive hard- ware platform for implementing neural computing algorithms. On- line training for RCS enables hardware-based learning for a given application and reduces the additional error caused by device pa- rameter variations. However, a high occurrence rate of hard faults due to immature fabrication processes and limited write endurance restrict the applicability of on-line training for RCS. We propose a fault-tolerant on-line training method that alternates between a fault-detection phase and a fault-tolerant training phase. In the fault-detection phase, a quiescent-voltage comparison method is u- tilized. In the training phase, a threshold-training method and a re-mapping scheme is proposed. Our results show that, compared to neural computing without fault tolerance, the recognition accu- racy for the Cifar-10 dataset improves from 37% to 83% when us- ing low-endurance RRAM cells, and from 63% to 76% when using RRAM cells with high endurance but a high percentage of initial faults. 1. INTRODUCTION Machine learning is now widely used in a variety of domains, and brain-inspired neural computing is considered to be one of the most powerful applications of machine learning. To ensure that neural network algorithms are feasible in practice, hardware imple- mentations require high computing capability and energy efficien- cy. However, CMOS technology is faced with the bottlenecks of scaling limitations and the “memory wall” for von Neumann ar- chitectures [1]. Consequently, the energy efficiency gap between application requirements and hardware implementation continues to grow. Emerging devices such as metal-oxide resistive random-access memory (RRAM) and its associated crossbar array structure pro- vide the basis for a promising architecture for brain-inspired cir- cuits and systems. By exploiting the crossbar structure, an RRAM- based computing system (RCS) can realize vector-matrix multi- plication in analog form and reduce the computational complexity from O(n 2 ) to O(1). Moreover, since RRAM provides memory for data storage, RCS provides an attractive solution for computing- in-memory. This architecture eliminates the high data transporta- Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full cita- tion on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re- publish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. DAC ’17, June 18-22, 2017, Austin, TX, USA c 2017 ACM. ISBN 978-1-4503-4927-7/17/06. . . $15.00 DOI: http://dx.doi.org/10.1145/3061639.3062248 tion overhead that is inherent to von Neumann architectures; there- fore, it significantly boosts energy efficiency, particularly for neural computing applications [2]. RRAM faults may occur during both chip fabrication and data processing. RRAM faults can be classified as soft faults and hard faults [3]. For soft faults, the resistance of the RRAM cell can still be tuned, but the actual resistance is different from the expected val- ue. Soft faults are caused by variations associated with fabrication techniques and write operations [4]. For hard faults, the resistance of an RRAM cell cannot be changed; this category includes the stuck-at-0 (SA0) and stuck-at-1 (SA1) faults caused by fabrication techniques [5] and limited endurance [6]. A traditional RCS re- lies on off-line training, which first trains a network based on RCS and then maps the trained network on to RRAM arrays. In such an approach, the recognition accuracy for the network application is limited by both soft and hard faults that occur in each RRAM cell [7]. One approach to tolerate RRAM faults in an RCS is to use an on- line training scheme, which trains a neural network using the output of the RCS [7]. This method can tolerate soft faults by utilizing the inherent fault tolerance capability in neural computing algorithms. However, hard faults still limit the performance of on-line train- ing due to the following reasons: 1) fabrication defects cannot be adequately tolerated by on-line training because the training proce- dure always attempts to tune some RRAM cells with a SA0/SA1 fault caused by fabrication, and 2) the limited write endurance of RRAM cells can lead to an increasing number of RRAM cells with a SA0/SA1 fault during the training procedure, and thereby result in decreased accuracy of RCS. Since we need to train another net- work in order to change the neural computing applications for RCS, most cells will become faulty after repeated write operations. Researchers have shown that more than 50% of the weights in neural networks can be fixed to zero [8], which motivates us to further use neural algorithms to tolerate not only soft faults but also hard faults on RRAM. Two challenges arise in fault-tolerant on-line training in the presence of hard faults. First, we need to know the distribution of faults in RRAM cells during training. The test time of traditional test methods increases quadratically with the number of rows (columns) of the RRAM crossbar [9], and this is a key limiter for on-line testing. Second, traditional redundancy- based methods for memory design cannot be utilized to target hard faults in an RCS. This is because the basic unit of an RCS is an en- tire RRAM column rather than a single RRAM cell, and redundant columns may also contain, as well as, give rise to hard faults. In this paper, we present a complete design flow that includes both on-line fault detection and fault-tolerant training for RCS. The main contributions of this paper are as follows: 1. We propose a fault-tolerant training flow with on-line fault detection for an RRAM-based neural computing system. In

Transcript of Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with...

Page 1: Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with On-Line Fault Detection for RRAM-Based Neural Computing Systems Lixue Xia1, Mengyun

Fault-Tolerant Training with On-Line Fault Detection forRRAM-Based Neural Computing Systems

Lixue Xia1, Mengyun Liu2, Xuefei Ning1, Krishnendu Chakrabarty2, Yu Wang1

1 Dept. of E.E., Tsinghua National Laboratory for Information Science and Technology (TNList),Tsinghua University, Beijing, China

2 Department of Electrical and Computer Engineering, Duke University, Durham, NC, USAe-mail: [email protected]

ABSTRACTAn RRAM-based computing system (RCS) is an attractive hard-ware platform for implementing neural computing algorithms. On-line training for RCS enables hardware-based learning for a givenapplication and reduces the additional error caused by device pa-rameter variations. However, a high occurrence rate of hard faultsdue to immature fabrication processes and limited write endurancerestrict the applicability of on-line training for RCS. We proposea fault-tolerant on-line training method that alternates between afault-detection phase and a fault-tolerant training phase. In thefault-detection phase, a quiescent-voltage comparison method is u-tilized. In the training phase, a threshold-training method and are-mapping scheme is proposed. Our results show that, comparedto neural computing without fault tolerance, the recognition accu-racy for the Cifar-10 dataset improves from 37% to 83% when us-ing low-endurance RRAM cells, and from 63% to 76% when usingRRAM cells with high endurance but a high percentage of initialfaults.

1. INTRODUCTIONMachine learning is now widely used in a variety of domains,

and brain-inspired neural computing is considered to be one of themost powerful applications of machine learning. To ensure thatneural network algorithms are feasible in practice, hardware imple-mentations require high computing capability and energy efficien-cy. However, CMOS technology is faced with the bottlenecks ofscaling limitations and the “memory wall” for von Neumann ar-chitectures [1]. Consequently, the energy efficiency gap betweenapplication requirements and hardware implementation continuesto grow.

Emerging devices such as metal-oxide resistive random-accessmemory (RRAM) and its associated crossbar array structure pro-vide the basis for a promising architecture for brain-inspired cir-cuits and systems. By exploiting the crossbar structure, an RRAM-based computing system (RCS) can realize vector-matrix multi-plication in analog form and reduce the computational complexityfrom O(n2) to O(1). Moreover, since RRAM provides memory fordata storage, RCS provides an attractive solution for computing-in-memory. This architecture eliminates the high data transporta-

Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor profit or commercial advantage and that copies bear this notice and the full cita-tion on the first page. Copyrights for components of this work owned by others thanACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re-publish, to post on servers or to redistribute to lists, requires prior specific permissionand/or a fee. Request permissions from [email protected].

DAC ’17, June 18-22, 2017, Austin, TX, USAc© 2017 ACM. ISBN 978-1-4503-4927-7/17/06. . . $15.00

DOI: http://dx.doi.org/10.1145/3061639.3062248

tion overhead that is inherent to von Neumann architectures; there-fore, it significantly boosts energy efficiency, particularly for neuralcomputing applications [2].

RRAM faults may occur during both chip fabrication and dataprocessing. RRAM faults can be classified as soft faults and hardfaults [3]. For soft faults, the resistance of the RRAM cell can stillbe tuned, but the actual resistance is different from the expected val-ue. Soft faults are caused by variations associated with fabricationtechniques and write operations [4]. For hard faults, the resistanceof an RRAM cell cannot be changed; this category includes thestuck-at-0 (SA0) and stuck-at-1 (SA1) faults caused by fabricationtechniques [5] and limited endurance [6]. A traditional RCS re-lies on off-line training, which first trains a network based on RCSand then maps the trained network on to RRAM arrays. In suchan approach, the recognition accuracy for the network applicationis limited by both soft and hard faults that occur in each RRAMcell [7].

One approach to tolerate RRAM faults in an RCS is to use an on-line training scheme, which trains a neural network using the outputof the RCS [7]. This method can tolerate soft faults by utilizing theinherent fault tolerance capability in neural computing algorithms.However, hard faults still limit the performance of on-line train-ing due to the following reasons: 1) fabrication defects cannot beadequately tolerated by on-line training because the training proce-dure always attempts to tune some RRAM cells with a SA0/SA1fault caused by fabrication, and 2) the limited write endurance ofRRAM cells can lead to an increasing number of RRAM cells witha SA0/SA1 fault during the training procedure, and thereby resultin decreased accuracy of RCS. Since we need to train another net-work in order to change the neural computing applications for RCS,most cells will become faulty after repeated write operations.

Researchers have shown that more than 50% of the weights inneural networks can be fixed to zero [8], which motivates us tofurther use neural algorithms to tolerate not only soft faults butalso hard faults on RRAM. Two challenges arise in fault-toleranton-line training in the presence of hard faults. First, we need toknow the distribution of faults in RRAM cells during training. Thetest time of traditional test methods increases quadratically with thenumber of rows (columns) of the RRAM crossbar [9], and this isa key limiter for on-line testing. Second, traditional redundancy-based methods for memory design cannot be utilized to target hardfaults in an RCS. This is because the basic unit of an RCS is an en-tire RRAM column rather than a single RRAM cell, and redundantcolumns may also contain, as well as, give rise to hard faults.

In this paper, we present a complete design flow that includesboth on-line fault detection and fault-tolerant training for RCS. Themain contributions of this paper are as follows:

1. We propose a fault-tolerant training flow with on-line faultdetection for an RRAM-based neural computing system. In

Page 2: Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with On-Line Fault Detection for RRAM-Based Neural Computing Systems Lixue Xia1, Mengyun

this flow, the system can periodically detect the current dis-tribution of faults and tolerate the faults in the next trainingphase using the inherent fault-tolerant capability of the neu-ral network.

2. We propose an efficient on-line fault detection method byusing quiescent-voltage comparisons. Modulo operations areutilized to reduce the hardware overhead. The proposed me-thod can detect faults with more than 70% accuracy and morethan 87% fault coverage within an acceptable test time.

3. We propose a threshold-training method and a re-mappingscheme during the training phase to tolerate faults using thesparsity of neural networks. Our results show that the accu-racy can be restored to the original training accuracy for afault-free scenario.

2. PRELIMINARIES AND MOTIVATION

2.1 RRAM-based Neural ComputingAn RRAM cell is a passive two-port element with variable re-

sistance, and multiple cells are used to construct a crossbar struc-ture. Researchers have found that if we store a “matrix” on theconductances of RRAM cells in the crossbar structure and input a“vector” as input voltage signals, the RRAM crossbar is able to per-form high-efficiency matrix-vector multiplication in analog mode.Specifically, the relationship between the input and output voltagescan be expressed as: iout,k =

∑Nj=1 gk,j · vin,j , where ~vin is the

input voltage vector (denoted by j = 1, 2, ..., N ),~iout is the outputcurrent vector (denoted by k = 1, 2, ...,M ), and gk,j is the conduc-tance matrix of the RRAM cells representing the matrix data [10].Based on this structure, several RCS designs have been proposed,e.g., RRAM-based neural networks with fully-connected (FC) lay-ers [10], and RRAM-based convolutional neural networks (CNN)with both convolutional (Conv) layers and FC layers [11].

2.2 Related Prior WorkTo tolerate soft faults, researchers have demonstrated on-line

training schemes for RRAM and other emerging non-volatile mem-ory (NVM)-based neural networks. Strukov et al. implementeda 9×3 single-layer RRAM-based network by on-line training [7].This work shows the benefit of on-line training to solve the map-ping variations. However, it cannot target hard faults and the en-durance problem due to the small size of the array and the simplic-ity of the application with only a few write operations.

For on-line fault-tolerant training on a larger network, we alsoneed to know the distribution of faults. Recent work on fault dis-tribution in the RCS are mainly focused on off-line fault detection-s [9, 12]. These designs can cover many RRAM fault types, andprovide high fault coverage. However, the high time complexitylimits their usefulness for on-line testing. Moreover, [12] does notsupport fault localization, and [9] requires sequential March diag-nosis to determine fault locations. In [13], a parallel test methodwas proposed to reduce testing time, but this design is not scalablefor large crossbars.

2.3 Motivational ExampleWe simulate the training procedure of the VGG-11 network on

the Cifar-10 dataset [14] for both fault-free training and on-linetraining with hard faults. The percentage of RRAM cells withstack-as faults after fabrication is approximately 10% [5]. The en-durance model is based on the published data that the endurancesof cells obey a Gaussian distribution [3], and we set the mean en-durance of cells to be equal to 5 × 106 [6, 15, 16]. The results are

0

10

20

30

40

50

60

70

80

90

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

Acc

ura

cy o

f C

ifar

10

(%

)

Number of Training Iterations (×106)

Case with 10% initial hardfaults & limited endurnaceCase with 30% initial hardfaults & limited endurnaceIdeal case (no faults)

Figure 1: Training accuracy versus different initial hard fault con-ditions of RCS on the Cifar-10 dataset.

shown in Fig. 1. Training in the absence of faults can classify theTestSet with 85.2% accuracy after 5 million iterations. However,when SA1 and SA0 faults are injected during training according tothe above endurance model, the maximum accuracy can reach only37%, and the accuracy further decreases if we continue with moretraining iterations. Moreover, if we need to train the RCS for an-other subsequent neural-computing application, which aggravatesthe impact of faults (i.e., the percentage of RRAM cells with faultsmay become 50%), we cannot achieve higher than 10% accuracyafter training. Therefore, a fault-tolerant on-line training solutionfor RCS is required.

3. FAULT-TOLERANT TRAININGThe complete flow of the proposed fault-tolerant on-line train-

ing method is shown in Fig. 2. In priori work, a forward prop-agation phase is processed to obtain the actual output from thecurrent neural network [7]. Then, the ideal output from the train-ing dataset is compared with the actual output, and the differenceis back-propagated to update network weights. In the proposedfault-tolerant training method, a threshold-training step (describedin Section 5.1) is proposed after the back-propagation phase to en-hance the lifetime by eliminating write operations on RRAM cells.Subsequently, after every fixed number of iterations, the proposedon-line fault detection method (described in Section 4) is executedto update fault-free/faulty status of RRAM cells. A pruning stepis carried out simultaneously to obtain the locations of zeros in theweight matrices based on network pruning [8]. With the knowledgefrom the two distributions, the proposed re-mapping technique (de-scribed in Section 5.2) is applied to tolerate the faults by utilizingthe inherent sparsity of neural algorithms.

4. ON-LINE FAULT DETECTION

4.1 Detection of Faults by Quiescent-VoltageComparison

The flow of the proposed quiescent-voltage comparison methodis described in Fig. 3. A read operation is first carried out to ex-tract the RRAM crossbar values after training and store them off-chip. The SA0 and SA1 faults need separate detection procedures.The SA0 fault detection procedure consists of four steps. The firststep is to write a fixed increment to all RRAM cells. We replacethe traditional “Write 1” operation with a “Write +δw” operation,where +δw is the fixed increment. In this way, we can recover thetraining weights of RRAM cells after testing. Second, test voltagesare applied to one group of rows. Utilizing the crossbar structure,output voltages can be obtained at all column output ports concur-rently. This parallel test method is therefore time-efficient. In thethird step, control logic and a multiplexer are utilized to select anappropriate reference voltage. The reference voltages are set to beequal to the sum of previous values stored off-chip and the written

Page 3: Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with On-Line Fault Detection for RRAM-Based Neural Computing Systems Lixue Xia1, Mengyun

Fabrication Off-line Detection

Forward Propagation

Back Propagation

Actual Output

Idea Output

Need Detection?

Generate Pruning

Fault Distribution

Pruning Distribution

Re-mapping

Yes No

Chip

100% Precision, 100% recall

Changes of Weights

On-line Detection Threshold Training

Figure 2: Proposed fault-tolerant training method with (1) athreshold-training method to reduce the write workload, (2) an on-line fault detection phase to detect fault locations, and (3) a re-mapping phase to avoid or reuse faulty cells.

increments. The last step involves comparisons between the actualoutputs and the reference voltages. If a discrepancy exists, it de-notes that at least one of the RRAM cell in the selected rows andcolumns cannot be updated correctly when we write an increment.This discrepancy indicates a SA0 fault. Because RRAM crossbarscan be used in two directions, we can also apply test voltages tocolumn input ports, and repeat the last three steps to derive the rowinformation from the row output ports. After SA0 fault detection, a“Write −δw” operation is carried out for SA1 fault detection. Thereduction value is set equal to the increment value used for SA0 de-tection to enable the RRAM to recover its original training weights.The four-step test process for SA1 fault detection is similar to thatfor SA0 fault detection.

An example is presented in Fig. 4(a) to illustrate the test proce-dure. The crossbar here is a simplified schematic of a 10×10 RCS,and a square with a cross represents an actual defective cell. Thetest size is set to 5, which implies that the test voltages are appliedto five rows in every test cycle. Therefore, to finish the row test,we need two test cycles. An additional two cycles for column testare required. Shaded squares are determined as being fault-free.In Fig. 4(a), the white squares denote the detected fault locations.As shown in this figure, 100% fault coverage is obtained, but somefault-free cells are determined to be faulty.

4.2 Reduction of Hardware Overhead withModulo Operations

To tolerate write variance, RRAM cells in the test phase of RC-S can be considered as multi-level resistance cells. The increment(reduction) written in testing phase is set to be larger than the vari-ance. The number of resistance levels can be set to 8 [17].

Although the same voltage is applied to all the tested rows, thecorrect outputs may still be in a large range for different conduc-tance (gkj) combinations. To simplify the design of the referencevoltage, we use modulo operations to map all possible voltages toa limited number of values. We choose 16 as the divisor for themodulo operations based on a trade-off between fault coverage andhardware overhead. In this way, only 16 reference voltages areneeded, and the control logic is also simplified. Faults can stil-l be detected unless 16 or more faults occur simultaneously in thetested area. As the divisor for the modulo operation increases, thefault coverage increases, but the hardware overhead increases. Inorder to apply modulo operations, we reuse the analog-to-digitalconverters (ADCs) on the output ports, transforming the analogoutput voltages to digital values. The mod (2n) operations canbe realized by truncating the last n bits of the dividend. A set ofNAND gates can then be used for digital comparisons. The loss ininformation due to the modulo operations leads to a slight decrease

SA0(SA1) Fault Detection

Read RRAM Values, Store Off-Chip

Write +ᵟw(-ᵟw) To All RRAM Cells

Calculate Reference Voltages

Apply Test Voltages

Comparison

SA0 Fault Detection

SA1 Fault Detection

Distribution of Faults

Figure 3: Description of the quiescent-voltage comparison method.

(a) Detect faults among all cells

X X

X

X

X X X

X

X

X

Real

Prediction

Has Fault No Fault

Has Fault TP FP

No Fault FN TN

X X

X

X

X X X

X

X

X

(b) Detect faults among selected cellsFigure 4: Illustration of the quiescent-voltage comparison testmethod (test size = 5).in fault coverage.

4.3 Improvement of Performance by Selected-Cell Testing

To make the test method practical, we must ensure low test time,high fault coverage, and low false positives for fault detection. Us-ing the quiescent-voltage comparison method for only the selectedcells helps us to achieve this goal. Cells that need testing are select-ed based on the knowledge that SA0 faults can occur only in cellswith high resistance, and SA1 faults can occur only in cells withlow resistance. The read operation at the beginning of the test phaseprovides the necessary information about resistance values. Thetest procedure involving selected cells is shown in Fig. 4(b). Forexample, considering the detection of SA0 faults, the pink squaresdenote the cells with high resistance. Since SA0 faults can occuronly in these pink cells, there is no need to test the other cells. Inthis way, the test time may be reduced because no test is applied tothe first column. The number of false detections is also decreasedfrom 10 in Fig. 4(a) to 6 in Fig. 4(b).

5. ON-LINE TRAINING

5.1 Threshold TrainingWe first introduce the threshold-training method to reduce the

number of write operations in each training iteration. Specifically,a training iteration contains two steps [8]: a forward-propagationstep to obtain classification results using the current network and aback-propagation step to adjust the weights. For a specific weightwn

i,j(t) in the ith row and jth column of layer n, where t is theiteration count, the next weight wn

i,j(t+ 1) is determined by:

wni,j(t+ 1) = wn

i,j(t) + LR ∗ δwni,j(t) (1)

δwni,j(t) = xni (t) ∗ f ′(ynj (t)) ∗ δyni (t) (2)

where xni (t) is the input of wni,j from the previous layer in the

forward-propagation step, f ′(ynj (t)) is the derivative of the outputin the forward-propagation step, and δyni (t) is the difference prop-agated from the next layer in the back-propagation step. LR is thelearning-rate parameter used to control the training speed, which isfirst set to a large value and gradually decreased during training.

To reduce the occurrence of faults, we analyze the distribution of

Page 4: Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with On-Line Fault Detection for RRAM-Based Neural Computing Systems Lixue Xia1, Mengyun

Algorithm 1: Threshold-training AlgorithmInput: Current_{wn

i,j}, {WriteAmountni,j}, LearnRate,−−−−−−→Samples,

−−−−−−−−−→IdealOutputs

Output: Next_{wni,j}

1−−−−−−−−−−−→ActualOutputs = ForwardPropagation({Current_wn

i,j},−−−−−−→Samples);

2 ~δyN =−−−−−−−−−→IdealOutput-

−−−−−−−−−−→ActualOutput;

3 Calculate {δwni,j} according to Equ.(2) layer by layer;

4 for n = 1 : N do5 for i, j do6 if {δwn

i,j} < CalculateThreshold(WriteAmountni,j ) then7 {δwn

i,j} = 0; Next_wni,j = Current_wn

i,j ;8 end9 else

10 WriteAmountni,j = WriteAmountni,j +1;Next_wn

i,j = Current_wni,j + LearnRate * {δwn

i,j}11 end12 end13 end14 return Next_{wn

i,j}

δw among all the weights in one iteration. For approximately 90%of the weights, δw is less than 0.01δwmax, where δwmax denotes themaximum δw in this iteration. When we consider the enduranceproblem, a small value of δw contributes only slightly to networktraining but reduces the lifetime of the RRAM cell.

Based on this observation, we only write to an RRAM cell witha large δw. The proposed threshold-training method is shown inAlgorithm 1. Line 1 is the forward-propagation step processed onRRAM arrays, while lines 2-3 indicate the back-propagation stepused to obtain δw. For lines 4-13, if δw is less than the trainingthreshold, it will be reduced to zero. Therefore, the correspondingRRAM cell can avoid the write operation. The threshold is set to0.01 of the maximum value of δw, which improves the averagelifetime of each RRAM cell by approximately 15X.

From a software perspective, threshold training will enlarge thenumber of training iterations. We test the method on (1) a 784 ×100× 10 NN on MNIST dataset [18] and (2) the VGG-11 networkon Cifar-10 dataset. Compared to the original training method, thenumber of training iterations is enlarged by 1.2X.

5.2 Fault-Tolerant Re-mapping MethodAlthough threshold training can reduce the impact of write oper-

ations, new hard faults induced by limited endurance will inevitablyoccur during the training procedure, and impact the network perfor-mance (i.e., the recognition accuracy).

At the software level, researchers have noted that the weights ina neural network contain a large amount of redundant information.Therefore, pruning methods have been proposed to fix more than50% of the weight values to zero during training [8]. This findingmotivates us to use the inherent sparsity of a neural network to tol-erant the SA0 faults in an RRAM cell. This target can be achievedby re-ordering the columns/rows of the weight matrix, and map thezeros in the weight matrices to RRAM cells with SA0 faults.

The challenge in designing such an exchange method lies in theinherent connection between matrices. As shown in Fig. 5, from asoftware perspective, a neural network consists of multiple cascad-ed layers. Therefore, the outputs of the RRAM crossbar are con-nected to the inputs of another RRAM crossbar through peripheralneuron modules [2]. Consequently, if we independently exchangethe rows or columns in each weight matrix with M neurons, anM -to-M routing module is required to connect different RRAMcrossbars, which introduces high area and energy overhead. To ad-

W1,1

W2,1

Wm,1

SA

Mux

SA

Mux

SA

MuxFaulty RRAM Array

Fault-tolerant network

Neuron

Re-ordering

Pruning Network

Weight

Updating

Re-mapping

Figure 5: The proposed neuron re-ordering method for re-mapping.

dress this problem, we only consider the re-ordering of neurons inthis work. In other words, when the ith and jth columns of the(n−1)th layer’s weight matrix are exchanged, the ith and jth rowsof the nth layer will also be exchanged in a corresponding manner.From a software perspective, if we regard the neural network as aweighted graph, the re-ordering of neurons with connected weightswill lead to an isomorphic network whose interconnection structureis the same as that of the original network.

After the fault-detection step, there are two networks: 1) an N -layer pruned network P provided by the pre-trained result fromsoftware training; 2) an N -layer fault distribution network F , ob-tained after each fault detection phase described in Section 4. Spe-cifically, P = {P (1), P (2), ..., P (N)}, where P (n) = {p(n)

i,j } isa 2-dimensional weight-pruning matrix for the nth layer. If theweight in a neural network can be pruned, the corresponding valueof p(n)

i,j is set to 0; otherwise, the value of p(n)i,j is set as ∞. F =

{F (1), F (2), ..., F (N)}, where F (n) = {f (n)i,j } is a 2-dimensional

fault-distribution matrix for the nth layer. If an SA0 fault occurs onRRAM cell, the corresponding value of f (n)

i,j is set to 0; if an SA1

fault occurs, the corresponding value of f (n)i,j is set to 1; otherwise,

the value of f (n)i,j is set as∞.

To describe whether an SA0 fault in F is tolerated (reused) bythe inherent zeros in the weight matrices, an ErrorSet E = {e}is defined as the set of address groups, where e = {i, j, n} is theaddress of a weight that satisfies: e ∈ E iff (p(n)

i,j 6= 0 & f(n)i,j 6=

∞). The optimization target is to minimize the number of elementsof E . Therefore, the distance between P and F can be defined asthe number of elements of E , i.e., Dist(P,F) = |E|.

We can similarly define E(n) as the error set corresponding tolayer n. The distance Dist(P,F) between P and F is the sum ofdistances between P (n) and F (n), i.e.,

Dist(P,F) =N∑

n=1

dist(P (n), F (n)) =

N∑n=1

|E(n)| (3)

Based on these definitions, the optimization target of our neuronre-ordering algorithm can be described as follows. Given F and Pwith (‖F‖ = ‖P‖), O is the set of the networks that P can bere-ordered into; the optimization result is to find Popt ∈ O that hasthe minimum distance from F , i.e.,

Popt = argminX∈O

{Dist(X ,F)} (4)

The neuron re-ordering problem can be mapped to a set of K-napsack problems, hence it is NP-hard. We use a genetic algorithmto iteratively optimize the order of neurons layer by layer. For eachlayer, we randomly exchange two neurons and evaluate the changein the cost function Dist(P,F).

Page 5: Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with On-Line Fault Detection for RRAM-Based Neural Computing Systems Lixue Xia1, Mengyun

6. SIMULATION RESULTS

6.1 Evaluation Metrics for Fault DetectionWe use the statistical metric of precision to evaluate false posi-

tives, where a false positive occurs when a fault-free cell is deter-mined to be faulty. We also use the statistical metric of recall toevaluate test escapes. Higher the recall, lower is the test escape.Loss of precision results in unnecessary hardware overhead. Testescapes reduce the accuracy of neural computation. Let TP referto the number of faulty cells that are correctly identified as beingfaulty. Let FP be the number of fault-free cells that are erroneous-ly identified as being faulty. In addition, let FN be the number offaulty cells that are incorrectly identified as being fault-free. ThenPrecision = TP/(TP +FP ), andRecall = TP/(TP +FN).

In addition to precision and recall, test time and test size are alsoimportant metrics. We define Tr (Tc) as the number of selectedrows (columns) in each test cycle and Cr (Cc) as the number ofrows (columns) in the crossbar. The test time, denoted by T andmeasured in cycles, is computed as: T = dCr/Tre + dCc/Tce.We define Er (Ec) as the number of rows (columns) that containRRAM cells with the high (low) resistance; these cells are likely tobe faulty cells. Since we need to perform test only in these selectedrows and columns, the test time is reduced to: T = dEr/Tre +dEc/Tce. In our simulations, without loss of generality, the numberof rows and columns in the crossbar are assumed to be equal. Wealso set Tr = Tc since the fault distributions are independent of therow or column directions.

6.2 Experimental Setup

6.2.1 Fault ModelSince there is no consensus yet on the spatial fault distribution in

an RRAM crossbar, we evaluate our approach using several widely-used fault distributions [5] [19]. These include the uniform distri-bution and Gaussian distribution with several fault centers. Thefabrication defects cause 10% of the RRAM cells to have stuck-at faults [5]. Two endurance models for RRAM cell are used totarget both low-endurance RRAM cell and high-endurance RRAMcell. The mean endurance of low-endurance RRAM cell is set at5× 106 write operations and the distribution of endurance obeys aGaussian distribution [3] with a variance of 1.5×106. For the high-endurance model, we assume that the distribution of endurance fol-lows a Gaussian distribution with a mean of 108 and a variance of3× 107.

6.2.2 BenchmarksWe evaluate the proposed method on a modified VGG-11 deep

neural network for the Cifar-10 dataset [14]. The VGG-11 networkis modified to match the input size of Cifar-10 dataset, which con-tains 8 Conv layers and 3 FC layers. The total weight amount is7.66M and the complexity is 137M operations. The recognitionaccuracy is 85.2% on TestSet, which is set as the ideal case fortraining without faults.

The RRAM crossbar sizes used in the fault detection experi-ments range from 128×128 to 1024×1024. This range is motivat-ed by the current state of fabrication technology and the pro-spectsfor future development.

6.3 Effectiveness of Fault DetectionThere are interesting trade-offs between test time, precision, and

recall for the on-line test method. With a quiescent-voltage compar-ison using modulo operations and 10% of the cells being defective,the detection results are shown in Fig. 6(a) and Fig. 6(b) using theuniform and Gaussian fault distributions, respectively. The fault

0 200 400 600 800 1000 12000.7

0.8

0.9

1.0

Reca

ll Crossbar Size = 128*128

Crossbar Size = 256*256

Crossbar Size = 512*512

Crossbar Size = 1024*1024

0 200 400 600 800 1000 1200

Test time (cycles)

0.2

0.4

0.6

0.8

Pre

cisi

on

(a) Uniform distribution cases

0 200 400 600 800 1000 12000.7

0.8

0.9

1.0

Reca

ll Crossbar Size = 128*128

Crossbar Size = 256*256

Crossbar Size = 512*512

Crossbar Size = 1024*1024

0 200 400 600 800 1000 1200

Test time (cycles)

0.2

0.4

0.6

0.8

Pre

cisi

on

(b) Gaussian distribution casesFigure 6: Trade-offs between test time, precision, and recall.

detection recall values increase slowly as the test time increases.Since the recall is always larger than 87%, it is always acceptablefor the subsequent neural computation steps. On the other hand,for a given precision, the test time grows linearly with crossbarsize. Therefore, large RRAM crossbars need longer test time toachieve satisfactory performance. However, even for a crossbarwith 1024 × 1024 cells, a 74% precision and 91% recall can beobtained within 70 test cycles; thus, the test time is still acceptablefor on-line test.

In order to demonstrate the advantage of testing only among se-lected cells, we compare the performance of testing among all thecells with the performance gain obtained by testing a subset of cellsin proximate test time. Consider a Gaussian distribution of faults,and assume that 10% of the cells are faulty and 30% of the cellsare in a high-resistance state. Our results show that, with this im-provement, the precision increases significantly from around 50%to 77%, while the recall of both methods is maintained above 90%.

6.4 Results of Entire Fault-tolerant TrainingFor RRAM-based CNN, some researchers implement both Conv

layers and FC layers on RCS [20], while other researchers only im-plement FC layers on RCS [10]. Software level results have shownthat the fault tolerance capability and sparsity of the Conv layer aremuch lower than that of the FC layer [8]. Therefore, we evaluatethe proposed methods in two cases. (1) An entire-CNN case: allthe layers of the VGG-11 network are mapped onto an RCS. (2) AFC-only case: only the FC layers are mapped onto an RCS.

We evaluate the original training method using multiple endu-rance models and initial fault ratios in both cases. Our simulationresults show that Conv layers are sensitive to hard faults, and thus,the accuracy of CNN is approximately 10%, if more than 20% ofthe RRAM cells have hard faults. However, for the FC-only case,the accuracy decreases only when the percentage of faulty cells islarger than 50%.

Fig. 7(a) presents the training accuracy for the entire-CNN case.The mean endurance value of RRAM cells is set to 5× 106. With-out fault-tolerant training, the accuracy can drop to only 10%, and

Page 6: Fault-Tolerant Training with On-Line Fault Detection for ...€¦ · Fault-Tolerant Training with On-Line Fault Detection for RRAM-Based Neural Computing Systems Lixue Xia1, Mengyun

0 0.0877 0.1002 0.1112 0.1112 0.0947 00.05 0.5554 0.1093 0.4951 0.4951 0.1 0.250.1 0.4008 0.1066 0.5054 0.5054 0.1 0.5

0.15 0.2976 0.108 0.3944 0.3944 0.1 0.750.2 0.2677 0.1007 0.2456 0.2456 0.1 1

0.25 0.2409 0.1017 0.2151 0.2151 0.1 1.250.3 0.2048 0.0993 0.2139 0.2139 0.1 1.5

0.35 0.2483 0.1025 0.1892 0.2219 0.1 1.750.4 0.2111 0.1025 0.1668 0.2037 0.1 2

0.45 0.2219 0.1035 0.1649 0.2294 0.1 2.250.5 0.2037 0.1148 0.1573 0.1744 0.1 2.5

0.55 0.2294 0.1135 0.1833 0.1988 0.1 2.750.6 0.2251 0.1045 0.1989 0.2334 0.1 3

0.65 0.1988 0.1961 0.1657 0.2055 0.1 3.250.7 0.2334 0.1104 0.1809 0.178 0.1 3.5

0.75 0.2055 0.1002 0.1566 0.1902 0.1 3.750.8 0.178 0.129 0.1706 0.2422 0.1 4

0.85 0.2102 0.2478 0.2468 0.2468 0.1 4.250.9 0.2422 0.1712 0.2776 0.2776 0.1 4.5

0.95 0.2842 0.2811 0.3663 0.3663 0.1 4.751 0.3315 0.3001 0.3437 0.3437 0.1 5

1.05 0.5755 0.321 0.6299 0.6299 0.11.1 0.7015 0.318 0.7342 0.7883 0.1

1.15 0.7785 0.2347 0.7883 0.8105 0.11.2 0.8089 0.2894 0.8105 0.8204 0.1

1.25 0.8238 0.3726 0.8204 0.8241 0.11.3 0.8328 0.4398 0.8241 0.8268 0.1

1.35 0.8379 0.3552 0.8268 0.8284 0.11.4 0.8399 0.2679 0.8284 0.8294 0.1

1.45 0.8415 0.3137 0.8294 0.8307 0.11.5 0.8429 0.2593 0.8307 0.8314 0.1

1.55 0.8428 0.3179 0.8314 0.8312 0.11.6 0.8445 0.1901 0.8312 0.8302 0.1

1.65 0.8457 0.2445 0.8302 0.829 0.11.7 0.8445 0.1661 0.829 0.8285 0.1

1.75 0.8447 0.227 0.8285 0.8268 0.11.8 0.8459 0.1289 0.8268 0.8287 0.1

1.85 0.8459 0.286 0.8287 0.828 0.11.9 0.8457 0.3258 0.828 0.8303 0.1

1.95 0.8459 0.2787 0.8303 0.8274 0.12 0.8473 0.2325 0.8274 0.8322 0.1

2.05 0.8503 0.2407 0.83 0.8263 0.12.1 0.852 0.2304 0.8322 0.8306 0.1

2.15 0.8522 0.2752 0.8336 0.8295 0.12.2 0.8522 0.296 0.8322 0.8268 0.1

2.25 0.8522 0.2967 0.8263 0.8255 0.12.3 0.8523 0.1957 0.8306 0.8288 0.1

2.35 0.8523 0.3301 0.8295 0.8279 0.12.4 0.8523 0.2764 0.8268 0.828 0.1

2.45 0.8522 0.1126 0.8255 0.8255 0.12.5 0.8526 0.1679 0.8288 0.8288 0.1

2.55 0.8525 0.227 0.8279 0.8279 0.12.6 0.8529 0.104 0.828 0.828 0.1

2.65 0.8528 0.1499 0.8264 0.8264 0.12.7 0.8528 0.1235 0.8164 0.8164 0.1

2.75 0.8526 0.1577 0.822 0.822 0.12.8 0.8528 0.123 0.6625 0.6625 0.1

2.85 0.8533 0.1307 0.7649 0.7649 0.1

0

20

40

60

80

100

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

Acc

ura

cy o

f C

ifar

10

(%

)

Number of Training Iterations (×106)Ideal Case (No Faults)

Original Method

Entire Fault-tolerant Method

Fault-tolerant Method with Threshold Training

0102030405060708090

Acc

ura

cy o

f C

ifar

10

(%

)

Training Iteration Amount (×

Fault-tolerant Method with Threshold Training

Entire Fault-tolerant Method

(a) Entire-CNN case

0 0.0877 0.1032 0.0883 0.1071 0.0967 00.05 0.5554 0.1052 0.1012 0.0999 0.1042 0.250.1 0.4008 0.1 0.0988 0.1003 0.1018 0.5

0.15 0.2976 0.1 0.1 0.1 0.1005 0.750.2 0.2677 0.1 0.1 0.1 0.1 1

0.25 0.2409 0.1 0.1 0.1 0.1 1.250.3 0.2048 0.1 0.1 0.1 0.1 1.5

0.35 0.2483 0.1 0.1 0.1 0.1 1.750.4 0.2111 0.1 0.1 0.1 0.1 2

0.45 0.2219 0.1 0.1 0.1 0.1 2.250.5 0.2037 0.1 0.1 0.1 0.1 2.5

0.55 0.2294 0.1 0.1 0.1 0.1 2.750.6 0.2251 0.1 0.1 0.1 0.1 3

0.65 0.1988 0.1 0.1 0.1 0.1 3.250.7 0.2334 0.1 0.1 0.1 0.1 3.5

0.75 0.2055 0.1 0.1 0.1 0.1 3.750.8 0.178 0.1 0.1 0.1 0.1 4

0.85 0.2102 0.1 0.1 0.1 0.1002 4.250.9 0.2422 0.1045 0.1 0.1 0.1 4.5

0.95 0.2842 0.1 0.1 0.1002 0.1 4.751 0.3315 0.1 0.1 0.1226 0.1 5

1.05 0.5755 0.1115 0.1 0.1125 0.11.1 0.7015 0.1489 0.1 0.183 0.1686

1.15 0.7785 0.1729 0.1 0.1909 0.10021.2 0.8089 0.1737 0.1 0.1976 0.1004

1.25 0.8238 0.1738 0.1002 0.2113 0.10011.3 0.8328 0.1763 0.1038 0.2326 0.1017

1.35 0.8379 0.1891 0.1234 0.2977 0.1251.4 0.8399 0.2293 0.14 0.3594 0.1682

1.45 0.8415 0.224 0.2255 0.4625 0.21681.5 0.8429 0.2841 0.2855 0.5089 0.2768

1.55 0.8428 0.296 0.3369 0.5314 0.30361.6 0.8445 0.3403 0.4245 0.5665 0.3556

1.65 0.8457 0.3975 0.4328 0.5788 0.47811.7 0.8445 0.3876 0.4754 0.6623 0.4383

1.75 0.8447 0.4153 0.5366 0.6648 0.46541.8 0.8459 0.4284 0.5729 0.664 0.5821

1.85 0.8459 0.4954 0.6068 0.695 0.56211.9 0.8457 0.4337 0.5696 0.6528 0.5302

1.95 0.8459 0.5097 0.6258 0.6602 0.57522 0.8473 0.4824 0.6466 0.6979 0.5637

2.05 0.8503 0.5324 0.7143 0.7054 0.40022.1 0.852 0.5687 0.7332 0.7298 0.52

2.15 0.8522 0.6062 0.7479 0.744 0.62762.2 0.8522 0.6016 0.7547 0.7464 0.6434

2.25 0.8522 0.608 0.7555 0.7422 0.66612.3 0.8523 0.616 0.757 0.7451 0.6852

2.35 0.8523 0.6219 0.7611 0.7521 0.68432.4 0.8523 0.6239 0.7595 0.7509 0.6919

2.45 0.8522 0.6325 0.7601 0.7444 0.70212.5 0.8526 0.6337 0.7626 0.2981 0.7001

2.55 0.8525 0.628 0.7634 0.5669 0.64432.6 0.8529 0.6334 0.7644 0.6884 0.6712

2.65 0.8528 0.6248 0.7602 0.7338 0.70012.7 0.8528 0.6292 0.7633 0.7343 0.7097

2.75 0.8526 0.6384 0.7625 0.718 0.69442.8 0.8528 0.6294 0.7606 0.7321 0.7057

2.85 0.8533 0.6314 0.7632 0.7146 0.7056

0

20

40

60

80

100

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

Acc

ura

cy o

f C

ifar

10

(%

)

Number of Training Iterations (×106)

Ideal Case (No Faults)

0102030405060708090

00.511.522.533.544.55

Acc

ura

cy o

f C

ifar

10

(%

)

Training Iteration Amount (×106)

Ideal Case (No Faults)

Original Method

0102030405060708090

00.511.522.533.544.55

Acc

ura

cy o

f C

ifar

10

(%

)

Training Iteration Amount (×106)

Fault-tolerant Method with Threshold Training

Entire Fault-tolerant Method

(b) FC-only caseFigure 7: Training accuracy of fault-tolerant on-line trainingmethod with different endurance models on the Cifar-10 dataset.

the largest accuracy obtained during training is also lower than 40%(the orange line). The threshold-training method (the grey line) canincrease the peak training accuracy to 83% on the Cifar-10 dataset,which is comparable to the fault-free software-based training re-sults (the blue line). However, since the fault tolerance and sparsityof Conv layer is low, the proposed fault-detection and re-mappingsteps cannot further improve the accuracy (the yellow line).

We further evaluate the effect of threshold-training method onthe percentage of faulty cells for different endurance models. Whena high-endurance model with mean value 108 is used, the origi-nal method can train the RCS for approximately 10 times. Sincethe average number of write operations in the threshold-trainingmethod can be reduced to only 6% of that of the baseline method,the threshold-training method can train the RCS for more than 150times. For the endurance model with a lower mean value like 107,the percentage of faulty cells after the first training phase is approx-imately 14% using the original method; while in the second trainingphase, the training phase does not converge. The threshold-trainingmethod can successfully train the network with 14% of the cellsbeing faulty; therefore, the RCS can be trained for approximately27 times.

For the FC-only case, we focus on the scenario in which theRCS has been trained multiple times and contains a large numberof initial faults before the subsequent training. We set the meanendurance value to 108, but reduce the remaining endurance of R-RAM cells to mimic the case in which the RCS has already beentrained multiple times. Fig. 7(b) shows the results for the case inwhich the percentage of RRAM cells with hard faults before train-ing is approximately 50%. With such a large number of initial hardfaults, the peak accuracy of traditional on-line training method (theorange line) is only 63%. The threshold-training method (the greyline) has negligible impact in this case because it can only reducethe occurrence rate of new faults but cannot tolerate the existingfaults. The proposed fault-detection and re-mapping steps (the yel-low line) can identify the hard faults of RRAM cells and toleratethem in the RCS utilizing the sparsity of neural-computing algo-rithms. Based on the proposed fault-tolerant on-line training flow,the accuracy can be increased back to 76%.

7. CONCLUSIONSWe have presented a fault-tolerant training method for an RRAM-

based neural computing system to reduce the impact of hard faultsin RRAM cells. An on-line fault-detection phase has been pro-posed to obtain the distribution of faulty cells during training by us-ing a quiescent-voltage comparison method. In the training phase,threshold training and heuristic re-mapping based on neuron re-ordering are proposed to tolerate faults using the inherit sparsity ofneural networks. Simulation results show that the accuracy in thepresence of faults can be restored to the original training accuracyfor a fault-free scenario.

8. ACKNOWLEDGEMENTSThis work was supported by 973 project 2013CB329000, and

National Natural Science Foundation of China (No. 61373026,61622403), Joint Fund of Equipment Pre Research and Ministryof Education, and Huawei.

9. REFERENCES[1] M. M. Waldrop, “The chips are down for Moore’s law,” Nature News,

vol. 530, no. 7589, p. 144, 2016.[2] P. Chi et al., “Prime: A novel processing-in-memory architecture for

neural network computation in ReRAM-based main memory,” inISCA.

[3] R. Degraeve et al., “Causes and consequences of the stochasticaspect of filamentary RRAM,” Microelectronic Engineering,vol. 147, pp. 171–175, 2015.

[4] L. Xia et al., “Technological exploration of RRAM crossbar array formatrix-vector multiplication,” Journal of Computer Science andTechnology, vol. 31, 2016.

[5] C.-Y. Chen et al., “RRAM defect modeling and failure analysis basedon march test and a novel squeeze-search scheme,” IEEE TC, vol. 64.

[6] K. Beckmann et al., “Nanoscale hafnium oxide RRAM devicesexhibit pulse dependent behavior and multi-level resistancecapability,” MRS Advances, pp. 1–6, 2016.

[7] M. Prezioso et al., “Training and operation of an integratedneuromorphic network based on metal-oxide memristors,” Nature,vol. 521, no. 7550, pp. 61–64, 2015.

[8] S. Han et al., “Deep compression: Compressing deep neural networkwith pruning, trained quantization and Huffman coding,” CoRR,abs/1510.00149, vol. 2, 2015.

[9] S. Kannan et al., “Modeling, detection, and diagnosis of faults inmultilevel memristor memories,” IEEE TCAD, vol. 34.

[10] L. Xia et al., “MNSIM: Simulation platform for memristor-basedneuromorphic computing system,” in DATE, pp. 469–474, 2016.

[11] T. Tang et al., “Binary convolutional neural network on rram,” inASP-DAC, pp. 782–787, IEEE, 2017.

[12] S. Kannan et al., “Sneak-path testing of memristor-based memories,”in VLSID, pp. 386–391, IEEE, 2013.

[13] T. N. Kumar et al., “Operational fault detection and monitoring of amemristor-based LUT,” in DATE, pp. 429–434, IEEE, 2015.

[14] A. Torralba et al., “80 million tiny images: A large data set fornonparametric object and scene recognition,” IEEE TPAMI, vol. 30.

[15] C.-H. Cheng et al., “Novel ultra-low power RRAM with goodendurance and retention,” in VLSI Symp. Tech. Dig, pp. 85–86, 2010.

[16] Y.-S. Fan et al., “High endurance and multilevel operation in oxidesemiconductor-based resistive RAM using thin-film transistor as aselector,” ECS Solid State Letters, vol. 4, no. 9, pp. Q41–Q43, 2015.

[17] C. Xu et al., “Understanding the trade-offs in multi-level cellReRAM memory design,” in DAC, pp. 1–6, IEEE, 2013.

[18] Y. LeCun et al., “The MNIST database of handwritten digits,” 1998.[19] C. Stapper, “Simulation of spatial fault distributions for integrated

circuit yield estimations,” IEEE TCAD, vol. 8.[20] L. Xia et al., “Switched by input: power efficient structure for

RRAM-based convolutional neural network,” in DAC, p. 125, ACM,2016.