<p>Hopfield and Hamming networks are older connectionist networks used to classify noisy binary input data.</p>

<p>Hopfield networks are the basis for Hamming networks, so let's focus on those first.</p>

<p>A Hopfield network is a set of neurons that do classification via mutual inhibition, as shown in the figure below from Wikipedia:</p>

<p><a href="https://i.sstatic.net/V00XA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/V00XA.png" alt="mutual-inhibition"></a></p>

<p>Note the neurons are not like your typical biologically plausible neurons, they have two states "+1" and "-1". Their update rule, which forces them into an output pattern, enables these two states.</p>

<p>A Hamming network is a two-layer network, as shown in this figure (taken from <a href="http://home.agh.edu.pl/~vlsi/AI/hamming_en/" rel="nofollow noreferrer">here</a>) where the data is flowing from the bottom:</p>

<p><a href="https://i.sstatic.net/WTscH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WTscH.png" alt="hamming-net"></a></p>

<p>As you can see, the second layer, sometimes called the MaxNet layer, is identical to the Hopfield Network, however the input layer resembles a classic single-layer perceptron. This single-layer perceptron is train according to the <a href="https://en.wikipedia.org/wiki/Hamming_distance" rel="nofollow noreferrer">Hamming Distances</a> of the inputs.</p>

<p>Performance wise, as shown in the conclusion "<a href="https://www.google.ca/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjxyqCW_M7OAhWGJR4KHcHXBq8QFggeMAA&amp;url=http%3A%2F%2Fwww.dtic.mil%2Fcgi-bin%2FGetTRDoc%3FAD%3DADA182255&amp;usg=AFQjCNGoj9tbl99gQ61YpCzOl_gP4k-clQ&amp;sig2=AKhP5wek8y-0K6Tgg6ltvg" rel="nofollow noreferrer">A Comparison of Hamming and Hopfield
Neural Nets for Pattern Classification</a>" by Lippmann et al., Hamming nets generally out-perform Hopfield nets.</p>

CC BY-SA 4.0
2016-08-20T02:49:20.893Z
2018-07-05T15:43:17.027Z
2018-07-05T15:43:17.027Z
Seanny123
<p>I have recently discovered that <a href="https://cogsci.stackexchange.com/a/15741/4397">both Hamming and Hopfield networks are both content addressable memories</a>. However, what is the difference between these two networks designs and their performance?</p>

CC BY-SA 3.0
2016-08-19T23:17:48.070Z
www.dtic.mil/cgi-bin/GetTRDoc?AD=ADA182255 - Hamming networks require fewer connections and often outperform Hopfield nets.
Wuschelbeutel Kartoffelhuhn
CC BY-SA 3.0
2016-08-20T02:49:46.673Z
@WuschelbeutelKartoffelhuhn yep, that's the paper I was using to craft my own answer :)
Seanny123
<theoretical-neuroscience><computational-modeling>
What's the difference between a Hamming and Hopfield network?
Seanny123
# What's the difference between a Hamming and Hopfield network?

(Asked by: username_0 on 2016-08-19)

I have recently discovered that [both Hamming and Hopfield networks are both content addressable memories](https://cogsci.stackexchange.com/a/15741/4397). However, what is the difference between these two networks designs and their performance?

**Tags:** theoretical-neuroscience, computational-modeling

> **Comments:**
> **username_1**: www.dtic.mil/cgi-bin/GetTRDoc?AD=ADA182255 - Hamming networks require fewer connections and often outperform Hopfield nets.  
> **username_0**: @WuschelbeutelKartoffelhuhn yep, that's the paper I was using to craft my own answer :)  

---

## 1 answers

### Answer by username_0 on 2016-08-20. Score: 2 | Accepted answer

Hopfield and Hamming networks are older connectionist networks used to classify noisy binary input data.

Hopfield networks are the basis for Hamming networks, so let's focus on those first.

A Hopfield network is a set of neurons that do classification via mutual inhibition, as shown in the figure below from Wikipedia:

[![mutual-inhibition](https://i.sstatic.net/V00XA.png)](https://i.sstatic.net/V00XA.png)

Note the neurons are not like your typical biologically plausible neurons, they have two states "+1" and "-1". Their update rule, which forces them into an output pattern, enables these two states.

A Hamming network is a two-layer network, as shown in this figure (taken from [here](http://home.agh.edu.pl/~vlsi/AI/hamming_en/)) where the data is flowing from the bottom:

[![hamming-net](https://i.sstatic.net/WTscH.png)](https://i.sstatic.net/WTscH.png)

As you can see, the second layer, sometimes called the MaxNet layer, is identical to the Hopfield Network, however the input layer resembles a classic single-layer perceptron. This single-layer perceptron is train according to the [Hamming Distances](https://en.wikipedia.org/wiki/Hamming_distance) of the inputs.

Performance wise, as shown in the conclusion "[A Comparison of Hamming and Hopfield
Neural Nets for Pattern Classification](https://www.google.ca/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjxyqCW_M7OAhWGJR4KHcHXBq8QFggeMAA&url=http%3A%2F%2Fwww.dtic.mil%2Fcgi-bin%2FGetTRDoc%3FAD%3DADA182255&usg=AFQjCNGoj9tbl99gQ61YpCzOl_gP4k-clQ&sig2=AKhP5wek8y-0K6Tgg6ltvg)" by Lippmann et al., Hamming nets generally out-perform Hopfield nets.


---

