57
Improved tuning method for Monte Carlo generators Fabian Klimpel 38. IMPRS workshop 2017 Munich, 10.07.2017 10.07.2017 1

First steps towards an improved tuning method for Monte

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: First steps towards an improved tuning method for Monte

Improved tuning method for Monte Carlo generators

Fabian Klimpel

38. IMPRS workshop 2017

Munich, 10.07.2017

10.07.2017 1

Page 2: First steps towards an improved tuning method for Monte

Overview

1. Introduction to parameter tuning

2. Reproduction of a previous tuning

3. Introducing new approaches for parameter tuning

4. Summary and outlook

10.07.2017 2

Page 3: First steps towards an improved tuning method for Monte

What is parameter tuning?• Experimental setup (e+e−):

• Before the particle collision:• Initial state is (approximately) known

• After the collision:• Final state is measured

• Monte Carlo (MC) generators:

• Hard process: calculatable

• Parton shower & Hadronisation: modelled

Adjust model parameters to optimizereproduction of measurement

• But: How to get their values?

10.07.2017 3

Initial state

Introduction to parameter tuning

Page 4: First steps towards an improved tuning method for Monte

What is parameter tuning?• Experimental setup (e+e−):

• Before the particle collision:• Initial state is (approximately) known

• After the collision:• Final state is measured (particle level)

• Monte Carlo (MC) generators:

• Hard process: calculatable

• Parton shower & Hadronisation: modelled

Adjust model parameters to optimizereproduction of measurement

• But: How to get their values?

Initial state

Final state

10.07.2017 3Introduction to parameter tuning

Page 5: First steps towards an improved tuning method for Monte

What is parameter tuning?• Experimental setup (e+e−):

• Before the particle collision:• Initial state is (approximately) known

• After the collision:• Final state is measured (particle level)

• Monte Carlo (MC) generators:

• Hard process: calculable

• Parton shower & Hadronisation: modelled

Adjust model parameters to optimizereproduction of measurement

• But: How to get their values?

Initial state

Hard process

Final state

10.07.2017 3Introduction to parameter tuning

Page 6: First steps towards an improved tuning method for Monte

What is parameter tuning?• Experimental setup (e+e−):

• Before the particle collision:• Initial state is (approximately) known

• After the collision:• Final state is measured (particle level)

• Monte Carlo (MC) generators:

• Hard process: calculable

• Parton shower: „modelled QCD“

• Hadronisation: modelled

Adjust model parameters to optimizereproduction of measurement

• But: How to get their values?

Initial state

Hard process

Final state

10.07.2017 3Introduction to parameter tuning

Page 7: First steps towards an improved tuning method for Monte

What is parameter tuning?• Experimental setup (e+e−):

• Before the particle collision:• Initial state is (approximately) known

• After the collision:• Final state is measured (particle level)

• Monte Carlo (MC) generators:

• Hard process: calculable

• Parton shower: „modelled QCD“

• Hadronisation: modelled

Adjust model parameters to optimizereproduction of measurement

• But: How to get their values?

Initial state

Hard process

Had

ron

isation

& d

ecays

Final state

10.07.2017 3Introduction to parameter tuning

Page 8: First steps towards an improved tuning method for Monte

Parameter tuning - general• Model parameters can be varied

parameters need values that describe the data best = tuning

• Example: 𝑒+𝑒− collision at 𝑠 = 91.2 GeV with two different parameter sets

10.07.2017 4Introduction to parameter tuning

Page 9: First steps towards an improved tuning method for Monte

Parameter tuning - general• Model parameters can be varied

parameters need values that describe the data best = tuning

• Example: 𝑒+𝑒− collisions at 𝑠 = 91.2 GeV with two different parameter sets

Pythia 8Aleph 1996

Pythia 8Aleph 1996

10.07.2017 4Introduction to parameter tuning

Page 10: First steps towards an improved tuning method for Monte

How to tune? – general

1. Parameter sampling

3. Calculate binned histograms

2. MC event generation

1. Sample random model parameter vectors 𝒑iin predefined ranges

2. Use every 𝒑i (= „run“) as input for the MC generator High CPU consumption

3. Extract observables from each run binned histograms for each observable

10.07.2017 5Introduction to parameter tuning

Page 11: First steps towards an improved tuning method for Monte

How to tune? – Interpolation• Assumption: sufficiently smooth change in a bin b while

changing the value of a parameter

Each bin can be parametrised by a polynomial function 𝑓 𝑏 𝒑

Source: H. Schulz, Systematic Event Generator Tuning with Professor

10.07.2017 6Introduction to parameter tuning

Page 12: First steps towards an improved tuning method for Monte

How to tune? – general

12

1. Parameter sampling

5. Minimisation

4. Bin wise Interpolation

3. Calculate binned histograms

2. MC event generation

1. Sample random model parameter vectors 𝒑iin predefined ranges

2. Use every 𝒑i (= „run“) as input for the MC generator High CPU consumption

3. Extract observables from each run binned histograms for each observable

4. Calculate 𝑓 𝑏 𝒑 as function of model parameters 𝒑

5. Minimise χ2 𝒑

10.07.2017 7Introduction to parameter tuning

Page 13: First steps towards an improved tuning method for Monte

Overview

1. Introduction to parameter tuning

2. Reproduction of a previous tuning

3. Introducing new approaches for parameter tuning

4. Summary and outlook

10.07.2017 8

Page 14: First steps towards an improved tuning method for Monte

Tuning application• Reproduced standard Pythia tune

• Hard process:

• Events simulated with Pythia 8 at 𝑠 = 𝑚 𝑍0 = 91.2 GeV, LO + LL

• Settings were extracted from standard tuning

• Data from LEP (Aleph, Opal, Delphi), PETRA (Jade) & PDG combinations• Phys. Rept., 294:1 (1998); PLB 512:30 (2001); ZP C73:11 (1996); EPJ C17:19 (2000); PLB 667:1 (2008)

10.07.2017 9

f = u,d,s,c,b quarks

Reproduction of a previous tuning

Source: N. Fischer, Angular Correlationand Soft Jets as Probes of Parton Showers

Page 15: First steps towards an improved tuning method for Monte

Which parameters to tune?1. Parton shower model based on QCD:

• High energy partons radiate gluons with probability ~αs shower• Shower cutoff at pT,min

phase transition, confinement

2. Hadronisation (Lund-string model):

• 𝑓 𝑧 ∝1

𝑧1 − 𝑧 𝒂𝐋𝐮𝐧𝐝 exp −𝒃𝐋𝐮𝐧𝐝

𝑚𝑇2

𝑧• Baryons: 𝑎 = 𝑎𝐿𝑢𝑛𝑑 + 𝒂𝐄𝐱𝐭𝐫𝐚𝐃𝐢𝐪𝐮𝐚𝐫𝐤

• 𝑃(𝑝𝑇) ∝ exp(−1

2

𝑝𝑇2

𝝈2)

3. Hadron decays from PDG tables

overall 6 parameters to tune using the Professor framework

Shower

Hadronisation& decays

Hard process

10.07.2017 10Reproduction of a previous tuning

Page 16: First steps towards an improved tuning method for Monte

Which parameters to tune?1. Parton shower model based on QCD:

• High energy partons radiate gluons with probability ~αs shower• Shower cutoff at pT,min

phase transition, confinement

2. Hadronisation (Lund-string model):

• 𝑓 𝑧 ∝1

𝑧1 − 𝑧 𝒂𝐋𝐮𝐧𝐝 exp −𝒃𝐋𝐮𝐧𝐝

𝑚𝑇2

𝑧• Baryons: 𝑎 = 𝑎𝐿𝑢𝑛𝑑 + 𝒂𝐄𝐱𝐭𝐫𝐚𝐃𝐢𝐪𝐮𝐚𝐫𝐤

• 𝑃(𝑝𝑇) ∝ exp(−1

2

𝑝𝑇2

𝝈2)

3. Hadron decays from PDG tables

overall 6 parameters to tune using the Professor framework

Shower

Hadronisation& decays

Hard process

10.07.2017 10Reproduction of a previous tuning

Page 17: First steps towards an improved tuning method for Monte

Which parameters to tune?1. Parton shower model based on QCD:

• High energy partons radiate gluons with probability ~αs shower• Shower cutoff at pT,min

phase transition, confinement

2. Hadronisation (Lund-string model):

• 𝑓 𝑧 ∝1

𝑧1 − 𝑧 𝒂𝐋𝐮𝐧𝐝 exp −𝒃𝐋𝐮𝐧𝐝

𝑚𝑇2

𝑧• Baryons: 𝑎 = 𝑎𝐿𝑢𝑛𝑑 + 𝒂𝐄𝐱𝐭𝐫𝐚𝐃𝐢𝐪𝐮𝐚𝐫𝐤

• 𝑃(𝑝𝑇) ∝ exp(−1

2

𝑝𝑇2

𝝈2)

3. Hadron decays from PDG tables

overall 6 parameters to tune using the Professor framework

Shower

Hadronisation& decays

Hard process

10.07.2017 10Reproduction of a previous tuning

Page 18: First steps towards an improved tuning method for Monte

How to tune? – bootstrapping

18

1. Parameter sampling

5. Minimisation

4. Bin wise Interpolation

3. Calculate binned histograms

2. MC event generation

Take subsets

Extract distribution of parameters

Known from previous studies: a) Take subsets of all performed MC runs

300 times 500 out of 650b) Perform the interpolation & tuning for every

subset independentlyc) Extract the distribution of the combination of

tuned parameter values

10.07.2017 11Reproduction of a previous tuning

Page 19: First steps towards an improved tuning method for Monte

Distribution of tuned parameters with fixed ranges

• Parameter values at fit-range limit

• A better tune could lay outside the parameter ranges

Need to extend parameter range

Keep interpolation functions unchanged

10.07.2017 12Reproduction of a previous tuning

Page 20: First steps towards an improved tuning method for Monte

Distribution of tuned parameters with fixed ranges

• Parameter values at fit-range limit

• A better tune could lay outside the parameter ranges

Need to extend parameter range

Keep interpolation functions unchanged

10.07.2017 12Reproduction of a previous tuning

Page 21: First steps towards an improved tuning method for Monte

Distribution of tuned parameters without fixed ranges

• Extend parameter ranges, but no new MC samplesextrapolation in some parameters occurs

• Double peaks should not existresult is sensitive to input set

• Is there a problem while minimising? re-minimise by using another method

10.07.2017 13Reproduction of a previous tuning

Page 22: First steps towards an improved tuning method for Monte

Overview

1. Introduction to parameter tuning

2. Reproduction of a previous tuning

3. Introducing new approaches for parameter tuning

4. Summary and outlook

10.07.2017 14

Page 23: First steps towards an improved tuning method for Monte

Bayesian Analysis Toolkit (BAT)• Idea: Use BAT as control tune for Professor

• Working principle:• Based on self adapting Markov Chains

• Steps determined by Metropolis-Hastings algorithm

• Multiple Markov Chains should converge to same result

• Benefits of the algorithm:• Metropolis-Hastings algorithm reproduces a function

• BAT collects information about the posterior likelihood

• The algorithm can find the maximum posterior likelihood and thusoptimal parameters

10.07.2017 15Introducing new approaches for parameter tuning

Page 24: First steps towards an improved tuning method for Monte

BAT - results

The problem is not the minimisation!

Professor: redBAT: blueRange: yellow

10.07.2017 16Introducing new approaches for parameter tuning

Page 25: First steps towards an improved tuning method for Monte

Interpolation

• The problem could be produced whileinterpolating

a) Professor uses a fixed order polynomialfunction for interpolation• possible over-/underfitting?

b) The quality of the fit should not bejudged upon χ2 only• Small χ2 → good fit

another approach is needed to avoid this

Simplified example of underfitting:

Underlying function: Gauss distribution

10.07.2017 17Introducing new approaches for parameter tuning

Page 26: First steps towards an improved tuning method for Monte

Interpolation

• The problem could be produced whileinterpolating

a) Professor uses a fixed order polynomialfunction for interpolation• possible over-/underfitting?

b) The quality of the fit should not bejudged upon χ2 only• Small χ2 → good fit

another approach is needed to avoid this

Simplified example of overfitting:

Source: https://en.wikipedia.org/wiki/Overfitting#/media/File:Overfitted_Data.png

10.07.2017 17Introducing new approaches for parameter tuning

Page 27: First steps towards an improved tuning method for Monte

New Interpolationa) Avoid under-/overfitting

• Iteratively increase the number of terms in polynomial

• until interpolation „is good“

b) Improved quality criterion:• Introduce shape dependent parameter:

𝐷𝑆𝑚𝑜𝑜𝑡ℎ = 1

𝑁 𝑖=1𝑁 𝒏Simulation data,i ∙ 𝒏Interpolation,i

Minimise new criterion: f = χ² (1 −𝐷Smooth)

(1+𝐷Smooth)

Construction based on:IEEE Transactions on Pattern Analysis andMachine Intelligence, vol. 32, 561 (2010)

Normalised gradient of the simulated data Normalised gradient of the interpolation

10.07.2017 18Introducing new approaches for parameter tuning

Page 28: First steps towards an improved tuning method for Monte

New Interpolationa) Avoid under-/overfitting

• Iteratively increase the number of terms in polynomial

• until interpolation „is good“

b) Improved quality criterion:• Introduce shape dependent parameter:

𝐷𝑆𝑚𝑜𝑜𝑡ℎ = 1

𝑁 𝑖=1𝑁 𝒏Simulation data,i ∙ 𝒏Interpolation,i

Minimise new criterion: f = χ² (1 −𝐷Smooth)

(1+𝐷Smooth)

Construction based on:IEEE Transactions on Pattern Analysis andMachine Intelligence, vol. 32, 561 (2010)

Normalised gradient of the simulated data Normalised gradient of the interpolation

10.07.2017 18Introducing new approaches for parameter tuning

Page 29: First steps towards an improved tuning method for Monte

Distribution of tuned parameters

• Fixed ranges:

• Parameter values at the limit Allowing extrapolation

• Without fixed ranges:

• Parameter values distributed around a single centre Final values can be extracted

10.07.2017 19Introducing new approaches for parameter tuning

Page 30: First steps towards an improved tuning method for Monte

Distribution of tuned parameters

• Fixed ranges:

• Parameter values at the limit Allowing extrapolation

• Without fixed ranges:

• Parameter values distributed around a single centre Final values can be extracted

10.07.2017 19Introducing new approaches for parameter tuning

Page 31: First steps towards an improved tuning method for Monte

Error propagation of interpolation

• Until now:

𝜎𝑎2 𝜎𝑎𝑏 𝜎𝑎𝑐𝜎𝑎𝑏 𝜎𝑏

2 𝜎𝑏𝑐𝜎𝑎𝑐 𝜎𝑏𝑐 𝜎𝑐

2

Consider the correlation between the fit parameters

• But: Complicated likelihood &

multiple attractors appear

further investigations are needed

10.07.2017 20Introducing new approaches for parameter tuning

Page 32: First steps towards an improved tuning method for Monte

Error propagation of interpolation

• Until now:

𝜎𝑎2 𝜎𝑎𝑏 𝜎𝑎𝑐𝜎𝑎𝑏 𝜎𝑏

2 𝜎𝑏𝑐𝜎𝑎𝑐 𝜎𝑏𝑐 𝜎𝑐

2

Consider the correlation between the fit parameters

• But: Complicated likelihood &

multiple attractors appear

further investigations are needed

Result from BAT

10.07.2017 20Introducing new approaches for parameter tuning

Page 33: First steps towards an improved tuning method for Monte

Overview

1. Introduction to parameter tuning

2. Reproduction of a previous tuning

3. Introducing new approaches for parameter tuning

4. Summary and outlook

10.07.2017 21

Page 34: First steps towards an improved tuning method for Monte

Summary• Professor tuning maybe unstable

• Problem caused by the interpolation algorithm

• Using new approach to increase stability of interpolation with1. An iterative construction that increases the number of terms

2. A new quality criterion f = χ² (1 −𝐷

Smooth)

(1+𝐷Smooth)

• Using covariances of fit parameters is statistically consistentbut causes further problems

10.07.2017 22Summary and outlook

Page 35: First steps towards an improved tuning method for Monte

Summary• Professor tuning maybe unstable

• Problem caused by the interpolation algorithm

• Using new approach to increase stability of interpolation with1. An iterative construction that increases the number of terms

2. A new quality criterion f = χ² (1 −𝐷

Smooth)

(1+𝐷Smooth)

• Using covariances of fit parameters is statistically consistentbut causes further problems

10.07.2017 22Summary and outlook

Page 36: First steps towards an improved tuning method for Monte

Outlook• Work on uncertainty calculation:

• Investigation of the source the problems(e.g. parameter ranges, selected observables or weights)

• Outlier rejection if:• no parameter set describes the data well• precision of MC prediction is limited by underlying theory

• Redefine parameter ranges to avoid running into limitand repeat tune (work in progress)

• Implementation of the new interpolation algorithm intothe Professor framework

10.07.2017 23Summary and outlook

Page 37: First steps towards an improved tuning method for Monte

Outlook• Work on uncertainty calculation:

• Investigation of the source the problems(e.g. parameter ranges, selected observables or weights)

• Outlier rejection if:• no parameter set describes the data well• precision of MC prediction is limited by underlying theory

• Redefine parameter ranges to avoid running into limitand repeat tune (work in progress)

• Implementation of the new interpolation algorithm intothe Professor framework

10.07.2017 23Summary and outlook

Page 38: First steps towards an improved tuning method for Monte

Outlook• Work on uncertainty calculation:

• Investigation of the source the problems(e.g. parameter ranges, selected observables or weights)

• Outlier rejection if:• no parameter set describes the data well• precision of MC prediction is limited by underlying theory

• Redefine parameter ranges to avoid running into limitand repeat tune (work in progress)

• Implementation of the new interpolation algorithm intothe Professor framework

10.07.2017 23Summary and outlook

Page 39: First steps towards an improved tuning method for Monte

Outlook• Work on uncertainty calculation:

• Investigation of the source the problems(e.g. parameter ranges, selected observables or weights)

• Outlier rejection if:• no parameter set describes the data well• precision of MC prediction is limited by underlying theory

• Redefine parameter ranges to avoid running into limitand repeat tune (work in progress)

• Implementation of the new interpolation algorithm intothe Professor framework

10.07.2017 23Summary and outlook

Page 40: First steps towards an improved tuning method for Monte

Thank you for your attention

10.07.2017 24

Page 41: First steps towards an improved tuning method for Monte

Backup

10.07.2017 25

Page 42: First steps towards an improved tuning method for Monte

Backup: Parameter sets of example distributions

Parameter Left Set Right Set

𝑎Lund 0.42 0.56

𝑏Lund [GeV−2] 0.82 1.00

𝑎ExtraDiquark 0.99 0.93

σ [GeV] 0.259 0.399

αS 0.120 0.126

𝑝T,min [GeV] 0.42 0.95

10.07.2017 26

Pythia 8Aleph 1996

Pythia 8Aleph 1996

Page 43: First steps towards an improved tuning method for Monte

Backup: gof

χ2 𝒑 =

𝑂

𝑏∈𝑂

𝑤𝑏(𝑓 𝑏 𝒑 − 𝑅𝑏)²

Δ 𝑏2

Sum over every observable and binInterpolation function

Measurement

Sum of variancesWeights

10.07.2017 27

Page 44: First steps towards an improved tuning method for Monte

Backup: Professor with parameter limits I

650 samples

10.07.2017 28

Page 45: First steps towards an improved tuning method for Monte

Backup: Professor with parameter limits II

650 samples

10.07.2017 29

Page 46: First steps towards an improved tuning method for Monte

Backup: Professor without parameter limits I

650 samples

10.07.2017 30

Page 47: First steps towards an improved tuning method for Monte

Backup: Professor without parameter limits II

650 samples

10.07.2017 31

Page 48: First steps towards an improved tuning method for Monte

Backup: Markov Chains

10.07.2017 32

Page 49: First steps towards an improved tuning method for Monte

Backup: BAT results for Professor Ipol

10.07.2017 33

Page 50: First steps towards an improved tuning method for Monte

Backup: Comparison BAT <-> runcombs

Parameter Value Error

𝑎Lund 0.655 0.008

𝑏Lund[GeV−2] 1.324 0.014

𝑎ExtraDiquark 1.000 0.008

σ [GeV] 0.291 0.001

αs 0.139 0.001

𝑝T,min [GeV] 0.402 0.009

Parameter Value Error

𝑎Lund 0.622 0.064

𝑏Lund[GeV−2] 1.253 0.090

𝑎ExtraDiquark 0.928 0.113

σ [GeV] 0.292 0.001

αs 0.139 0.001

𝑝T,min [GeV] 0.426 0.019

Prof BAT

Uncertainty calculation unreliable because parameters at edges

10.07.2017 34

Page 51: First steps towards an improved tuning method for Monte

Backup: New Interpolation: Gradients

• 𝒏Interpolation,i = 1

𝛻𝑓Interpolation𝛻𝑓Interpolation|𝒙i

• Polynomial function analytical gradient

• 𝒏Simulation data,i = 1

𝛻𝑓Simulation data𝛻𝑓Simulation data|𝒙i

• Approach:

• Select 2dimension closest points

• Re-weight using the distance to center

• Interpolate with first order polynomial

• Calculate gradient analytically

10.07.2017 35

Page 52: First steps towards an improved tuning method for Monte

Backup: New Ipol with parameter limits I

1500 samples

10.07.2017 36

Page 53: First steps towards an improved tuning method for Monte

Backup: New Ipol with parameter limits II

1500 samples

10.07.2017 37

Page 54: First steps towards an improved tuning method for Monte

Backup: New Ipol without parameter limits I

1500 samples

10.07.2017 38

Page 55: First steps towards an improved tuning method for Monte

Backup: New Ipol without parameter limits II

1500 samples

10.07.2017 39

Page 56: First steps towards an improved tuning method for Monte

Backup: Fitting the normal distribution

10.07.2017 40

Page 57: First steps towards an improved tuning method for Monte

Backup: Comparison by re-simulating

• Simulation with tuned parameter set with limits

Professor: New interpolation:

Pythia 8Aleph 1996

Pythia 8Aleph 1996

10.07.2017 41