How to train your neural network using a genetic algorithm

Artificial neural networks can be used to solve a wide variety of tasks that are hard to solve using rule-based programming. A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems.

xkcd: Genetic Algorithms

xkcd: Genetic Algorithms

Working with rgho to basically implement what’s described in the following paper for our project babelbrain: a machine learning algorithm to classify language of a given input.

Training Feedforward Neural Networks Using Genetic Algorithms

pdf
David J. Montana and Lawrence Davis BBN Systems and Technologies
Corp. 10 Mouiton St.
Cambridge, MA 02138

Abstract

Multilayered feedforward neural networks possess a number of properties which make them particularly suited to complex pattern classification problems. However, their application to some real- world problems has been hampered by the lack of a training algorithm which reliably finds a nearly globally optimal set of weights in a relatively short time. Genetic algorithms are a class of optimization procedures which are good at exploring a large and complex space in an intelligent way to find values close to the global optimum. Hence, they are well suited to the problem of training feedforward networks. In this paper, we describe a set of experiments performed on data from a sonar image classification problem. These experiments both 1) illustrate the improvements gained by using a genetic algorithm rather than backpropagation and 2) chronicle the evolution of the performance of the genetic algorithm as we added more and more domain-specific knowledge into it.

Neural networks

neural network diag

A simple feedforward neural network, with one input layer consisting of four neurons, one hidden layer consisting of three neurons, and one output layer consisting of four neurons. The number on each neuron represents its activation threshold: it will only fire if it receives at least that many inputs. The diagram shows the neural network being presented with an input string and shows how activation spreads forward through the network to produce an output.

Plan A: implement the machine learning optimization using a Genetic Algorithm

Genetic Algorithms

Generations evolve via reproduction and crossover

crossover

Genetic Algorithm uses crossover

The x best Genomes are directly transferred to the next generation.

genetic algorithm diag

Evolution flow of a genetic algorithm

If this doesn’t wok…

Plan B: implement the machine learning optimization using Back-Propagation, which is a standard algorithm for training neural networks

This is going to be really hard, but we’re optimistic we can code this up. Stayed tuned.

Leave a comment