Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars...

23
Current Mode Memristor Crossbars for Neuromorphic Computing Neuro-Inspired Computational Elements Workshop, 2019 Cory Merkel, Ph.D. Assistant Professor Department of Computer Engineering Rochester Institute of Technology brainlab

Transcript of Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars...

Page 1: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

Current Mode MemristorCrossbars for

Neuromorphic ComputingNeuro-Inspired Computational Elements Workshop, 2019

Cory Merkel, Ph.D.Assistant Professor

Department of Computer Engineering

Rochester Institute of Technology brain⋅lab

Page 2: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 2Cory Merkel

Agenda• Background and Motivation• Current-Mode Crossbars• MNIST Experiments• Conclusions and Future Work

brain⋅lab

Page 3: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 3Cory Merkel

Agenda• Background and Motivation• Current-Mode Crossbars• MNIST Experiments• Conclusions and Future Work

brain⋅lab

Page 4: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 4Cory Merkel

Motivation• Memristors Avenue for low-power

neuromorphic hardware

• Previous work proposes voltage-driven crossbars for neural network weight matrices2,3

brain⋅lab

1C. Merkel et al., “Neuromemristive systems: Boosing efficiency through brain-inspired computing,”IEEE Computer, October 2016.2G. Indiveri et al., “Integration of nanoscale memristor synapses in neuromorphic computingarchitectures,”Nanotechnology, 2013.3G. W. Burr et al., “Neuromorphic computing using non-volatilememory,”Advances in Physics: X, vol. 2, no. 1, pp. 89–124, 2017.

0

500

1000

1500

2000

2500

3000

3500

1985 1990 1995 2000 2005 2010 2015 2020

Memristor Neural Network Publications per Year(Based on Google Scholar search results for “memristor + neural network”)

Page 5: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 5Cory Merkel

Motivation• Voltage-mode neurons driving memristor

crossbars suffer from a few drawbacks:‒ Large memristor conductances Neuron output

degradation‒ IR drop over long-distance communication pathways

• Some solutions: 1T1R, spiking networks• Current-mode designs offer

‒Better input/output swing, reduced loading issues‒ Low voltage operation and higher bandwidth‒Nice design techniques (e.g. translinear principle)

brain⋅lab

Can we operate a memristor crossbar in current mode (current in, current out) for neuromorphic computing?

Page 6: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 6Cory Merkel

• Memristor = “Memory + Resistor”‒ 2-Terminal thin-film device with state-dependent

Ohm’s Law (Chua, 2011)

Overview of Memristor Devices

Top Electrode(Metal)

Switching Layer(Insulator)

Bottom Electrode(Metal)

Metal MetalInsulator

FermiLevel Fermi

Level

𝒒𝒒𝒗𝒗𝒎𝒎

𝐷𝐷𝑎𝑎

VacuumLevel

= Electron= Defect

Memristors

Metric Flash PCM STT-RAM RRAM Targets

DynamicRange

- >1000 2 1000 >4

Number of States

8-16 100 4 100 20-100

Retention Several years at room temp. Years

Energy(pJ/bit)

>100 2-25 0.1-2.5 0.1-3 0.01

Endurance (cycles)

104 109 1015 1012 109

𝑖𝑖𝑚𝑚 = 𝐺𝐺𝑚𝑚 𝛾𝛾 𝑣𝑣𝑚𝑚

𝑣𝑣𝑚𝑚𝐺𝐺𝑚𝑚(𝛾𝛾)

Table compiled from (Yang et al., 2013; Kuzum et al., 2013; Devised et al., 2013; Ishigaki et al., 20

Similar to Biological Synapses

Facilitate:

1.) Computation2.) Memory3.) Learning

brain⋅lab

Page 7: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 7Cory Merkel

Agenda• Background and Motivation• Current-Mode Crossbars• MNIST Experiments• Conclusions and Future Work

brain⋅lab

Page 8: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 8Cory Merkel

Voltage-Mode Memristor Xbar• Matrix-vector multiplication

implemented by xbar as𝐬𝐬 = 𝐖𝐖𝐖𝐖

• Each weight is defined by a single memristorconductance

𝑤𝑤𝑖𝑖𝑖𝑖 = 𝐺𝐺𝑖𝑖𝑖𝑖/𝐺𝐺𝑚𝑚𝑚𝑚𝑚𝑚

• Weight range𝑔𝑔 ≤ 𝑤𝑤𝑖𝑖𝑖𝑖 ≤ 1

where 𝑔𝑔 ≡ 𝐺𝐺𝑚𝑚𝑖𝑖𝑚𝑚/𝐺𝐺𝑚𝑚𝑚𝑚𝑚𝑚

brain⋅lab

Page 9: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 9Cory Merkel

Current-Mode Memristor Xbar• The weight definition

becomes:

𝑤𝑤𝑖𝑖𝑖𝑖 =𝐺𝐺𝑖𝑖𝑖𝑖

∑𝑘𝑘=1𝑀𝑀 𝐺𝐺𝑘𝑘𝑖𝑖

• The maximum driving current should be

𝐼𝐼𝑚𝑚𝑚𝑚𝑚𝑚 < 𝑉𝑉𝑡𝑡𝑡�𝑖𝑖

𝐺𝐺𝑖𝑖𝑖𝑖

to avoid read disturb

brain⋅lab

Page 10: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 10Cory Merkel

• Weight range depends on the fanout:1

𝑀𝑀 − 1 𝑔𝑔 + 1≤ 𝑤𝑤𝑖𝑖𝑖𝑖 ≤

𝑔𝑔𝑀𝑀 − 1 + 𝑔𝑔

• Range approaches [0,1] for large 𝑔𝑔• May need to split into multiple crossbars for very

large 𝑀𝑀

Weight Range brain⋅lab

Page 11: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 11Cory Merkel

Weight Distribution• Constraint: Weights in a column

must sum to 1

• Given a target weight matrix 𝐖𝐖,find closest constrained matrix 𝐖𝐖

brain⋅lab

� = 1 � = 1 � = 1

minimize �𝑖𝑖=1

𝑀𝑀

�𝑖𝑖=1

𝑁𝑁

𝑤𝑤𝑖𝑖𝑖𝑖 − 𝑤𝑤𝑖𝑖𝑖𝑖2

s. t. �𝑖𝑖

𝑤𝑤𝑖𝑖𝑖𝑖 = 1 ∀ 𝑗𝑗 = 1,2, … ,𝑁𝑁

𝑤𝑤𝑚𝑚𝑖𝑖𝑚𝑚 ≤ 𝑤𝑤𝑖𝑖𝑖𝑖 ≤ 𝑤𝑤𝑚𝑚𝑚𝑚𝑚𝑚

𝑤𝑤𝑖𝑖𝑖𝑖 =1𝑀𝑀

1 −�𝑘𝑘=1

𝑀𝑀

𝑤𝑤𝑘𝑘𝑖𝑖 + 𝑤𝑤𝑖𝑖𝑖𝑖

𝐺𝐺𝑖𝑖𝑖𝑖 =𝑤𝑤𝑖𝑖𝑖𝑖𝑤𝑤𝑘𝑘𝑖𝑖

𝐺𝐺𝑘𝑘𝑖𝑖

Page 12: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 12Cory Merkel

• Simple perceptron trained to perform AND andOR logic functions then mapped to current-mode xbar

• Accuracy:

• Current-mode weight matrixhas large mismatch from target:

Can’t simultaneously control relative and absolute weights in current-mode

AND-OR Perceptronbrain⋅lab

Voltage-Mode Current-Mode

100% 50%

Target Current-Mode

0

1

Page 13: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 13Cory Merkel

Addition of Dummy Row• Dummy row allows magnitude

of entire column to be adjusted• Now, set weights as:

brain⋅lab

“Dummy” row

𝑤𝑤𝑖𝑖𝑖𝑖 = 𝑤𝑤𝑖𝑖𝑖𝑖 ∀ 𝑖𝑖 < 𝑀𝑀

𝑤𝑤𝑀𝑀𝑖𝑖 = 1 −�𝑘𝑘=1

𝑀𝑀

𝑤𝑤𝑘𝑘𝑖𝑖

-1

Target Current-Mode

0

1

Page 14: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 14Cory Merkel

Restrict Target Weights• Finally, to make sure a target matrix can be

mapped to the current-mode crossbar:

max1 −𝑤𝑤𝑚𝑚𝑚𝑚𝑚𝑚

𝑀𝑀 − 1,𝑤𝑤𝑚𝑚𝑖𝑖𝑚𝑚 ≤ 𝑤𝑤𝑖𝑖𝑖𝑖 ≤ min

1 −𝑤𝑤𝑚𝑚𝑖𝑖𝑚𝑚

𝑀𝑀 − 1,𝑤𝑤𝑚𝑚𝑚𝑚𝑚𝑚

• The target matrix constraint can be satisfied using regularization techniques

brain⋅lab

With these constraints, any voltage-mode crossbar maps uniquely to an equivalent current-mode crossbar.

Page 15: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 15Cory Merkel

Bipolar Weights• We can create bipolar (positive and negative)

weights without the need for two memristors

• We know the total current from the pre-synaptic neurons‒ Just subtract a fraction of it to get positive and

negative weights

𝑠𝑠𝑖𝑖 = �𝑖𝑖=1

𝑁𝑁𝐺𝐺𝑖𝑖𝑖𝑖

∑𝑘𝑘=1𝑁𝑁 𝐺𝐺𝑘𝑘𝑖𝑖𝑥𝑥𝑖𝑖 − 𝜃𝜃�

𝑖𝑖=1

𝑁𝑁

𝑥𝑥𝑖𝑖 = 𝑤𝑤𝑖𝑖𝑖𝑖∗ 𝑥𝑥𝑖𝑖

where 𝑤𝑤𝑖𝑖𝑖𝑖∗ = 𝑤𝑤𝑖𝑖𝑖𝑖 − 𝜃𝜃

• Good choice for 𝜃𝜃 is usually 𝑤𝑤𝑚𝑚𝑚𝑚𝑚𝑚+𝑤𝑤𝑚𝑚𝑚𝑚𝑚𝑚2

brain⋅lab

Page 16: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 16Cory Merkel

Gradient Descent• We can train offline using the proposed method,

but online training is more desirable• Gradient descent can be implemented as

brain⋅lab

Just use delta rule for non-dummy rows and average the updates for dummy row

Δ𝐺𝐺𝑖𝑖𝑖𝑖𝑙𝑙 = −𝛼𝛼𝜕𝜕𝜕𝜕𝜕𝜕𝐺𝐺𝑖𝑖𝑖𝑖𝑙𝑙

= 𝛼𝛼�𝑘𝑘=1

𝑀𝑀𝑙𝑙

𝛿𝛿𝑘𝑘𝑙𝑙 𝑥𝑥𝑖𝑖𝑙𝑙−1𝜕𝜕𝑤𝑤𝑘𝑘𝑖𝑖𝑙𝑙

𝜕𝜕𝐺𝐺𝑖𝑖𝑖𝑖𝑙𝑙

≈ �𝛼𝛼𝛿𝛿𝑖𝑖𝑙𝑙𝑥𝑥𝑖𝑖𝑙𝑙 𝑖𝑖 ≠ 𝑀𝑀

− Δ𝐺𝐺1:𝑀𝑀−1,𝑖𝑖𝑙𝑙 𝑖𝑖 = 𝑀𝑀

AND/OR Perceptron

Page 17: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 17Cory Merkel

Agenda• Background and Motivation• Current-Mode Crossbars• MNIST Experiments• Conclusions and Future Work

brain⋅lab

Page 18: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 18Cory Merkel

MNIST Experiments• Circuits modeled in MATLAB based on Ag

chalcogenide devices1: ‒ 𝐺𝐺𝑚𝑚𝑖𝑖𝑚𝑚 = 2.1 × 10−5 S‒ 𝐺𝐺𝑚𝑚𝑚𝑚𝑚𝑚 = 1 × 10−3 S

• MLP with 49 inputs, 50 hiddenunits, and 10 outputs

• Classification on MNIST handwritten digits (60000 train, 10000 test)

brain⋅lab

1A. S. Oblea et al., “Silver Chalcogenide Based Memristor Devices,” Proceedings of the IEEE , vol. 3, 2010.

Page 19: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 19Cory Merkel

• Trained using online backpropagation‒Delta rule for voltage-mode‒Derived rule for current-mode

• Similar convergence and final accuracy values

Classification Accuracybrain⋅lab

Page 20: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 20Cory Merkel

Defect Tolerance• Defects in the current-mode crossbar (e.g. stuck-

at faults) will affect the weight range of each row in the column:

• Results indicate that current-mode design may be as robust as voltage-mode‒More results are needed to verify

brain⋅lab

Page 21: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 21Cory Merkel

Agenda• Background and Motivation• Current-Mode Crossbars• MNIST Experiments• Conclusions and Future Work

brain⋅lab

Page 22: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 22Cory Merkel

Conclusions and Future Work• Conclusions:

‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence and defect tolerance

‒Some considerations Reduced weight range Need for a dummy row

• Future work‒SPICE simulations for power consumption and

performance analysis‒Deeper analysis of weight distributions and feature

extraction

brain⋅lab

Page 23: Current Mode Memristor Crossbars for Neuromorphic Computing · ‒Current-mode memristor crossbars may be a viable alternative to voltage-mode designs Similar training convergence

www.rit.edu/brainlab 23Cory Merkel

Thank You!brain⋅lab