OPTIMISATION STRATEGIES FOR MODELLING AND SIMULATION …

Post on 04-May-2022

12 views 0 download

Transcript of OPTIMISATION STRATEGIES FOR MODELLING AND SIMULATION …

OPTIMISATION STRATEGIES FOR MODELLING ANDSIMULATION

Jean LOUCHETEvol'Tech, Paris

andINRIA, Complex team, Rocquencourt (France)

Jean.Louchet@gmail.com

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 1 / 47

OPTIMISATION STRATEGIES FOR MODELLING AND SIMULATION

1 Introduction: exploring parameter spaces using Evolutionary Programming3

2 Retrieving patterns: revisiting the Hough Transform 11Evolutionarising the Hough transform 16Generalised Houghvolution 20

3 Parisian Evolution - how to split optimisation: the Fly algorithm 22An application to mobile robotics 26An application to medical imaging 32

4 From phenomena to processes: identifying hidden internal parameters36

5 Conclusion 42

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 2 / 47

1 Introduction: exploring parameter spaces using EvolutionaryProgramming

Parallel operators looking for a global maximum

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 3 / 47

calculationfitness

selection

genetic operators

mutationcrossover

sharing

labelled population

...

new population

...

random process

heavy calculation load creationinitial

One possible general scheme for evolutionary algorithms

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 4 / 47

DARWIN

• the fittest survive longer • heredity

Coding - genotype and phenotype

Fitness function

f itness F : E → R: search space; : real numbersE R

x = Argmax (f ) ⇔ [x′ ≠ x ⇒ f (x′) < f (x)]

Create and evolve a population (subset) in the search space, following nature's lawsMultiple local maximaOther approachesCost function vs. fitness functionSharing?

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 5 / 47

Genetic operators:

• selection

• ranking• roulette• tournament

• mutation• crossover

• exchange segments• barycentric (ES only!)

• sharing• refinements:

• mating preferences• niching• co-evolution• diploids, sexual, dominant/recessive genes, etc.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 6 / 47

A useless example of crossover.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 7 / 47

Hans-Paul Schwefel (“Evolutionsstrategie”)

Real numbers - an engineering culture?

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 8 / 47

Riccardo Poli, David Goldberg (“Genetic algorithms”)

Booleans - a computing culture?

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 9 / 47

Other pioneers of Artificial Evolution: Wolfgang Banzhaf, William Langdon, MichèleSebag.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 10 / 47

2 Retrieving patterns: revisiting the Hough Transform

y = ax + b

In the co-ordinate system , the set of lines containing a given pixel is a straight line,the equation of which is:

(a, b) (x, y)

b = (−x) a + yThe original image co-ordinate system is often called theplane, and the co-ordinatesystem the dual plane.

(x, y) (a, b)

WHAT ABOUT ISOTROPY?

a good equation is:

ρ = x cosθ + y sinθ

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 11 / 47

Algorithm:______________________________________________________________Initialise array H (θ, ρ) = 0For each pixel (x, y)

if pixel meets criteria (value, contrast, etc.) thenfor each : θ ∈ [0,2π] H (θ, x cosθ + y sinθ) + = 1

// Each "interesting pixel'' creates an arch of a sinusoid in the Hough accumulation space.

(θ, ρ) = Argmax H

// gives the equation of the most important alignment._______________________________________________________________

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 12 / 47

Archaeological data: map of Palaeolithic monuments in South-West England (PeterBrough)

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 13 / 47

The Hough accumulator

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 14 / 47

Alignments detected

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 15 / 47

Evolutionarising the Hough transform

Idea: directly explore the parameter space rather than using it as an accumulator

Algorithm:__________________________________________________________________Create a population of individuals with chromosomes (θ, ρ)Randomly initialise population, with and θ ∈ [0, 2π] ρ ≤ ρmax

Launch a standard Evolution Strategy with the following fitness function:

Fitness(θ, ρ) = number of pixels meeting the criteria on the corresponding li ne.Mutation: GaussianCrossover: barycentricNo sharingSelection: tournament

Refinement: poll-based fast fitness function //non-deterministic fitness function__________________________________________________________________

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 16 / 47

Detecting alignments the classical way: Mr Cheng

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 17 / 47

Hough transform of the Cheng image.(θ, ρ)

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 18 / 47

Evolutionary Hough: The two dominant individuals in the population.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 19 / 47

Generalised Houghvolution

The original Hough approach cannot cope with more than 2 (sometimes 3 ..) parametersEvolutionary Hough can directly explore virtually any search space to find a pattern.Algorithm:Image I (x, y)Pattern defined by parameters :n (x1, x2, ...xn)

P((x, y) (x1, x2, ...xn)) ∈ {0,1}__________________________________________________________________Create a population of individuals with chromosomes (x1, x2, ...xn)Randomly initialise population, with each xi ∈ [Li, U i]Launch a standard Evolution Strategy with the following fitness function:

Fitness(x1, x2, ...xn) = number of pixels (x, y) such that

P((x, y) (x1, x2, ...xn)) = 1Mutation: GaussianCrossover: barycentricNo sharingSelection: tournament__________________________________________________________________ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 20 / 47

Dynamic 3-D ball tracking (apparent diameter is unknown) using the Louchoughtransform

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 21 / 47

3 Parisian Evolution - how to split optimisation: the Fly algorithm

Left camera

Right camera

A

Bb

1

a

1

b

2

a

2

.

.

..

Bad fly A and good fly B

The fitness function evaluates the degree of consistency of the fly (the hypothesis) with thedifferent sensor data (here the similarity of their projections into the two cameras),

G = ∑(i ,j) ∈N

(L (xL + i , yL + j) − L (xL, yL))2

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 22 / 47

z-axis (depth)

clipping line

cameraleft

truncated vision cone

x-axis

cameraright

The initial fly population inside the intersection of the camera fields of view.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 23 / 47

A (synthetic) stereo pair

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 24 / 47

Convergence after 10 , 50 and 100 generations(flies seen from above).

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 25 / 47

An application to mobile robotics

Flies calculated in real-time on a French highway

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 26 / 47

Flies detected on a pedestrian.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 27 / 47

Alarm values (pedestrian sequence)

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 28 / 47

A robot facing a door and a wall (in a synthetic world). The bright dots represent theflies memorised from the preceding positions.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 29 / 47

A direct trajectory, without blockage situations (target is a circle on the right).

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 30 / 47

An example of secondary targets after a difficult blockage.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 31 / 47

An application to medical imaging

searchzone

air

exterior

cristalTomography sensor system

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 32 / 47

Bonus fitness

each fly is a photon emittereach time one of the simulated photons from the current fly lands onto a bright pixel inthe (real) image, increment the fly's fitness

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 33 / 47

Marginal evaluation

Rather than evaluating a fly independently of its context, we introduce marginal evaluation:the fitness of a particulat fly is defined as its contribution (positive or negative) to the wholepopulation's Fitness:

f itness(i) = Fitness(population − {i}) − Fitness(population)

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 34 / 47

Comparison of bonus fitness and marginal fitness

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 35 / 47

8 original images (projections into 8 photon detector screens)

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 36 / 47

3-D reconstruction using Flies: skeleton reconstructed from 2 views (without takinginto account the Compton effect).

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 37 / 47

Two slices of the pelvis, reconstructed from the side views using the Fly algorithm(view from above).

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 38 / 47

4 From phenomena to processes: identifying hidden internal parameters

Mass and spring models[CORDIS-ANIMA system, Acroe Grenoble - C. Cadoz, J.L. Florens, A. Luciani]Creating physical models in discrete time.

M- and L- elements:

• M-element (mass):

• input: force (f x, f y, f z)• output: position , speed (x, y, z) (x•, y

•, z

•)• parameter: mass m

• laws: , etc.; , etc.x• ← x

•+ f x / m x ← x + x

• L-element (bond):

• input: distance , elongation speed d d•

• output: force value f• parameters: length at rest , stiffness , viscosity , other parameters if requiredL0 S V

• each instance of an L-element connects two M-elements

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 39 / 47

Reverse engineering mass and spring models

C = ∑time

∑particles

((xpredt,i − xreal t,i)2 + (ypredt,i − yreal t,i)2 + (zpredt,i − zreal t,i)2)

To be stabilised...:

• locality and short-term cost/fitness function• one global and many local fitness functions• use generic bonds (prototype)• hybridise with local search (not too much!)

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 40 / 47

Evolution of Log(precision), for different noise levels on trajectories.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 41 / 47

A piece of fabric falling into equilibrium (left: original sequence)ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 42 / 47

Simulated turbulent interference of a jet with a viscous fluid(frames nos. 100, 200, 300, 400 from a simulated sequence)

Viscosity parameters recovery

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 43 / 47

(x 10)

12.0 13.0 14.0 15.0 16.0 17.01.20

1.30

1.40

1.50

1.60

1.70

1.80

(x 100)

Detection of necrosis on a human heart from MR image sequencesusing mass and spring model identification.

Linear springs and dampers - high stiffness values on necrotic places.

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 44 / 47

5 Conclusion

• Optimise to fit a model to experiments• ES allow search into large, high-dimensional parameter spaces• GP builds logical rules (production rules)• Split problems as much as necessary• No universal evolutionary scheme: don't rely on `canonic' algorithms• Adequate coding is essential - (epistasy)• No Administratium: too much refinement may kill efficiency• Create one's own autonomous physics

• physical laws• measuring instruments and reference (primary) units• finding dependence laws - towards physical regression• an automated physicist?

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 45 / 47

6 AcknowledgementsAmine BoumazaAurélie BousquetClaude CadozLionel CastillonPierre ColletAnders EckmanJiang LiAnnie LucianiEvelyne LuttonOlivier PauplinXavier ProvotJean-Marie RocchisaniMaria Rodriguez LopezBogdan Stanciulescu

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 46 / 47

ERICE Conference on Data Analysis for Astronomy, April 2007 Jean Louchet page 47 / 47