ClonalNet: Classifying Better by Focusing on Confusing Categories

Xue Zhang, Hui-Liang Shen · DOI

Abstract

Nowadays, most classification networks use one-hot encoding to represent categorical data because of its simplicity. However, one-hot encoding may affect the generalization ability as it neglects inter-class correlations. We observe that, even when a neural network trained with one-hot labels produces incorrect predictions, it still pays attention to the target image region and reveals which classes confuse the network. Inspired by this observation, we propose a confusion-focusing mechanism to address the class-confusion issue. Our confusion-focusing mechanism is implemented by a two-branch network architecture. Its baseline branch generates confusing classes, and its FocusNet branch, whose architecture is flexible, discriminates correct labels from these confusing classes. We also introduce a novel focus-picking loss function to improve classification accuracy by encouraging FocusNet to focus on the most confusing classes. The experimental results validate that our FocusNet is effective for image classification on common datasets, and that our focus-picking loss function can also benefit the current neural networks in improving their classification accuracy.

Introduction

Standard image classification models typically rely on one-hot encoding, treating all categories as mutually exclusive and independent. While computationally efficient, this approach fails to capture the inherent semantic relationships between similar classes—for instance, the subtle differences between a Dingo and a Rhodesian Ridgeback.

A key observation driving this research is that even when a model misclassifies an image, its internal attention (visualized through Class Activation Maps) often remains centered on the correct object. This suggests that the model "sees" the right features but lacks the discriminative power to distinguish between highly correlated classes. To address this, we propose a framework that explicitly targets these "gray areas" of classification by focusing on the specific categories that confuse the network.

Methodology

Architecture

The proposed framework utilizes a two-branch training strategy. The Baseline Branch consists of a pre-trained, fixed network that serves as a reference for identifying confusing classes. The FocusNet Branch is the active learning component designed to refine these distinctions.

The FocusNet framework architecture showing the baseline branch, FocusNet branch, and the focus-picking loss mechanism.

During training, the input image is processed by both branches. The baseline's output identifies which classes are most likely to be confused with the ground truth. The FocusNet branch is then optimized to distinguish the correct label from this specific subset of confusing candidates. Importantly, the baseline branch is discarded after training, ensuring that inference speed remains identical to a standard single-branch network.

Multi-warm Labels and Focus-Picking Loss

To guide the FocusNet, we introduce multi-warm labels. Unlike one-hot labels, these identify all classes that the baseline model considers plausible (indicated by positive logits). This provides a customized "difficulty map" for every training sample.

Visualization of multi-warm label generation across different scenes, showing how confusing classes are identified from baseline logits.

The learning process is governed by a focus-picking loss function, which consists of three primary components:

  1. Adaptive Cross-Entropy ($L_{cls}$): Penalizes the model more heavily when it is less confident than the baseline on difficult samples.
  2. Attention Regularization ($R_{attention}$): Encourages the model to distribute its internal focus among the confusing classes identified in the multi-warm label.
  3. Entropy Regularization ($R_{entropy}$): Prevents overconfidence, maintaining a smoother probability distribution that aids generalization.

Experimental Evaluation

The effectiveness of FocusNet was validated across several benchmarks, ranging from general object recognition to fine-grained classification tasks:

  • General Classification: On ImageNet-1K, a ResNet-34 backbone trained with FocusNet achieved 74.35% Top-1 accuracy, a 1.04% improvement over the standard baseline.
  • Fine-Grained Classification: The method showed significant gains in high-confusion datasets. On the CUB-200 (birds) dataset, FocusNet reached 63.43% accuracy, substantially outperforming both the baseline (50.29%) and standard Knowledge Distillation (58.03%).
  • Versatility: The focus-picking loss proved complementary to existing techniques. When combined with self-distillation methods like FRSKD, it provided additional performance boosts, demonstrating its utility as a general-purpose training enhancement.

Conclusion

FocusNet offers a robust solution to the class-confusion problem by leveraging a baseline model's errors as a learning signal. By prioritizing difficult samples and inter-class correlations through multi-warm labels and focus-picking loss, the framework achieves superior accuracy without increasing inference costs. While current implementation requires a two-stage training process, future work aims to develop a one-stage scheme to streamline the training pipeline for large-scale applications.

Summary updated

BibTeX
@article{zhang2022clonalnet,
  author = {Xue Zhang and Hui-Liang Shen},
  title = {{ClonalNet: Classifying Better by Focusing on Confusing Categories}},
  journal = {Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=-KRwdcfQ8d},
}
Figure