The explosion in workload complexity and the recent slow-down in Moore's lawscaling call for new approaches towards efficient computing. Researchers arenow beginning to use recent advances in machine learning in softwareoptimizations, augmenting or replacing traditional heuristics and datastructures. However, the space of machine learning for computer hardwarearchitecture is only lightly explored. In this paper, we demonstrate thepotential of deep learning to address the von Neumann bottleneck of memoryperformance. We focus on the critical problem of learning memory accesspatterns, with the goal of constructing accurate and efficient memoryprefetchers. We relate contemporary prefetching strategies to n-gram models innatural language processing, and show how recurrent neural networks can serveas a drop-in replacement. On a suite of challenging benchmark datasets, we findthat neural networks consistently demonstrate superior performance in terms ofprecision and recall. This work represents the first step towards practicalneural-network based prefetching, and opens a wide range of exciting directionsfor machine learning in computer architecture research.