Translating Emotions at Scale: a validated multilingual extension of GoEmotions
GoEmotions translated into Hindi and Spanish, with every translation back-checked, weak ones retried, and no rows dropped.
StatusUnder peer review (IJCA). Code and data coming to GitHub.
The problem
Emotion datasets are mostly English. Translating a real, human-annotated dataset is cheap, but translation quality is usually taken on trust, so errors flow straight into model training. A translation can render the facts of a sentence correctly while dropping the interjection that carried the surprise, or flatten a sarcastic remark into its literal opposite. This work builds Hindi and Spanish versions of GoEmotions and measures how good the translations are, instead of assuming it.
The paper does not train a classifier. It delivers the dataset, with its quality information kept, and an independent check that the label distribution is exactly what GoEmotions says it should be.
Contributions
- A complete Hindi and Spanish translation of all 54,263 rows of the GoEmotions modelling split, with the original train, validation and test boundaries kept.
- A back-translation validation and retry pipeline applied to every row, not a sample.
- A measured length confound in the validation metric itself, with results reported stratified by sentence length.
- A manual error taxonomy showing that the two languages fail in different ways.
- Three independent reconstructions of the label counts, all in exact agreement.
What it contains
- 54,263 rows per language, matching the official splits: 43,410 train, 5,426 validation and 5,427 test.
- Three languages: English, Hindi (IndicTrans2) and Spanish (NLLB-200), tied together by a shared row id.
- Labels kept: the original 27 emotions, the Ekman groups, and a derived coarse sentiment label of 20,710 positive, 12,342 negative and 21,211 ambiguous rows.
- Every quality flag kept: per-row similarity scores and flags for both languages, with nothing filtered.
How it was built
- Translate. English to Hindi with IndicTrans2, English to Spanish with NLLB-200, using beam search with 3-gram repeat blocking and early stopping. Both models fit together in about 4 to 5 GB of VRAM on one RTX 4060 Ti, and all 54,263 rows in both languages took 4 hours 6 minutes, with no missing or empty translations.
- Back-translate and score. Each translation is translated back to English and scored against the original with LaBSE cosine similarity. Rows below 0.80 are flagged. The threshold is only a trigger for the next step, not the paper’s quality metric.
- Retry. Every flagged row is re-translated with heavier settings (8 beams, a 384-token budget, no early stopping). The new version replaces the old only if its score is strictly higher.
- Verify. The source label counts were rebuilt independently, as described below.
Translation fidelity
Before retry, 15.24% of Hindi translations (8,267 of 54,263) and 28.11% of Spanish translations (15,254) fell below 0.80, and 34.71% of rows (18,834) were flagged in at least one language. A 200-row pilot had predicted 15% and 28.5%. These are not translation error rates, for the reason in the next section.
The metric has a length bias
Short sentences score lower similarity regardless of whether they were translated correctly. In the 200-row pilot, sentences of 1 to 5 words averaged 0.839 (Hindi) and 0.789 (Spanish), against 0.908 and 0.895 for 21 words or more. A two-word source, “…and?”, gets a correct Spanish rendering, “¿Y qué?”, and still scores 0.71.
| Source length | Hindi mean similarity | Spanish mean similarity |
|---|---|---|
| 1 to 5 words | 0.839 | 0.789 |
| 6 to 10 words | 0.895 | 0.863 |
| 11 to 15 words | 0.910 | 0.877 |
| 16 to 20 words | 0.873 | 0.854 |
| 21+ words | 0.908 | 0.895 |
Two checks showed this is the metric and not a weak scorer. Re-scoring with a much larger back-translation model left the Spanish flag rate near 28 to 30% and slightly raised Hindi’s. And the similarity distributions, fitted with a two-component Gaussian mixture, show no clean valley between good and bad translations. The fitted crossover points (0.821 for Hindi, 0.844 for Spanish) sit above the 0.80 threshold, but raising it would not help, because no single cutoff separates real errors, length noise and back-translation artefacts. The paper therefore reports length-stratified similarity as the quality signal and keeps 0.80 only as the retry trigger.
What the residual errors are
After retry, 40 still-flagged rows per language were drawn at random with a fixed seed and read by hand against their back-translations. The categories were defined from what was seen, not in advance.
| Category | Hindi (n=40) | Spanish (n=40) |
|---|---|---|
| A. Back-translation artefact: the forward translation was fine | 8 (20.0%) | 1 (2.5%) |
| B. Correct translation flagged only by length noise | 11 (27.5%) | 7 (17.5%) |
| C. Dropped clause or interjection | 2 (5.0%) | 23 (57.5%) |
| D. Genuine translation error | 19 (47.5%) | 9 (22.5%) |
The two languages fail differently. Spanish mostly drops whole clauses, which fits a general-purpose 200-language model, and a clause dropped by the decoder is hard to recover with another attempt. Hindi mostly mistranslates idiom and slang: “skin the perpetrator” comes back as “acquit him”, the opposite meaning. Hindi also shows more back-translation artefacts, which suggests the back-translation model reads Devanagari less reliably than Spanish.
Both languages also lose sarcasm markers such as a trailing “/s”, and strongly ironic phrasing keeps its literal meaning while losing its intent. That matters for emotion labels, because adding or removing such a marker changes the label without changing any word a similarity score would notice.
Retry
| Language | Retried | Improved | Still flagged after retry |
|---|---|---|---|
| Hindi | 8,267 | 7,023 (85.0%) | 3,235 (39.1% of retried, 5.96% of the full set) |
| Spanish | 15,254 | 10,312 (67.6%) | 10,889 (71.4% of retried, 20.07% of the full set) |
| Either language | 18,834 | n/a | 12,670 (23.35% of the full set) |
Flagging in at least one language fell from 34.71% to 23.35%, a real reduction and not a relabelling. The length effect survives retry, and the still-flagged rate falls steadily as sentences get longer:
| Source length | Hindi still flagged | Spanish still flagged |
|---|---|---|
| 1 to 5 words | 46.8% | 73.3% |
| 6 to 10 words | 41.5% | 73.1% |
| 11 to 15 words | 36.2% | 73.0% |
| 16 to 20 words | 30.5% | 69.8% |
| 21+ words | 27.7% | 64.8% |
All 12,670 still-flagged rows stay in the release. Users can train on everything, or on the roughly 41,593 rows where neither language is flagged, or report both, and make that choice themselves.
Verifying the source
The 54,263-row figure was not taken from the packaged release. It was rebuilt from Google’s raw rater-level files (three shards, 211,225 rater judgements over 58,011 unique comments), applying the same agreement rule at the 27-category level before folding to the Ekman groups. It matched all seven per-category counts exactly: joy 21,733, neutral 17,772, anger 7,022, surprise 6,668, sadness 4,032, disgust 1,013 and fear 929. The counts were re-derived a third time from the label indices in the released translation output and matched again.
Class imbalance, as groundwork
Joy outnumbers fear 23.4 to 1. The usual pos_weight for a binary cross-entropy loss compounds that to 38 to 1. The class-balanced loss of Cui et al. is a damped alternative, but its common default of beta 0.99 saturates at this data size, so all seven weights collapse to 1.0 and nothing is reweighted. At beta 0.9999 the weights differentiate meaningfully (fear 2.542, disgust 2.341, sadness 0.680, surprise 0.463, anger 0.447, neutral 0.271, joy 0.255, about 10 to 1 between fear and joy). They are computed once from the English distribution and reused for every language, which is valid because labels are copied unchanged through translation.
Engineering notes
Three bugs surfaced only at scale:
- Caching incompatibility. IndicTrans2’s model code predates newer KV-caching internals and crashed with caching on, so caching was disabled for Hindi.
- Degenerate generation. At 100 rows instead of 20, an all-caps, profane input sent beam search into repeating one token for the full 256-token budget. With caching off, those steps dominated throughput at 0.79 seconds per row. Repeat blocking and early stopping fixed the bug and, as a side effect, brought the rate to about 0.27 to 0.29 seconds per row, a 2.7 times speedup from fixing correctness. The full output was re-scanned afterwards and no case remained.
- Out of memory on retry. The first real retry checkpoint (453 Hindi and 779 Spanish flagged rows) passed up to a thousand rows into one generation call, with three models resident. Nothing was lost, thanks to checkpoint and resume, and the fix was sub-batching.
All three stages write progress incrementally and resume from the last checkpoint, which was tested by killing runs mid-execution.
Licence and responsible use
GoEmotions is released under Apache 2.0, and this dataset inherits that licence and its attribution to Demszky et al. The data contains profanity and, in a minority of rows, references to self-harm, suicide and hate-speech-adjacent content, inherited unredacted from the Reddit source, so anyone deploying it should apply moderation suited to their context.
Limitations
The text is machine-translated from English Reddit comments, not collected from Hindi or Spanish speakers, so it does not represent how native speakers express emotion, and its value is for cross-lingual transfer research, not as a naturalistic corpus. The length analysis used a 200-row pilot and the error taxonomy 40 rows per language, so both are samples with sampling uncertainty. Different translation models would change the specific error rates, especially for Spanish, where no pair-specific model was used.