FocusNet: Classifying better by focusing on confusing classes

Xue Zhang, Ze-Hua Sheng, Hui-Liang Shen

TL;DR

This paper introduces FocusNet, a novel approach to image classification that tackles the challenge of "confusing classes" – classes that are visually similar and often lead to misclassifications. By employing a two-branch architecture and a new "focus-picking" loss function, FocusNet effectively guides the model to better distinguish between these difficult-to-separate categories, leading to improved accuracy without increasing computational cost during inference.

What Problem Does This Paper Address?

Traditional image classification models often use one-hot encoding for labels, which treats each class as entirely independent. This approach can hinder generalization because it ignores the inherent relationships and similarities between different classes. For instance, certain dog breeds might look very alike, making it hard for a model to differentiate them. While existing methods like label smoothing or knowledge distillation attempt to address this by introducing softer label representations or transferring knowledge from a larger model, they have limitations. This paper focuses on the specific problem of "confusing classes" where even a well-trained network might correctly identify the relevant image region but still misclassify due to visual ambiguity between similar classes. The authors observe that a network's attention maps can reveal which classes are confusing it, even when it makes an incorrect prediction.

Methods

The core of FocusNet is a confusion-focusing mechanism implemented as a two-branch network:

  1. Baseline Branch: This branch is a pre-trained network that provides initial predictions (logits and probabilities). It serves as a reference point.
  2. FocusNet Branch: This is the main classification network. It takes the outputs from the baseline branch to identify confusing classes. The architecture of the FocusNet branch is flexible and can be any standard classification model (e.g., ResNet, MobileNet).

A key innovation is the focus-picking loss function. This loss function has three components:

  • Classification Loss ($L_{cls}$): This term uses the baseline's predictions as a reference. It assigns larger losses to difficult samples (where the FocusNet's confidence differs significantly from the baseline's) and smaller losses to easier samples.
  • Attention Regularization ($R_{attention}$): This component encourages FocusNet to assign higher probabilities to the confusing classes identified by the baseline branch, using a "multi-warm label" derived from the baseline's logits.
  • Entropy Regularization ($R_{entropy}$): This term penalizes low-entropy output distributions, similar to label smoothing, to prevent overconfidence and improve generalization.

During training, both branches are active. However, during inference, only the FocusNet branch is used, meaning there's no added computational overhead.

Datasets

The authors evaluated FocusNet on a diverse set of datasets, including:

  • MNIST: A standard handwritten digit dataset.
  • CIFAR-10 and CIFAR-100: Common image classification benchmarks.
  • Imagewoof: A subset of ImageNet containing dog breeds that are not easy to classify.
  • ImageNet Dogs: A dataset of dog breeds from ImageNet.
  • Stanford Dogs: A fine-grained dataset of dog breeds.
  • CUB-200: A fine-grained dataset of bird species.
  • Tiny ImageNet: A subset of ImageNet.
  • ImageNet: The large-scale benchmark dataset.

The use of fine-grained datasets like Stanford Dogs and CUB-200 is particularly relevant as they are known to contain many visually similar classes, making them ideal for testing the FocusNet's ability to handle confusing classes.

Key Insights and Ideas

  • Attention Reveals Confusion: The paper's core insight is that even when a network makes an incorrect prediction, its attention maps can still reveal which classes are causing the confusion. This observation is crucial for developing a method that explicitly targets these confusions.
  • Two-Branch for Guidance: Using a baseline network to guide a primary classification network (FocusNet) is an effective way to leverage learned visual features and identify inter-class relationships without requiring complex architectural changes to the primary network itself.
  • Focus-Picking Loss: The proposed loss function is a clever combination of terms that simultaneously addresses classification accuracy, focuses on confusing classes, and prevents overconfidence. This multi-faceted approach is key to its success.
  • Inaccurate Baselines Still Useful: Remarkably, FocusNet can still improve performance even when guided by a poorly trained baseline network. This suggests that the mechanism for identifying confusing classes is robust and doesn't solely rely on a highly accurate teacher.

Key Results

  • Improved Accuracy: FocusNet consistently outperforms baseline models and DropMax [8] across various datasets, especially on fine-grained datasets. For example, on CUB-200, FocusNet achieved 63.43% accuracy compared to the baseline's 50.29%.
  • Competitive with Knowledge Distillation: FocusNet shows strong performance when compared to state-of-the-art knowledge distillation methods, often achieving better or comparable results, particularly on challenging datasets.
  • No Inference Overhead: A significant advantage is that FocusNet does not add any extra computational cost during inference, as only the FocusNet branch is used.
  • Robustness to Inaccurate Baselines: Even with a baseline network trained for only a few epochs (achieving accuracies as low as 1.29%), FocusNet still significantly improved upon the baseline's performance.

Limitations and Future Work

  • Two-Stage Training: The authors acknowledge that their current confusion-focusing mechanism uses a two-stage training strategy. They plan to explore an optimized one-stage scheme to improve training efficiency and classification accuracy.
  • Further Exploration of Loss Components: While the paper demonstrates the effectiveness of each component of the focus-picking loss, further research could delve deeper into their interplay and optimal weighting for various scenarios.

Summary updated

BibTeX
@article{zhang2022focusnet,
  author = {Xue Zhang and Ze-Hua Sheng and Hui-Liang Shen},
  title = {{FocusNet: Classifying better by focusing on confusing classes}},
  journal = {Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=-KRwdcfQ8d},
}

Loading related content...

Figure