Abstract
Deep reinforcement learning (RL) agents typically rely on stacked video frames to infer motion, yet this implicit approach often fails in environments with complex dynamics. This paper demonstrates that explicitly providing motion information—via a lightweight optical flow network called TinyFlowNet or a simple pixel-wise image difference—dramatically enhances an agent's ability to control robots in dynamic settings. Evaluated on both standard MuJoCo tasks and new challenging 3D environments, explicit motion perception proves to be a robust alternative to traditional frame-stacking, enabling agents to solve tasks that were previously intractable.
Introduction
In visual reinforcement learning for continuous control, the standard practice is to provide the agent with a stack of recent frames. The underlying assumption is that the neural network will naturally learn to extract velocity and trajectory information from these temporal sequences. However, in tasks involving fast-moving objects, such as catching a ball, agents often struggle to form effective motion representations. This paper investigates whether motion is inherently difficult for end-to-end systems to learn and proposes explicit perception mechanisms to bridge this gap without compromising the high-speed data collection necessary for RL.
Methodology
To provide explicit motion data, the authors developed TinyFlowNet, a miniaturized optical flow network optimized for speed, capable of processing 1,800 image pairs per second. This efficiency allows it to be integrated directly into the RL training loop.
TinyFlowNet can be trained in two ways:
- Student-Teacher Training: The network is trained offline to mimic the outputs of a high-fidelity but slow model (FlowNet 2.0).
- End-to-End Training: The network is initialized randomly and trained solely through RL reward signals, allowing it to learn task-specific motion features.
The study also introduces a surprisingly effective "Image Difference" baseline, where the current frame is concatenated with the pixel-wise difference between the current and previous frames.
Experimental Setup
The proposed methods were tested on standard MuJoCo tasks (Walker, Swimmer, Hopper) and four custom dynamic environments designed to test motion perception: 2D Catcher, 2D Chaser, 3D Catcher, and 3D KeepUp.
These environments require the agent to interact with objects moving at varying speeds, necessitating accurate trajectory prediction.
Results and Discussion
The results indicate that explicit motion perception consistently outperforms implicit frame stacking and LSTMs. In the most challenging 3D environments, standard baselines failed to achieve any significant reward, while flow-based agents successfully mastered the tasks.
A key finding was the efficacy of the simple Image Difference baseline. Despite its simplicity, it often matched the performance of full optical flow, suggesting that even basic temporal subtraction provides a much stronger signal than raw frame stacks. Furthermore, when TinyFlowNet was trained purely on RL rewards, it learned to selectively attend to relevant motion (e.g., a moving ball) while ignoring irrelevant motion (e.g., the robot's own arm), highlighting the efficiency of task-driven perception.
Conclusion
Explicitly providing motion information is a powerful tool for visual RL in dynamic environments. While standard architectures can sometimes learn motion from scratch with enough capacity (e.g., deep ResNets), lightweight explicit modules like TinyFlowNet offer a more robust and efficient path to success. Future work will explore the application of these techniques to real-world robotics, where abstract motion features may help overcome the sim-to-real gap.
Summary updated