You are on page 1of 38

STANFORD UNIVERSITY 01/23/2009

Particle Swarm: a powerful family of


optimizers for geophysical inversion.
(Applications in hydrogeophysics)

Juan Luis Fernández-Martínez (Visiting professor UC-Berkeley)

Esperanza García-Gonzalo (University of Oviedo)

UNIVERSITY OF OVIEDO (ESPAÑA)


Two non-linear discrete inverse problem issues
F  m  d 2 2
mM  n Finding m   min F m  d
: Rm 






  2 m m *

  mM  
2 2
dD  s
4
• The theoretical model is a 2
0

simplification of reality. 2

•The data are noisy and discrete in 1

number (spatial coverage is not 0

complete). 1
2

-1
0
-1

The topography of the misfit function -2 -2

 Valley model (Rosenbrock)


0.5

 Egg’s pack model (Griewank) 0


6

4
6
2
4
0 2
-2 0

Where the unstabilities enter?


-2
-4
-4
-6 -6
Equivalent models and importance sampling

The unstabilities enter when trying to solve the optimization


-1
problem using m = F (d) Prior + Regularisation

Other Solution: m -1
= F (d)
3

2.5 0.9

2 0.8

Perform I-Sampling 1.5 0.7

1 0.6

espesor (log)
m  M : F(m) - d p  tol 0.5

0
0.5

0.4
-0.5
isolíneas error 0.3
Algorithms to perform IS -1 modelo central
PSO 0.2
-1.5 GA
SA 0.1
SA (Mosegaard&Tarantola, 1995) -2
-3 -2 -1 0 1 2 3
resistividad (log)
BGA (Fernández Álvarez et al., 2008)
Particle Swarm Optimization

The particle swarm is an evolutionary computation technique used in


optimization. It is inspired in social behaviour of individuals in nature,
such as bird flocking and fish schooling (Kennedy&Eberhart, 1995)
A lot of references in engineering optimization
•Electronics & Electromagnetics
•Expert systems&Machine learning
•Robotics,Control,Networks
•Scheduling&Combinatorial optimization
•Energy&Metallurgy,
•Biomedical Engineering, Financial, etc.

(After R. Poli, 2007)

A few references on earth sciences


•Reddy and Kumar, 2005: Reservoir optimization.
•Fernández-Martínez et al., 2006, 2008: VES, SP, transmision
tomography. IAMG-06, SEG2008, Computer&Geosciences, 2008.
•Shaw&Srivastava: VES, IP & MT. Geophysics, 2007.
Particle Swarm Optimization
Misfit function. Movement of a particle
500

400

Each individual samples the 300


model search space M according
200 l(k)
to its own best historical misfit, x(k+1)
l(k), and its companions , g(k), 100
searching experience. 0 x(k) g(k)

y
-100
PSO updates particles position v(k)
and velocities as follows: -200

-300

-400

-500
-500 -400 -300 -200 -100 0 100 200 300 400 500
x
v p  k  1  wv p  k   1  g  k   x p  k    2  l p  k   x p  k   ,
x p  k  1 = x p  k   v p  k  1 ,
1  r1ag 2  r2 al r1 , r2  U  0,1 w, al , a g   .
The PSO algorithm

n
1. Random initial swarm (on a prismatic Search Space in  ) with
null velocities.

2. Choose the inertia, local and global accelerations


r1 , r2 ,
3. Draw random numbers for each particle of the swarm.

4. Evaluate the cost function for all the particles of the swarm, and
determine local (different for each particle) and global leaders
(common)

5. To apply the two discrete gradient algorithm and making the


swarm evolving.

6. Go to 4 till convergence or maximum number of iterations.


The spring-mass analogy
(Continuous PSO)
xik-gk lik-xik Trajectory of each individual
mimics the motion of a unit
1 2 mass, m, attached to two
springs with rigidity constants
gk m=1
1 and 2, and damping 1-w,
1-w
whose equilibrium positions
xik are l(t) (the individual best
position) and g(t) (the global
best position in the swarm)
lik respectively:

xi ''  t    1  w   x i '  t    1  2   x i  t   1  l i  t  t 0   2  g  t  t 0  .
The introduction of the PSO continuous
model allowed us:
1. To properly understand the dynamics of the particle’s trajectories,
considered as stochastic processes characterized by their mean,
variance and temporal covariance.

2. To generalize PSO (GPSO) and to deduce a family of PSO versions


with different first and second order stability regions.

3. To propose criteria to choose the PSO tuning parameters w, al , a g ,


depending on the cost function (problem physics) and on the task we
want to perform: Exploitation/Exploration.
x i ''  t    1  w   xi '  t    1  2   xi  t   1  li  t  t0   2  g  t  t0  .
GPSO
xi  t  t   2 xi  t   xi  t  t  xi (t )  xi (t  t )
xi ''(t )  2
xi '( t ) 
t t

PSO GPSO
 wvi  1 ( xi  g )  2 ( xi  li ),
k 1 k k k k k
vi vi (t  t )  (1  (1  w) t )vi (t )  1t ( xi (t )  g (t  t0 )  2 t ( xi (t )  li (t  t0 )),
 xi  vi . xi (t  t )  xi (t )  vi (t  t ) t.
k 1 k k 1
xi

First order moments


 E  x  t  t     E  x t  
   A    b ,
 E  x t    E  x  t  t   
   

 E ( A) B   E (C ) 
A    , b    
 1 0  0 
A  2  (1  w) t  t 2 ;
B  (1  w) t  1;
C  t 2o  t  .
1 g  t   2l  t 
o t  

PSO case: first order trajectories
E  x      w  1 E  x   wE  x    o S :  w,  : w  1, 0    2  w  1
k 1 k k 1 k
i i i i D

First order homogeneous trajectories


)   w 1     E ( x )    oi 
k
 E(x
k 1 k
i
 k 1     k    k 
i

 vi   w    vi    oi 

 oik  1 g k  2lik .

First order spectral radius


The GPSO second order trajectories
 Var  x  t  t     Var  x  t   
   
 Cov  x  t  , x  t  t     A  Cov  x  t - t  , x  t     b ,
   
 Var  x  t     Var  x  t - t   
   

 E  A2  2 BE  A  B2 
  A  2  (1  w)t  t 2 ;
A   E  A  B 0 . B  (1  w)t  1.
 
 1 0 0
 

  Cov  x  t  , o  t     Cov  x  t - t  , o  t     Var   Var  o  t   


 
b    t Cov  x  t  , o  t  
2

 
 0 
 
More about GPSO second order
trajectories Var  x  t  

1 3
2

5
4 6

1 2 3

4 6
5

Cov ( x(t), x(t - Δt))


Other PSO relatives
x ''( t )  (1  w) x '( t )  (1   2 ) x ( t )  1 g  t  t 0    2l  t  t 0 

   1  x (t  t )   1  2   x (t )    x (t  t ) x  t  t   2 x  t   x  t  t 
x '( t )  x ''(t )  2
t t

1. CP-PSO, or centered-progressive PSO (  1.0)

1  (1  2 )t 2 t1 t2


v(t  t )  v t  ( g (t  t  t 0 )  x (t ))  (l (t  t  t 0 )  x(t )),
1  (1  w)t 1  (1  w)t 1  (1  w)t
x(t  t )  x(t )  v (t )t.

2. CC-PSO, or centered-centered PSO (  0.5)


 2  ( w  1)t  t  t 
x(t  t )  x (t )   v(t )  1 ( g (t  t0 )  x(t ))  2 (l (t  t 0 )  x (t ))  t ,
 2 2 2 
2  ( w  1)t 1
 1t 2t 
v(t  t )  v t   ( g (t  k t  t0 )  x (t  k t ))  (l (t  k t  t 0 )  x (t  k t )) 
2  (1  w)t k  0  2  (1  w) t 2  (1  w)t 
PSO generalizado

First order spectral radius for the PSO, CC-PSO and CP-PSO for t=1

Second order spectral radius for the PSO, CC-PSO and CP-PSO for t=1
Numerical Experiments with benchmark
functions
Rosenbrock: Valley function
in 10 dim.
Numerical Experiments with benchmark
functions
Griewank: Local
Minima function in 10
dim.
The VES inverse problem
GEOLOGY

MODEL

 h 1

z1 = h 1

 h 2

z 2 = h 1+ h 2

V ( s )
 apo  s   K G  (observed)
I
  n - 1 h n -1

z n -1 = h 1 + … + h n -1

n

 ap  s ,  i , h j   s T1   ,  i , h j  J 1   s   d 

* 2
(predicted)
i 1, Nlayers
0
j 1, Nlayers 1
The salty water intrusion problem
Water intrusion case
200

 .m)
150

100

Resistivities (
50

0
0 50 100 150 200 250 300 350 400 450 500
Spacings (m)
3
10

 .m)
Studied V.E.S
2
10
Log-Resistivities (

1
10

0
10
0 1 2 3
10 10 10 10
Log-Spacings (m)
Geological map of the
Apparent resistivity curve
Aguilas zone
The salty water intrusion problem
Convergence curves
Error curves
25 CP
CP-iqr
PSO
PSO-iqr
20
SA
SA-iqr
Relative misfit (%)

GA
15 GA-iqr
CC
CCiqr

10

5
4

0
0 10 20 30 40 50 60 70 80 90 100
Iterations
The salty water intrusion problem
Depth of the intrusion posterior histogram
Depth histogram for a resistivity cutoff of 10 Ohm.m
0.25
CP
GA
PSO
0.2
SA
CC
Frequency (%)

0.15

0.1

0.05

0
0 25 50 75 100 150 200 250 300
Depth (meters)

Depth of intrusion posterior histograms for different PSO versions


Posterior analysis and Risk Assestment:
Percentile curves
Percentile curves for finding intrusion above depth
180
25
50
160
75
90
140
95
99
120
Depth (m)

100

80

60

40

20

0
2 4 6 8 10 12 14 16 18 20
Resistivity range ( . m)
The Spontaneous
The Spontaneous Potential
Potential Inverse
Inverse Problem
Problem
SP (mV)

C' r.n
 ( P) 
*
 ( h  r   h0 )  3 d 
2 
r

SP data Distance

P(x,e)

INVERSE FORWARD 
PROBLEM PROBLEM

Hydraulic head

x=0 ξ x
Topography of
Topography of the
the misfit
misfit function
function * 
 P (h, C ')   P
A Gaussian
A Gaussian synthetic
synthetic model
model Erel (h, C ')   2
hwater=f(mean, st.
hwater=f(mean, st. dev)
dev) P
2

Noise-free 3% Error

44
-1.2
43

-1.4
42

41
-1.6

Mean m
40
-1.8
39

38 -2

37
-2.2

36
16 17 18 19 20 21 22 23 24
St. dev 
SP- Synthetic
SP- Synthetic case
case example
example
Noise-free 20% white Gaussian noise
SP- Field
SP- Field case
case example
example
SP profile from Bogoslovski & Ogilvy, 1973
SP- Field
SP- Field case
case example
example
SP-PSO design
hmax  h0   ( P) / C 'min
Search space : h  h   ( P ) / C '
min x 0 max

PS- Sample Autocorrelation Function (ACF)


1

Sample Autocorrelation
0.5

Smooth version of gbest 0

-0.5
0 2 4 6 8 10 12 14 16 18 20
Lag

w=0.8, ag=2.0, al=1.8


Sampling and curse of dimensionality
I. Oriented sampling
1. Linearize the Forward
3 functional
2.5 0.9

2 0.8 F(m) = F(m 0 ) + JFm0  m - m 0   o  m - m 0 


1.5 0.7

1 0.6 2. SVD JFm0


espesor (log)

0.5
0.5
0
0.4 3. Rotate the Search Space
-0.5
isolíneas error 0.3 and scale it according to
-1 modelo central
PSO 0.2 Singular values and tolerance
-1.5 GA
SA 0.1
-2
-3 -2 -1 0
resistividad (log)
1 2 3
4. Sampling the O.S.S
Sampling and curse of dimensionality
II. Stretching the cost function
2 2

1.5
1.5

1
1

0.5
0.5

0
0

-0.5
-0.5

-1
-1

-1.5
-1.5

-2
-2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

10 10

8 8

6 6

4 4

2 2

0 0

-2 -2

-4 -4

-6 -6

-8 -8

-10 -10
-10 -8 -6 -4 -2 0 2 4 6 8 10 -10 -8 -6 -4 -2 0 2 4 6 8 10
Sampling and curse of dimensionality

III. The next step: Interpolation

1. Neighborhood algorithm
(Sambridge, 2000)

2. Support Vector Machines and Kernel


methods
(Kuzma and Rector, 2004)
Some of our references
J.P. Fernández-Alvarez, J.L. Fernández-Martínez, and C.O. Menéndez Pérez. Feasibility of the use of binary
genetic algorithms as importance samplers. Application to a 1D-DC inverse problem. Math. Geosciences, 2008.

J.L. Fernández-Martínez, E. García-Gonzalo and J.P. Fernández-Alvarez. Theoretical analysis of Particle Swarm
trajectories through a mechanical analogy. International. Journal of Computational Intelligence Research.
Special Issue on PSO, 2008.

J.L. Fernández-Martínez, E. García-Gonzalo. The generalized PSO: a new door to PSO evolution. Journal of
Artificial Evolution and Applications, 2008.

J.L. Fernández-Martínez, E. García-Gonzalo. Stochastic analysis of the continuous and discrete PSO. Swarm
intelligence. In revision.

J.L. Fernández-Martínez, E. García-Gonzalo. The PSO family: deduction, stochastic analysis and comparison.
Swarm intelligence. In revision.
El modelo PSO continuo
x ''(t )  (1  w) x '(t )  (1  2 ) x (t )  1 g (t )  2 l (t ),
1 g (t )  2 l (t )
o(t )  .
1  2

 Var  x  t     Var  x  t   
d  E  x t    E x t   d   
 Cov  x  t  , x '  t     AC  Cov  x  t  , x '  t     b c ,
   A    bμ ,
dt  E  x '  t   
 
 E  x ' t   
  dt 
 Var  x '  t  



 Var  x '  t  


   

 0 1   0   0 2 0   0 
A    , bμ  ,    
  .E  o  t    1  , b C     Cov  x  t  , o  t    .
  w  1   AC    w  1
 
 
 0 2 2  w  1   2  Cov  x '  t  , o  t   
 

dY  t 
 AY  t   b  t  , t
Y  t   e Y0   P 1e P 1b    d ,
dt At D  t  

Y  0   Y0 , 0
The oscillation center dynamics
GPSO & continuous PSO comparison

Continuous &PSO in complex zone

Continuous in complex zone. GPSO in real zone


Corresponding trajectories
Topography of
Topography of the
the misfit
misfit function
function
Crossection on
Crossection on the
the layer
layer having
having intrusion
intrusion

2.5 0.9

2 0.8

1.5 0.7

1 0.6
espesor (log)

0.5
0.5
0
0.4
-0.5
isolíneas error 0.3
-1 modelo central
PSO 0.2
-1.5 GA
SA 0.1
-2
-3 -2 -1 0 1 2 3
resistividad (log)

You might also like