Paper · 2019-09-11 · cs.CL
Getting Gender Right in Neural Machine Translation
Prepends a speaker-gender tag to the English source of each Europarl sentence and trains LSTM NMT models with and without it for 10 language pairs. Author-reported: significant BLEU gains for French (+1.44), Italian (+0.29) and Danish (+0.31), a significant loss for Finnish (-0.47), and about +1.2 BLEU on EN-FR female-speaker test sets.
Neural machine translationControllable text generationAlgorithmic fairnessmachine-translationgender-biasspeaker-attributeseuroparlcontrollable-generation
AI-compiled by claude-haiku-5-5 on 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Some languages mark the gender of a speaker in ordinary words. A French speaker who says "I am happy" uses one word for a man and another for a woman, while English does not change the sentence at all. A translation program has to know the speaker's gender to pick the right form, and a standard translator usually cannot know it from one sentence.
The paper's fix is simple. Each English sentence in the training data gets a short label at its start that says whether the speaker is a man or a woman. The translator learns to use that label when it chooses word forms. The authors also collected speaker labels for a large set of parliamentary speeches, in 20 language pairs, so that this kind of training is possible. Gains are real for some language pairs and small. For a few pairs the labelled model was even worse. For sentences spoken by women, the gain was largest.
TL;DR
- Adds a speaker-gender tag to the English source side of each sentence, then trains the same LSTM encoder-decoder with and without it §4.1 §4.2.
- Compiles Europarl sentences with speaker gender for 20 language pairs and uses 10 of them for experiments §3 tab. 1 §4.1.
- Author-reported: the tagged system is significantly better for French, Italian and Danish and significantly worse for Finnish, and gains about 1.2 BLEU on EN-FR test sets of female speakers §5 tab. 2 tab. 3.
- The speaker labels are gender predictions from an earlier MEP metadata set, not verified labels, and the paper does not measure how accurate they are §3. See Pitfalls.
Problem
In languages with grammatical gender, adjectives and verb forms can agree with the speaker's gender, so a faithful translation depends on information the English source often leaves out §1 §4.1. A standard NMT system with no speaker information falls back on the form that is most frequent in its training data §1. Those data are skewed: in the EN-FR corpus 67.39% of sentences are spoken by men, and in 10 datasets 32–33% of sentences are by women §3.1. The paper's claim is that the gender of the author or speaker is useful information that is lost at translation time §1.
Earlier work on this problem was limited. The authors state that their work is, to their knowledge, the first attempt at a speaker-informed NMT system §2. The main obstacle they name is the lack of large parallel corpora with speaker annotations for most language pairs §3.
Method
Dataset construction §3. The authors follow Rabinovich et al. §3. Parallel sentences from Europarl are tagged with speaker attributes. Speaker names come from the Europarl source files; the file names give the session date. Speakers are then matched to metadata on members of the European Parliament (MEPs) from Rabinovich et al., which includes name, country, birth date and gender predictions for each MEP §3. The attributes stored per sentence are name, gender, age, date of birth, euroID and session date §3. Gender is therefore the MEP's predicted gender, not a verified one §3.
Tagging §4.1. Every source sentence in the experiments is augmented with one tag at its start, on the English source side only. The tag names the gender of the speaker. The paper's example is the English sentence "Madam President, as a..." with the tag FEMALE in front §4.1. The paper does not show the male tag string. The method reuses an idea from earlier work that adds a tag to the input to steer the output, as in politeness control §2 §4.1.
Systems §4.2. For each of the 10 language pairs the authors train two systems. The baseline is trained on untagged data; the tagged system is trained on the tagged source §4.1. Both use OpenNMT-py §4.2. The architecture is a sequence-to-sequence encoder-decoder with an LSTM recurrent unit, "trained with the default parameters" of that toolkit §4.2. Words are split with byte-pair encoding (BPE) using 89,500 operations §4.2. Training runs for 13 epochs; the reported system is then picked from the run, with no stated rule §4.2.
Evaluation sets §4.1. Each system is tested on a randomly selected general test set of 2K sentences. For EN-FR the authors also test on a 2K male-only and a 2K female-only test set. They add two more sets, one of male and one of female speakers, in which the first person singular pronoun appears §4.1.
The paper contains no equations and no algorithm box. The steps are as follows.
# Add the speaker's gender to the English side of one sentence [§4.1]
def tag_source(source, speaker_gender):
# Tag on the English source only; male token is not stated [§4.1]
tag = gender_token[speaker_gender]
return tag + " " + source# Train one system for one language pair [§4.1] [§4.2]
# condition is "baseline" (untagged source) or "tagged"
def train_system(pairs, condition):
# Learn 89,500 BPE operations; whether shared across sides is
# not stated [§4.2]
merges = learn_bpe(pairs, operations=89500)
data = apply_bpe(pairs, merges)
# LSTM encoder-decoder with OpenNMT-py default settings [§4.2]
model = seq2seq_lstm(default_opennmt_settings)
# 13 epochs over the training data [§4.2]
for epoch in range(13):
train_one_epoch(model, data)
# Checkpoint choice criterion is not stated [§4.2]
return select_best(model)# Score one system with BLEU on every test set [§4.1] [§5]
def evaluate(model, test_sets):
scores = {}
for name, (sources, references) in test_sets.items():
# Decoding settings are not stated [§4.2]
hypotheses = translate(model, sources)
# BLEU tool and tokenisation are not stated [§5]
scores[name] = bleu(hypotheses, references)
return scores# Compare baseline and tagged systems at p < 0.05 [tab. 2] [§5]
# MultEval is the tool named for significance [§5] [tab. 2]
significant = multeval(baseline_scores, tagged_scores, alpha=0.05)Analysis of the data §3.1 fig. 1. The paper analyses the EN-FR corpus by speaker age and gender. Figure 1 plots the percentage of female and male speakers per age group. In the text: the youngest group, aged 20–30, is 0.71% of the sentences, and it is the only group where women outnumber men. The 50–60 group holds 43.76% of all sentences §3.1 fig. 1.
Hyperparameters
| Name | Value | Where | Notes |
|---|---|---|---|
| Language pairs trained | EN–DE, EN–FR, EN–ES, EN–EL, EN–PT, EN–FI, EN–IT, EN–SV, EN–NL, EN–DA | §4.1 | chosen because each has more than 500k annotated sentences §4.1 tab. 1 |
| Framework | OpenNMT-py | §4.2 | |
| Architecture | sequence-to-sequence encoder-decoder, LSTM units | §4.2 | |
| Other training settings | "default parameters" of OpenNMT-py | §4.2 | the values are not stated in the paper |
| Learning rate, batch size, embedding and hidden size, dropout | not stated | §4.2 | |
| Subword units | BPE, 89,500 operations | §4.2 | joint or per-side vocabulary not stated |
| Epochs | 13 | §4.2 | |
| Model selection | "best model" | §4.2 | criterion not stated |
| Gender tag | one token before the English source sentence | §4.1 | female token shown as FEMALE; male token not stated |
| General test set | 2K randomly selected sentences | §4.1 | |
| EN-FR male and female test sets | 2K each | §4.1 | |
| Pronoun test sets (M1, F1) | size and selection rule not stated | §4.1 | first person singular pronoun |
| Metric | BLEU | §5 tab. 2 | |
| Significance test | MultEval, p < 0.05 | tab. 2 | Table 3 caption says p < 0.5 (see Pitfalls) |
| Decoding (beam size, length penalty) | not stated | §4.2 | |
| Repeated runs or seeds | not stated | §5 | single run per system is implied |
| Hardware and training time | not stated | — |
Europarl sentences per language pair, annotated with speaker information tab. 1:
| Language pair | Sentences | Language pair | Sentences |
|---|---|---|---|
| EN–BG | 306,380 | EN–IT | 1,297,635 |
| EN–CS | 491,848 | EN–LT | 481,570 |
| EN–DA | 1,421,197 | EN–LV | 487,287 |
| EN–DE | 1,296,843 | EN–NL | 1,419,359 |
| EN–EL | 921,540 | EN–PL | 478,008 |
| EN–ES | 1,419,507 | EN–PT | 1,426,043 |
| EN–ET | 494,645 | EN–RO | 303,396 |
| EN–FI | 1,393,572 | EN–SK | 488,351 |
| EN–FR | 1,440,620 | EN–SL | 479,313 |
| EN–HU | 251,833 | EN–SV | 1,349,472 |
Results
Author-reported. Setup: BLEU on randomly selected 2K test sets, OpenNMT-py LSTM systems, one baseline and one tagged system per language pair §4.1 §5.
BLEU on the general test set, baseline (EN) vs. tagged (EN-TAG). The Δ column is the difference of the two cited numbers, computed here. Starred rows are significant at p < 0.05 per the authors tab. 2:
| Language | EN | EN-TAG | Δ (derived) | Significant | Source |
|---|---|---|---|---|---|
| FR | 37.82 | 39.26 | +1.44 | yes | tab. 2 |
| ES | 42.47 | 42.28 | −0.19 | no | tab. 2 |
| EL | 31.38 | 31.54 | +0.16 | not starred | tab. 2 |
| IT | 31.46 | 31.75 | +0.29 | yes | tab. 2 |
| PT | 36.11 | 36.33 | +0.22 | not starred | tab. 2 |
| DA | 36.69 | 37.00 | +0.31 | yes | tab. 2 |
| DE | 28.28 | 28.05 | −0.23 | no | tab. 2 |
| FI | 21.82 | 21.35 | −0.47 | yes (decrease) | tab. 2 |
| SV | 35.42 | 35.19 | −0.23 | no | tab. 2 |
| NL | 28.35 | 28.22 | −0.13 | no | tab. 2 |
EN-FR on four test sets, baseline (EN) vs. tagged (EN-TAG). The Δ column is derived. All four tagged results are starred as significant tab. 3:
| Test set | EN | EN-TAG | Δ (derived) | Source |
|---|---|---|---|---|
| FR (M), male speakers only | 37.58 | 38.71 | +1.13 | tab. 3 |
| FR (F), female speakers only | 37.75 | 38.97 | +1.22 | tab. 3 |
| FR (M1), male, first person singular | 39.00 | 39.66 | +0.66 | tab. 3 |
| FR (F1), female, first person singular | 37.32 | 38.57 | +1.25 | tab. 3 |
The authors report the largest BLEU gain on the female test sets, and the largest on F1 §5 tab. 3. The paper also says the gains come partly from word choice, not only from morphological agreement §5. The example in which "penser" is preferred to "croire" §5 is a qualitative case, not a measured effect.
Paper vs code
No official code. The paper links one repository, https://github.com/evavnmssnhv/Europarl-Speaker-Information, owned by an author §3. It holds the speaker-annotated corpora as one .tar.gz archive per language pair, a README, and no scripts. Its GitHub licence field is empty, while the paper says the corpora are under CC BY 4.0 §3. I did not open the archives. The NMT systems were built with OpenNMT-py, a third-party toolkit §4.2. Searches for the method and its experiments found nothing: "gender neural machine translation speaker tag europarl", "gender nmt tag", "Europarl speaker gender tags OpenNMT", and the paper's dataset name within the author's GitHub account. Because no code exists, there are no code-level values to compare with the paper.
Pitfalls
- Speaker gender labels are predictions. The gender of each speaker comes from the MEP metadata of Rabinovich et al., which the paper describes as gender predictions per MEP §3. The paper does not measure how many labels are wrong, and an error would tag a sentence with the wrong gender.
- Unlabelled speakers are not covered. Table 1 counts only annotated sentences tab. 1. The paper does not say how a sentence without a speaker gender label is tagged at training or test time.
- The male tag is not shown. The paper shows only the FEMALE tag §4.1. Use the same token format for MALE in an implementation, and test that the tag is the only change between the two systems.
- Test-time tags are implied, not stated. The paper says every sentence is augmented §4.1. It does not say that the test sources carry the gold tag, but the gender test sets only make sense if they do.
- Text and table disagree on significance. The text says French, Italian, Portuguese and Greek improve significantly §5, but Table 2 stars only French, Italian and Danish as significant gains tab. 2. Portuguese and Greek are not starred.
- Significance threshold is inconsistent. Table 2's caption says p < 0.05 tab. 2. Table 3's caption says p < 0.5 tab. 3. The text gives no threshold in §5. The 0.05 value is the one used in Table 2 and is the one assumed here.
- Finnish is a significant loss. Finnish drops by 0.47 BLEU with a significant result tab. 2. The text says only that the Finnish system does not improve §5.
- One run per system. No seeds, repeated runs or confidence intervals are reported. The effect sizes are below 1.5 BLEU for every pair. MultEval is named for the tests §5 tab. 2, but how many runs enter it is not stated.
- Data imbalance affects the result. The EN-FR data are 67.39% male §3.1, and the authors expected the largest gains on female-speaker sentences for this reason §5. A tag does not change the training mix, so the gain on female sets may depend on how much female data there is.
- Training details are missing. The paper gives only the toolkit and "default parameters" §4.2. Learning rate, batch size, model size, dropout, beam size and the checkpoint rule are not stated. An implementer must choose these, and results may not match.
- BPE scope is unclear. The 89,500 operations §4.2 are not described as joint or per language. The vocabulary can change the result, so do not assume one.
- Small pronoun sets. The sizes and selection rules of the M1 and F1 test sets are not stated §4.1.
- Only one baseline. The only comparison is the same architecture without the tag §4.1. The paper does not compare the tag with other ways of supplying speaker information. The authors say they plan to try them §6.
- Source-side tag only. The tag is put on the English source side, and the paper does not test the reverse direction §4.1.
Lineage
- Builds on: Rabinovich et al. (2016) for the speaker annotations and MEP gender metadata §3; Sennrich et al. (2016) for tagging sentences to control politeness, which the paper calls a similar approach §2. Sennrich et al. (2015) for BPE §4.2. Klein et al. (2017) for OpenNMT-py §4.2. Koehn (2005) for Europarl §3. None of these has a card on this wiki.
- Related: Mirkin et al. (2015), which motivates personalised MT without experiments §2; zero-shot multilingual NMT, which uses similar source tags §4.1; domain adaptation by source tags §4.1.
- Compared against: the same architecture trained without the tag, per language pair §4.1.
- Superseded by: not stated in this wiki.
Source and license
Adapted from “Getting Gender Right in Neural Machine Translation” by Eva Vanmassenhove, Christian Hardmeier, Andy Way (arXiv:1909.05088), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.