Standard imitation learning operates on a simple premise: the expert demonstrations are "good" (positive) and everything else—whether it is random exploration or background data—is "bad" (negative). Algorithms like Generative Adversarial Imitation Learning (GAIL) or Behavioral Cloning (BC) use this binary distinction to train a policy.
However, real-world data is rarely this clean. Expert demonstrations often contain mistakes, and "suboptimal" background datasets often contain snippets of high-quality behavior. When we force a model to treat these messy datasets as strictly positive or negative, the learner becomes confused, either mimicking the expert's failures or ignoring the agent's own discoveries.
A growing body of research addresses this by reframing imitation as Positive-Unlabeled (PU) learning. Instead of a binary classifier, these methods use a discriminator that understands the data is a mixture, allowing agents to extract expert-level performance from imperfect sources.
The Binary Classification Trap
In traditional adversarial imitation, a discriminator is trained to distinguish between expert transitions and agent transitions. If the expert data is "contaminated" with suboptimal actions, the discriminator learns to reward those mistakes. Conversely, if the agent happens to discover a strategy better than the expert's, the discriminator will penalize it simply because it doesn't look like the (imperfect) demonstration.
To break this cycle, researchers have turned to PU learning. In this framework, we assume we have a small set of "Positive" examples (the true expert behavior) and a large "Unlabeled" set (which contains a mix of both expert and non-expert behavior).
Denoising the Expert Set
When the "expert" dataset itself is noisy, we cannot treat every transition as a gold standard. Yunke Wang and Chang Xu address this in Unlabeled Imperfect Demonstrations in Adversarial Imitation Learning. Their framework, UID, treats the expert demonstration set as unlabeled data.
By applying PU learning, the discriminator learns to identify which parts of the "expert" data are actually optimal and which are noise. This prevents the agent from mimicking the failures or inefficient paths that often plague real-world demonstration datasets. The discriminator effectively becomes a filter, focusing the agent's attention only on the high-quality signals within the messy demonstrations.
Weighting Suboptimal Background Data
A different challenge arises when we have a small expert set and a large, task-agnostic background dataset. In Discriminator-Weighted Offline Imitation Learning from Suboptimal Demonstrations, Haoran Xu and Haoran Xu 0003 introduce DWBC.
DWBC uses a cooperative discriminator to weight the behavioral cloning process. Instead of treating the suboptimal data as purely negative, it uses PU learning to treat it as unlabeled. This allows the algorithm to recognize expert-like transitions that happen to exist within the suboptimal dataset. By weighting the loss function based on these discriminator scores, DWBC can extract a policy that outperforms the average quality of the data it was trained on.
Robustness to Incomplete Trajectories
The PU learning framing also provides a solution for "Imitation from Observation" (IfO), where the agent only has access to expert states (videos) without the corresponding actions. Kai Yan and Alexander G. Schwing developed TAILO (A Simple Solution for Offline Imitation from Observations and Examples with Possibly Incomplete Trajectories) to handle cases where these expert trajectories are incomplete or the physics don't perfectly match.
TAILO uses a trajectory-aware weighting scheme rooted in PU learning. By treating the background data as a mixture of expert and non-expert behavior, TAILO avoids incorrectly penalizing the agent for states that are actually task-relevant but weren't captured in the sparse expert videos.
Empowering Online Exploration
Finally, PU learning helps bridge the gap between offline imitation and online reinforcement learning. In Hybrid Policy Optimization from Imperfect Demonstrations, Hanlin Yang and Chao Yu propose HYPO.
In HYPO, the agent's self-generated data is treated as an unlabeled mixture. This is crucial because as an agent learns, it may discover strategies that are superior to the original, imperfect demonstrations. A standard discriminator would penalize these new strategies for being "non-expert." By using PU learning, the HYPO discriminator recognizes these high-quality self-generated actions as "positive," allowing the agent to surpass the performance of its teachers without being held back by their mediocrity.