← Latest papers
💬 NLP

Estimating Grammatical Gender Directions in Contextual Embeddings under Controlled and Natural Contexts

This paper proposes a novel framework to disentangle grammatical gender from semantic bias in contextual embeddings for gendered languages like Spanish, demonstrating that unweighted controlled contexts combined with centroid estimators effectively isolate grammatical gender directions while preserving semantic distinctions.

Original authors: Huanping Xiao, Yingji Li

Published 2026-06-30
📖 4 min read☕ Coffee break read

Original authors: Huanping Xiao, Yingji Li

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a giant, super-smart robot librarian (a "language model") that has read almost everything written in Spanish and French. This robot is great at understanding words, but it has a confusing problem: it mixes up two very different types of "gender."

  1. The Grammar Gender: In languages like Spanish and French, every object has a gender just because of grammar rules. A "table" is feminine, and a "chair" is masculine, even though neither is a boy or a girl. This is like a uniform the object must wear.
  2. The Social Gender: This is the bias we worry about. The robot has learned from real-world books and articles that "nurses" are usually women and "engineers" are usually men. This is the robot's opinion based on society.

The problem is that the robot's brain (its "embeddings") mixes these two together. It's hard to tell if the robot thinks a "table" is feminine because of grammar rules or because it thinks tables are "soft" and "feminine" (which is a bias).

The Big Goal

The authors of this paper wanted to teach the robot how to separate these two things. They wanted to find the "pure" direction in the robot's brain that represents only the grammar rules, without the social bias. Once they find that pure direction, they can "turn it off" for objects that shouldn't have a gender, without accidentally deleting the important gender information for jobs (like "doctor" vs. "nurse").

How They Did It: The "Clean Room" vs. The "Messy Room"

To figure out the pure grammar direction, the researchers tried two different ways of asking the robot about words:

  • The Messy Room (Natural Contexts): They asked the robot to look at sentences taken from real Wikipedia articles. This is like asking a student to study in a noisy cafeteria. The robot sees the word "table" surrounded by other words about furniture, art, or history. These extra words "contaminate" the answer with social bias.
  • The Clean Room (Controlled Templates): They created a special, boring, repetitive sentence template for every word. For example: "The [word] was mentioned in the text." They did this for thousands of words. This is like putting the student in a silent, white room with no distractions.

The Surprise Finding:
The researchers thought that maybe they could use math to "clean up" the messy Wikipedia sentences. But they discovered that the Clean Room was far superior. The "boring" sentences gave them the purest, most accurate map of the grammar rules. Trying to fix the messy sentences with math only made things slightly better, but never as good as just using the clean sentences to begin with.

The Tools: How to Draw the Map

Once they had the data, they needed to draw a line (a vector) that separates "masculine" grammar from "feminine" grammar. They tried three different tools:

  1. The Average (Centroid): They just took all the "masculine" words, averaged them, took all the "feminine" words, averaged them, and drew a line between the two centers.
  2. The Strict Teacher (SVM & LDA): These are complex math tools that try to draw a perfect line that separates every single example perfectly, like a strict teacher grading a test.

The Winner:
Surprisingly, the simple Average (Centroid) method worked the best. The complex "Strict Teachers" got confused by the noise and made mistakes. The simple average was robust enough to ignore the chaos and find the true grammar direction.

The Result: A Balanced Solution

The researchers created a new way to test their work. They wanted to make sure that when they removed the "grammar gender" from objects like "tables" and "chairs," they didn't accidentally erase the "social gender" from words like "actor" and "actress."

Their method worked perfectly:

  • It successfully removed the unnecessary grammar gender from inanimate objects (so the robot stops thinking a "table" is inherently feminine).
  • It kept the important social gender distinctions for jobs intact (so the robot still understands the difference between a male and female doctor).

In a Nutshell

This paper is like a guide for cleaning a dirty window. The authors found that trying to wipe the window while it's still covered in rain and mud (natural text) doesn't work well. Instead, you need to take the glass out, put it in a clean room (controlled templates), and wipe it there. They also found that a simple, gentle wipe (averaging) works better than trying to scrub every single spot with a complex tool. This allows us to fix the robot's bias without breaking its ability to understand human jobs and roles.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →