Data Leakage, Acquisition Bias, and Cross-Dataset Generalization in Guava Disease Image Classification
This study reveals that data leakage caused by sharing images from the same source photograph or acquisition session across training and test sets significantly inflates reported accuracy in guava disease classification, demonstrating that strict session-level separation is essential for obtaining reliable and generalizable performance metrics.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the orchards of South Asia, the guava tree bears a fruit that is both a staple and a source of livelihood, yet it faces constant threats from invisible enemies. Anthracnose, a fungal disease, and infestations by fruit flies can turn a harvest into a loss before the fruit even leaves the tree. For decades, farmers and scientists have relied on human eyes to spot these problems, but the rise of artificial intelligence offered a new hope: cameras and computers that could identify sickness in a split second. This technology, known as computer vision, works by showing a machine thousands of pictures of healthy and sick fruit until it learns to recognize the patterns of disease. The promise is a future where a farmer can point a smartphone at a guava and instantly know if it is safe to sell. However, for this promise to be real, the computer must learn to see the disease itself, not just the specific conditions under which the photos were taken. If the computer is tricked by the way the data was gathered, its success is an illusion, and the tool fails when faced with a real orchard.
A team of researchers at North South University in Bangladesh set out to investigate a popular collection of guava images that had been used to train many of these artificial intelligence systems. This dataset, known as GFDD24, contained thousands of pictures labeled as Anthracnose, fruit fly damage, or healthy. Previous studies using this data had reported astonishingly high success rates, with some claiming accuracy as high as ninety-nine percent. The researchers suspected that these numbers were too good to be true. They hypothesized that the dataset suffered from a hidden flaw called data leakage. In simple terms, this happens when the computer is tested on pictures it has already seen during its training, even if those pictures look slightly different. Imagine a student taking a math test who has secretly memorized the specific numbers in the practice problems; they will get a perfect score not because they understand the math, but because they recognize the answers. The researchers wanted to know if the computer was learning to recognize the disease or simply memorizing the specific photographs it had been fed.
To find the answer, the team first had to understand how the images were created. The original dataset was built from just four hundred and seventy-three photographs of guava fruit. To make the dataset larger, the creators used software to generate thousands of new images by rotating, zooming, and flipping the original photos. The problem arose because these new, altered images were mixed into the training and testing folders without keeping the family of images together. This meant that a picture of a sick fruit in the test folder might be just a rotated version of a picture the computer had already studied in the training folder. The researchers used a method to group these images by their visual similarity, effectively tracing every altered image back to its original source photograph. They discovered that every single one of the three hundred and eighty-two images used for testing in the official dataset belonged to a group of images that was also present in the training set. The computer had not been tested on new fruit; it had been tested on variations of fruit it had already seen.
When the researchers re-ran the experiments with a fairer setup, where no image from a test group was allowed to appear in the training set, the results changed dramatically. Using a standard and efficient computer model called MobileNetV2, the accuracy on a specific 354-image subset of the official test set was ninety-four point five four percent. However, when they removed the overlapping images from the training set and forced the computer to learn from groups of images it had never seen before, the accuracy rose. More importantly, they ran a specific experiment where they swapped training images with members of the test groups to see exactly how much the overlap was helping. They found that when the training set included images from the same source as the test set, the accuracy jumped by more than three percentage points. This gap proved that the high scores reported in previous studies were inflated by the computer recognizing the photograph rather than the disease.
The investigation did not stop at just one dataset. The researchers also looked at a different collection of guava images that included the original, unaltered photographs. Here, they traced the augmented images back to their sources and repeated the experiment. They found that when the computer was trained on images that included copies of the test fruit, its accuracy on those specific test fruits rose from ninety-one point two two percent to ninety-eight point five two percent. When they controlled for the size of the training set to ensure a fair comparison, the accuracy still rose to ninety-six point nine zero percent. This confirmed that the presence of related images in the training data was artificially boosting performance. The researchers also tested how well these models worked when moving from one dataset to another, simulating a real-world scenario where a model trained on one farm is used on a different farm. The accuracy dropped significantly, falling to between seventy-two and eighty-seven percent, showing that the models had learned shortcuts specific to the original data, such as the background or the lighting, rather than the universal signs of disease.
The study also examined how the data was collected, revealing another layer of bias. In one dataset, the time and location of the photo collection were so closely tied to the type of disease that a computer could guess the disease just by knowing the date and place, without even looking at the fruit. When the researchers forced the computer to learn from one collection session and tested it on a different session, the accuracy plummeted. This demonstrated that the models were often learning the context of the photo—the weather, the time of day, or the specific orchard—rather than the biological symptoms of the illness. The researchers concluded that the way these datasets are currently built and shared is misleading. They proposed a simple checklist for future studies: group related images together before splitting them into training and testing sets, report exactly how the data was divided, and test the models on completely new collections of images to ensure they can actually see the disease.
The findings serve as a necessary correction to the field of plant disease recognition. The high accuracy numbers that had been celebrated were not a sign of a solved problem, but a sign of a flawed test. By exposing how easily artificial intelligence can be tricked by data leakage and acquisition bias, the researchers have provided a clearer path forward. They showed that for these tools to be useful in real orchards, the benchmarks used to test them must be rigorous and honest. The work does not suggest that artificial intelligence cannot help farmers; rather, it insists that we must build better tests to ensure that when the technology is deployed, it is truly seeing the fruit and not just the photograph.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.