Uniform Priors for Data-Efficient Learning

Samarth Sinha, Karsten Roth, Anirudh Goyal, Marzyeh Ghassemi, Zeynep Akata, Hugo Larochelle, Animesh Garg

Abstract

Imposing a "uniformity prior" on learned features—ensuring they spread out evenly across the available representation space—significantly boosts a model's ability to generalize to unseen tasks. By using an adversarial "Uniformity Regularization" (UR) technique, the authors achieve state-of-the-art results across diverse domains, including few-shot learning, deep metric learning, and neural radiance fields (NeRFs).

Introduction

Deep learning models are notoriously brittle when faced with a distribution shift—situations where the data at test time looks different from the training data. Whether it's a new category of objects in a few-shot setting or a different image style in domain adaptation, models often overfit to the specific quirks of their training set, losing the "reusable" information needed for new tasks.

This paper addresses a fundamental question: What properties should a feature space have to facilitate better generalization? While previous research hinted that "uniformity" (spreading features out) helps, existing methods were often restricted to specific architectures or training styles. This work introduces Uniformity Regularization (UR), a general-purpose way to enforce uniformity across any deep learning task.

Methods: Uniformity Regularization

The core contribution is an adversarial framework that forces features into a uniform hypercube (specifically $U(-1, 1)$). Because the uniform distribution does not have a differentiable closed-form for standard loss functions like KL-Divergence, the authors utilize a GAN-style approach.

The UR framework uses an adversarial discriminator to align learned features with a uniform distribution.

As shown in the framework diagram, the system consists of two main components:

  1. The Discriminator: A small sub-network trained to distinguish between the model's actual features ($z$) and "fake" samples ($ ilde{z}$) drawn from a true uniform distribution.
  2. The Task Model: The main neural network trained to perform its primary task (e.g., classification) while simultaneously trying to "fool" the discriminator into thinking its features are perfectly uniform.

This "plug-and-play" approach allows UR to be added to almost any existing architecture, from ResNets to BERT-based transformers.

Experimental Setup

The authors evaluated UR across an impressive array of benchmarks:

  • Few-shot Image Learning: Omniglot, Double MNIST, CIFAR-FS, miniImageNet, and the Meta-Dataset.
  • Few-shot Language: The FewRel dataset for relation classification.
  • Deep Metric Learning (DML): CUB200-2011 and CARS196.
  • Zero-Shot Domain Adaptation (ZSDA): MNIST, USPS, and SVHN digit datasets.
  • Out-of-Distribution (OOD): CIFAR-10 and CIFAR-100-C.
  • Neural Fields: The Co3D dataset for view synthesis.

Key Insights

  • Uniformity = Information Preservation: A uniform prior places equal likelihood over the entire feature space. By preventing the model from collapsing features into tight, task-specific clusters, the model is forced to retain more "reusable" information that might be useful for future, unseen tasks.
  • Fighting "Overclustering": Qualitative analysis using UMAP visualizations showed that standard models tend to "overcluster" data. UR increases feature space density, which is directly linked to better zero-shot performance.
  • Beyond Vision: Adding UR to BERT-based models improved their ability to classify relationships in text with very few examples, suggesting uniformity is a fundamental property of high-quality representations regardless of the data type.

Key Results

The addition of UR led to significant performance gains, particularly in tasks involving distribution shifts.

Comparison of UR against various noise priors in Zero-Shot Domain Adaptation tasks.
  • Domain Adaptation: In the MNIST $\to$ USPS task, the baseline model achieved 49.0% accuracy. Adding UR boosted this to 67.2%, outperforming various Gaussian noise priors.
  • State-of-the-Art in DML: UR set new performance records on the CUB200 and CARS196 datasets. For instance, on CUB200, it improved Recall@1 by over 3% compared to standard Softmax training.
  • Robustness: On the CIFAR-100-C benchmark, UR reduced the Mean Corruption Error (mCE) from 46.8 to 41.0, indicating much higher network robustness.
  • Meta-Learning: On the Meta-Dataset, adding UR to the "Universal Representation Transformer" (URT) established a new state-of-the-art average rank.

Discussion and Limitations

While the empirical results are strong, the authors note a theoretical gap: there is currently no formal proof for why the uniform hypercube is the optimal prior compared to high-variance Gaussians. Additionally, the method introduces a hyperparameter ($\gamma$) to balance task and uniformity losses, which typically requires tuning between 0.1 and 0.4. While training the discriminator adds minor computational cost, it has zero impact on inference speed.

Summary updated

BibTeX
@inproceedings{sinha2022uniform,
  author = {Samarth Sinha and Karsten Roth and Anirudh Goyal and Marzyeh Ghassemi and Zeynep Akata and Hugo Larochelle and Animesh Garg},
  title = {{Uniform Priors for Data-Efficient Learning}},
  booktitle = {Workshops @ CVPR},
  year = {2022},
  doi = {10.1109/cvprw56347.2022.00447},
}
Figure