Weighted Instance Aggregation Network (WIAN)
- WIAN is a graph-enhanced, context-aware aggregation module that selectively weights video frames to boost salient facial cues.
- It integrates dynamic weight gates within an LSTM, combined with multi-head self-attention, to produce robust video representations.
- Demonstrated in MICACL, WIAN mitigates head-class bias and improves minority class recall in long-tailed dynamic facial expression datasets.
Searching arXiv for the cited WIAN-related papers to ground the article in current sources. Weighted Instance Aggregation Network (WIAN) is the aggregation backbone in the MICACL framework for long-tailed dynamic facial expression recognition (DFER), where it converts a bag of temporally ordered instance features into a single, class-discriminative video representation while explicitly accounting for the uneven importance of instances (Cui et al., 4 Sep 2025). In MICACL, WIAN operates after the Graph-Enhanced Instance Interaction Module (GEIIM), uses graph-enhanced instance features to derive context-aware importance weights, injects those weights into a gated LSTM update through a Dynamic Weight Gate (DWG), and then refines the resulting hidden-state sequence with multi-head self-attention before producing the final video-level feature used for classification and contrastive learning (Cui et al., 4 Sep 2025). Related literature contains conceptually similar weighted instance aggregation mechanisms, notably the instance-weighted label aggregation of "Deep Weighted Averaging Classifiers" (Card et al., 2018) and the query-conditioned support-instance aggregation in "Multi-Level Matching and Aggregation Network for Few-Shot Relation Classification" (Ye et al., 2019), although the explicit term WIAN is used in MICACL.
1. Problem formulation and motivation
WIAN is formulated in a multi-instance learning (MIL) setting in which a video is a bag containing instances, such as frames or short clips, and only a subset of those instances carry emotion cues (Cui et al., 4 Sep 2025). In long-tailed DFER, this setting is especially difficult because head classes dominate the training distribution, minority categories offer far fewer clips and often present subtle, short-lived expressions, and in-the-wild videos contain many neutral or noisy frames (Cui et al., 4 Sep 2025). Aggregation must therefore be selective rather than uniform.
The MICACL formulation identifies two failure modes of naive temporal pooling. Mean pooling treats all instances equally, which dilutes salient frames, whereas max pooling can overemphasize spurious peaks; together these behaviors induce head-class bias and low recall for weak expressions (Cui et al., 4 Sep 2025). The aggregated feature space is then dominated by head-style dynamics, and tail classes with few clips and weak expressions fail to surface their critical frames (Cui et al., 4 Sep 2025).
WIAN addresses this by learning instance importance and gating the contribution of each instance into the video-level representation, with the importance guided by graph-enhanced context from GEIIM rather than computed from an isolated instance descriptor (Cui et al., 4 Sep 2025). This design makes the weighting context-aware and noise-robust, because instances connected to salient neighbors can be emphasized while isolated or noisy instances can be downweighted (Cui et al., 4 Sep 2025).
2. Placement within MICACL and data flow
MICACL comprises four stages: backbone feature extraction, GEIIM, WIAN, and classifier-plus-losses (Cui et al., 4 Sep 2025). The backbone is R3D, and in implementation each video is represented by sampled frames with resized faces, producing instance features with batch-form tensor
where is batch size, is the number of instances per video, and is the backbone channel dimension (Cui et al., 4 Sep 2025).
GEIIM first constructs an adaptive adjacency matrix and propagates features to obtain context-enriched per-instance features (Cui et al., 4 Sep 2025). WIAN then consumes both the original instance sequence and the GEIIM output , computes dynamic gates 0 and weights 1 for each instance, aggregates the sequence through a gated LSTM, refines the hidden states with multi-head self-attention, and outputs a single aggregated representation
2
for classification and MCCL (Cui et al., 4 Sep 2025).
The input-output interface is therefore explicit. The input instances satisfy 3 with 4 in practice, the GEIIM context input is 5, and the output is a single video representation 6 (Cui et al., 4 Sep 2025). Internally, WIAN produces hidden states 7, then applies multi-head self-attention and pooling before projection back to classifier dimension 8 (Cui et al., 4 Sep 2025).
3. Mathematical structure of weighted aggregation
The upstream GEIIM context used by WIAN is defined through adaptive graph construction. GEIIM learns node embeddings 9 and 0, constructs
1
and propagates features by
2
with learnable 3 (Cui et al., 4 Sep 2025). In this role, 4 supplies graph-enhanced, noise-suppressed instance features to WIAN.
WIAN derives instance importance from the GEIIM output rather than directly from raw 5. For each time step 6,
7
yielding a weight vector aligned with the feature dimension (Cui et al., 4 Sep 2025). In practice, this vector is mapped through learned linear projection or broadcasting to match the dimensionality of the LSTM gate, retaining per-channel saliency while enabling per-step gating (Cui et al., 4 Sep 2025).
The central mechanism is the Dynamic Weight Gate. WIAN augments a standard LSTM with a gate that scales the candidate cell update by instance importance:
8
where 9 is Sigmoid, 0, 1, and 2 (Cui et al., 4 Sep 2025). The standard LSTM gates and candidate state are
3
WIAN inserts 4 into the cell update:
5
6
This makes an instance’s contribution dependent on both temporal context, through 7, and graph-enhanced saliency, through 8 (Cui et al., 4 Sep 2025).
The recurrent sequence is subsequently refined by multi-head self-attention:
9
and then aggregated by pooling and projected to classifier dimension:
0
The weighted aggregation core is therefore not a simple weighted sum at sequence output; it is embedded inside the recurrent state transition itself (Cui et al., 4 Sep 2025).
4. Training objective, regularization, and efficiency
WIAN is trained jointly with the rest of MICACL through cross-entropy classification and Multiscale Category-aware Contrastive Learning (MCCL) (Cui et al., 4 Sep 2025). The cross-entropy term is applied to logits derived from 1:
2
while MCCL receives 3 and constructs multiscale projections, category-aware weights, and scale-specific similarities (Cui et al., 4 Sep 2025). The full training objective is
4
with 5 controlling the balance (Cui et al., 4 Sep 2025). The role division is explicit in the source: MCCL emphasizes tail categories via 6 weighting and hard samples via 7, complementing WIAN’s instance-selective aggregation (Cui et al., 4 Sep 2025).
No explicit entropy or sparsity penalty on 8 is reported (Cui et al., 4 Sep 2025). Robustness is instead attributed to GEIIM normalization, specifically the softmax normalization of the adaptive adjacency matrix, and to the DWG’s sigmoid gating (Cui et al., 4 Sep 2025). This is significant because it distinguishes WIAN from weighting schemes that enforce sparsity directly through additional regularizers.
The implementation details pertinent to WIAN are also specified. The backbone is R3D with Torchvision pretrained weights; the model uses 9 frames per video; faces are resized to 0; optimization uses AdamW with cosine decay, initial learning rate 1, minimum learning rate 2, weight decay 3, and 4 epochs on an RTX A6000 GPU (Cui et al., 4 Sep 2025). Batch size, gate hidden size 5, and 6 are tuned empirically and are not explicitly reported (Cui et al., 4 Sep 2025).
From a computational perspective, WIAN scales linearly in the sequence length 7 (Cui et al., 4 Sep 2025). Its per-step cost is 8 for computing 9 through softmax over feature channels and 0 for the DWG mapping and LSTM gates, giving per-video complexity
1
(Cui et al., 4 Sep 2025). GEIIM adds 2 for adjacency construction and propagation, and multi-head self-attention adds a heads3 parameter overhead (Cui et al., 4 Sep 2025). The MICACL system reports 4 FLOPs on DFEW, which the source presents as efficient relative to transformer-heavy baselines (Cui et al., 4 Sep 2025).
5. Empirical behavior and ablation evidence
On DFEW under 5-fold evaluation, MICACL achieves WAR 5 and UAR 6, with minority-class results including disgust 7 and fear 8, described as far above prior 9–0 ranges (Cui et al., 4 Sep 2025). On FERV39k, MICACL reaches WAR 1 and UAR 2, surpassing prior state of the art in UAR (Cui et al., 4 Sep 2025).
Ablation evidence on DFEW Fold 5 isolates the contribution of WIAN relative to GEIIM and MCCL. The source reports the following configurations (Cui et al., 4 Sep 2025):
| Configuration | WAR | UAR |
|---|---|---|
| Baseline (no GEIIM/WIAN/MCCL) | 64.55 | 54.17 |
| +GEIIM | 68.11 | 57.39 |
| +GEIIM+WIAN | 68.62 | 56.26 |
| +GEIIM+WIAN+MCCL | 69.91 | 64.34 |
These results support two distinct observations. First, WIAN improves overall accuracy relative to GEIIM alone, as seen in the WAR increase from 3 to 4 (Cui et al., 4 Sep 2025). Second, WIAN alone does not maximize balanced recall under long-tailed conditions; UAR decreases from 5 to 6 when MCCL is absent, and then rises to 7 when MCCL is added (Cui et al., 4 Sep 2025). A common misconception is therefore that selective instance weighting by itself solves category imbalance. The ablation instead indicates that WIAN’s selective aggregation and MCCL’s category-aware reweighting are complementary rather than interchangeable (Cui et al., 4 Sep 2025).
The reported failure cases are consistent with this interpretation. In extremely noisy or near-neutral sequences, if GEIIM fails to construct informative adjacency, then 8 may underdiscriminate and the DWG may suppress genuine subtle cues (Cui et al., 4 Sep 2025). For very short sequences, limited 9 reduces the benefit of graph-enhanced context and gating, and mean pooling may be competitive when dynamics are minimal (Cui et al., 4 Sep 2025). Performance is also sensitive to 0, gate hidden size 1, and the projection aligning 2 to gate dimensionality (Cui et al., 4 Sep 2025).
6. Relation to other weighted-instance aggregation paradigms
Within the supplied literature, WIAN has both a narrow and a broader comparative meaning. Narrowly, it denotes the specific MICACL module that derives 3 from GEIIM-enhanced features, injects those weights into an LSTM cell through DWG, and refines the resulting sequence with multi-head self-attention (Cui et al., 4 Sep 2025). More broadly, related work contains architectures that aggregate instances by learned weights, even when they do not use the name WIAN. This suggests a family resemblance across exemplar-weighted classification, query-conditioned support aggregation, and context-aware temporal MIL.
"Deep Weighted Averaging Classifiers" replaces a final softmax with instance-weighted aggregation over training examples in a learned embedding space (Card et al., 2018). Its embedding is
4
its kernel weight is
5
with fixed 6, and its class prediction is a normalized weighted sum of one-hot training labels (Card et al., 2018). In the comparative description provided for DWAC, this model is described as a prototypical WIAN in the sense that it embeds inputs with a deep network, computes kernel-based weights to training instances, and aggregates labels with normalized weights (Card et al., 2018). The difference from MICACL’s WIAN is structural: DWAC aggregates over stored training instances at inference, whereas MICACL’s WIAN aggregates temporally ordered instances within a video and places the weighting mechanism inside recurrent state updates (Card et al., 2018).
"Multi-Level Matching and Aggregation Network for Few-Shot Relation Classification" provides a second comparison point (Ye et al., 2019). There, support instances are aggregated by query-conditioned attention:
7
The supplied comparative discussion explicitly characterizes this attentive aggregation as a WIAN because it aggregates support instances through learned, query-conditioned weights (Ye et al., 2019). In contrast to MICACL, the weighting signal is conditioned on a query representation rather than on graph-enhanced temporal context, and the aggregate is a class prototype rather than a video descriptor (Ye et al., 2019).
These comparisons clarify what distinguishes MICACL’s WIAN from simpler alternatives. Versus mean or max pooling, WIAN learns per-instance weights conditioned on temporal context; versus standard attention-based MIL such as the Ilse et al. style described in the source, WIAN derives 8 from GEIIM-enhanced features 9 and injects them inside an LSTM cell via DWG rather than forming only a single weighted sum (Cui et al., 4 Sep 2025). A plausible implication is that the term WIAN is most precise when reserved for architectures in which instance weighting is part of the aggregation dynamics rather than only an output-stage reweighting.
7. Conceptual significance and scope of applicability
In MICACL, WIAN is presented as the aggregation engine that turns instance features into a robust video-level representation via context-aware weighted gating (Cui et al., 4 Sep 2025). Its defining computations are the importance scores
0
the dynamic gate
1
and the gated cell update
2
(Cui et al., 4 Sep 2025). In this sense, the essential contribution is not merely weighted aggregation, but weighted recurrent aggregation with graph-aware context.
Its significance in long-tailed DFER follows directly from the design constraints stated in the source. Minority categories are weakly represented and often subtle; in-the-wild sequences contain many neutral, occluded, or off-angle frames; and naive pooling induces decision boundaries biased toward head classes (Cui et al., 4 Sep 2025). WIAN is therefore aimed at suppressing noisy instances and boosting salient ones before the final classification and contrastive objectives operate (Cui et al., 4 Sep 2025).
At the same time, the ablation and limitation analysis bounds the scope of the claim. WIAN alone does not rebalance categories, does not guarantee improved UAR in isolation, and can underperform when graph context is uninformative or sequence length is too short (Cui et al., 4 Sep 2025). Its strongest reported behavior emerges when it is coupled with GEIIM’s adjacency-aware context and MCCL’s category-aware contrastive optimization, producing improved overall accuracy and balanced recall on DFEW and FERV39k (Cui et al., 4 Sep 2025).