← Latest papers
💬 NLP

Exposing the Unsaid: Visualizing Hidden LLM Bias through Stochastic Path Aggregation

This paper introduces TreeTracer, a visual analytics tool that aggregates stochastic LLM generations into hierarchical Sankey diagrams to expose hidden representational and syntactic biases—such as pronoun suppression and conversational marginalization—that are often missed by standard single-output auditing methods.

Original authors: Matteo Pelossi, Rita Sevastjanova, Thilo Spinner, Mennatallah El-Assady

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

Original authors: Matteo Pelossi, Rita Sevastjanova, Thilo Spinner, Mennatallah El-Assady

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 are trying to understand how a very smart, but slightly unpredictable, robot thinks. You ask it a question, and it gives you an answer. But because the robot is "stochastic" (random), if you ask the exact same question 100 times, it might give you 100 slightly different answers.

The problem is that most people only look at the one answer the robot gives them first. They miss the other 99 answers where the robot might have shown a hidden prejudice or a weird habit. It's like judging a person's personality based on a single sentence they said, while ignoring the hundreds of other sentences they might have said if you asked them again.

The Problem: The "Hidden" Bias
The authors of this paper, Matteo Pelossi and his team, noticed that Large Language Models (LLMs) have hidden biases. These aren't always in the main answer you see. Sometimes, the bias is hiding in the "low-probability" branches—the paths the robot could have taken but didn't choose most often. Standard tools that check for bias are like looking at a single snapshot; they miss the whole movie.

The Solution: TREETRACER
To fix this, they built a tool called TREETRACER. Think of it as a "super-microscope" for robot thoughts.

Here is how it works, using a simple analogy:

  1. The "What-If" Game (Perturbation):
    Imagine you ask the robot, "Who decided to become a nurse?" and it says "She." Then you ask, "Who decided to become a CEO?" and it says "He."
    TREETRACER doesn't just ask once. It plays a massive game of "What-If." It takes your question and swaps out specific words (like names or genders) hundreds of times using a list of options (an "ontology"). It asks the robot: "What if the name was Lisa? What if it was Robert? What if it was Ahmed?"

  2. The "Giant Tree" (Aggregation):
    Instead of showing you 500 separate answers, TREETRACER takes all those answers and weaves them together into one giant, branching tree.

    • The Trunk: The start of the sentence.
    • The Branches: The different words the robot chose.
    • The Thickness: How often the robot chose that word.
    • The Height: How confident the robot was, even if it didn't pick that word as the top choice.

    This is visualized using a special kind of flow chart called a Sankey diagram. Imagine a river splitting into many streams. Some streams are wide (the robot loves this word), and some are thin (the robot barely considered it). TREETRACER shows you all the streams at once, not just the biggest one.

  3. The "Side-by-Side" Comparison:
    The tool lets you put two trees next to each other. One tree might show what happens when you use "Male Names," and the other when you use "Female Names."

    • The Magic: You can instantly see if the "Female" tree flows mostly into words like "nurse" or "teacher," while the "Male" tree flows into "doctor" or "lawyer."
    • The Counterfactual: Even if the robot didn't say "nurse" for a male name, TREETRACER can calculate the hidden probability that it wanted to say it. It reveals the bias that was lurking just below the surface.

What They Found (The Case Studies)
The team tested this on different robot models and found some interesting things:

  • Gender Roles: When asked about careers, the models often pushed women toward caregiving roles and men toward executive or athletic roles, even if the top answer wasn't blatantly sexist.
  • Geography: When asked about people from Arab countries, the models sometimes drifted toward topics about "extremism," whereas people from Western countries were linked to "science" or "art."
  • Safety: They tested a model on dangerous medical advice. A basic model would happily tell you how to drink poison. A "aligned" (safe) model would refuse. TREETRACER showed exactly how the safe model shuts down the dangerous path, turning the river of words into a dead end.

Why This Matters
The authors ran a small test with students who used the tool. They found that looking at this "aggregated tree" was much easier for humans to understand than looking at hundreds of separate text boxes. It reduced the mental effort needed to spot bias.

The Bottom Line
TREETRACER is a tool that stops us from judging a robot by its "best" answer. Instead, it forces us to look at the entire landscape of its thoughts. It reveals the hidden stereotypes and biases that are buried in the robot's "what-ifs," helping us build safer and fairer AI.

Note: The paper focuses strictly on detecting and visualizing these biases in text generation. It does not claim to cure bias, nor does it discuss using this tool for clinical diagnosis or other real-world applications beyond the analysis of the models themselves.

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 →