SentiMM: Multi-Agent Sentiment Analysis
- SentiMM is a multimodal, multi-agent framework that processes heterogeneous text and visual data through a structured five-stage pipeline for sentiment analysis.
- The framework employs specialized agents—including text and image analysts, a fusion inspector, a KB assistant, and a classifier aggregator—to enhance performance over state-of-the-art baselines.
- The accompanying SentiMMD benchmark, with seven sentiment categories and detailed ablation studies, validates significant accuracy improvements and highlights future extension possibilities.
SentiMM is a multimodal, multi-agent framework for sentiment analysis in social media that addresses the challenges presented by heterogeneous and multi-label emotional content. The system employs a structured pipeline of specialized agents to systematically process text and visual data, fuse multimodal signals, retrieve relevant contextual knowledge, and deliver fine-grained sentiment classification. The accompanying SentiMMD dataset provides a benchmark with seven annotated sentiment categories, supporting rigorous comparison against state-of-the-art baselines (Xu et al., 25 Aug 2025).
1. Multi-Agent Architecture and Data Flow
SentiMM is organized as a five-stage pipeline, where each functional agent specializes in a distinct aspect of multimodal sentiment analysis. The sequential flow of data and agent responsibilities is as follows:
2
- Text Analyst: Processes input text , including preprocessing, segmentation into units , and per-segment sentiment analysis via an LLM yielding and feature vector . Global text sentiment is aggregated as , with retaining scores and features.
- Image Analyst: Accepts an image or video , decomposes video into frames , extracts visual feature vectors 0 using CNN-based 1, and per-frame sentiment via 2. Video sentiment is aggregated and outputs 3.
- Fusion Inspector: Fuses 4 and 5 by learned mapping 6, computes a joint embedding 7, and applies 8 for multimodal scoring (9, 0). Consistency checks are performed (e.g., 1), and inconsistencies prompt auxiliary hypotheses via 2.
- KB Assistant: Selects keys via 3, retrieves top-4 matching entries via similarity search against vector database 5, and generates a contextual report 6 using 7. Output 8 includes retrieved content.
- Classifier Aggregator: Calculates average score from similar examples 9, fuses it with 0 as 1, and predicts label 2 via 3. The final output is the predicted sentiment label 4 and explanation 5.
2. Mathematical and Computational Foundations
SentiMM formalizes its modules and inter-agent communication through specific mathematical constructs:
- Text Encoding: Tokenized inputs 6 are embedded as 7, then transformed by a stack of Transformers to yield 8.
- Visual Encoding: Image patches or CNN-derived features are mapped to 9.
- Cross-Modal Fusion: Joint embedding leverages cross-attention:
0
where 1 and 2. Output 3.
- Knowledge Retrieval: For a fusion-derived key 4, top-5 similar vectors 6 are identified via cosine similarity 7.
- Classification: The aggregator employs multi-class cross-entropy loss:
8
with 9 as one-hot labels, 0 output probabilities, and 1 weight decay.
3. The SentiMMD Benchmark Dataset
SentiMMD is a comprehensive multimodal sentiment analysis benchmark curated to support SentiMM and related research.
- Label Taxonomy: Seven sentiment categories—Like (positive endorsement), Happiness (joy), Anger (hostility), Disgust (revulsion), Fear (anxiety), Sadness (sorrow), and Surprise (unexpectedness).
- Statistics: 3,500 samples (500 per label); 90%/10% train/test split (3,150/350); includes text + image (224×224) or text + video (3–7 frames, ≈12.3s), with median text length of 28.7 tokens.
- Annotation Procedure: Each instance is labeled by 40 human annotators, with multi-stage verification against GPT-based predictions. Discrepancies are adjudicated by expert review or removed.
| Label | Definition | Samples |
|---|---|---|
| Like | Positive endorsement | 500 |
| Happiness | Overt joy or pleasure | 500 |
| Anger | Hostility or irritation | 500 |
| Disgust | Revulsion or contempt | 500 |
| Fear | Anxiety or dread | 500 |
| Sadness | Sorrow or regret | 500 |
| Surprise | Unexpectedness | 500 |
4. Empirical Evaluation and Ablation
SentiMM demonstrates state-of-the-art performance on SentiMMD, compared to leading multimodal LLMs. Models are evaluated using accuracy (Acc), macro precision (MP), macro recall (MR), and macro F1 (MF1).
| Model | Acc (%) | MP (%) | MR (%) | MF1 (%) |
|---|---|---|---|---|
| GLM-4V-9B | 68.2 | 67.5 | 66.8 | 67.1 |
| mPLUG-7B | 65.4 | 64.7 | 63.9 | 64.3 |
| Qwen2.5-VL-3B | 59.7 | 57.1 | 58.2 | 57.6 |
| Qwen2.5-VL-7B | 75.1 | 74.5 | 73.9 | 74.2 |
| GPT-4o | 77.8 | 77.2 | 76.7 | 77.0 |
| SentiMM (GPT-4o) | 89.3 | 88.7 | 88.1 | 88.4 |
| SentiMM (Qwen2.5-VL-7B) | 82.1 | 81.5 | 81.0 | 81.2 |
Ablation studies using SentiMM (GPT-4o backbone) quantify the contribution of each agent:
| Variant | Acc (%) | MF1 (%) |
|---|---|---|
| Full SentiMM | 89.3 | 88.4 |
| – without KB Assistant | 84.7 | 83.9 |
| – without Fusion Inspector | 85.2 | 83.7 |
| – without Image Analyst (text only) | 78.9 | 77.8 |
| – without Text Analyst (image only) | 74.3 | 73.5 |
| – without Classifier Aggregator | 83.5 | 81.8 |
All components, especially the Fusion Inspector and KB Assistant, provide substantial performance gains. Removal of any agent leads to consistent reduction in accuracy and MF1, with end-to-end multi-agent organization yielding improvements up to +11.5 accuracy points over the base GPT-4o baseline.
5. Analysis of Failure Modes and Limitations
Observed limitations include:
- Multimodal Conflict: Cases where text and visual modalities encode opposing emotions (e.g., sarcastic captions over positive images) lead to inconsistency and misclassification, even with inconsistency-checking logic.
- External Knowledge Coverage: Sentiment cues heavily dependent on rare, evolving, or culturally specific references can cause failures in knowledge retrieval, producing mismatches or off-topic supplementary reports.
A plausible implication is that enriching the external KB with up-to-date cultural content and improving multimodal disambiguation mechanisms may further boost robustness.
6. Prospects and Future Extensions
Extensions highlighted for SentiMM include:
- Incorporation of new modalities such as audio and user metadata to capture broader affective cues.
- Enabling online or semi-automated updates of the external KB to adapt to trending memes and slang, addressing the challenge of semantic drift in social content.
- Migration from pipeline prompting to joint end-to-end fine-tuning of all agents, with the goal of improved integration and efficiency across modality and retrieval boundaries.
Ongoing work aims to reinforce SentiMM’s modular interpretability while closing remaining gaps in coverage and adaptability, especially for complex, context-dependent sentiment attributions (Xu et al., 25 Aug 2025).