Abstract: Active learning is commonly used to train label-efficient models by adaptively selecting the most informative queries. However, most active learning strategies are designed to either learn a representation of the data (e.g., embedding or metric learning) or perform well on a task (e.g., classification) on the data. Many machine learning tasks involve a combination of both representation learning and a task-specific goal. Motivated by this, we propose a novel unified query framework that can be applied to any problem in which a key component is learning a representation of the data that reflects similarity. Our approach builds on similarity or nearest neighbor (NN) queries which seek to select samples that result in improved embeddings. The queries consist of a reference and a set of objects, with an oracle selecting the object most similar to the reference. In order to reduce the number of solicited queries, they are chosen adaptively according to an information theoretic criterion. We demonstrate the effectiveness of the proposed strategy on two tasks—active metric learning and active classification—using a variety of synthetic and real-world datasets. In particular, we demonstrate that actively selected NN queries outperform recently developed active triplet selection methods in a deep metric learning setting. Further, we show that in classification, actively selecting class labels can be reformulated as a process of selecting the most informative NN query, allowing direct application of our method.
Introduction
Active Learning (AL) aims to reduce the burden of data labeling by having a model "ask" for the labels of only the most useful samples. Traditionally, AL is split into two camps: Active Metric Learning, which focuses on learning a distance function or embedding where similar items are close together, and Active Classification, which focuses on assigning discrete labels to data points. These two tasks are deeply connected but usually studied in isolation. Furthermore, metric learning often relies on class labels as a proxy for similarity, which isn't always available. The challenge addressed in this work is to create a "problem-agnostic" framework that can handle both tasks using a single type of query that captures the underlying structure of the data.
The Unified Framework
The core of this framework is the Nearest Neighbor (NN) query. Instead of a simple binary choice, an NN query provides an oracle with a reference point $r$ and a set of $M$ alternatives, asking: "Which of these alternatives is most similar to the reference?"
As shown in Figure 1, the framework utilizes an encoder to map inputs to an embedding space. From this space, a candidate query pool is formed. To pick the best query, the authors use an information-theoretic selection strategy called Info-NN, based on Mutual Information (MI). They select queries that maximize the information gain about the model's embedding. Computing MI in high-dimensional embedding spaces is typically difficult; however, the authors leverage the symmetry of mutual information to move the calculation into the "response space" (the set of possible answers to the query), which is much smaller and more tractable.
Bridging Classification and Metric Learning
A key insight of this paper is the reformulation of classification as a similarity task. The authors demonstrate that asking for a class label is mathematically equivalent to a constrained NN query. For an unlabeled point, the "alternatives" are the nearest labeled examples from every possible class. Finding the label is essentially finding which class-representative is the "nearest neighbor." This allows the same Info-NN selection logic to be applied directly to classification tasks, bridging the gap between discriminative and representative learning.
Experimental Results
The framework was evaluated on diverse benchmarks, including synthetic data, the Food73 similarity dataset, and standard image classification sets like MNIST and CIFAR-10. In Deep Metric Learning (DML) settings, Info-NN consistently outperformed random selection and state-of-the-art batch triplet methods.
As illustrated in Figure 4, the Info-NN-3 strategy achieves significantly higher triplet generalization accuracy with fewer queries compared to random triplets or batch-based methods. In classification tasks, the similarity-based approach performed on par with or better than specialized active learning algorithms like BatchBALD. Qualitative results using t-SNE visualizations further confirmed that Info-NN successfully organizes datasets into intuitive clusters based purely on similarity queries.
Conclusion
This work introduces a unified active learning framework that treats both metric learning and classification as a single problem of selecting informative NN queries. By using the Info-NN selection strategy, the model can learn better data representations and classifiers with significantly fewer interactions with a human oracle. While the method currently relies on an initial embedding and faces some computational overhead during re-training, it provides a powerful, modular approach for label-efficient machine learning. Future work may explore extensions to regression tasks and the integration of pre-trained models to further accelerate the learning process.
Summary updated