Content-based addressing

In content-based addressing, we select values from the memory based on similarity. The controller returns a key vector called . We compare this key vector, , with each of the rows in the memory matrix ,, to learn the similarity. We use cosine similarity as a similarity measure for checking the similarity, which can be expressed as follows:

We introduce a new parameter called , which is called the key strength. It determines how concentrated our weight vector should be. Based on the value of , we can increase or decrease the focus—that is, we can tune our attention to a particular location based on the value of the key strength, . When the value of is low, we focus on all of the locations equally; when the value of is high, we focus on a particular location.

So, our weight vector becomes the following:

That is, the cosine similarity between key vector, , and memory matrix, , multiplied by the key strength . The superscript c in denotes that they are content-based weights. Instead of using this directly, we apply softmax over the weights. So, our final weights become as follows:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.158.165