Skip to main content
QUICK REVIEW

[Paper Review] Multi-task Batch Reinforcement Learning with Metric Learning

Jiachen Li, Quan Vuong|arXiv (Cornell University)|Sep 25, 2019
Reinforcement Learning in RoboticsComputer Science77 references10 citations
TL;DR

This paper proposes MBML, a multi-task batch reinforcement learning method that uses metric learning via triplet loss to improve robust task inference in the presence of distributional shift across offline datasets. By relabeling rewards to create hard negative examples, the method forces the policy to attend to rewards rather than spurious state-action correlations, achieving up to 80% faster convergence when fine-tuning on unseen tasks.

ABSTRACT

We tackle the Multi-task Batch Reinforcement Learning problem. Given multiple datasets collected from different tasks, we train a multi-task policy to perform well in unseen tasks sampled from the same distribution. The task identities of the unseen tasks are not provided. To perform well, the policy must infer the task identity from collected transitions by modelling its dependency on states, actions and rewards. Because the different datasets may have state-action distributions with large divergence, the task inference module can learn to ignore the rewards and spuriously correlate $ extit{only}$ state-action pairs to the task identity, leading to poor test time performance. To robustify task inference, we propose a novel application of the triplet loss. To mine hard negative examples, we relabel the transitions from the training tasks by approximating their reward functions. When we allow further training on the unseen tasks, using the trained policy as an initialization leads to significantly faster convergence compared to randomly initialized policies (up to $80\%$ improvement and across 5 different Mujoco task distributions). We name our method $ extbf{MBML}$ ($ extbf{M} ext{ulti-task}$ $ extbf{B} ext{atch}$ RL with $ extbf{M} ext{etric}$ $ extbf{L} ext{earning}$).

Motivation & Objective

  • To address the challenge of poor generalization in multi-task batch reinforcement learning when offline datasets have large state-action distribution shifts.
  • To mitigate the risk of task inference modules learning spurious correlations between state-action pairs and task identities due to lack of overlap in data distributions.
  • To improve zero-shot performance on unseen tasks by enabling the policy to infer task identity from context transitions without access to ground-truth task labels.
  • To accelerate fine-tuning on new tasks by using the trained multi-task policy as an effective initialization.
  • To demonstrate that metric learning with hard negative mining via reward relabeling leads to better generalization than standard approaches.

Proposed method

  • The method introduces a triplet loss objective to train a task embedding network that distinguishes between positive and negative context transitions.
  • Hard negative examples are created by approximating the reward function of each task and relabeling transitions from other tasks with these approximated rewards.
  • The policy network is trained to infer task identity using both state-action pairs and rewards, with the triplet loss encouraging separation between different tasks in embedding space.
  • The approach uses a multi-task Q-network architecture with shared representations and task-specific heads, trained via offline data from diverse tasks.
  • The method integrates with off-policy algorithms like SAC, using the multi-task policy as an initialization for on-policy fine-tuning.
  • A variant of SAC is used to evaluate fine-tuning performance, with ablation studies showing the necessity of both reward relabeling and triplet loss.

Experimental results

Research questions

  • RQ1Can metric learning with hard negative mining improve task inference robustness in multi-task batch RL under distributional shift?
  • RQ2Does relabeling rewards from other tasks help the policy avoid learning spurious correlations between state-action pairs and task identities?
  • RQ3How does the proposed method compare to standard offline RL baselines in zero-shot generalization to unseen tasks?
  • RQ4To what extent does the multi-task policy serve as an effective initialization for fine-tuning on new tasks?
  • RQ5What is the contribution of each component—triplet loss, reward relabeling, and multi-task training—to overall performance?

Key findings

  • The proposed method, MBML, achieves up to 80% improvement in sample efficiency during fine-tuning on unseen tasks compared to randomly initialized policies.
  • The ablation study shows that removing either the triplet loss or reward relabeling leads to significant performance drops, confirming their necessity.
  • MBML outperforms strong baselines like PEARL and contextual BCQ across all evaluated task distributions, including AntDir, AntGoal, HDir, UGoal, HalfCheetahVel, and WalkerParam.
  • The method generalizes well to unseen tasks even without access to ground-truth task identities or reward functions during inference.
  • The runtime for training the full MBML model ranges from 3.9 to 26.6 hours depending on the task distribution, with SAC fine-tuning initialized by MBML being significantly faster.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.