Skip to main content
Back

University of Padova's S2AC and SDAC Let Robots Learn On-Device Without Replay Buffers

Two new streaming RL algorithms let robots trained in simulation adapt on-device in real time, without replay buffers or target networks

Pro

  • Researchers propose S2AC and SDAC, streaming versions of SAC and TD3 that require no replay buffers, batch updates, or target networks.
  • Both algorithms match state-of-the-art streaming baselines across MuJoCo Gym and DM Control Suite benchmarks without per-environment hyperparameter tuning.
  • A naive switch from batch TD3 to streaming SDAC causes severe performance drops due to optimizer mismatch between Adam and ObGD.
  • Replacing Adam with SGDC for the critic during pre-training bridges the gap, enabling smooth batch-to-streaming finetuning for Sim2Real transfer.
  • Finetuning SDAC from a TD3 checkpoint outperforms SDAC trained from scratch, using far fewer environment steps.
  • Code and pre-trained checkpoints are publicly available; SAC-to-S2AC transition and quadruped-run environments remain open challenges.

Most state-of-the-art reinforcement learning algorithms for robotics share a dirty secret: they are too heavy to run on the robot itself. A new paper from the University of Padova tackles this head-on, proposing two algorithms that strip away the memory-hungry infrastructure of modern deep RL while staying architecturally compatible with the batch methods that trained the policy in the first place.

The weight of modern RL

State-of-the-art deep RL methods have achieved remarkable performance in continuous control tasks, yet their computational complexity is often incompatible with the constraints of resource-limited hardware, due to their reliance on replay buffers, batch updates, and target networks. Replay buffers alone can store millions of past transitions in RAM. Target networks require maintaining a second frozen copy of your neural network. Batch updates require sampling and processing hundreds of transitions at once. None of this is feasible on a microcontroller or a small edge processor running a real robot.

The Sim2Real gap makes this worse. The majority of current RL applications for real-world robotics either directly apply the policy trained in simulation to the real world, assume that finetuning on-device using batch methods is possible, or consider the not always realistic presence of a remote server capable of real-time communication with the edge device. None of those options are great. The first ignores the gap entirely. The second requires hardware that most robots don't have. The third adds latency and a network dependency.

Streaming RL: one transition at a time

Streaming deep RL is the emerging alternative. In streaming reinforcement learning, the agent receives an observation and reward at each step, taking action and making a learning update immediately without storing the sample. No buffer, no batch, no second network. The catch is that a more critical reason for the absence of streaming deep RL is its frequent instability and failure to learn, which researchers refer to as the stream barrier.

The prior state of the art, Stream AC(λ), cracked this problem for training from scratch. But it has a fundamental incompatibility with the batch algorithms (SAC, TD3, DDPG) that practitioners actually use to pre-train robot policies. Since real-world deployment would naturally demand finetuning from a policy pre-trained with one of these methods, this incompatibility represents a significant practical limitation.

S2AC and SDAC: streaming versions of SAC and TD3

The authors propose two novel streaming deep RL algorithms, Streaming Soft Actor-Critic (S2AC) and Streaming Deterministic Actor-Critic (SDAC), explicitly designed to be compatible with state-of-the-art batch RL methods, making them particularly suitable for on-device finetuning applications such as Sim2Real transfer. Think of them as SAC and TD3 with all the heavy infrastructure surgically removed and replaced with streaming-compatible alternatives.

Both algorithms share a set of stabilizing design choices that address the three core challenges of streaming learning: large unstable updates, activation nonstationarity, and improper data scaling. The shared components are:

  • Sparse network initialization to avoid large initial updates
  • LayerNorm on every layer's pre-activations to keep activations stationary
  • Online state normalization using Welford's algorithm (a running mean/variance tracker that requires no stored data)
  • Reward scaling by the running standard deviation of returns
  • ObGD optimizer for the critic: a gradient descent variant that automatically clips the step size to prevent overshooting, without the overhead of backtracking
  • Eligibility traces for the critic: instead of updating only on the current transition, traces accumulate a decaying sum of past gradients, improving credit assignment across time

Where they diverge is in the actor. S2AC uses a stochastic policy (like SAC) and adds one clever fix: because rewards are normalized by a running standard deviation, a fixed entropy coefficient α would become miscalibrated over time. The authors rescale α by the same normalization factor, keeping the reward-entropy tradeoff stable throughout training. SDAC uses a deterministic policy (like TD3) and injects small Gaussian noise into the critic's target values during training, smoothing the Q-function landscape and preventing the critic from overfitting to narrow peaks. Ablations show this target noise is critical for SDAC: without it, the algorithm fails to learn entirely.

Ablation study comparing SDAC and S2AC variants across three environments, showing the impact of target noise and adaptive alpha

Matching the state of the art, without the tuning

Experiments ran on MuJoCo Gym and DM Control Suite for 20 million environment steps, with 10 random seeds per experiment and 95% confidence intervals. Both algorithms achieve performance comparable to state-of-the-art streaming baselines on standard benchmarks without requiring tedious hyperparameter tuning. The prior best streaming method, AVG, required per-environment tuning of learning rates, discount factors, and optimizer betas. S2AC and SDAC use the same hyperparameters across all environments.

Multi-panel comparison of Average Episodic Return for SDAC, S2AC, and Stream AC across six environments including quadruped-run, dog-walk, and HalfCheetah

A side benefit emerged: applying the same architectural choices (LayerNorm, sparse init, state normalization, reward scaling) to standard batch TD3 and SAC also improved their performance, particularly for TD3. The streaming-inspired modifications make the batch algorithms better too.

The real challenge: switching from batch to streaming mid-deployment

This is where the paper breaks new ground. Training from scratch with a streaming algorithm is one thing. But the practical scenario is: pre-train in simulation with TD3, deploy on the robot, then finetune with SDAC as the robot encounters the real world. The authors call this the batch-to-streaming transition, and they show it is far from trivial.

A naive switch from TD3 to SDAC causes severe performance drops. The culprit is the optimizer. TD3 uses Adam for the critic; SDAC uses ObGD. The critic optimizer shapes the learned solution through its inductive biases, hindering a smooth transition. Adam and ObGD produce critic networks with very different weight magnitudes (measurable via L2-norm), and the mismatch destabilizes finetuning.

Left plot shows performance drop during naive batch-to-streaming transition; right plot shows L2-norm of critic weights diverging between Adam and ObGD

The fix is elegant: replace Adam with SGDC (Stochastic Gradient Descent with Clipping) for the critic during pre-training. The paper formally proves that ObGD and SGDC are equivalent in the online single-sample regime, so the critic's weight geometry at the end of batch pre-training already matches what SDAC expects. The authors also add a short critic warm-up phase at the start of finetuning, where the policy is frozen and only the critic is updated to re-calibrate its Q-estimates for the new environment dynamics.

The result: initializing SDAC from a pre-trained policy consistently accelerates learning and, in many cases, yields final performance that surpasses what is achievable by SDAC trained from scratch, with higher sample efficiency. This holds in both perturbed environments (simulating Sim2Real gaps like reduced joint stiffness and actuator gains) and unmodified ones.

What it's good for, and where it falls short

The two target use cases are clearly defined:

  • Sim2Real finetuning: pre-train in simulation with TD3, deploy on hardware, adapt online with SDAC. No server required, no replay buffer, minimal memory footprint.
  • Batch-to-streaming alternation: when a robot has enough compute for batch RL sometimes but not always (e.g., competing tasks like perception and planning), it can dynamically switch between TD3 and SDAC depending on available resources.

The limitations are worth noting. SDAC finetuning fails on the quadruped-run-v0 environment, one of the harder locomotion tasks. The SAC-to-S2AC transition remains an open problem: the entropy coefficient tuning is too sensitive for reliable finetuning. Using SGDC instead of Adam for the critic during pre-training also reduces sample efficiency in some environments, requiring longer training runs. The authors are transparent about all of this.

Code and reproducibility

Code is available at the project repository, and the pre-trained checkpoints used for finetuning experiments are also provided, so that experiments can be reproduced without requiring a GPU for pre-training. The repository includes pseudocode for both S2AC and SDAC, hyperparameter tables, and the modified MuJoCo XML files for the perturbed environments used in Sim2Real experiments. The algorithms are built on top of the CleanRL codebase, making them straightforward to integrate into existing pipelines.

The broader implication is a shift in how we think about the batch/streaming divide. Rather than treating them as competing paradigms, this work shows they can share a common algorithmic foundation, with the optimizer choice as the critical bridge between the two worlds. For anyone working on edge robotics or on-device adaptation, that is a practically useful result.