Adaptive Sentiment and Interaction Modeling Framework
One model that recognises emotion and sentiment together in English, Hindi and Spanish, built one component at a time so every gain can be traced to a specific part.
StatusModeling complete. Thesis completing December 2026.
The problem
Conversational AI has to understand what people say (sentiment) and how they feel (emotion), often in more than one language. Most published work solves only one of those tasks, or only one language, and reports a single accuracy number that hides which part of the model actually helped.
Research question: how can one adaptive multilingual framework improve emotion and sentiment recognition together, while staying consistent across languages?
The model
An XLM-RoBERTa encoder feeds a BiLSTM. The sequence then splits into branches: a context branch with self-attention, and a token branch that weights the words that carry emotion. A fusion bridge combines them, and two heads predict 7 emotions and 3 sentiment classes from the same shared representation.
The data
The study uses GoEmotions, fully translated into Hindi and Spanish and quality-checked. That gives 54,263 rows per language, 162,789 instances in total, with the original labels kept. Class imbalance is handled with class-balanced loss weights computed once from the English distribution and reused identically across all three languages.
How it was tested
Phase 1: a forward ladder. Start from a plain XLM-R baseline (M1) and add one component per stage: BiLSTM, token attention, context attention, the fusion bridge, an adaptive gate. Hyperparameters and evaluation are identical at every stage, so only the new component changes.
Phase 2: leave-one-out. Take the best model and remove one component at a time, to confirm each one earns its place. The reference models (the baseline, the 3-branch Final and the Proposed Architecture) were run on two independent seeds, and the other stages and ablations on one.
Results
| Stage | Emotion F1 | Sentiment F1 | Gap ratio (ES/EN) |
|---|---|---|---|
| M1 XLM-R baseline | 0.5133 | 0.6877 | 0.8403 |
| M2 + BiLSTM | 0.5180 | 0.6951 | 0.8277 |
| M3 + token attention | 0.5190 | 0.6883 | 0.8386 |
| M4 + context attention (serial) | 0.4988 | 0.7007 | 0.8132 |
| M5 + fusion bridge | 0.5062 | 0.7138 | 0.8123 |
| M6 adaptive gate | 0.5087 | 0.6935 | 0.8249 |
| Final (gate removed) | 0.5203 | 0.6947 | 0.8452 |
The gap ratio is Spanish F1 divided by English F1, so higher means more consistent across languages.
The best model
Removing the global branch from the final model gave the best result in the whole study. It was the only model to lead on emotion F1 and gap ratio across both seeds.
| Emotion F1 | Sentiment F1 | Gap ratio | |
|---|---|---|---|
| Proposed architecture, seed 42 | 0.5349 | 0.6838 | 0.8737 |
| Proposed architecture, seed 43 | 0.5246 | 0.6947 | 0.8508 |
Two honest caveats. The proposed model also needed gradient clipping to train at all: the unclipped run diverged. And results move between seeds, so the consistent ranking across seeds is the finding to trust, not any single number.
What didn’t work
- Serial attention collapsed. Stacking context attention before token attention made the two produce near-identical representations (cosine similarity about 0.997), so they did the work of one. Parallel branches replaced them.
- The adaptive gate collapsed. It settled into a near-constant routing policy, and a fixed-weight version performed the same. It was removed.
- Task-specific heads lost. Separate projection heads for each task did worse than the shared representation.
An open question
The global branch consistently hurts performance, and that effect is replicated. Why is not yet explained. Three hypotheses were tested with falsifiable predictions and all three were eliminated: that the branch is redundant, that it encodes sentiment disproportionately, and that it limits the fused representation’s rank. The result is reproducible, but its mechanism remains unresolved and is left for future work.
How it compares
Emotion F1 of 0.52 to 0.53 sits within the range published for comparable fine-grained multilingual emotion tasks (roughly 0.46 to 0.54), but those studies use different label sets and protocols, so this is a reference band, not a ranking. The distinguishing feature is that one model handles both tasks across three languages at once.
Contributions
- A joint emotion and sentiment framework evaluated across English, Hindi and Spanish.
- A validated multilingual extension of GoEmotions.
- A parallel fusion design, motivated by a measured representation collapse in the serial alternative.
- Systematic architectural evolution through controlled and leave-one-out experiments.
- A simpler two-branch model that beat the original three-branch design on every seed tested, with its limits disclosed.
- A link between data and modeling: translation quality is treated as a testable variable in the architecture study.