atlas

Research map / Reinforcement learning / Visual and representation RL

TorchRL: A data-driven decision-making library for PyTorch

ICLR 2024 · Reinforcement learning › Visual and representation RL · approach: RL with tree search for discovery · 16 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Presents TorchRL, a modular PyTorch reinforcement learning and control library built around the TensorDict data carrier, with reproduction, distributed, offline, multi-agent and efficiency benchmarks.

Problem

PyTorch lacks a native, comprehensive library for decision-making and control that is both well-integrated and flexible enough for large teams and diverse RL tasks, and existing libraries trade off modularity against ease of use.

Approach

Introduces TensorDict, a dictionary-like, batch-size-aware PyTorch data carrier used as the common interface between independent components (environments, collectors, replay buffers, modules, losses), so that components can be swapped and reused without coupling.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use TorchRL instead of RLlib for vectorized data collectionSimple spread in VMAS · Simple spread, 30000 vectorized environmentsframes per second: 422003 vs 1336Helped
Use TorchRL-vec instead of CleanRL for GAE computationGAE implementations · 1000 trajectories of 1000 time stepsspeed (ms): 1.43 vs 1.33Helped
Use TorchRL async collector instead of TorchRL sync collectorTorchRL data collection · Breakout-v5frames per second: 10394 -> 19401Helped
Use TorchRL async collector instead of TorchRL sync collectorTorchRL data collection · HalfCheetah-v4frames per second: 23527 -> 32894Helped
Use TorchRL async collector instead of TorchRL sync collectorTorchRL data collection · Pendulum-v1frames per second: 24530 -> 31584Helped
Use TensorDict rather than PyTree for scalar-leaf increment in a deeply nested structureTensorDict · 100-level nested dictionaryruntime (ms): 0.916 ms vs 1.0555 msHurt
Use TensorDict rather than PyTree for CUDA castingTensorDict · 100-level nested dictionaryruntime (ms): 1.181 ms vs 1.302 msHurt
Use TensorDict rather than PyTree for splitTensorDict · Batch-size operation on deeply nested structureruntime (ms): 1.015 ms against 4.254 msHurt
Use TensorDict functional calls instead of functorch functional callsTransformer functional calls · Narrow, deep Transformerruntime (ms): 8.423 ms against 10.26071 msHurt

Surprising findings

Limitations

Experimental setup

Datasets: D4RL OpenML ImageNet

Benchmarks: MuJoCo (HalfCheetah, Hopper, Walker2D, Ant) Atari (Pong, Freeway, Boxing, Breakout) D4RL medium-replay (HalfCheetah, Hopper) VMAS simple spread / multi-robot tasks

Metrics: mean final reward std over seeds frames per second runtime ms data collection speed

Baselines: RLlib Tianshou CleanRL Stable-baselines3 Gymnasium

Builds on: PyTorch OpenAI Gym tensordict torch.vmap

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy