Example-based explainable AI and its application for remote sensing image classification

Shin-nosuke Ishikawa, Masato Todo, Masato Taki, Yasunobu Uchiyama, Kazunari Matsunaga, Peihsuan Lin, Taiki Ogihara, Masao Yasui

TL;DR

Researchers have developed "What I Know" (WIK), an explainable AI (XAI) method that justifies a model's prediction by showing the most similar example it encountered during training. By comparing the input to a known training instance in the model's internal feature space, users can intuitively judge whether a prediction is grounded in experience or a suspicious "hallucination."

What Problem Does This Paper Address?

Deep learning models are notoriously "black boxes." While they achieve high accuracy in tasks like remote sensing, understanding why they made a specific decision remains a challenge. Existing XAI methods like LIME, SHAP, or Grad-CAM typically focus on "feature importance"—highlighting which pixels or variables contributed most to a result.

However, knowing which pixels were important doesn't tell you if the model is actually reliable. A model might focus on the "right" area but still make a wrong guess because it was never trained on data similar to the current input. The authors address this "reliability gap" by shifting from a model-centric view (how the model works) to a data-centric view (what the model has seen).

Methods

The authors introduce WIK (What I Know), an example-based XAI method. The core idea is to treat the deep learning model as two distinct parts: a feature extractor (the convolutional layers) and a classifier (the final linear layer).

When the model processes a new image, WIK performs a two-step search through the training dataset:

  1. Label Filtering: It identifies all training instances that the model predicts as belonging to the same class as the target input.
  2. Feature Space Similarity: It calculates the $L^2$-norm (Euclidean distance) between the target input’s feature vector (taken from the layer immediately before the output) and the feature vectors of the filtered training instances.

The training instance with the smallest distance is presented to the user. Unlike a simple pixel-to-pixel comparison, this method finds similarity in the "eyes" of the model, capturing abstract concepts like spatial structures and textures rather than just raw color values.

Datasets

The study utilizes the EuroSAT dataset, which consists of Sentinel-2 satellite imagery.

  • Format: 64x64 pixel images.
  • Classes: 10 distinct land-cover categories (e.g., Forest, River, Highway, Industrial, Residential).
  • Specifics: The authors used the visible light (RGB) version of the dataset, splitting it 80/20 for training and testing.

Key Insights and Ideas

  • Contextual Similarity: Traditional mathematical metrics (like comparing raw pixels) often fail because they are too sensitive to slight shifts or rotations. By comparing vectors in the last hidden layer, WIK finds "contextual" similarity—the model might pair two different rivers because it has learned the abstract concept of "winding blue-grey lines," even if the pixels don't align perfectly.
  • The "Suspicion" Trigger: WIK acts as a sanity check. If the "most similar" training example looks nothing like the input to a human eye, it suggests the model is operating in a region of the feature space where it has little experience. This makes the inference "suspicious" and alerts the user to potential errors.
  • $L^2$ Norm Supremacy: The researchers compared several metrics (Cosine similarity, $L^1$, $L^2$, and Maximum norm). They found that the $L^2$-norm in the feature space consistently yielded the most human-intuitive results, particularly for complex structures like industrial buildings and rivers.

Key Results

  • Model Performance: The LeNet-type CNN used for the demonstration achieved a solid 95.7% accuracy on the EuroSAT test set.
  • Qualitative Validation: In successful cases, WIK identified training images with strikingly similar spatial scales and textures. For example, a highway junction in the test set was matched with a similar junction from the training set, confirming the model's "logic."
  • Error Detection: The method successfully highlighted failures. In one instance, a pasture was misclassified as a river. WIK showed the "most similar" training image was indeed a river, revealing that the model was confusing the green-brown hues of the pasture with the specific spectral signature of the rivers it had seen.

Limitations and Future Work

  • Scope: Currently, the method is optimized for classification tasks. The authors note that applying this to regression (predicting continuous values) requires a different approach for the first filtering step.
  • Subjectivity: The evaluation of "similarity" remains largely qualitative and dependent on human judgment. There is no automated "similarity score" that definitively says a prediction is "safe."
  • Computational Overhead: Searching through a massive training dataset for every inference could be slow. Future work might involve more efficient indexing or clustering of the feature space to speed up the "What I Know" retrieval process.

Summary updated

BibTeX
@article{ishikawa2023example,
  author = {Shin-nosuke Ishikawa and Masato Todo and Masato Taki and Yasunobu Uchiyama and Kazunari Matsunaga and Peihsuan Lin and Taiki Ogihara and Masao Yasui},
  title = {{Example-based explainable AI and its application for remote sensing image classification}},
  journal = {Int. J. Appl. Earth Obs. Geoinformation},
  year = {2023},
  url = {https://openreview.net/forum?id=ua_4GxTEI3k},
}

Loading related content...

Figure