How to know what kind of memory is stored in the connection weights?
You should use google for this question, it is extremely vague. Some technical documents will give very clear insight into what's happening here.

https://blog.openai.com/generative-models/

http://proceedings.mlr.press/v37/gregor15.pdf

If you really want to understand "what the AI is thinking", well, you may never know. The idea of AI is that it can handle complex data (high degree of dimensionality) and is too complex for Humans to comprehend.