G-Softmax: Improving Intraclass Compactness and Interclass Separability of Features

Yan Luo, Yongkang Wong, Mohan S. Kankanhalli, Qi Zhao · DOI

Introduction

In the domain of deep representation learning, the primary objective is to extract features that are highly discriminative. This is characterized by two key geometric properties: intra-class compactness, where features of the same category are tightly clustered, and inter-class separability, where clusters of different categories are distinctly separated. While the standard softmax function is ubiquitous in classification tasks, it primarily focuses on minimizing cross-entropy loss without explicitly optimizing the geometric distribution of the learned features. This often results in "spread out" feature clusters that are less robust.

The G-Softmax Methodology

To address these limitations, we introduce $\mathcal{G}$-softmax, a drop-in replacement for the standard softmax function. The core innovation lies in explicitly modeling feature distributions as Gaussians within the loss function itself.

Gaussian Assumption and CDF Integration

Drawing inspiration from the Central Limit Theorem, $\mathcal{G}$-softmax assumes that features produced by deep neural networks naturally tend toward a normal distribution. By integrating the Gaussian Cumulative Distribution Function (CDF), denoted as $\Phi$, directly into the softmax equation, the model can explicitly shape the feature space.

Comparison of feature distributions between standard Softmax and G-softmax.

Unlike the standard approach, $\mathcal{G}$-softmax introduces learnable parameters for each class: the mean ($\mu$) and the standard deviation ($\sigma$). These parameters are updated via backpropagation, allowing the network to dynamically adjust the center and spread of each class cluster. A key advantage of this formulation is that the "compactness" of a class can be quantitatively defined as $1/\sigma$, providing a measurable metric for feature quality.

Implementation and Versatility

$\mathcal{G}$-softmax is designed for ease of adoption. It requires no structural changes to the core Convolutional Neural Network (ConvNet) architecture and can be seamlessly integrated into popular backbones such as VGG, ResNet, and DenseNet. To ensure stability over long training cycles (up to 1100 epochs), the authors utilize a piecewise learning rate schedule that manages the "curvature" of the learning process. Furthermore, the method extends naturally to multi-label classification by modeling positive and negative feature distributions independently, allowing it to handle overlapping labels gracefully.

Experimental Results

The efficacy of $\mathcal{G}$-softmax was evaluated across several benchmark datasets, including CIFAR-10, CIFAR-100, Tiny ImageNet, and large-scale multi-label datasets like MS COCO and NUS-WIDE.

Performance on Standard Benchmarks

As shown in the table below, $\mathcal{G}$-softmax consistently outperforms both the standard softmax and the Large-Margin Softmax (L-softmax) across different architectures.

Classification performance on CIFAR-10 and CIFAR-100 datasets across various architectures.

On CIFAR-10, using a Wide-ResNet (WRN) backbone, $\mathcal{G}$-softmax achieved a top-1 error rate of 3.14%, a notable improvement over the 3.49% achieved by standard softmax. Similar gains were observed on CIFAR-100 and Tiny ImageNet, where error rates were reduced significantly. For instance, on a ResNet-101 backbone for Tiny ImageNet, the error rate dropped from 18.36% to 16.86%.

Multi-label Classification and Geometric Insights

In multi-label scenarios, $\mathcal{G}$-softmax demonstrated superior performance, reaching a mean Average Precision (mAP) of 81.3% on MS COCO. A significant finding of this research is the discovery that intra-class compactness and inter-class separability are linearly correlated with mAP. This provides a strong theoretical foundation for the idea that optimizing the distribution of features directly enhances classification accuracy.

Conclusion

$\mathcal{G}$-softmax offers a mathematically grounded and computationally efficient way to improve feature learning. By treating class distributions as learnable Gaussians, it achieves superior intra-class compactness and inter-class separability. Its "plug-and-play" nature and consistent performance gains across single-label and multi-label tasks make it a powerful tool for modern computer vision pipelines.

Summary updated

BibTeX
@article{luo2020g,
  author = {Yan Luo and Yongkang Wong and Mohan S. Kankanhalli and Qi Zhao},
  title = {{G-Softmax: Improving Intraclass Compactness and Interclass Separability of Features}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2020},
  doi = {10.1109/tnnls.2019.2909737},
}
Figure