Introduction
Context-Aware Emotion Recognition (CAER) aims to identify human emotional states by integrating information from both the individual and their surrounding environment. While the environment often provides valuable situational clues, current CAER models frequently fall victim to context bias. For instance, in the EMOTIC dataset, nearly 45% of images labeled as "happy" are set in specific outdoor or celebratory environments. Conversely, these same settings rarely appear in conjunction with negative emotions.
Standard machine learning models typically follow the path of least resistance, learning to associate these background settings directly with emotion labels rather than analyzing the subject's actual cues. In causal terms, the context acts as a confounder—an external variable that induces a spurious correlation between the input image and the emotion label. This leads to model failure when a subject's emotion contradicts the typical context (e.g., a sad person in a sunny park).
Methodology: Causal Inference for De-confounding
To address this, we move beyond simple statistical likelihood $P(Y|X)$ and adopt a causal inference framework. The proposed approach identifies the causal relationships between the image content ($X$), the emotion label ($Y$), and the environmental confounder ($Z$).
1. Causal Graphing and Backdoor Adjustment
We model the CAER task using a directed acyclic graph to visualize how the confounder $Z$ influences both the input $X$ and the prediction $Y$. To break the harmful link between the confounder and the input, we apply the backdoor adjustment formula. This mathematical intervention forces the model to consider how a subject would appear across a variety of possible contexts, rather than relying on the biased distributions present in the training data.
2. The Confounder Dictionary
Because "context" is an infinite variable, we approximate the confounder space by creating a dictionary of context prototypes. We utilize a pre-trained ResNet-152 backbone (trained on the Places365 dataset) to extract scene features. By applying K-Means++ clustering to thousands of scenes—while masking out human subjects to ensure the dictionary represents the environment alone—we derive a set of representative "context atoms."
3. Contextual Causal Intervention Module (CCIM)
The CCIM is a lightweight, plug-and-play component designed to be integrated into existing architectures. It takes features from a base model and applies a weighted integration using attention mechanisms (such as Dot Product or Additive Attention). This implements the causal intervention by asking: "If we force the context to be $Z$, how do the subject's features change the prediction?" This allows the model to prioritize genuine emotional cues over background signals.
Experimental Evaluation
Datasets
We evaluated the CCIM across three major benchmarks representing diverse challenges:
- EMOTIC: 23,571 images featuring 26 discrete emotion categories in complex, real-world scenes.
- CAER-S: 70,000 static images from television shows focusing on 7 common emotions.
- GroupWalk: 45 videos of individuals in 8 real-world settings (e.g., markets, hospitals), testing performance in unconstrained environments.
Key Insights
Quantitative analysis of these datasets confirmed the presence of structural bias. A "toy experiment" measuring conditional entropy revealed that many scene categories in the training sets only ever appear with a single emotion label. This confirms that context bias is a fundamental flaw in current CAER datasets that necessitates causal intervention.
Results and Discussion
The CCIM provided consistent performance gains when added to state-of-the-art baselines such as EMOT-Net, GCN-CNN, and EmotiCon:
- EMOTIC: The module improved the mean Average Precision (mAP) of the EmotiCon baseline by 3.85%, establishing a new state-of-the-art of 39.13%.
- GroupWalk: We observed an average mAP gain of 2.85% across various models.
- CAER-S: Classification accuracy increased by up to 2.52%, with the top-performing model reaching 91.17%.
Notably, the most significant improvements occurred in "infrequent" categories like Anticipation and Sympathy. In these cases, the model previously lacked sufficient data to overcome the dominant context bias, but the causal intervention allowed it to generalize more effectively.
Conclusion
By shifting from association-based learning to causal intervention, the CCIM effectively mitigates the impact of spurious context correlations in emotion recognition. While the module is highly effective, we noted a potential for "over-intervention" in extremely small sample subsets where the model may over-correct for non-existent biases. Future research will explore dynamic dictionary building and the application of this causal framework to temporal contexts in video-based emotion recognition.
Summary updated