DOI: 10.3390/app16167929 ISSN: 2076-3417

Counterfactual Explanations for Plant Disease Classification

Antonio Di Marino, Vincenzo Bevilacqua, Angelo Ciaramella, Ivanoe De Falco, Giovanna Sannino

Deep learning classifiers have achieved high accuracy on plant disease recognition tasks, but their decision-making processes remain opaque. Counterfactual explanations (CFs), minimally modified inputs flipping a classifier’s prediction, reveal which input changes are sufficient to alter the decision. While diffusion-based counterfactual generation has been studied primarily on controlled face datasets (CelebA), its systematic evaluation for fine-grained plant disease classification, particularly under in-the-wild conditions, remains limited. In this work, we apply for the first time DiME (Diffusion Models for CFs) to plant disease classification, evaluating its behavior on both controlled (PlantVillage) and in-the-wild (PlantWild) data. We adapt the pipeline using Stable Diffusion with LoRA fine-tuning as the generative backbone, and we propose Plant Verification Accuracy (PVA), a domain-adapted variant of the Face Verification Accuracy (FVA) metric, to measure species identity preservation in the generated counterfactuals. We compare DiME against three established baselines: Wachter (pixel-space gradient), xGEM+, and DiVE (both based on Variational Autoencoders). On PlantVillage, DiME achieves a 7.1 percentage-point PVA drop versus 60–65 pp for Variational Autoencoders baselines while preserving the target flip rate. Extension to PlantWild yields larger PVA drops (16.6–18.6 pp) and qualitative degradation on in-the-wild imagery, identifying current limitations of the approach when applied outside controlled settings.

More from our Archive