English

In-Context Positive-Unlabeled Learning

Machine Learning 2026-05-08 v1 Machine Learning Computation

Abstract

Positive-unlabeled (PU) learning addresses binary classification when only a set of labeled positives is available alongside a pool of unlabeled samples drawn from a mixture of positives and negatives. Existing PU methods typically require dataset-specific training or iterative optimization, which limits their applicability when many tasks must be solved quickly or with little tuning. We introduce PUICL, a pretrained transformer that solves PU classification entirely through in-context learning. PUICL is pretrained on synthetic PU datasets generated from randomly instantiated structural causal models, exposing it to a wide range of feature-label relationships and class-prior configurations. At inference time, PUICL receives the labeled positives and the unlabeled samples as a single input and returns class probabilities for the unlabeled rows in one forward pass, with no gradient updates or per-task fitting. On 20 semi-synthetic PU benchmarks derived from the UCI Machine Learning Repository, OpenML, and scikit-learn, PUICL outperforms four standard PU learning baselines in average AUC and accuracy, and is competitive on F1-score. These results show that the in-context learning paradigm extends naturally beyond fully supervised tabular prediction to the semi-supervised PU setting.

Keywords

Cite

@article{arxiv.2605.05591,
  title  = {In-Context Positive-Unlabeled Learning},
  author = {Siyan Liu and Yi Chang and Manli Cheng and Qinglong Tian and Pengfei Li},
  journal= {arXiv preprint arXiv:2605.05591},
  year   = {2026}
}

Comments

12 pages, 1 figure, 3 tables

R2 v1 2026-07-01T12:53:57.655Z