Hopfield Network Simulator

 

For the second installment of the Biologically Inspired Computation series, we’ll be taking a look at a simple neural network called a Hopfield Network.

Theory

From Wikipedia:

  A Hopfield net is a form of recurrent artificial neural network invented by John Hopfield. Hopfield nets serve as content-addressable memory systems with binary threshold units. They are guaranteed to converge to a local minimum, but convergence to one of the stored patterns is not guaranteed.

Basically, you can fine tune the weights (connections between neurons) in the network so as to ‘store’ data in the network. Imagine a square area, not necessarily flat, with a few deep potholes in it. Now, we start the network anywhere on this grid, and as the network progresses, it moves towards the nearest pothole. At the bottom of this pothole is a stored pattern, which is ‘remembered’ by the network. So given a corrupt image, the network can ‘remember’ the real image as it works its way to the sinkhole.

This simulation investigates how many patterns a network can hold versus the accuracy with which the network can recall. For example, a network with only 5 neurons simply cannot accurately recall many patterns, and this simulator allows you to investigate this relationship.

There are two PDFs included with the Xcode project, a theoretical overview and a detailed implementation guide. The simulator produces comma separated value (CSV) files, which can be opened in Numbers or Excel for graphing.

Get Started Now

Of interest to Cocoa programmers, this project makes use of NSOperation and NSOperation queue for quick and efficient multithreading.

Xcode Project (3.1 or later) | Leopard Only

Hopfield Network | Leopard Only

Hopfield Network on Wikipedia

Biologically Inspired Computation Series

Comments (0) Leave a Comment
  1. No comments yet.

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">
Trackbacks are closed.