Research
Context-Aware Mixture of Domain Experts for Bodily Expression of Emotion in the Wild
Overview Research area: Computer vision — automatic identification of bodily expressions of emotion (AIBEE) in unconstrained "in the wild" imagery, with a focus on context-aware probabilistic fusion.
- arXiv
- 2608.02331
- Published
- 2026-08-03
- Authors
- Mohammad Mahdi Dehshibi, David Masip
AI summary
Overview
- Research area: Computer vision — automatic identification of bodily expressions of emotion (AIBEE) in unconstrained "in the wild" imagery, with a focus on context-aware probabilistic fusion.
- Technical level: Advanced. The paper assumes familiarity with convolutional architectures, softmax/conditional probability, mixture-of-experts gating, and the BoLD benchmark's multi-output regression formulation.
- Scope: The paper proposes CA-MoDE, a context-aware mixture of domain experts that fuses scene and object contextual priors with a body-based emotion expert using max-endorsement gating, and evaluates it on the Body Language Database (BoLD).
What This Paper Is About
The same body posture can convey different emotions depending on the surrounding scene and objects, yet most bodily emotion recognition methods treat scene and object cues as extra feature channels rather than as structured beliefs about which emotions are plausible. This paper asks whether explicitly modelling the probabilistic link between context and emotion — including the information carried by missing context — can improve emotion recognition from single still images. The authors build CA-MoDE to do exactly that and test it against video-based methods on BoLD.
Key Contributions
- A mixture-of-domain-experts architecture (CA-MoDE) with a shared GoogLeNet-derived feature encoder and three parallel experts: a scene context expert (365 Places2 categories), an object context expert (80 COCO categories), and an emotion expert producing a 29-dimensional output (26 discrete emotions plus Valence, Arousal, Dominance).
- Emotion-context co-occurrence priors computed from training data, defining both available-context conditionals
Pr(B_i | A_j)and "anticipated unavailable context" conditionalsPr(B_i | ¬A_j), which let the model reason about what the absence or low confidence of a cue implies. - A max-endorsement gating strategy that selects the strongest contextual signal across experts per emotion dimension and combines the available and unavailable-context priors through a sigmoid gate, avoiding the dilution caused by averaging conflicting or uninformative context distributions.
- A demonstration that structured spatial context can partly substitute for temporal information: CA-MoDE achieves an Emotion Recognition Score (ERS) of 0.3269 on BoLD using only single still images, outperforming three competing temporal models.
Main Findings
- Overall BoLD test performance: CA-MoDE reaches an ERS of 0.3269, with mR² of 0.1404, mAP of 0.2938, and mRA of 0.7333.
- Comparison against temporal baselines: Luo et al. (0.2531 ERS; 0.1030 mR²; 0.1714 mAP; 0.6352 mRA), Filntisis et al. (0.2623; 0.1141; 0.1796; 0.6416), and Pikoulis et al. (0.3058; 0.1609; 0.2187; 0.6829) all exploit temporal information via optical flow, skeleton sequences, or multi-segment sampling, yet score lower overall. A Chance reference based on priors scores 0.1513 ERS (0 mR², 0.1055 mAP, 0.5000 mRA).
- Classification gains drive the result: CA-MoDE's mAP (0.2938) and mRA (0.7333) exceed every compared method by a clear margin, but its mR² (0.1404) is lower than Pikoulis et al.'s 0.1609. The paper describes this as a deliberate architectural trade-off: conditioning on discrete contextual evidence helps categorical emotion recognition more than continuous affect regression, and the classification gains are large enough that the aggregate ERS still improves.
- Best validation configuration: A grid search over κ from 14 to 80 in steps of 6 and λ from 0 to 0.5 in steps of 0.1 selected (κ, λ) = (56, 0.2), which achieved an ERS of 0.4122 on the validation set. Larger values of (κ, λ) increased computational complexity and made predictions more sensitive to noisy or uninformative contextual soft pseudo-labels.
- Gate hyperparameters: τ = 0.5 and α = 10 were fixed after a validation grid search over τ ∈ {0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9} and α ∈ {5, 10, 15, 20}.
- Sparsity of contextual labels: Applying a threshold of 0.01 to normalised average soft pseudo-label vectors showed that 27 place categories and 14 object categories exceed the threshold, motivating the lower bound of the κ search at 14.
- Architecture-independence (Table II): Replacing the GoogLeNet-derived modules with ResNet-18 gives 0.3206 ERS with 10.51M trainable parameters (mR² 0.1398, mAP 0.2815, mRA 0.7216); EVA-02 gives 0.3272 ERS with 273.15M trainable parameters (0.1392, 0.3067, 0.7238); the proposed architecture gives 0.3269 ERS with 6.11M trainable parameters (0.1404, 0.2938, 0.7333). EVA-02 uses roughly 45 times the trainable parameter count of the proposed architecture.
- Effect of pre-trained initialisation: Using GoogLeNet weights pre-trained on ImageNet, Places2, or Microsoft COCO for the shared encoder and emotion expert — with training reduced to 45 epochs — performed marginally worse across all metrics than random initialisation, suggesting BoLD's visual statistics differ from those of general-purpose databases. (The table reporting these numbers is truncated in the provided content.)
- Per-emotion behaviour: Engagement, Happiness, Pleasure, Anticipation, and Sadness are the top-5 most accurately predicted emotions. BoLD is biased towards Engagement, Anticipation, Confidence, Peace, and Doubt/Confusion, so the top-5 predictions partially diverge from the five most frequent categories — the authors attribute this to contextual conditioning attenuating label imbalance.
- VAD asymmetry: All methods regress Arousal better than Valence and Dominance. CA-MoDE's authors connect this to static cues: arousal correlates with postural and scene-level features visible in a single frame, while valence and dominance require finer disambiguation that the contextual priors only partially supply.
- VLM-based comparisons are not directly comparable: Zhang et al.'s EmotionCLIP reported mAP of 42.23% and mRA of 81.36% on BoLD, and Xenos et al. reported mAP of 26.66% and classification accuracy of 93.08%. The paper states that these methods focus on specific classification subtasks of BoLD rather than the full continuous and discrete suite, and the unavailability of mRA prevents computing the composite ERS, so a direct quantitative comparison is not applicable.
Methodology in Plain English
- Frame the task as multi-output regression. Each image is mapped to a 29-dimensional target: 26 discrete emotions scaled to [0, 1] and three continuous affective variables (Valence, Arousal, Dominance) in [1, 10]. Training minimises mean squared error end-to-end.
- Share one encoder, split into three experts. A GoogLeNet-derived encoder produces a 14 × 14 × 528 feature map from the Inception 4d module. Three heads read it: a scene expert producing a distribution over 365 Places2 categories, an object expert producing a distribution over 80 COCO categories, and an emotion expert producing the 29-dimensional prediction.
- Handle missing contextual labels with pseudo-labels. BoLD contains no place or object annotations, so the scene expert is initialised from a Places2-pretrained model and the object expert from a YOLO-style model pre-trained on COCO (7 anchor boxes, non-maximal suppression threshold 0.4). Both context backbones are frozen; only learnable 1 × 1 convolution filters and bias terms that project their outputs into a κ-dimensional latent space are updated.
- Compute co-occurrence priors from the training set. Soft counts of emotions against each context expert's confidence score give joint probabilities, from which conditional probabilities
Pr(B_i | A_j)(available context) andPr(B_i | ¬A_j)(anticipated unavailable context) are derived for both scene and object experts. - Aggregate with max-endorsement, then gate. For each emotion dimension, the strongest signal across the two context experts is selected — for available context and for missing context separately — rather than averaged. A sigmoid gate
Q_i = sigmoid(α(p⁺_i − τ))then decides, per emotion, how much weight to give the available-context prior versus the missing-context prior, producing a fused contextual vector through a convex combination. - Modulate the emotion expert's output. The fused vector multiplies the emotion expert's predictions element-wise and is scaled by a hyperparameter λ, amplifying emotions that context supports and suppressing those it does not. A learnable scale parameter σ sharpens the emotion expert's softmax into a discriminative prior for the gate.
- Evaluate with the standard protocol. The network trains with SGD (momentum 0.9, initial learning rate 10⁻², decayed by a factor of 0.1 every 45 epochs, maximum 90 epochs, mini-batch 8) on an NVIDIA GeForce RTX 5090 GPU (24 GB). BoLD is split at the clip level into 60% training, 10% validation, and 30% test. Classification metrics come from thresholding the 26 emotion outputs at 0.5, regression from mR² on the three VAD dimensions, and all are combined into the ERS.
Why This Matters
Impact on research. The paper reframes context integration in AIBEE from feature augmentation to probabilistic evidence. It supplies a concrete, differentiable mechanism for encoding what a missing contextual cue implies — a case most prior BoLD work handles implicitly or not at all — and shows that spatial context alone can match or exceed temporal models on overall ERS, which raises a methodological question about how much of the reported benefit of video-based methods is attributable to dynamics versus scene composition. The code is released at https://github.com/dehshibi/CA-MoDE under CC BY-NC-SA 4.0.
Real-world applications:
- Affective computing in human-robot interaction, where a robot must read a person's emotional state from posture and surroundings when facial cues are occluded.
- Video surveillance and public-safety monitoring, where scene and object context (for example, a weapon versus a gift box) changes the interpretation of the same posture.
- Content moderation and media tagging, where automatic affect labels for movie or user-generated clips must account for setting and props.
- Driver and workplace monitoring, where scene context can help disambiguate otherwise ambiguous bodily signals.
- Clinical or assistive settings that analyse affect from still images when video capture is impractical.
Industry relevance. The architecture uses 6.11M trainable parameters — substantially fewer than the 273.15M of an EVA-02 variant that reaches comparable ERS — and relies on frozen pre-trained context experts, making it attractive for deployment where compute is constrained. The finding that random initialisation slightly outperforms general-purpose pre-training on BoLD also matters to practitioners choosing transfer-learning strategies for affect data.
Future Directions
- Improving continuous affect regression. The paper states explicitly that the modest mR² values across all methods confirm the full VAD regression task remains an open challenge beyond spatial contextual reasoning alone, and that valence and dominance require finer disambiguation than the priors provide.
- Combining spatial context with temporal dynamics. Because CA-MoDE uses only single still images while video-based models use optical flow, skeleton sequences, or multi-segment sampling, integrating the two sources is a natural extension the paper's framing invites.
- Extending the ablation. The paper describes six ablation experiments but the provided content details only two (network architecture and initial weights), leaving further component-level analyses to the full text.
- Making the fusion a strict Bayesian posterior. The authors describe their fusion as "a robust, differentiable heuristic rather than a strict Bayesian posterior," indicating that a more principled probabilistic treatment is an open question.
- Testing robustness to noisy or absent context. The paper notes that the gate hyperparameters were chosen in part because larger (κ, λ) values reduce robustness when contextual soft pseudo-labels are noisy or uninformative, which suggests systematic stress-testing of degraded context.
Target Audience
Researchers and graduate students in affective computing and computer vision who work on bodily expression recognition, context-aware learning, or mixture-of-experts fusion — particularly those using the BoLD benchmark and needing to understand its ERS metric composition. It also suits practitioners who want a compact, still-image model for emotion recognition and engineers evaluating whether probabilistic context priors can replace heavier temporal or vision-language pipelines. Readers need prior familiarity with convolutional network design and conditional probability to follow the fusion derivation.
Authors’ abstract
The same body posture can convey entirely different emotions depending on its surrounding context, yet most methods for recognising bodily emotions treat scene and object cues as auxiliary feature augmentations rather than as structured priors over the plausibility of emotions. We introduce the Context-Aware Mixture of Domain Experts (CA-MoDE) for bodily emotion recognition. CA-MoDE incorporates dedicated scene and object experts to generate soft distributions over emotion categories conditioned on their respective domains. These domain-conditioned soft predictions serve as structured contextual priors that modulate the body expert's predictions at the distributional level rather than at the feature level. To fuse these multi-domain signals, we propose a task-tailored max-endorsement gating strategy that selects the strongest contextual signal across experts for each emotion dimension. Our gating strategy mitigates the signal dilution that typically occurs when conflicting or uninformative context distributions are averaged. CA-MoDE achieves an Emotion Recognition Score of 0.3269 on the Body Language Database. By outperforming existing temporal models using only single still images, our framework demonstrates that explicitly modelling structured spatial context can serve as a complementary discriminative proxy for the behavioural dynamics typically captured by video.