A lot of you have probably seen those recent viral news stories about the Japanese boy who wrote a study about swallowtails remembering stuff from their time as caterpillars. Just noting here that: 1. this is not the first experiment of its kind 2. Manduca sexta adults only seem to remember fifth instar memories.
I assume hemimetabolous insects tend to remember more of their juvenile lives.