Holographic Reduced Representations are a simple mechanism to represent an associative array of key-value pairs in a fixed-size vector. Each individual key-value pair is the same size as the entire associative array; the array is represented by the sum of the pairs. Concretely, consider a complex vector key r=(a_r[1]eiφ_r[1],a_r[2]eiφ_r[2],…), which is the same size as the complex vector value x. The pair is "bound" together by element-wise complex multiplication, which multiplies the moduli and adds the phases of the elements:
y=r⊗x
y=(a_r[1]a_x[1]ei(φ_r[1]+φ_x[1]),a_r[2]a_x[2]ei(φ_r[2]+φ_x[2]),…)
Given keys r_1, r_2, r_3 and input vectors x_1, x_2, x_3, the associative array is:
c=r_1⊗x_1+r_2⊗x_2+r_3⊗x_3
where we call c a memory trace. Define the key inverse:
r−1=(a_r[1]−1e−iφ_r[1],a_r[2]−1e−iφ_r[2],…)
To retrieve the item associated with key r_k, we multiply the memory trace element-wise by the vector r−1_k. For example:
r_2−1⊗c=r_2−1⊗(r_1⊗x_1+r_2⊗x_2+r_3⊗x_3)
r_2−1⊗c=x_2+r−1_2⊗(r_1⊗x_1+r_3⊗x3)
r_2−1⊗c=x_2+noise
The product is exactly x_2 together with a noise term. If the phases of the elements of the key vector are randomly distributed, the noise term has zero mean.
Source: Associative LSTMs