Presentation is loading. Please wait.

Presentation is loading. Please wait.

1/67 Institute of Information Science, Academia Sinica Research Assistant: Lin, Hsin-Nan 林信男.

Similar presentations


Presentation on theme: "1/67 Institute of Information Science, Academia Sinica Research Assistant: Lin, Hsin-Nan 林信男."— Presentation transcript:

1 1/67 Institute of Information Science, Academia Sinica Research Assistant: Lin, Hsin-Nan 林信男

2 2/63 Outline Optimization Problems Optimization Techniques Genetic Algorithms Two brief examples NMR Backbone Assignment

3 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 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 5/63 Example: Traveling Salesman Problem

6 6/63 Example: Traveling Salesman Problem Search space: n! No method can give the optimal solution except exhaustive searching for all possible solutions.

7 7/63 Optimization Techniques Heuristic methods Hill Climbing Simulated Annealing Genetic Algorithms Ant Colony optimization …..

8 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 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 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 11/63 Basic Genetic Algorithm

12 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  1101100100110110 Chromosome 2  1101111000011110 Each bit in this string can represent some characteristic of the solution. Fixed length or variable length

13 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 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 15/63 Operators of GA: Crossover Crossover selects genes from parent chromosomes and creates a new offspring. Chromosome 1  11011 | 00100110110 Chromosome 2  11000 | 11000011110 Offspring 1  11011 | 11000011110 Offspring 2  11000 | 00100110110 “ | “ is the crossover point

16 16/63 Crossover Single point crossover: 11001011+11011111 = 11001111 Two point crossover: 11001011 + 11011111 = 11011111 Uniform crossover : 11001011 + 11011101 = 11011111 Arithmetic crossover: 11001011 + 11011111 = 11001001 (AND)

17 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  1101111000011110 Mutated offspring 1  1100111000011110 Original offspring 2  1101100100110110 Mutated offspring 2  1101101100110110

18 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 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 20/63 An example of building block Password Guessing Chromosome 1: algehklppr (fitness: 3) Chromosome 2: bgrekithms (fitness: 5) Child: algehithms (fitness: 8)

21 21/63 Two Brief Examples The strategies for the Prisoner’s Dilemma Global Sequence Alignment

22 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 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 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 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 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 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 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 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 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 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 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 33/63 Encoding Example: S=“AAAC”, T=“AGC” chromosome=11110001011000 AAAC A-GC 1111000 AAAC--- A-GC--- 1011000

34 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=11110001011000 1111000 AAAC--- A-GC--- 1011000

35 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 36/63 Crossover Could not simply perform the normal crossover operation. It must satisfy the encoding constraints. P111110001011000 P210111001001100 child11111001001100 11110001001100

37 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 38/63 Encoding Choose a set of possible functions and terminals for the programs. Functions: {+, -, *, /, √} Terminal: A

39 39/63 Crossover

40 40/63 A GP demo on the web http://alphard.ethz.ch/gerber/approx/default.html

41 41/63 A GA demo on the web http://www.see.ed.ac.uk/~rjt/ga.html?http://oldeee.se e.ed.ac.uk/~rjt/ga.html http://www.see.ed.ac.uk/~rjt/ga.html?http://oldeee.se e.ed.ac.uk/~rjt/ga.html

42 42/63 Other applications Classification Scheduling TSP http://www.ads.tuwien.ac.at/raidl/tspga/TSPGA.html Computer-Aided Design Composing music with GA.

43 43

44 44/63 Data Source: Three important experiments

45 45/63 HSQC Spectra HSQC peaks (1 chemical shifts for an amino acid) HNIntensity 8.109118.6065920032

46 46/63 CBCANH Spectra CBCANH peaks (4 chemical shifts for one amino acid) Ca (+), Cb (-) HNCIntensity 8.116118.2516.3779238811 8.109118.6036.52-65920032 8.117118.9061.58-51223894 8.119117.2557.42109928374

47 47/63 CBCA(CO)NH Spectra CBCA(CO)NH peaks (2 chemical shifts for one amino acid) HNCIntensity 8.116118.2516.3779238811 8.109118.6036.5265920032

48 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 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   < 24 15 < C  < 72

50 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 51/63 Ambiguous Spin System NHIntensity 106.98.87423879 106.98.87524522NHCIntensity106.918.8559.7235673 106.928.8654.93346234 106.918.8661.5432432 106.918.8540.31-335759 106.928.8630.5-483759

52 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 53/63 Adjacency Lists SSGroup 2 116.508.25 51.9019.400 57.5063.301 SSGroup 3 111.207.75 57.5063.30 0 34.2042.901 SSGroup 1 122.308.15 44.3041.800 51.9019.40 1 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 54/63 Likes a puzzle game

55 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 11 51 18 25 43 29 17

56 56/63 Evaluate the fitness of each individual x 11 51 18 25 43 29 17 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 57/63 Crossover operatoin Inherit continuous connected fragments from parents. Parents Child

58 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

59 Experiment Design: Simulated Error Data False Positive 75% error data False Negative 50% error Linking Error Ca: +- 0.2 Cb: +- 0.4 Combined Error 59/63

60 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 61/63 Compare with MARS

62 62/63 Compare with PACES

63 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 64/63 Programming Projects NMR Backbone Assignment Consecutive one’s


Download ppt "1/67 Institute of Information Science, Academia Sinica Research Assistant: Lin, Hsin-Nan 林信男."

Similar presentations


Ads by Google