Metaheuristics - Lecture 8 1
Other population-based metaheuristics
IS - Immune Systems
DE – Differential Evolution
PMB - Probabilistic Model Building Algorithms
MA – Memetic Algorithms
Metaheuristics - Lecture 8 2
Immune Systems
Short history:• mid 1980 - first models
• 1990 – Ishida proposes a first application of immune models in problem solving
• mid 1990:– Forrest et al: applications in computer security– Hunt et al: applications in data analysis
• Current tendency: back to the biological model
Metaheuristics - Lecture 8 3
Applications
Anomaly detection and information systems security
Data analysis (classification, pattern recognition, clusteringetc)
Optimization;
Self-organization and autonomous control;
Metaheuristics - Lecture 8 4
Natural Immune SystemsThe natural immune system contains two main components:
- innate (inherited from the parents) – based on granulocytes (neutrophils, eosinophils si basophils) and macrophages
- Adaptive – based on lymphocytes (B cells and T cells)
Metaheuristics - Lecture 8 5
Natural immune systemParticularity: active at different levels
Phagocyte
Adaptive immune
response
Lymphocytes
Innate immune
response
Biochemical barriers
Skin
Pathogens
First level
Second level
Third level
Phagocyte
Skin
Biochemical barriers
Innate immune response
Lymphocytes
Adaptive immune response
Pathogens
Metaheuristics - Lecture 8 6
Natural immune systemsThe adaptive component of the immune system is able to:- Memorize (ability to recall previous contacts with pathogens and to react
quickly)
- Learn (ability to identify/recognize unknown pathogens)
a) Active elements: lymphocytes
- They contain specific receptors able to recognize the antigens (the organisms usually contain a library of millions of receptors)
- There are two types of lymphocytes: - B cells
- Synthesized in the bone marrow- Contain receptors called antibodies – the recognition process is
based on the complementarity between the binding region of the B cell and the epitope of the antigen
- T cells: Synthesized by thymus
Metaheuristics - Lecture 8 7
Natural immune systemMain mechanismsNegative selection: censoring the T cells which recognize the self
components (they define the normal behaviour)
Clonal selection: proliferation and differentiation of cells which recognized an antigen (learning and generalization)
Affinity maturation: the affinity of B cells which recognized an antigen is reinforced by
• Mutation on the receptors (the mutation probability inversely correlated with the affinity)
• The storage of cells with high affinity in a memory (cells pool)• Removal of the cells with incorrect behavior
Metaheuristics - Lecture 8 8
Natural immune systemMain mechanisms:
Foreign antigens
Proliferation(Cloning)
Differentiation
Plasma cells
Memory cellsSelection
M
M
Antibody
Self-antigen
Self-antigen
Clonal deletion(negative selection)
Clonal deletion(negative selection)
M
Memory cells
Plasma cells
M
Differentiation
Clonal deletion
(negative selection)
Selection
Proliferation
(Cloning)
Foreign antigens
Clonal deletion
(negative selection)
Self-antigen
Self-antigen
Antibody
Metaheuristics - Lecture 8 9
Natural immune systemMain steps:
( II )
( VII )
( VI )
( V )
( IV )
( III )
( I )
Activated B-cell
(plasma cell)
B-cell
Activated T-cell
T-cell
Peptide
MHC proteinAntigen
APC
Metaheuristics - Lecture 8 10
Natural immune systemPrimary and secondary reaction
Antigen Ag1 Antigens Ag1, Ag2
Primary Response Secondary Response
Lag
Response to Ag1
Antib
ody
Con
cent
ratio
n
Time
Lag
Response to Ag2
Response to Ag1
...
...
Cross-Reactive Response
...
...
Antigen Ag1 + Ag3
Response to Ag1 + Ag3
Lag
Primary reaction: first answer at the contact with an antigen
Secondary reaction: rapid answer
...
...
Lag
...
...
Response
to Ag1
Secondary Response
Cross-Reactive Response
Response
to Ag2
Time
Antigen
Ag1 + Ag3
Response to
Ag1 + Ag3
Response to Ag1
Antigens
Ag1, Ag2
Primary Response
Lag
Antibody Concentration
Lag
Antigen Ag1
Metaheuristics - Lecture 8 11
AIS = Artificial Immune System
Idea of AIS based problem solving:
Problem to be solved = environment
Solution (unknown) = antigen
Approximation of the solution (population element) = antibody
Measure of the quality of an element = affinity
Metaheuristics - Lecture 8 12
AIS = Artificial Immune SystemMain idea of AIS [DeCastro, Timmis, 2002]
Algorithms
Affinity
Representation
Problem
Solution
Binary values
Discrete values
Real values
Symbolic values
Metaheuristics - Lecture 8 13
AIS = Artificial Immune SystemMain idea of AIS[DeCastro, Timmis, 2002]
Algorithms
Affinity
Representation
Problem
Solution
Correlated to a distance (dissimilarity)•Euclidean•Manhattan•Hamming
Metaheuristics - Lecture 8 14
AIS = Artificial Immune SystemMain idea of AIS [DeCastro, Timmis, 2002]
Algorithms
Affinity
Representation
Application
Solution
Clonal SelectionNegative SelectionImmune Network ModelsPositive SelectionBone Marrow Algorithms
Metaheuristics - Lecture 8 15
AIS = Artificial Immune System
InitializationREPEAT
Antigenic presentation a. Affinity evaluation b. Clonal selection and expansion c. Affinity maturation d. Metadynamics
UNTIL “stopping condition”
CLONALG (Clonal Selection)
Metaheuristics - Lecture 8 16
AIS = Artificial Immune System
InitializationREPEAT
Antigenic presentationa. Affinity evaluationb. Clonal selection and expansionc. Affinity maturationd. Metadynamics
UNTIL “stopping condition”
• Creates a population of antibodies
• CLONALG (Clonal Selection)
Metaheuristics - Lecture 8 17
AIS = Artificial Immune System
InitializationREPEAT
Antigenic presentationa. Affinity evaluation b. Clonal selection and expansion c. Affinity maturation d. Metadynamics
UNTIL “stopping condition”
For each data (antigen) the steps 1-d are executed
CLONALG (Clonal Selection)
Metaheuristics - Lecture 8 18
AIS = Artificial Immune System
InitializationREPEAT
Antigenic presentation a. Affinity evaluationb. Clonal selection and expansionc. Affinity maturationd. Metadynamics
UNTIL “stopping condition”Compute the affinitya) Data mining pb: affinity is higher if the
similarity is higherb) Optimization pb: affinity is higher if the fitness
is higher (the fitness is correlated with the objective function value)
CLONALG (Clonal Selection)
Metaheuristics - Lecture 8 19
AIS = Artificial Immune System
InitializationREPEAT
Antigenic presentation a. Affinity evaluation b. Clonal selection and expansion c. Affinity maturationd. Metadynamics
UNTIL “stopping condition”• Select n elements from P in decreasing
order of affinity• Generate for each selected element a
number (proportional to the affinity) of clones
CLONALG (Clonal Selection)
Metaheuristics - Lecture 8 20
AIS = Artificial Immune System
InitializationREPEAT
Antigenic presentationa. Affinity evaluationb. Clonal selection and expansionc. Affinity maturation d. Metadynamics
UNTIL “stopping condition”
• Apply mutation to each clone• The mutation rate is inverse proportional to the affinity• Add the new element to the population• Evaluate the affinity for new elements and store the best
element
CLONALG (Clonal Selection)
Metaheuristics - Lecture 8 21
AIS = Artificial Immune System• CLONALG (Clonal Selection) InitializationREPEAT
Antigenic presentation a. Affinity evaluation b. Clonal selection and expansion c. Affinity maturationd. Metadynamics
UNTIL “stopping condition”
• Some of the elements of the population having small affinity are replaced with random elements
Metaheuristics - Lecture 8 22
AIS = Artificial Immune SystemApplications of CLONALG
- Pattern recognition = generate “detectors” for the recognition of characters specified by bitmaps
Rmk: affinity is measured using the Hamming distance
=
=
100111101111101101100101010010010011011000010010101101101101
5
4
3
2
1
ppppp
P
ú
ú
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ê
ê
ë
é
=
ú
ú
ú
ú
ú
ú
û
ù
ê
ê
ê
ê
ê
ê
ë
é
=
1
0
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
0
0
1
0
1
0
1
0
0
1
0
0
1
0
0
1
1
0
1
1
0
0
0
0
1
0
0
1
0
1
0
1
1
0
1
1
0
1
1
0
1
5
4
3
2
1
p
p
p
p
p
P
Metaheuristics - Lecture 8 23
AIS = Artificial Immune SystemApplications of CLONALG
- Multi-modal optimization = identify all optima (local and global) of a function
Metaheuristics - Lecture 8 24
AIS = Artificial Immune SystemProperties of CLONALG
- The general structure is similar to the structure of an evolutionary algorithm (instead of fitness is used the affinity)
- The specific elements refer to :- The cloning process is controlled by the value of the affinity- The mutation probability is inverse proportional to the affinity- The low affinity elements are replaced with random elements
Metaheuristics - Lecture 8 25
AIS = Artificial Immune SystemNegative selection algorithm
- It is based on the pronciple of the discrimination between self and non-self
- The self elements are considered to be representations of the normal behavior of a system
- The aim of the algorithm is to generate a set of detectors which are different from the set S of self elements (they would be detectors of non-self elements – would correspond to anomalous behavior)
- The algorithm will monitor the system functioning and will detect elements similar to non-self.
Metaheuristics - Lecture 8 26
AIS = Artificial Immune SystemNegative selection algorithm
Generating the set of detectors
System monitoring
Applications: computer security (intruders detection) – limited applicability
Selfstrings (S)
Generaterandom strings
(R0)Match Detector
Set (R)
Reject
No
Yes
No
Yes
Detector Set(R)
ProtectedStrings (S) Match
Non-selfDetected
Generate random strings
(R0)
Reject
No
Detector
Set (R)
Self
strings (S)
Yes
Match
Strings (
Detected
Non-self
Match
)
S
Protected
)
R
(
Set
Detector
Yes
No
Metaheuristics - Lecture 8 27
AIS = Artificial Immune SystemNegative selection algorithm
J.Timmis, P. Andrews, N. Owens, E. Clark – An Interdisciplinary Perspective of Artificial Immune Systems, Evolutionary Intelligence, Volume 1, Number 1, 5-26, 2008
Metaheuristics - Lecture 8 28
AIS = Artificial Immune SystemaiNET AlgorithmInitializationREPEAT• Antigenic presentation
a. Affinity evaluation b. Clonal selection and expansion c. Affinity maturationd. Metadynamicse. Clonal suppression
• Network interactions (analysis of interactions between network antibodies = computation of affinity between pairs of antibodies)
• Network suppression (eliminate the antibodies which are similar to other antibodies)
• Diversity (insertion of random antibodies)UNTIL “stopping condition”
Metaheuristics - Lecture 8 29
AIS = Artificial Immune SystemProperties of aiNET:
• aiNET is similar to CLONALG but it uses a suppression mechanism based on the affinity between the population elements
• aiNET was initially used for data clustering (but it has difficulty in the case of arbitrary distributed data)
• aiNET was successfully applied in solving multimodal optimization problems
Metaheuristics - Lecture 8 30
AIS = Artificial Immune SystemaiNET - clustering
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
11 1
1
1
1
1
1
111 1
1
1
1
1
1
11
1
1
1 1
1
1
1
11
1
1
11
1
1
1
1
1
11 1
1
1
1
1
1
11
1
1
1
1
11 1
11
1
11
1
11 1
111 1
1
1
1
1
1
1
1
1
1
1
11
1
1 1
1
1
1
11
1
11
1
1
1
1
1
1
11
1
1
1
1
1
1
11
1
1
1
1
1
1
11
111
1
1
111
1
1
1
11
11
111
1 1111
1
11
11
1
1
1
11
1
1
1
1
11
1
11
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
111
1
1
11
1
1
1
11
1
1
1
11
1
1
1
1
1 1
111
1
1
1
1
11
1
1
1
1
1
1
11
1
11
111
1
1
1
1
1
1
1 11 1
1
1
11
1
1
1
1
11
1
1
1
11
1
11
11
11
11
1
111
1
11
1
1
11
11
1
1
1
1
1
1
1
11
1
1
11
1
1
11
1
1
1
1 1
11
1 1
1
11
1
1
1
1
1
11
1
11
1
11
11
11
1
1
1
22
222 2222222
22
22222
222222 22
22 222
22222
2222 2
2 22 222
2 22 2222222
2222 222222
222
2222 22222222
2
2222 2222
22
22 2222
33 3
3
33 3 33
333
3
33
333 33
33 33 3
333
3
3333 333
3
333 333 33333 3
33
33 3
3333
3
3
33
3
333
33
33
3 33
3333333
33
3 333
33
33
33 3
3
3 3333
3
4
4
444 44
444 4
44444
44444
44
4 44444
4444 44
44444
44
4444
44
44
4
444 4
44
44 44
44444 4 4
4
44 444
4 4444
44
4
44444
444
44
4
44
444
4
4
555
5 5
55
5
555
555
55
555
555
55 55555 55
55
55
55555 555555 555555
555
55
555 55 5555 5
5
555 55555
55555
5 555
555
5 555555
55
55566 66 66 6666
777777
777777777
777777777
7777777
777777
777777777
7777777
888888
8888888888
888888
88888
88888888
888888888888
88888888
88
Training Patterns
Training Pattern Result immune network
Training Patterns
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.8
0.6
0.4
0.2
0
1
0.8
0.6
0.4
0.2
0
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
7
7
7
7
7
7
4
4
4
4
4
4
4
4
4
4
4
4
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1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
Metaheuristics - Lecture 8 31
AIS = Artificial Immune SystemaiNET - multimodal optimization
Initial population
Final population
Metaheuristics - Lecture 8 32
Differential Evolution (DE)Creators: Rainer Storn & Kenneth Price (1995)
Aim: continuous optimization
Idea: for each element of the current population:• Randomly select 3 elements
• The mutation is based on the computation of the difference between two elements; the difference (multiplied by a scale factor) is added to the third element. The obtained element is called mutant
• The mutant element is recombined with the current element leading to the so-called trial element
• If the trial element is better than the current element then it replaces it
Metaheuristics - Lecture 8 33
Differential Evolution (DE)Problem: maximization of f:DRn→R
r2
r3
r1
-F x+
i
candidate (Y)
Selection of the best element
Random elements
]10( ]20(m}{1,..., from indices random
1y probabilitwith ,y probabilitwith ),(
population new– candidates of population–
populationcurrent –
321
1
1
1
321
,p,,F,r,rr
pxpxxFx
y
},z,{zZ},y,{yY},x,{xX
ji
jr
jr
jrj
i
m
m
m
∈∈=
−−⋅+
=
…=…=…=
≤>
=)()(,)()(,
iii
iiii yfxfy
yfxfxz
Metaheuristics - Lecture 8 34
Differential Evolution (DE)Variants
population theofelement best
1y probabilitwith ,y probabilitwith ),()1(
*
* 321
=
−−⋅+−+
=
x
pxpxxFxx
y ji
jr
jr
jr
jj
i
λλ
−⋅−⋅+
=px
pNxxFxy j
i
jr
jr
jrj
i 1y probabilitwith ,y probabilitwith ),1,0()(
321
−−⋅+−⋅+
=px
pxxFxxFxy j
i
jr
jr
jr
jr
jrj
i 1y probabilitwith ,y probabilitwith ),()(
54321 21
Taxonomy: DE/base element/number of differences/crossover type(e.g. DE/rand/1/bin, DE/rand/2/bin, DE/best/1/bin etc.)
Metaheuristics - Lecture 8 35
Differential Evolution (DE)Control parameters:
Scale factor (F):- range: (0,2) - small values: exploitation of the search space (local search)
can lead to premature convergence - large values: exploration of the search space
Crossover probability:- small values (0.5): appropriate for nonseparable problems
Metaheuristics - Lecture 8 36
Differential Evolution (DE)Self-adapting [jDE - Brest, 2006]
- Each individual is extended with two components corresponding to the control parameters (F and p)
- At each generation the parameters are randomly changed
Best performance: JADE, SHADE etc
Metaheuristics - Lecture 8 37
Probabilistic Model Building Algorithms
Particularity: class of algorithms which search the solution space by estimating and simulating some probability distributions
Variants: - Estimation of Distribution Algorithms (EDA) [Mühlenbein & Paass, 1996]- Iterated Density Estimation Algorithms (IDEA) [Bosman & Thierens, 2000]- Bayesian Optimization Algorithms (BOA) [Pelikan, Goldberg, & Cantu-Paz, 1998]
Idea: the mutation and crossover operators are replaced with a process for the estimation of the probability distribution of selected elements and a process of sampling new elements using this distribution
Remark: the sampled values should be promising elements
Metaheuristics - Lecture 8 38
Probabilistic Model Building Algorithms
Illustration [M.Pelikan – Probabilistic Model Building GA Tutorial]
Metaheuristics - Lecture 8 39
Probabilistic Model Building Algorithms
General structure.
Step 1: Population initialization (m elements)Step 2: REPEAT
– select m’
Metaheuristics - Lecture 8 40
Probabilistic Model Building Algorithms
Remarks• The main difficulty is to estimate the probability distribution
(especially when the components of individuals are correlated)
• A simplified variant is based on the assumption that the components are independent; therefore the corresponding probabilities can be estimated separately.
Variants based on the independence assumption:- UMDA (Univariate Marginal Distribution Algorithm)- PBIL (Probabilistic Based Incremental Learning)
Metaheuristics - Lecture 8 41
Probabilistic Model Building Algorithms
UMDA (Mühlenbein, Paass, 1996)
iposition on lue va thecontainselement selectedjth theif 1))1(|(
1iteration at selected population theis 1
icomponent ofy probabilit '
))1(|()(
'
1
i
iij
m
jiij
it
xtSxX
)(t-)S(t-m
tSxXxP
=−=
−==∑=
δ
δ
PBIL (Baluja, 1995)
]1,0(
'
))1(|()()1()(
'
1)1(
∈
−=+−=∑=−
α
δαα
m
tSxXxPxP
m
jiij
it
it
Metaheuristics - Lecture 8 42
Memetic AlgorithmsCreator: Pablo Moscato (1989)
Particularity: hybridization of EAs with local search techniques
Name: “memetic” comes “meme”, a term coined by Richard Dawkins to specify the transfer unit of different entities (biological, cultural etc) between generations
Variants: Hybrid Evolutionary Algorithms, Baldwinian Evolutionary Algorithms, Lamarckian Evolutionary Algorithms, Cultural Algorithms or Genetic Local Search
Metaheuristics - Lecture 8 43
Memetic AlgorithmsGeneral structure:Step 1: Population InitializationStep 2: WHILE
– Evaluate the elements of the population – Generate new elements using the variation operators (mutation
and crossover)– Select a subpopulation on which are applied some local search
operators (e.g. SA, TS etc)Remarks:1. The local search can be based on a set of operators – the
operators to be applied are probabilistically selected 2. The elements which define the local search operators can be
evolved.
Other population-based metaheuristicsImmune SystemsApplicationsNatural Immune SystemsNatural immune systemNatural immune systemsNatural immune systemNatural immune systemNatural immune systemNatural immune systemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemAIS = Artificial Immune SystemDifferential Evolution (DE)Differential Evolution (DE)Differential Evolution (DE)Differential Evolution (DE)Differential Evolution (DE)Probabilistic Model Building AlgorithmsProbabilistic Model Building AlgorithmsProbabilistic Model Building AlgorithmsProbabilistic Model Building AlgorithmsProbabilistic Model Building AlgorithmsMemetic AlgorithmsMemetic Algorithms