Introduction
Standard deep learning architectures treat classification and regression as fundamentally distinct tasks. Classification typically relies on softmax cross-entropy loss with discrete output nodes, while regression utilizes mean squared error (MSE) on continuous values. This dichotomy introduces several challenges: rigid output layers that cannot easily adapt to new classes, "prototype drift" in feature-based methods where class centers shift during training, and the need for complex hyperparameter tuning to balance multi-task loss functions.
Hyperspherical Prototype Networks (HPNs) address these issues by proposing a unified output space. Instead of learning class positions dynamically, HPNs map all outputs to a fixed, pre-defined unit hypersphere ($S^{D-1}$). By defining the organization of the output space a priori, HPNs enable seamless multi-task learning and provide a robust framework for handling data scarcity.
The Hyperspherical Output Space
The core innovation of HPNs is the decoupling of the output space structure from the training data. The network's task is simplified: it must learn to map input features to specific coordinates on a pre-arranged hypersphere.
Classification as Spherical Coding
In classification, $K$ class prototypes are distributed as uniformly as possible on the hypersphere. This is treated as a "spherical code" problem, where the goal is to maximize the minimum distance between any two points. Because finding exact solutions for high dimensions is computationally difficult, the authors use a differentiable loss function to optimize prototype positions before the main training phase begins.
Regression as Interpolation
Regression is redefined as a task of interpolation on the sphere. Two diametrically opposed poles represent the minimum and maximum values of the target range. The network's output is evaluated based on its cosine similarity to these poles, effectively mapping a continuous range onto a geodesic path.
Unified Loss Function
A significant advantage of this approach is the use of a shared squared cosine similarity loss. Because the loss values for both classification and regression fall within the same range $[0, 4]$, they can be summed directly for multi-task learning. This eliminates the need for a balancing hyperparameter ($\lambda$), which is traditionally required to reconcile losses of different scales.
Experimental Results
The authors evaluated HPNs across several benchmarks, including CIFAR-100, ImageNet-200, and the OmniArt dataset. The results demonstrate that HPNs are particularly effective in low-dimensional settings and when dealing with imbalanced data.
Key Performance Metrics
- Efficiency in Low Dimensions: On CIFAR-100, HPNs achieved 63.0% accuracy using only 25 dimensions for 100 classes, significantly outperforming standard word-embedding baselines (44.5%).
- Imbalance Handling: When trained on a long-tailed version of CIFAR-100, HPNs (46.4%) outperformed standard Softmax (44.2%), benefiting from the fixed, maximally separated targets.
- Multi-task Performance: On the OmniArt dataset (predicting both art style and creation year), HPNs achieved a Mean Absolute Error of 64.1 for year prediction, whereas the standard multi-task baseline lagged significantly at 348.5.
Conclusion
Hyperspherical Prototype Networks offer a flexible and robust alternative to traditional output layers. By fixing the output geometry, HPNs provide a natural bridge between classification and regression, simplify multi-task optimization, and maintain high performance even with limited or imbalanced data. Future work may explore dynamic hyperspheres to accommodate incremental learning and open-set recognition challenges.
Summary updated