Deconfounded Image Captioning: A Causal Retrospect

Xu Yang, Hanwang Zhang, Jianfei Cai · DOI

TL;DR

Modern image captioning models often "hallucinate" objects or rely on gender stereotypes because they learn spurious correlations from biased datasets rather than true causal relationships. This paper introduces Deconfounded Image Captioning (DIC), a framework that uses causal inference principles—specifically backdoor and front-door adjustments—to block these biases and force models to reason directly from visual evidence.

What Problem Does This Paper Address?

Vision-language models have achieved "super-human" scores on benchmarks, yet they often fail basic reality checks. For example, a model might describe a woman snowboarding as "a man snowboarding" simply because men appear more frequently in snowboarding photos in the training set. Similarly, a model might generate "sitting on a bench" just because it sees a person, even if no bench exists in the image.

The authors argue that we are trapped in a loop: we build a dataset, find it’s biased, and build a new one, only to find new biases. The root cause is that models learn the observational probability $P(L|X)$ (the likelihood of a label given an image) which is plagued by confounders—variables that influence both the image features and the resulting caption. Instead, models should learn the interventional probability $P(L|do(X))$, which represents the true causal effect of the image on the description.

Fig. 1. The toy example about how the confounder disturbs the learning of the true causal effect, where X, L, and P denote image features, label, and position, respectively. (a) A training dataset constructed with a bias that “0” is mostly on the left and “1” is mostly on the right. (b) If we train a digit classifier by the training set in (a), it may not capture the true causal effect X →L, while exploiting the “position knowledge” to make predictions (e.g., when recognizing pixels on the left, predicting the label as “0”) through the backdoor path X ←P →L induced by the confounder P. (c) As a result, if we feed this classifier with the images where “1” appears on the left and “0” on the right, the incorrect predictions will be made.

Methods

The authors propose DICv1.0, a framework that applies two primary deconfounding techniques from causal inference:

  1. Backdoor Adjustment: This technique blocks the "backdoor path" from the image to the label through a confounder. If we know what the confounder is (e.g., a specific set of common objects), we can average the model's predictions across all possible states of that confounder to neutralize its influence.
  2. Front-Door Adjustment: In many cases, the confounder is hidden or too complex to measure. Front-door adjustment introduces a mediator ($Z$) between the image ($X$) and the label ($L$). By chaining the causal effect of $X \to Z$ and $Z \to L$, the model can transmit knowledge while blocking the influence of the unobserved confounder.

In DICv1.0, the authors use commonsense structures (triplets like "apple-is-red") from ConceptNet as the mediator $Z$. To make these causal calculations computationally feasible in a deep neural network, they implement EXPT (Expectation) modules and use the Normalized Weighted Geometric Mean (NWGM) approximation. This allows the model to estimate complex causal expectations in a single forward pass.

Datasets

The researchers evaluated their framework using:

  • MS COCO: The standard benchmark for image captioning, using both the Karpathy split and the official online test server.
  • ConceptNet: A large-scale commonsense knowledge graph used to build the dictionary for the mediator $Z$.
  • VATEX: A large-scale video captioning dataset used to demonstrate the framework's versatility beyond static images.

Key Insights and Ideas

  • Retrospective Causal Analysis: The authors re-examine six years of image captioning history through a causal lens. They show that milestone techniques like Attention Mechanisms are actually intuitive, albeit incomplete, approximations of causal deconfounding.
  • The "Mediator" is Key: By using external knowledge (ConceptNet) as a mediator, the model is forced to ground its descriptions in semantic structures that are less likely to be corrupted by the specific biases of the training images.
  • Deconfounding the Vocabulary: The paper identifies that the vocabulary itself ($S$) can act as a confounder. DICv1.0 specifically addresses this by deconfounding the word embeddings used during the generation process.
Fig. 4. The causal retrospect of the major captioners. The past/present/future are colored by black/blue/red, respectively. We will look ahead the recursive future in Section 6. In these causal graphs, the shadowed variables signify that it is hard to split them for applying the backdoor adjustment, e.g., D in (a) and S in (g).

Key Results

The DIC framework was applied to two state-of-the-art models, Up-Down and AoANet, yielding significant improvements:

  • Performance Boost: On the MS COCO Karpathy split, AoA-DICv1.0 achieved a 131.1 CIDEr-D score, a notable increase over the baseline.
  • Bias Reduction: The models showed a marked decrease in the CHAIR metric (which measures object hallucination). For instance, UD-DICv1.0 reduced object bias and improved gender word accuracy from 0.81 to 0.91.
  • Better Attention: Human evaluations confirmed that deconfounded models attend to more relevant image regions. For example, when generating the word "draw," the DIC model correctly attended to a carriage and horse, whereas the baseline attended to people and incorrectly generated "ride."
Fig. 2. Three examples show how the confounder D induces the spurious correlation. The probability denotes the percentage of co-occurrence of two words in the training set, e.g., P(person|IDRemote) means that “person” and “remote” contributes the 54% occurrences of “remote”. Here we use ID to signify the appearing visual concept. The top caption is generated by Up-Down [24] and the bottom one is generated by our UD-DICv1.0. Red and blue denote the wrong and right words, respectively, and green denotes the concept which may cause the wrong word.

Limitations and Future Work

The authors acknowledge that while DICv1.0 is a strong start, it relies on the assumption that the vocabulary $S$ can be easily split into independent keywords for deconfounding. In reality, language is more complex.

They propose a "Recursive Future" where the mediator itself might be confounded, requiring recursive applications of these causal techniques. Furthermore, while they used ConceptNet, other third-party knowledge bases or even different types of mediators (like scene graphs) could be explored to further harden models against dataset bias.

Summary updated

BibTeX
@article{yang2023deconfounded,
  author = {Xu Yang and Hanwang Zhang and Jianfei Cai},
  title = {{Deconfounded Image Captioning: A Causal Retrospect}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  url = {https://openreview.net/forum?id=3XlgWarjX0W},
}
Figure