Introduction
Reinforcement Learning (RL) agents often face strict "actor-latency" constraints where they must act quickly on limited hardware. This makes deploying high-capacity models, such as Transformers, highly impractical in real-world or distributed settings. To bridge this gap, researchers introduce Actor-Learner Distillation (ALD), a method that leverages a large Transformer "learner" to guide a small LSTM "actor" through continual distillation. The result is an agent that achieves the superior sample efficiency of a Transformer while maintaining the fast inference speeds of an LSTM.
The Bottleneck: Actor-Latency in RL
In many RL applications—ranging from robotics to distributed training—the agent must perform inference (choose an action) within a very tight time budget. While Transformers have recently outperformed LSTMs in memory-heavy tasks, they are computationally expensive.
In distributed RL, "actors" typically run on CPUs to collect data, while a "learner" updates the model on a GPU. If the actor uses a heavy Transformer model, data collection slows to a crawl. This leads to massive "wall-clock" training times, even if the model is highly "sample efficient" (requiring fewer environment steps to learn).
As shown above, using a 4-Layer GTrXL (Transformer) actor results in the learner spending 84% of its time idling waiting for data, with the actor processing only 70 steps per second (SPS) compared to the LSTM's 1053 SPS. The authors identify this latency as a major bottleneck for scaling model complexity in RL.
Methodology: Actor-Learner Distillation (ALD)
To resolve this bottleneck, the authors propose decoupling the model used for acting from the model used for learning.
The ALD framework consists of several key components:
- The Learner ($M_L$): A high-capacity model (e.g., a Gated Transformer-XL) trained using a standard RL algorithm (V-MPO). It learns from replay data but never interacts with the environment directly.
- The Actor ($M_A$): A low-capacity, fast model (e.g., a small LSTM) that interacts with the environment to collect trajectories.
- Continual Distillation: The Actor is trained to mimic the Learner’s policy ($\pi_L$) and value function ($V_L$) using a combination of KL-divergence and Mean Squared Error (MSE) losses.
- Bidirectional Regularization: The Learner is also regularized toward the Actor's policy, which the authors found leads to smoother optimization and prevents the Learner from diverging too far from the data the Actor is collecting.
- HOGWILD! Parallelization: To prevent the distillation process itself from becoming a bottleneck, the authors use a lock-free parallel training scheme (HOGWILD!) to update the Actor parameters across multiple threads.
Experimental Setup
The researchers evaluated ALD on two challenging partially-observable environments requiring long-term memory:
- I-Maze (9x9 and 15x15): A grid-world where an agent sees an "indicator" at the start and must remember it to choose the correct goal at the end of a long corridor.
- Meta-Fetch: A complex environment where an agent must fetch objects in a specific, hidden sequence, requiring both memory and compositional reasoning.
Key Insights and Results
Inductive Bias Transfer
The most significant finding is that ALD doesn't just copy the Learner's outputs; it transfers the Transformer's inductive biases to the LSTM. In the 15x15 I-Maze, standard LSTMs often get stuck in local optima (success rate of 0.5). However, ALD-trained LSTMs escape these optima, reaching a 1.0 success rate by effectively "learning how to remember" from the Transformer teacher.
Wall-Clock vs. Sample Efficiency
A model can be "efficient" in terms of environment steps but "inefficient" in terms of actual training time. While a pure Transformer is 15x slower than an LSTM at inference, ALD provides the best of both worlds. In the 9x9 I-Maze, ALD reached 100% success in roughly the same wall-clock time as a standard LSTM, whereas the standalone Transformer took nearly twice as long to reach the same milestone despite needing fewer environment steps.
Superiority over Baselines and Distillation Ratios
ALD consistently outperformed Asymmetric Actor-Critic, a common baseline where only the value function has access to high-capacity compute. This suggests that distilling the policy itself is key to performance gains. Furthermore, the authors found that the "Distillation steps per RL step" ratio is critical: taking more distillation steps per environment step significantly boosts performance until it hits a point of diminishing returns.
Limitations and Future Work
While highly effective, ALD introduces additional engineering complexity. It requires managing multiple asynchronous processes (Learner, Actor, Distiller, Replay Buffer).
Looking forward, the authors note that future work should explore scaling this framework to even larger "teacher" models. Additionally, integrating batched inference for actors could further improve system efficiency, potentially allowing for slightly larger actor models to be used within the same strict latency budgets.
Summary updated