Reducing Gender Bias in Neural Machine Translation as a Domain Adaptation Problem (2020)

Abstract: Training data for NLP tasks often exhibits gender bias in that fewer sentences refer to women than to men. In Neural Machine Translation (NMT) gender bias has been shown to reduce translation quality, particularly when the target language has grammatical gender. The recent WinoMT challenge set allows us to measure this effect directly (Stanovsky et al, 2019) Ideally we would reduce system bias by simply debiasing all data prior to training, but achieving this effectively is itself a challenge. Rather than attempt to create a ‘balanced’ dataset, we use transfer learning on a small set of trusted, gender-balanced examples. This approach gives strong and consistent improvements in gender debiasing with much less computational cost than training from scratch. A known pitfall of transfer learning on new domains is ‘catastrophic forgetting’, which we address at adaptation and inference time. During adaptation we show that Elastic Weight Consolidation allows a performance trade-off between general translation quality and bias reduction. At inference time we propose a lattice-rescoring scheme which outperforms all systems evaluated in Stanovsky et al, 2019 on WinoMT with no degradation of general test set BLEU. We demonstrate our approach translating from English into three languages with varied linguistic properties and data availability.

## introduction as language processing tools become more prevalent concern has grown over their susceptibility to social biases and their potential to propagate bias @xcite . natural language training data inevitably reflects biases present in our society. for example, gender bias manifests itself in training data which features more examples of men than of women. tools trained on such data will then exhibit or even amplify the biases @xcite . gender bias is a particularly important problem for neural machine translation (nmt) into genderinflected languages. an over-prevalence of some gendered forms in the training data leads to translations with identifiable errors @xcite . translations are better for sentences involving men and for sentences containing stereotypical gender roles. for example, mentions of male doctors are more reliably translated than those of male nurses @xcite . recent approaches to the bias problem in nlp have involved training from scratch on artificially gender-balanced versions of the original dataset @xcite or with debiased embeddings @xcite . while these approaches may be effective, training from scratch is inefficient and gender-balancing embeddings or large parallel datasets are challenging problems @xcite . instead we propose treating gender debiasing as a domain adaptation problem, since nmt models can very quickly adapt to a new domain @xcite . to the best of our knowledge this work is the first to attempt nmt bias reduction by fine-tuning, rather than retraining. we consider three aspects of this adaptation problem: creating less biased adaptation data, parameter adaptation using this data, and inference with the debiased models produced by adaptation. regarding data, we suggest that a small, trusted gender-balanced set could allow more efficient and effective gender debiasing than a larger, noisier set. to explore this we create a tiny, handcrafted profession-based dataset for transfer learning. for contrast, we also consider fine-tuning on a coun-terfactual subset of the full dataset and propose a straightforward scheme for artificially genderbalancing parallel text for nmt. we find that during domain adaptation improvement on the gender-debiased domain comes at the expense of translation quality due to catastrophic forgetting @xcite . we can balance improvement and forgetting with a regularised training procedure, elastic weight consolidation (ewc), or in inference by a two-step lattice rescoring procedure. we experiment with three language pairs, assessing the impact of debiasing on general domain bleu and on the winomt challenge set @xcite . we find that continued training on the handcrafted set gives far stronger and more consistent improvements in genderdebiasing with orders of magnitude less training time, although as expected general translation performance as measured by bleu decreases. we further show that regularised adaptation with ewc can reduce bias while limiting degradation in general translation quality. we also present a lattice rescoring procedure in which initial hypotheses produced by the biased baseline system are transduced to create gender-inflected search spaces which can be rescored by the adapted model. we believe this approach, rescoring with models targeted to remove bias, is novel in nmt. the rescoring procedure improves winomt accuracy by up to 30% with no decrease in bleu on the general test set. recent recommendations for ethics in artificial intelligence have suggested that social biases or imbalances in a dataset be addressed prior to model training @xcite . this recommendation presupposes that the source of bias in a dataset is both obvious and easily adjusted. we show that debiasing a full nmt dataset is difficult, and suggest alternative efficient and effective approaches for debiasing a model after it is trained. this avoids the need to identify and remove all possible biases prior to training, and has the added benefit of preserving privacy, since no access to the original data or knowledge of its contents is required. as evidence, in section 3.4.5, we show this scheme can be applied to remove gender bias in the output of 'black box' online commercial mt systems. escudé @xcite train nmt models from scratch with debiased word embeddings. they demonstrate improved performance on an english-spanish occupations task with a single profession and pronoun per sentence. we assess our fine-tuning approaches on the winomt coreference set, with two entities to resolve per sentence. for monolingual nlp tasks a typical approach is gender debiasing using counterfactual data augmentation where for each gendered sentence in the data a gender-swapped equivalent is added. @xcite show improvement in coreference resolution for english using counterfactual data. @xcite demonstrate a more complicated scheme for gender-inflected languages. however, their system focuses on words in isolation, and is difficult to apply to co-reference and conjunction situations with more than one term to swap, reducing its practicality for large mt datasets. recent work recognizes that nmt can be adapted to domains with desired attributes using small datasets @xcite . our choice of a small, trusted dataset for adaptation specifically to a debiased domain connects also to recent work in data selection by @xcite , in which fine-tuning on less noisy data reduces translation noise. similarly we propose fine-tuning on less biased data to reduce gender bias in translations. this is loosely the inverse of the approach described by @xcite for monolingual abusive language detection, which pre-trains on a larger, less biased set. ## gender bias in machine translation we focus on translating coreference sentences containing professions as a representative subset of the gender bias problem. this follows much recent work on nlp gender bias @xcite @xcite including the release of winomt, a relevant challenge set for nmt @xcite . a sentence that highlights gender bias is: the doctor told the nurse that she had been busy. a human translator carrying out coreference resolution would infer that 'she' refers to the doctor, and correctly translate the entity to german as die ärztin. an nmt model trained on a biased dataset in which most doctors are male might incorrectly default to the masculine form, der arzt. data bias does not just affect translations of the stereotyped roles. since nmt inference is usually left-to-right, a mistranslation can lead to further, more obvious mistakes later in the translation. for example, our baseline en-de system translates the english sentence the cleaner hates the developer because she always leaves the room dirty. to the german der reiniger haßt den entwickler, weil er den raum immer schmutzig lässt. here not only is 'developer' mistranslated as the masculine den entwickler instead of the feminine die entwicklerin, but an unambiguous pronoun translation later in the sentence is incorrect: er ('he') is produced instead of sie ('she'). in practice, not all translations with genderinflected words can be unambiguously resolved. a simple example is: the doctor had been busy. this would likely be translated with a masculine entity according to the conventions of a language, unless extra-sentential context was available. as well, some languages have adopted gender-neutral singular pronouns and profession terms, both to include non-binary people and to avoid the social biases of gendered language @xcite . however, the target languages supported by winomt lack widely-accepted non-binary inflection conventions @xcite . this paper addresses gender bias that can be resolved at the sentence level and evaluated with existing test sets, and does not address these broader challenges. ## conclusions we treat the presence of gender bias in nmt systems as a domain adaptation problem. we demonstrate strong improvements under the winomt challenge set by adapting to tiny, handcrafted gender-balanced datasets for three language pairs. while naive domain adaptation leads to catastrophic forgetting, we further demonstrate two approaches to limit this: ewc and a lattice rescoring approach. both allow debiasing while maintaining general translation performance. lattice rescoring, although a two-step procedure, allows far more debiasing and potentially no degradation, without requiring access to the original model. we suggest small-domain adaptation as a more effective and efficient approach to debiasing machine translation than counterfactual data augmentation. we do not claim to fix the bias problem in nmt, but demonstrate that bias can be reduced without degradation in overall translation quality.