RoboTTT: Context Scaling for Robot Policies
By Yunfan Jiang, Yevgen Chebotar, Ruijie Zheng, Fengyuan Hu, Yunhao Ge, Jimmy Wu, Tianyuan Dai, Scott Reed, Li Fei-Fei, Yuke Zhu, Linxi "Jim" Fan
"Scales visuomotor context to 8K timesteps via test-time training with fast weight updates, enabling one-shot imitation and on-the-fly policy improvement."
Abstract
Recent robot foundation models operate with single-step or short-history visuomotor context. We introduce Test-Time-Training Robot Policies (RoboTTT), a robot model and training recipe that scale visuomotor context to 8K timesteps, three orders of magnitude beyond state-of-the-art policies, without growing inference latency. At this context length, we unlock new robot capabilities: one-shot in-context imitation from human video demonstrations, on-the-fly policy improvement, robustness to perturbations, and stronger performance on multi-stage, long-horizon tasks. We also observe, for the first time, steady gains in closed-loop performance as pretraining context length scales. At its core, RoboTTT integrates Test-Time Training into robot foundation models such as Vision-Language-Action policies, yielding a sequence model whose recurrent state consists of fast weights, parameters updated by gradient descent during both training and inference, compressing histories into weight space and retrieving contextual information for long-context conditioning. To scale training context length, the recipe combines sequence action forcing with truncated backpropagation through time. On challenging real-robot manipulation tasks, RoboTTT improves overall performance by 87% over the single-step context baseline and fully completes a five-minute, ten-stage assembly task, which no baseline ever does. RoboTTT trained with 8K-timestep context outperforms the same model pretrained with 1K timesteps by 62%, suggesting context length as a new scaling axis for robot foundation models. Videos are available at https://research.nvidia.com/labs/gear/robottt/
Technical Analysis & Implementation
Core Method: Test-Time Training with Fast Weights§
The key innovation is treating the parameters of a neural network as a recurrent state that can be updated via gradient descent during both training and inference. This compresses long observation histories into weight space, enabling extremely long context (up to 8K timesteps) without increasing inference latency.
Let $\theta$ be the base policy parameters (e.g., a Vision-Language-Action model). At each timestep $t$, the policy receives observation $o_t$ and outputs action $a_t$ using a set of fast weights $\phi_t$ that are updated online:
$$\phi_t = \phi_{t-1} - \eta \nabla_{\phi} \mathcal{L}(a_{t-1}, \hat{a}_{t-1})$$
where $\mathcal{L}$ is a loss function (e.g., action prediction MSE) and $\eta$ is a learning rate. The base parameters $\theta$ are shared across timesteps, while $\phi_t$ act as a compressed memory of the recent history.
Training Recipe: Sequence Action Forcing + Truncated BPTT§
To scale training context length, the authors propose:
1. Sequence Action Forcing: Train on long sequences (up to 8K steps) by unrolling the model and applying the fast weight update at each step. The loss is computed only on the final action prediction, not every step.
2. Truncated Backpropagation Through Time (TBPTT): To avoid memory blowup, backpropagation is truncated: gradients flow only through a fixed window (e.g., 32 steps) while the fast weights carry information across windows.
Formally, for a sequence of length $T$, the update is:
$$\phi_{t+1} = \phi_t - \eta \nabla_{\phi} \mathcal{L}(\pi(o_t; \theta, \phi_t), a_t)$$
$$\mathcal{L}_{\text{total}} = \sum_{t=T-W+1}^{T} \mathcal{L}_t$$
where $W$ is the truncation window size.
Architecture Detail§
The base policy $\pi$ is a transformer-based VLA model (e.g., based on RT-2). Fast weights are added as a small adapter network (e.g., a single linear layer or a tiny MLP) that modulates the transformer's activations. During training, the fast weights are initialized randomly and updated via gradient descent. At inference, the fast weights are initialized to zero or from a learned prior.
PyTorch Code Snippet (Simplified Training Loop)§
import torch
import torch.nn as nn
class FastWeightPolicy(nn.Module):
def __init__(self, base_policy, fast_weight_dim):
super().__init__()
self.base = base_policy # VLA transformer
self.fast_net = nn.Linear(fast_weight_dim, fast_weight_dim) # learnable
self.fast_weight = nn.Parameter(torch.zeros(fast_weight_dim)) # recurrent state
def forward(self, obs, lang, phi):
# phi is current fast weight
features = self.base.encode(obs, lang)
phi_update = self.fast_net(phi)
phi_new = phi + phi_update # simple additive update
action = self.base.decode(features + phi_new)
return action, phi_new
# Training loop (truncated BPTT)
for seq in dataloader: # seq of length T
phi = torch.zeros(fast_weight_dim, device=device)
for t in range(len(seq)):
obs, lang, action_target = seq[t]
action_pred, phi = model(obs, lang, phi)
loss = mse_loss(action_pred, action_target)
if t >= T - W: # only accumulate gradients in window
loss.backward(retain_graph=True)
optimizer.step()
optimizer.zero_grad()Key Results§
- Context scaling: Steady improvement in closed-loop success rate as pretraining context length increases from 256 to 8K steps (62% improvement).
- One-shot imitation: After seeing a single human video demonstration (converted to actions via inverse kinematics), RoboTTT can perform the task without finetuning.
- On-the-fly improvement: During a long-horizon task, the policy can correct its behavior based on recent failures.
- Real-robot tasks: 87% improvement over single-step baseline, and first to complete a 10-stage assembly task (5 minutes).
Interactive LLM Token & Cost Calculator
Estimate token usage and model pricing. Enter your prompt below to see how it is parsed into tokens and calculate the exact API cost for different providers.
Cost Breakdown (USD)
API Pricing Comparison (per Million Tokens)
| Model | Input | Output |
|---|---|---|
| GPT-5.5 Pro | $30.00 | $180.00 |
| o3 Mini | $1.10 | $4.40 |
| DeepSeek V3.1 | $0.25 | $0.95 |
| GPT-4o-mini | $0.15 | $0.60 |
| GLM 4.7 Flash | $0.06 | $0.40 |
| Mistral Medium 3.1 | $0.40 | $2.00 |
| GPT-5.2-Codex | $1.75 | $14.00 |
| MiniMax M1 | $0.55 | $2.20 |
| Gemini 2.5 Flash | $0.30 | $2.50 |
| o3 Pro | $20.00 | $80.00 |
| Gemini 2.5 Pro Preview 06-05 | $1.25 | $10.00 |
| o4 Mini | $1.10 | $4.40 |
| GPT-4.1 Mini | $0.40 | $1.60 |
| Claude Sonnet 5 | $2.00 | $10.00 |
| Claude Sonnet 4.5 | $3.00 | $15.00 |
| Qwen Plus 0728 (thinking) | $0.26 | $0.78 |
| Claude Opus 4 | $15.00 | $75.00 |
| Claude Opus 4.5 | $5.00 | $25.00 |
| Claude Opus 4.7 (Fast) | $30.00 | $150.00 |
| o1 | $15.00 | $60.00 |
| GLM 4.5V | $0.60 | $1.80 |
| GPT-4o (2024-11-20) | $2.50 | $10.00 |
| Gemini 3.1 Flash Lite | $0.25 | $1.50 |
| GPT-5 Chat | $1.25 | $10.00 |
| Mistral Large 2407 | $2.00 | $6.00 |
| GPT Chat Latest | $5.00 | $30.00 |
| GPT-5 Nano | $0.05 | $0.40 |
| Claude Sonnet 4.6 | $3.00 | $15.00 |
| gpt-oss-120b | $0.04 | $0.17 |
| Qwen2.5 7B Instruct | $0.04 | $0.10 |
| GPT-5.3-Codex | $1.75 | $14.00 |
| Gemini 3.1 Pro Preview | $2.00 | $12.00 |
| MoonshotAI Kimi Latest | $3.00 | $15.00 |
| Llama 3.2 3B Instruct | $0.05 | $0.34 |
| Qwen3.5 Plus 2026-02-15 | $0.26 | $1.56 |
| Google Gemini Flash Latest | $1.50 | $9.00 |
| Claude Haiku 4.5 | $1.00 | $5.00 |
| GPT-5 Mini | $0.25 | $2.00 |
| GPT-5.6 Luna Pro | $1.00 | $6.00 |
| GPT-5.6 Luna | $1.00 | $6.00 |
| Qwen2.5 72B Instruct | $0.36 | $0.40 |
| Command R (08-2024) | $0.15 | $0.60 |
| Gemini 3.1 Flash | $0.25 | $1.50 |
| Mistral Nemo | $0.02 | $0.04 |
| GPT-4o-mini (2024-07-18) | $0.15 | $0.60 |
| GPT-4o (2024-05-13) | $5.00 | $15.00 |
| Mixtral 8x22B Instruct | $2.00 | $6.00 |
| Llama 4 Maverick | $0.20 | $0.80 |
| KAT-Coder-Air V2.5 | $0.15 | $0.60 |
| Llama 3.2 11B Vision | $0.34 | $0.34 |
| KAT-Coder-Pro V2.5 | $0.74 | $2.96 |
| Mistral Large | $2.00 | $6.00 |
| GPT-3.5 Turbo (older v0613) | $1.00 | $2.00 |
| Llama 3 8B Instruct | $0.14 | $0.14 |
| Kimi K2.6 | $0.95 | $4.00 |
| Llama 4 Scout | $0.10 | $0.30 |
| GPT-4 Turbo Preview | $10.00 | $30.00 |
| Claude Opus 4.8 | $5.00 | $25.00 |
| Claude Opus 4.7 | $5.00 | $25.00 |
| Qwen3 30B A3B Instruct 2507 | $0.10 | $0.30 |
| GLM 4.5 Air | $0.13 | $0.85 |
| MiniMax M2.7 | $0.25 | $1.00 |
| Qwen3 Coder 480B A35B | $0.30 | $1.00 |
| GLM 5 | $0.95 | $3.15 |
| UI-TARS 7B | $0.10 | $0.20 |
| GPT-5.4 Nano | $0.20 | $1.25 |
| Claude 3 Haiku | $0.25 | $1.25 |
| GPT-5.5 | $5.00 | $30.00 |
| GPT-4o | $2.50 | $10.00 |
| Mistral Small 4 | $0.15 | $0.60 |
| Mistral Small 3 | $0.10 | $0.30 |
| GLM 5 Turbo | $1.20 | $4.00 |
| Qwen3 Max Thinking | $0.78 | $3.90 |
| MiniMax M2-her | $0.30 | $1.20 |
| Command R+ | $2.50 | $10.00 |
| Qwen3 Coder Next | $0.11 | $0.80 |
| DeepSeek V3.1 Terminus | $0.27 | $1.00 |
| Qwen3 30B A3B Thinking 2507 | $0.13 | $1.56 |
| Mistral Small 3.2 24B | $0.10 | $0.30 |
| Grok 4.20 | $1.25 | $2.50 |
| ERNIE 4.0 | $1.20 | $2.40 |
| Claude Fable 5 | $10.00 | $50.00 |
| Qwen3.7 Plus | $0.32 | $1.28 |
| Gemma 3n 4B | $0.06 | $0.12 |
| Gemini 2.5 Pro Preview 05-06 | $1.25 | $10.00 |
| MiniMax M3 | $0.30 | $1.20 |
| Step 3.7 Flash | $0.20 | $1.15 |
| Qwen3.7 Max | $1.48 | $4.42 |
| o3 | $2.00 | $8.00 |
| Step 3.5 Flash | $0.10 | $0.30 |
| Kimi K2.5 | $0.57 | $2.85 |
| Llama 3.1 405B | $0.80 | $0.80 |
| gpt-oss-20b | $0.03 | $0.13 |
| Claude Opus 4.1 | $15.00 | $75.00 |
| DeepSeek V3.2 | $0.27 | $0.40 |
| Nano Banana Pro (Gemini 3 Pro Image Preview) | $2.00 | $12.00 |
| GPT-5.1 | $1.25 | $10.00 |
| Llama 3.1 8B | $0.04 | $0.04 |
| Gemini 3.5 Flash | $1.50 | $9.00 |
| GPT-5 Image Mini | $2.50 | $2.00 |
| GLM 5V Turbo | $1.20 | $4.00 |
| Qwen3 8B | $0.12 | $0.46 |
| Grok 4.20 Multi-Agent | $1.25 | $2.50 |
| Grok 4.20 | $1.25 | $2.50 |
| DeepSeek V3 0324 | $0.27 | $1.12 |
| o1-pro | $150.00 | $600.00 |
| Llama 3.3 70B Instruct | $0.13 | $0.40 |
| Mistral Large 3 | $0.50 | $1.50 |
| Qwen3.6 Flash | $0.19 | $1.13 |
| DeepSeek V4 Pro | $0.43 | $0.87 |
| Yi-Lightning | $0.15 | $0.30 |
| GPT-5.4 Mini | $0.75 | $4.50 |
| GPT Audio | $2.50 | $10.00 |
| GPT Audio Mini | $0.60 | $2.40 |
| Seed-2.0-Mini | $0.10 | $0.40 |
| Qwen3.5-122B-A10B | $0.26 | $2.08 |
| Qwen3.5-Flash | $0.07 | $0.26 |
| Qwen Plus 0728 | $0.26 | $0.78 |
| Qwen3 235B A22B Thinking 2507 | $0.15 | $1.50 |
| Kimi K2 0711 | $0.57 | $2.30 |
| Grok 4.3 | $1.25 | $2.50 |
| Seed-2.0-Lite | $0.25 | $2.00 |
| Mistral Small 3.1 24B | $0.35 | $0.56 |
| Command R | $0.15 | $0.60 |
| Qwen3.5 397B A17B | $0.39 | $2.34 |
| MiniMax M2.5 | $0.15 | $0.90 |
| GPT-5.1 Chat | $1.25 | $10.00 |
| GPT-5.1-Codex | $1.25 | $10.00 |
| GPT-5.6 Sol Pro | $5.00 | $30.00 |
| GPT-5 | $1.25 | $10.00 |
| GPT-5.6 Sol | $5.00 | $30.00 |
| Mistral Medium 3 | $0.40 | $2.00 |
| Nano Banana 2 (Gemini 3.1 Flash Image) | $0.50 | $3.00 |
| Claude Opus 4.6 | $5.00 | $25.00 |
| GPT-5.1-Codex-Max | $1.25 | $10.00 |
| Ministral 3 14B 2512 | $0.20 | $0.20 |
| Seed 1.6 Flash | $0.07 | $0.30 |
| Qwen3 VL 8B Instruct | $0.12 | $0.46 |
| Gemini 2.5 Pro | $1.25 | $10.00 |
| MiniMax M2 | $0.26 | $1.02 |
| GPT-4.1 Nano | $0.10 | $0.40 |
| Grok 4.5 | $2.00 | $6.00 |
| Llama 4 Maverick | $0.20 | $0.80 |
| Google Gemini Pro Latest | $2.00 | $12.00 |
| Gemini 3.1 Pro | $2.00 | $12.00 |
| Qwen3.6 35B A3B | $0.14 | $1.00 |
| Qwen3 VL 32B Instruct | $0.10 | $0.42 |
| Qwen3.6 Max Preview | $1.04 | $6.24 |
| GPT-5 Image | $10.00 | $10.00 |
| Hy3 preview | $0.06 | $0.21 |
| GLM 5.1 | $0.97 | $3.04 |
| Gemma 4 26B A4B | $0.10 | $0.30 |
| Nano Banana 2 (Gemini 3.1 Flash Image Preview) | $0.50 | $3.00 |
| Qwen3.5-35B-A3B | $0.14 | $1.00 |
| Ministral 3 8B 2512 | $0.15 | $0.15 |
| o3 Deep Research | $10.00 | $40.00 |
| o4 Mini Deep Research | $2.00 | $8.00 |
| GPT-5.4 Image 2 | $8.00 | $15.00 |
| Claude Opus Latest | $5.00 | $25.00 |
| Qwen3.5-9B | $0.10 | $0.15 |
| DeepSeek V4 Flash | $0.10 | $0.20 |
| Gemma 3 4B | $0.05 | $0.10 |
| Qwen 2.5-Coder 32B | $0.35 | $0.70 |
| Ministral 3 3B 2512 | $0.10 | $0.10 |
| Gemma 4 31B | $0.22 | $0.55 |
| Qwen3.6 Plus | $0.33 | $1.95 |
| GLM 4.7 | $0.40 | $1.75 |
| R1 0528 | $0.50 | $2.15 |
| Gemini 3 Flash Preview | $0.50 | $3.00 |
| Llama Guard 4 12B | $0.18 | $0.18 |
| Qwen3 30B A3B | $0.12 | $0.50 |
| Doubao Pro | $0.80 | $1.60 |
| Mistral Large 2 | $0.60 | $1.80 |
| GPT-5.4 Pro | $30.00 | $180.00 |
| GPT-5.4 | $2.50 | $15.00 |
| Nano Banana (Gemini 2.5 Flash Image) | $0.30 | $2.50 |
| Qwen3 VL 30B A3B Thinking | $0.13 | $1.56 |
| GLM 4.6 | $0.50 | $2.00 |
| Qwen3 Max | $0.78 | $3.90 |
| GPT-5.6 Terra Pro | $2.50 | $15.00 |
| GPT-5.6 Terra | $2.50 | $15.00 |
| GLM 5.2 | $0.93 | $2.93 |
| Claude Opus 4.8 (Fast) | $10.00 | $50.00 |
| GPT-5.3 Chat | $1.75 | $14.00 |
| Gemini 3.1 Flash Lite Preview | $0.25 | $1.50 |
| Qwen3.5-27B | $0.20 | $1.56 |
| Mixtral 8x22B | $0.50 | $1.00 |
| Gemini 3.1 Pro Preview Custom Tools | $2.00 | $12.00 |
| Hunyuan A13B Instruct | $0.14 | $0.57 |
| Gemini 2.0 Flash | $0.10 | $0.40 |
| Hy3 | $0.20 | $0.80 |
| KAT-Coder-Pro V2 | $0.30 | $1.20 |
| Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image) | $0.25 | $1.50 |
| Seed 1.6 | $0.25 | $2.00 |
| GLM 4.6V | $0.30 | $0.90 |
| GPT-5.2 Pro | $21.00 | $168.00 |
| Qwen3 VL 30B A3B Instruct | $0.13 | $0.52 |
| Codestral 2508 | $0.30 | $0.90 |
| Qwen3 Coder 30B A3B Instruct | $0.07 | $0.27 |
| Nano Banana Pro (Gemini 3 Pro Image) | $2.00 | $12.00 |
| Claude Fable Latest | $10.00 | $50.00 |
| GPT-4.1 | $2.00 | $8.00 |
| Qwen3.6 27B | $0.45 | $2.70 |
| Hunyuan Pro | $0.60 | $1.20 |
| Grok Build 0.1 | $1.00 | $2.00 |
| Mistral Medium 3.5 | $1.50 | $7.50 |
| Anthropic Claude Haiku Latest | $1.00 | $5.00 |
| Anthropic Claude Sonnet Latest | $2.00 | $10.00 |
| GPT-5 Pro | $15.00 | $120.00 |
| Kimi K2 0905 | $0.60 | $2.50 |
| DeepSeek V3.2 Exp | $0.27 | $0.41 |
| Qwen3.5 Plus 2026-04-20 | $0.30 | $1.80 |
| Gemma 3 12B | $0.05 | $0.15 |
| Command A | $2.50 | $10.00 |
| DeepSeek R1 | $0.70 | $2.50 |
| Qwen 2.5 72B | $0.40 | $0.80 |
| Kimi K2.7 Code | $0.75 | $3.50 |
| Lyria 3 Pro Preview | $0.00 | $0.00 |
| GPT-5.2 | $1.75 | $14.00 |
| Devstral 2 2512 | $0.40 | $2.00 |
| GLM 4.5 | $0.60 | $2.20 |
| Gemini 2.5 Flash Lite | $0.10 | $0.40 |
| Qwen3 235B A22B Instruct 2507 | $0.09 | $0.55 |
| Qwen3 32B | $0.08 | $0.28 |
| GPT-4o-mini Search Preview | $0.15 | $0.60 |
| GPT-4o Search Preview | $2.50 | $10.00 |
| Qwen2.5 Coder 32B Instruct | $0.66 | $1.00 |
| Claude 3.5 Sonnet v2 | $3.00 | $15.00 |
| MiniMax M2.1 | $0.30 | $1.20 |
| GPT-5.2 Chat | $1.75 | $14.00 |
| GPT-4o (2024-08-06) | $2.50 | $10.00 |
| Llama 3.1 8B Instruct | $0.05 | $0.08 |
| GPT-5.1-Codex-Mini | $0.25 | $2.00 |
| Qwen-Plus | $0.26 | $0.78 |
| DeepSeek V3 | $0.20 | $0.80 |
| Command R7B (12-2024) | $0.04 | $0.15 |
| Llama 3.3 70B Instruct | $0.13 | $0.40 |
| Kimi K3 | $3.00 | $15.00 |
| Muse Spark 1.1 | $1.25 | $4.25 |
| Kimi K2 Thinking | $0.60 | $2.50 |
| Voxtral Small 24B 2507 | $0.10 | $0.30 |
| gpt-oss-safeguard-20b | $0.07 | $0.30 |
| Qwen3 VL 8B Thinking | $0.12 | $1.36 |
| Llama 3.1 70B Instruct | $0.40 | $0.40 |
| Gemini 2.5 Flash Lite Preview 09-2025 | $0.10 | $0.40 |
| Qwen3 Coder Plus | $0.65 | $3.25 |
| Qwen3 Coder Flash | $0.20 | $0.97 |
| Qwen3 Next 80B A3B Thinking | $0.10 | $0.78 |
| Qwen2.5 VL 72B Instruct | $0.80 | $1.00 |
| R1 Distill Llama 70B | $0.80 | $0.80 |
| R1 | $0.70 | $2.50 |
| Lyria 3 Clip Preview | $0.00 | $0.00 |
| Qwen3 VL 235B A22B Thinking | $0.26 | $2.60 |
| MiniMax-01 | $0.20 | $1.10 |
| Qwen3 VL 235B A22B Instruct | $0.21 | $1.90 |
| Qwen3 Next 80B A3B Instruct | $0.10 | $1.10 |
| Qwen3 14B | $0.10 | $0.24 |
| Qwen3 235B A22B | $0.46 | $1.82 |
| o4 Mini High | $1.10 | $4.40 |
| Gemma 2 27B | $0.65 | $0.65 |
| Mistral Large 3 2512 | $0.50 | $1.50 |
| GPT-5 Codex | $1.25 | $10.00 |
| ERNIE 4.5 VL 424B A47B | $0.42 | $1.25 |
| Claude Sonnet 4 | $3.00 | $15.00 |
| Gemma 3 27B | $0.10 | $0.30 |
| Saba | $0.20 | $0.60 |
| o3 Mini High | $1.10 | $4.40 |
| Llama 3.2 11B Vision Instruct | $0.34 | $0.34 |
| Llama 3.2 1B Instruct | $0.03 | $0.20 |
| GPT-4 Turbo | $10.00 | $30.00 |
| GPT-4 | $30.00 | $60.00 |
| GPT-3.5 Turbo Instruct | $1.50 | $2.00 |
| GPT-3.5 Turbo 16k | $3.00 | $4.00 |
| GPT-3.5 Turbo | $0.50 | $1.50 |
Accelerate your workflow with Araho
Need help choosing the right model for your product? We build AI-native MVPs.
Get your MVP built in weeks with top-tier AI developers.