UNIQ: Offline Inverse Q-learning for Avoiding Undesirable Demonstrations
Huy Hoang, Tien Mai, Pradeep Varakantham
TL;DR
UNIQ addresses offline learning from undesirable demonstrations by reframing imitation as maximizing a statistical distance between the learner's state-action occupancy and the undesired policy in the stationary distribution space. It adopts an offline inverse Q-learning approach, augmented with occupancy-ratio corrections and a weighted-behavior-cloning policy extraction, enabling robust learning from a small set of undesired demonstrations and a large unlabeled dataset. The method demonstrates strong safety-focused performance on Safety-Gym and MuJoCo velocity tasks, often achieving the lowest costs while maintaining competitive returns, and requires minimal hyper-parameter tuning. The work advances practical safe-RL by providing a principled, data-efficient framework for avoiding harmful trajectories in offline settings, with broader implications for healthcare and autonomous systems.
Abstract
We address the problem of offline learning a policy that avoids undesirable demonstrations. Unlike conventional offline imitation learning approaches that aim to imitate expert or near-optimal demonstrations, our setting involves avoiding undesirable behavior (specified using undesirable demonstrations). To tackle this problem, unlike standard imitation learning where the aim is to minimize the distance between learning policy and expert demonstrations, we formulate the learning task as maximizing a statistical distance, in the space of state-action stationary distributions, between the learning policy and the undesirable policy. This significantly different approach results in a novel training objective that necessitates a new algorithm to address it. Our algorithm, UNIQ, tackles these challenges by building on the inverse Q-learning framework, framing the learning problem as a cooperative (non-adversarial) task. We then demonstrate how to efficiently leverage unlabeled data for practical training. Our method is evaluated on standard benchmark environments, where it consistently outperforms state-of-the-art baselines. The code implementation can be accessed at: https://github.com/hmhuy0/UNIQ.
