Introduction
While deep reinforcement learning (RL) agents are theoretically capable of learning motion from sequences of images, they often struggle to do so effectively in practice. Standard approaches typically rely on "frame stacking" or recurrent layers like LSTMs, hoping the agent will implicitly learn to calculate velocity and direction. However, these agents often perform no better than those looking at a single static frame, as motion features are difficult to learn from rewards alone or are ignored in favor of easier static cues. This paper demonstrates that providing an explicit representation of motion via a miniaturized optical flow network significantly boosts performance in dynamic tasks.
Methodology
The researchers propose integrating an explicit motion perception module into the RL pipeline using a miniaturized network called TinyFlowNet.
TinyFlowNet and RL Integration
Standard optical flow models (like FlowNet) are too computationally heavy for the high frame rates required in RL training. TinyFlowNet is a miniaturized version with a 5-layer encoder and 2-layer decoder, capable of processing 225 mini-batches per second on a standard GPU. The RL agent, utilizing Proximal Policy Optimization (PPO), receives both the current image and the optical flow predicted by TinyFlowNet as inputs.
Training Strategies
Two training regimes were explored for the motion module:
- Supervised (Student-Teacher): TinyFlowNet is pre-trained to mimic a larger, state-of-the-art model (FlowNet 2.0) using data from the RL environment.
- Reinforcement Learning from Scratch: The entire system is trained end-to-end, requiring motion features to emerge solely from the task's reward signal.
Experimental Results
The approach was evaluated on modified OpenAI Gym/MuJoCo tasks (Walker2D, Swimmer, Hopper) and custom high-speed dynamic tasks (2D/3D Catcher, 3D KeepUp).
Key Insights
- Predictive Capability: Explicit flow allows the agent to predict where an object will be, which is crucial for tasks like catching. In 3D Catcher and 3D KeepUp, standard baselines failed completely while the flow-based agent succeeded.
- The "Lazy" Agent Problem: Without explicit motion, agents often fall into local optima, such as staying stationary to collect easy rewards because they cannot track high-speed movements.
- Architecture and Learning: While deeper architectures (like ResNets) can learn motion from scratch in simple 2D tasks, complex 3D tasks still require supervised "kickstarting" of the motion module.
- Interpretability: Visualizations revealed that TinyFlowNet naturally learns to focus on moving targets while ignoring the movement of the robotic arm itself.
Conclusion and Future Work
Explicit motion perception is essential for high-speed interaction in RL. While the current reliance on supervised pre-training for difficult tasks is a limitation, the performance gains are substantial. Future work will focus on unsupervised motion learning (e.g., via frame prediction) and testing these miniaturized networks on physical hardware to account for real-world factors like lighting and motion blur.
Summary updated