Evaluating Contextual Bias in CNN Image Classification: Evidence from Agricultural Benchmark Datasets
Abhilekha Dalal, Michael Okonoda, Eder Martinez, Lior Shamir
Abstract
Convolutional neural networks (CNNs) are typically evaluated using held-out classification accuracy, an approach that presupposes predictions are based primarily on the intended object of interest rather than incidental surrounding context. We test this assumption in CNN-based agricultural image classification by comparing model performance on original images with performance on background-dominated patches extracted from the same images across eight publicly available agricultural benchmark datasets and four widely used CNN architectures. Background-dominated patches were classified above dataset-specific random chance for six of the eight datasets, and substantially above chance for four of them, indicating that contextual information contributes to model predictions for the majority of datasets evaluated. For these four datasets, we further evaluated whether this behavior reflected genuine class-discriminative information or was primarily attributable to class imbalance using macro-averaged precision, recall, and F1 together with class-balanced test subsets. The results show that contextual reliance does not admit a single explanation: class imbalance accounts for a substantial portion of the observed signal for some datasets and architectures, whereas above-chance contextual classification persists after balancing for others. Together with previous evidence from curated object recognition and cancer pathology imaging, these findings support the growing view that contextual bias is a recurring characteristic of CNN-based image classification rather than a phenomenon confined to a single application domain. More broadly, this work provides a systematic framework for quantifying contextual bias across heterogeneous image datasets by combining dataset-specific random-chance baselines, contextual bias categorization, macro-averaged evaluation, and class-balanced robustness analysis.
Create a lesson
Related papers
ChatGPT Images 2.5 in the Wild: A Launch-Period Dataset and Detector Evaluation
Shared title terminologycs.CVDennis Ng, Xingyu Shen, Ankit Raj et al.
MCIQA-2K: A Multi-Dimensional Dataset and No-Reference Quality Assessment Benchmark for Colorized Images
Shared title terminologycs.CVYunkai Zhuang, Qihang Yan, Zicheng Zhang et al.
SCDM: Spatial-Contextual Disentanglement Mamba via Differential Inference for Efficient Image Classification
Shared title terminologycs.CVMustafa Bora Çelik, Hayriye Aktaş Dinçer, Ayse Keles
CIRKDV2: Cross-Image Relational Knowledge Distillation with Contextual Modeling for Efficient Semantic Segmentation
Shared title terminologycs.CVChuanguang Yang, Yu Wang, Chengqing Yu et al.
Atunda: Building an Afrogenic Dance Movement Dataset for AI-Driven Classification
Shared title terminologycs.CVDiego Carrascosa, Tristan Pank, Qudus Onikeku et al.
Evidence-Aligned Benchmarking and Learning for Medical Video Language Models
Shared title terminologycs.CVZhongpai Gao, Anwesa Choudhuri, Meng Zheng et al.