Machine Learning and Rendering Alex Keller, Director of Research - - PowerPoint PPT Presentation

machine learning and rendering
SMART_READER_LITE
LIVE PREVIEW

Machine Learning and Rendering Alex Keller, Director of Research - - PowerPoint PPT Presentation

East Building, Ballroom BC nvidia.com/siggraph2018 Machine Learning and Rendering Alex Keller, Director of Research Machine Learning and Rendering Course web page at https://sites.google.com/site/mlandrendering/ 14:00 From Machine Learning


slide-1
SLIDE 1

Machine Learning and Rendering

Alex Keller, Director of Research nvidia.com/siggraph2018 East Building, Ballroom BC

slide-2
SLIDE 2

Machine Learning and Rendering

Course web page at https://sites.google.com/site/mlandrendering/

⌅ 14:00 From Machine Learning to Graphics and back – Alexander Keller, NVIDIA ⌅ 14:40 Robust & Efficient Light Transport by Machine Learning – Jaroslav Kˇ

rivánek, Charles University, Prague

⌅ 15:15 Deep Learning for Light Transport Simulation – Jan Novàk, Disney Research ⌅ 16:05 Neural Realtime Rendering in Image Space – Anton Kaplanyan, Facebook Reality Labs ⌅ 16:40 Deep Realtime Rendering – Marco Salvi, NVIDIA 2

slide-3
SLIDE 3

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

3

slide-4
SLIDE 4

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy

3

slide-5
SLIDE 5

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy =

Z

∂V

Z

∂V V(x0,y)δx(x0)Li(x0,ω)fr(ωr,x0,ω)cosθx0 cosθy

|x0 y|2 dx0dy

3

slide-6
SLIDE 6

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy =

Z

∂V

Z

∂V V(x0,y)

✓ lim

r(x)!0

χB(x x0) πr(x)2 ◆ Li(x0,ω)fr(ωr,x0,ω)cosθx0 cosθy |x0 y|2 dx0dy

3

slide-7
SLIDE 7

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy = lim

r(x)!0

Z

∂V

Z

∂V V(x0,y) χB(x x0)

πr(x)2 Li(x0,ω)fr(ωr,x0,ω)cosθy cosθx0 |x0 y|2 dx0dy

3

slide-8
SLIDE 8

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy = lim

r(x)!0

Z

∂V

Z

S 2

(y)

χB(x h(y,ω)) πr(x)2 Li(h(y,ω),ω)fr(ωr,h(y,ω),ω)cosθydωdy

3

slide-9
SLIDE 9

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy = lim

r(x)!0

Z

∂V

Z

S 2

(y)

χB(x h(y,ω)) πr(x)2 Li(h(y,ω),ω)fr(ωr,h(y,ω),ω)cosθydωdy =

Z

S 2

(x) Li(x,ω)fr(ωr,x,ω)cosθxdω 3

slide-10
SLIDE 10

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy = lim

r(x)!0

Z

∂V

Z

S 2

(y)

χB(x h(y,ω)) πr(x)2 Li(h(y,ω),ω)fr(ωr,h(y,ω),ω)cosθydωdy =

Z

S 2

(x)

lim

r(x)!0

R

B(x) w(x,x0)Li(x0,ω)dx0

R

B(x) w(x,x0)dx0

! fr(ωr,x,ω)cosθxdω

3

slide-11
SLIDE 11

Modern Path Tracing

Light transport simulation

⌅ ways to formulate the radiance Lr reflected in a surface point x

Lr(x,ωr) =

Z

S 2

(x)Li(x,ω)fr(ωr,x,ω)cosθxdω

P L Camera

=

Z

∂V V(x,y)Li(x,ω)fr(ωr,x,ω)cosθx

cosθy |x y|2 dy = lim

r(x)!0

Z

∂V

Z

S 2

(y)

χB(x h(y,ω)) πr(x)2 Li(h(y,ω),ω)fr(ωr,h(y,ω),ω)cosθydωdy = lim

r(x)!0

Z

S 2

(x)

R

B(x) w(x,x0)Li(x0,ω)dx0

R

B(x) w(x,x0)dx0

fr(ωr,x,ω)cosθxdω

3

slide-12
SLIDE 12

Modern Path Tracing

Light transport simulation

⌅ path tracing: Starting paths from camera and iterating scattering and ray tracing – bad for small light sources, good for large light sources

P P P

4

slide-13
SLIDE 13

Modern Path Tracing

Light transport simulation

⌅ path tracing with next event estimation by shadow rays (dashed lines) – good for small light sources, bad for close light sources

P P P P P

4

slide-14
SLIDE 14

Modern Path Tracing

Light transport simulation

⌅ light tracing, i.e. paths starting from the light source connected to the camera – can capture some caustics, where path tracing and next event estimation do not work

P P P P P P P P

4

slide-15
SLIDE 15

Modern Path Tracing

Light transport simulation

⌅ all obvious ways to generate light transport paths – which ones are good ?

P P P P P P P P P

4

slide-16
SLIDE 16

Modern Path Tracing

Light transport simulation

⌅ bidirectional path tracing, optimally combining all techniques by weighting each contribution – ∑l

i=0 wl,i = 1 for path length l 1, l 2 N

w1,1· P +w1,0· P +w2,2· P +w2,1· P +w2,0· P +w3,3· P +w3,2· P +w3,1· P +w3,0· P

4

slide-17
SLIDE 17

Modern Path Tracing

Light transport simulation

⌅ bidirectional path tracing, optimally combining all techniques by weighting each contribution – ∑l

i=0 wl,i = 1 for path length l 1, l 2 N

w1,1· P +w1,0· P +w2,2· P +w2,1· P +w2,0· P +w3,3· P +w3,2· P +w3,1· P +w3,0· P

⌅ problem of insufficient techniques, for example, if only one wl,i 6= 0 4

slide-18
SLIDE 18

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx

5

slide-19
SLIDE 19

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r

5

slide-20
SLIDE 20

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r

5

slide-21
SLIDE 21

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r

5

slide-22
SLIDE 22

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r

5

slide-23
SLIDE 23

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

5

slide-24
SLIDE 24

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

⌅ quasi-Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

5

slide-25
SLIDE 25

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

⌅ quasi-Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– much more uniform correlated samples xi – realized by low-discrepancy sequences, which are progressive Latin-hypercube samples

r r r r r r r r r r r r r r r r r r

5

slide-26
SLIDE 26

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

⌅ quasi-Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– much more uniform correlated samples xi – realized by low-discrepancy sequences, which are progressive Latin-hypercube samples

r r r r r r r r r r r r r r r r r r

5

slide-27
SLIDE 27

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

⌅ quasi-Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– much more uniform correlated samples xi – realized by low-discrepancy sequences, which are progressive Latin-hypercube samples

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

5

slide-28
SLIDE 28

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

⌅ quasi-Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– much more uniform correlated samples xi – realized by low-discrepancy sequences, which are progressive Latin-hypercube samples

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

5

slide-29
SLIDE 29

Modern Path Tracing

Numerical integro-approximation

⌅ Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– uniform, independent, unpredictable random samples xi – simulated by pseudo-random numbers

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r rr r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

⌅ quasi-Monte Carlo methods

g(y) =

Z

[0,1)s f(y,x)dx ⇡ 1

n

n

i=1

f(y,xi)

– much more uniform correlated samples xi – realized by low-discrepancy sequences, which are progressive Latin-hypercube samples

r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r r

5

slide-30
SLIDE 30

Modern Path Tracing

Pushbutton paradigm

⌅ deterministic – may improve speed of convergence – reproducible and simple to parallelize 6

slide-31
SLIDE 31

Modern Path Tracing

Pushbutton paradigm

⌅ deterministic – may improve speed of convergence – reproducible and simple to parallelize ⌅ unbiased – zero difference between expectation and mathematical object – not sufficient for convergence 6

slide-32
SLIDE 32

Modern Path Tracing

Pushbutton paradigm

⌅ deterministic – may improve speed of convergence – reproducible and simple to parallelize ⌅ biased – allows for ameliorating the problem of insufficient techniques – can tremendously increase efficiency 6

slide-33
SLIDE 33

Modern Path Tracing

Pushbutton paradigm

⌅ deterministic – may improve speed of convergence – reproducible and simple to parallelize ⌅ biased – allows for ameliorating the problem of insufficient techniques – can tremendously increase efficiency ⌅ consistent – error vanishes with increasing set of samples – no persistent artifacts introduced by algorithm I Quasi-Monte Carlo image synthesis in a nutshell I The Iray light transport simulation and rendering system 6

slide-34
SLIDE 34

Modern Path Tracing

Pushbutton paradigm

⌅ deterministic – may improve speed of convergence – reproducible and simple to parallelize ⌅ biased – allows for ameliorating the problem of insufficient techniques – can tremendously increase efficiency ⌅ consistent – error vanishes with increasing set of samples – no persistent artifacts introduced by algorithm I Quasi-Monte Carlo image synthesis in a nutshell I The Iray light transport simulation and rendering system 6

slide-35
SLIDE 35

Reconstruction from noisy input: Massively parallel path space filtering (link)

slide-36
SLIDE 36

From Machine Learning to Graphics

slide-37
SLIDE 37

Machine Learning

Taxonomy

⌅ unsupervised learning from unlabeled data – examples: clustering, auto-encoder networks 9

slide-38
SLIDE 38

Machine Learning

Taxonomy

⌅ unsupervised learning from unlabeled data – examples: clustering, auto-encoder networks ⌅ semi-supervised learning by rewards – example: reinforcement learning 9

slide-39
SLIDE 39

Machine Learning

Taxonomy

⌅ unsupervised learning from unlabeled data – examples: clustering, auto-encoder networks ⌅ semi-supervised learning by rewards – example: reinforcement learning ⌅ supervised learning from labeled data – examples: support vector machines, decision trees, artificial neural networks 9

slide-40
SLIDE 40

Reinforcement Learning

Goal: maximize reward

⌅ state transition yields reward

rt+1(at | st) 2 R Agent st Environment at st+1 rt+1(at | st)

10

slide-41
SLIDE 41

Reinforcement Learning

Goal: maximize reward

⌅ state transition yields reward

rt+1(at | st) 2 R

⌅ learn a policy πt – to select an action at 2 A(st) – given the current state st 2 S

Agent st Environment at st+1 rt+1(at | st)

10

slide-42
SLIDE 42

Reinforcement Learning

Goal: maximize reward

⌅ state transition yields reward

rt+1(at | st) 2 R

⌅ learn a policy πt – to select an action at 2 A(st) – given the current state st 2 S

Agent st Environment at st+1 rt+1(at | st)

⌅ maximizing the discounted cumulative reward

V(st) ⌘

k=0

γk ·rt+1+k(at+k | st+k), where 0 < γ < 1

10

slide-43
SLIDE 43

Reinforcement Learning

Q-Learning [Watkins 1989]

⌅ learns optimal action selection policy for any given Markov decision process

Q0(s,a) = (1α) · Q(s,a)+α ·

  • r(s,a)+γ ·V(s0)
  • for a learning rate α 2 [0,1]

11

slide-44
SLIDE 44

Reinforcement Learning

Q-Learning [Watkins 1989]

⌅ learns optimal action selection policy for any given Markov decision process

Q0(s,a) = (1α) · Q(s,a)+α ·

  • r(s,a)+γ ·V(s0)
  • for a learning rate α 2 [0,1]

with the following options for the discounted cumulative reward V(s0) ⌘ 8 > > > > > > < > > > > > > : maxa02A Q(s0,a0) consider best action in next state s0

11

slide-45
SLIDE 45

Reinforcement Learning

Q-Learning [Watkins 1989]

⌅ learns optimal action selection policy for any given Markov decision process

Q0(s,a) = (1α) · Q(s,a)+α ·

  • r(s,a)+γ ·V(s0)
  • for a learning rate α 2 [0,1]

with the following options for the discounted cumulative reward V(s0) ⌘ 8 > > > > > > < > > > > > > : maxa02A Q(s0,a0) consider best action in next state s0 ∑a02A π(s0,a0)Q(s0,a0) policy weighted average over discrete action space

11

slide-46
SLIDE 46

Reinforcement Learning

Q-Learning [Watkins 1989]

⌅ learns optimal action selection policy for any given Markov decision process

Q0(s,a) = (1α) · Q(s,a)+α ·

  • r(s,a)+γ ·V(s0)
  • for a learning rate α 2 [0,1]

with the following options for the discounted cumulative reward V(s0) ⌘ 8 > > > > > > < > > > > > > : maxa02A Q(s0,a0) consider best action in next state s0 ∑a02A π(s0,a0)Q(s0,a0) policy weighted average over discrete action space

R

A π(s0,a0)Q(s0,a0)da0

policy weighted average over continuous action space

11

slide-47
SLIDE 47

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ radiance integral equation

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi

12

slide-48
SLIDE 48

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ structural equivalence of integral equation and Q-learning

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi Q0(s,a) = (1α)Q(s,a)+α ✓ r(s,a) + γ

R

A

π(s0,a0) Q(s0,a0) da0 ◆

12

slide-49
SLIDE 49

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ structural equivalence of integral equation and Q-learning

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi Q0(s,a) = (1α)Q(s,a)+α ✓ r(s,a) + γ

R

A

π(s0,a0) Q(s0,a0) da0 ◆

12

slide-50
SLIDE 50

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ structural equivalence of integral equation and Q-learning

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi Q0(s,a) = (1α)Q(s,a)+α ✓ r(s,a) + γ

R

A

π(s0,a0) Q(s0,a0) da0 ◆

12

slide-51
SLIDE 51

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ structural equivalence of integral equation and Q-learning

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi Q0(s,a) = (1α)Q(s,a)+α ✓ r(s,a) + γ

R

A

π(s0,a0) Q(s0,a0) da0 ◆

12

slide-52
SLIDE 52

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ structural equivalence of integral equation and Q-learning

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi Q0(s,a) = (1α)Q(s,a)+α ✓ r(s,a) + γ

R

A

π(s0,a0) Q(s0,a0) da0 ◆

12

slide-53
SLIDE 53

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ structural equivalence of integral equation and Q-learning

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi Q0(s,a) = (1α)Q(s,a)+α ✓ r(s,a) + γ

R

A

π(s0,a0) Q(s0,a0) da0 ◆

⌅ graphics example: learning the incident radiance

Q0(x,ω) = (1α)Q(x,ω)+α ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

12

slide-54
SLIDE 54

Reinforcement Learning

Maximize reward by learning importance sampling online

⌅ structural equivalence of integral equation and Q-learning

L(x,ω) = Le(x,ω) +

R

S 2

+(x)

fs(ωi,x,ω)cosθi L(h(x,ωi),ωi) dωi Q0(s,a) = (1α)Q(s,a)+α ✓ r(s,a) + γ

R

A

π(s0,a0) Q(s0,a0) da0 ◆

⌅ graphics example: learning the incident radiance

Q0(x,ω) = (1α)Q(x,ω)+α ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

◆ to be used as a policy for selecting an action ω in state x to reach the next state y := h(x,ω)

– the learning rate α is the only parameter left I Technical Note: Q-Learning 12

slide-55
SLIDE 55

Reinforcement Learning

Online algorithm for guiding light transport paths

Function pathTrace(camera,scene) throughput 1 ray setupPrimaryRay(camera) for i 0 to ∞ do y,n intersect(scene, ray) if isEnvironment(y) then return throughput· getRadianceFromEnvironment(ray,y) else if isAreaLight(y) return throughput· getRadianceFromAreaLight(ray,y) ω,pω,fs sampleBsdf(y,n) throughput throughput ·fs ·cos(n,ω) / pω ray y, ω

13

slide-56
SLIDE 56

Reinforcement Learning

Online algorithm for guiding light transport paths

Function pathTrace(camera,scene) throughput 1 ray setupPrimaryRay(camera) for i 0 to ∞ do y,n intersect(scene, ray) if i > 0 then Q0(x,ω) = (1α)Q(x,ω)+α ✓ Le(y,ω)+

R

S 2 +(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

◆ if isEnvironment(y) then return throughput· getRadianceFromEnvironment(ray,y) else if isAreaLight(y) return throughput· getRadianceFromAreaLight(ray,y) ω,pω,fs sampleScatteringDirectionProportionalToQ(y) throughput throughput ·fs ·cos(n,ω) / pω ray y, ω

13

slide-57
SLIDE 57

approximate solution Q stored on discretized hemispheres across scene surface

slide-58
SLIDE 58

2048 paths traced with BRDF importance sampling in a scene with challenging visibility

slide-59
SLIDE 59

Path tracing with online reinforcement learning at the same number of paths

slide-60
SLIDE 60

Metropolis light transport at the same number of paths

slide-61
SLIDE 61

Reinforcement Learning

Guiding paths to where the value Q comes from

⌅ shorter expected path length ⌅ dramatically reduced number of paths with zero contribution ⌅ very efficient online learning by learning Q from Q 18

slide-62
SLIDE 62

Reinforcement Learning

Guiding paths to where the value Q comes from

⌅ shorter expected path length ⌅ dramatically reduced number of paths with zero contribution ⌅ very efficient online learning by learning Q from Q ⌅ directions for research – representation of value Q: data structures from games – importance sampling proportional to the integrand, i.e. the product of policy γ ·π times value Q I On-line learning of parametric mixture models for light transport simulation I Product importance sampling for light transport path guiding I Fast product importance sampling of environment maps I Learning light transport the reinforced way I Practical path guiding for efficient light-transport simulation 18

slide-63
SLIDE 63

From Graphics back to Machine Learning

slide-64
SLIDE 64

Artificial Neural Networks in a Nutshell

Supervised learning of high dimensional function approximation

⌅ input layer a0, L1 hidden layers, and output layer aL

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 . . . aL,0 aL,1 aL,2 aL,nL1

20

slide-65
SLIDE 65

Artificial Neural Networks in a Nutshell

Supervised learning of high dimensional function approximation

⌅ input layer a0, L1 hidden layers, and output layer aL

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 a2,1 . . . aL,0 aL,1 aL,2 aL,nL1

– nl rectified linear units (ReLU) al,i = max{0,∑wl,j,ial1,j} in layer l 20

slide-66
SLIDE 66

Artificial Neural Networks in a Nutshell

Supervised learning of high dimensional function approximation

⌅ input layer a0, L1 hidden layers, and output layer aL

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 a2,1 . . . aL,0 aL,1 aL,2 aL,nL1

– nl rectified linear units (ReLU) al,i = max{0,∑wl,j,ial1,j} in layer l – backpropagating the error δl1,i = ∑al,j >0 δl,jwl,j,i 20

slide-67
SLIDE 67

Artificial Neural Networks in a Nutshell

Supervised learning of high dimensional function approximation

⌅ input layer a0, L1 hidden layers, and output layer aL

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 a2,1 . . . aL,0 aL,1 aL,2 aL,nL1

– nl rectified linear units (ReLU) al,i = max{0,∑wl,j,ial1,j} in layer l – backpropagating the error δl1,i = ∑al,j >0 δl,jwl,j,i, update weights w0

l,j,i = wl,j,i λδl,jal1,i if al,j > 0

20

slide-68
SLIDE 68

Artificial Neural Networks in a Nutshell

Supervised learning of high dimensional function approximation

⌅ example architectures

classifier

I Multilayer feedforward networks are universal approximators I Approximation capabilities of multilayer feedforward networks I Universal approximation bounds for superpositions of a sigmoidal function 21

slide-69
SLIDE 69

Artificial Neural Networks in a Nutshell

Supervised learning of high dimensional function approximation

⌅ example architectures

classifier generator

I Multilayer feedforward networks are universal approximators I Approximation capabilities of multilayer feedforward networks I Universal approximation bounds for superpositions of a sigmoidal function 21

slide-70
SLIDE 70

Artificial Neural Networks in a Nutshell

Supervised learning of high dimensional function approximation

⌅ example architectures

classifier generator auto-encoder

I Multilayer feedforward networks are universal approximators I Approximation capabilities of multilayer feedforward networks I Universal approximation bounds for superpositions of a sigmoidal function 21

slide-71
SLIDE 71

Efficient Training of Artificial Neural Networks

Using an integral equation for supervised learning

⌅ Q-learning

Q0(x,ω) = (1α)Q(x,ω)+α ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

22

slide-72
SLIDE 72

Efficient Training of Artificial Neural Networks

Using an integral equation for supervised learning

⌅ Q-learning

Q0(x,ω) = (1α)Q(x,ω)+α ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

◆ for α = 1 yields the residual, i.e. loss ∆Q := Q(x,ω) ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

22

slide-73
SLIDE 73

Efficient Training of Artificial Neural Networks

Using an integral equation for supervised learning

⌅ Q-learning

Q0(x,ω) = (1α)Q(x,ω)+α ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

◆ for α = 1 yields the residual, i.e. loss ∆Q := Q(x,ω) ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

⌅ supervised learning algorithm – light transport paths generated by a low discrepancy sequence for online training 22

slide-74
SLIDE 74

Efficient Training of Artificial Neural Networks

Using an integral equation for supervised learning

⌅ Q-learning

Q0(x,ω) = (1α)Q(x,ω)+α ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

◆ for α = 1 yields the residual, i.e. loss ∆Q := Q(x,ω) ✓ Le(y,ω)+

Z

S 2

+(y) fs(ωi,y,ω)cosθiQ(y,ωi)dωi

⌅ supervised learning algorithm – light transport paths generated by a low discrepancy sequence for online training – learn weights of an artificial neural network for Q(x,n) by back-propagating loss of each path I A machine learning driven sky model I Global illumination with radiance regression Functions I Machine learning and integral equations I Neural importance sampling 22

slide-75
SLIDE 75

Efficient Training of Artificial Neural Networks

Learning from noisy/sampled labeled data

⌅ find set of weights θ of an artificial neural network f to minimize summed loss L – using clean targets yi and data ˆ

xi distributed according to ˆ x ⇠ p(ˆ x|yi) argminθ ∑

i

L(fθ(ˆ xi),yi)

23

slide-76
SLIDE 76

Efficient Training of Artificial Neural Networks

Learning from noisy/sampled labeled data

⌅ find set of weights θ of an artificial neural network f to minimize summed loss L – using clean targets yi and data ˆ

xi distributed according to ˆ x ⇠ p(ˆ x|yi) argminθ ∑

i

L(fθ(ˆ xi),yi)

– using targets ˆ

yi distributed according to ˆ y ⇠ p(ˆ y) instead argminθ ∑

i

L(fθ(ˆ xi),ˆ yi)

23

slide-77
SLIDE 77

Efficient Training of Artificial Neural Networks

Learning from noisy/sampled labeled data

⌅ find set of weights θ of an artificial neural network f to minimize summed loss L – using clean targets yi and data ˆ

xi distributed according to ˆ x ⇠ p(ˆ x|yi) argminθ ∑

i

L(fθ(ˆ xi),yi)

– using targets ˆ

yi distributed according to ˆ y ⇠ p(ˆ y) instead argminθ ∑

i

L(fθ(ˆ xi),ˆ yi)

⇧ allows for much faster training of artificial neural networks used in simulations ⌅ amounts to learning integration and integro-approximation I Noise2Noise: Learning image restoration without clean data 23

slide-78
SLIDE 78

Example Applications of Artificial Neural Networks in Rendering

Learning from noisy/sampled labeled data

⌅ denoising quasi-Monte Carlo rendered images – noisy targets computed 2000⇥ faster than clean targets 24

slide-79
SLIDE 79

Example Applications of Artificial Neural Networks in Rendering

Sampling according to a distribution given by observed data

⌅ generative adversarial network (GAN) I image source I Tutorial on GANs 25

slide-80
SLIDE 80

Example Applications of Artificial Neural Networks in Rendering

Sampling according to a distribution given by observed data

⌅ generative adversarial network (GAN) I image source I Tutorial on GANs 25

slide-81
SLIDE 81

Example Applications of Artificial Neural Networks in Rendering

Sampling according to a distribution given by observed data

⌅ generative adversarial network (GAN) I image source I Tutorial on GANs 25

slide-82
SLIDE 82

Example Applications of Artificial Neural Networks in Rendering

Sampling according to a distribution given by observed data

⌅ generative adversarial network (GAN) – update generator G using

∇θg ∑m

i=1 log(1D(G(ξi)))

I image source I Tutorial on GANs 25

slide-83
SLIDE 83

Example Applications of Artificial Neural Networks in Rendering

Sampling according to a distribution given by observed data

⌅ generative adversarial network (GAN) – update discriminator D (k times) using ∇θd

1 m ∑m i=1 [logD(xi)+log(1D(G(ξi)))]

– update generator G using

∇θg ∑m

i=1 log(1D(G(ξi)))

I image source I Tutorial on GANs 25

slide-84
SLIDE 84

Example Applications of Artificial Neural Networks in Rendering

Sampling according to a distribution given by observed data

⌅ Celebrity GAN I Progressive growing of GANs for improved quality, stability, and variation 26

slide-85
SLIDE 85

Example Applications of Artificial Neural Networks in Rendering

Replacing simulations by learned predictions for more efficiency

⌅ much faster simulation of participating media – hierarchical stencil of volume densities as input to the neural network I Deep scattering: Rendering atmospheric clouds with radiance-predicting neural networks I Learning particle physics by example: Accelerating science with generative adversarial networks 27

slide-86
SLIDE 86

Neural Networks linear in Time and Space

slide-87
SLIDE 87

Neural Networks linear in Time and Space

Complexity

⌅ the brain – about 1011 nerve cells with to up to 104 connections to others 29

slide-88
SLIDE 88

Neural Networks linear in Time and Space

Complexity

⌅ the brain – about 1011 nerve cells with to up to 104 connections to others ⌅ artificial neural networks – number of neural units

n =

L

l=1

nl where nl is the number of neurons in layer l

29

slide-89
SLIDE 89

Neural Networks linear in Time and Space

Complexity

⌅ the brain – about 1011 nerve cells with to up to 104 connections to others ⌅ artificial neural networks – number of neural units

n =

L

l=1

nl where nl is the number of neurons in layer l

– number of weights

nw =

L

l=1

nl1 ·nl

29

slide-90
SLIDE 90

Neural Networks linear in Time and Space

Complexity

⌅ the brain – about 1011 nerve cells with to up to 104 connections to others ⌅ artificial neural networks – number of neural units

n =

L

l=1

nl where nl is the number of neurons in layer l

– number of weights

nw =

L

l=1

c ·nl

– constrain to constant number c of weights per neuron 29

slide-91
SLIDE 91

Neural Networks linear in Time and Space

Complexity

⌅ the brain – about 1011 nerve cells with to up to 104 connections to others ⌅ artificial neural networks – number of neural units

n =

L

l=1

nl where nl is the number of neurons in layer l

– number of weights

nw =

L

l=1

c ·nl = c ·n

– constrain to constant number c of weights per neuron to reach complexity linear in n 29

slide-92
SLIDE 92

Neural Networks linear in Time and Space

Sampling proportional to the weights of the trained neural units

⌅ partition of unit interval by sums Pk := ∑k

j=1 |wj| of normalized absolute weights

P0 1 Pm P1 P2 Pm1 w1 w2 wm

30

slide-93
SLIDE 93

Neural Networks linear in Time and Space

Sampling proportional to the weights of the trained neural units

⌅ partition of unit interval by sums Pk := ∑k

j=1 |wj| of normalized absolute weights

P0 1 Pm P1 P2 Pm1 w1 w2 wm

– using a uniform random variable ξ 2 [0,1) to

select input i , Pi1  ξ < Pi satisfying Prob({Pi1  ξ < Pi}) = |wi|

30

slide-94
SLIDE 94

Neural Networks linear in Time and Space

Sampling proportional to the weights of the trained neural units

⌅ partition of unit interval by sums Pk := ∑k

j=1 |wj| of normalized absolute weights

P0 1 Pm P1 P2 Pm1 w1 w2 wm

– using a uniform random variable ξ 2 [0,1) to

select input i , Pi1  ξ < Pi satisfying Prob({Pi1  ξ < Pi}) = |wi|

⌅ in fact derivation of quantization to ternary weights in {1,0,+1} – integer weights result from neurons referenced more than once – relation to drop connect and drop out 30

slide-95
SLIDE 95

Neural Networks linear in Time and Space

Sampling proportional to the weights of the trained neural units 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.2 0.4 0.6 0.8 1 Percent of fully connected layers sampled Test Accuracy LeNet on MNIST LeNet on CIFAR-10 AlexNet on CIFAR-10 Top-5 Accuracy AlexNet on ILSVRC12 Top-1 Accuracy AlexNet on ILSVRC12

31

slide-96
SLIDE 96

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ complexity bounded by number of paths times depth L of network 32

slide-97
SLIDE 97

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ complexity bounded by number of paths times depth L of network ⌅ application after training – backwards random walks using sampling proportional to the weights of a neuron – compression and quantization by importance sampling 32

slide-98
SLIDE 98

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ complexity bounded by number of paths times depth L of network ⌅ application after training – backwards random walks using sampling proportional to the weights of a neuron – compression and quantization by importance sampling ⌅ application before training – uniform (bidirectional) random walks to connect inputs and outputs – sparse from scratch 32

slide-99
SLIDE 99

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ sparse from scratch

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 . . . aL,0 aL,1 aL,2 aL,nL1

33

slide-100
SLIDE 100

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ sparse from scratch

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 a2,1 . . . aL,0 aL,1 aL,2 aL,nL1

33

slide-101
SLIDE 101

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ sparse from scratch

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 . . . aL,0 aL,1 aL,2 aL,nL1

– guaranteed connectivity I Monte Carlo methods and neural networks 33

slide-102
SLIDE 102

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ sparse from scratch

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 . . . aL,0 aL,1 aL,2 aL,nL1

– guaranteed connectivity I Monte Carlo methods and neural networks 33

slide-103
SLIDE 103

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ sparse from scratch

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 . . . aL,0 aL,1 aL,2 aL,nL1

– guaranteed connectivity I Monte Carlo methods and neural networks 33

slide-104
SLIDE 104

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ sparse from scratch

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 . . . aL,0 aL,1 aL,2 aL,nL1

– guaranteed connectivity I Monte Carlo methods and neural networks 33

slide-105
SLIDE 105

Neural Networks linear in Time and Space

Sampling paths through networks

⌅ sparse from scratch

. . . a0,0 a0,1 a0,2 a0,n01 . . . a1,0 a1,1 a1,2 a1,n11 . . . a2,0 a2,1 a2,2 a2,n21 . . . aL,0 aL,1 aL,2 aL,nL1

– guaranteed connectivity and coverage I Monte Carlo methods and neural networks 33

slide-106
SLIDE 106

Neural Networks linear in Time and Space

Test accuracy for 4 layer feedforward network (784/300/300/10) trained sparse from scratch 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 0.2 0.4 0.6 0.8 1 Number of per pixel paths through network Test Accuracy MNIST Fashion MNIST

34

slide-107
SLIDE 107

From Machine Learning to Graphics and back

Summary

⌅ light transport and reinforcement learning described by same integral equation – learn where radiance comes from ⌅ neural networks results of linear complexity by path tracing – ternarization and quantization of trained artificial neural networks – sparse from scratch training 35