Probabilistic Numerics Uncertainty in Computation Philipp Hennig - - PowerPoint PPT Presentation

probabilistic numerics uncertainty in computation
SMART_READER_LITE
LIVE PREVIEW

Probabilistic Numerics Uncertainty in Computation Philipp Hennig - - PowerPoint PPT Presentation

Probabilistic Numerics Uncertainty in Computation Philipp Hennig ParisBD 9 May 2017 Research Group for Probabilistic Numerics Max Planck Institute for Intelligent Systems Tbingen, Germany Some of the presented work was supported by the


slide-1
SLIDE 1

Probabilistic Numerics Uncertainty in Computation

Philipp Hennig ParisBD 9 May 2017

Research Group for Probabilistic Numerics Max Planck Institute for Intelligent Systems Tübingen, Germany

Some of the presented work was supported by the Emmy Noether Programme of the DFG

slide-2
SLIDE 2

Is there room at the bottom?

ML computations are dominated by numerical tasks

task ... ...amounts to ... ...using black box marginalize integration MCMC, Variational, EP , ... train/fit

  • ptimization

SGD, BFGS, Frank-Wolfe, ... predict/control

  • rd. diff. Eq.

Euler, Runge-Kutta, ... Gauss/kernel/LSq. linear Algebra Chol., CG, spectral, low-rank,...

Scientific computing has produced a very efficient toolchain, but we are

(usually) only using their most generic methods!

methods on loan do not address some of ML

’s special needs

  • verly generic algorithms are inefficient

Big Data-specific challenges not addressed by “classic” methods

ML needs to build its own numerical methods. And as it turns out, we already have the right concepts!

1

slide-3
SLIDE 3

Computation is Inference

http://probnum.org [Poincaré 1896, Kimeldorf & Wahba 1970, Diaconis 1988, O’Hagan 1992, ...]

Numerical methods estimate latent quantities given the result of computations. integration estimate b

a f(x) dx

given {f(xi)} linear algebra estimate x s.t. Ax = b given {As = y}

  • ptimization

estimate x s.t. ∇f(x) = 0 given {∇f(xi)} analysis estimate x(t) s.t. x′ = f(x, t) given {f(xi, ti)} It is thus possible to build probabilistic numerical methods that use probability measures as in- and outputs, and assign a notion of uncertainty to computation.

2

slide-4
SLIDE 4

Integration

as Gaussian regression

−3 −2 −1 1 2 3 0.5 1 x f(x)

f(x) = exp(− sin(3x)2 − x2) F = 3

−3

f(x) dx =?

3

slide-5
SLIDE 5

A Wiener process prior p(f, F)...

Bayesian Quadrature [O’Hagan, 1985/1991]

p(f) = GP(f; 0, k) k(x, x′) = min(x, x′) + c ⇒ p b

a

f(x) dx

  • = N

b

a

f(x) dx; b

a

m(x) dx, b

a

k(x, x′) dx dx′

  • = N(F; 0, −1/6(b3 − a3) + 1/2[b3 − 2a2b + a3] − (b − a)2c)

4

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

slide-6
SLIDE 6

...conditioned on actively collected information ...

computation as the collection of information

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

slide-7
SLIDE 7

...conditioned on actively collected information ...

computation as the collection of information

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

slide-8
SLIDE 8

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-9
SLIDE 9

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-10
SLIDE 10

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-11
SLIDE 11

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-12
SLIDE 12

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-13
SLIDE 13

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-14
SLIDE 14

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-15
SLIDE 15

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-16
SLIDE 16

...conditioned on actively collected information ...

computation as the collection of information

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

xt = arg min

  • varp(F|x1,...,xt−1)(F)
  • maximal reduction of variance yields regular grid

5

slide-17
SLIDE 17

...yields the trapezoid rule!

[Kimeldorf & Wahba 1975, Diaconis 1988, O’Hagan 1985/1991]

−2 2 −1 −0.5 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

Ey[F] =

  • E|y[f(x)] dx =

N−1

  • i=1

(xi+1 − xi) 1 2(f(xi+1) + f(xi))

Trapezoid rule is MAP estimate under Wiener process prior on f regular grid is optimal expected information choice error estimate is under-confident

6

slide-18
SLIDE 18

Computation as Inference

Bayes’ theorem yields four levers for new functionality

Estimate z from computations c, under model m. p(z | c, m) = p(z | m)p(c | z, m)

  • p(z | m)p(c | z, m) dz

Prior: Likelihood: Posterior: Evidence:

7

slide-19
SLIDE 19

Classic methods as basic probabilistic inference

maximum a-posteriori estimation in Gaussian models

Quadrature

[Ajne & Dalenius 1960; Kimeldorf & Wahba 1975; Diaconis 1988; O’Hagan 1985/1991]

Gaussian Quadrature GP Regression Linear Algebra

[Hennig 2014]

Conjugate Gradients Gaussian Regression Nonlinear Optimization

[Hennig & Kiefel 2013]

BFGS / Quasi-Newton Autoregressive Filtering Differential Equations

[Schober, Duvenaud & Hennig 2014; Kerst- ing & Hennig 2016; Schober & Hennig 2016]

Runge-Kutta; Nordsieck Methods Gauss-Markov Filters

8

slide-20
SLIDE 20

Probabilistic ODE Solvers

Same story, different task

[Schober, Duvenaud & P .H., 2014. Schober & P .H., 2016. Kersting & P .H., 2016]

x′(t) = f(x(t), t), x(t0) = x0

1 2 3 4 5 6 0.5 1 t x(t)

There is a class of solvers for initial value problems that

has the same complexity as multi-step methods has high local approximation order q (like classic solvers) has calibrated posterior uncertainty (order q + 1/2) can use uncertain initial value p(x0) = N(x0; m0, P0)

9

slide-21
SLIDE 21

Probabilistic ODE Solvers

Same story, different task

[Schober, Duvenaud & P .H., 2014. Schober & P .H., 2016. Kersting & P .H., 2016]

x′(t) = f(x(t), t), x(t0) = x0 There is a class of solvers for initial value problems that

has the same complexity as multi-step methods has high local approximation order q (like classic solvers) has calibrated posterior uncertainty (order q + 1/2) can use uncertain initial value p(x0) = N(x0; m0, P0)

9

t0 t1 t2 t3 0.5 1 t x(t)

slide-22
SLIDE 22

Probabilistic ODE Solvers

Same story, different task

[Schober, Duvenaud & P .H., 2014. Schober & P .H., 2016. Kersting & P .H., 2016]

x′(t) = f(x(t), t), x(t0) = x0 There is a class of solvers for initial value problems that

has the same complexity as multi-step methods has high local approximation order q (like classic solvers) has calibrated posterior uncertainty (order q + 1/2) can use uncertain initial value p(x0) = N(x0; m0, P0)

9

t0 t1 t2 t3 0.5 1 t x(t)

slide-23
SLIDE 23

Probabilistic ODE Solvers

Same story, different task

[Schober, Duvenaud & P .H., 2014. Schober & P .H., 2016. Kersting & P .H., 2016]

x′(t) = f(x(t), t), x(t0) = x0 There is a class of solvers for initial value problems that

has the same complexity as multi-step methods has high local approximation order q (like classic solvers) has calibrated posterior uncertainty (order q + 1/2) can use uncertain initial value p(x0) = N(x0; m0, P0)

9

t0 t1 t2 t3 0.5 1 t x(t)

slide-24
SLIDE 24

Probabilistic ODE Solvers

Same story, different task

[Schober, Duvenaud & P .H., 2014. Schober & P .H., 2016. Kersting & P .H., 2016]

x′(t) = f(x(t), t), x(t0) = x0 There is a class of solvers for initial value problems that

has the same complexity as multi-step methods has high local approximation order q (like classic solvers) has calibrated posterior uncertainty (order q + 1/2) can use uncertain initial value p(x0) = N(x0; m0, P0)

9

t0 t1 t2 t3 0.5 1 t x(t)

slide-25
SLIDE 25

Probabilistic ODE Solvers

Same story, different task

[Schober, Duvenaud & P .H., 2014. Schober & P .H., 2016. Kersting & P .H., 2016]

x′(t) = f(x(t), t), x(t0) = x0 There is a class of solvers for initial value problems that

has the same complexity as multi-step methods has high local approximation order q (like classic solvers) has calibrated posterior uncertainty (order q + 1/2) can use uncertain initial value p(x0) = N(x0; m0, P0)

9

t0 t1 t2 t3 0.5 1 t x(t)

slide-26
SLIDE 26

Probabilistic ODE Solvers

Same story, different task

[Schober, Duvenaud & P .H., 2014. Schober & P .H., 2016. Kersting & P .H., 2016]

x′(t) = f(x(t), t), x(t0) = x0 There is a class of solvers for initial value problems that

has the same complexity as multi-step methods has high local approximation order q (like classic solvers) has calibrated posterior uncertainty (order q + 1/2) can use uncertain initial value p(x0) = N(x0; m0, P0)

9

0.5 1 t x(t)

slide-27
SLIDE 27

Probabilistic numerics can be as fast and reliable as classic ones. Computation can be phrased on ML language! Meaningful (calibrated) uncertainty can be constructed at minimal

computational overhead (dominated by cost of point estimate) So what does this mean for Data Science?

10

slide-28
SLIDE 28

New Functionality, and new Challenges

making use of the probabilistic numerics perspective

p(z | c, m) = p(z | m)p(c | z, m)

  • p(z | m)p(c | z, m) dz

Prior: structural knowledge reduces complexity. Likelihood: Posterior: Evidence:

11

slide-29
SLIDE 29

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014]

a prior specifically for integration of probability measures

f > 0 (f is probability measure) f ∝ exp(−x2) (f is product of prior and likelihood terms) f ∈ C∞ (f is smooth)

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

−2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

slide-30
SLIDE 30

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-31
SLIDE 31

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-32
SLIDE 32

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-33
SLIDE 33

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-34
SLIDE 34

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-35
SLIDE 35

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-36
SLIDE 36

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-37
SLIDE 37

An integration prior for probability measures

WArped Sequential Active Bayesian Integration (WSABI)

[Gunter, Osborne, Garnett, Hennig, Roberts. NIPS 2014] −2 2 0.5 1 x f(x) 100 101 102 10−10 10−5 100 # evaluations |F − ˆ F|

adaptive node placement scales to, in principle, arbitrary dimensions faster (in wall-clock time) than MCMC

Explicit prior knowledge yields reduces complexity.

[cf. information-based complexity. E.g. Novak, 1988. Clancy et al. 2013, arXiv 1303.2412v2]

12

slide-38
SLIDE 38

Computation as Inference

new numerical functionality for machine learning

Estimate z from computations c, under model m. p(z | c, m) = p(z | m)p(c | z, m)

  • p(z | m)p(c | z, m) dz

Prior: structural knowledge reduces complexity Likelihood: modeling imprecise computation reduces cost Posterior: Evidence:

13

slide-39
SLIDE 39

New numerics for Big Data

Uncertainty on Inputs directly effecting numerical decisions

In Big Data setting, batching introduces (Gaussian) noise L(θ) = 1 N

N

  • i=1

ℓ(yi; θ) ≈ 1 M

M

  • j=1

ℓ(yj; θ) =: ˆ L(θ) M ≪ N p( ˆ L | L) ≈ N

  • ˆ

L; L, O N − M M

  • L

y1 yN

14

slide-40
SLIDE 40

New numerics for Big Data

Uncertainty on Inputs directly effecting numerical decisions

In Big Data setting, batching introduces (Gaussian) noise L(θ) = 1 N

N

  • i=1

ℓ(yi; θ) ≈ 1 M

M

  • j=1

ℓ(yj; θ) =: ˆ L(θ) M ≪ N p( ˆ L | L) ≈ N

  • ˆ

L; L, O N − M M

  • L

y1 yN Classic methods are unstable to noise. E.g.: step size selection θt+1 = θt − αt∇ ˆ L(θt)

14

slide-41
SLIDE 41

Probabilistic Line Searches

Step-size selection stochastic optimization [Mahsereci & Hennig, NIPS 2015]

0.5 1 5.5 6 6.5 ➀➁ ➂ ➃ ➄ ➏ step size t f(t) classic line search: unstable 0.5 1 0.4 1 step size t pWolfe(t) ➀➁ ➂ ➃ ➄ ➏ 5.5 6 6.5 f(t) probabilistic line search: stable 2 4 6 8 10 epoch 2 4 6 8 10 0.5 0.6 0.7 0.8 0.9 1 epoch test error two-layer feed-forward perceptron on CIFAR 10. Details, additional results in Mahsereci & Hennig, NIPS 2015.

https://github.com/ProbabilisticNumerics/probabilistic_line_search

batch-size selection

[Balles & Hennig, arXiv 1612.05086]

early stopping

[Mahsereci, Balles & Hennig, arXiv 1703.09580]

15

slide-42
SLIDE 42

Computation as Inference

new numerical functionality for machine learning

Estimate z from computations c, under model m. p(z | c, m) = p(z | m)p(c | z, m)

  • p(z | m)p(c | z, m) dz

Prior: structural knowledge reduces complexity Likelihood: modeling imprecise computation reduces cost Posterior: tracking uncertainty for robustness Evidence:

  • cf. Hennig, Osborne, Girolami, Proc. Royal Soc. A, 2015

16

slide-43
SLIDE 43

Uncertainty Across Composite Computations

interacting information requirements [Hennig, Osborne, Girolami, Proc. Royal Society A 2015]

machine environment learning / inference / pattern rec. / system id. prediction action

D xt θ xt+δt a

data variables parameters

inference by quadrature estimation by

  • ptimization

prediction by analysis action by control

probabilistic numerical methods taking and producing uncertain inputs

and outputs allow management of computational resources

17

slide-44
SLIDE 44

Computation as Inference

new numerical functionality for machine learning

Estimate z from computations c, under model m. p(z | c, m) = p(z | m)p(c | z, m)

  • p(z | m)p(c | z, m) dz

Prior: structural knowledge reduces complexity Likelihood: modeling imprecise computation reduces cost Posterior: tracking uncertainty for robustness Evidence: checking models for safety

  • cf. Hennig, Osborne, Girolami, Proc. Royal Soc. A, 2015

18

slide-45
SLIDE 45

Probabilistic Certification?

proof of concept: [Hennig, Osborne, Girolami. Proc. Royal Society A, 2015]

−2 2 0.2 0.4 0.6 0.8 1 f(x) −2 2 10−10 10−5 100 F − ˆ F 100 101 102 103 # samples 100 101 102 103 −400 −200 200 400 # samples r r = E˜

f

  • log p(˜

f(x)) p(f(x))

  • = (f(x) − µ(x))⊺K−1(f(x) − µ(x)) − N

19

slide-46
SLIDE 46

Summary

Uncertain computation as and for machine learning

computation is inference probabilistic numerical methods

probability measures for uncertain inputs and outputs classic methods as special cases

New concepts (not just) for Machine Learning: prior: structural knowledge reduces complexity likelihood: imprecise computation lowers cost posterior: uncertainty propagated through computations evidence: model mismatch detectable at run-time Specialized numerical methods for the challenges of machine learning can be developed within the conceptual framework of machine learning. http://probnum.org https://pn.is.tue.mpg.de

20

slide-47
SLIDE 47
slide-48
SLIDE 48

dummy slide

for use of pdf elsewhere

t0 t1 t2 t3 0.5 1 t x(t)

22