Abstract
Traditional Neural Machine Translation (NMT) systems often struggle with gender bias, typically defaulting to masculine forms or societal stereotypes when translating from gender-neutral source languages. This paper explores the potential of Large Language Models (LLMs) to address this "gender gap" through targeted prompting. By utilizing In-Context Learning (ICL), models like Llama-2 can be directed to generate both masculine and feminine translations, matching or exceeding the performance of specialized state-of-the-art models like NLLB-200, particularly in feminine translation accuracy.
Introduction: The Gender Gap in Machine Translation
Machine Translation (MT) faces a significant challenge when translating from gender-neutral languages (e.g., English) to gender-marked languages (e.g., Spanish, French). For a sentence like "I have friends," a model must choose between masculine (amigos) and feminine (amigas) forms. Historically, NMT systems have defaulted to masculine forms or relied on biased stereotypes. While post-editing solutions exist, they often require complex, language-specific architectures. This research investigates whether the inherent flexibility of LLMs can provide a more generalizable solution through simple prompting.
Methodology: Prompting for Gender Control
The researchers compared Llama-2 (70B) against NLLB-200 (3B), a specialized multilingual translation model. The core approach leveraged In-Context Learning (ICL). Instead of fine-tuning, the LLM was provided with a "Gender-specific template" containing eight examples. Each example paired an English source sentence with two target translations: one masculine and one feminine.
This method allows the model to learn the desired output format—producing dual-gender variations—without architectural changes. Crucially, the model demonstrates an understanding of coreference resolution, ensuring that all related adjectives and articles agree with the chosen gender, rather than just performing simple word substitution.
Evaluation Framework
The study utilized three primary benchmarks to evaluate performance:
- MULTILINGUALHOLISTICBIAS (MHB): The primary dataset for generating gender-specific targets across various noun classes.
- BUG: A human-annotated set used specifically for gender bias analysis and coreference resolution.
- FLoRes: A standard general-domain benchmark used to ensure that gender-specific prompting did not degrade overall translation quality.
Key Results and Discussion
The results indicate that LLMs are highly effective at following gender-specific instructions, often surpassing specialized models.
Bridging the Feminine Gap
One of the most significant findings is the improvement in feminine translation quality. Traditional NMT systems often underperform on feminine references due to training data imbalances. Llama-2 significantly closed this gap, outperforming NLLB by an average of over 10 BLEU points for feminine references across multiple languages.
Competitive Performance and Generalization
For masculine and "both-reference" evaluations, Llama-2 remained competitive with or slightly better than NLLB. Furthermore, analysis using the BUG dataset showed that Llama’s masculine outputs had higher noun gender prediction accuracy across almost every language tested. The researchers also validated these findings with GPT-4o, suggesting that the ability to generate gender-specific translations is a general property of high-performing LLMs.
Limitations and Future Directions
Despite these advancements, several challenges remain:
- Low-Resource Languages: LLMs still lag behind specialized NMT models in languages where training data is scarce.
- Prompt Sensitivity: Performance is heavily dependent on the quality and relevance of the in-context examples provided.
- Binary Gender Constraints: The study focused on binary grammatical gender, which does not fully capture the spectrum of social gender identities or non-binary expressions.
Future work should focus on improving LLM performance in low-resource settings and expanding the framework to encompass a broader range of gender identities.
Summary updated