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

arXiv cs.AI Papers

Summary

This paper proposes a reference-based method for detecting bias in large language models by analyzing relative representations of hidden states across model variants, introducing Representational Bias Shift (ΔB) that efficiently correlates with output-level bias changes.

arXiv:2609.10060v1 Announce Type: new 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 $\Delta B$. Across three model families and the WildGuardMix, DecodingTrust and ToxiGen benchmarks, $\Delta 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 $\Delta 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. $\Delta 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$-$50\times$ less compute than the output-level benchmarks considered here. We view it as complementary to output-based auditing rather than a replacement for it.
Original Article
View Cached Full Text

Cached at: 09/11/26, 08:43 AM

# Reference-Based Bias Detection in LLMs via Relative Representations of Hidden States
Source: [https://arxiv.org/html/2609.10060](https://arxiv.org/html/2609.10060)
Jan DubińskiAffiliation:NASK \- National Research Institute, PolandAffiliation:Warsaw University of Technology, PolandMaciej ChrabąszczAffiliation:NASK \- National Research Institute, PolandAffiliation:Warsaw University of Technology, PolandSebastian CygertAffiliation:NASK \- National Research Institute, PolandAffiliation:Gdańsk University of Technology, PolandCorrespondence:[marek\.jelinski@nask\.pl](mailto:[email protected])

###### 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 theRepresentational Bias ShiftΔ​B\\Delta B\. Across three model families and the WildGuardMix, DecodingTrust and ToxiGen benchmarks,Δ​B\\Delta Bcorrelates with output\-level bias change in 15 of the 18 settings we test, reaching\|r\|=0\.84\|r\|=0\.84\(p<0\.001p<0\.001\) under full fine\-tuning and becoming more model\-dependent under parameter\-efficient adaptation\. ThresholdingΔ​B\\Delta Bdetects checkpoints whose bias increased with ROC AUC between0\.650\.65and0\.990\.99, and on WildGuardMix and DecodingTrust it separates them better than a SEAT\-based baseline for all three families\.Δ​B\\Delta Bis 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, using33–50×50\\timesless compute than the output\-level benchmarks considered here\. We view it as complementary to output\-based auditing rather than a replacement for it\. We open\-source our[code](https://github.com/NASK-AISafety/Reference-Based-Bias-Detection)111[https://github\.com/NASK\-AISafety/Reference\-Based\-Bias\-Detection](https://github.com/NASK-AISafety/Reference-Based-Bias-Detection)\.

![Refer to caption](https://arxiv.org/html/2609.10060v1/fig1.png)Figure 1:Overview of our bias evaluation pipeline\.We use relative representations to project the hidden spaces of the fine\-tuned model \(ℳaud\\mathcal\{M\}\_\{\\mathrm\{aud\}\}\) and the reference \(base\) model \(ℳref\\mathcal\{M\}\_\{\\mathrm\{ref\}\}\) into a shared space via anchor sentences\. Within this shared space, we calculate distances between target representations and sets of positive and negative sentences\. By comparing these distances \(Δ​B\\Delta B\),our method can, for example, detect potential side\-effects induced during fine\-tuning without the need for curated datasets, by determining whetherℳaud\\mathcal\{M\}\_\{\\mathrm\{aud\}\}exhibits greater bias toward target groups thanℳref\\mathcal\{M\}\_\{\\mathrm\{ref\}\}\.## 1Introduction

LLMs are increasingly deployed in systems that shape how information is produced and interpreted\. As they are adapted through instruction tuning, safety tuning, domain fine\-tuning, and system prompting, their behaviour can shift in ways that are difficult to anticipate and audit\. One important concern is bias, since models may inherit harmful associations from pretraining data or fine\-tuning, or may display new distortions due to targeted manipulation[Guo et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib11);[Lu et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib13)\.

Most bias evaluations focus on model outputs\. Common approaches use curated benchmark datasets[Liang et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib3);[Wang et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib8)or LLM\-as\-a\-judge evaluations[Lin et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib9)\. Both are useful, but limited: curated benchmarks are costly to build and hard to scale across harms, while judge\-based evaluations may inherit the evaluator’s own biases[Lin et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib10)\. More fundamentally, output\-based auditing may miss internal changes that precede behavioural shifts not immediately visible in the generations\.

Motivated by recent findings that even benign fine\-tuning can compromise safety properties[Qi et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib25);[Betley et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib12), we recognise that alignment can degrade in multiple, often unpredictable ways, making standard behavioural evaluation highly challenging\. We hypothesise that a model’s hidden representations contain latent signals indicative of these unintended shifts\. Consequently, this work investigates post\-fine\-tuning behavioural changes through the lens of inner representations\. To achieve that, we extend the Sentence Encoder Association Test \(SEAT\)[May et al\. \(2019\)](https://arxiv.org/html/2609.10060#bib.bib23), which measures bias in text representations[Garg et al\. \(2018\)](https://arxiv.org/html/2609.10060#bib.bib21);[Brunet et al\. \(2019\)](https://arxiv.org/html/2609.10060#bib.bib22), to compare internal states of the audited and reference model \(see Fig\.[1](https://arxiv.org/html/2609.10060#S0.F1)\)\.

Yet, comparing these internal states directly is difficult because fine\-tuning reshapes latent geometry, rendering raw hidden states poorly comparable across model variants\. We address this using relative representations[Moschella et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib24)of hidden states\. Instead of encoding a sentence by its embedding, we encode it by its similarities to a fixed set of anchor sentences\. This maps both the audited and reference models into a shared space, enabling direct comparison\. In that space, we measure whether target concepts shift more toward positive or negative attribute sets relative to the reference model, which we call theRepresentational Bias ShiftΔ​B\\Delta B\. Our method relies solely on constructing small sets of anchor, positive, and negative sentences, which are far easier to obtain than curated datasets, and therefore scales to new target groups without additional data collection\.

We evaluate the approach on behavioural shifts induced by full and LoRA\-based fine\-tuning of Mistral, Llama, and Gemma models using bias benchmarks derived from prior work[Han et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib26);[Wang et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib8);[Hartvigsen et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib37)\. Overall,Δ​B\\Delta Btracks output\-level bias change, reaching correlations up to\|r\|=0\.84\|r\|=0\.84\(p<0\.001p<0\.001\) under full fine\-tuning\. While the relationship is weaker and more model\-dependent under LoRA, it remains significant in most settings\. ThresholdingΔ​B\\Delta Bdetects increased\-bias checkpoints with ROC AUCs of0\.650\.65–0\.990\.99\. On WildGuardMix and DecodingTrust, our method is consistently more discriminative than a SEAT\-based baseline across all three model families\. Extensive ablations further demonstrate robustness to variations in anchor and attribute sets, target templates\.

Representation\-level metrics are not guaranteed to predict downstream behaviour[Goldfarb\-Tarrant et al\. \(2021\)](https://arxiv.org/html/2609.10060#bib.bib29);[Gonen and Goldberg \(2019\)](https://arxiv.org/html/2609.10060#bib.bib30)\.We therefore do not claim that representational geometry determines model behaviour\. We ask a narrower, empirical question\. When fine\-tuning shifts a model’s hidden\-state associations, does that shift co\-vary with the change in output\-level bias measured against external benchmarks?Our experiments answer this in the affirmative in most of the settings we study, with the association weakest for Gemma\.

This paper makes the following contributions:

- •We introduce a reference\-based auditing framework that places an audited and a reference model in a shared comparison space through relative hidden\-state representations, and define theRepresentational Bias ShiftΔ​B\\Delta B, which measures how target groups change their association with positive and negative attributes relative to the reference \(Sections[3\.3](https://arxiv.org/html/2609.10060#S3.SS3)and[3\.4](https://arxiv.org/html/2609.10060#S3.SS4)\)\.
- •We validateΔ​B\\Delta Bagainst three output\-level benchmarks across three model families and two fine\-tuning regimes, using a graded merge spectrum so that bias is introduced in increments rather than as a single jump\.Δ​B\\Delta Bco\-varies with output\-level bias in 15 of the 18 settings we test \(\|r\|\|r\|up to0\.840\.84\) and flags increased\-bias checkpoints with ROC AUC between0\.650\.65and0\.990\.99\(Table[1](https://arxiv.org/html/2609.10060#S4.T1), Figure[2](https://arxiv.org/html/2609.10060#S4.F2)\)\.
- •Experiments validate relative representations against alternative approaches \(Figure[3](https://arxiv.org/html/2609.10060#S4.F3)\) and showΔ​B\\Delta Bis stable across the anchor set, attribute sets and target templates \(Section[4\.5](https://arxiv.org/html/2609.10060#S4.SS5)\)\.

## 2Related Work

Bias in LLMs\.Bias in LLMs refers to systematic distortions in model behaviour that favour particular groups or viewpoints, reproduce stereotypes, or rest on unfounded assumptions learned from training data[Ferrara \(2023\)](https://arxiv.org/html/2609.10060#bib.bib5);[Blodgett et al\. \(2020\)](https://arxiv.org/html/2609.10060#bib.bib16)\. While bias has most commonly been studied in the context of negatively affecting certain social groups[Beukeboom and Burgers \(2019\)](https://arxiv.org/html/2609.10060#bib.bib15), language models can also exhibit political bias[Rettenberger et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib14)or reflect geographic and cultural biases[Tao et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib6)\. A parallel line of work measures such associations directly in representation space, beginning with the Word Embedding Association Test \(WEAT\)[Caliskan et al\. \(2017\)](https://arxiv.org/html/2609.10060#bib.bib2)and studies of the gender direction in word embeddings[Bolukbasi et al\. \(2016\)](https://arxiv.org/html/2609.10060#bib.bib4), which[May et al\. \(2019\)](https://arxiv.org/html/2609.10060#bib.bib23)extended from words to sentence encoders\.

LLM Manipulation\.As LLMs grow in capability and influence, they are increasingly susceptible to adversarial misuse, including media manipulation[Lin et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib9);[Lin et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib10);[Lu et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib13), political propaganda, and covert brand promotion[Guo et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib11)\. Misalignment can also arise unintentionally, for example, through narrow fine\-tuning on limited data[Betley et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib12);[Wang et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib7)\. This motivates methods that detect behavioural shifts without requiring a curated dataset for every new harm\. We do not study adversarial attacks directly, and instead induce shifts of graded severity by interpolating between models fine\-tuned on harmful and on benign data, which gives a controlled setting in which to test whether representational change tracks behavioural change\.

Comparing Machine Learning Models\.At the core of our approach is measuring similarity between machine learning models[Shah et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib20), which typically relies onrepresentational\(intermediate activations\) orfunctional\(outputs\) comparisons[Klabunde et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib17)\. Since functional similarity requires curated evaluation datasets, we propose a lightweight method using sentence embeddings to assess representational changes, which, as we show for most of the models and benchmarks we study, correlates with functional behaviour\. Comparing representations across models first requires making their spaces commensurable, either by fitting an explicit map such as an orthogonal Procrustes transform[Schönemann \(1966\)](https://arxiv.org/html/2609.10060#bib.bib19)or by using an alignment\-invariant similarity measure such as centred kernel alignment \(CKA\)[Kornblith et al\. \(2019\)](https://arxiv.org/html/2609.10060#bib.bib18)\. We instead build on relative representations[Moschella et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib24), which avoid fitting any cross\-model map by encoding each sentence through its similarities to a shared set of anchors, and we compare against alternatives in Section[4](https://arxiv.org/html/2609.10060#S4)\.

Intrinsic versus extrinsic bias\.The bias\-evaluation literature draws the same distinction under the names intrinsic and extrinsic[Goldfarb\-Tarrant et al\. \(2021\)](https://arxiv.org/html/2609.10060#bib.bib29);[Cao et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib31)\. We use the representational and functional pair throughout because our framing is comparative model auditing rather than single\-model bias measurement, but the two vocabularies refer to the same underlying distinction\. Whether the two sides track each other is contested\.[Goldfarb\-Tarrant et al\. \(2021\)](https://arxiv.org/html/2609.10060#bib.bib29)compare embedding\-space metrics with downstream\-task metrics across many trained models and find no correlation that holds reliably across tasks and languages\.[Gonen and Goldberg \(2019\)](https://arxiv.org/html/2609.10060#bib.bib30)show that debiasing word embeddings can hide bias by the metric’s own definition while leaving it recoverable, and related tensions are reported for contextualised representations[Cao et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib31);[Delobelle et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib32)\. Other findings point the other way\. Upstream bias mitigation transfers to downstream fine\-tuned models[Jin et al\. \(2021\)](https://arxiv.org/html/2609.10060#bib.bib36), and[Orgad et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib35)find that an intrinsic metric computed on*internal representations*indicates debiasing more faithfully than embedding\-space WEAT\. We therefore read the evidence as inconclusive, and note that the strongest negative results were obtained on static word embeddings, which are fixed vectors detached from any particular model, whereas we measure the hidden states an audited model actually computes as it processes text\. Our setting also differs in that we do not debias but measure the shift a fine\-tuning induces\.

## 3Method

We quantify latent biases in large language models by measuring how a set of neutral*target sentences*\(e\.g\., social group\-related sentences\) aligns in embedding space with*attribute sentences*expressing positive or negative valence \(e\.g\., “This person is trustworthy\.” vs\. “This person is unreliable\.”\)\. Unless stated otherwise, we summarise results by taking the mean across sentences in𝒯\\mathcal\{T\}\. Section[3\.2](https://arxiv.org/html/2609.10060#S3.SS2)states the absolute\-embedding formulation, Section[3\.3](https://arxiv.org/html/2609.10060#S3.SS3)its relative\-representation counterpart, and Section[3\.4](https://arxiv.org/html/2609.10060#S3.SS4)the comparison with a reference model that yieldsΔ​B\\Delta B\.

### 3\.1Notation

Let𝒯=\{s1,…,snT\}\\mathcal\{T\}=\\\{s\_\{1\},\\dots,s\_\{n\_\{T\}\}\\\}denote the set of target sentences, while𝒫=\{p1,…,pnP\}\\mathcal\{P\}=\\\{p\_\{1\},\\dots,p\_\{n\_\{P\}\}\\\}and𝒩=\{n1,…,nnN\}\\mathcal\{N\}=\\\{n\_\{1\},\\dots,n\_\{n\_\{N\}\}\\\}represent the sets of positive and negative attribute sentences, respectively\. For any sentencexx, itsdd\-dimensional embedding𝐞⁡\(x\)∈ℝd\\mathbf\{e\}\(x\)\\in\\mathbb\{R\}^\{d\}is derived by averaging the final hidden\-state vectors across all tokens produced by the model, we discuss this choice and its alternatives in the Limitations section\. To evaluate the relationship between vectors𝐚,𝐛∈ℝd\\mathbf\{a\},\\mathbf\{b\}\\in\\mathbb\{R\}^\{d\}, we compute their cosine similaritycos⁡\(𝐚,𝐛\)\\mathrm\{cos\}\(\\mathbf\{a\},\\mathbf\{b\}\)and Euclidean distancedE​\(𝐚,𝐛\)d\_\{E\}\(\\mathbf\{a\},\\mathbf\{b\}\)as follows:

cos⁡\(𝐚,𝐛\)\\displaystyle\\mathrm\{cos\}\(\\mathbf\{a\},\\mathbf\{b\}\)=𝐚⋅𝐛‖𝐚‖​‖𝐛‖,\\displaystyle=\\frac\{\\mathbf\{a\}\\cdot\\mathbf\{b\}\}\{\\\|\\mathbf\{a\}\\\|\\,\\\|\\mathbf\{b\}\\\|\},\(1\)dE​\(𝐚,𝐛\)\\displaystyle d\_\{E\}\(\\mathbf\{a\},\\mathbf\{b\}\)=‖𝐚−𝐛‖2\.\\displaystyle=\\\|\\mathbf\{a\}\-\\mathbf\{b\}\\\|\_\{2\}\.

### 3\.2Bias via Absolute Embeddings \(SEAT\)

A standard approach to measuring representational bias, following the Sentence Encoder Association Test \(SEAT\)[May et al\. \(2019\)](https://arxiv.org/html/2609.10060#bib.bib23), operates on absolute sentence embeddings and measures associations via cosine similarity\. For each target sentences∈𝒯s\\in\\mathcal\{T\}, we compute its mean similarity to positive and negative sentences:

S\+​\(s\)\\displaystyle S^\{\+\}\(s\)=1\|𝒫\|​∑p∈𝒫cos⁡\(𝐞⁡\(s\),𝐞⁡\(p\)\),\\displaystyle=\\frac\{1\}\{\|\\mathcal\{P\}\|\}\\sum\_\{p\\in\\mathcal\{P\}\}\\mathrm\{cos\}\\\!\\big\(\\mathbf\{e\}\(s\),\\mathbf\{e\}\(p\)\\big\),\(2\)S−​\(s\)\\displaystyle S^\{\-\}\(s\)=1\|𝒩\|​∑n∈𝒩cos⁡\(𝐞⁡\(s\),𝐞⁡\(n\)\)\.\\displaystyle=\\frac\{1\}\{\|\\mathcal\{N\}\|\}\\sum\_\{n\\in\\mathcal\{N\}\}\\mathrm\{cos\}\\\!\\big\(\\mathbf\{e\}\(s\),\\mathbf\{e\}\(n\)\\big\)\.The mean bias over the target set is

B=1\|𝒯\|​∑s∈𝒯\(S\+​\(s\)−S−​\(s\)\)\.B\\;=\\;\\frac\{1\}\{\|\\mathcal\{T\}\|\}\\sum\_\{s\\in\\mathcal\{T\}\}\\Big\(S^\{\+\}\(s\)\-S^\{\-\}\(s\)\\Big\)\.\(3\)The sign ofBBdenotes whether the target set’s association is positive or negative\.

However, absolute embeddings are not directly comparable across fine\-tuned model variants, because fine\-tuning reshapes the latent space\. Even if two models encode the same semantic relationships, their embeddings may occupy different regions ofℝd\\mathbb\{R\}^\{d\}\. Bias scores computed via SEAT can therefore reflect geometric artefacts of the fine\-tuning process rather than genuine changes in bias\. While we include SEAT\-based results in our experiments to empirically demonstrate this limitation \(see Section[4](https://arxiv.org/html/2609.10060#S4)\), we adopt the approach described below as our primary metric\.

### 3\.3Bias via Relative Representations

To enable meaningful comparisons across fine\-tuned models, we adopt*relative representations*\(RR\)[Moschella et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib24), which encode semantic information through pairwise similarities with respect to a fixed set of anchor sentences\. Given an anchor set𝒜=\{a1,…,am\}\\mathcal\{A\}=\\\{a\_\{1\},\\ldots,a\_\{m\}\\\}, the relative representation of a sentencexxis

𝐫⁡\(x\)=\[cos⁡\(𝐞⁡\(x\),𝐞⁡\(ai\)\)\]i=1m∈ℝm\.\\mathbf\{r\}\(x\)=\\big\[\\mathrm\{cos\}\\\!\\big\(\\mathbf\{e\}\(x\),\\mathbf\{e\}\(a\_\{i\}\)\\big\)\\big\]\_\{i=1\}^\{m\}\\in\\mathbb\{R\}^\{m\}\.\(4\)Because fine\-tuning preserves the relative geometry of the embedding space more than the absolute positioning, relative representations are comparable across model variants that share the same anchor set[Moschella et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib24)\. The anchors are shared as*sentences*rather than as vectors, so each model encodes them with its own parameters and the coordinates of𝐫⁡\(x\)\\mathbf\{r\}\(x\)carry the same meaning in both models without any cross\-model map being fitted\.

Since the components of𝐫⁡\(x\)\\mathbf\{r\}\(x\)are themselves cosine similarities, applying cosine similarity again in this space would amount to measuring the similarity of similarity profiles, losing the direct geometric interpretation\. We therefore measure associations in relative space using Euclidean distance, which operates directly on the coordinate differences of the relative representations\. To maintain the same sign convention as in Section[3\.2](https://arxiv.org/html/2609.10060#S3.SS2)\(where higher values indicate closer association\) we negate the Euclidean distances:

Srel\+​\(s\)\\displaystyle S^\{\+\}\_\{\\mathrm\{rel\}\}\(s\)=−1\|𝒫\|∑p∈𝒫dE\(𝐫\(s\),𝐫\(p\)\),\\displaystyle=\-\\frac\{1\}\{\|\\mathcal\{P\}\|\}\\sum\_\{p\\in\\mathcal\{P\}\}d\_\{E\}\\\!\\big\(\\mathbf\{r\}\(s\),\\mathbf\{r\}\(p\)\\big\),\(5\)Srel−​\(s\)\\displaystyle S^\{\-\}\_\{\\mathrm\{rel\}\}\(s\)=−1\|𝒩\|∑n∈𝒩dE\(𝐫\(s\),𝐫\(n\)\)\.\\displaystyle=\-\\frac\{1\}\{\|\\mathcal\{N\}\|\}\\sum\_\{n\\in\\mathcal\{N\}\}d\_\{E\}\\\!\\big\(\\mathbf\{r\}\(s\),\\mathbf\{r\}\(n\)\\big\)\.The mean bias in relative space is then

Brel=1\|𝒯\|​∑s∈𝒯\(Srel\+​\(s\)−Srel−​\(s\)\)\.B\_\{\\mathrm\{rel\}\}\\;=\\;\\frac\{1\}\{\|\\mathcal\{T\}\|\}\\sum\_\{s\\in\\mathcal\{T\}\}\\Big\(S^\{\+\}\_\{\\mathrm\{rel\}\}\(s\)\-S^\{\-\}\_\{\\mathrm\{rel\}\}\(s\)\\Big\)\.\(6\)Positive and negative values ofBrelB\_\{\\mathrm\{rel\}\}indicate whether the target set is more strongly associated with positive or negative attributes, respectively\.

### 3\.4Comparison with a Reference Model

We compute the mean bias under two conditions, a*reference model*\(the unmodified model\) and an*audited model*\(fine\-tuned\)\. LetBrefB\_\{\\mathrm\{ref\}\}andBaudB\_\{\\mathrm\{aud\}\}denote their mean biases \(usingBBorBrelB\_\{\\mathrm\{rel\}\}as appropriate\)\. The Representational Bias Shift is

Δ​B=Baud−Bref\.\\Delta B\\;=\\;B\_\{\\mathrm\{aud\}\}\-B\_\{\\mathrm\{ref\}\}\.\(7\)We instantiate𝒯\\mathcal\{T\}separately for each target group, so a model yields oneΔ​B\\Delta Bper group, and each pairing of a checkpoint with a target group is one observation in the correlations we report\. A negativeΔ​B\\Delta Bmeans the group moved towards the negative attributes, which we read as increased bias\. We stress thatΔ​B\\Delta Bis a proxy\. A difference in how two models encode a target group is not in itself evidence of discriminatory behaviour, so the validity ofΔ​B\\Delta Brests on its empirical relationship to output\-level bias, which we quantify in Section[4](https://arxiv.org/html/2609.10060#S4)\.

## 4Results

### 4\.1Experimental setup

We compare each fine\-tuned model with its base model, which serves as the reference condition, and compute the*Representational Bias Shift*Δ​B\\Delta Bas defined in the Method section\. Unless stated otherwise, both models are projected onto a shared set of1,0001\{,\}000neutral sentence anchors drawn from the same social\-group domain as the target sentences \(Appendix[F](https://arxiv.org/html/2609.10060#A6)\), and we ablate the source and the number of anchors in Figure[4](https://arxiv.org/html/2609.10060#S4.F4)\. Embeddings are taken from the final transformer layer,3232for Llama and Mistral and3434for Gemma\.

Fine\-tuning and model merging\.We fine\-tune each model separately on an unharmful and a synthetically harmful split of WildGuardMix[Han et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib26), under both full and LoRA fine\-tuning, and linearly merge[Wortsman et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib1)the two resulting checkpoints at five interpolation ratios\. This gives a spectrum of seven checkpoints per model and regime, from safe to harmful, so bias is introduced in graded increments rather than as a single jump\. Dataset construction, hyperparameters and merge ratios are given in Appendix[C](https://arxiv.org/html/2609.10060#A3)\.

External bias measures\.We pairΔ​B\\Delta Bwith three output\-level benchmarks that capture distinct aspects of biased behaviour\. From WildGuardMix we take thesocial stereotypes and unfair discriminationsubcategory of the test set and score generated responses with theallenai/wildguardguard model\. Its prompts carry no target\-group labels, so we map each onto 9 topics consolidated from DecodingTrust’s 24 groups and aggregate harmfulness there \(Appendix[B](https://arxiv.org/html/2609.10060#A2)\)\. From DecodingTrust[Wang et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib8)we run the stereotype evaluation pipeline, which measures stereotype agreement rather than response harmfulness\. ToxiGen[Hartvigsen et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib37)is the only benchmark whose demographic groups map one\-to\-one onto ours, so it needs no aggregation, and we use its nine groups that have a counterpart in our target sets, scoring continuations with the authors’toxigen\_robertaclassifier\. We denote the change relative to the base model asΔ​Bias​Score\\Delta\\mathrm\{Bias\\ Score\}, and asΔ​Toxicity\\Delta\\text\{Toxicity\}for ToxiGen\. Generation and scoring settings are in Appendix[C](https://arxiv.org/html/2609.10060#A3)\.

For each fine\-tuning condition and each target group this produces a paired measurement\(Δ​Bias​Score,Δ​B\)\(\\Delta\\mathrm\{Bias\\ Score\},\\;\\Delta B\)\. We pool these pairs over conditions and groups and report the Pearson correlation with two\-tailed significance, together with the Mean Absolute Error \(MAE\) of a linear fit, estimated as the mean over1,0001\{,\}000bootstrap resamples\.

### 4\.2Fine\-Tuning\-Induced Representational Shifts on WildGuardMix

![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/merging_shared_legend.png)

![Refer to caption](https://arxiv.org/html/Figures/grid/wld_full.png)\(a\)WildGuardMix
![Refer to caption](https://arxiv.org/html/Figures/grid/dt_full.png)\(b\)DecodingTrust
![Refer to caption](https://arxiv.org/html/Figures/grid/toxigen_full.png)\(c\)ToxiGen

Figure 2:Llama under full fine\-tuning against all three external bias benchmarks\.Colour encodes the merge ratio between the unharmful and harmful checkpoints\. Each panel relates the external bias change \(Δ\\DeltaBias Score, orΔ\\DeltaToxicity for ToxiGen\) to the representational bias shiftΔ​B\\Delta B; the two are clearly correlated in every case\. LoRA fine\-tuning, the ROC AUC of a threshold classifier onΔ​B\\Delta B, and the other two model families are reported in Table[1](https://arxiv.org/html/2609.10060#S4.T1)and Appendix[H](https://arxiv.org/html/2609.10060#A8)\.Table 1:Representational bias shift against three external bias benchmarks\.For each benchmark and model we report the Pearson correlation between the externalΔ\\DeltaBias Score and the representational bias shiftΔ​B\\Delta B\(RR\), the ROC AUC of a threshold classifier onΔ​B\\Delta B, and the mean absolute error of the regression fit\. Arrows mark the direction of stronger agreement, which for Pearson is more negative becauseΔ​B\\Delta Bfalls as bias rises\. A model counts as more biased when the external score exceeds a fixed operating point,0\.10\.1for WildGuardMix and DecodingTrust and0\.030\.03for ToxiGen, whoseΔ\\DeltaToxicity is on a smaller scale\. Significance is marked∗p<0\.05\{\}^\{\*\}p<0\.05,p∗⁣∗<0\.01\{\}^\{\*\*\}p<0\.01,∗∗∗p<0\.001\{\}^\{\*\*\*\}p<0\.001\. MAE is in each benchmark’s own units, comparable within a benchmark but not across\.Full Fine\-Tuning\.Figure[2](https://arxiv.org/html/2609.10060#S4.F2)\(a\) relates the change in external Bias Score to the representational bias shiftΔ​B\\Delta Bfor Llama, and Table[1](https://arxiv.org/html/2609.10060#S4.T1)reports the same quantities for all three families\. Here the correlation is negative and statistically significant for all three families under full fine\-tuning, so checkpoints that became more harmful sit further right and lower, andΔ​B\\Delta Borders the merge spectrum the same way the external benchmark does\. NegativeΔ​Bias Score\\Delta\\text\{Bias Score\}occurs where the base model was already biased toward a group and fine\-tuning on unharmful data reduced it\. Per\-group results and the other families are in Appendix[H](https://arxiv.org/html/2609.10060#A8)\.

ThresholdingΔ​B\\Delta Btherefore flags harmful checkpoints\. A classifier that fires whenΔ​B\\Delta Bfalls below a cutoff reaches ROC AUC0\.930\.93for Mistral and0\.890\.89for Llama, with Gemma at0\.780\.78\(Table[1](https://arxiv.org/html/2609.10060#S4.T1)\), so a lightweight test on hidden\-state geometry recovers most of what the benchmark reports\.

LoRA Fine\-Tuning\.Table[1](https://arxiv.org/html/2609.10060#S4.T1)repeats the analysis on the LoRA spectrum\. The direction of the effect is unchanged for Mistral and Llama, which keep strong negative correlations and comparable detection performance \(0\.780\.78and0\.920\.92\), but the relationship is noisier throughout and Gemma’s correlation disappears \(r=−0\.04r=\-0\.04\)\. This is what the adaptation itself predicts, since low\-rank updates constrain how far the hidden geometry can move and leave a smallerΔ​B\\Delta Bto measure\.

Gemma is the weakest case throughout, on all three benchmarks and under both regimes \(Table[1](https://arxiv.org/html/2609.10060#S4.T1)\), so the low\-rank argument does not account for it on its own\. The most likely reason is scale, as Gemma\-3\-4B is roughly half the size of the Mistral and Llama models we audit\. Its correlations keep the same sign as the other two families everywhere, so the signal is present but weak rather than absent or reversed\. Tokenisation and final\-layer geometry may contribute as well, but we controlled for neither and leave the architecture gap open\.

### 4\.3Fine\-Tuning\-Induced Representational Shifts on DecodingTrust

To assess whether the representational shifts observed on WildGuardMix generalise beyond harmfulness detection, we evaluate our method on DecodingTrust, a benchmark targeting stereotypical bias rather than harmful output\.

Results\.The pattern carries over \(Figure[2](https://arxiv.org/html/2609.10060#S4.F2)\(b\), Table[1](https://arxiv.org/html/2609.10060#S4.T1)\)\. Mistral and Llama correlate strongly \(r=−0\.82r=\-0\.82and−0\.84\-0\.84,p<0\.001p<0\.001\) and detection is strongest for Llama \(ROC AUC0\.910\.91\), while Gemma is again weaker but still significant\. Under LoRA the ordering holds for Mistral and Llama, and Gemma’s correlation again falls below significance\. That the effect appears on a stereotype benchmark as well as a harmfulness one showsΔ​B\\Delta Bis not tied to one dataset or annotation scheme\.

### 4\.4Fine\-Tuning\-Induced Representational Shifts on ToxiGen

Results\.ToxiGen shows the same relationship at the granularity of individual demographic groups \(Figure[2](https://arxiv.org/html/2609.10060#S4.F2)\(c\), Table[1](https://arxiv.org/html/2609.10060#S4.T1)\)\. Checkpoints that generate more toxic continuations toward a group have lowerΔ​B\\Delta Bfor that group, significantly so for Llama \(r=−0\.62r=\-0\.62\) and Gemma, withr=−0\.49r=\-0\.49\(p<0\.001p<0\.001\) pooling all three families, and detection reaches ROC AUC0\.910\.91for Llama\. Mistral is the exception under full fine\-tuning \(r=−0\.19r=\-0\.19,p=0\.14p=0\.14\), because its generated toxicity saturates on the more harmful merged checkpoints and compresses the upper half of the spectrum into a narrow band\.

Under LoRA the agreement replicates and is significant in all three families, including Mistral \(r=−0\.43r=\-0\.43,p<0\.001p<0\.001\), with detection between0\.690\.69and0\.860\.86\. We report this as a replication rather than further evidence for RR over SEAT, since the two methods do not order consistently across families here\. Because ToxiGen needs no aggregation into broader topics, the result also shows that the agreement betweenΔ​B\\Delta Band behaviour is not an artefact of pooling groups\.

### 4\.5Detailed Analysis

We evaluate robustness by varying each component of the pipeline in turn, covering the representation method, anchor selection, attribute and target set formulations, pooling, and training randomness\. These analyses use Llama unless stated otherwise\.

Relative Representations vs\. Baselines\.To isolate what the relative representation itself contributes, we compare RR against three baselines\.*SEAT*measures the same target–attribute associations in each model’s own, unaligned embedding space\.*Procrustes\-SEAT*first aligns the audited embeddings to the reference frame with the optimal orthogonal map[Schönemann \(1966\)](https://arxiv.org/html/2609.10060#bib.bib19), isolating the effect of shared\-space mapping alone\. Because cosine similarity is invariant to orthogonal maps, this would be a no\-op within a single model, so Procrustes\-SEAT scores audited targets against the reference attribute sets\.*CKA drift*reports1−CKA1\-\\mathrm\{CKA\}between reference and audited target representations, a generic rotation\- and scale\-invariant similarity signal\. We prefer CKA to a CCA\-based measure, which[Kornblith et al\. \(2019\)](https://arxiv.org/html/2609.10060#bib.bib18)show needs more samples than dimensions, infeasible for our5050\-sentence target sets inℝ4096\\mathbb\{R\}^\{4096\}\.

On Llama, RR is the strongest method on both benchmarks and stays above every baseline across the full threshold sweep \(Figure[3](https://arxiv.org/html/2609.10060#S4.F3)\), with the per\-method numbers in Appendix[G](https://arxiv.org/html/2609.10060#A7)\. SEAT recovers a real but much weaker signal, reaching ROC AUC0\.7780\.778against RR’s0\.9640\.964on WildGuardMix\. Procrustes\-SEAT sits at chance on both benchmarks, so the gain comes from the relative representation rather than from alignment\. This is a property of the construction rather than an implementation artefact, because an orthogonal map preserves every angle inside the audited space and so cannot relate two spaces that differ by more than a rigid transformation\. CKA drift is undirected, so it measures how far the representations moved rather than in which direction\. It detects well \(0\.8640\.864and0\.7530\.753\) yet stays below RR on both benchmarks, soΔ​B\\Delta Bis not reducible to representational displacement\. The ordering holds beyond Llama, with the RR\-based classifier above SEAT across all three families and both benchmarks \(Appendix[H](https://arxiv.org/html/2609.10060#A8)\)\.

![Refer to caption](https://arxiv.org/html/Figures/method_comparison/methcmp_wld_roc.png)\(a\)WildGuardMix
![Refer to caption](https://arxiv.org/html/Figures/method_comparison/methcmp_dt_roc.png)\(b\)DecodingTrust

Figure 3:ROC AUC for detecting increased\-bias models across bias\-score thresholds on Llama\.RR lies above SEAT, Procrustes\-SEAT and CKA drift at every threshold on both benchmarks, and Procrustes\-SEAT stays near the chance line \(0\.50\.5\)\. Per\-method ROC AUC and Pearsonrrare in Table[7](https://arxiv.org/html/2609.10060#A7.T7)\.Relative Representation Anchors Selection\.Anchors define the shared reference frame into which both models are projected, so their choice matters\. The original RR work[Moschella et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib24)used word anchors, but our task measures bias toward specific social groups, so more domain\-appropriate anchors may align better\. We compare four sets, namely the original word anchors, samples from the Alpaca dataset[Taori et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib28)and the broader Tulu mixture[Lambert et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib27), andneutral sentences, in\-domain examples related to the social groups under study \(Appendix[F](https://arxiv.org/html/2609.10060#A6)\)\.

Neutral sentences perform best, reaching ROC AUC0\.8920\.892at 1k anchors, with the original word anchors a consistent baseline and the two SFT mixtures slightly behind \(Figure[4](https://arxiv.org/html/2609.10060#S4.F4)\), so we adopt them throughout\. Because these anchors reference the same social groups as the target set, one may ask whether that proximity produces the signal\. It does not\. Anchors only define the projection frame and are never scored as targets or attributes, and the out\-of\-domain sets stay discriminative on their own\.

![Refer to caption](https://arxiv.org/html/Figures/robustness/anchors/anchors_line_plot_inverted_alpaca.png)Figure 4:Effect of anchor set selection on ROC AUC for Llama\.ROC AUC against the number of anchors, for the four sources described in the text\.Sensitivity to Attribute Sets and Sentence Templates\.Δ​B\\Delta Bdepends on how the attribute sentences and target templates are worded, so we vary both\. We test six attribute constructions and six target templates, altering subject form, voice and wording, with the positive and negative attribute sets always modified jointly to preserve polarity \(Appendices[E\.1](https://arxiv.org/html/2609.10060#A5.SS1)and[E\.2](https://arxiv.org/html/2609.10060#A5.SS2)\)\. Each variant is scored by the ROC AUC of theΔ​B\\Delta Bclassifier, with binary labels from thresholding the Bias Score at0\.10\.1\.

Performance is stable on both axes \(Tables[5\(a\)](https://arxiv.org/html/2609.10060#A5.T5.st1)and[5\(b\)](https://arxiv.org/html/2609.10060#A5.T5.st2)\), with mean ROC AUC0\.863±0\.0300\.863\\pm 0\.030across attribute sets and0\.902±0\.0080\.902\\pm 0\.008across templates, soΔ​B\\Delta Bis not sensitive to surface wording\.

Sensitivity to Pooling Strategy\.Varying the token\-to\-vector pooling \(mean, max, last\) leaves the ordering unchanged, since RR beats SEAT under every scheme and our default of mean pooling is strongest \(Appendix[E\.4](https://arxiv.org/html/2609.10060#A5.SS4)\)\.

Stability Across Fine\-Tuning Runs\.Repeated training with different random seeds yields nearly identicalΔ​B\\Delta Bvalues \(Appendix[E\.5](https://arxiv.org/html/2609.10060#A5.SS5)\)\.

### 4\.6Computational Cost Analysis

Our method needs roughly 3 minutes per model, split between generating embeddings and computing the bias shift, and this cost is almost flat across the three families\. Every output\-level benchmark is more expensive, from 9–14 minutes for WildGuardMix Harmfulness to 33–76 minutes for ToxiGen and 44–156 minutes for DecodingTrust \(Table[3](https://arxiv.org/html/2609.10060#A4.T3)in Appendix[D](https://arxiv.org/html/2609.10060#A4)\), which is between three and roughly fifty times more compute, because each of them must generate and then score thousands of continuations\. Our method also needs no annotation, so a new target group stays cheap\. All experiments used a single NVIDIA A100 GPU \(40 GB\)\.

## 5Discussion

We introduced a lightweight reference\-based method for auditing bias shifts in hidden\-state representations, and showed that internal states detect shifts induced during fine\-tuning\. This supports auditing fine\-tuning side effects and tracking changes across model versions\. The audited model also does not need to originate from the reference model, which opens auditing across independently trained checkpoints\. Our method is deliberately a detection and auditing tool rather than a mitigation method\. BecauseΔ​B\\Delta Bis cheap to compute and defined directly on hidden states, a natural extension is to use it as a monitoring signal during fine\-tuning, for example as an early\-stopping criterion\. TurningΔ​B\\Delta Binto a training objective is less straightforward, since a model optimised to keep it small need not be less biased in its outputs\.

## 6Conclusions

The representational bias shift tracks external bias changes across all three benchmarks, and on WildGuardMix and DecodingTrust it separates increased\-bias checkpoints better than a SEAT\-based baseline\. Relative representations therefore give a usable comparison space for auditing related model variants whose hidden spaces are not aligned\. The measure is robust to anchor choice and template variation, but it needs a meaningful reference model and weakens under parameter\-efficient adaptation, especially for Gemma\. We view this approach as complementary to output\-based bias evaluation rather than a replacement\.

## Limitations

Our method inherits SEAT’s sensitivity to the instability of contextualised embeddings and may be less reliable for models whose representations depend strongly on prompt design and token position\.Δ​B\\Delta Bis also relative, so it reports how an audited model has moved relative to a reference rather than certifying either as unbiased, and it cannot audit a checkpoint in isolation\. We pool final\-layer hidden states by mean[Lee et al\. \(2025\)](https://arxiv.org/html/2609.10060#bib.bib33);[Tang and Yang \(2024\)](https://arxiv.org/html/2609.10060#bib.bib34), and although the RR advantage holds under max and last pooling \(Table[6](https://arxiv.org/html/2609.10060#A5.T6)\), pooling and layer selection deserve a systematic study\.

Our target, attribute and anchor sentences are English templates over the coarse single\-axis groups of DecodingTrust, so other languages, intersectional groups and harms these sets do not name fall outside the measure\. We audit three decoder\-only instruction\-tuned models of 4B to 8B parameters, with bias induced by fine\-tuning on a synthetically harmful split, and the weak Gemma results under LoRA show that the signal can degrade\. Whether it holds at larger scale or under naturally occurring fine\-tuning, and whether its correlation with output\-level bias is causal, remain open\.

## Ethical Considerations

We aim to advance machine learning research for safer LLMs\. Our study required deliberately degrading model safety, since we fine\-tune on a synthetically harmful split of WildGuardMix and merge the resulting checkpoints into a graded spectrum of harmful behaviour\. We release the auditing code and the sentence sets but not these checkpoints\. The method is also dual\-use, because a cheap and differentiable signal can be optimised against, and a model tuned to keepΔ​B\\Delta Bsmall need not be less biased in its outputs\. A smallΔ​B\\Delta Bshould therefore be read as the absence of a detected representational shift rather than as evidence of safety\. We also acknowledge that the datasets we use contain offensive content, and that the groups we audit follow the coarse taxonomy of prior benchmarks rather than any complete account of the social identities they name\.

## References

- Betleyet al\.\(2025\)J\. Betley, D\. Tan, N\. Warncke, A\. Sztyber\-Betley, X\. Bao, M\. Soto, N\. Labenz, and O\. EvansEmergent misalignment: narrow finetuning can produce broadly misaligned llms\.InProceedings of the 42nd International Conference on Machine Learning \(ICML\),Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p3.1),[§2](https://arxiv.org/html/2609.10060#S2.p2.1)\.
- Beukeboom and Burgers \(2019\)C\. J\. Beukeboom and C\. BurgersHow stereotypes are shared through language: a review and introduction of the social categories and stereotypes communication \(scsc\) framework\.Review of Communication Research7,pp\. 1–37\.External Links:ISSN 2255\-4165,[Document](https://dx.doi.org/https%3A//doi.org/10.12840/issn.2255-4165.017)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p1.1)\.
- Blodgettet al\.\(2020\)S\. L\. Blodgett, S\. Barocas, H\. D\. III, and H\. M\. WallachLanguage \(technology\) is power: A critical survey of "bias" in NLP\.InProceedings of the 58th Annual Meeting of the Association for Computational Linguistics, ACL 2020, Online, July 5\-10, 2020,pp\. 5454–5476\.External Links:[Document](https://dx.doi.org/10.18653/V1/2020.ACL-MAIN.485)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p1.1)\.
- Bolukbasiet al\.\(2016\)T\. Bolukbasi, K\. Chang, J\. Y\. Zou, V\. Saligrama, and A\. T\. KalaiMan is to computer programmer as woman is to homemaker? debiasing word embeddings\.Advances in neural information processing systems29\.Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p1.1)\.
- Brunetet al\.\(2019\)M\. Brunet, C\. Alkalay\-Houlihan, A\. Anderson, and R\. ZemelUnderstanding the origins of bias in word embeddings\.InInternational conference on machine learning,pp\. 803–811\.Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p3.1)\.
- Caliskanet al\.\(2017\)A\. Caliskan, J\. J\. Bryson, and A\. NarayananSemantics derived automatically from language corpora contain human\-like biases\.Science356\(6334\),pp\. 183–186\.External Links:[Document](https://dx.doi.org/10.1126/science.aal4230)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p1.1)\.
- Caoet al\.\(2022\)Y\. T\. Cao, Y\. Pruksachatkun, K\. Chang, R\. Gupta, V\. Kumar, J\. Dhamala, and A\. GalstyanOn the intrinsic and extrinsic fairness evaluation metrics for contextualized language representations\.InProceedings of the 60th Annual Meeting of the Association for Computational Linguistics \(Volume 2: Short Papers\),S\. Muresan, P\. Nakov, and A\. Villavicencio \(Eds\.\),Dublin, Ireland,pp\. 561–570\.External Links:[Link](https://aclanthology.org/2022.acl-short.62/),[Document](https://dx.doi.org/10.18653/v1/2022.acl-short.62)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p4.1)\.
- Delobelleet al\.\(2022\)P\. Delobelle, E\. Tokpo, T\. Calders, and B\. BerendtMeasuring fairness with biased rulers: a comparative study on bias metrics for pre\-trained language models\.InProceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,M\. Carpuat, M\. de Marneffe, and I\. V\. Meza Ruiz \(Eds\.\),Seattle, United States,pp\. 1693–1706\.External Links:[Link](https://aclanthology.org/2022.naacl-main.122/),[Document](https://dx.doi.org/10.18653/v1/2022.naacl-main.122)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p4.1)\.
- Ferrara \(2023\)E\. FerraraShould chatgpt be biased? challenges and risks of bias in large language models\.First Monday28\(11\)\.External Links:[Document](https://dx.doi.org/10.5210/fm.v28i11.13346),[Link](https://firstmonday.org/ojs/index.php/fm/article/view/13346)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p1.1)\.
- Garget al\.\(2018\)N\. Garg, L\. Schiebinger, D\. Jurafsky, and J\. ZouWord embeddings quantify 100 years of gender and ethnic stereotypes\.Proceedings of the National Academy of Sciences115\(16\),pp\. E3635–E3644\.Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p3.1)\.
- Goldfarb\-Tarrantet al\.\(2021\)S\. Goldfarb\-Tarrant, R\. Marchant, R\. Muñoz Sánchez, M\. Pandya, and A\. LopezIntrinsic bias metrics do not correlate with application bias\.InProceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing \(Volume 1: Long Papers\),C\. Zong, F\. Xia, W\. Li, and R\. Navigli \(Eds\.\),Online,pp\. 1926–1940\.External Links:[Link](https://aclanthology.org/2021.acl-long.150/),[Document](https://dx.doi.org/10.18653/v1/2021.acl-long.150)Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p6.1),[§2](https://arxiv.org/html/2609.10060#S2.p4.1)\.
- Gonen and Goldberg \(2019\)H\. Gonen and Y\. GoldbergLipstick on a pig: Debiasing methods cover up systematic gender biases in word embeddings but do not remove them\.InProceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 \(Long and Short Papers\),J\. Burstein, C\. Doran, and T\. Solorio \(Eds\.\),Minneapolis, Minnesota,pp\. 609–614\.External Links:[Link](https://aclanthology.org/N19-1061/),[Document](https://dx.doi.org/10.18653/v1/N19-1061)Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p6.1),[§2](https://arxiv.org/html/2609.10060#S2.p4.1)\.
- Guoet al\.\(2025\)Q\. Guo, J\. Tang, and X\. HuangAttacking llms and ai agents: advertisement embedding attacks against large language models\.External Links:2508\.17674,[Link](https://arxiv.org/abs/2508.17674)Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p1.1),[§2](https://arxiv.org/html/2609.10060#S2.p2.1)\.
- Hanet al\.\(2024\)S\. Han, K\. Rao, A\. Ettinger, L\. Jiang, B\. Y\. Lin, N\. Lambert, Y\. Choi, and N\. DziriWildGuard: open one\-stop moderation tools for safety risks, jailbreaks, and refusals of llms\.InAdvances in Neural Information Processing Systems,A\. Globerson, L\. Mackey, D\. Belgrave, A\. Fan, U\. Paquet, J\. Tomczak, and C\. Zhang \(Eds\.\),Vol\.37,pp\. 8093–8131\.External Links:[Document](https://dx.doi.org/10.52202/079017-0261)Cited by:[Appendix B](https://arxiv.org/html/2609.10060#A2.p1.1),[Appendix C](https://arxiv.org/html/2609.10060#A3.SS0.SSS0.Px2.p1.1),[§1](https://arxiv.org/html/2609.10060#S1.p5.1),[§4\.1](https://arxiv.org/html/2609.10060#S4.SS1.p2.1)\.
- Hartvigsenet al\.\(2022\)T\. Hartvigsen, S\. Gabriel, H\. Palangi, M\. Sap, D\. Ray, and E\. KamarToxiGen: a large\-scale machine\-generated dataset for adversarial and implicit hate speech detection\.InProceedings of the 60th Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\),S\. Muresan, P\. Nakov, and A\. Villavicencio \(Eds\.\),Dublin, Ireland,pp\. 3309–3326\.External Links:[Link](https://aclanthology.org/2022.acl-long.234/),[Document](https://dx.doi.org/10.18653/v1/2022.acl-long.234)Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p5.1),[§4\.1](https://arxiv.org/html/2609.10060#S4.SS1.p3.1)\.
- Jinet al\.\(2021\)X\. Jin, F\. Barbieri, B\. Kennedy, A\. Mostafazadeh Davani, L\. Neves, and X\. RenOn transferability of bias mitigation effects in language model fine\-tuning\.InProceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,Online,pp\. 3770–3783\.External Links:[Link](https://aclanthology.org/2021.naacl-main.296/),[Document](https://dx.doi.org/10.18653/v1/2021.naacl-main.296)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p4.1)\.
- Klabundeet al\.\(2025\)M\. Klabunde, T\. Schumacher, M\. Strohmaier, and F\. LemmerichSimilarity of neural network models: a survey of functional and representational measures\.ACM Computing Surveys57\(9\),pp\. Article 242\.External Links:[Document](https://dx.doi.org/10.1145/3728458),2305\.06329Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p3.1)\.
- Kornblithet al\.\(2019\)S\. Kornblith, M\. Norouzi, H\. Lee, and G\. HintonSimilarity of neural network representations revisited\.InProceedings of the 36th International Conference on Machine Learning,pp\. 3519–3529\.Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p3.1),[§4\.5](https://arxiv.org/html/2609.10060#S4.SS5.p2.1)\.
- Lambertet al\.\(2025\)N\. Lambert, J\. Morrison, V\. Pyatkin, S\. Huang, H\. Ivison, F\. Brahman, L\. J\. V\. Miranda, A\. Liu, N\. Dziri, X\. Lyu, Y\. Gu, S\. Malik, V\. Graf, J\. D\. Hwang, J\. Yang, R\. L\. Bras, O\. Tafjord, C\. Wilhelm, L\. Soldaini, N\. A\. Smith, Y\. Wang, P\. Dasigi, and H\. HajishirziTulu 3: pushing frontiers in open language model post\-training\.InSecond Conference on Language Modeling,External Links:[Link](https://openreview.net/forum?id=i1uGbfHHpH)Cited by:[§4\.5](https://arxiv.org/html/2609.10060#S4.SS5.p4.1)\.
- Leeet al\.\(2025\)C\. Lee, R\. Roy, M\. Xu, J\. Raiman, M\. Shoeybi, B\. Catanzaro, and W\. PingNV\-embed: improved techniques for training llms as generalist embedding models\.InInternational Conference on Learning Representations,Y\. Yue, A\. Garg, N\. Peng, F\. Sha, and R\. Yu \(Eds\.\),Vol\.2025,pp\. 79310–79333\.External Links:[Link](https://proceedings.iclr.cc/paper_files/paper/2025/file/c4bf73386022473a652a18941e9ea6f8-Paper-Conference.pdf)Cited by:[Limitations](https://arxiv.org/html/2609.10060#Sx1.p1.1)\.
- Lianget al\.\(2023\)P\. Liang, R\. Bommasani, T\. Lee,et al\.Holistic evaluation of language models\.Transactions on Machine Learning Research2023\.External Links:[Link](https://openreview.net/forum?id=iO4LZibEqW)Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p2.1)\.
- Linet al\.\(2025\)L\. Lin, L\. Wang, J\. Guo, and K\. WongInvestigating bias in llm\-based bias detection: disparities between llms and human perception\.InProceedings of the 31st International Conference on Computational Linguistics,Abu Dhabi, UAE,pp\. 10634–10649\.Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p2.1),[§2](https://arxiv.org/html/2609.10060#S2.p2.1)\.
- Linet al\.\(2024\)L\. Lin, L\. Wang, X\. Zhao, J\. Li, and K\. WongIndiVec: an exploration of leveraging large language models for media bias detection with fine\-grained bias indicators\.InFindings of the Association for Computational Linguistics: EACL 2024, St\. Julian’s, Malta, March 17\-22, 2024,pp\. 1038–1050\.Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p2.1),[§2](https://arxiv.org/html/2609.10060#S2.p2.1)\.
- Luet al\.\(2025\)Z\. Lu, G\. Lim, and M\. YinUnderstanding the effects of large language model \(llm\)\-driven adversarial social influences in online information spread\.InProceedings of the Extended Abstracts of the CHI Conference on Human Factors in Computing Systems, CHI EA 2025, Yokohama, Japan, 26 April 2025\- 1 May 2025,pp\. 555:1–555:7\.Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p1.1),[§2](https://arxiv.org/html/2609.10060#S2.p2.1)\.
- Mayet al\.\(2019\)C\. May, A\. Wang, S\. Bordia, S\. R\. Bowman, and R\. RudingerOn measuring social biases in sentence encoders\.InProceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 \(Long and Short Papers\),Minneapolis, Minnesota,pp\. 622–628\.External Links:[Document](https://dx.doi.org/10.18653/v1/N19-1063)Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p3.1),[§2](https://arxiv.org/html/2609.10060#S2.p1.1),[§3\.2](https://arxiv.org/html/2609.10060#S3.SS2.p1.1)\.
- Moschellaet al\.\(2023\)L\. Moschella, V\. Maiorca, M\. Fumero, A\. Norelli, F\. Locatello, and E\. RodolàRelative representations enable zero\-shot latent space communication\.InThe Eleventh International Conference on Learning Representations,External Links:[Link](https://openreview.net/forum?id=SrC-nwieGJ)Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p4.1),[§2](https://arxiv.org/html/2609.10060#S2.p3.1),[§3\.3](https://arxiv.org/html/2609.10060#S3.SS3.p1.1),[§3\.3](https://arxiv.org/html/2609.10060#S3.SS3.p1.2),[§4\.5](https://arxiv.org/html/2609.10060#S4.SS5.p4.1)\.
- Orgadet al\.\(2022\)H\. Orgad, S\. Goldfarb\-Tarrant, and Y\. BelinkovHow gender debiasing affects internal model representations, and why it matters\.InProceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies,Seattle, United States,pp\. 2602–2628\.External Links:[Link](https://aclanthology.org/2022.naacl-main.188/),[Document](https://dx.doi.org/10.18653/v1/2022.naacl-main.188)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p4.1)\.
- Qiet al\.\(2024\)X\. Qi, Y\. Zeng, T\. Xie, P\. Chen, R\. Jia, P\. Mittal, and P\. HendersonFine\-tuning aligned language models compromises safety, even when users do not intend to\!\.InThe Twelfth International Conference on Learning Representations \(ICLR\),Cited by:[§1](https://arxiv.org/html/2609.10060#S1.p3.1)\.
- Rettenbergeret al\.\(2025\)L\. Rettenberger, M\. Reischl, and M\. SchuteraAssessing political bias in large language models\.Journal of Computational Social Science8\(42\)\.External Links:[Document](https://dx.doi.org/10.1007/s42001-025-00376-w)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p1.1)\.
- Schönemann \(1966\)P\. H\. SchönemannA generalized solution of the orthogonal procrustes problem\.Psychometrika31\(1\),pp\. 1–10\.Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p3.1),[§4\.5](https://arxiv.org/html/2609.10060#S4.SS5.p2.1)\.
- Shahet al\.\(2023\)H\. Shah, S\. M\. Park, A\. Ilyas, and A\. MadryModelDiff: a framework for comparing learning algorithms\.InProceedings of the 40th International Conference on Machine Learning,Vol\.202,pp\. 30646–30688\.Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p3.1)\.
- Tang and Yang \(2024\)Y\. Tang and Y\. YangPooling and attention: what are effective designs for llm\-based embedding models?\.External Links:2409\.02727,[Link](https://arxiv.org/abs/2409.02727)Cited by:[Limitations](https://arxiv.org/html/2609.10060#Sx1.p1.1)\.
- Taoet al\.\(2024\)Y\. Tao, O\. Viberg, R\. S\. Baker, and R\. F\. KizilcecCultural bias and cultural alignment of large language models\.PNAS Nexus3\(9\),pp\. pgae346\.External Links:ISSN 2752\-6542,[Document](https://dx.doi.org/10.1093/pnasnexus/pgae346),[Link](https://doi.org/10.1093/pnasnexus/pgae346)Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p1.1)\.
- Taoriet al\.\(2023\)R\. Taori, I\. Gulrajani, T\. Zhang, Y\. Dubois, X\. Li, C\. Guestrin, P\. Liang, and T\. B\. HashimotoStanford alpaca: an instruction\-following llama model\.GitHub\.Note:[https://github\.com/tatsu\-lab/stanford\_alpaca](https://github.com/tatsu-lab/stanford_alpaca)Cited by:[§4\.5](https://arxiv.org/html/2609.10060#S4.SS5.p4.1)\.
- Wanget al\.\(2023\)B\. Wang, W\. Chen, H\. Pei, C\. Xie, M\. Kang, C\. Zhang, C\. Xu, Z\. Xiong, R\. Dutta, R\. Schaeffer, S\. T\. Truong, S\. Arora, M\. Mazeika, D\. Hendrycks, Z\. Lin, Y\. Cheng, S\. Koyejo, D\. Song, and B\. LiDecodingTrust: A comprehensive assessment of trustworthiness in GPT models\.InAdvances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 \- 16, 2023,Cited by:[Appendix B](https://arxiv.org/html/2609.10060#A2.p1.1),[Appendix C](https://arxiv.org/html/2609.10060#A3.SS0.SSS0.Px6.p1.1),[§1](https://arxiv.org/html/2609.10060#S1.p2.1),[§1](https://arxiv.org/html/2609.10060#S1.p5.1),[§4\.1](https://arxiv.org/html/2609.10060#S4.SS1.p3.1)\.
- Wanget al\.\(2025\)M\. Wang, T\. D\. la Tour, O\. Watkins, A\. Makelov, R\. A\. Chi, S\. Miserendino, J\. Wang, A\. Rajaram, J\. Heidecke, T\. Patwardhan, and D\. MossingPersona features control emergent misalignment\.arXiv preprint arXiv:2506\.19823\.Cited by:[§2](https://arxiv.org/html/2609.10060#S2.p2.1)\.
- Wortsmanet al\.\(2022\)M\. Wortsman, G\. Ilharco, J\. W\. Kim, M\. Li, S\. Kornblith, R\. Roelofs, R\. Gontijo\-Lopes, H\. Hajishirzi, A\. Farhadi, H\. Namkoong, and L\. SchmidtRobust fine\-tuning of zero\-shot models\.InProceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition \(CVPR\),pp\. 7949–7961\.Cited by:[Appendix C](https://arxiv.org/html/2609.10060#A3.SS0.SSS0.Px3.p1.1),[§4\.1](https://arxiv.org/html/2609.10060#S4.SS1.p2.1)\.

## Appendix AAppendix

This appendix supplements the main paper with additional details and results\.[AppendixB](https://arxiv.org/html/2609.10060#A2)explains how WildGuardMix prompts were mapped to consolidated target group topics\.[AppendixC](https://arxiv.org/html/2609.10060#A3)provides full fine\-tuning implementation details\.[AppendixE](https://arxiv.org/html/2609.10060#A5)describes all ablation variants used to test robustness to attribute phrasing, sentence templates, and training randomness\.[AppendixF](https://arxiv.org/html/2609.10060#A6)lists the target, positive, negative, and anchor sentence sets\.[AppendixH](https://arxiv.org/html/2609.10060#A8)presents complete results for full and LoRA fine\-tuning across all models and benchmarks\.

## Appendix BWildGuardMix Target Group Mapping

The WildGuardMix[Han et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib26)test set does not assign target group labels to prompts within thesocial stereotypes and unfair discriminationsubcategory\. To enable comparison with the DecodingTrust[Wang et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib8)stereotype evaluation, which defines 24 target groups, we first consolidated these 24 groups into 9 broader topics as shown in[table2](https://arxiv.org/html/2609.10060#A2.T2)\. We then used ChatGPT 5\.2 to classify each WildGuardMix prompt into one of these 9 topics based on its content, enabling aggregation of harmfulness rates at a level comparable to the DecodingTrust evaluation\.

Table 2:Mapping of the 24 DecodingTrust target groups to 9 consolidated topics used for aggregating WildGuardMix harmfulness rates\.
## Appendix CFine\-Tuning Implementation Details

#### Models\.

We evaluate three instruction\-tuned models: Llama 3\.1\-8B\-Instruct \(meta\-llama/Llama\-3\.1\-8B\-Instruct\), Mistral\-7B\-Instruct\-v0\.3 \(mistralai/ Mistral\-7B\-Instruct\-v0\.3\), and Gemma 3\-4B\-IT \(google/gemma\-3\-4b\-it\)\.

#### Datasets\.

We derive two dataset variants from WildGuardMix[Han et al\. \(2024\)](https://arxiv.org/html/2609.10060#bib.bib26), each containing 8k examples: \(1\)wildguard\_unharmful, consisting of unharmful examples only, and \(2\)wildguard\_synth\_even\_8k, an even split of harmful WildGuard examples and synthetic examples\.

#### Model merging\.

To obtain models with intermediate levels of harmfulness, we linearly merge[Wortsman et al\. \(2022\)](https://arxiv.org/html/2609.10060#bib.bib1)thewildguard\_unharmfulandwildguard\_synth\_even\_8kcheckpoints at five interpolation ratios \(10/90, 30/70, 50/50, 70/30 and 90/10 of unharmful/synth\)\. With the two endpoints this gives seven checkpoints per model and fine\-tuning regime, spanning a spectrum from safe to harmful behaviour\.

#### Training regimes\.

Each model is fine\-tuned under two regimes: LoRA and full fine\-tuning\. Shared hyperparameters across both regimes are: 3 epochs, per\-device batch size of 4 with 8 gradient accumulation steps \(effective batch size 32\), warmup ratio of 0\.03, AdamW optimizer, linear learning rate scheduler with warmup, bfloat16 precision, and a maximum sequence length of 1024\. For LoRA, we use a learning rate of1×10−41\\times 10^\{\-4\}, rankr=16r=16,α=32\\alpha=32, dropout of 0\.05, and apply adapters to all attention and MLP projection modules \(q\_proj,k\_proj,v\_proj,o\_proj,gate\_proj,up\_proj,down\_proj\)\. For full fine\-tuning, the learning rate is set to2×10−52\\times 10^\{\-5\}\.

#### Response generation\.

For WildGuard harmfulness scoring, we generate 5 responses per prompt using temperature 0\.7, top\-ppof 1\.0, and a maximum of 256 new tokens\.

#### DecodingTrust evaluation\.

We modified the DecodingTrust[Wang et al\. \(2023\)](https://arxiv.org/html/2609.10060#bib.bib8)repository to support newer model versions by updating packages where necessary while preserving the original evaluation scripts\. We used the repository’s stereotype evaluation pipeline to obtain bias scores\.

#### ToxiGen evaluation\.

Each checkpoint continues ToxiGen’s per\-group few\-shot hate prompts, presented as a user turn in the model’s chat template, and we sample five continuations per prompt\. The first generated statement is scored by the authors’toxigen\_robertaclassifier, and we take the fraction of toxic continuations per group\.

#### Infrastructure\.

All experiments were conducted on a single NVIDIA A100 GPU \(40 GB\) running Ubuntu 20\.04, using Python 3\.9, PyTorch 2\.7\.1, Transformers 4\.57\.3, PEFT 0\.18\.0, and TRL 0\.25\.1\.

## Appendix DComputational Cost

Table 3:Computational cost analysis \(in minutes\) across all evaluated models\. Our method consists of two steps, generating embeddings and computing bias shift\. WildGuardMix Harmfulness and ToxiGen both require generating responses, then classifying them\. DecodingTrust is evaluated in a single step\.
## Appendix EDetailed Ablation Descriptions

To evaluate the robustness of our findings, we design ablation experiments along four axes: \(1\) how attribute sentences are phrased, \(2\) how target sentences are phrased, \(3\) how token hidden states are pooled into a sentence vector, and \(4\) whether results are stable across independent fine\-tuning runs\. Below, we describe each set of variants in detail\.

### E\.1Attribute Set Variants

Attribute set variants modify only the positive and negative attribute sentences; target sentences remain fixed\.

#### Base\.

The original, unmodified attribute sentences serve as the baseline\.

#### Subject v1 \(Plural Pronoun\)\.

All gendered or entity\-specific grammatical subjects in the attribute sentences are replaced with the plural neutral pronoun“they”\(and corresponding possessive“their”\)\. This tests whether the grammatical subject’s identity in the attribute sentence influences the measured association\.

#### Subject v2 \(Neutral Noun\)\.

Subjects are instead replaced with neutral noun phrases such as“the person”or“people”\. Comparing Subject v1 and Subject v2 allows us to disentangle the effect of pronominal form \(they/their\) from the broader effect of removing specific subject references, since the two strategies neutralise the subject in linguistically distinct ways\.

#### Synonyms v1 / v2 / v3\.

Three independent sets of synonym substitutions are applied to key emotion and attribute words in the attribute sentences\.Synonyms v1provides the first set of lexical alternatives,Synonyms v2a second independent set, andSynonyms v3a third\. Together, they quantify the degree to which measured associations depend on the specific wording of the attribute stimuli rather than the underlying semantic content\.

### E\.2Target Set Variants

Target set variants alter how the target entities are described in the stimulus sentences; attribute sentences remain unchanged throughout\.

#### Base\.

The original, unmodified target templates serve as the baseline condition\.

#### Passive\.

Active constructions are converted to passive voice through grammatical inversion \(e\.g\.,“X helped Y”becomes“Y was helped by X”\), without any additional rewording\.

#### Passive Rephrasing\.

Sentences are rewritten in the passive voice with light rephrasing to ensure naturalness, avoiding mechanical syntactic transformations\.

#### Synonyms v1 / v2 / v3\.

In each of the three synonym variants, key target\-related words are replaced with synonyms while the overall sentence structure is preserved\. The three sets are constructed independently of one another:Synonyms v1provides a first set of lexical substitutions,Synonyms v2supplies an alternative set of synonyms, andSynonyms v3introduces a third independent set\. By maintaining three distinct synonym mappings, we can assess the extent to which results are sensitive to the particular lexical choices used to describe the targets, rather than reflecting a stable underlying effect\.

### E\.3Summary of Ablation Variants

Table[4](https://arxiv.org/html/2609.10060#A5.T4)provides a compact overview of all target and attribute set variants\.

Table 4:Overview of ablation variants\.“What changes” indicates the linguistic dimension that is modified relative to the base condition\.Table 5:Robustness ofΔ​B\\Delta Bto attribute sets and sentence templates for Llama\.ROC AUC of theΔ​B\\Delta B\-based classifier for each variant in Table[4](https://arxiv.org/html/2609.10060#A5.T4)\.\(a\)Attribute set variants
\(b\)Target template variants

### E\.4Pooling Strategy

Sentence embeddings are formed by pooling the final\-layer token hidden states, and we vary that pooling betweenmean\(our default\),maxandlastat layer 32\. Attribute and target sets are held at their base variants throughout, and the pooling is applied identically to the reference and the audited model, so the comparison isolates the pooling choice alone\.

Table[6](https://arxiv.org/html/2609.10060#A5.T6)reports the result\. RR outperforms SEAT under every pooling scheme, with the smallest RR score \(0\.8820\.882\) still exceeding the largest SEAT score \(0\.7910\.791\)\. SEAT is flat but weak across pooling \(0\.776±0\.0130\.776\\pm 0\.013\), whereas RR is stronger throughout and peaks under mean pooling \(0\.9640\.964\)\. RR is somewhat more pooling\-sensitive \(0\.909±0\.0390\.909\\pm 0\.039\): mean pooling averages over all token states, denoising the sentence vector in a way the relative\-representation geometry rewards, which validates our default choice\.

Table 6:Robustness ofΔ​B\\Delta Bto the token\-to\-vector pooling strategy for Llama \(layer 32\)\.ROC AUC of theΔ​B\\Delta B\-based classifier under mean, max and last pooling\. RR is above SEAT under every scheme, and mean pooling, our default, is strongest\.
### E\.5Stability Across Fine\-Tuning Runs

![Refer to caption](https://arxiv.org/html/Figures/robustness/fine-tuning/llama_unharmful_train_ablation.png)\(a\)Llama unharmful
![Refer to caption](https://arxiv.org/html/Figures/robustness/fine-tuning/llama_synth_train_ablation.png)\(b\)Llama synth

Figure 5:Stability of representational bias shift across fine\-tuning runs\.Panels \(a\) and \(b\) showΔ​B\\Delta Bacross three random seeds for Llama fine\-tuned on theunharmfulandsynthdatasets, respectively\. Each point corresponds to a social group, and different colors represent different fine\-tuning runs\. Results remain tightly clustered across runs, with a standard deviation of 0\.003 in both datasets\. This indicates thatΔ​B\\Delta Bis stable with respect to training randomness\.Fine\-tuning introduces stochasticity through initialisation, data ordering, and optimisation dynamics, potentially leading to variability in learned representations\. To determine whetherΔ​B\\Delta Breflects systematic effects of fine\-tuning rather than incidental training noise, we repeat fine\-tuning three times with different random seeds\. The experiments are conducted on two datasets,unharmfulandsynth\. For each run, we computeΔ​B\\Delta Bacross social groups and visualise the results in Figure[5](https://arxiv.org/html/2609.10060#A5.F5)\. The resultingΔ​B\\Delta Bvalues remain tightly clustered across random seeds for both datasets\. The standard deviation is0\.0030\.003in both cases, with meanΔ​B\\Delta Bvalues of0\.2910\.291forunharmfuland−0\.051\-0\.051forsynth\. The low variance indicates thatΔ​B\\Delta Bis highly stable with respect to training randomness, suggesting that the metric captures a consistent property of the fine\-tuned representations rather than an artifact of a particular training run\.

## Appendix FSentence Sets

This appendix lists the target sentence set𝒯\\mathcal\{T\}and the two auxiliary sentence sets used in the experiments: the positive set𝒫\\mathcal\{P\}and the negative set𝒩\\mathcal\{N\}\. Each set was designed to contain sentences of comparable length and style\. The target set𝒯\\mathcal\{T\}was generated by taking social group categories from the DecodingTrust stereotype dataset and inserting them into predefined sentence templates to produce natural\-sounding statements\. The auxiliary sets𝒫\\mathcal\{P\}and𝒩\\mathcal\{N\}were created using an external large language model \(GPT\-5\) to ensure diversity and semantic consistency\. For transparency, we report the number of sentences in each set along with representative examples\.

#### Target Sentences

- •Number of sentences: 50 per bias category
- •Average length: 7 words

Examples:

> \[target group\] live in many different countries\. \[target group\] attend community events\. \[target group\] are part of the local population\. \[target group\] go to the park\.

#### Positive Sentences

- •Number of sentences: 100
- •Average length: 7 words

Examples:

> She danced with pure joy in her heart\. Their love grew stronger with every passing day\. The morning light filled the room with warmth\.

#### Negative Sentences

- •Number of sentences: 100
- •Average length: 7 words

Examples:

> He felt shame after being caught in a lie\. She began to cry when the pain was unbearable\. They lived under oppression for decades\.

#### Sentence Anchors

- •Number of sentences: 1k
- •Average length: 7 words

Examples:

> Homosexuals speak multiple languages and dialects\. Many Asians participate in online discussions\. Women use technology in their daily routines\.

## Appendix GMethod Comparison Scatter Plots

Figure[6](https://arxiv.org/html/2609.10060#A7.F6)shows the per\-modelΔ​B\\Delta BagainstΔ\\DeltaBias Score for RR, SEAT, Procrustes\-SEAT, and CKA drift, complementing the ROC curves in Figure[3](https://arxiv.org/html/2609.10060#S4.F3)and the numbers in Table[7](https://arxiv.org/html/2609.10060#A7.T7)below\. RR forms the tightest, best\-separated cluster along the regression line; Procrustes\-SEAT shows no relationship; CKA drift correlates in magnitude but has no directional \(bias\-valence\) axis\.

![Refer to caption](https://arxiv.org/html/Figures/method_comparison/methcmp_wld_scatter.png)\(a\)WildGuardMix
![Refer to caption](https://arxiv.org/html/Figures/method_comparison/methcmp_dt_scatter.png)\(b\)DecodingTrust

Figure 6:Δ​B\\Delta BversusΔ\\DeltaBias Score for RR and the baseline methods on Llama \(layer 32\)\.Each panel plots the four methods against the external bias\-score change\. RR yields the strongest, most structured correlation; Procrustes\-SEAT is uncorrelated; CKA drift \(plotted as1−CKA1\-\\mathrm\{CKA\}\) correlates in magnitude only\.Table 7:RR versus alignment and representation\-similarity baselines on Llama\.CKA is undirected, so its ROC AUC ismax⁡\(AUC,1−AUC\)\\max\(\\mathrm\{AUC\},1\-\\mathrm\{AUC\}\)and itsrris reported as\|r\|\|r\|\.†denotes a non\-significant correlation \(p\>0\.05p\>0\.05\)\. These are the values behind Figure[3](https://arxiv.org/html/2609.10060#S4.F3)in the main text\.\(a\)WildGuardMix
\(b\)DecodingTrust

## Appendix HFine\-tuning Results

### H\.1Full fine\-tuning

Figure[7](https://arxiv.org/html/2609.10060#A8.F7)presents results for fully fine\-tuned models against WildGuardMix for all three model families; the main text shows only the Llama panels \(Figure[2](https://arxiv.org/html/2609.10060#S4.F2)\) and summarises the rest in Table[1](https://arxiv.org/html/2609.10060#S4.T1)\. Figure[8](https://arxiv.org/html/2609.10060#A8.F8)presents the corresponding results against DecodingTrust\. Figures[9](https://arxiv.org/html/2609.10060#A8.F9)and[10](https://arxiv.org/html/2609.10060#A8.F10)reproduce the corresponding main\-text figures with detailed labels\.

![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/merging_shared_legend.png)
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/mistral_wld_merged_gradient_s.png)\(a\)Mistral
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/llama_wld_merged_gradient_s.png)\(b\)Llama
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/gemma_wld_merged_gradient_s.png)\(c\)Gemma
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/mistral_wld_merged_gradient_auc_s.png)\(d\)Mistral ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/llama_wld_merged_gradient_auc_s.png)\(e\)Llama ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/gemma_wld_merged_gradient_auc_s.png)\(f\)Gemma ROC AUC

Figure 7:Results for fully fine\-tuned models against WildGuardMix\.Panels \(a–c\) show the relationship between the change in external Bias Score \(Δ\\DeltaBias Score\) and the representational bias shift \(Δ​B\\Delta B\)\. Panels \(d–f\) show ROC AUC scores obtained by thresholdingΔ​B\\Delta Bto classify harmful and unharmful models\. A clear correlation exists between changes in external bias and shifts in representational bias\. This signal enables the construction of an effective classifier of harmful models\. Relative representations \(RR\) consistently outperform SEAT\.![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/merging_shared_legend.png)
![Refer to caption](https://arxiv.org/html/Figures/appendix/mistral_dt_merged_gradient_s.png)\(a\)Mistral
![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_dt_merged_gradient_s.png)\(b\)Llama
![Refer to caption](https://arxiv.org/html/Figures/appendix/gemma_dt_merged_gradient_s.png)\(c\)Gemma
![Refer to caption](https://arxiv.org/html/Figures/appendix/mistral_dt_merged_gradient_auc_s.png)\(d\)Mistral ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_dt_merged_gradient_auc_s.png)\(e\)Llama ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/appendix/gemma_dt_merged_gradient_auc_s.png)\(f\)Gemma ROC AUC

Figure 8:Results for fully fine\-tuned models against DecodingTrust\.Panels \(a–c\) show the relationship between the change in external Bias Score \(Δ\\DeltaBias Score\) and the representational bias shift \(Δ​B\\Delta B\)\. Panels \(d–f\) show ROC AUC curves obtained by thresholdingΔ​B\\Delta Bto classify harmful and unharmful models\.![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_dt_merged_gradient_xl_label.png)Figure 9:Detailed results for fully fine\-tuned Llama model against DecodingTrust\.![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_wld_merged_gradient_xl_label.png)Figure 10:Detailed results for fully fine\-tuned Llama model against WildGuardMix\.
### H\.2LoRA fine\-tuning

Figure[11](https://arxiv.org/html/2609.10060#A8.F11)presents results for LoRA fine\-tuned models against WildGuardMix for all three model families; the main text shows only the Llama panels \(Figure[2](https://arxiv.org/html/2609.10060#S4.F2)\) and summarises the rest in Table[1](https://arxiv.org/html/2609.10060#S4.T1)\. Figure[12](https://arxiv.org/html/2609.10060#A8.F12)presents the corresponding results against DecodingTrust\. Figures[13](https://arxiv.org/html/2609.10060#A8.F13)and[14](https://arxiv.org/html/2609.10060#A8.F14)reproduce the corresponding main\-text figures with detailed labels\.

![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/merging_shared_legend.png)
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/mistral_wld_merged_gradient_lora_s.png)\(a\)Mistral
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/llama_wld_merged_gradient_lora_s.png)\(b\)Llama
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/gemma_wld_merged_gradient_lora_s.png)\(c\)Gemma
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/mistral_wld_merged_gradient_lora_auc_s.png)\(d\)Mistral ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/llama_wld_merged_gradient_lora_auc_s.png)\(e\)Llama ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/gemma_wld_merged_gradient_lora_auc_s.png)\(f\)Gemma ROC AUC

Figure 11:Results for LoRA fine\-tuned models against WildGuardMix\.Panels \(a–c\) show the relationship betweenΔ\\DeltaBias Score and the representational bias shiftΔ​B\\Delta B\. Panels \(d–f\) show ROC AUC obtained by thresholdingΔ​B\\Delta Bto classify harmful and unharmful models\. The relationship observed under full fine\-tuning remains visible in LoRA models\. However, the signal is noisier, particularly for Gemma\. Relative representations still provide useful discrimination for Mistral and Llama; SEAT\-based detection performs substantially worse\.![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/merging_shared_legend.png)
![Refer to caption](https://arxiv.org/html/Figures/appendix/mistral_dt_merged_gradient_lora_s.png)\(a\)Mistral
![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_dt_merged_gradient_lora_s.png)\(b\)Llama
![Refer to caption](https://arxiv.org/html/Figures/appendix/gemma_dt_merged_gradient_lora_s.png)\(c\)Gemma
![Refer to caption](https://arxiv.org/html/Figures/appendix/mistral_dt_merged_gradient_lora_auc_s.png)\(d\)Mistral ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_dt_merged_gradient_lora_auc_s.png)\(e\)Llama ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/appendix/gemma_dt_merged_gradient_lora_auc_s.png)\(f\)Gemma ROC AUC

Figure 12:Results for LoRA fine\-tuned model against DecodingTrust\.Panels \(a–c\) show the relationship betweenΔ\\DeltaBias Score and the representational bias shiftΔ​B\\Delta B\. Panels \(d–f\) show ROC curves obtained by thresholdingΔ​B\\Delta Bto classify harmful and unharmful models\.![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_dt_merged_gradient_lora_xl_label.png)Figure 13:Detailed results for LoRA fine\-tuned Llama model against DecodingTrust\.![Refer to caption](https://arxiv.org/html/Figures/appendix/llama_wld_merged_gradient_lora_xl_label.png)Figure 14:Detailed results for LoRA fine\-tuned Llama model against WildGuardMix\.
### H\.3ToxiGen

Figures[15](https://arxiv.org/html/2609.10060#A8.F15)and[16](https://arxiv.org/html/2609.10060#A8.F16)present the ToxiGen results for all three model families under full and LoRA fine\-tuning; the main text shows only the Llama panels \(Figure[2](https://arxiv.org/html/2609.10060#S4.F2)\) and summarises the rest in Table[1](https://arxiv.org/html/2609.10060#S4.T1)\.

![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/merging_shared_legend.png)
![Refer to caption](https://arxiv.org/html/Figures/toxigen/mistral_toxigen_s.png)\(a\)Mistral
![Refer to caption](https://arxiv.org/html/Figures/toxigen/llama_toxigen_s.png)\(b\)Llama
![Refer to caption](https://arxiv.org/html/Figures/toxigen/gemma_toxigen_s.png)\(c\)Gemma
![Refer to caption](https://arxiv.org/html/Figures/toxigen/mistral_toxigen_auc_s.png)\(d\)Mistral ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/toxigen/llama_toxigen_auc_s.png)\(e\)Llama ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/toxigen/gemma_toxigen_auc_s.png)\(f\)Gemma ROC AUC

Figure 15:Results for fully fine\-tuned models against ToxiGen\.Panels \(a–c\) relate the change in generated toxicity toward a group \(Δ\\DeltaToxicity\) to the representational bias shift \(Δ​B\\Delta B\), one point per \(checkpoint, group\) pair\. Panels \(d–f\) show ROC AUC obtained by thresholdingΔ​B\\Delta Bto separate checkpoints that became more toxic toward a group; the dashed line marks chance\. Unlike WildGuardMix, ToxiGen is scored at the same demographic granularity at whichΔ​B\\Delta Bis defined, so no aggregation into broader topics is needed\.![Refer to caption](https://arxiv.org/html/Figures/fine-tuning/merging_shared_legend.png)
![Refer to caption](https://arxiv.org/html/Figures/toxigen/mistral_toxigen_lora_s.png)\(a\)Mistral
![Refer to caption](https://arxiv.org/html/Figures/toxigen/llama_toxigen_lora_s.png)\(b\)Llama
![Refer to caption](https://arxiv.org/html/Figures/toxigen/gemma_toxigen_lora_s.png)\(c\)Gemma
![Refer to caption](https://arxiv.org/html/Figures/toxigen/mistral_toxigen_lora_auc_s.png)\(d\)Mistral ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/toxigen/llama_toxigen_lora_auc_s.png)\(e\)Llama ROC AUC
![Refer to caption](https://arxiv.org/html/Figures/toxigen/gemma_toxigen_lora_auc_s.png)\(f\)Gemma ROC AUC

Figure 16:Results for LoRA fine\-tuned models against ToxiGen\.Panels \(a–c\) relate the change in generated toxicity toward a group \(Δ\\DeltaToxicity\) to the representational bias shift \(Δ​B\\Delta B\), one point per \(checkpoint, group\) pair\. Panels \(d–f\) show ROC AUC obtained by thresholdingΔ​B\\Delta Bto separate checkpoints that became more toxic toward a group; the dashed line marks chance\. Unlike WildGuardMix, ToxiGen is scored at the same demographic granularity at whichΔ​B\\Delta Bis defined, so no aggregation into broader topics is needed\.

Similar Articles

Conditional Cognitive Biases in LLMs: How Biased User Turns Modulate In-Context Reasoning

arXiv cs.CL

This paper introduces a three-condition experimental framework and a benchmark of 24,300 prompts to study how biased user turns modulate cognitive bias expression in frontier LLMs under multi-turn interactions. It finds that biased conversational context amplifies bias in most models, while explicit bias cues can trigger alignment-related suppression.