Contextual Semantic Interpretability

Diego Marcos, Ruth Fong, Sylvain Lobry, Rémi Flamary, Nicolas Courty, Devis Tuia · DOI

Introduction

Deep learning models, particularly Convolutional Neural Networks (CNNs), have achieved remarkable success in visual recognition tasks. However, their "black-box" nature remains a significant hurdle for deployment in high-stakes environments where understanding the reasoning behind a decision is critical. While post-hoc explanation methods like saliency maps exist, they often fail to provide a faithful representation of the model's internal logic. This paper introduces the Contextual Semantic Interpretable Bottleneck (CSIB), an architecture designed to be interpretable by construction without sacrificing significant predictive power.

The Need for Contextual Bottlenecks

A promising alternative to post-hoc explanations is the semantic bottleneck. In these models, a network is forced to predict a set of human-understandable attributes before reaching a final classification. However, traditional semantic bottlenecks often treat attributes as independent entities. For instance, the presence of a "road" might always contribute a fixed value to a "scenicness" score. In reality, the semantic impact of an attribute is highly dependent on its context—a "road" in a dense urban environment has a different aesthetic implication than a "rugged road" winding through a mountain range. CSIB addresses this by modeling contextual interactions between attributes.

The CSIB Architecture

The CSIB framework operates through a three-stage pipeline designed to maintain semantic purity and sparsity:

  1. Attribute Prediction: A standard CNN backbone (ResNet-50) is trained to detect 102 different semantic attributes from the SUN Attributes dataset, such as "clouds," "man-made," or "climbing."
  2. Contextual Grouping ($g$): Instead of evaluating attributes in isolation, the model learns to group them using a "soft-AND" logical function (a weighted geometric mean). A group, such as "Wilderness," only becomes active if its constituent attributes (e.g., "rugged," "natural," and "climbing") are all present. This ensures the learned contexts are semantically meaningful.
  3. Sparse Contribution ($h$): To keep explanations concise, the model maps these groups to a final output score using a top-K activation layer. This forces the model to rely on only the few most relevant groups for any specific image, aligning with the concept of "cognitive chunks"—the limited amount of information a human can process at once.

Experimental Evaluation

The researchers evaluated CSIB using the ScenicOrNot dataset, which contains approximately 212,000 images of Great Britain with crowdsourced scenicness ratings (1–10). To test real-world generalization, the model was also applied to 1.7 million geo-located images from Flickr to generate a comprehensive scenicness map of the UK.

Performance and Sparsity

CSIB achieved a Kendall’s $\tau$ of 0.609 on the ScenicOrNot test set. While this represents a slight "interpretability tax" compared to the non-interpretable ResNet-50 baseline (0.645), it provides significantly more "pruned" and readable explanations than previous state-of-the-art interpretable models. CSIB typically relies on just 5–9 relevant groups to reach a conclusion, whereas prior models often required a much larger, less manageable set of active attributes.

Geographical Generalization

When applied to the massive Flickr dataset, the model successfully generated a scenicness map that closely matched ground-truth data. It correctly identified high-scenic regions like the Scottish Highlands and accurately flagged low-scenic areas such as industrial transport hubs, demonstrating that its learned semantic contexts generalize well across diverse geographies.

Discussion and Model Debugging

One of the primary advantages of the CSIB framework is its utility in model debugging. Because the bottleneck is explicit, researchers can identify exactly why the model may have failed on a specific image. For example, if the model under-predicted a scenic score, the bottleneck might reveal that it over-emphasized "man-made" attributes (like a boat) while failing to account for the "ruggedness" of the surrounding landscape. This level of transparency is impossible with standard black-box architectures.

Limitations and Future Work

Despite its successes, CSIB has limitations. Its "vocabulary" is restricted by the auxiliary dataset used for attribute training (SUN Attributes); if a visual concept like "graffiti" is not in the training set, the model cannot use it in its reasoning. Additionally, there remains a small performance gap between interpretable and unconstrained models.

Future research may focus on expanding the attribute vocabulary and applying this framework to other sensitive domains, such as medical imaging, where explaining a diagnosis based on specific clinical signs is as important as the diagnosis itself.

Summary updated

BibTeX
@inproceedings{marcos2020contextual,
  author = {Diego Marcos and Ruth Fong and Sylvain Lobry and Rémi Flamary and Nicolas Courty and Devis Tuia},
  title = {{Contextual Semantic Interpretability}},
  booktitle = {ACCV},
  year = {2020},
  doi = {10.1007/978-3-030-69538-5\_22},
}
Figure