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

43
Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota A B C

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

Page 1: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 2: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 3: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 4: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Probabilistic Signals

Claude E. Shannon1916 –2001

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

deterministic

random

deterministic

Page 5: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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,…

Page 6: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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,…

Page 7: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Stochastic Logic

5/8

3/8

4/8

3/8

4/8

8/8

Probability values are the input and output signals.

combinationalcircuit

Page 8: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 9: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 10: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 11: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

A

VDD

A{{

N Wires

M Wires

Nanowire Crossbar (idealized)

Randomized connections,yet nearly one-to-one.

Page 12: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Interfacing with Stochastic LogicInterpret outputs according to fractional weighting.

combinationalcircuit

Page 13: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Arithmetic Operations

AND

A

BC

A

BC

MUX

S

Multiplication (Scaled) Addition

ba

BPAP

CPc

)()(

)(

)

)1(

()](1[)()(

)(

bsas

BPSPAPSP

CPc

Page 14: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Computing with Probabilities

combinationalcircuit

X2

X1

Xn

independentrandomBooleanvariables

YrandomBooleanvariable

ii xX )1Pr(

10 ix

),,()1Pr( 1 nxxfyY

10 y

Page 15: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Computing with Probabilities

combinationalcircuit

independentrandomBooleanvariables

YrandomBooleanvariable

Constrain the problem:

(independently)

constant

)1Pr(

tX i

X2

X1

Xn

Page 16: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Computing with Probabilities

combinationalcircuit

Constrain the problem:

(independently)

constant

)1Pr(

tX i

)(tft

Page 17: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 18: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 19: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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?

Page 20: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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:

Page 21: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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”.

Page 22: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

A little math…

( ) (1 ) ,n i n ii

nB t t t

i

0,1, ,i n

Bernstein basis polynomial of degree n

Page 23: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 24: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 25: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 26: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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).

Page 27: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Example: Converting a Polynomial

32 683)( ttttg Power-Form Polynomial

Page 28: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 29: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Probabilistic Multiplexing

A

BC

MUX

T

)

)1(

()](1[)()(

)(

btat

BPTPAPTP

CPc

Bernstein polynomial

Page 30: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Generalized Multiplexing

DecodingBlock Multiplexing

Blocky

s0...nx1...n

z0...n

n n+1

n+1

Page 31: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 32: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 33: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 34: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 35: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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.

Page 36: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 37: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 38: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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.

Page 39: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 40: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 41: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

Bacteria are engineered to produce an anti-cancer drug:

Design Scenario

drugtriggering compound E. Coli

Page 42: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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

Page 43: Marc Riedel – EE5393 The Synthesis of Robust Polynomial Arithmetic with Stochastic Logic Electrical & Computer Engineering University of Minnesota.

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