What is: Neural Cache?
Source | Improving Neural Language Models with a Continuous Cache |
Year | 2000 |
Data Source | CC BY-SA - https://paperswithcode.com |
A Neural Cache, or a Continuous Cache, is a module for language modelling which stores previous hidden states in memory cells. They are then used as keys to retrieve their corresponding word, that is the next word. There is no transformation applied to the storage during writing and reading.
More formally it exploits the hidden representations to define a probability distribution over the words in the cache. As illustrated in the Figure, the cache stores pairs of a hidden representation, and the word which was generated based on this representation (the vector encodes the history ). At time , we then define a probability distribution over words stored in the cache based on the stored hidden representations and the current one as:
where the scalar is a parameter which controls the flatness of the distribution. When is equal to zero, the probability distribution over the history is uniform, and the model is equivalent to a unigram cache model.