Unleashing the Power of Pre-trained Language Models for Offline Reinforcement Learning

Ruizhe Shi, Yuyao Liu, Yanjie Ze, Simon S. Du, Huazhe Xu

TL;DR

LaMo (Language Models for Motion Control) successfully repurposes the sequence-modeling power of pre-trained language models (like GPT-2) for offline reinforcement learning. By combining parameter-efficient fine-tuning (LoRA), non-linear MLP embeddings, and an auxiliary language loss, LaMo significantly outperforms standard Decision Transformers and value-based methods, particularly in data-scarce and sparse-reward environments.

What Problem Does This Paper Address?

Offline reinforcement learning (RL) allows agents to learn effective policies from pre-collected datasets without risky or costly real-time environment interaction. However, sequence-modeling approaches to offline RL, such as the Decision Transformer (DT), are notoriously data-hungry. When the available dataset is small or the environment rewards are sparse, training these architectures from scratch often fails.

While Large Language Models (LLMs) possess incredible few-shot capabilities and robust sequence-modeling priors, transferring these text-based weights to low-level continuous motion control remains a major challenge. This paper addresses the critical domain gap between language tokens and physical states/actions to unlock the power of pre-trained language models for data-limited offline RL.

Methods

The authors introduce LaMo, a framework that adapts a pre-trained language model backbone for offline RL using four crucial design components:

  1. Language Model Initialization: Instead of training a Decision Transformer from scratch, the architecture is initialized with the weights of a sequentially pre-trained language model (specifically GPT-2).
  2. Low-Rank Adaptation (LoRA): Rather than full-weight fine-tuning—which destroys the model's pre-trained sequence priors and causes overfitting—LaMo freezes the foundational LM weights. It injects trainable LoRA layers, meaning only 0.7% of the entire model's parameters are updated.
  3. Non-linear MLP Projections: Standard Decision Transformers use simple linear layers to map states, actions, and returns into embeddings. LaMo replaces these with Multi-Layer Perceptrons (MLPs) to better bridge the structural domain gap between language tokens and continuous physical states.
  4. Auxiliary Language Loss: During RL fine-tuning, the model is simultaneously trained on a next-token prediction task using a standard text corpus (WikiText). This joint training acts as a regularizer, stabilizing the model and preventing it from overfitting to the narrow offline RL dataset.
Figure 2: The overview of LaMo. LaMo mainly consists of two stages: (1) pre-training LMs on language tasks, (2) freezing the pre-trained attention layers, replacing linear projections with MLPs, and using LoRA to adapt to RL tasks. We also apply the language loss during the offline RL stage as a regularizer.

Datasets

LaMo was evaluated across 8 tasks spanning 3 distinct domains from the standard D4RL benchmark:

  • Kitchen: A sparse-reward robotic manipulation environment (tested on Complete and Partial datasets).
  • MuJoCo: Continuous locomotion tasks (Hopper, HalfCheetah, Walker2d).
  • Atari: Discrete control tasks from pixel inputs (Breakout, Qbert, Pong).

To rigorously evaluate performance in data-scarce regimes, the authors randomly downsampled these datasets to small fractions (e.g., 10%, 1%, or even 0.005% of the original data size).

Key Insights and Ideas

  • Language Priors Transfer to Physics: Pre-trained language models possess abstract sequential modeling capabilities that can be directly mapped to physical motion control, even without providing textual descriptions of the environment.
  • LoRA is a Safeguard Against Overfitting: In low-data regimes, full-weight fine-tuning degrades the generalizable knowledge embedded within the language model. Freezing the core weights and adapting via LoRA preserves these vital sequence priors.
  • Linear Layers are a Bottleneck: Continuous physical states cannot be easily aligned with language token spaces using simple linear projections. Non-linear MLP transformations are essential to bridge the cross-domain gap.
  • Multitasking as Regularization: Training on language and motion control simultaneously prevents the model from losing its foundational sequence-modeling capabilities, ensuring stable convergence during offline RL training.

Key Results

  • Data-Scarce Dominance: In highly limited data regimes (e.g., 1% of the dataset), LaMo demonstrates a massive advantage. On MuJoCo tasks with minimal data, LaMo improves upon standard Decision Transformers by an average of 46%.
  • Sparse-Reward Superiority: On the challenging, sparse-reward Kitchen tasks, LaMo achieves an average normalized score of 47.9, significantly outperforming standard DT (36.5) and value-based Conservative Q-Learning (10.6), which suffers from severe overfitting.
  • Closing the Gap in Dense Tasks: In dense-reward Atari tasks with limited data (10% sample ratio), LaMo outperforms standard DT by an average of 99%, effectively narrowing the performance gap between sequence-based methods and traditional value-based RL algorithms.
Figure 3: Normalized score obtained by LaMo, CQL, and DT on various data sample ratios. Mean of 3 seeds with number 0, 1, 2. Shaded area is [µ −0.5σ, µ + 0.5σ] interval, where µ is the average and σ is the standard deviation.

Limitations and Future Work

  • Diminishing Returns with Abundant Data: In dense-reward environments where offline data is plentiful, traditional value-based methods like CQL remain highly competitive or superior, as sequence-modeling priors become less critical.
  • Task-Specific Auxiliary Loss Benefits: The auxiliary language prediction loss primarily boosts performance in low-horizon tasks (like Kitchen) but provides less pronounced benefits in longer-horizon locomotion tasks.
  • Challenges in Scaling Up: The authors noted that scaling up to larger architectures like LLaMA did not yield immediate performance gains over GPT-2 within their pipeline, suggesting that simply increasing model size requires more sophisticated domain-alignment strategies.

Summary updated

BibTeX
@inproceedings{shi2024unleashing,
  author = {Ruizhe Shi and Yuyao Liu and Yanjie Ze and Simon S. Du and Huazhe Xu},
  title = {{Unleashing the Power of Pre-trained Language Models for Offline Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=AY6aM13gGF},
}
Figure