Tuesday, May 02, 2006

Surprisingly Simple Solutions

I revisited my Non-Markov Tic Tac Toe experiment (see previous post), but this time using what I thought to be an impossibly simple architecture; only 2 nodes in the hidden layer (note: I am using Sinusoidal rather than Sigmoid activation functions). Amazingly, I observed it reaching a 43% level of fitness (64% was the highest I had observed before although I have been unable to find that level of fitness on subsequent runs), and it was able to find this solution rather rapidly compared to previous tests.

This astonished me because I would not have thought that such complex behavior could be generated by such a small set of parameters. This implies to me that the billions of neurons in the human brain are not really necessary for creating complex behaviors; I suspect that instead they are primarily used for statistical feature detection and also for memory formation and retrieval. This may make me sound a bit like Wolfram, although I think he is still oversimplifying human intelligence.

This also suggests that humans do not possess much in the way of intuitions regarding algorithms created by the process of evolution (again, hints of Wolfram). This sentinment is echoed by Danny Hillis in his latest book, where he talks about the sorting algorithms that his Connection-Machine discovered, and his inability to understand them analytically. To me this is a hopeful state of affairs, because it may mean that many things that we currently consider to be 'hard' problems may not be hard at all, and may in fact possess solutions that are rather easy for evolutionary methods to discover.

Thursday, March 30, 2006

A brief summary of my recent work

Here is a list of some of the tasks I have recently tested my system against:


  • N-bit Parity Classification (up to 10 bits)

  • Palindrome Classification (arbitrary length)

  • Embedded Reber Grammar

  • Temporal XOR

  • Shift Register (delay of N up to 3)

  • Pima Indian Diabetes Dataset classification

  • Dow Jones Industrial Average time series prediction

  • Controller for a Tic Tac Toe player against a semi-skilled opponent

  • Triple Sines time series prediction (see EVOLINO: Schmidhuber et al)

Tuesday, January 17, 2006

Non-Markov Tic-Tac-Toe Experiment



EXPERIMENTAL SETUP

1) The Neural Network (NN) always plays X; O is played by a hand-crafted computer opponent.
2) The computer opponent is of intermediate skill, it is not perfect, but can only be beaten if it is "forked" by X.
3) The NN is recurrent, and has multiple time steps to decide on a given move.
4) The NN controls a "focus of attention" (FOA) that can be moved around the TTT grid by using the following actions: turn right, turn left, move forward.
5) The FOA allows the NN to "see" only a single cell at a time. The input to the NN is 0 for an empty space, 1 for X, and -1 for O.
6) At the beginning of each turn the FOA of the NN is placed in the center of the grid facing a randomly selected direction (north, east, south, or west).
7) The NN is given no hint as to its current location or the direction it is facing. It must build up an internal representation based on what it has already seen through the FOA.
8) If the NN inadvertantly attempts to move the FOA out of the boundaries of the grid, it automatically forfits the game.
9) The NN selects its move by moving the FOA to a given cell and then performing a "halt" action. This "halt" action must be taken within the specified time-limit (50) or else it automatically forfits the game.
10) The move selected by the NN after halting must be legal (i.e. must be on an empty cell). If the cell is already occupied then it automatically forfits the game.
11) Feedback is given after playing a set of games (1000). Fitness is computed as the sum of the number of games won in the trial set. No credit is given for draws, losses, or premature forfits.


As you can see, these are rather Draconian measures. To summarize: in order to be successful, the NN is expected to learn to move around its "focus of attention" that only allows it to see a single location at a time while being careful not to accidentally move outside of boundaries it has not been informed of, create an internal representation of what it has already seen, use that information to navigate successfully to an empty spot, announce that it is halting, and do all of this repeatedly for each and every one of its turns in such a way that it manages to beat a pre-programmed opponent that can never be beaten without being forked! (Remember, it receives absolutely no credit for a draw).

RESULTS

So far, after a few hours of CPU time, it has managed to discover a solution that can win 64% of the games it plays, even under these drastically difficult conditions!!

Tuesday, January 03, 2006

Traversing Neutral Networks

THE IDEA

I was doing some research over my christmas break and stumbled upon a concept called Neutral Networks (which sounds rediculously close to Neural Networks, but oh well).

Basically the idea is that during the course of evolution, many point mutations made to an organism's genome are neither positive nor negative with respect to it's reproductive fitness; they are "neutral". A good example of this is the many-to-one mapping for encoding various amino-acids from codons.

Presumably there are many neutral mutations that are often connected by a single point mutation, thus forming "Neutral Networks" embedded in the fitness landscape. The theory is that this is advantageous because it allows the evolving organism to escape local-optima by horizontally sliding (whatever exactly "horizontal" means in N-dimensions) along flat plateaus of homogeneous fitness until an even higher point is stumbled upon. Much research on this is being done at Sussex University.

IMPLICATIONS

So, if this is true, then one would assume that evolution could occur even with very low rates of mutation... there would be no need to "jump" off of local optima.

I tested this hypothesis by altering the mutation function in my software. Rather than applying Gaussian or Cauchy distributed mutation (as is standardly done in Evolutionary Programming and Fast Evolutionary Programming, respectively), I chose to use a small, fixed-size constant that would either be added to or subtracted from each linkweight of my Neural Network with equal probability. The results have been nice; this new (and considerably simpler) mutation strategy significantly outperforms the previous method I was using.

However, I did find that it was not feasible to use arbitrarily small constants because: 1) evolution would be too slow, and 2) the changes in fitness need to be larger than the "thermal noise" inherent in the evaluation function (note: I am not working with fixed training sets, therefore the feedback function is a bit noisy).

TWO TYPES OF NEUTRAL NETWORK SYMMETRY

This concept was not mentioned in the literature, but I realized that there are actually two distinct forms of Neutral Networks; one nested inside the other. Basically there are two forms of symmetry that can lead to Neutral Networks.

The first form is symmetry of summed fitness; two different behaviors may be equally fit although for differing reasons. The second form is symmetry of representation; two internally different systems (e.g. Neural Networks) can lead to the same external behavior, which then necessarily implies equal fitness.

I believe that biological systems make use of both forms of Neutral-Network symmetry during the evolutionary process.

Friday, December 16, 2005

A little noise is a good thing

Recently I have started testing my Neural Network software against some real world data sets. The first dataset I tested against was the Pima Indian Diabetes dataset, and my system was able to achieve a fairly good training error (19%), but it did not generalize as well to the test set.

Many neuro-evolutionary algorithms (such as Covenet) use regularization terms in order to minimize the structural resources of the network in order to improve generalization. Presumably, the smaller the number of nodes and/or linkweights, the lower the effective VC-dimension.

However, introducing dynamic network topology adds a host of programmatic complexities and design decisions that I would like to avoid. So I thought of an alternative way to "stress" the resources of the network: random noise.

My hypothesis is that by injecting random noise into the operation of the neural network, it will force the network to form a more distributed and robust internal representation, because it will not be able to be too dependent on the activation of any single element. I also suspect that because functionality cannot become too dependent on any single element, the network will have more flexibility in terms of being able to steadily alter its functionality bit by bit; hence it may be more continuous and "evolvable".

My initial experiments with this approach have met with success; I've found that generalization generally improves substantially when noise is injected into the training process.

Additionally, if, after training, the noise is removed from the processing of the network, its performance further improves. Doing this it has managed to reach levels of generalization that were previously unattainable without the addition of noise.

Tuesday, October 25, 2005

Backtracking seems essential for good optimization

Recently I've done some optimization experiments using two different forms of optimization algorithms: those that allow for a bit of "backtracking" (i.e. sometimes allowing transitions to a state of lower fitness), and those that do not (i.e. "Hill-Climbing").

What I've found is that it is overwhelmingly the case that optimization methods that make use of backtracking allow for the discovery of superior solutions to those that do not.

Unfortunately, this does not explain to me WHY this is the case! I have started to postulate some toy models of the fitness landscape that could conceivably explain these observations.

Saturday, October 01, 2005

To leap further or to retrace one's steps?

This entry is simply the description of a general question I've been grappling with. I haven't come to any firm conclusions about an answer just yet...

I am, as always, pondering local minima in the fitness landscape and trying to understand what an optimal way of dealing with them would be. As I currently see it there are generally two different ways to proceed when one reaches a point at which improvement becomes difficult:

1) Keep trying random variations on the current best solution until another solution of equal or better utility is found, possibly increasing the magnitude of the random variations over time in order to sample a progressively wider neighborhood.
2) Save off the current best solution, and then allow occasional "degeneration" or backtracking; in other words, allow for solutions of lesser quality as a temporary measure in the hopes that another path can be found to a point of even higher utility.

The first method is what is known as Hill-Climbing in the literature, and is generally frowned upon; the argument being that it is prone to being trapped in local minima. However, this argument rests upon the assumption of a limited mutation size. Actually, if one allows for scale-free mutation, such as can be afforded by applying the Cauchy distribution, then technically every point on the fitness landscape can be eventually reached, thus even a Hill-Climbing technique can be completely ergodic (i.e. will be guaranteed to sample the entire function space eventually). Another trivial method of insuring maximal coverage of the fitness landscape is a strategy called Random-Restart Hill Climbing, which simply restarts the search at a randomly selected new location once a local minima is encountered. The actual effectiveness of this strategy is debatable. I have seen this method inconsistently evaluated in the literature; some claim it is effective; others not.

The second method encompasses many more standard optimization techniques, including Evolutionary Computation and Simulated Annealing. Simulated Annealing explicitly defines the probability that a given change of a lower utility will be accepted (Boltzmann acceptance criteria) according to a temperature parameter which is reduced with time according to a schedule. Evolutionary Computation encompasses several population-based methods which implicitly allow for varying degrees degenerate solutions to survive within the population based on the selective pressure applyed by the specifics of the particular EC algorithm. Essentially anything that slows down the spread of fit solutions amongst the population will allow solutions of lower fitness a greater probability of survival, and hence a longer time to possibly stumble on a better solution. One way to do this is to break the population up into smaller subpopulations which are only loosely coupled with eachother; this particular concept is known as Demes and has been used with great success in a variety of EC algorithms.

Note that both of these methods suffer from the classic dilema of Exploration versus Exploitation.

Which of these two methods described above should, in general, be more effective, and WHY? (Perhaps neither, according to the No-free-lunch theorem)