+ All Categories
Home > Documents > A 42pJ/Decision 3.12TOPS/W Robust In-Memory...

A 42pJ/Decision 3.12TOPS/W Robust In-Memory...

Date post: 04-Jan-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
13
Title: A 42pJ/Decision 3.12TOPS/W Robust In-Memory Machine Learning Classifier with On-Chip Training Archived version Accepted manuscript: the content is similar to the published paper, but without the final typesetting by the publisher Published version DOI 10.1109/ISSCC.2018.8310398 Published paper URL http://ieeexplore.ieee.org/abstract/document/8310398/ Authors (contact) Sujan K. Gonugondla ([email protected]) Mingu Kang ([email protected]) Naresh R. Shanbhag ([email protected]) Affiliation University of Illinois at Urbana Champaign Article begins on next page
Transcript
Page 1: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

Title: A 42pJ/Decision 3.12TOPS/W Robust In-Memory Machine Learning Classifier with On-Chip Training

Archived version Accepted manuscript: the content is similar to the published paper, but without the final typesetting by the publisher

Published version DOI

10.1109/ISSCC.2018.8310398

Published paper URL

http://ieeexplore.ieee.org/abstract/document/8310398/

Authors (contact) Sujan K. Gonugondla ([email protected]) Mingu Kang ([email protected]) Naresh R. Shanbhag ([email protected])

Affiliation University of Illinois at Urbana Champaign

Article begins on next page

Page 2: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

A 42pJ/Decision 3.12TOPS/W Robust In-Memory Machine Learning Classifier with On-Chip Training

Sujan Gonugondla, Mingu Kang, Naresh Shanbhag

University of Illinois at Urbana-Champaign

Embedded sensory systems (Fig. 31.2.1) continuously acquire and process data for inference and decision-

making purposes under stringent energy constraints. These always-ON systems need to track changing data

statistics and environmental conditions, such as temperature, with minimal energy consumption. Digital

inference architectures [1,2] are not well-suited for such energy-constrained sensory systems due to their

high energy consumption, which is dominated (>75%) by the energy cost of memory read accesses and

digital computations. In-memory architectures [3,4] significantly reduce the energy cost by embedding pitch-

matched analog computations in the periphery of the SRAM bitcell array (BCA). However, their analog nature

combined with stringent area constraints makes these architectures susceptible to process, voltage, and

temperature (PVT) variation. Previously, off-chip training [4] has been shown to be effective in compensating

for PVT variations of in-memory architectures. However, PVT variations are die-specific and data statistics

in always-ON sensory systems can change over time. Thus, on-chip training is critical to address both

sources of variation and to enable the design of energy efficient always-ON sensory systems based on in-

memory architectures. The stochastic gradient descent (SGD) algorithm is widely used to train machine

learning algorithms such as support vector machines (SVMs), deep neural networks (DNNs) and others. This

paper demonstrates the use of on-chip SGD-based training to compensate for PVT and data statistics

variation to design a robust in-memory SVM classifier

Page 3: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

Figure 31.2.2 shows the system architecture with an analog in-memory (IMCORE) block, a digital trainer, a

control block (CTRL) for timing and mode selection, and normal SRAM R/W interface. The system can

operate in 3 modes: conventional SRAM mode, in-memory inference mode, and training mode. IMCORE

comprises a conventional 512 × 256 6T SRAM BCA and in-memory computation circuitry: 1) pulse width

modulated (PWM) word-line (WL) drivers to realize functional read (FR), 2) bit-line processors (BLPs)

implementing signed multiplication, 3) cross BLP (CBLP) implementing summation, and 4) A/D converter and

a comparator bank to generate final decisions. While the IMCORE implements the feedforward computations

of SVM algorithm, the trainer implements batch mode SGD algorithm (update equations in Fig. 31.2.2) to

train the SVM weights W stored in the BCA. The input vectors X are streamed into the input buffers in the

trainer. Gradient estimate Δ is accumulated for each input based on the label yn and outputs δ1,n and δ-1,n of

IMCORE. At the end of each batch, the accumulated gradient estimate Δ is used to update the weights in

BCA via the normal R/W interface. While 16b weights are used in the trainer during the weight update,

feedforward/inference only use 8b weights. The learning rate γ and regularization factor α can be reconfigured

in the powers of 2.

During the feedforward computations, W is read in analog domain on the bit-lines (BLs) and the input vectors

X transferred to the BLP via a 256b bus. The mixed-signal capacitive multiplier in the BLP realizes

multiplication via sequential charge sharing similar to the one introduced in [3]. Based on their sign, the

multiplier outputs are charge shared either on the positive or on the negative CBLP rails across the BLs. The

voltage difference of the negative and positive rails is proportional to the dot product WT X. The rail values

are either sampled and converted to a digital value by an ADC pair or a decision is obtained directly via a

comparator bank. Three comparators are used where one generates the decision ŷ while the other two

comparators implement a SVM margin detector which triggers a gradient estimate update.

Page 4: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

Functional read (Fig. 31.2.3) uses 4-parallel pulse-width and amplitude-modulated (PWAM) WL enable

signals resulting in the BL discharge ΔVBL ( or ΔVBLB ) proportional to Wi s stored in column-major format (Fig

31.2.3), in one precharge cycle. The BL discharges (ΔVBL) of 4b words read in the adjacent BLs are combined

in 1:16 ratio to realize an 8b read out. This enables 8b 128 dimensional vector processing per access. The

weights are represented in 2’s complement. A comparator detects the sign of Wi which is then used to select

its magnitude, both of which are passed on to the signed multipliers. Spatial variations impacting ΔVBL is

measured across 30 randomly chosen 4-row groups. When the maximum ΔVBL (ΔVBL,max), corresponding to

Wi = 15, is set to 320mV, the maximum variation in ΔVBL ((σ ⁄ μ)max) across all 16 values, is found to be 16%

vs. 7% at ΔVBL,max =560mV. This increase in the impact of variation leads to an increase in the

misclassification rate: from 4% to 18%.

The MIT CBCL face detection data is used to test the IC. The dataset has 4000 training images and 858 test

images. During training, input vectors are randomly sampled with replacement from the training set. At the

end of each batch, the classifier is tested on test set to obtain the misclassification (error) rate. Figure 31.2.4

shows the benefits of on-chip learning in overcoming process and data variations, and the need for learning

chip-specific weights. Beginning with random initial weights and ΔVBL,max = 560mV, the learning curves

converge to within 1% to floating point accuracy in 400 batch updates for learning rates γ ≥ 2-4. The

misclassification rate increases dramatically to 18% when ΔVBL,max is reduced to 320mV at batch number

400 due to increased impact of process variations during FR. Continued on-chip learning reduces this

misclassification rate down to 8% for γ ≥ 2-4. Similar results are observed when illumination changes abruptly

at batch number 400 indicating robustness to variations in data statistics. The table in Fig. 31.2.4 shows the

misclassification rate measured across 5 chips when the weights are trained on one chip and used in others.

Page 5: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

The use of chip-specific weights (diagonal) results in an average misclassification rate of 8.4% vs. 43% when

it is not, indicating the need for on-chip learning.

Figure 31.2.5 shows the trade-off between the misclassification rate, IMCORE energy, and ΔVBL,max. On-chip

training enables the IC to achieve an misclassification rate to < 8% at a 38% lower ΔVBL,max = 320mV and a

lower IMCORE supply Vdd,IMCORE = 0.675V, compared to the use of weights obtained at ΔVBL,max = 560mV

and Vdd,IMCORE = 0.925V. Thus, the IMCORE energy is reduced by 2.4× without any loss in accuracy. The

energy cost of the training is dominated by the normal SRAM writes of updated weights done once per batch.

This cost reduces with batch size N reaching 26% of the total energy cost, for a batch size of 128. At this

batch size, 60% of the total energy is due to CTRL. This CTRL energy overhead will reduce with increase in

SRAM size.

Figure 31.2.6 shows that the prototype IC achieves a system IMCORE energy efficiency of 42pJ/decision at

a throughput of 32M decisions/s which corresponds to a computational energy efficiency of 3.12TOPS/W (1

OP = 8b×8b MAC). This work achieves the lowest reported precision-scaled MAC energy as well as the

lowest reported MAC energy when SRAM memory access costs are included. Energy consumption of digital

architectures [1,2] to realize the 128 dimensional SVM algorithm of this work is estimated from their MAC

energy, which shows a savings of >7× thereby demonstrating the suitability of this work for energy-

constrained sensory applications.

The die micrograph of the 65nm CMOS IC and performance summary is shown in Fig. 31.2.7.

Page 6: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

Acknowledgements:

This work was supported in part by Systems On Nanoscale Information fabriCs (SONIC), one of the six SRC

STARnet Centers, sponsored by MARCO and DARPA. The authors would like to acknowledge constructive

discussions with Professors Pavan Hanumolu, Naveen Verma, Boris Murmann, and David Blaauw.

References:

[1] Y.H. Chen, et al., "Eyeriss: An energy-efficient reconfigurable accelerator for deep convolutional neural

networks," IEEE ISSCC, pp. 262-263, Feb 2016.

[2] P.N. Whatmough, et al., "A 28nm SoC with a 1.2GHz 568nJ/prediction sparse deep-neural-network engine

with >0.1 timing error rate tolerance for IoT applications," IEEE ISSCC, pp. 242-243, Feb 2017.

[3] M. Kang, et al. "A 481pJ/decision 3.4 M decision/s multifunctional deep in-memory inference processor

using standard 6T SRAM array," arXiv preprint arXiv : 1610.07501, 2016.

[4] J. Zhang, et al., "In-memory computation of a machine learning classifier in a standard 6T SRAM array,"

IEEE JSSC, vol. 52, no. 4, pp. 915-924, April 2017.

[5] E.H. Lee, et al., "A 2.5GHz 7.7TOPS/W switched-capacitor matrix multiplier with co-designed local

memory in 40nm," IEEE ISSCC, pp. 418-419, Feb 2016.

[6] S. Joshi, et al., "2pJ/MAC 14b 8×8 linear transform mixed-signal spatial filter in 65nm CMOS with 84dB

interference suppression," IEEE ISSCC, pp. 364-365, Feb 2017.

Page 7: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

A/D always ON classifier decisions host processor

sensory data inputs

energy per decision for SVM (pJ)(post-layout simulated, 65nm CMOS)

Figure 31.2.1: An SGD-based on-chip learning system for robust energy efficient always-ON classifiers.

SRAM(weights)

decis

ions

inputs

digital architecture

in-memory architecture

actuationsignals

buffe

r

decis

ions

Train

er

inputs low swing analog computation 0

500

1000

in-memory conventionaltrainingleakagecomputationmemory access

buffe

r

SRAM(weights) 4.5XCT

RLCT

RLmemory access dominates

energy and delay costs

reduces memory access costs

but variations in PVT &data statistics impact

robustness

digital processorand trainer

energy breakdown of digital architecture (post-layout simulated, 65nm CMOS)

memory accesscomputationleakagetraining

48%

35%

9%8%

Page 8: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

4:1 Column mux Instructions

Signed Multiplier

Cross BL processor (CBLP)

Decision & ADC

Scan‐out

Normal R/W InterfaceInst.

Set Reg.

512 X 2566T SRAM

Bitcell Array(BCA)

Bitcell

Bitcell

Bitcell

BitcellPWM W

L Driver

ADC[0:3]

X

MainCTRL

Signed Multiplier

Execute

X Fetch

R/W CTRL

Comp

X[0] X[128]

BL 0

BLB

0

BL 2

55

BLB

255

LearningCTRL

Learn CtrlW

bidirectional bus

PWM W

L Driver

16b 128‐word update buffer 

 8b 128‐word input buffer

16b 64‐word weight buffer 

Trainer CTRL

Array data in

Read data out

BLP CtrlBit‐line 

processors (BLP)

64b

testing (31 cycles) weight update (538 Cycles)

weight update

feedforward

gradient estimate

n=1 n=N

batch 2 (m=2)

n=2 n=1 n=2inputs(n)

training (39 cycles)

batch 1 (m=1)

Figure 31.2.2: Proposed SGD-based in-memory classifier architecture.

IMCORE (analog)

, 1, 1

functional read & BLP

Comparator-basedSVM margin detector

Δ, 0

or , 00 otherwise

1 ΔN

gradient estimate

weight update

Trainer & normal R/W (digital)

support vector machine (SVM) computations

Comparator

Page 9: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0

0.1

0.2

0.3

0.4

0 2 4 6 8 10 12 14 16

BL M

SB,0

W : M

SB 8b

W : LSB

 8b

BLB

MSB,0

BL L

SB,0

BLB

LSB,0

w0,15

w0,14

w0,13

w0,12

w0,11

w0,10

w0,9

w0,8

WL0WL1WL2WL3

w0,7

w0,6

w0,5

w0,4

w0,3

w0,2

w0,1

w0,0

CBLøcon

øcon

ømerge

CBL1516

CBL1516

CBL116

CBL116

Functional read

MSB‐LSB

 Merge

Parasitic

W0W0 W0W0

W0W0

SIGN(W0)SIGN(W0)

Sign

ed rea

d

COMP EN

BLMUX,0

ømerge

BL M

SB,1

BLB

MSB,1

BL L

SB,1

BLB

LSB,1

w1,15

w1,14

w1,13

w1,12

w1,11

w1,10

w1,9

w1,8

w1,7

w1,6

w1,5

w1,4

w1,3

w1,2

w1,1

w1,0

CBLøcon

CBL1516

CBL1516

CBL116

CBL116Parasitic

SIGN(W1)SIGN(W1) BLMUX,1

ømerge

W1W1 W1W1

W1W1

W0 in column 1&2 of BCA 

W1 in column 3&4 of BCA 

(V)

⁄Figure 31.2.3: In-memory functional read, measured spatial variations on bitline swing, and its impact on the measured SVM misclassification rate.

, ⁄

spatial variation of @ Δ , 320mV

misc

lassif

icatio

n ra

te (%

)

,

0

10

20

30

40

50

60

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0 100 200 300 400 500 600

floating point

Page 10: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

05

1015202530354045

0 100 200 300 400 500 600

learning rate ( )

Δ , 320mV

2222

floating point

Δ , 560mV

misc

lassif

icatio

n ra

te (%

)

number of batch updates (batch size )non-uniform illumination

uniform illumination

05

1015202530354045

0 100 200 300 400 500 600number of batch updates (batch size )

Δ , 560mV

misc

lassif

icatio

n ra

te (%

)

Chip1 Chip2 Chip3 Chip4 Chip5

Chip1 8.25 38.3 48.3 51.5 48.8

Chip2 45.8 9 48 49.8 34.5

Chip3 47 51.3 8.5 29.8 49.3

Chip4 51.5 51 17.5 8.25 51.3

Chip5 38.3 18 48.5 48.5 8

train

ed o

n

tested on

misclassification rate (%) (Δ , 320mV)

Figure 31.2.4: Measured robustness to spatial variations and non-stationary data.

γ 2

Page 11: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

Figure 31.2.5: Measured energy via supply voltage and BL swing scaling, and energy cost of training.

0

20

40

60

80

100

120

0

10

20

30

40

50

60

0 100 200 300 400 500 600

after retraining no retraining IMCORE energy

(0.65) (0.65) (0.65)(0.675)

(0.725)

(0.8)

(0.925)

2.4x

IMCO

RE en

ergy

per

dec

ision

(pJ)

,

misc

lassif

icatio

n ra

te (%

)

38%

DD, (V)

0

200

400

600

800

1000

1200

8 16 32 64 128

Trainer

CTRL

IMCORE

batch size ( )on-chip training energy

DD, 0.675VΔ , 320mV

Tota

l ene

rgy p

er d

ecisi

on (p

J)

78%

64%49%

36% 26%

Page 12: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

[1] [2] [5] [6] [3] [4] this workTechnology 65nm 28nm HPC 40nm 65nm 65nm 180nm 65nmAlgorithm CNN FC-DNN matrix mult. filtering SVM AdaBoost SVMData set ImageNet MNIST MIT-CBCL MNIST MIT-CBCLArchitecture digital digital analog analog in-memory in-memory in-memoryOn-chip learning No No No No No No YesTotal SRAM size (kb) 1449.2 9248 128 103.6 128Energy/Decision 7.94mJd 0.56uJ 0.4nJ 0.6nJ 0.042nJDecisions/s 35 28.8kd 9.2M 7.9M 32M# of MACs/Decision 2663M 334k 512 128Max. accuracy (%) 98 96 91 96

MAC level metricsMAC precisiona ( ) 16s 16s 8s 8s 3s 6s 8 14s 8 8 5 1 8 8s

Efficiency (TOPS/W) 0.336d 0.56d 3.84b 0.5b 1.25 3.125

MAC energy ( ) (pJ) 2.98 d 1.79d 0.26b 2b 0.8 0.32precision-scaled MAC energyc (fJ) 11.6 28 14.4b 17.857b 12.5 4.9

Estimated performance to realize SVM algorithm with vector dimension of 128Energy/Decision (nJ) 0.381 0.229 0.033b 0.256b 0.102 0.042Decisions/s 250M 75M 19.5M 350k 36.8M 32M# MACs per cycle 168 8 1 64 256 10,368 128a s indicates signed; : input precision; : weight precisionb does not include SRAM memory access

c normalized to account for operand precision ( /( ))d estimated from reported data

Figure 31.2.6: Comparison table.

Page 13: A 42pJ/Decision 3.12TOPS/W Robust In-Memory …shanbhag.ece.illinois.edu/publications/sujan-isscc-2018.pdfFigure 31.2.2 shows the system architecture with an analog in-memory (IMCORE)

Testblock

1.2 mm

1.2 m

m

Trainer

SRAM BitcellArray

Normal R/W Interface

BLP-CBLP

Figure 31.2.7: Die micrograph and chip summary.

Technology 65nm CMOS

Die size 1.2 mm 1.2mm

Memory capacity 16KB (512 256)

Nominal Supply 1.0 V

CTRL operating frequency 1 GHz

Energy per decision (nJ)

Test 0.21

Training 0.34

Average throughput(decision/s)

Test 32.3 M

Training 21 M

CTRL

ADC

64b

Bus


Recommended