As part of a Wallenberg grant we are investigating how to design more efficient memory systems for future computers. Our focus is on designing hardware and software techniques that learn how data is moved in the system (between cache levels and between main memory and non-volatile storage) and then optimizing this movement for performance and energy. We have a particular focus on graph applications, as their irregular data movement patterns are particularly challenging.