Answer to Hopfield Net Example

This is the solution to this problem: given the weight matrix for a 5 node network with (0 1 1 0 1) and (1 0 1 0 1) as attractors, start at the state (1 1 1 1 1) and see where it goes. I'm using the weight matrix calculated on this page and using a fixed node updating order of 2, 4, 3, 5, 1, 2, 4, 3, 5, 1, etc.
  • update node 2 -
    V2in = (-2 0 0 0 0) . (1 1 1 1 1) = -2
    since -2 < 0, V2 = 0 (it changed)
  • update node 4 -
    V4in = (0 0 -2 0 -2) . (1 0 1 1 1) = -4
    since -4 < 0, V4 = 0 (it changed)
  • update node 3 -
    V3in = (0 0 0 -2 2) . (1 0 1 0 1) = 2
    since 2 >= 0, V3 = 1 (it didn't change)
  • update node 5 -
    V5in = (0 0 2 -2 0) . (1 0 1 0 1) = 2
    since 2 >= 0, V5 = 1 (it didn't change)
  • update node 1 -
    V1in = (0 -2 0 0 0) . (1 0 1 0 1) = 0
    since 0 >= 0, V1 = 1 (it didn't change)
  • update node 2 -
    V2in = (-2 0 0 0 0) . (1 0 1 0 1) = -2
    since -2 < 0, V2 = 0 (it didn't change)
  • update node 4 -
    V4in = (0 0 -2 0 -2) . (1 0 1 0 1) = -4
    since -4 < 0, V4 = 0 (it didn't change)
  • Now we've updated each node in the net without them changing, so we can stop.
Notice that with this node updating order, we went to the other attractor. Thus, if two patterns are very similar, the order in which you update the nodes can make a difference as to which attractor the net goes to.