Conterfactual Generative Zero-Shot Semantic Segmentation

Feihong Shen, Jun Liu, Ping Hu

Introduction

Zero-shot semantic segmentation (ZSSS) is a challenging task that requires models to classify pixels belonging to "unseen" classes—categories for which no labeled examples were available during the training phase. Traditional approaches typically leverage generative models to synthesize visual features for these unseen classes based on semantic descriptors, such as word embeddings (e.g., Word2Vec).

However, these models frequently suffer from a significant "seen-class bias." Because the training data exclusively contains seen classes, the model develops a strong statistical preference for them. Consequently, when presented with an unseen class, the model often misclassifies it as a visually similar seen class. From a causal inference perspective, this is a confounding problem: the real features of the image act as a confounder, creating a spurious relationship that misleads the classifier. This paper introduces a causal inference framework to identify and remove these correlations through counterfactual analysis.

Methodology

The proposed framework shifts the focus from pure statistical correlation to causal intervention. The core of the approach is a Counterfactual Generative framework consisting of three main components:

1. Causal Modeling and Counterfactual Logic

The authors represent the ZSSS process using a causal graph involving Real Features ($R$), Word Embeddings ($W$), Fake/Generated Features ($F$), and Labels ($L$). They identify that $R$ influences $L$ both directly and indirectly (via $F$), which introduces bias. By applying counterfactual logic, the model calculates the Natural Indirect Effect (NIE)—the specific portion of the prediction driven by the bias of seen features. Subtracting this effect allows for an "unbiased" prediction for unseen categories.

2. Dual-Classifier Architecture

The system utilizes a dual-branch architecture to process information:

  • Classifier A: Processes real features directly ($R \to L$).
  • Classifier B: Processes generated features derived from word embeddings ($W \to F \to L$).
Overview of the proposed counterfactual generative framework, illustrating the dual-classifier architecture and the causal flow from word embeddings to final segmentation.

These branches are integrated using a fusion strategy inspired by the Kalman Filter, which weights predictions based on feature variance to ensure consistency across the real and synthetic domains.

3. GCN-based Feature Generation

To improve the quality of synthesized features, the authors incorporate a Graph Convolutional Network (GCN). The GCN strengthens the relationships between word embeddings, allowing the generator to effectively "borrow" knowledge from semantically similar seen classes to create more realistic features for unseen ones.

Experiments and Results

The model was evaluated on two major benchmarks: Pascal-VOC 2012 (20 classes) and Pascal-Context (59 classes). The authors tested the model's robustness by withholding varying numbers of classes (2, 4, 6, 8, or 10) during training to simulate zero-shot conditions.

Quantitative Performance

The "CF-" (Counterfactual) versions of the models demonstrated dramatic improvements in the harmonic mean of seen and unseen class accuracy (hIoU). For instance, on the Pascal-Context dataset with 2 unseen classes, the baseline ZS3Net achieved an hIoU of 7.96, while the proposed CF-ZS3Net reached 33.07. The inclusion of the GCN (CFG-ZS3Net) provided an additional 1-2% boost to the mIoU by enhancing the fidelity of the generated features.

Qualitative Analysis

Visualizations demonstrate that the counterfactual intervention effectively reduces the overlap between seen and unseen class distributions in the feature space. This makes the classes more separable and significantly reduces misclassification in complex scenes.

Qualitative comparison showing the original image, ground truth annotation, and the segmentation results of ZS3Net versus the proposed counterfactual model.

Conclusion

This research demonstrates that the primary bottleneck in zero-shot semantic segmentation is structural bias rather than a simple lack of data. By treating the problem as a causal inference task, the proposed counterfactual framework successfully mitigates seen-class bias. The "plug-and-play" nature of this strategy allows it to be integrated into various existing ZSSS architectures, offering a robust path forward for generalized zero-shot learning. Future work may explore more complex causal tools, such as front-door adjustment, to further refine feature synthesis in highly complex environments.

Summary updated

BibTeX
@misc{shen2021conterfactual,
  author = {Feihong Shen and Jun Liu and Ping Hu},
  title = {{Conterfactual Generative Zero-Shot Semantic Segmentation}},
  year = {2021},
  eprint = {2106.06360},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.06360},
}
Figure