Chunking the Critic: A Transformer-based Soft Actor-Critic with N-Step Returns

Dong Tian, Onur Celik, Gerhard Neumann

TL;DR

T-SAC (Transformer Soft Actor-Critic) upgrades the standard SAC algorithm by replacing its simple MLP critic with a lightweight, sequence-aware Transformer. By "chunking" trajectory segments and using a novel gradient-averaging technique for $N$-step returns, T-SAC achieves state-of-the-art performance on complex, long-horizon tasks without the instability of importance sampling or the need for a target network.

The Credit Assignment Problem

Reinforcement Learning (RL) agents often struggle with "credit assignment"—the difficulty of figuring out which specific action led to a reward that happens much later in time. Standard off-policy methods like Soft Actor-Critic (SAC) typically evaluate single state-action pairs in isolation, which is akin to trying to understand a movie by looking at individual, disconnected frames.

To fix this, researchers often use $N$-step returns, which look ahead several steps to calculate value. However, in "off-policy" settings (where we learn from old data in a replay buffer), $N$-step returns usually require Importance Sampling (IS) to correct for the difference between the old data and the current policy. IS is notoriously high-variance and can make training explode. Other methods try "action chunking" (predicting a sequence of actions at once), but this makes the robot less reactive and harder to tune.

Methodology: T-SAC

The authors introduce T-SAC, which shifts the "chunking" paradigm from the actor to the critic.

Architecture of the Transformer Critic, which processes a state and a sequence of future actions to predict multi-step Q-values.
  1. Transformer Critic: Instead of an MLP, the architecture utilizes a 2-layer causal Transformer. It ingests a short window of states and actions $(s_t, a_t, \dots, a_{t+n-1})$ and predicts values for every prefix in that sequence.
  2. Gradient-Averaged N-Step Loss: This is a key innovation. Usually, $N$-step methods average the targets (like $\lambda$-returns), which can "dilute" sparse reward signals. T-SAC instead calculates a separate loss for every horizon (1-step, 2-step, ..., $N$-step) and averages their gradients. This stabilizes training while keeping the reward signal "sharp."
  3. No Importance Sampling: By conditioning the critic on the realized sequence of actions from the replay buffer, the authors show that the internal transitions are determined by the environment, not the policy. This allows them to use multi-step supervision without the mathematical headache and variance of IS.
  4. Hard-Copy Freezing: Inspired by the "CrossQ" algorithm, they eliminate the standard "target network" (which usually uses Polyak averaging). Instead, they snapshot the critic, freeze it for a set number of updates ($K$), and use that snapshot to calculate targets. This simplifies the architecture and speeds up value propagation.

Experimental Setup

The researchers evaluated T-SAC on three major continuous control benchmarks:

  • Meta-World ML1: A suite of 50 distinct robotic manipulation tasks (e.g., opening a door, picking up a plug, using a hammer).
  • Gymnasium MuJoCo: Standard locomotion benchmarks like Ant, HalfCheetah, and HumanoidStandup.
  • FANCYGYM Box-Pushing: A challenging task requiring precise contact, tested in both "dense" reward (constant feedback) and "sparse" reward (reward only at the very end) variants.

Key Insights

  • Context is King: You don't need the robot to commit to long, open-loop action sequences (actor-side chunking). You just need the critic to understand the temporal context of what the robot is currently doing.
  • Gradient Averaging > Target Averaging: Averaging gradients is a more robust way to reduce variance in $N$-step learning than averaging targets, especially in environments where rewards are rare.
  • Simplicity Scales: Despite using a Transformer, the model is "lightweight" (only 2 layers, 128–256 hidden units). It proves that you don't need massive "Decision Transformer" style models to get the benefits of sequence modeling in online RL.
  • Target Networks are Optional: The "hard-copy" freezing schedule shows that we can achieve stable off-policy learning without the slow-moving "shadow" networks typically required by SAC.

Performance and Results

Aggregate success rate across tasks showing T-SAC significantly outperforming standard SAC and other baselines.
  • Meta-World Dominance: T-SAC solved most of the 50 Meta-World tasks in just 5 million environment steps. For comparison, the previous state-of-the-art (TOP-ERL) typically requires 20 million steps to reach similar performance.
  • State-of-the-Art Box Pushing: On the dense Box-Pushing task, T-SAC achieved a 96.8% success rate, significantly higher than the $\le 85\%$ achieved by prior baselines.
  • Sparse Reward Success: In the sparse version of Box-Pushing, T-SAC reached 60% success, remaining competitive with specialized episodic methods while using a much simpler step-based approach.
  • Efficiency: T-SAC remains stable even with an "Update-to-Data" (UTD) ratio of 1, meaning it is highly sample-efficient compared to many modern Transformer-based RL agents.

Limitations and Future Work

  • Low-Dimensional Only: The current study focuses on low-dimensional observations (joint positions, etc.). The authors note that extending this to pixel-based (visual) RL is non-trivial and showed some instabilities in early tests.
  • Continuous Control Focus: The method was designed for and tested on continuous action spaces; its performance in discrete domains remains an open question.
  • Future Directions: The authors suggest exploring shared Transformer backbones for both the actor and critic, and testing the system on real-world robotic hardware where temporal context and $N$-step reasoning are critical.

Summary updated

BibTeX
@inproceedings{tian2026chunking,
  author = {Dong Tian and Onur Celik and Gerhard Neumann},
  title = {{Chunking the Critic: A Transformer-based Soft Actor-Critic with N-Step Returns}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=rb5eTktqbc},
}
Figure