Reference-Based Bias Detection in LLMs via Relative Representations of Hidden States

Marek Jeliński, Jan Dubiński, Maciej Chrabaszcz, Sebastian Cygert

NASK - National Research Institute · Warsaw University of Technology · Gdańsk University of Technology

Published September 9, 2026 · on the feed September 10, 2026 · ▲ 3 · arXiv 2609.10060

LLM training & RLInterpretability & analysis Empty repo arXiv ↗Hugging Face ↗

The abstract

Existing bias auditing methods typically rely on model outputs, requiring costly benchmarks or judge models and potentially missing internal shifts that never appear in generated text. We propose a reference-based method that audits bias in hidden-state representations across related model variants, for example before and after fine-tuning. Because fine-tuning reshapes representation geometry, absolute hidden states are not directly comparable, so we encode each sentence by its similarities to a fixed set of anchor sentences, yielding relative representations in a shared comparison space. There we measure how target groups shift in their association with positive and negative attributes, a quantity we call the Representational Bias Shift ΔB. Across three model families and the WildGuardMix, DecodingTrust and ToxiGen benchmarks, ΔB correlates with output-level bias change in 15 of the 18 settings we test, reaching |r| = 0.84 (p < 0.001) under full fine-tuning and becoming more model-dependent under parameter-efficient adaptation. Thresholding ΔB detects checkpoints whose bias increased with ROC AUC between 0.65 and 0.99, and on WildGuardMix and DecodingTrust it separates them better than a SEAT-based baseline for all three families. ΔB is also stable under changes to the anchor set, attribute sets and target templates. Our method requires no task-specific evaluation data and audits a model in about three minutes, using 3-50times less compute than the output-level benchmarks considered here. We view it as complementary to output-based auditing rather than a replacement for it.

The Brief

2:59

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Reference-Based Bias Detection in LLMs via Relative Representations of Hidden States. By Marek Jeliński and three others, from NASK National Research Institute, the Warsaw University of Technology, and one other institution. Published on the ninth of September. Its code repository is a placeholder: a readme, and nothing to run yet.

Most methods for auditing bias in a language model look at what the model outputs. That needs costly benchmarks or judge models, and it can miss shifts inside the model that never surface in the generated text. The obvious alternative, looking at hidden states directly, runs into a different problem when comparing related versions of a model, say before and after fine-tuning. Fine-tuning reshapes the geometry of the representations, so the raw hidden states of the two versions are not directly comparable.

The fix is to describe each sentence relatively. Instead of its absolute hidden state, a sentence is encoded by how similar it is to a fixed set of anchor sentences. Those similarities form a relative representation, and because the anchors are the same for every model variant, all variants land in one shared space where they can be compared. The coordinates themselves may move when a model is fine-tuned. What is measured instead is where a sentence sits relative to the same fixed landmarks, and that can be read off both versions of the model in the same terms.

In that shared space, the method measures how target groups shift in their association with positive and with negative attributes. The authors call this quantity the Representational Bias Shift, delta B. It is a reference-based audit: one model variant is judged against another, rather than against an external benchmark of outputs. If fine-tuning has pulled a group closer to negative attributes, or further from positive ones, that change shows up as a shift in delta B, whether or not it has yet shown up in anything the model writes.

The tests span three model families and three benchmarks, WildGuardMix, DecodingTrust and ToxiGen. Delta B correlates with the change in output-level bias in fifteen of the eighteen settings tested. Under full fine-tuning the absolute correlation reaches zero point eight four, with p below zero point zero zero one. Under parameter-efficient adaptation the relationship is more dependent on the model.

Used with a threshold, delta B detects checkpoints whose bias went up, with a ROC AUC between zero point six five and zero point nine nine. On WildGuardMix and DecodingTrust it separates those checkpoints better than a SEAT-based baseline, for all three families. It stays stable when the anchor set, the attribute sets or the target templates are changed. It needs no task-specific evaluation data, audits a model in about three minutes, and uses three to fifty times less compute than the output-level benchmarks considered.

The authors are explicit about the role they intend. Delta B is meant to sit alongside output-based auditing, not replace it. What it adds is a quick look inside the model, placed on common ground by a set of anchors, that can flag a shift in bias before anyone has to generate and judge text to find it.

Paper Quest · 7 chapters · about 39 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

Bias can creep in during fine-tuning before it ever shows in the text.

You need to check whether fine-tuning made a language model more biased. Output benchmarks and judge models are costly, and some shifts inside the model may never show up in its text.

The road ahead

  1. 1 · The problem ~6 min Checking whether fine-tuning made a model more biased is costly from outputs, and hidden states from two model versions cannot simply be compared.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~8 min Describe each sentence by its similarities to fixed anchor sentences, so both model versions share one space, then measure how group associations shift.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min Encode sentences in both models, map them onto anchor similarities, score group associations, subtract the base, and threshold the shift.
  6. 6 · The experiment ~6 min You’ll guess: Across three model families and three benchmarks, in how many of the 18 settings did the Representational Bias Shift correlate with output-level bias change?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.