RBF-Softmax: Learning Deep Representative Prototypes with Radial Basis Function Softmax

Xiao Zhang, Rui Zhao, Yu Qiao, Hongsheng Li

Abstract

Standard softmax loss in deep learning often results in high intra-class variation because it only optimizes for relative class differences. We propose RBF-Softmax, which replaces the inner product with a Radial Basis Function (RBF) kernel. This approach forces features to cluster tightly around class prototypes that represent the true geometric centers of the data. Our method achieves state-of-the-art results on MNIST, CIFAR, and ImageNet while preserving semantic relationships between classes.

Introduction: The Limitations of Standard Softmax

In typical image classification, neural networks map images to high-dimensional feature vectors. The final Softmax layer compares these vectors to learned class prototypes using an inner product. However, this standard approach only requires the correct class score to be marginally higher than others, leading to "lazy" optimization. Consequently, features within the same class remain widely scattered, and prototypes do not necessarily align with the geometric centers of their data.

2D feature visualization of standard Softmax loss on MNIST, showing significant intra-class variation.

Methodology: RBF-Softmax Loss

The core innovation is the RBF-Softmax loss. By replacing the standard linear logit ($W^T x$) with a Radial Basis Function (RBF) kernel, the similarity between a feature $x_i$ and a class prototype $W_j$ is measured as:

$$K_{i,j} = \exp\left(-\frac{\|x_i - W_j\|^2}{\gamma}\right)$$

This RBF-score is scaled by a factor $s$ and processed through the standard cross-entropy framework. This change provides several benefits:

  1. Stability: The bounded nature of the RBF kernel prevents outliers from generating unstable gradients during early training.
  2. Precision: Unlike standard softmax, where gradients vanish once a sample is correctly classified, RBF-Softmax maintains sensitivity near convergence, pushing features closer to their prototypes.
  3. Geometric Alignment: The use of Euclidean distance forces learned weights $W_j$ to become the actual geometric centers of their respective classes.
2D feature visualization of RBF-Softmax on MNIST, demonstrating highly compact and well-separated class clusters.

Experimental Results

The authors validated RBF-Softmax across multiple benchmarks, demonstrating consistent improvements over standard cross-entropy and specialized losses like ArcFace or Center Loss.

Dataset Model Accuracy
MNIST - 99.73%
CIFAR-10 ResNet-20 92.77%
CIFAR-10 DenseNet 96.13%
CIFAR-100 VGGNet-19 73.98%
ImageNet ResNet-50 77.1% (Top-1)
ImageNet EfficientNet-B4 79.0% (Top-1)

Key Insights

Beyond raw accuracy, RBF-Softmax preserves semantic relationships. By comparing learned prototypes to the WordNet database, the authors found that semantically similar classes (e.g., "hamster" and "squirrel") had prototypes closer to each other than to unrelated classes. This suggests that the geometric centers learned by RBF-Softmax capture intuitive semantic meaning.

Conclusion and Future Work

RBF-Softmax is a simple, plug-and-play modification to the loss function that significantly improves feature representation. While it introduces hyperparameters $s$ and $\gamma$, the model is robust to their values. Future work may explore its performance in open-set scenarios and further optimize the computational overhead of Euclidean distance calculations.

Summary updated

BibTeX
@inproceedings{zhang2020rbf,
  author = {Xiao Zhang and Rui Zhao and Yu Qiao and Hongsheng Li},
  title = {{RBF-Softmax: Learning Deep Representative Prototypes with Radial Basis Function Softmax}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58574-7\_18},
}
Figure