Sinkhorn Label Allocation: Semi-Supervised Classification via Annealed Self-Training

Kai Sheng Tai, Peter Bailis, Gregory Valiant

Introduction

In semi-supervised learning (SSL), models are trained using a tiny amount of labeled data alongside a mountain of unlabeled data. A common strategy to bridge this gap is self-training: the model predicts labels for the unlabeled data and then treats those predictions as "ground truth" for subsequent training steps.

However, self-training has a major Achilles' heel: label noise. If the model makes a mistake and then trains on that mistake, it creates a destructive feedback loop of errors. To combat this, researchers typically rely on heuristics like confidence thresholding (e.g., only using a pseudo-label if the model is 95% confident). Unfortunately, these thresholds are arbitrary, fail to account for class imbalance, and do not adapt well as the model improves.

Sinkhorn Label Allocation (SLA) offers a mathematically grounded alternative. By reframing the "pseudo-labeling" step as an optimal transport problem, SLA provides a principled way to gradually "anneal" labels and enforce class balance, significantly outperforming state-of-the-art methods like FixMatch in low-label regimes.

Methods: Sinkhorn Label Allocation (SLA)

Instead of looking at each example in isolation and applying a rigid threshold, SLA treats label assignment as a global optimization problem.

SLA Pipeline: The classifier generates a label cost matrix, which is then processed via Sinkhorn iterations to produce final label assignments.
  1. Optimal Transport Formulation: SLA models the task as matching $n$ examples to $k$ classes to minimize the total "cost," where the cost is defined as the negative log-probability outputted by the model.
  2. Global Constraints: Unlike simple thresholding, SLA allows for global constraints. You can instruct the model with rules like, "Don't assign more than X% of the data to Class A," or "Only label 20% of the total data in this iteration."
  3. Sinkhorn Iteration: Solving a massive Linear Program (LP) every training step is computationally prohibitive. To bypass this, the authors use the Sinkhorn-Knopp algorithm, an efficient, iterative method to find an approximate solution. It adds a minor computational overhead (~20%) but remains fast enough for the inner loop of stochastic gradient descent.
  4. Annealing (Curriculum Learning): SLA employs an "allocation schedule." Early in training, the model is constrained to only label the "easiest" (highest confidence) examples. As training progresses, it is forced to label an increasing fraction of the dataset, effectively creating a principled curriculum.
  5. Consistency Regularization: SLA is integrated into the FixMatch framework. It uses "weakly augmented" images to generate the Sinkhorn labels and "strongly augmented" versions of the same images to calculate the loss.

Key Insights

  • Soft Thresholding via Dual Variables: In SLA, the Sinkhorn scaling variables act as dynamic, class-specific thresholds. If a class is being over-represented, the optimization naturally "raises the bar" for that class, preventing the model from collapsing into predicting only the most frequent categories.
  • Global vs. Local: Standard pseudo-labeling is a "local" (per-example) decision. SLA is "global" (per-minibatch or per-dataset), which is crucial for effective class balancing.
  • Upper Bounds > Equality: Many previous attempts at class balancing used strict equality constraints (e.g., forcing exactly 10% per class). SLA uses upper bounds, which are more forgiving. If the model truly lacks evidence for a class in a specific batch, it isn't forced to hallucinate labels just to meet a quota.

Experimental Results

The authors evaluated SLA on three standard computer vision benchmarks: CIFAR-10, CIFAR-100, and SVHN (Street View House Numbers). They specifically focused on the low-label regime, testing scenarios with as few as 4 labeled examples per class.

Performance comparison across CIFAR-10, CIFAR-100, and SVHN. SLA demonstrates a smoother allocation fraction and consistently lower test error compared to FixMatch.
  • Superior Accuracy: On CIFAR-10 with only 4 labels per class (40 labels total), SLA achieved 94.83% accuracy, a massive improvement over FixMatch's 90.10%.
  • Stability: SLA demonstrated significantly lower variance across different random splits of labeled data. In low-label settings, FixMatch can fail if the initial labels are unrepresentative; SLA's global constraints make it much more robust to this.
  • Controlled Allocation: As seen in the results, FixMatch tends to rapidly allocate pseudo-labels, which can lock in early mistakes. SLA's annealing schedule ensures a smooth, controlled allocation fraction that correlates with steadily decreasing test error.

Limitations and Future Work

While powerful, SLA has a few limitations. If the user-provided class proportions (the upper bounds) are drastically misspecified—such as assuming a balanced dataset when it is actually highly skewed—SLA's performance can degrade. Additionally, the current formulation is designed strictly for multi-class classification where each image has exactly one label.

Future work could involve automatically estimating class proportions from the unlabeled data itself (adaptive constraints) rather than relying on the labeled sample's distribution, as well as extending the optimal transport framework to multi-label learning tasks.

Summary updated

BibTeX
@inproceedings{tai2021sinkhorn,
  author = {Kai Sheng Tai and Peter Bailis and Gregory Valiant},
  title = {{Sinkhorn Label Allocation: Semi-Supervised Classification via Annealed Self-Training}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure