SEABO: A Simple Search-Based Method for Offline Imitation Learning

Jiafei Lyu, Xiaoteng Ma, Le Wan, Runze Liu, Xiu Li, Zongqing Lu

Abstract

Offline Reinforcement Learning (RL) typically relies on high-quality, reward-labeled datasets, which are often unavailable in real-world scenarios. Offline Imitation Learning (IL) attempts to bridge this gap by leveraging expert demonstrations to label unlabeled datasets. However, existing IL methods often rely on complex adversarial training or computationally expensive optimal transport calculations. This paper introduces SEABO (SEArch-Based Offline imitation learning), a non-parametric method that utilizes KD-trees to assign rewards based on geometric proximity to expert data. SEABO demonstrates that a simple search-based approach can match or exceed the performance of state-of-the-art neural reward models while remaining significantly more efficient.

1. Introduction

The promise of offline RL lies in its ability to derive optimal policies from static datasets, eliminating the risks associated with online exploration. A significant bottleneck, however, is the requirement for perfectly labeled reward signals. While large-scale logs of system behavior are often available, they rarely include the precise reward functions necessary for standard RL algorithms.

Presented at ICLR 2024, SEABO (SEArch-Based Offline imitation learning) challenges the necessity of complex neural discriminators or optimal transport math for reward recovery. Instead, it posits that the geometric distance between unlabeled transitions and expert demonstrations provides a sufficient and robust reward signal.

2. Problem Formulation

In the offline IL setting, we are provided with a large, unlabeled dataset $\mathcal{D}_{unlabeled}$ consisting of transitions $(s, a, s')$ and a small set of expert demonstrations $\mathcal{E}$. The goal is to learn a policy $\pi$ that mimics the expert behavior by assigning synthetic rewards to $\mathcal{D}_{unlabeled}$.

Traditional methods face three primary hurdles:

  1. Instability: Adversarial training (e.g., GAN-based discriminators) is notoriously difficult to balance.
  2. Computational Cost: Neural reward models require significant GPU resources and training time.
  3. Distribution Shift: Reward signals often degrade when the unlabeled data distribution deviates significantly from the expert demonstrations.

3. Methodology

SEABO adopts a non-parametric approach to reward assignment, focusing on the principle that transitions similar to expert behavior should receive higher rewards. The process follows four distinct steps:

3.1 KD-Tree Construction

The algorithm first organizes the expert demonstrations into a KD-tree, a space-partitioning data structure optimized for multi-dimensional nearest neighbor queries. This structure allows for rapid searching even in high-dimensional state-action spaces.

3.2 Nearest Neighbor Query

For every transition in the unlabeled dataset, SEABO performs a query against the KD-tree to identify the single closest expert transition. This provides a local reference point for evaluating the quality of the unlabeled data.

3.3 Distance-to-Reward Conversion

The Euclidean distance ($d$) between the unlabeled sample and its nearest expert neighbor is converted into a reward ($r$) using an exponential squashing function:

$$r = \alpha \exp \left( -\frac{\beta \times d}{|A|} \right)$$

Here, $\alpha$ and $\beta$ are hyperparameters, and $|A|$ represents the action dimension. This function ensures that rewards are bounded and decay smoothly as the distance from the expert manifold increases.

3.4 Offline RL Integration

Once the rewards are assigned, the dataset is treated as a standard labeled offline RL dataset. Any off-the-shelf offline RL algorithm, such as Implicit Q-Learning (IQL) or TD3+BC, can then be used to train the final policy.

4. Experimental Results

SEABO was evaluated across the D4RL benchmark, including MuJoCo locomotion, AntMaze, Adroit robotic manipulation, and Kitchen long-horizon tasks.

4.1 Performance Benchmarks

  • MuJoCo Locomotion: SEABO paired with IQL achieved a total score of 713.3, notably outperforming IQL trained on ground-truth rewards (692.4). This suggests that the search-based reward may actually provide a smoother optimization landscape than hand-crafted rewards.
  • Complex Manipulation: In the high-dimensional Adroit tasks, SEABO improved performance by 32% over vanilla IQL. In the Kitchen benchmark, it surpassed IQL with raw rewards by 21%.
  • Data Efficiency: SEABO remains competitive even when provided with only a single expert trajectory. Furthermore, it functions effectively in "state-only" regimes where action labels for the expert are missing, by building the KD-tree on $(s, s')$ transitions.

4.2 Computational Efficiency

A key advantage of SEABO is its speed. Annotating a dataset of 1 million transitions takes approximately one minute on a standard CPU. This is orders of magnitude faster than neural-based reward models that require hours of GPU training.

5. Discussion and Limitations

While SEABO offers a robust and simple baseline, it is not without limitations. The weighting coefficient $\beta$ requires careful tuning for different tasks to ensure the reward signal is neither too sparse nor too dense. Additionally, the current implementation relies on low-dimensional state vectors; applying SEABO to visual inputs (pixels) would require a pre-trained encoder to generate meaningful embeddings for the KD-tree. Finally, the use of Euclidean distance may lack the nuance required for tasks involving extreme precision, such as fine-grained assembly.

6. Conclusion

SEABO demonstrates that complex neural architectures are not always necessary for effective offline imitation learning. By returning to fundamental search-based principles, SEABO provides a fast, stable, and highly performant method for labeling offline data. It serves as a powerful reminder that in the era of deep learning, simple non-parametric baselines can still set the standard for efficiency and reliability.

Summary updated

BibTeX
@inproceedings{lyu2024seabo,
  author = {Jiafei Lyu and Xiaoteng Ma and Le Wan and Runze Liu and Xiu Li and Zongqing Lu},
  title = {{SEABO: A Simple Search-Based Method for Offline Imitation Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=MNyOI3C7YB},
}
Figure