Automatically Identifying Gender Issues in Machine Translation using Perturbations (2020)

Abstract: The successful application of neural methods to machine translation has realized huge quality advances for the community. With these improvements, many have noted outstanding challenges, including the modeling and treatment of gendered language. While previous studies have identified issues using synthetic examples, we develop a novel technique to mine examples from real world data to explore challenges for deployed systems. We use our method to compile an evaluation benchmark spanning examples for four languages from three language families, which we publicly release to facilitate research. The examples in our benchmark expose where model representations are gendered, and the unintended consequences these gendered representations can have in downstream application.

## introduction machine translation (mt) has realized huge improvements in quality from the successful application and development of neural methods @xcite @xcite @xcite . as the community has explored this enhanced performance, many have noted the outstanding challenge of modeling and handling gendered language @xcite . we extend this line of work, which identifies issues using synthetic examples manually curated for a target language @xcite , by analyzing real world text across a range of languages to understand challenges for deployed systems. in this paper, we explore the class of issues which surface when a neutral reference to a person is translated to a gendered form (e.g. in with this scope, we make two key contributions. first, we design and implement an automatic pipeline for detecting examples of our class of gender issues in real world input, using a bertbased perturbation method novel to this work. a key advantage of our pipeline beyond previous work is its extensibility: a) beyond word lists; b) to different language pairs and c) parts of speech. second, using our new pipeline, we compile a dataset that we make publicly available to serve as a benchmark for future work. we focus on english as the source language, and explore four target gendered languages across three language families (french, german, spanish, and russian). our examples expose where mt encodings are gendered, finding new issues not covered in previous manual approaches, and the unintended consequences of this for translation. ## gender marking languages gender-marking languages have rich grammatical systems for expressing gender @xcite . to produce a valid sentence in a gender-marking language, gender may need to be marked not only on pronouns (he, she), as it is in english, but also nouns and even verbs, as well as words linked to these gendered nouns and verbs. this means that translating from a language like english, with little gender marking, to a gender-marking language like spanish, requires a system to produce gender markings that may not have explicit evidence in the source. for instance, the tall teacher from english could be translated into the spanish la maestra alta (feminine) or el maestro alto (masculine). ## automatic detection of gender issues the class of issues we are interested in are those where translation to a gender-marking language exposes a model's gender preference for a personal reference. the examples we find that demonstrate this are english sentence-pairs, a minimal pair differing by only a single word, e.g. doctor being replaced by nurse. in each of our examples, this minimal perturbation does not change the gender of the source but gives rise to gender differences upon translation, e.g. doctor becoming masculine and nurse feminine. in this section, we present a simple, extensible method to mine such examples from real-world text. our method does not require expansive manuallycurated word lists for each target language, which enables us to discover new kinds of entities that are susceptible to model bias but are not usually thought of this way. indeed, while we demonstrate its utility with nouns with four target languages, our method is naturally extensible to new language pairs and parts of speech with no change in design. filtering source sentences our first step is to identify sentences that are gender neutral and that include a single human entity, e.g. a doctor works in a hospital. we focus on human entities since these have been the target of previous studies and present the largest risk of gender issues in translation. we use a bert-based named entity recognition (ner) model that identifies human entities, and exclude sentences that have more than one token tagged as such. we also remove sentences in which the entity is a gendered term in english foot_0 (e.g. mother, nephew), a name, or not a noun. note that all the sentences we get are naturally occurring sentences, and that we do not use any templates or predefined lists of target words that we want to handle. perturbations using bert we use bert as a masked language model to find words which can substitute for the human entity identified in the previous filtering step, e.g. @xmath0. we aim to get natural-sounding output and maintain extensibility, and thus do not use predefined substitutions. we cap our search to the first 100 candidates bert returns, accepting the first 10 which are tagged as person, and for which the resulting sentences also pass the filtering step. translation we translate each of the generated sentences into our target languages using google translate foot_1 . a doctor/nurse works in a @xmath1. alignment we align tokens in the original and translated sentences using fast-align @xcite . this is needed in order to know which token in the translation output is the focus entity in the source sentence, whose gender we want to analyze. ## challenge dataset we compile our final dataset from the output of this pipeline, and explore its properties to understand the issues it represents for deployed systems. ## related work our study builds on the literature around gender bias in machine translation. de plus, devrais -je demander au gestionnaire quel serait le salaire si je obtenais le poste avant de prendre l'avion? m also should i ask the secretary what the pay would be if i got the job prior to flying out? de plus, devrais -je demander à la secrétaire quel serait le salaire si je obtenais le poste avant mon départ? f de currently thinking about learning a trade (mostly a electrician). derzeit über das erlernen eines gewerbes nachdenken (meistens elektriker). m currently thinking about learning a trade (mostly a cook). derzeit über das erlernen eines gewerbes nachdenken (meistens eine köchin). f es -decided to become a teacher: spent a year working 2 jobs and doing prerequisites for a masters in education. ## conclusion the primary contribution of our work is a novel, automatic method for identifying gender issues in machine translation. by performing bert-based perturbations on naturally-occurring sentences, we are able to identify sentence pairs that behave differently upon translation to gender-marking languages. we demonstrate our technique over human reference forms and discover new sources of risk beyond the word lists used previously. furthermore, the novelty of our approach is its natural extensibility to new language pairs, text genres, and different parts of speech. we look forward to future work exploring such applications. using our new method, we compile a dataset across four languages from three language families. by publicly releasing our dataset, we hope to enable the community to work together towards solutions that are inclusive and equitable to all.