Towards Non-I.I.D. image classification: A dataset and baselines

Yue He, Zheyan Shen, Peng Cui

TL;DR

This paper introduces NICO, a novel dataset designed to address the critical challenge of Non-Independent and Identically Distributed (Non-I.I.D.) data in image classification. They also propose CNBB, a ConvNet-based model with batch balancing, demonstrating its effectiveness in handling Non-I.I.D. settings and outperforming baselines.

What Problem Does This Paper Address?

Machine learning models, especially in image classification, often rely on the assumption that training and testing data are Independent and Identically Distributed (I.I.D.). However, in real-world scenarios, this assumption frequently breaks down, leading to a significant drop in model performance. This "Non-I.I.D." problem is particularly challenging because the distribution of testing data can be unknown and different from the training data. While this issue is widely acknowledged, research in Non-I.I.D. image classification has been hampered by a lack of suitable datasets that can systematically simulate and study these distribution shifts. Existing benchmarks, while large-scale, don't offer explicit mechanisms to control or create Non-I.I.D. scenarios, making it difficult to evaluate and compare different approaches fairly.

Methods

The authors introduce a novel dataset called NICO (Non-I.I.D. Image dataset with Contexts). The core idea behind NICO is to enrich image labels with both a main concept (e.g., "dog") and contextual information (e.g., "on grass," "in a car"). This allows for the conscious creation of Non-I.I.D. settings by training on images of a concept in certain contexts and testing on images of the same concept in different, unseen contexts. The degree of distribution shift can be flexibly controlled by adjusting the proportions of these contexts.

To tackle the General Non-I.I.D. image classification problem (where the testing distribution is unknown), they propose a novel model called CNBB (ConvNet with Batch Balancing). CNBB extends the concept of global confounder balancing to ConvNets. It addresses two key challenges: adapting confounder balancing (which typically assumes binary features) to continuous ConvNet features and performing global balancing on batches of data, as feeding the entire dataset at once is infeasible. CNBB incorporates a quantization loss for feature binarization and a batch confounder balancing mechanism to learn sample weights that balance confounder distributions. These weights are then used in a weighted softmax loss for classification.

Datasets

  • NICO (Non-I.I.D. Image dataset with Contexts): This is the primary contribution of the paper. It's a newly constructed dataset designed specifically for Non-I.I.D. image classification. NICO contains 19 classes, 188 contexts, and approximately 25,000 images. It is structured hierarchically with two superclasses (Animal and Vehicle) and classes within them, each associated with various contexts (attributes, backgrounds, scenes).
  • ImageNet: Used as a point of comparison to demonstrate the Non-I.I.D. nature of existing large-scale datasets and to highlight the limitations of their controllability.

Key Insights and Ideas

  • Context is Key for Non-I.I.D.: The paper convincingly demonstrates that by leveraging contextual information associated with objects, one can create diverse and controllable Non-I.I.D. scenarios, which is crucial for advancing research in this area.
  • Existing Datasets Have Implicit Non-I.I.D.: Even large datasets like ImageNet exhibit Non-I.I.D. characteristics, but they lack the explicit control needed for systematic study. The Non-I.I.D. Index (NI) metric developed in the paper quantifies this shift and shows a correlation with testing error.
  • Batch Balancing for Robustness: The proposed CNBB model's batch balancing module is shown to be effective in identifying more stable features that are less sensitive to distribution shifts, leading to improved performance in Non-I.I.D. settings.
  • General Non-I.I.D. is More Realistic: The paper emphasizes that the "General Non-I.I.D." setting, where the testing distribution is unknown, is more representative of real-world challenges and requires more robust models.

Key Results

  • NICO Dataset: The paper provides empirical analysis showing that NICO can support various Non-I.I.D. settings with controllable levels of distribution shift, as quantified by the Non-I.I.D. Index (NI). The NI values observed in NICO are significantly higher than those in ImageNet, indicating a more pronounced distribution shift.
  • CNBB Model Performance: In the Minimum Bias setting (closest to I.I.D.), CNBB performs comparably to CNN, with a slight accuracy improvement. However, in more challenging Non-I.I.D. settings (Proportional Bias, Compositional Bias, and Combined Proportional & Compositional Bias), CNBB consistently outperforms standard CNN and CNN+BN baselines. For instance, in the combined setting, CNBB achieves accuracies like 35.02% while CNN drops to 33.73% under certain conditions.
  • Improvement with NI: The paper shows that CNBB gains larger improvements over baselines as the discrepancy between training and testing data (indicated by higher NI) increases, demonstrating its advantage in more challenging Non-I.I.D. scenarios.

Limitations and Future Work

  • Dataset Improvement: The authors plan to continuously improve the NICO dataset by enhancing quality and quantity, exploring orthogonal contexts, denoised images, and proper object area ratios for more controlled bias tuning. They also aim to expand its scale.
  • New Non-I.I.D. Settings: Future work will explore more diverse forms of Non-I.I.D. and potentially add other visual concepts to NICO.
  • More Effective Models: The paper suggests designing more advanced models specifically tailored to address the challenges posed by different Non-I.I.D. settings.
  • Hyperparameter Sensitivity: While the paper analyzes the trade-off parameter 'a' in CNBB, further exploration of hyperparameter sensitivity across various Non-I.I.D. scenarios could be beneficial.

Summary updated

BibTeX
@article{he2021towards,
  author = {Yue He and Zheyan Shen and Peng Cui},
  title = {{Towards Non-I.I.D. image classification: A dataset and baselines}},
  journal = {Pattern Recognition},
  year = {2021},
  doi = {10.1016/j.patcog.2020.107383},
}
Figure