Abstract
Deep Neural Networks have shown great promise on a variety of downstream applications; but their ability to adapt and generalize to new data and tasks remains a challenge. However, the ability to perform few or zero-shot adaptation to novel tasks is important for the scalability and deployment of machine learning models. It is therefore crucial to understand what makes for good, transfer-able features in deep networks that best allow for such adaptation. In this paper, we shed light on this by showing that features that are most transferable have high uniformity in the embedding space and propose a uniformity regularization scheme that encourages better transfer and feature reuse. We evaluate the regularization on its ability to facilitate adaptation to unseen tasks and data, for which we conduct a thorough experimental study covering four relevant, and distinct domains: few-shot Meta-Learning, Deep Metric Learning, Zero-Shot Domain Adaptation, as well as Out-of-Distribution classification. Across all experiments, we show that uniformity regularization consistently offers benefits over baseline methods and is able to achieve state-of-the-art performance in Deep Metric Learning and Meta-Learning.
Introduction
Deep learning models are often "brittle," excelling at specific training tasks but failing when faced with domain shifts or novel classes. The core of this issue lies in feature reuse: models frequently learn highly specialized features biased toward training labels, leading to a feature space that is less useful for downstream applications. This paper investigates the geometric properties of feature spaces that promote generalization, proposing that "spreading out" features uniformly across the embedding space is the key to robust adaptation.
Uniformity Regularization (UR)
The authors introduce Uniformity Regularization (UR), a method designed to preserve maximal information by preventing feature collapse into task-specific clusters. By enforcing a uniform prior, the model makes the fewest assumptions about the data, thereby maintaining features that may be useful for future, unseen tasks.
The Adversarial Approach
Because bounded uniform distributions lack a closed-form KL-divergence, the authors utilize an adversarial training scheme inspired by GANs:
- The Task Model: Maps input data to an embedding space.
- The Discriminator: A small network trained to distinguish between the model's features and samples from a perfect uniform hypercube prior ($U[-1, 1]$).
- The Objective: The task model is trained to solve its primary task while simultaneously "fooling" the discriminator, resulting in a task-agnostic and reusable feature space.
The Uniformity Hypothesis
A key insight of this work is that as a feature prior becomes more uniform, zero-shot performance improves. In a controlled experiment shifting from a narrow Gaussian to a flat uniform distribution, the authors observed significant performance gains in domain adaptation tasks.
As shown in the table above, the transition from a standard Gaussian prior to a uniform hypercube ($U(-1, 1)$) led to a dramatic increase in accuracy for the MNIST $\rightarrow$ USPS task, jumping from 49.0% to 67.2%.
Experimental Results
Meta-Learning and the Meta-Dataset
The authors evaluated UR on the large-scale Meta-Dataset, which aggregates multiple challenging datasets like ILSVRC, QuickDraw, and VGG-Flower. When combined with the Universal Representation Transformer (URT), UR achieved a new state-of-the-art average rank.
Deep Metric Learning (DML)
In DML, UR acts as a structural guardrail against embedding collapse. On the CUB200 dataset, adding UR to a Multisimilarity baseline improved the Recall@1 score from 62.8% to 65.4%, matching or exceeding complex state-of-the-art methods. Similar gains were observed on the CARS196 dataset.
Out-of-Distribution (OOD) Generalization
UR also improves robustness to data corruptions. On CIFAR-10 with severe physical augmentations (rotations, scaling), UR improved the baseline ResNet-18 performance from 35.6% to 41.3%, demonstrating that uniform features are more resilient to distribution shifts.
Conclusion
Uniformity Regularization provides a simple yet powerful tool for improving the generalization of deep networks. By encouraging features to occupy the embedding space more uniformly, models preserve more information and facilitate better adaptation to new domains and tasks. The consistent improvements across Meta-Learning, DML, and Domain Adaptation suggest that uniformity is a fundamental property of transferable representations.
Summary updated