🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

The adventures of Mr Hopfield and his energy landscape

Started by
13 comments, last by Mr Nonsense 21 years, 9 months ago
I''m having problems with a simple hopfield network. Basically, I''m storing 3 patterns in a network of 63 neurons. The network will converge to patterns 1 and 2, but will never converge to pattern 3. Even if I set the initial state of the network identical to pattern 3, the network will always converge to pattern 2. I''m aware of the problems of storage capacity in a hopfield network. Using certain formulas you can approximate that a hopfield network with 63 neurons should be able to hold and recall upto 10 patterns. So the problem is, why is my network not able to hold and recall more than 2 patterns? I''m trying to visualise the energy landscape of the network to try and understand why it doesn''t work. It''s my understanding that local minima on the energy surface represent stored patterns. Since a hopfield network will reduce it''s energy on every iteration, it should get stuck in a local minimum and thus converge on a stored pattern. So why is it that when the network''s initial state is the same as a stored pattern it converges on another pattern? I''m assuming the reason has something to do with how similar the patterns are. Is it possible that if two patterns are similar then the local minimum of one pattern can erase the local minimum of another pattern? Does anybody have any ideas? Can anybody help me? Have I finally lost it? Thanks
Advertisement

Well, I don''t know the answer to your problem, because I did EXACTLY the same experiment as you did (1,2,3 in a 63 neuron hopfield network). And I also got EXACTLY the same problem (always converging to 2), even if I set 3 initially.

I must have looked over my code a thousend times, but it was correct. So I''m looking forward to the post solving this problem.

Later,

Edo
Edo
You must have worked from the same book as me

I have consulted other sources on hopfield networks, so it''s not a case of a misprint in a textbook.
Have you tried implementing the task in a Bidirectional Associative Memory model to see if you get the same problem. If you do, then it''s an issue with the problem space, not the implementation. Off the top of my head I could not offer any specific answers although I would be happy to take a look at it in more detail if you cannot find a solution. Which book did the problem come from?

Cheers,

Timkin
How are you training the network?



ai-junkie.com
I''ve been doing some experimenting. The problem definitely has something to do with how similar the patterns are. I could successfully recall all three patterns if I made them very different to each other.

I was intending to implement a BAM, but if they suffer from the same limitations as a hopfield network then I don''t think I''ll bother.

I''m incredibly curious. What possible use could a hopfield network have given it''s crippling limitations? Has anybody actually successfully used a hopfield network? Are they just something people stick in books for the sake of being complete? And why does buttered toast always fall buttered side down?

Cheers
I've never used a hopfield network. I just know the theory. I have seen a paper that uses them to create a map of an agent's environment to aid in collision detection. It was not very practical though.

As you probably know, cats always land feet first. I have it on good authority that if you glue a slice of toast to the stomach of a cat (butter side to stomach) and throw it in the air, it will hover. I believe the Japanese are using this technology to create a new type of frictionless monorail.



ai-junkie.com

[edited by - fup on October 7, 2002 10:36:36 AM]
From my understanding, Hopfield networks are generally included for historical reasons and because they are (generally) a good starting point for certain memory models. The BAM is more widely used - since it too performs heteroassociation - and the Hopfield is just a specific case of the BAM. I''ve been lead to believe that the BAM is more reliable than the Hopfield, but I haven''t verified this for myself.

As to the toast question it''s really an issue of minimum entropy! With buttered side up there is a rougher surface meeting the oncoming air (the unbuttered side) and thus more stirring of the air molecules, thus a higher entropy state. The universe doesn''t like higher entropy states because it''s being forced to accept them every day! So, the universe gets its own back by flipping your toast, giving a smoother, oily side to face the air stream thus reducing turbulence and minimising the entropy change. Oh, that and the fact that carpet likes butter!

Cheers,

Timkin
I knew I saw something about the science of butter a few months ago, I did a quick search and found the following. Enjoy


I''ve been thinking about this cat/toast business for a while. In the buttered toast case, it''s the butter that causes it to land buttered side down - it doesn''t have to be toast, the theory works equally well with Jacob''s crackers. So to save money you just miss out the toast - and butter the cats.

Also, should there be an imbalance between the effects of cat and butter, there are other substances that have a stronger affinity for carpet.

Probability of carpet impact is determined by the following simple formula: p = s * t(t)/t? where p is the probability of carpet impact, s is the "stain" value of the toast-covering substance - an indicator of the effectiveness of the toast topping in permanently staining the carpet.

Chicken Tikka Masala, for example, has a very high s value, while the s value of water is zero.

t? and t(t) indicate the tone of the carpet and topping - the value of p being strongly related to the relationship between the colour of the carpet and topping, as even chicken tikka masala won''t cause a permanent and obvious stain if the carpet is the same colour.

So it is obvious that the probability of carpet impact is maximised if you use chicken tikka masala and a white carpet - in fact this combination gives a p value of one, which is the same as the probability of a cat landing on its feet.

Therefore a cat with chicken tikka masala on its back will be certain to hover in mid air, while there could be problems with buttered toast as the toast may fall off the cat, causing a terrible monorail crash resulting in nauseating images of members of the royal family visiting accident victims in hospital, and politicians saying it wouldn''t have happened if their party was in power as there would have been more investment in cat-toast glue research.

Therefore it is in the interests not only of public safety but also public sanity if the buttered toast on cats idea is scrapped, to be replaced by a monorail powered by cats smeared with chicken tikka masala floating above a rail made from white shag pile carpet




ai-junkie.com
ROFLMAOFAVLT

This topic is closed to new replies.

Advertisement