Geometric Semantic Genetic Programming ~ Theory & Practice ~

Similar documents
Geometric Semantic Genetic Programming

One-Point Geometric Crossover

CS5401 FS2015 Exam 1 Key

Evolutionary Computation. Chao Lan

Using Genetic Algorithms to Solve the Box Stacking Problem

Geometric Crossover for Sets, Multisets and Partitions

Mutations for Permutations

Topological Crossover for the Permutation Representation

Abstract Geometric Crossover for the Permutation Representation

Geometric Crossover for Biological Sequences

Runtime Analysis of Mutation-Based Geometric Semantic Genetic Programming for Basis Functions Regression

Introduction to Evolutionary Computation

Outline of the module

Geometric Crossover for Sets, Multisets and Partitions

A motivated definition of exploitation and exploration

Review: Final Exam CPSC Artificial Intelligence Michael M. Richter

Evolutionary Algorithms

Surrogate Genetic Programming: A Semantic Aware Evolutionary Search

Instructor Biography. Geometry of Evolutionary Algorithms. Agenda. Objectives of the Tutorial. Alberto Moraglio University of Birmingham, UK

New Research in Nature Inspired Algorithms for Mobility Management in GSM Networks

Evolutionary design for the behaviour of cellular automaton-based complex systems

Non-deterministic Search techniques. Emma Hart

The Parallel Software Design Process. Parallel Software Design

Introduction to Genetic Algorithms. Genetic Algorithms

Genetic Programming. and its use for learning Concepts in Description Logics

Quotient Geometric Crossovers and Redundant Encodings

Genetic Programming Part 1

A Comparative Study of Linear Encoding in Genetic Programming

Introduction to Optimization

Heuristic Optimisation

Genetic Algorithms for Vision and Pattern Recognition

The Genetic Algorithm for finding the maxima of single-variable functions

Gen := 0. Create Initial Random Population. Termination Criterion Satisfied? Yes. Evaluate fitness of each individual in population.

Introduction to Genetic Algorithms. Based on Chapter 10 of Marsland Chapter 9 of Mitchell

Lecture 6: Genetic Algorithm. An Introduction to Meta-Heuristics, Produced by Qiangfu Zhao (Since 2012), All rights reserved

Semantically-Driven Search Techniques for Learning Boolean Program Trees

Genetic programming. Lecture Genetic Programming. LISP as a GP language. LISP structure. S-expressions

Introduction to Optimization

Outline. Motivation. Introduction of GAs. Genetic Algorithm 9/7/2017. Motivation Genetic algorithms An illustrative example Hypothesis space search

ARTIFICIAL INTELLIGENCE (CSCU9YE ) LECTURE 5: EVOLUTIONARY ALGORITHMS

Introduction to Genetic Algorithms

arxiv: v1 [cs.ne] 19 Jun 2017

An evolutionary annealing-simplex algorithm for global optimisation of water resource systems

Evolutionary Computation for Combinatorial Optimization

CHAPTER 5 ENERGY MANAGEMENT USING FUZZY GENETIC APPROACH IN WSN

Computational Intelligence

Evolutionary Computation Part 2

Reducing Graphic Conflict In Scale Reduced Maps Using A Genetic Algorithm

Genetic Algorithms. Kang Zheng Karl Schober

Geometric Semantic Genetic Programming for Financial Data

Genetic Programming Prof. Thomas Bäck Nat Evur ol al ut ic o om nar put y Aling go rg it roup hms Genetic Programming 1

Genetic Programming. Modern optimization methods 1

Genetic Algorithms Variations and Implementation Issues

Job Shop Scheduling Problem (JSSP) Genetic Algorithms Critical Block and DG distance Neighbourhood Search

Heuristic Optimisation

Heuristic Optimisation

Pre-requisite Material for Course Heuristics and Approximation Algorithms

GENETIC ALGORITHM with Hands-On exercise

Software Vulnerability

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

Previous Lecture Genetic Programming

Heuristic Optimisation

Genetic Programming. Charles Chilaka. Department of Computational Science Memorial University of Newfoundland

MIT 801. Machine Learning I. [Presented by Anna Bosman] 16 February 2018

LOGIC AND DISCRETE MATHEMATICS

Investigating the Application of Genetic Programming to Function Approximation

DOWNLOAD PDF BIG IDEAS MATH VERTICAL SHRINK OF A PARABOLA

Multi Expression Programming. Mihai Oltean

CS221: Algorithms and Data Structures. Asymptotic Analysis. Alan J. Hu (Borrowing slides from Steve Wolfman)

Genetic Programming. Czech Institute of Informatics, Robotics and Cybernetics CTU Prague.

Artificial Intelligence Application (Genetic Algorithm)

Counterexample-Driven Genetic Programming

Evolutionary Computation, 2018/2019 Programming assignment 3

A New Crossover Technique for Cartesian Genetic Programming

Neural Network Weight Selection Using Genetic Algorithms

The k-means Algorithm and Genetic Algorithm

Optimizing Flow Shop Sequencing Through Simulation Optimization Using Evolutionary Methods

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

INTRO TO ALGORITHMIC DESIGN

CONCEPT FORMATION AND DECISION TREE INDUCTION USING THE GENETIC PROGRAMMING PARADIGM

Genetic algorithms in computer aided design

x n+1 = x n f(x n) f (x n ), (1)

Artificial Intelligence

Project C: Genetic Algorithms

COMP4418 Knowledge Representation and Reasoning

A Memetic Genetic Program for Knowledge Discovery

Time Complexity Analysis of the Genetic Algorithm Clustering Method

Planning and Search. Genetic algorithms. Genetic algorithms 1

Lecture 8: Genetic Algorithms

Genetic Algorithms. Chapter 3

CSE 12 Abstract Syntax Trees

Gene Expression Programming. Czech Institute of Informatics, Robotics and Cybernetics CTU Prague

Analysis of recombinative algorithms on a non-separable building-block problem

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

Minnesota Academic Standards for Mathematics 2007

Pseudo-code for typical EA

Meta- Heuristic based Optimization Algorithms: A Comparative Study of Genetic Algorithm and Particle Swarm Optimization

MATHEMATICS Curriculum Grades 10 to 12

System of Systems Architecture Generation and Evaluation using Evolutionary Algorithms

Evolutionary Search in Machine Learning. Lutz Hamel Dept. of Computer Science & Statistics University of Rhode Island

Transcription:

Geometric Semantic Genetic Programming ~ Theory & Practice ~ Alberto Moraglio University of Exeter 25 April 2017 Poznan, Poland

2

Contents Evolutionary Algorithms & Genetic Programming Geometric Genetic Operators Semantics in Genetic Programming Geometric Semantic Genetic Programming Experiments Runtime Analysis Future Work 3

EVOLUTIONARY ALGORITHMS & GENETIC PROGRAMMING 4

Evolutionary Algorithms Replication Selection Mutation Evaluation

Representation & Operators CROSSOVER MUTATION Representations: Binary String Permutation Real Vector Variable-Length Sequence Tree Graph Anything fitting your problem 6

Genetic Programming Programs/functions are represented by parse trees Offspring are syntactically legal expressions Figure by Michael Lones 7

Genetic Programming Figure by Riccardo Poli 8

Fitness Landscape HARDER EASY HARDEST 9

GEOMETRIC SEARCH OPERATORS 10

Balls & Segments } ), ( { ) ; ( r y x d S y r x B Î = )}, ( ), ( ), ( { ] ; [ y x d y z d z x d S z y x = + Î =

Squared Balls & Chunky Segments Balls 100 101 000 001 110 111 3 3 010 011 B(000; 1) Hamming space 3 B((3, 3); 1) Euclidean space Line segments 3 B((3, 3); 1) Manhattan space 100 101 000 001 2 2 110 111 1 1 010 011 1 3 1 3 [000; 011] = [001; 010] 2 geodesics Hamming space [(1, 1); (3, 2)] 1 geodesic Euclidean space [(1, 1); (3, 2)] = [(1, 2); (3, 1)] infinitely many geodesics Manhattan space 12

Geometric Crossover & Mutation Geometric crossover: a recombination operator is a geometric crossover under the metric d if all its offspring are in the d-metric segment between its parents. Geometric mutation: a mutation operator is a r-geometric mutation under the metric d if all its offspring are in the d-ball of radius r centred in the parent. 13

Example of Geometric Mutation Traditional one-point mutation is 1-geometric under Hamming distance. 100 101 000 001 110 111 010 011 14 Neighbourhood structure naturally associated with the shortest path distance.

Example of Geometric Crossover Geometric crossover: offspring are in a segment between parents for some distance. The traditional crossover is geometric under the Hamming distance. A B X 0 1 0 1 1 1 1 0 0 0 1 1 1 1 1 A 2 X 1 3 B H(A,X) + H(X,B) = H(A,B) 15

Significance of Geometric View Unification Across Representations Simple Landscape for Crossover Crossover Principled Design Principled Generalisation of Search Algorithms General Theory Across Representations 16

SEMANTICS IN GENETIC PROGRAMMING 17

Traditional Genetic Programming Search operators produce offspring by blind syntactic manipulation of parent parse trees, regardless of their semantics Crossover preserves syntactic well-formedness, but why should it work at all? 18

What is semantics of a program? The semantics of a program can be directly and uniquely represented by enumerating all input-output pairs making up the computed function X1 X2 X3 Output 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 19

Semantic operators Semantic search operators: operators that act on the syntax of the programs but that guarantee that some semantic criterion holds (e.g., semantic mutation: offspring are semantically similar to parents) Semantic Mutation Semantics Induced Mutation Semantics 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 20

GEOMETRIC SEMANTIC GENETIC PROGRAMMING 21

Fitness in GP Aim: we want to find a function that scores perfectly on a given set of input-output examples (test cases) Error of a program: number of mismatches on the test cases Fitness as distance: the error of a program can be interpreted as the distance of the output vector of the program to the target output vector Distance functions: Hamming distance for Boolean outputs, Euclidean distance for continuous outputs 22

Semantic Distance & Operators The semantic distance between two functions is the distance of their output vectors measured with the distance function used in the definition of the fitness function Semantic geometric operators are geometric operators defined on the metric space of functions endowed with the semantic distance 23

Semantic Fitness Landscape The fitness landscape seen by GP with semantic geometric operators is always a cone landscape by definition (unimodal with a linear gradient) which GP can easily optimise! Fitness Semantic Space 24

GREAT BUT CAN WE REALLY CONSTRUCT GEOMETRIC SEMANTIC OPERATORS? 25

Geometric Semantic Operators Construction By approximation: Trial & Error is wasteful Offspring do not conform exactly to the semantic requirement By direct construction: Is it possible to find search operators that operate on syntax but that are guaranteed to respect geometric semantic criteria by direct construction? Due to the complexity of genotype-phenotype map in GP (Krawiec & Lichocki 2009) hypothesized that designing a crossover operator with such a guarantee is in general impossible. A pessimist? No, the established view until then... 26

Geometric Semantic Crossover for Boolean Expressions T3 = T1, T2: parent trees TR: random tree 27

Claim The output vector of the offspring T3 is in the Hamming segment between the output vectors of its parent trees T1 and T2 for any tree TR 28

Example: parity problem 3-parity problem: we want to find a function P(X1,X2,X3) that returns 1 when an odd number of input variables is 1, 0 otherwise. Error = HD(Y,O) = 5 O= 0 1 0 1 0 1 1 1 29

Example: tree crossover T1 = substitution & simplification TR = T3 = T2 = 30

Example: output vector crossover The output vector of TR acts as a crossover mask to recombine the output vectors of T1 and T2 to produce the output vector T3. This is a geometric crossover on the semantic distance: output vector of T3 is in the Hamming segment between the output vectors of T1 and T2. 31

Semantic Crossover for Arithmetic Expressions Function co-domain: real Output vectors: real vectors T3 = Semantic distance = Manhattan CR = random function with codomain [0,1] Semantic distance = Euclidean CR = random real in [0,1] 32

Semantic Crossover for Programs Function co-domain: symbol Output vectors: symbol string T3 = Semantic distance = Hamming RC = random function with boolean co-domain (i.e., random condition function of the inputs) 33

Remark 1: Domain-Specific Unlike traditional syntactic operators which are of general applicability, semantic operators are domain-specific But there is a systematic way to derive them for any domain 34

Remark 2: Simplification Offspring grows in size very quickly, as the size of the offspring is larger than the sum of the sizes of its parents! To keep the size manageable we need to simplify the offspring without changing the computed function: Boolean expressions: boolean simplification Math Formulas: algebraic simplification Programs: simplification by formal methods 35

Remark 3: syntax does not matter! The offspring is defined purely functionally, independently from how the parent functions and itself are actually represented (e.g., trees) The genotype representation does not matter: solution can be represented using any genotype structure (trees, graphs, sequences)/language (java, lisp, prolog) as long as the semantic operators can be described in that language 36

Semantic Mutations It is possible to derive geometric semantic mutation operators. They also have very simple forms for Boolean, Arithmetic and Program domains. 37

EXPERIMENTS 38

Boolean Problems 39

Polynomial Regression Problems 40

Classification Problems 41

RUNTIME ANALYSIS OF MUTATION-BASED GSGP 42

Research question How can we do provably good design of search operators for genetic programming? Runtime analysis Traditional GP is hard to analyse Geometric Semantic GP is easy to analyse 43

Runtime Analysis Rigorous analytical formula of the expected optimisation time of the search algorithm A on the problem class P (on the worst instance) for increasing size n of the problem 44

Runtime Analysis (example) Algorithm: stochastic hill-climber (SHC) i.e., flip a bit of the current solution and accept new solution if it is better than current Problem class: onemax i.e., sum of ones in the bit string to maximise; the problem size is the string size Expected optimisation time: O(n log n) by coupon collector argument This result generalises to onemax with an unknown target string, i.e., to any cone landscape on binary strings 45

Semantic Mutation (syntactic search & semantic effect) Semantic Mutation Semantics Induced Mutation Semantics 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 46

Search Equivalence Semantic GP search at a syntax level on any problem Semantics Traditional GA search on output vectors on onemax The search outputs a tree (i.e., a function), but the runtime analysis can be done on the GA! 47

Forcing Point Mutation (not Bit Flip) M =!X1 ^ X2 ^!X3 P = P v M X1 X2 X3 Output 0 0 0 0 0 0 1 1 0 1 0 0 à 1 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 48

Exponential Chromosome Size 49

Polynomial Training Set 50

Incomplete Minterms 51

Probability of Success 52

How fast is that? 53

Lesson from Theory Rigorous runtime analysis of GSGP on general classes of problems is possible as the landscape is always a cone (equivalent to a GA searching Onemax for Boolean functions) There are issues with GSGP which require careful design of semantic operators to obtain efficient search. Theory can guide the design of provably good semantic operators (FBM) and suggests optimal parameter Runtime analysis of GSGP with several other mutation operators for Boolean, arithmetic and classification domains have been done producing refined provably good semantic search operators 54

CONCLUSIONS 55

Summary Traditional GP does syntactic search, ignoring the meaning of the programs Previous attempts to semantics: syntactic search + rejection if not meeting semantic requirements (wasteful) Is it possible to search the semantic space directly? GP with geometric semantic operators always sees a cone landscape that is easy to search Geometric semantic operators for Boolean, Arithmetic and Program domains have been derived Simplification is required as offspring grow fast Experiments shows GSGP much better than traditional GP Time-complexity analysis of GSGP proves it finds the optimum quickly 56

Current & Future Work Methods to deal with offspring growth, i.e., simplification Derivation of semantic operators for more complex domain (e.g., recursive programs) using formal methods Derive operators that can find functions/programs that generalise provably well on unseen test cases (PAClearning) Real-world applications of GSGP Several researchers are trying variations and extensions J 57