Associative Memory Based Experience Replay for Deep Reinforcement Learning
Mengyuan Li, Arman Kazemi, Ann Franchesca Laguna, X. Sharon Hu
TL;DR
This work targets the latency bottleneck of prioritized experience replay (PER) in deep Q-network (DQN) agents by introducing AMPER, a hardware-software co-design that uses associative memory (AM) to replace the tree-traversal priority sampling. AMPER comprises two AM-based variants, AMPER-k and AMPER-fr, which construct a candidate priority set (CSP) and sample from it using AM-enabled nearest-neighbor strategies, enabling efficient in-memory searches. A dedicated AM-based accelerator (TCAM arrays, URNG, and a CSP buffer) supports CSP construction and sampling, achieving up to 270× latency reduction over GPU-based PER with comparable learning performance on standard OpenAI Gym tasks. The approach addresses the memory-wall in online DRL by performing in-memory computations that preserve PER-like sampling behavior while significantly reducing data movement and irregular memory accesses, enabling real-time learning with large replay memories.
Abstract
Experience replay is an essential component in deep reinforcement learning (DRL), which stores the experiences and generates experiences for the agent to learn in real time. Recently, prioritized experience replay (PER) has been proven to be powerful and widely deployed in DRL agents. However, implementing PER on traditional CPU or GPU architectures incurs significant latency overhead due to its frequent and irregular memory accesses. This paper proposes a hardware-software co-design approach to design an associative memory (AM) based PER, AMPER, with an AM-friendly priority sampling operation. AMPER replaces the widely-used time-costly tree-traversal-based priority sampling in PER while preserving the learning performance. Further, we design an in-memory computing hardware architecture based on AM to support AMPER by leveraging parallel in-memory search operations. AMPER shows comparable learning performance while achieving 55x to 270x latency improvement when running on the proposed hardware compared to the state-of-the-art PER running on GPU.
