libcll: an Extendable Python Toolkit for Complementary-Label Learning

Nai-Xuan Ye, Tan-Ha Mai, Hsiu-Hsuan Wang, Wei-I Lin, Hsuan-Tien LinarXiv 2024

Abstract

Complementary-label learning (CLL) is a weakly supervised learning paradigm for multiclass classification, where only complementary labels—indicating classes an instance does not belong to—are provided to the learning algorithm. Despite CLL's increasing popularity, previous studies highlight two main challenges: (1) inconsistent results arising from varied assumptions on complementary label generation, and (2) high barriers to entry due to the lack of a standardized evaluation platform across datasets and algorithms. To address these challenges, we introduce libcll, an extensible Python toolkit for CLL research. libcll provides a universal interface that supports a wide range of generation assumptions, both synthetic and real-world datasets, and key CLL algorithms. The toolkit is designed to mitigate inconsistencies and streamline the research process, with easy installation, comprehensive usage guides, and quickstart tutorials that facilitate efficient adoption and implementation of CLL techniques. Extensive ablation studies conducted with libcll demonstrate its utility in generating valuable insights to advance future CLL research.

Introduction

In traditional supervised learning, models are trained using precise labels (e.g., "this image is a dog"). However, in many practical scenarios, obtaining such exact labels is costly or difficult. Complementary-Label Learning (CLL) offers a more flexible alternative: an annotator only needs to specify a class the instance is not (e.g., "this is not a cat").

Despite its potential, the CLL research landscape has historically been fragmented. Researchers often rely on disparate assumptions regarding how these "negative" labels are generated, utilize inconsistent neural network architectures, and rarely release standardized source code. This lack of uniformity creates an "apples-to-oranges" comparison trap, making it difficult to determine which algorithms truly represent the state-of-the-art. libcll was developed to provide a fair, reproducible, and modular evaluation platform to unify the field.

Toolkit Architecture and Methodology

Built upon the PyTorch-Lightning framework, libcll features a modular architecture that allows researchers to independently configure datasets, models, and label-generation assumptions. This design ensures that experiments are both flexible and reproducible.

Overview of the components included in the libcll toolkit, including datasets, models, and algorithms.

The toolkit categorizes CLL algorithms into three primary methodological branches:

  1. Unbiased Risk Estimator (URE): Methods that attempt to reconstruct the true classification risk using only complementary labels.
  2. Complementary Probability Estimation (CPE): Approaches that treat prediction as a decoding process involving a transition matrix.
  3. Multiple Complementary Label (MCL): Techniques specifically designed for scenarios where a single instance may be associated with several "not-this" labels.

Furthermore, libcll includes a robust pipeline for generating synthetic complementary labels based on various distributions—uniform, biased, or noisy—and calculating the corresponding transition matrices required for certain algorithms.

Dataset Support

The toolkit supports 15 datasets, offering a comprehensive mix of classic benchmarks and challenging real-world scenarios:

  • Synthetic Benchmarks: 11 datasets including image-based sets like MNIST, FMNIST, KMNIST, CIFAR-10, and CIFAR-20, as well as tabular data such as Yeast and Texture.
  • Real-World Benchmarks: 4 datasets (CLCIFAR10/20 and CLMicroImageNet10/20) that utilize actual human-annotated complementary labels. These are inherently noisier and more biased than synthetic counterparts, providing a more rigorous test of algorithmic robustness.

Benchmarking and Key Insights

Extensive ablation studies were conducted using libcll to benchmark 14 implemented algorithms across various data types.

The "T-Aware" Trade-off

A critical distinction in CLL research is between "T-agnostic" algorithms (which do not require the label transition matrix) and "T-aware" ones (which do). While T-aware algorithms can be more powerful, they exhibit high sensitivity; if the provided transition matrix is inaccurate or "ill-conditioned," performance can degrade significantly. However, in experiments with strong label bias, T-aware methods showed superior stability compared to T-agnostic methods.

Performance Leaders

Across a wide variety of tests, Forward Correction (FWD) and CPE-F emerged as the most robust and effective algorithms, particularly when dealing with non-uniform label distributions. On synthetic MNIST data, several algorithms achieved over 94% accuracy. However, real-world datasets proved significantly more challenging. For instance, on CLCIFAR10, the top-performing FWD algorithm reached 39.25% accuracy. While lower than standard supervised results, this provides a strong, standardized baseline for the complex CLL task.

Baseline testing accuracies for various strategies on synthetic tabular and real-world datasets.

The Quality of Negation

Interestingly, the studies revealed that simply increasing the number of complementary labels per instance (MCL) does not necessarily overcome the hurdles posed by noisy, real-world data. This suggests that the quality and distribution of the "negative" label are just as vital as the quantity of labels provided.

Conclusion and Future Work

libcll addresses the critical need for standardization in the CLL community. By providing a unified framework, it enables researchers to move past fragmented evaluations and focus on algorithmic innovation. While the current version is comprehensive, future updates aim to integrate neighborhood-based methods that leverage instance similarity to improve label reliability, as well as support for even more complex labeling types found in wild, uncurated data environments.

Summary updated

BibTeX
@misc{ye2024libcll,
  author = {Nai-Xuan Ye and Tan-Ha Mai and Hsiu-Hsuan Wang and Wei-I Lin and Hsuan-Tien Lin},
  title = {{libcll: an Extendable Python Toolkit for Complementary-Label Learning}},
  year = {2024},
  eprint = {2411.12276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.12276},
}
Figure