Meta-Learning for One-Class Classification with Few Examples using Order-Equivariant Network

Ademola Oladosu, Tony Xu, Philip Ekfeldt, Brian A. Kelly, Miles Cranmer, Shirley Ho, Adrian M. Price-Whelan, Gabriella Contardo · DOI

Abstract

This paper presents a meta-learning framework for few-shots One-Class Classification (OCC) at test-time, a setting where labeled examples are only available for the positive class, and no supervision is given for the negative example. We consider that we have a set of 'one-class classification' objective-tasks with only a small set of positive examples available for each task, and a set of training tasks with full supervision (i.e. highly imbalanced classification). We propose an approach using order-equivariant networks to learn a 'meta' binary-classifier. The model will take as input an example to classify from a given task, as well as the corresponding supervised set of positive examples for this OCC task. Thus, the output of the model will be 'conditioned' on the available positive example of a given task, allowing to predict on new tasks and new examples without labeled negative examples. In this paper, we are motivated by an astronomy application. Our goal is to identify if stars belong to a specific stellar group (the 'one-class' for a given task), called stellar streams, where each stellar stream is a different OCC-task. We show that our method transfers well on unseen (test) synthetic streams, and outperforms the baselines even though it is not retrained and accesses a much smaller part of the data per task to predict (only positive supervision). We see however that it doesn't transfer as well on the real stream GD-1. This could come from intrinsic differences from the synthetic and real stream, highlighting the need for consistency in the 'nature' of the task for this method. However, light fine-tuning improve performances and outperform our baselines. Our experiments show encouraging results to further explore meta-learning methods for OCC tasks.

1. Introduction

One-Class Classification (OCC) is a fundamental task in machine learning, typically involving the identification of anomalies or specific rare classes within a large, unlabeled dataset. In many scientific applications, such as astronomy, we encounter a "few-shot" variant of this problem: we possess only a handful of positive examples for a target class and no labeled negative examples. For instance, identifying "stellar streams"—coherent groups of stars orbiting the galaxy—requires searching through millions of foreground stars with only 10 to 20 known stream members. Traditional deep learning and statistical methods struggle in this regime due to extreme class imbalance and the lack of a representative negative set.

2. Methodology: Meta-Deep Sets

We propose a meta-learning framework designed to learn a "meta-distance metric" across a variety of related OCC tasks. By training on a meta-dataset where full supervision is available for many different classes, the model learns the underlying structural logic of what constitutes a "group" in the feature space.

Figure 1: The meta-training process involves teaching the model to identify class membership across diverse tasks using small positive support sets.

The proposed "Meta-Deep Sets" approach shifts the focus from learning a static decision boundary for a single class to learning a generalizable comparison function. The architecture utilizes an order-equivariant Deep Sets network. To ensure the model is properly conditioned on the few available positive examples (the support set), we concatenate the query instance to each element of the support set before passing them through the initial layers. This allows the network to perform pairwise comparisons before aggregating information via a pooling layer, effectively learning how to compare a new star to a known group. This "conditioning" mechanism is more computationally efficient and effective than learning a global set embedding and then comparing it to a query embedding.

3. Experiments and Results

We evaluated our approach on two primary datasets: synthetic stellar streams generated via the Gala galactic dynamics code and injected into real Gaia DR-2 astronomical data, and the real-world GD-1 stream. Stars were represented by 10 features, including sky position, proper motion, and photometry.

Figure 2: At test time, the model successfully generalizes to entirely new, unseen classes (like Waldo) by conditioning its prediction on a few positive examples.

The evaluation on synthetic data demonstrates the power of meta-learning in low-data regimes. On unseen synthetic streams, our Meta-Deep Sets model achieved an F1 score of 0.652, significantly outperforming a Random Forest baseline (0.499).

The transition to real-world data (the GD-1 stream) revealed important insights into the "sim-to-real" gap. While the "out of the box" meta-model was weaker on GD-1 (F1 0.481), likely due to discrepancies between simulated and real-world orbital dynamics, light fine-tuning with a small amount of negative data allowed it to reach an F1 of 0.714, surpassing all baselines. This indicates that the meta-learned features are highly relevant and only require minor adjustments to align with real-world data distributions.

4. Conclusion

This research demonstrates that meta-learning with order-equivariant networks is a promising direction for few-shot OCC tasks. By learning a metric rather than a specific class boundary, the model achieves high data efficiency and eliminates the need for negative supervision at test time. Future work will focus on more complex architectures like Transformers and PointNet++ and improving the realism of synthetic training data to further close the simulation-to-reality gap.

Summary updated

Abstract

This paper presents a meta-learning framework for few-shots One-Class Classification (OCC) at test-time, a setting where labeled examples are only available for the positive class, and no supervision is given for the negative example. We consider that we have a set of `one-class classification' objective-tasks with only a small set of positive examples available for each task, and a set of training tasks with full supervision (i.e. highly imbalanced classification). We propose an approach using order-equivariant networks to learn a 'meta' binary-classifier. The model will take as input an example to classify from a given task, as well as the corresponding supervised set of positive examples for this OCC task. Thus, the output of the model will be 'conditioned' on the available positive example of a given task, allowing to predict on new tasks and new examples without labeled negative examples. In this paper, we are motivated by an astronomy application. Our goal is to identify if stars belong to a specific stellar group (the 'one-class' for a given task), called \textit{stellar streams}, where each stellar stream is a different OCC-task. We show that our method transfers well on unseen (test) synthetic streams, and outperforms the baselines even though it is not retrained and accesses a much smaller part of the data per task to predict (only positive supervision). We see however that it doesn't transfer as well on the real stream GD-1. This could come from intrinsic differences from the synthetic and real stream, highlighting the need for consistency in the 'nature' of the task for this method. However, light fine-tuning improve performances and outperform our baselines. Our experiments show encouraging results to further explore meta-learning methods for OCC tasks.
BibTeX
@misc{oladosu2020meta,
  author = {Ademola Oladosu and Tony Xu and Philip Ekfeldt and Brian A. Kelly and Miles Cranmer and Shirley Ho and Adrian M. Price-Whelan and Gabriella Contardo},
  title = {{Meta-Learning for One-Class Classification with Few Examples using Order-Equivariant Network}},
  year = {2020},
  eprint = {2007.04459},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.04459},
}
Figure