Are We Paying Attention to Her? Investigating Gender Disambiguation and Attention in Machine Translation (2025)

Abstract: While gender bias in modern Neural Machine Translation (NMT) systems has received much attention, the traditional evaluation metrics for these systems do not fully capture the extent to which models integrate contextual gender cues. We propose a novel evaluation metric called Minimal Pair Accuracy (MPA) which measures the reliance of models on gender cues for gender disambiguation. We evaluate a number of NMT models using this metric, we show that they ignore available gender cues in most cases in favour of (statistical) stereotypical gender interpretation. We further show that in anti-stereotypical cases, these models tend to more consistently take male gender cues into account while ignoring the female cues. Finally, we analyze the attention head weights in the encoder component of these models and show that while all models to some extent encode gender information, the male gender cues elicit a more diffused response compared to the more concentrated and specialized responses to female gender cues.

## introduction the field of machine translation (mt) has undergone significant technological shifts over the past decades, moving from transparent rule-based systems to increasingly opaque probability-based ones such as statistical and neural mt. furthermore, the complexity and scale of current transformer-based @xcite architectures, which underpin both neural mt (nmt) and large language models (llms), are making it more challenging to trace back model decisions and understand the underlying processes. this growing opacity raises concerns for ai governance where transparency, fairness and risk mitigation are becoming increasingly important for a responsible deployment of mt technology. at the same time, research on (gender) bias in mt has been on the rise, reflecting more general tendencies in the field of natural language processing (nlp) @xcite @xcite . the increasing awareness has led to concerns related to the flaws, inconsistencies and biases that models inherit, propagate and potentially exacerbate -especially with the increasing integration of nlp tools in people's everyday lives @xcite . in response, ai governance policies are emerging worldwide, such as the european union's ai act (2024), aiming to regulate the development and deployment of ai systems to ensure ethical standards and mitigate potential risks. for mt specifically, the nature of the translation task itself further complicates matters due to crosslinguistic differences in gender representation and expression across languages, where social gender, linguistic gender and diverse cultural contexts intersect. ## bias statement we define gender bias in mt as the tendency of models to default to learned statistical associations rather than systematically relying on contextual information for gender disambiguation. we focus on cases where gender is unambiguously expressed in the source sentence -typically through pronouns referring to human entities -capturing one subtype of gender bias. ambiguous cases -lacking explicit gender cues -fall outside the scope of this paper. while our framework targets the english-italian (en-it) language pair, it is broadly applicable to any setting where gender must be explicitly marked in the target language. we particularly highlight stereotypical bias, for which models successfully generate feminine translations when the target word (i.e., the profession noun) is already associated with women (e.g. @xmath0, but struggle to override male defaults in anti-stereotypical contexts. this asymmetry suggests that gender disambiguation might be driven by learned priors rather than syntactic dependencies, reinforcing a male-as-norm bias @xcite . such bias can lead to both representational harm, by perpetuating traditional gender roles, and allocational harm, by systematically underrepresenting women in maledominated professions @xcite . our analysis only considers binary gender due to the constraints of the winomt dataset, which relies on u.s. labor statistics and morphological analysis tools that categorize gender along a binary axis. while we acknowledge that this is a major limitation and gender is not a binary construct, there is no standardized approach to systematically evaluate non-binary gender bias in mt. broader inclusivity challenges persist and underscore the need for future work to develop more inclusive methodologies that better reflect gender as a spectrum. ## related work research on gender bias in mt has largely focused on: analyzing mt output (e.g. rescigno et al. (2020); ramesh et al. (2021)...); rewriting into gendered (e.g. vanmassenhove et al. (2018); moryossef et al. (2019); habash et al. (2019) or neutral outputs (e.g. vanmassenhove et al. (2021a); sun et al. (2021)...); word-embedding debiasing techniques (e.g. hirasawa and komachi (2019); font and costa-jussà (2019)....), domain adaptation (e.g. saunders and byrne (2020)), counterfactual data augmentation (e.g. zmigrod et al. (2019)) and/or the development novel benchmarks and evaluation sets (e.g. stanovsky et al. (2019); luisa et al. (2020)....). given that several studies @xcite @xcite already offer a more comprehensive overview of broader discussions and research on (gender) bias in language technology, we specifically dedicate this related work section to the limited body of work focusing on the internal mechanisms underlying gender bias in (mt) models and interpretability techniques. mt-specific research on interpretability techniques has largely focused on linguistic competence through probing @xcite , or by analyzing contrastive translation @xcite @xcite @xcite . more recent work investigated how mt systems process intra-and intersentential context and whether their context us-age aligns with human expectations @xcite @xcite . despite high overall performance, these studies highlight how models often struggle to effectively leverage contextual information, either failing to integrate necessary information or attending to irrelevant tokens when resolving ambiguities @xcite , an interesting finding raising concerns about gender disambiguation which indeed could be driven by biased statistical patterns rather than reliance on relevant contextual cues. the problem of context integration is not only relevant to model decision-making but also affects how gender bias is evaluated. template-based evaluation frameworks, such as winomt @xcite , provide controlled settings to measure surface-level accuracy metrics, and have been widely used to quantify gender bias across different language pairs and mt systems @xcite @xcite . however, as these primarily rely on the alignment and morphosyntactic analysis of lexically genderambiguous words, they do not reveal whether models actively integrate contextual cues when making gender-related decisions. these limitations underscore the need for more nuanced evaluation methods. a promising avenue for investigating how gender cues influence model decisions is through the study of context mixing, i.e., the ability of transformer-based models to dynamically incorporate information from the broader context into token representations. this process is largely governed by the attention mechanism, which plays a central role in these models. while attention-based analyses have been criticized for their reliability @xcite , and more advanced interpretability methods have been introduced @xcite @xcite @xcite , attention weights remain a popular choice for analyzing model behavior due to their ability to provide direct insights into token interactions across layers and heads. as a matter of fact, they have been extensively leveraged to track token dependencies, revealing that specific attention heads may specialize in distinct linguistic functions @xcite @xcite @xcite @xcite @xcite . to the best of our knowledge, only the study by @xcite attempted to control gender through internal mechanisms in an mt setting. they explored this by probing and deactivating specific neurons associated with gender in an long short-term memory (lstm) architecture. their findings showed that gender-related properties are widely distributed across the network, making effectively controlling the output very difficult. ## experimental setup in order to examine the extent to which contextual gender cues contribute to the representation of profession nouns for different models, we analyzed how multiple state-of-the-art models (section 4.1) integrate contextual gender cues provided in the winomt challenge set in the gender disambiguation process (section 4.2). ## evaluating context integration in gender disambiguation in this section, we will first delve into the evaluation of contextual cue integration through our novel metric. next, in section 6, we continue with the analysis of the encoder attention head weights to investigate how gender cues are integrated into the target representations. ## investigating context integration through attention to gain further insight into how contextual gender information is encoded within transformer models, we further investigate the extent to which gender cues are integrated into the representation of target words. for example, if a model correctly translates both pro-s and anti-s examples in figure 3 , we expect the representation of the target word librarian to be heavily influenced by the gender cue she/he in the original sentence. more specifically, we are interested in analyzing whether the attention mechanism contributing to the input representation of the target word attends to the gender cue and, if so, whether there are specific attention layers and heads that specialize in encoding gender cues. ## discussion in this section, we reflect on the key findings from our two-fold analysis, their implications, as well as potential avenues for future research. ## conclusion in this work, we examined how transformer-based nmt models integrate contextual gender cues and uncovered systematic biases and asymmetries in their processing mechanisms. taken together, our findings reinforce previous calls for greater caution when interpreting benchmark scores for gender accuracy in mt @xcite . surface-level improvements, such as higher gender accuracy, can still obscure deeper biases in how and under which conditions these forms indeed appear. more nuanced and comprehensive analyses are needed to to determine whether current systems truly leverage gender-specific cues or merely reinforce statistical stereotypes in subtler ways. without a more careful consideration of when, why and how certain patterns emerge, we risk misinterpreting progress and overlooking specific persistent and more structural biases in mt. ultimately, understanding how gender is encoded in translation models is a crucial component to ensure more fairness, accountability, and transparency in ai systems.