Associative retrieval and restoration of data in neural networks