We show that materials with the ability to form persistent spectral holes under illumination have frequency as an additional optically parallel accessible degree of freedom that may be incorporated into associative memory. This opens new possibilities for increasing the number of interconnections in optical models of neural networks. In our first example, a 144-element autoassociative memory matrix is constructed on two 12-bit vectors and has two dimensions (x and frequency omega). The probe vector at the memory input carries two erroneous bits (out of 1 2 bits) and is one-dimensional (spatial coordinate x); the memory output - with the error bits corrected-is one-dimensional in frequency omega. The second example uses memory input that is two-dimensional (image in coordinates x, y); the memory matrix is four-dimensional (x, y, omega, t), where t (time coordinate) is given by the temporal delay of photochemically accumulated stimulated photon echo signal; memory output is two-dimensional (omega and t) and corrects two bits out of the 1 2-bit vector. In the third example, quadratic autoassociative memory is coded in three dimensions (coordinates x, y, omega) and materializes 32 x 32 x 32 = 32 768 optical interconnections; the probe vector is given as a 32 x 32 spatial matrix (coordinates x, y); the output is one-dimensional, consists of 32 bits along the frequency axis, and corrects four erroneous bits.