Self-Joint Supervised Learning

Navid Kardan, Mubarak Shah, Mitch HillICLR 2022

Introduction

Most deep learning models rely on the independent and identically distributed (i.i.d.) assumption, treating every data point as an isolated island. When a standard model classifies an image, it evaluates that image in a vacuum. This "tunnel vision" contributes to several major flaws in modern AI:

  • Overfitting: Models memorize noise in individual samples rather than learning generalizable patterns.
  • Overconfidence: Models frequently assign high-probability scores to incorrect predictions or completely unfamiliar, Out-of-Distribution (OOD) data.
  • Vulnerability: Small, malicious perturbations (adversarial attacks) can easily flip a model's prediction because it lacks a comparative "sanity check."

In contrast, a human expert—such as a doctor reviewing a difficult medical scan—often compares a new observation against several known reference examples before making a decision. To bridge this gap, researchers introduce Self-Joint Supervised Learning, a framework that trains models to predict the joint distribution of pairs of samples. This allows networks to learn sample-to-sample relationships and use reference images during inference to boost accuracy, calibration, and robustness.

Methodology: The Joint Label Space

The core innovation of Self-Joint Supervised Learning is shifting from predicting a single label $p(Y|X)$ to predicting a joint distribution of two labels given two images: $p(Y_1, Y_2 | X_1, X_2)$.

For a 10-class problem like CIFAR-10, a standard model outputs a vector of 10 probabilities. A Self-Joint model instead outputs a $10 \times 10$ matrix, where each cell $(i, j)$ represents the probability that the first image belongs to class $i$ and the second image belongs to class $j$.

While the underlying data is technically i.i.d., the model does not assume it. Instead, it learns that the labels should be independent. During training, the network is optimized to ensure that the joint probability matrix decomposes into the product of two individual probabilities. This extra structural requirement acts as a powerful regularizer.

Inference Modes

The framework supports two primary modes of inference:

  1. Stochastic Inference: To classify a test image, the model pairs it with several random "reference" images from the training set. It calculates the joint distribution for each pair, averages them, and "marginalizes" (sums up) the results to get the final prediction. This acts like a committee of comparisons.
  2. Deterministic Inference: For faster, single-pass evaluation, the model can simply be fed the exact same test image twice.
Overview of Self-Joint Supervised Learning

Furthermore, the framework naturally handles auxiliary unlabeled data. If the model lacks a label for an image, it can use its own marginal prediction as a pseudo-label, helping it learn robust features from a wider pool of data.

Key Insights and Results

The authors evaluated their method on standard computer vision benchmarks, including CIFAR-10/100, SVHN, and STL-10, revealing several distinct advantages over standard supervised learning:

  • Increased Accuracy and Capacity Utilization: In standard learning, making a model too large often leads to overfitting. In the Self-Joint framework, larger models continue to improve in accuracy because the joint-prediction task is inherently harder, preventing the network from simply memorizing the data. On CIFAR-100, the Self-Joint model achieved 81.16% accuracy compared to 79.14% for the standard baseline. This gap widens significantly when training data is scarce.
  • Adversarial Robustness: The model becomes highly robust to adversarial attacks. An attack that fools the model when paired with one reference image might fail when paired with another. This need for consistency across different pairings makes the network much harder to trick. Against a strong PGD attack on CIFAR-10, the Self-Joint model maintained 62.29% accuracy, while the standard model plummeted to 33.2%.
  • OOD Detection and Calibration: The method significantly improved the detection of unseen data (tested on CelebA and VOC-2012). When combined with auxiliary unlabeled data, it even outperformed Outlier Exposure, a dedicated OOD detection technique. Additionally, the models showed lower Negative Log-Likelihood (NLL) scores, meaning they were much less likely to be "confidently wrong."
  • Implicit Ensembling: Every reference sample effectively generates a slightly different version of the model's parameters. This allows the Self-Joint approach to behave similarly to a Bayesian Neural Network, but without the massive computational overhead usually required.

Limitations and Future Work

While powerful, the Self-Joint framework introduces computational overhead. During stochastic inference, the model must perform multiple passes (one for each reference image). Although 20-50 samples are usually sufficient, it remains slower than a standard single-pass model.

Future work will need to explore how this joint-distribution approach scales to tasks with much larger output spaces, such as object detection or pixel-wise segmentation. Additionally, exploring "active" reference selection—intelligently picking the most informative images to compare against rather than random sampling—could help the model reach confident conclusions much faster.

Summary updated

BibTeX
@inproceedings{kardan2022self,
  author = {Navid Kardan and Mubarak Shah and Mitch Hill},
  title = {{Self-Joint Supervised Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=zuqcmNVK4c2},
}
Figure