Finding Spurious Correlations with Function-Semantic Contrast Analysis

Kirill Bykov, Laura Kopf, Marina M.-c. Höhne

Abstract

Deep Neural Networks (DNNs) often achieve high performance by exploiting spurious correlations—shortcuts in data that do not represent the actual target concept. We present Function-Semantic Contrast Analysis (FSCA), a scalable framework for auditing vision models. By contrasting a model's internal functional representations with human-defined semantic taxonomies, FSCA automatically identifies classes that are treated as similar by the model despite being conceptually unrelated. Our analysis of ImageNet-trained models reveals systematic biases, such as the reliance on "fisherman" features to identify fish species, and demonstrates a significant reduction in the human effort required for model auditing.

Introduction: The Challenge of Shortcut Learning

The "black box" nature of Deep Neural Networks (DNNs) poses a significant risk in high-stakes applications. While a model may reach state-of-the-art accuracy on a benchmark like ImageNet, it often does so via "shortcut learning." A classic example is the "Clever Hans" effect, where a model identifies a husky not by its canine features, but by the presence of snow in the background.

Traditional explainability methods, such as GradCAM or Layer-wise Relevance Propagation (LRP), provide local explanations for individual images. However, auditing a large-scale dataset like ImageNet—containing over a million images across 1,000 classes—is infeasible using local tools alone. FSCA addresses this by providing a global auditing mechanism that ranks class pairs based on their likelihood of sharing spurious connections.

Methodology: Function-Semantic Contrast

FSCA operates by measuring the discrepancy between how a model perceives concepts (functional distance) and how humans define them (semantic distance).

1. Functional Distance ($d_F$)

To quantify how a model relates two classes, we use Extreme-Activation (EA) distance. This metric identifies the images that most strongly activate a specific class neuron (Activation-Maximization) and evaluates whether those same images also trigger high activations in other class neurons. If two classes consistently share high-activation signals, the model considers them functionally similar.

2. Semantic Distance ($d_C$)

Human conceptual relationships are modeled using the Wu-Palmer (WUP) distance applied to the WordNet taxonomy. WordNet organizes English words into a hierarchical structure; the WUP distance calculates similarity based on the depth of the classes and their least common subsumer in this hierarchy.

3. The Contrast Score

By plotting these distances, we can categorize class relationships into four quadrants. FSCA specifically targets the Function-Semantic Contrast quadrant, where classes exhibit low functional distance (the model sees them as similar) but high semantic distance (humans see them as different).

The four scenarios of function-semantic relationships. FSCA focuses on the top-left quadrant where functional similarity is high but semantic similarity is low.

Empirical Findings: Uncovering Hidden Biases

Applying FSCA to 78 pre-trained models on ImageNet-2012 yielded several key insights into model behavior.

The "Fisherman" Artifact

One of the most prominent discoveries was a strong functional link between the "reel" class and various fish classes (e.g., "coho," "barracouta"). Further investigation revealed that the model was not learning the visual features of the fish themselves, but rather the presence of a fisherman or fishing gear. In many instances, the model would classify an image as a "fish" solely based on the person holding the rod, even if the fish was obscured or absent.

Latent Factor Proxies

FSCA identified a surprising connection between "diapers" and "rocking chairs." Since ImageNet lacks a specific "child" or "infant" class, the model learned to use the presence of a child as a latent proxy for both categories. This "child factor" creates a functional overlap between semantically distinct household items.

Background and Texture Shortcuts

The method also flagged clusters of classes grouped by shared environments (e.g., underwater, snow, mountains) or textures. For example, "snow leopards" and "crossword puzzles" were linked due to their shared high-contrast black-and-white patterns, highlighting the model's reliance on low-level visual features over high-level semantics.

Scalability and Model Comparison

FSCA significantly improves the efficiency of model auditing. By focusing on the top 2% of high-contrast class pairs, researchers were able to recover 25% of known spurious correlations in GoogLeNet. In a DenseNet-161 model, analyzing just 1,000 representation pairs allowed auditors to uncover previously unknown artifacts in approximately three hours—a task that would otherwise require weeks of manual inspection.

Furthermore, the study found that architectural improvements correlate with better "disentanglement." Modern architectures like Vision Transformers (ViT) and EfficientNet exhibit fewer unintended functional overlaps compared to older models like VGG, suggesting that higher accuracy often stems from a more robust internal representation of concepts.

Conclusion

Function-Semantic Contrast Analysis provides a powerful, scalable lens for peering into the "black box" of DNNs. By automating the identification of high-contrast class pairs, it allows developers to pinpoint and mitigate shortcut learning before models are deployed in the real world. While the method currently relies on linguistic hierarchies like WordNet, future iterations incorporating visual-semantic metrics promise even greater precision in identifying the visual roots of AI bias.

Summary updated

BibTeX
@inproceedings{bykov2023finding,
  author = {Kirill Bykov and Laura Kopf and Marina M.-C. Höhne},
  title = {{Finding Spurious Correlations with Function-Semantic Contrast Analysis}},
  booktitle = {xAI},
  year = {2023},
  doi = {10.1007/978-3-031-44067-0\_28},
}
Figure