HON 207: Project 3

Detecting symmetry with a neural network

Objectives

In this project, you will gain "hands on" experience with neural networks. You will create a network, give it training and test data, train it, and report your results. You will also explore different variations of the basic network to see how they affect the network's learning.

Background

Neural networks are modeled on the "hardware" and behavior of our own brains. They learn by adjusting weights between nodes which simulate the strength of connections between neurons (or clusters of neurons). One simple task for neural networks was reported in "Learning Representations by Back-Propagating Errors", by Rumelhart, Hinton, and Williams in Nature (1986). In this task, a string of six digits (0 or 1) is judged for "mirror symmetry". An output of 1 indicates that the first three digits, when reversed, match the last three digits. An output of 0, indicates that they do not match.

There are a number of different neural net simulators available, including QuikNet, and LENS. For this project, you will use a java-based simulator from the University of British Columbia that runs as an applet through a browser or it can be downloaded. To access this applet, follow the "Neural Networks" link on this page, and then click on "Start Applet". (It may take a little while to load.) (If you have time, check out the other applications that they have available.)

What to do

First, go to the CIspace web page, locate the Neural network application, and start the applet. To get a feel for how the system works, you should create a "starter network":
  1. The Neural Applet starts in "Create" mode, with "Create Node" the default action.
  2. Click somewhere on the canvas (large empty rectangle) to create a node. Select OK to choose the default parameters for the node.
  3. Create several nodes in this manner.
  4. Click on the "Create Edge" tool.
  5. Click on a node that the edge (link) will go from.
  6. Click on a node that the edge (link) will go to.
  7. Node shapes change automatically to indicate that they are input (diamond), hidden (oval), or output (rectangle) nodes.
The steps above will give you a complete neural net EXCEPT for the training data. It is possible to create training data manually using the View/Edit Examples tool (but see the notes below about pasting data into a file). Traditionally, a small portion (10% or so) of the training data is reserved (i.e. kept out of the training process), in order to keep the network from "memorizing the training set" and to have some additional items to test the network's generalization. (One standard method for ensuring that a network learns well is called N-fold cross-validition. In this technique, a different 1/Nth of the training data is removed for each of N rounds of learning, and the performance is calculated based on the removed items. But you are not required to do this in this project.)

Setting up and training the basic network

  1. Create a network (including nodes and edges) that follows the architecture of the Rumelhart et al example.
  2. Select File > Save graph to save the graph to a file.
  3. Edit the graph to add training data from this file between the line that says:
      	<!-- Examples -->
    
    and the line that says:
    </EXAMPLES>
    
  4. Save the file.
  5. In the Neural Applet, use Load from File to load your graph with the training data. Note: the applet automatically moves things around, so it won't look exactly like it did when you saved it, but the critical info should be the same.
  6. Get into Solve mode if you're not there already by clicking on "Solve".
  7. Modify the training set as desired according to the discussion above using View/Edit Examples.
  8. Click Randomize Parameters to give an initial weight to each edge.
  9. Train by clicking Step to Target Error
  10. Click on Show plot (even while training). Training should stop when the error on the Training set gets below 0.1.
  11. If it doesn't stop by 2000 steps or so, or if the error on the training set gets completely flat, it's probably not going to find a solution. Just stop in, randomize the parameters again, and start it over. It may take quite a few trials until it successfully solves the problem. If it doesn't solve it within 10 trials, you may need to adjust the training set. You can also double check that your network is set up correctly, including node numbers and edge directions.
After training:

Advanced experimentation

After you get the network to learn a solution to the basic problem, you should experiment with it to explore its limitations. For example, you could: Do any of these modifications make the network learn better? worse?

Reflection questions

Think about these questions during and after the training of your network(s), and address them in your discussion section:

What to hand in

Your team should submit one report that describes your experience and your thoughts about it. Your report should include these sections:

There is no specific requirement on the length of the paper. It should be long enough to make it clear to me what you were doing and what you thought about, but please don't confuse quantity with quality. In other words, it doesn't need to be long to be good.

Grading

This project is worth 10 points. It will be graded on how well you follow the instructions above, on the depth of your insights, and on your demonstrated understanding of the mechanics of neural networks. My emphasis will be on the discussion section, so you should be sure to focus your energies there.
Last modified: Mon Nov 9 17:03:27 CST 2009