Content uploaded by Osama Khozium

Author content

All content in this area was uploaded by Osama Khozium on Oct 03, 2016

Content may be subject to copyright.

[1]

A Proposed Artificial Immune Genetic Algorithm

Emad Nabil

Faculty of Information

Technology, MISR University

for Science & Technology

(MUST), Egypt.

emadnabilcs@gmail.com

Amr Badr

Department of Computer

Science, Faculty of Computers

and Information, Cairo

University, Egypt.

ruaab@rusys.eg.net

Ibrahim Frag

Department of Computer

Science, Faculty of

Computers and Information,

Cairo University, Egypt.

i.farag@fci-cu.edu.eg

Mohamed Osama Khozium

Faculty of Information

Technology, MISR University

for Science & Technology

(MUST), Egypt.

Osama@khozium.com

ABSTRACT

The computer science imports more and more from nature, some of the nature gifts are the metaphors

of the immune system and genetics. The computer scientists make used of these metaphors and

developed computational models to be applied in solving various problems. In this paper we explain

what is the artificial immune system, what is a genetic algorithm and its operators, the problem of

operators’ adaptability and propose an artificial immune algorithm with genetic operators as

crossover and adapted mutation. The genetic operators will be merged in the clonal selection activity

of the immune system.

Key words: artificial immune system, genetic algorithms, mutation, crossover, clonal selection.

1. INTRODUCTION

Computing and engineering have been enriched by the introduction of the biological ideas to help

developing solutions for various problems. This can be exemplified by the artificial neural networks

(ANN), evolutionary algorithms (EA), artificial life (ALife), and cellular automata (CA). There are

three different approaches, the first is: biologically motivated computing, under this umbrella the EA,

ANN and artificial immune system (AIS), the second is computationally motivated biology, where

computing provides models and inspiration for biology (i.e. ALife and CA). The third approach is

computing with biological mechanisms, which involves the use of information processing capabilities

of biological systems to replace or supplement the current silicon-based computers (e.g. Quantum and

DNA computing)[9]. Our research point will be under the umbrella of the first approach. In this paper

we discuss how the immune system works, its components and activities. In section two the clonal

selection aspect will be depicted in details from the biological and computational view. Section three

will highlight the genetic algorithm (GA) and some of its problems. In section four we propose a

hybrid clonal selection algorithm with crossover and adapted mutation. Section five introduces testing

of the algorithm on a binary character recognition problem. Finally in section six the conclusion and

future work were depicted.

[2]

2. THE ARTIFICIAL IMMUNE SYSTEM

Figure 1: Multi-layer structure of the immune system

There are two inter-related systems by which the body identifies foreign materials: the innate immune

system and the adaptive immune system.

The innate immune system name comes from the fact that the human body is born with the ability to

recognize certain microbes and immediately destroy them. Our innate immune system can destroy

many pathogens on first encounter. The innate immunity is based on a set of receptors known as

pattern recognition receptors (PRRs).

The adaptive immune system uses somatically generated antigen receptors which are clonally

distributed on the two types of lymphocytes: B cells and T cells. These antigen receptors are

generated by random processes and, as a consequence, the general design of the adaptive immune

response is based upon the clonal selection of lymphocytes expressing receptors with particular

specificities [3, 4, 11].

2.1.

An overview of the clonal selection principle

The clonal selection principle, or theory, is the algorithm used by the immune system to describe the

basic features of an immune response to an antigenic stimulus. Clonal selection establishes the idea

that only cells that recognize the antigens will proliferate where the rest will not, as depicted in figure

2. The most triggered cells selected as memory cells for future pathogens attacks and the rest mature

into antibody secreting cells called plasma cells [7, 8, 11].

[3]

Figure 2: The clonal selection principle

2.2.

Somatic hypermutation and repertoire diversity

Mutation is random changes, these changes are introduced into the variable region genes and

occasionally one such change will lead to an increase in the affinity of the antibody. These higher-

affinity variants are selected to enter the pool of memory cells. Due to the random nature of the

somatic mutation process a large proportion of mutating genes become non-functional or develop

harmful anti-self specificities. Those cells with low affinity receptors, or the self reactive cells, must

be efficiently eliminated so that they do not significantly contribute to the pool of memory cells. The

killing process here maintained by the selection algorithm. For this algorithm to work, the receptor

population or repertoire has to be diverse enough to recognize any foreign shape, we maintain the

diversity by metadynamics (see section 4). A mammalian immune system contains a heterogeneous

repertoire of approximately 10

12

lymphocytes in human [6, 9, 10, 11].

2.3.

Pattern recognition

Figure 3: antigen epitope is recognized by an antibody

Recognition in the immune system occurs at the molecular level and is based on shape

complementarity between the binding site of the receptor and a portion of the antigen called an

epitope. While antibodies posses a single kind of receptor, antigens may have multiple epitopes,

meaning that a single antigen can be recognized by different antibody molecules, see figure 3.

[4]

2.4.

Shape-space model and affinities

The antigen (Ag) and antibody (Ab) representations will partially determine which distance measure

shall be used to Calculate their degree of interaction (complementarity), see figure 4.The affinity

between an antigen and an antibody is related to their distance, that can be estimated via any distance

measure between two strings (or vectors), for example the Euclidean or the hamming distance. if the

coordinates of an antibody are given by <ab1, ab2, ..., abL> and the coordinates of an antigen are

given by <ag1, ag2, ..., agL>, When antigens and antibodies are represented as sequences of symbols

we can use Hamming shape-space. When the distance D in equation (1) between two sequences is

maximal, the molecules constitute a perfect complement of each other and their affinity is maximal.

Equation (1)

Figure 4: the complementarity relation between the antigen and antibody

Shape-spaces that use real-valued coordinates measure distance in the form of Equation (2) which

called Euclidean distance.

Equation (2)

The standard clonal selection algorithm CLONALG [9] can be summarized as follows.

Begin

T=0;

Initialize p(t) randomly;

Identify antigen S

Evaluate affinity p(t)versus S;

While (not finished) do

Begin

1. t= t+1;

2. Select C(t) from p(t-1);

3. Proportional cloning of C(t) forming C’(t)

4. Mutation C’(t) forming c”(t);

5. Select and Replace P(t) from c”(t) and P(t-1);

6. Select memory cell from P(t);

7. Metadymanics;

End.

End

[5]

3. GENETIC ALGORITHMS (GAs)

The Genetic Algorithms (GAs) constitute stochastic evolutionary techniques whose search methods

model some natural phenomena: genetic inheritance and Darwinian strife for survival [3,11]. GAs

perform a search through a space of potential solutions, which are distinguished by the definition of

an evaluation (fitness) function, which plays the role of an environment feedback. GAs can be

describes as follows.

Begin

t=0;

Initialize p(t) randomly;

Evaluate structures in p (t);

While termination condition is not stratified do

Begin

t= t+1;

Select parents C(t) from p(t-1);

Crossover and mutate structures in c(t) forming c’(t);

Replace c’(t) by P(t-1);

End.

End

The genetic algorithm has many variables as the population size, the selection methods, mutation rate

and crossover rate. The previous factors have a heavy effect on the GAs performance, i.e., A large

population size can enhance the exploration of the landscape, a strong selection algorithm stress the

exploitation, the choice of the crossover operator influences the tension between the exploration and

exploitation[2, 15] and the mutation rate also affects the GA exploration and exploitation. The

optimal mutation rate is not only different for every problem but will vary with evolutionary time

according to the state of the search and the landscape being searched [12].

4. THE PROPOSED ALGORITHM

The proposed algorithm modifies clonal selection algorithm mutation method. The mutation in nature

occurs at small percentage value = 0.002 and this is rational from the computational point of view to

ensure that the good solutions are not distorted too match. However, researches have shown that an

initial large mutation rate that decreases exponentially as a function of the generation number

improves the convergence speed and accuracy [12].

The initial large mutation rate ensures that a large space is covered, while the mutation rate becomes

smaller when the individuals start to converge to the optimum. This is accepted solution for the

tradeoff between the exploration and exploitation [9].We used the time-decaying formula in equation

(3) where is a positive constant, m(0) in the initial large mutation rate and t is the generation

number. The equation depicted in figure (5).

Equation (3)

[6]

Figure 5: The effect of the degraded mutation function

The proposed algorithm can be summarized as follow.

Begin

T=0;

Initialize p(t) randomly;

Identify antigen S;

Evaluate fitness p (t), S;

While (condition) do

Begin

1. t= t+1;

2. Select C(t) from p(t-1);

3. Proportional cloning of C(t) forming C’(t)

4. Degraded_ Proportional _Mutation C’(t) forming c”(t);

5. Crossover c”(t) forming C*(t);

6. Select and Replace P(t) from c*(t) and P(t-1);

7. Select memory cell from P(t);

8. Metadymanics;

End.

End.

As the standard clonal selection algorithm, the population of antibodies first randomly generated of

certain size then, identify the antigen S after that evaluate the affinity of every antibody versus the

antigen S. the algorithm in details described as follows.

1. Increments the generation number t.

2. We select the highest affinity antibodies from P(t-1) forming C(t).

3. We clone individuals in C(t) proportional to their affinity forming C’(t).

4. The mutation applied to C’(t) taking into consideration that the mutation rate are proportional

with the affinity of individuals of C’(t) in the same generation, also the mutation degraded

from one generation to another.

5. Crossover operator applied after the mutation forming C*(t), and it must be after mutation,

this is as if we apply crossover over two clones of same antibody then; no change will take

place. We applied two point cross over for recombination. As a future work adapted crossover

can be merged in clonal selection instead of two point crossover.

[7]

6. The maturated clones C*(t) and the previous generation P(t-1) is merged to compose the new

population P(t). The new population P(t) is the highest affinity antibodies and this ensure that

the elitism principle was taken into consideration.

7. The highest affinity antibodies selected from P(t) as memory cells to be recognizers in the

future for antigens .

8. Metadynamics: To keep the diversity of the repertoire and the learning ability for new

antigens we replace the lowest affinity members by random generated individuals.

5. ALGORITHM TESTING

The proposed algorithm has been tested on binary character recognition problem. Each character is

represented by a bitstring (Hamming shape space discussed in sub section 2.4) of length L=121. The

original characters are depicted in figure 6; figure 7(a) illustrates the initial memory set. Figure7 (b) to

7(d) represents the maturation of the memory set through the generations. The affinity measure is the

hamming distance (discussed in section 2.4) between the antigens and antibodies. Note that the exact

matching is not important for recognition, partial matching is enough. The algorithm almost

converged at generation 200.

Figure: 6 the input patterns (antigens)

Figure 7: (a) the input pattern at generation 0, (B) patterns at generation 50, (c) patterns at generations

100, (d) patterns at generation 200.

6. CONCLUSION AND FUTURE WORK

We proposed a modification to the general purpose clonal selection algorithm CLONALG [9] which

is inspired from the clonal selection principle and affinity maturation of the immune responses. We

(a)

(b)

(c)

(d)

[8]

introduced the adaptability of the mutation rate by simple degrading function as it is not logic that the

mutation rate is static through all generations; also we merged the crossover into the CLONALG,

Two point crossover applied after the mutation process to increase the exploration of the landscape.

The algorithm was tested on simple pattern character recognition and performs in average better that

the standard CLONALG. In fact, there are many parameters still which need adaptation as the optimal

population size, optimal selection method, the number of clones, the number of selected individuals to

be cloned, the start mutation rate that degraded with time, the degradation rate, the crossover points

(one point, two point…, uniform), the crossover rate, the number of randomly generated individuals

in metadynamincs and the optimal number of memory cells. The future work can refine the

CLONALG more and more for adaptation to these factors.

REFERENCES

[1] Bäck T., Fogel D., Mechalewicz Z., “evolutionary computation, basic algorithms and

operators”, institute of physics publishing, 2000.

[2] Bäck T. “The Interaction of Mutation Rate, Selection & Self-Adaptation Within a Genetic

Algorithm” in “Parallel Problem Solving from Nature @” eds. Manner & Manderick (Elsevier

Science) 1999; pp 85-94.

[3] Coley D. A.,“An introduction to genetic algorithms for scientists and engineers”, world

scientific publishing”, 2001.

[4] Dasgupta D., “Artificial Immune systems and their applications”, Springer, 1999.

[5] Dasgupta D., Attoh-Okine N., “Immunity-Based Systems:A Survey”, In the proceedings of the

IEEE International Conference on Systems, Man, and Cybernetics, Orlando,1997.

[6] De Castro L. N.,” Fundamentals of natural computing: basic concepts, algorithms, and

applications”. CRC Press LLC; 2006.

[7] De Castro L. N.”Natural computing”. In: Khosrow-Pour M, editor. Encyclopedia of information

science and technology, vol. IV. Idea Group Inc; 2005. p. 2080–4.

[8] De Castro L.N., Von Zuben F. J.,” Learning and optimization using the clonal selection

principle”. IEEE Transactions on Evolutionary Computation 2002;6(3):239–51.

[9] De Castro L.N. and Timmis J.,” Artificial Immune Systems A new computational

approach”, Springer, 2002.

[10] De Castro L. N., Von Zuben F. J., “The Clonal Selection Algorithm with Engineering

Applications”, proc. Of the genetic and evolutionary computation conference, workshop on

artificial immune systems and their applications 2000; pp. 36-37.

[11] De Castro, L. N. & Von Zuben, F. J. , “Artificial Immune Systems: Part I – Basic Theory and

Applications”, Technical Report – RT DCA 1999, pp. 89.

[12] Engelbrecht A. P., Computational Intelligence: an Introduction, John Wiley &Sons, Ltd,

southern gate, England, 2003.

[13] Forrest S., Hofmeyrt S. A., Somayajit A., “Computer Immunology”, University of New

Mexico Albuquerque, NM 87131-1386, March 21, 1996.

[14] Rennard J., “Genetic Algorithm Viewer: Demonstration of a Genetic Algorithm”, Ph.D.

May 2000 Goldberg D, idem, pp. 8 ss.

[15] Spears, W. M., “Adapting Crossover in Genetic Algorithms”. Artificial Intelligence Center

Internal Report #AIC-94-019, Naval Research Laboratory, Washington, DC 20375; 1994.