Section 8.2
Aside: Content-Addressable Memory / Key-Value Store
To build intuition for the following section we take a detour to discuss content-addressable memories (also known as key-value stores or vector databases). Imagine that we have a database containing paired keys and values, \((k, v)\). For example, the keys may represent pets’ names and the values their animal type such as (“Fluffy”, “cat”) and (“Bluey”, “dog”). The actual keys and values would typically be encoded as vectors. This is illustrated graphically in Figure 110. Now to retrieve a value from the database we provide a query, say “Bluie”. Note that an exact matching key does not appear in the database due to the misspelling, but we can still return the value “dog” associated with the closest key, “Bluey”. Mathematically we find \(i^{\star} = \argmax \left\{q^T k_i \mid i = 1, \ldots, n\right\}\) and return \(v_{i^\star}\) where the inner-product between the query and keys is used to determine similarity.