Standard Reinforcement Learning (RL) assumes an idealized loop: an agent observes a state, chooses an action, and the environment reacts instantly. In the real world—especially in robotics and remote-control systems—this loop is plagued by observation delays (sensor data transit time) and action delays (command execution time).
While constant delays are challenging, random delays (such as those caused by a jittery WiFi connection) fundamentally break the Markov property. The Markov property assumes the current state contains all necessary information to predict the future. If an agent doesn't know which of its previously issued actions are currently influencing the environment, it cannot accurately assign credit for rewards. Prior work often relied on "undelaying" the environment via complex predictive models, which are computationally expensive and prone to error.
To address this, researchers introduced Delay-Correcting Actor-Critic (DCAC), an algorithm designed to handle messy, random delays. By mathematically formalizing these environments and using a novel "partial trajectory resampling" technique, DCAC allows agents to learn from off-policy data as if it were on-policy, significantly outperforming standard methods.
Core Methods
The authors tackle the delay problem through three main contributions:
1. Random-Delay Markov Decision Processes (RDMDP): They extend the standard MDP framework to include a "buffer" of the last $K$ actions and the current delay values as part of the state. By augmenting the state space with this action buffer, the Markov property is restored, making the environment solvable by standard RL techniques.
2. Partial Trajectory Resampling: This is the paper's core innovation. In a delayed system, actions currently in the "pipeline" haven't yet affected the environment. The authors realized that when looking back at a recorded trajectory in the replay buffer, they could "resample" those pending actions using the current policy without invalidating the subsequent observations.
3. Delay-Correcting Actor-Critic (DCAC): The researchers integrated this resampling technique into the Soft Actor-Critic (SAC) framework. By resampling the action buffer in hindsight, they transform old, "off-policy" data into "on-policy" fragments. This allows the use of multi-step value estimation—which usually suffers from high variance when used off-policy—to drastically reduce the bias of value estimates.
Key Insights and Results
The researchers evaluated DCAC using the MuJoCo continuous control suite (e.g., Ant, HalfCheetah, Humanoid). To simulate real-world conditions, they created a custom OpenAI Gym wrapper that augments these environments with constant delays and real-world random delays (sampled from actual WiFi communication data).
- The "Free" On-Policy Fragment: Because of delays, there is a window of time where the agent's actions haven't hit the environment yet. In hindsight, changing what those actions were (using the latest policy) doesn't invalidate the recorded trajectory. This provides a rare opportunity to get on-policy multi-step updates from a replay buffer without the variance explosion typical of importance sampling.
- Bias Reduction: The paper proves mathematically that using an $n$-step estimator in this manner reduces the bias introduced by function approximation by a factor of $\gamma^n$ (where $\gamma$ is the discount factor).
- Superior Performance and Robustness: In environments with constant delays, DCAC achieved significantly higher rewards than standard SAC and Real-Time Actor-Critic (RTAC). More impressively, in the WiFi-based random delay experiments, DCAC was often the only algorithm capable of learning complex tasks like HalfCheetah, whereas standard SAC exhibited near-random performance.
- Sample Efficiency: Because DCAC uses multi-step backups, it is more sample-efficient than 1-step methods. This is critical for real-world robotics where data collection is expensive and time-consuming.
Limitations and Future Work
While highly effective, DCAC does have limitations. The algorithm requires an action buffer of size $K$, where $K$ is the maximum possible delay. If delays are extremely long or potentially infinite (e.g., severe packet loss), the state space could become unwieldy. Additionally, the current implementation assumes the agent can measure or knows the delay values at training time.
Future directions suggested by the authors include exploring "time-step agnostic" RL and using Recurrent Neural Networks (RNNs) to compress the action buffer. This could potentially make the approach more scalable to very high-frequency control systems or scenarios with extreme delays.
Summary updated