Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic...

Post on 13-Dec-2015

216 views 0 download

Tags:

Transcript of Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic...

Marc Riedel – EE5393

The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic

The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic

Electrical & Computer EngineeringUniversity of Minnesota

A

B

C

Opportunities & Challenges

• Topological constraints.• Inherent structural randomness.• High defect rates.

Novel materials, devices, technologies:

Challenges for logic synthesis:

• High density of bits/logic/interconnects.

{

{

N Wires

M Wires

Opportunities & Challenges

Strategy:• Cast synthesis in terms of arithmetic

operations on real values.• Synthesize circuits that compute

logical values with probability corresponding to the real-valued inputs and outputs.

{

{

N Wires

M Wires

Probabilistic Signals

Claude E. Shannon1916 –2001

“A Mathematical Theory of Communication” Bell System Technical Journal, 1948.

deterministic

random

deterministic

Stochastic LogicStructure logical computation probabilistically.

p1 = Prob(1)

p2 = Prob(1)

1,1,0,1,0,1,1,0…

1,0,0,0,1,1,0,0,…

combinationalcircuit

0,1,1,0,1,0,1,0,…

0,1,1,0,1,0,0,0,…

1,0,1,0,1,0,1,0,…

1,1,1,1,1,1,1,1,…

Stochastic Logic

5/8

3/8

Structure logical computation probabilistically.

1,1,0,1,0,1,1,0…

1,0,0,0,1,1,0,0,…

combinationalcircuit

0,1,1,0,1,0,1,0,…

0,1,1,0,1,0,0,0,…

1,0,1,0,1,0,1,0,…

1,1,1,1,1,1,1,1,…

Stochastic Logic

5/8

3/8

4/8

3/8

4/8

8/8

Probability values are the input and output signals.

combinationalcircuit

Stochastic LogicProbability values are the input and output signals.

1,1,0,1,0,1,1,0…

1,0,0,0,1,1,0,0,…

0,1,1,0,1,0,1,0,…

0,1,1,0,1,0,0,0,…

1,0,1,0,1,0,1,0,…

1,1,1,1,1,1,1,1,…

serial bit streams

combinationalcircuit

combinationalcircuit

Stochastic LogicProbability values are the input and output signals.

parallel bit streams

4/8

3/8

4/8

8/8

5/8

3/8

A real value x in [0, 1] is encoded as a stream of bits X.For each bit, the probability that it is one is: P(X=1) = x.

Probabilistic Bundles

01001

xX

A

VDD

A{{

N Wires

M Wires

Nanowire Crossbar (idealized)

Randomized connections,yet nearly one-to-one.

Interfacing with Stochastic LogicInterpret outputs according to fractional weighting.

combinationalcircuit

Arithmetic Operations

AND

A

BC

A

BC

MUX

S

Multiplication (Scaled) Addition

ba

BPAP

CPc

)()(

)(

)

)1(

()](1[)()(

)(

bsas

BPSPAPSP

CPc

Computing with Probabilities

combinationalcircuit

X2

X1

Xn

independentrandomBooleanvariables

YrandomBooleanvariable

ii xX )1Pr(

10 ix

),,()1Pr( 1 nxxfyY

10 y

Computing with Probabilities

combinationalcircuit

independentrandomBooleanvariables

YrandomBooleanvariable

Constrain the problem:

(independently)

constant

)1Pr(

tX i

X2

X1

Xn

Computing with Probabilities

combinationalcircuit

Constrain the problem:

(independently)

constant

)1Pr(

tX i

)(tft

X

Y

X

Y

Z

Z

C

S

Computing with Probabilities

(independently)tZX )1Pr()1Pr(

3.0)1Pr( Y

t

t

t

t

0.3

0.3

24.06.0 tt

3.08.08.0 2 tt

SynthesisAnalysis

“There are known ‘knowns’; and there are unknown ‘unknowns’; but today I’ll speak of the known ‘unknowns’.”

– Donald Rumsfeld, 2004

combinationalcircuit

Probabilistic Inputs

Probabilistic Outputs

KnownKnown

UnknownSpecified /Independent

UnknownGiven

Synthesis

“There are known ‘knowns’; and there are unknown ‘unknowns’; but today I’ll speak of the known ‘unknowns’.”

– Donald Rumsfeld, 2004

Questions:

• What kinds of functions can be implemented in the probabilistic domain?

• How can we synthesize the logic to implement these?

Probabilistic Domain

A polynomial g(t) is either:1. g(t) ≡ 0 or 1, or2. 0 < g(t) < 1, for 0 < t < 1 and 0 ≤ g(0), g(1) ≤ 1

combinationalcircuit )(tgt

A necessary and sufficient condition:

Probabilistic Domain

combinationalcircuit )(tgt

Synthesis steps:

1. Convert the polynomial into a Bernstein form.

2. Elevate it until all coefficients are in the unit interval.

3. Implement this with “generalized multiplexing”.

A little math…

( ) (1 ) ,n i n ii

nB t t t

i

0,1, ,i n

Bernstein basis polynomial of degree n

A little math…

( ) (1 ) ,n i n ii

nB t t t

i

0,1, ,i n

0

( ) ( )n

n n ni i

i

B t b B t

Bernstein basis polynomial of degree n

Bernstein polynomial of degree n

nib is a Bernstein coefficient

A little math…

0

( ),

( )

iijn n

i jnj j

b a

0,1, ,i n

Obtain Bernstein coefficients from power-form coefficients:

Given0 0

( ) ( )n n

n i n ni i i

i i

g t a t b B t

, we have

A little math…

0

11

0

(1 ) 11 1

1

m

m m mi i i

mm

b i

i ib b b i m

m mb m

Elevate the degree of the Bernstein polynomial:

Given1

1 1

0 0

( ) ( ) ( )m m

m m m mi i i i

i i

g t b B t b B t

, we have

A Mathematical Contribution

Given

• A Bernstein polynomial (satisfying the necessary and sufficient condition)

Iteratively elevating the degree yields:

• A Bernstein polynomial with coefficients in the unit interval (in very few steps).

Example: Converting a Polynomial

32 683)( ttttg Power-Form Polynomial

Example: Converting a Polynomial

32 683)( ttttg

)()(3

2)()( 3

332

31 tBtBtBtg

)()(5

2)(

5

3

)()(4

1)(

6

1)(

4

3

55

52

51

44

43

42

41

tBtBtB

tBtBtBtB

Power-Form Polynomial

Bernstein Polynomial

coefficients in unit interval

Probabilistic Multiplexing

A

BC

MUX

T

)

)1(

()](1[)()(

)(

btat

BPTPAPTP

CPc

Bernstein polynomial

Generalized Multiplexing

DecodingBlock Multiplexing

Blocky

s0...nx1...n

z0...n

n n+1

n+1

Generalized Multiplexing

DecodingBlock Multiplexing

Blocky

s0...nx1...n

z0...n

n n+1

n+1

X1, …, Xn are independent Boolean random variables with , for 1 ≤ i ≤ niXp t

Generalized Multiplexing

DecodingBlock Multiplexing

Blocky

s0...nx1...n

z0...n

n n+1

n+1

X1, …, Xn are independent Boolean random variables with , for 1 ≤ i ≤ niXp t

Pr( 1) ( )ni iS B t

Generalized Multiplexing

DecodingBlock Multiplexing

Blocky

s0...nx1...n

z0...n

n n+1

n+1

Z0, …, Zn are independent Boolean random variables with , for 0 ≤ i ≤ ni

nZ ip b

Generalized Multiplexing

DecodingBlock Multiplexing

Blocky

s0...nx1...n

z0...n

n n+1

n+1

Z0, …, Zn are independent Boolean random variables with , for 0 ≤ i ≤ ni

nZ ip b

0

Pr( 1) ( )n

n nY i i

i

p Y b B t

Experimental Results

Compare [conventional] deterministic to [new] stochastic implementation of polynomial computation:

Deterministic implementation: based on benchmark circuit (ISCAS’85 multiplier circuit C6288).

• Area-delay product.• Error tolerance with noise injection.

Experimental ResultsSixth-order Maclaurin polynomial approx., 10 bits:sin(x), cos(x), tan(x), arcsin(x), arctan(x), sinh(x),

cosh(x), tanh(x), arcsinh(x), exp(x), ln(x+1)

0

10

20

30

40

50

60

0 0.001 0.002 0.005 0.01 0.02 0.05 0.1

error ratio of input data

rela

tiv

e e

rro

r

Stochastic Deterministic

Experimental Results100 randomly chosen Bernstein polynomials with

coefficients in the unit interval, 10 bits:

0

100

200

300

400

500

600

700

800

900

1000

0 0.001 0.002 0.005 0.01 0.02 0.05 0.1

error ratio of input data

rela

tiv

e e

rro

r

Stochastic

Deterministic

Conclusions

• The area-delay product of the stochastic computation is comparable to the deterministic.

• The stochastic implementation is much more input-error tolerant.

Future Directions• Extend to the synthesis of multivariate polynomials.• Implement sequential computation.

Engineering novel functionality in biological systems.

BiochemicalReactions

View engineered biochemistry as a form of computation.

Synthetic Biology

E. Coli

computationinputs outputs

Molecular Triggers

Molecular Products

View engineered biochemistry as a form of computation.

BiochemicalReactions

Synthetic Biology

computationinputs outputs

Quantities of Different

Types

Quantities of Different

Types

Probability Distribution on Different Types

Bacteria are engineered to produce an anti-cancer drug:

Design Scenario

drugtriggering compound E. Coli

produce drug

triggering compound E. Coli

Approach: engineer a probabilistic response in each bacterium.

with Prob. 0.3

don’t produce drugwith Prob. 0.7

Synthesizing Stochasticity

Discussion

• Synthesize a design for a precise, robust, programmable probability distribution on outcomes – for arbitrary types and reactions.

Computational Synthetic Biology vis-a-vis

Technology-Independent Logic Synthesis

• Implement design by selecting specific types and reactions – say from “toolkit”.

Experimental Design vis-a-vis

Technology Mapping in Circuit Design