Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Berkeley AI Research 8 min read Research hardMaster

RL without TD learning

Transitive RL (TRL) is an off-policy, goal-conditioned RL algorithm that replaces temporal-difference bootstrapping with divide-and-conquer value learning. It exploits the triangle inequality on temporal distances, using a transitive Bellman update V(s,g) ← V(s,w)·V(w,g). Two choices make it practical: subgoals w are restricted to intermediate states from the same dataset trajectory, and a hard max is replaced with expectile regression, which avoids overestimation. This cuts the number of Bellman recursions from linear to logarithmic in the horizon. On the hardest OGBench humanoidmaze and puzzle tasks (1B-sample datasets, up to 3,000 steps), TRL beats TD, MC and quasimetric baselines on most tasks and matches the best individually tuned n-step TD without choosing n. Open problems include stochastic dynamics and extending the method to reward-based RL.

Assumes: reinforcement learning basicsQ-learning and Bellman equationsoff-policy vs on-policy RLexpectile regression

Related posts

  • Train your first Decision Transformer

    Hugging Face hardMaster

    Decision Transformers recast reinforcement learning as conditional sequence modeling: a GPT-2 model takes the last K timesteps of return-to-go, state and action tokens and autoregressively predicts actions that achieve a desired return. This walkthrough trains an offline Decision Transformer from scratch on the HalfCheetah expert dataset from the Hugging Face hub. A custom data collator normalizes states, computes returns-to-go, scales rewards by 1000, pads sequences and samples trajectories by length. A subclassed model adds an MSE action loss so the standard transformers Trainer can be used, and training takes about 40 minutes in Colab versus roughly 3 hours in the original paper.

  • TRL v1.0: Post-Training Library Built to Move with the Field

    Hugging Face mediumAdept

    TRL v1.0 turns Hugging Face's post-training codebase, now covering 75+ methods and downloaded 3M times a month, into a library with an explicit stability contract. A semver-governed stable core (SFT, DPO, reward modeling, RLOO, GRPO trainers) sits alongside a fast-moving trl.experimental namespace. Methods are promoted based on the ratio of usage to maintenance cost. Because post-training paradigms keep shifting (PPO to DPO to RLVR/GRPO), the design deliberately avoids shared base classes and generic abstractions and accepts near line-for-line duplication between trainers like RLOO and GRPO, illustrated by the failed Judge abstraction. A comparison against OpenRLHF, veRL, PRIME-RL, Tinker, LLaMA-Factory and others positions TRL as broad, low-infrastructure and stable but lacking native tensor parallelism, with asynchronous GRPO planned next.

  • Introducing Decision Transformers on Hugging Face 🤗

    Hugging Face mediumAdept

    Decision Transformer, an offline reinforcement learning method that recasts RL as return-conditioned sequence modeling, is now part of the 🤗 transformers library, with nine pretrained checkpoints for Gym continuous-control tasks (Hopper, Walker2D, HalfCheetah). Instead of fitting a value function, a GPT-2 model takes the last K timesteps of return-to-go, state and action tokens and autoregressively predicts actions that reach a desired return. Code covers loading the model, padding and masking a 20-step context window, normalizing states with the mean and standard deviation from each model card, and running an evaluation loop. Setting the target return directly controls how well the resulting policy performs.

  • Putting RL back in RLHF

    Hugging Face hardMaster

    RLOO (REINFORCE Leave-One-Out) is now available as a trainer in Hugging Face TRL. It is an online RLHF algorithm that drops PPO's value model. It treats the whole completion as a single action, uses the REINFORCE loss, and computes each sample's baseline as the mean reward of the other k−1 completions for the same prompt. That cuts vRAM by roughly 50-70% and makes training 2-3x faster than PPO on Pythia 1B and 6.9B, while matching PPO's GPT-4-judged win rate (78.7% for 6.9B on TL;DR) and beating DPO. Code walkthroughs show the advantage computation and that REINFORCE is a special case of the PPO loss. There is a caveat: bf16 numerical mismatches between generation and training logprobs hurt RLOO more than PPO.

  • Building an RL theorem-proving workflow on Modal

    Modal hardMaster

    AE Studio built a reinforcement-learning loop on Modal that trains an LLM to write Lean proofs, comparing Evolution Strategies (ES) against GRPO using Lean verification as the reward. vLLM generation runs on GPU workers fanned out with .map(), Lean verification runs in short-lived sandboxes so bad proofs can't crash the run, and model state is stored as a ~200-byte-per-iteration history of perturbation seeds and rewards that each worker replays onto base weights from a Volume. ES matched or beat GRPO in several runs and looked sample efficient with limited data, though results varied and scaling remains unclear. The authors estimate the run cost about $122, with generation at 147s of a 538s iteration, but these figures are vendor-favorable estimates.

The quest for software engineering knowledge.

Look:
Layout: