speeding up monte carlo simulation using an emulator · introduction: the objective...

Post on 15-Feb-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Where innovation starts

Speeding Up Monte Carlo SimulationUsing An Emulator

A.K. Tyagi, W.H.A. Schilders, X. Jonsson, T.G.J. Beelen

Center for Analysis, Scientific Computingand Applications (CASA),

Mentor Graphics R©, Grenoble (FR)

November 04, 2015

1/22

/

Outline

1 Introduction

2 Project Startup

3 Motivation

4 An Emulator Technique

5 Results

6 Conclusion and Further Steps

1/22

/

Outline

1 Introduction

2 Project Startup

3 Motivation

4 An Emulator Technique

5 Results

6 Conclusion and Further Steps

2/22

/

Introduction: The Project

ASIVA14: Analog Simulation and Variability Analysis for 14nm design

http://www.itn-asiva14.eu

3/22

/

Introduction: The Project

ASIVA14 Objectives

1) Speed up time-domain simulations fornearly-periodic circuits from 1 week to 2hours (70x speedup) (Giovanni De Luca)

2) Speed up time-domain simulations in fullchip verification by orders of magnitude(10x speedup) (Nhunh Dang)

3) Variability Analysis: Reduce the number ofMonte Carlo runs for variability and uncertaintyanalysis in ICs (1010x speedup /) (Anuj Tyagi)

4/22

/

Introduction: The Project

Promotor:

Prof. Wil SchildersTU Eindhoven, Netherlands

email: w.h.a.schilders@tue.nl

My Supervisors:

Dr. Xavier JonssonMentor Graphics, Grenoble

email: xavier_jonsson@mentor.com

Dr. Theo BeelenTU Eindhoven, Netherlandsemail: t.g.j.beelen@tue.nl

5/22

/

Introduction: The Project

How we work

• Regular Meetings

5/22

/

Introduction: The Project

How we work

• Reports

• Weekly reports

• Technical reports

6/22

/

Introduction: Variability Analysis

• With each new technology, device sizes shrink

• Biggest challenge: uncertainty in circuit performance

• Uncertainty leads to circuit failure that affects the production yield

6/22

/

Introduction: Variability Analysis

• With each new technology, device sizes shrink

• Biggest challenge: uncertainty in circuit performance

• Uncertainty leads to circuit failure that affects the production yield

6/22

/

Introduction: Variability Analysis

• With each new technology, device sizes shrink

• Biggest challenge: uncertainty in circuit performance

• Uncertainty leads to circuit failure that affects the production yield

7/22

/

Introduction: The objective

• Estimate the circuit failure probability

• Uncertainty and variability of the probability estimator

• Estimation shall be possible within required computational time

7/22

/

Introduction: The objective

• Estimate the circuit failure probability

• Uncertainty and variability of the probability estimator

• Estimation shall be possible within required computational time

7/22

/

Introduction: The objective

• Estimate the circuit failure probability

• Uncertainty and variability of the probability estimator

• Estimation shall be possible within required computational time

8/22

/

Introduction: State of the Art

• Monte Carlo (MC) Simulation

Prb(h(x) ≤ µ) =1N

N∑i=1

1h(Xi)

where Xi are N i.i.d. random numbers generated from the pdf(x) and

1h(x) =

{1 if h(x) ≤ µ0 otherwise

,

8/22

/

Introduction: State of the Art

• Monte Carlo (MC) Simulation

Prb(h(x) ≤ µ) =1N

N∑i=1

1h(Xi)

where Xi are N i.i.d. random numbers generated from the pdf(x) and

1h(x) =

{1 if h(x) ≤ µ0 otherwise

,

9/22

/

Introduction: State of the Art

• Monte Carlo (MC) Simulation

Benefits:

• Robustness• Doesn’t care about the number of parameters• Easy to implement

Drawbacks:

• Computationally expensive

9/22

/

Outline

1 Introduction

2 Project Startup

3 Motivation

4 An Emulator Technique

5 Results

6 Conclusion and Further Steps

10/22

/

Project Startup

• Sensitivity Analysis

• Given, input x→ IC Model → output h(x)

• Find∂h∂x

and get most dominant parameters

• We do this to use Uncertainty Quantification

Drawback: UQ limited up to few parameters

10/22

/

Project Startup

• Sensitivity Analysis

• Given, input x→ IC Model → output h(x)

• Find∂h∂x

and get most dominant parameters

• We do this to use Uncertainty Quantification

Drawback: UQ limited up to few parameters

10/22

/

Project Startup

• Sensitivity Analysis

• Given, input x→ IC Model → output h(x)

• Find∂h∂x

and get most dominant parameters

• We do this to use Uncertainty Quantification

Drawback: UQ limited up to few parameters

10/22

/

Outline

1 Introduction

2 Project Startup

3 Motivation

4 An Emulator Technique

5 Results

6 Conclusion and Further Steps

11/22

/

Motivation

• Large number of statistical parameters

• Monte Carlo doesn’t care about the number of parameters

• Keep this method and Speed it up

• An Emulator approach can be used

11/22

/

Outline

1 Introduction

2 Project Startup

3 Motivation

4 An Emulator Technique

5 Results

6 Conclusion and Further Steps

12/22

/

An Emulator Technique

• Given IC model

IC Modelθ(x, α1, · · · , αk)

inputx = (x1, · · · , xp) output h(x)

12/22

/

An Emulator Technique

• Given IC model

IC Modelθ(x, α1, · · · , αk)

inputx = (x1, · · · , xp) output h(x)

• Take m uniformly distributed random vectors Xi and get a training set (X,H)

IC Modelθ(x, α1, · · · , αk)X =

X1X2...

Xm

h(X1)h(X2)...

h(Xm)

= H

12/22

/

An Emulator Technique

• Given IC model

IC Modelθ(x, α1, · · · , αk)

inputx = (x1, · · · , xp) output h(x)

• Fit a regression model y = f (x) such that h(x) = y(x) + δ(x)

12/22

/

An Emulator Technique

• Given IC model

IC Modelθ(x, α1, · · · , αk)

inputx = (x1, · · · , xp) output h(x)

• Fit a regression model y = f (x) such that h(x) = y(x) + δ(x)

12/22

/

An Emulator Technique

• Given IC model

IC Modelθ(x, α1, · · · , αk)

inputx = (x1, · · · , xp) output h(x)

• Fit a regression model y = f (x) such that h(x) = y(x) + δ(x)

12/22

/

An Emulator Technique

• Given IC model

IC Modelθ(x, α1, · · · , αk)

inputx = (x1, · · · , xp) output h(x)

• Fit a regression model y = f (x) such that h(x) = y(x) + δ(x)

13/22

/

An Emulator Technique

• Compute outputs y(X∗) for X∗ ∼ N(µ,Σ) using regression model

RegressionModel y = f (x)X∗ =

X∗1X∗2...

X∗N∗

y(X∗1)y(X∗2)...

y(X∗N∗ )

= Y∗

13/22

/

An Emulator Technique

• Compute outputs y(X∗) for X∗ ∼ N(µ,Σ) using regression model

RegressionModel y = f (x)X∗ =

X∗1X∗2...

X∗N∗

y(X∗1)y(X∗2)...

y(X∗N∗ )

= Y∗

• An Emulator model

13/22

/

An Emulator Technique

• Compute outputs y(X∗) for X∗ ∼ N(µ,Σ) using regression model

RegressionModel y = f (x)X∗ =

X∗1X∗2...

X∗N∗

y(X∗1)y(X∗2)...

y(X∗N∗ )

= Y∗

• An Emulator model

13/22

/

An Emulator Technique

• Compute outputs y(X∗) for X∗ ∼ N(µ,Σ) using regression model

RegressionModel y = f (x)X∗ =

X∗1X∗2...

X∗N∗

y(X∗1)y(X∗2)...

y(X∗N∗ )

= Y∗

• An Emulator model

he(x) =

{h(x) if |y(x) − µ| ≤ zαδ(x)y(x) otherwise

where zα is such that Φ(zα) = α, Φ(x) is cdf of standard normaldistribution.

14/22

/

An Emulator Technique

• The failure probability is given by:

Prb(h(x) ≤ µ) ≈ Prb(he(x) ≤ µ) =1

N∗

N∗∑i=1

1he (X∗

i )

Note:

• We can reduce the rejections by having a ‘best’ regression model

• The ‘best’ model predict a good approximation in the importantregion

• An adaptive sampling might be used

14/22

/

An Emulator Technique

• The failure probability is given by:

Prb(h(x) ≤ µ) ≈ Prb(he(x) ≤ µ) =1

N∗

N∗∑i=1

1he (X∗

i )

Note:

• We can reduce the rejections by having a ‘best’ regression model

• The ‘best’ model predict a good approximation in the importantregion

• An adaptive sampling might be used

15/22

/

An Emulator Technique: Adaptive Sampling

15/22

/

Outline

1 Introduction

2 Project Startup

3 Motivation

4 An Emulator Technique

5 Results

6 Conclusion and Further Steps

16/22

/

Results

Example:

• Input:x = (x1, x2) ∈ R2

∼ N(0, I)

• Output:

h1(x) = x21 − 8x2 + 16,

h2(x) = −16x1 + x22 + 32

h(x) = max(h1(x), h2(x))

• Evaluate Prb(h ≤ 20)

• We used Matlab Kriging toolbox to fit Gaussian regression model y(x)

17/22

/

Results

Figure: α = 0.01 i.e., 99% confidence bound for accept model

Prb_err = 1.0%

18/22

/

Results

Figure: α = 0.001 i.e., 99.9% confidence bound for accept model

Prb_err = 0.9%

19/22

/

Results

Figure: Number of rejections w.r.t. adaptive runs for α = 0.01 and α = 0.001

20/22

/

Results: Check Validity of the Emulator

• Get the failure probability Prmc using Monte Carlo simulator

• Evaluate failure probability PrEm through Emulator

• Repeat the processor few number of times

• Evaluate Root Mean Squared Error (RMSE) for probability estimator

RMSE =

√√√1

Nrep

Nrep∑i=1

(PrEmi − Prmc)2

20/22

/

Results: Check Validity of the Emulator

• Get the failure probability Prmc using Monte Carlo simulator

• Evaluate failure probability PrEm through Emulator

• Repeat the processor few number of times

• Evaluate Root Mean Squared Error (RMSE) for probability estimator

RMSE =

√√√1

Nrep

Nrep∑i=1

(PrEmi − Prmc)2

20/22

/

Results: Check Validity of the Emulator

• Get the failure probability Prmc using Monte Carlo simulator

• Evaluate failure probability PrEm through Emulator

• Repeat the processor few number of times

• Evaluate Root Mean Squared Error (RMSE) for probability estimator

RMSE =

√√√1

Nrep

Nrep∑i=1

(PrEmi − Prmc)2

20/22

/

Results: Check Validity of the Emulator

• Get the failure probability Prmc using Monte Carlo simulator

• Evaluate failure probability PrEm through Emulator

• Repeat the processor few number of times

• Evaluate Root Mean Squared Error (RMSE) for probability estimator

RMSE =

√√√1

Nrep

Nrep∑i=1

(PrEmi − Prmc)2

21/22

/

Results: Check Validity of the Emulator

Figure: Distribution of the probability P(h ≤ 20)

21/22

/

Outline

1 Introduction

2 Project Startup

3 Motivation

4 An Emulator Technique

5 Results

6 Conclusion and Further Steps

22/22

/

Conclusion and Further Steps

Conclusion

• The Emulator technique is easy to implement

• We assume N > 10(m + N∗rej) and get a speedup ofN

m + N∗rej> 10x, where

N∗rej is the number of rejections by the Emulator

Further Steps

• The Gaussian process doesn’t work well [4] for the dim > 10 therefore ouraim is to use dimension reduction methods

• Find alternatives (independent of dimensions) of Gaussian Process.

22/22

/

Conclusion and Further Steps

Conclusion

• The Emulator technique is easy to implement

• We assume N > 10(m + N∗rej) and get a speedup ofN

m + N∗rej> 10x, where

N∗rej is the number of rejections by the Emulator

Further Steps

• The Gaussian process doesn’t work well [4] for the dim > 10 therefore ouraim is to use dimension reduction methods

• Find alternatives (independent of dimensions) of Gaussian Process.

22/22

/

References

C. E. Rasmussen and C. K. I. Williams: Gaussian Processes forMachine Learning, the MIT Press, 2006.

V. Dubourg, Adaptive surrogate models for reliability analysisand reliability-based design optimization. PhD Thesis,BlaisePascal University - Clermont II, 2011.

S. N. Lophaven, H. B. Nielsen and J. SondergaardL: DACE, AMATLAB Kriging Toolbox Version 2.0, Technical University ofDenmark , August 1, 2002.

Marrel, A., Iooss, B., Van Dorpe, F. and Volkova, E.: An efficientmethodology for modeling complex computer codes withGaussian processes. Comput. Statist. Data Anal (2008).

22/22

/

1/2

/

Gaussian Process

• A generalization of a multivariate Gaussian distribution.

• Fully specified by a mean function m(x) and covariance function k(x, x′):

f (x) ∼ GP(m(x), k(x, x′))

• We choose

m(x) = 0

k(x, x′) = exp(−

12l|x − x′|2

).

where, l is a scaled factor called hyperparameter.

1/2

/

Gaussian Process

• A generalization of a multivariate Gaussian distribution.

• Fully specified by a mean function m(x) and covariance function k(x, x′):

f (x) ∼ GP(m(x), k(x, x′))

• We choose

m(x) = 0

k(x, x′) = exp(−

12l|x − x′|2

).

where, l is a scaled factor called hyperparameter.

1/2

/

Gaussian Process

• A generalization of a multivariate Gaussian distribution.

• Fully specified by a mean function m(x) and covariance function k(x, x′):

f (x) ∼ GP(m(x), k(x, x′))

• We choose

m(x) = 0

k(x, x′) = exp(−

12l|x − x′|2

).

where, l is a scaled factor called hyperparameter.

2/2

/

Gaussian Process

• data: x, h (training set)

• model: h = y(x) + ε

Gaussian likelihood:h|x, y(x) ∼ N(y, σ2I)

Gaussian process prior:y(x) ∼ GP(0, k(x, x′))

Gaussian process posterior:

y(x)|x,h ∼ GP(mpost(x) = k(x, x)T[K(x, x) + σ2I]−1y,

kpost(x, x′) = k(x, x′) − k(x, x)[K(x, x) + σ2I]−1k(x, x′)).

Gaussian predictive distribution:

y∗|x∗, x, y ∼ N(k(x∗, x)T[K+σ2I]−1y, k(x∗, x∗)+σ2−k(x∗, x)T[K+σ2I]−1k(x∗, x)). (1)

top related