1/67 Institute of Information Science, Academia Sinica Research Assistant: Lin, Hsin-Nan 林信男
2/63 Outline Optimization Problems Optimization Techniques Genetic Algorithms Two brief examples NMR Backbone Assignment
3/63 Optimization Problems Definition: A computational problem in which the object is to find the best of all possible solutions. Classical optimization problems Traveling Salesman Problem Knapsack Problem Prisoner’s Dilemma
4/63 Search spaces and Fitness Landscapes Search Space: Some collection of candidate solutions to a problem Fitness Landscape: A representation of the space of all possible genotypes along with their fitness.
5/63 Example: Traveling Salesman Problem
6/63 Example: Traveling Salesman Problem Search space: n! No method can give the optimal solution except exhaustive searching for all possible solutions.
7/63 Optimization Techniques Heuristic methods Hill Climbing Simulated Annealing Genetic Algorithms Ant Colony optimization …..
8/63 Hill Climbing Iterative Improvement Start at a random configuration; repeatedly consider various moves; accept some & reject some. When you’re stuck, restart We must invent a moveset that describes what moves we will consider from any candidate solution
9/63 Genetic Algorithms Search technique based on the principle of evolution Survival of the fittest in Natural Selection Developed by John Holland, University of Michigan (1970’s) GAs use two basic processes from evolution Inheritance (passing of features from one generation to the next) Competition (survival of the fittest)
10/63 Basic Description of GAs Algorithm is started with a set of solutions (represented by chromosomes) called population. Solutions from one population are taken and used to form a new population. The new population (offspring) will be better than the old one (parent). Solutions which are selected to form new solutions are selected according to their fitness - the more suitable they are the more chances they have to reproduce.
11/63 Basic Genetic Algorithm
12/63 Operators of GA: Encoding The chromosome should in some way contain information about solution which it represents. The most used way of encoding is a binary string. Chromosome 1 Chromosome 2 Each bit in this string can represent some characteristic of the solution. Fixed length or variable length
13/63 Operators of GA: Selection Chromosomes are selected from the population to be parents to crossover. According to Darwin's evolution theory the best ones should survive and create new offspring. For example: roulette wheel selection, Boltzman selection, tournament selection, rank selection, steady state selection and some others.
14/63 Roulette Wheel Selection Parents are selected according to their fitness. The better the chromosomes are, the more chances to be selected they have.
15/63 Operators of GA: Crossover Crossover selects genes from parent chromosomes and creates a new offspring. Chromosome 1 | Chromosome 2 | Offspring 1 | Offspring 2 | “ | “ is the crossover point
16/63 Crossover Single point crossover: = Two point crossover: = Uniform crossover : = Arithmetic crossover: = (AND)
17/63 Operators of GA: Mutation Prevent falling all solutions in population into a local optimum of solved problem Mutation changes randomly the new offspring. Original offspring 1 Mutated offspring 1 Original offspring 2 Mutated offspring 2
18/63 Control Parameters Population Size and Generation Number GA has two control parameters: crossover rate (p c ) and mutation rate (p m ). p c (0.5~1.0): The higher the value of p c, the quicker are the new solutions introduced into the population. p m (0.005~0.05): Large values of p m transform the GA into a purely random search algorithm, while some mutations are required to prevent the premature convergence of the GA to suboptimal solutions.
19/63 How Do Genetic Algorithms Work? GAs work by discovering, and recombining good “building blocks” of solutions in a highly parallel fashion. Good solutions tend to be made up of good building blocks
20/63 An example of building block Password Guessing Chromosome 1: algehklppr (fitness: 3) Chromosome 2: bgrekithms (fitness: 5) Child: algehithms (fitness: 8)
21/63 Two Brief Examples The strategies for the Prisoner’s Dilemma Global Sequence Alignment
22/63 Prisoner’s Dilemma Two suspects, A and B, are arrested by the police. The police have insufficient evidence for a conviction, and, having separated both prisoners, visit each of them to offer the same deal:
23/63 The strategies If you suspect that your opponent is going to cooperate, then you should surely defect. defect, then you should defect too. The dilemma is If both players defect each gets a worse score than if they cooperate. Both players memorize the previous games Simple and good strategy: TIC FOR TAT Could the GA evolve better strategies ?
24/63 Encoding the Chromosomes If memory is one previous game CC (case 1) CD (case 2) DC (case 3) DD (case 4) Example of TIT FOR TAT If CC (case 1), then C If CD (case 2), then D If DC (case 3), then C If DD (case 4), then D Encoding the strategies for TIT FOR TAT : CDCD Encoding the strategies for “Loyal Guy”: CCCC
25/63 Encoding the Chromosomes If memory is the three previous games There are 64 possibilities for the previous three games: CC CC CC (case 1) CC CC CD (case 2) … DD DD DC (case 63) DD DD DD (case 64) Encoding a 64-letters string CDCCCDDCCCDD…CCCDDD Search space: 2 64 CDCC….CDD strategy for case 1 strategy for case 64
26/63 Evaluation Each individual is playing the game with several fixed strategies (coach) The environment is static. For each game, individual could get a payoff according to the payoff matrix.
27/63 Observation The highest-scoring strategies produced by the GA were designed to exploit specific weaknesses of the fixed strategies. It is not necessarily true that these high-scoring strategies would also score well in a different environment. Conclusion: GA is good at doing what evolution often does: developing highly specialized adaptations to specific characteristics of the environment.
28/63 Evaluation II Take any two individuals (chromosomes) to play the games iteratively for 100 times. Since we randomly generate the populations. The performance of a strategy depends very much on its environment (opponents). The environment is dynamic. The environments are evolving The results of evolution are like to the TIC FOR TAT
29/63 Global Sequence Alignment In bioinformatics, a sequence alignment is a way of arranging the primary sequences of DNA, RNA, or protein to identify regions of similarity that may be a consequence of functional, structural, or evolutionary relationships between the sequences.
30/63 Global Sequence Alignment A general global alignment technique is called the Needleman-Wunsch algorithm and is based on dynamic programming. To align two sequences in length m and n Time Complexity: O(kmn) Space Complexity: O(kmn) If m = 4000, n = 5000 It takes more than 100 MB
31/63 Global Sequence Alignment S1 = 【 ABC 】, S2 = 【 BDC 】 The alignments are variable in length ABC BDC AB-C -BDC AB-C- -BD-C ABC BDC
32/63 Global Sequence Alignment using a GA Encoding Chromosome Length: 2(m+n )(the maximum length of the alignment) The first m+n the alignment result of first sequence The second m+n the alignment result of second sequence Binary bit string 1: a character in the sequence 0: a gap
33/63 Encoding Example: S=“AAAC”, T=“AGC” chromosome= AAAC A-GC AAAC--- A-GC
34/63 Encoding Constraints The first half of m+n bit string must contain m 1’s Represents the m characters of the first sequence The second half of m+n bit sting must contain n 1’s Represents the n characters of the second sequence chromosome= AAAC--- A-GC
35/63 Evalution As the same as the dynamic programming method +2: if x i = y j -2: if x i ≠ y j -1: gap penality (if x i aligns a gap or y j aligns a gap )
36/63 Crossover Could not simply perform the normal crossover operation. It must satisfy the encoding constraints. P P child
37/63 An Extra Example for variable length of the chromosome encoding Genetic programming Evolving Lisp Programs Example: design a program to compute the orbital period P of a planet given its average distance A from the sun. Kepler’s Third Law: P 2 = cA 3 In FORTRAN: P = SQRT(A*A*A) In Lsip: (SQRT(*A(*AA)))
38/63 Encoding Choose a set of possible functions and terminals for the programs. Functions: {+, -, *, /, √} Terminal: A
39/63 Crossover
40/63 A GP demo on the web
41/63 A GA demo on the web e.ed.ac.uk/~rjt/ga.html e.ed.ac.uk/~rjt/ga.html
42/63 Other applications Classification Scheduling TSP Computer-Aided Design Composing music with GA.
43
44/63 Data Source: Three important experiments
45/63 HSQC Spectra HSQC peaks (1 chemical shifts for an amino acid) HNIntensity
46/63 CBCANH Spectra CBCANH peaks (4 chemical shifts for one amino acid) Ca (+), Cb (-) HNCIntensity
47/63 CBCA(CO)NH Spectra CBCA(CO)NH peaks (2 chemical shifts for one amino acid) HNCIntensity
48/63 Spin System Groups A spin system contains the chemical shifts of atoms within a residue. A spin system group contain two spin systems, one is from inter-residue and the other is from intra-residue. Inter-residue’s spin system, SS inter (i) Intra-residue’s spin system SS intra (i)
49/63 Chemical Shift Ranges of Amino Acids Some amino acids have particular chemical shift ranges, some share common chemical shift rages. Chemical shift ranges of Ala, CS(A) 14 < C < < C < 72
50/63 Ambiguities All 4 point experiments are mixed together All 2 point experiments are mixed together Each spin system can be mapped to several amino acids in the protein sequence False positives, false negatives
51/63 Ambiguous Spin System NHIntensity NHCIntensity
52/63 Candidate Lists MLKVARST Candidate list of R, CL(R) = { x | SS inter (x) is within CS(A) and SS intra (x) is within CS(R) } CL(L) = {1, 4, 17, 28, 33, 40, 52, 65} CL(K) = {2, 9, 11, 19, 21, 38, 45, 47, 57, 60, 79} CL(V) = {3, 8, 10, 12, 15, 18, 22, 29, 30, 32, 49, 51} …
53/63 Adjacency Lists SSGroup SSGroup SSGroup SSGroup 1 SSGroup 2 SSGroup 3 AL(SSGroup 1 ) Left: Right: 2 AL(SSGroup 2 ) Left:1 Right:3 AL(SSGroup 3 ) Left:2 Right:
54/63 Likes a puzzle game
55/63 Using a Genetic Algorithm Step1. Randomly select a position x Step2. Randomly select a SSGroup i from CL(x) Step3. Extend connected fragments from i to both sides by using adjacency lists until no more extension can be found. Step4. Repeat Step1~Step3 until all positions are assigned. x
56/63 Evaluate the fitness of each individual x Fitness(ch) = The number of connected pairs associate with their chemical shift differences. Two principles: 1. The more connected pairs it has, the higher score it gets. 2. The less chemical shift differences it has, the higher score it gets.
57/63 Crossover operatoin Inherit continuous connected fragments from parents. Parents Child
58/63 Mutation operations Once a position is going to mutate, the following positions will also mutate to produce a connected fragments. Child Mutant Mutation point
Experiment Design: Simulated Error Data False Positive 75% error data False Negative 50% error Linking Error Ca: Cb: Combined Error 59/63
60/63 Experiment Results The accuracy on two real dataset SBD:95.1% (FP: 67%) LBD:100% (FP: 48%) The average accuracy on perfect BMRB datasets (902 proteins)
61/63 Compare with MARS
62/63 Compare with PACES
63/63 Reference An Introduction to Genetic Algorithms Melanie Mitchell, The MIT Press Genetic Algorithm Ming-Feng Yeh GANA–A Genetic Algorithm for NMR Backbone Resonance Assignment Nucleic Acids Research, 2005, Vol. 33, No. 14
64/63 Programming Projects NMR Backbone Assignment Consecutive one’s