Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell...

80
Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University

Transcript of Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell...

Page 1: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Machine ScienceDistilling Free-Form Natural Laws from Experimental Data

Hod Lipson, Cornell University

Page 2: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 4: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 5: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Lipson & Pollack, Nature 406, 2000

Page 6: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 7: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 8: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 9: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 10: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Camera

CameraView

Page 11: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 12: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Adapting in simulation

Simulator

Evolve ControllerIn Simulation

Try it in reality!

Download

Crossing The

Reality Gap

Page 13: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Adapting in reality

Evolve ControllerIn Reality

Try it !

Too many Physical

Trials

Page 14: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Simulation & Reality

Evolve Controller

“Simulator”

Try it in reality!

Build

Collect Sensor Data

Evolve SimulatorEvolve Simulators Evolve Robots

Page 15: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

ServoActuators

Tilt Sensors

Page 16: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 17: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 18: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Emergent Self-Model

With Josh Bongard and Victor Zykov, Science 2006

Page 19: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Damage Recovery

With Josh Bongard and Victor Zykov, Science 2006

Page 20: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

RandomPredictedPhysical

Page 21: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 22: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

System Identification

?

Page 23: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Perturbations

Page 24: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Photo: Floris van Breugel

Page 25: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Photo: Floris van Breugel

Page 26: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Structural Damage Diagnosis

With Wilkins Aquino

Page 27: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

.com

With Jeff Clune, Jason Yosinski

Page 28: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Symbolic Regression

f(x)=exsin(|x|)

What function describes this data?

John Koza, 1992

Page 29: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Encoding Equations

*

sin–

x1 3

f(x)

+

x2 -7

Building Blocks: + - * / sin cos exp log … etc

sin(x2)

x1*sin(x2)

(x1 – 3)*sin(x2)

(x1 – 3)*sin(-7 + x2)

John Koza, 1992

Page 30: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Michael D. Schmidt, Hod Lipson (2006)

Models: Expression treesSubject to mutation and selection

Experiments: Data-pointsSubject to mutation and selection

{const,+,-,*,/,sin,cos,exp,log,abs}

+

sin×

–1.2

x 2x

+

sin×

–1.2

x 2x

Page 31: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Solution Accuracy

Entire DatasetCoevolved Dataset

Page 32: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

15

17

19

21

23

25

27

29

31

33

35

0 5000 10000 15000

Generations

Sol

utio

n S

ize

(# o

f nod

es)

Coevolution

Exact

Solution Complexity

Entire Dataset

Coevolved Dataset

Page 33: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 34: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 35: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Semi-empirical mass formula

Modeling the binding energy of an atomic nucleus

ZAA

ZAa

A

ZZaAaAaE ACSVB ,

21 2

3132

odd ,

odd

even ,

0,

0

0

NZ

A

NZ

ZA

210 A

aP

R2 = 0.999915

Weizsäcker’s Formula:

A

ZN.

A

Z.A.A..E

..

B

2

260

2640 )(2917390

391243138314

R2 = 0.99944

Inferred Formula:

Page 37: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Systems of Differential Equations

• Regress on derivative

time x1 x2 …

0 3.4 -1.7 …0.1 3.2 -0.9 …0.2 3.1 -0.1 …0.3 2.7 1.2 …… … … …

State Variables

dx1/dt x2/dt …

-2.0 8.0 …-1.0 8.0 …-4.0 1.3 …-5.7 1.9 …… … …

Derivatives

Page 38: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

0

1

2 6

1

2 3

3

1 3143

1 322 1 2 14

3

2*

32 1 3 2

42 3

*2.5 100

1 13.6769*

*200 6* * 12* *

1 13.6769*

6* * 16* *

16* * 100*

J

v

v v

v

v v

v

S AdS

dt A

S AdSS N S N

dt A

dSS N S A

dt

dSA S

dt

4

2 4

3 5

1

2 4

22 1 2 4

3 1 32 3 34

3 2

2*

55

*

6* * 100* *

*200 32* * 1.28*

1 13.6769

1.3*

v

v v

v v

v

J

N S

dNS N N S

dt

dA S AA S A

dt A

dSS

dt

Original Equations Inferred Equations

Inferring Biological Networks

With Michael Schmidt, John Wikswo (Vanderbilt), Jerry Jenkins (CFDRC)

0

1

2 6

1

2

1 3143

1 322 1 2 14

3

2*

32 1

*2.42114 99.2721

1 13.5956*

*199.935 5.99475* * 11.9895* *

1 13.6734*

5.99857* * 1

J

v

v v

v

v

S AdS

dt A

S AdSS N S N

dt A

dSS N

dt

3

43

2 4

3 2

42 3 2 4

22 1 2 4

3 1 3

3

43

2*

5.99606* *

15.997* * 100.0

0.01

15* *

5.99857* * 99.9963* *

*197.781

1 13.263

286

3

*

v

vv

v

extran

v

v

eous

S A

dSA S N S

dt

dNS N N S

dt

dA S

dt

S

A

A

3 5

1

2 3 3

2

55

31.9682* * 1.29659*

1.29626*

v v

J

A S A

dSS

dt

Page 39: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 40: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 41: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Charles Richter

Page 42: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 43: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Ingm

ar Z

ange

r, J

ohn

Am

end

Page 44: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Wet Data, Unknown System

With Michael Schmidt (Cornell) and Gurol Suel (UT Southwestern)

Page 45: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Wet Data, Unknown System

With Michael Schmidt (Cornell) and Gurol Suel (UT Southwestern)

Page 46: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Cell #1

Cell #2

Cell #3-60 …

Page 47: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Blue Dots = data points, Green Line = regressed fit

=

=

Page 48: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

0

1

1

11

/ /

/ //

nK K

k Kn nK S

S kS Sp

K S

K KdKK

dt k K K S

SdSS

dt K SK k

Biologist’s Inferred Model: Gurol Suel, et. al., Science 2007

Symbolic Regression Inferred Time-Delay Model:

S

Kcba

dt

dSK

Scba

dt

dK

SSS

KKK

Page 49: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

7423.163214.170.1582

18

51

t

tt

G

S

dt

dG

05.33019.0922.114

15

25

t

tt

S

G

dt

dS

Withheld Test Set #1 Fit

Page 50: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

1355.10312.2192.3526

17

54

t

tt

G

S

dt

dG

9693.20178.0271.132

18

57

t

tt

S

G

dt

dS

Withheld Test Set #2 Fit

Page 51: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

4406.67452.391.5057

21

46

t

tt

G

S

dt

dG

871.32965.0426.295

20

54

t

tt

S

G

dt

dS

Withheld Test Set #3 Fit

Page 52: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Looking For Invariants

Page 53: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Data Mining

Page 54: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 55: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

42

42+x-x

42+1/(1000+x2)

?

Page 56: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

From Data: x y …

0.1 2.30.2 4.50.3 9.70.4 5.10.5 3.30.6 1.0… … …

δxδy

δyδx

, , …

Calculate partial derivatives Numerically:

δfδx

δfδy

From Equation:

δx’δy’

δy’δx’

, , …

Calculate predicted partial derivatives Symbolically:

Page 57: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

-5 0 5

-3

-2

-1

0

1

2

3

x

y

x

y

x3 + x – y2 – 1.5 = 0x2 + y2 – 16 = 0 x2 + y2 + z2 – 1 = 0

-2 -1 0 1 2-3

-2

-1

0

1

2

3

x

y

x

y

-1 -0.5 0 0.5 1-1

-0.5

0

0.5

1

x

z

x

z

Homework

Circle Elliptic Curve Sphere

Page 58: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 59: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Linear Oscillator

• Coefficients may have different scales and offsets each run

Page 60: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Pendulum

2

2.42847*cos( )

d

Ldt 2

3.52768* 9.43429*cos( ) d

Hdt

H

L

Page 61: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Double Linear Oscillator

2 22 2 2 11 2 1 214.691* 15.551* 21.676* 8.3808* 2.6046*

dx dxH x x x x

dt dt

would be plus for Lagrangian

Page 62: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 63: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 64: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

-k1 ω1 – k2 ω2 + k3 ω1 cos(θ1 – θ2) + k4 ω2 cos(θ1 – θ2)

k1 ω1 ω2 – k2 cos(θ1 – θ2)

k1 ω12 + k2 ω2

2 – k3 ω1 ω2 cos(θ1 – θ2) – k4 cos(θ1) – k5 cos(θ2)

Parsimony [-nodes]

Pre

dic

tive

Ab

ilit

y [-

log

err

or]

A k1 θ2 – k2 ω12 – k3 ω2

2 + k4 ω1 ω2 cos(θ1 – k5 θ2) + k6 cos(θ2) + k7 cos(θ1) – k8 cos(k9 θ2) – k10

cos(k11 – k12 θ2)

-k1 ω12 – k1 ω2

2 + k1 ω1 ω2 cos(θ2) + k1 cos(θ2) + k1 cos(θ1)

ω2·cos(θ1 θ2) + ω1

0

-2

-0.4

-0.8

-1.2

-1.6

SimpleComplex

Less

P

red

ictiv

eM

ore

P

red

ictiv

e

Page 65: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

1

2

3

4

K K t tK

t t

S S t tS

t t

SK

t K

KS

t S

b cda

d

b cda

d

Page 66: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 68: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

x y zz=f(x,y) ?

dy/dt=f(x,y) ?

f(x,y,z)=0 ?

Page 70: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

x y zz=f(x,y) ?

dy/dt=f(x,y) ?

f(x,y,z)=0 ?

I feel lucky

Page 72: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 73: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Von Thomas Hermanowski, Dr. Andreas Rick, Dr. Jochen Weber

Page 74: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Particle Accelerators

angle

Distortion Correction (GE X-Ray Detectors)5x Resolution Improvement

Jay Schuren

Page 76: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Concluding RemarksConcluding Remarks

Correlation is enough. Faced with massive data, [the Scientific Method] is becoming obsolete. We can stop looking for models.

“”Chris Anderson

Wired 16.07

The data deluge accelerates our ability to hypothesize, model, and test.

Page 77: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

Theoretical physicists are not yet obsolete, but scientists have taken steps toward

replacing themselves

Page 78: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.

I am worried that we have enjoyed a brief window in human history where we could actually understand things, but that

period may be coming to an end.

-- Steve Strogatz

The end of insight

Page 79: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.
Page 80: Machine Science Distilling Free-Form Natural Laws from Experimental Data Hod Lipson, Cornell University.