基於參考的大型語言模型偏誤偵測:透過隱藏狀態的相對表徵
Reference-Based Bias Detection in LLMs via Relative Representations of Hidden States
September 9, 2026
作者: Marek Jeliński, Jan Dubiński, Maciej Chrabaszcz, Sebastian Cygert
cs.AI
摘要
現有的偏誤稽核方法通常依賴模型輸出,需要昂貴的基準測試或評判模型,且可能漏掉從未出現在生成文本中的內部偏移。我們提出一種基於參考的方法,用以稽核相關模型變體(例如微調前後)之隱藏狀態表徵中的偏誤。由於微調會重塑表徵幾何,絕對隱藏狀態無法直接比較,因此我們以每個句子與一組固定錨定句的相似度來編碼,從而在共享比較空間中產生相對表徵。我們在該空間中衡量目標群體與正向及負向屬性的關聯如何偏移,並將此量稱為表徵偏誤位移 ΔB。在三個模型家族以及 WildGuardMix、DecodingTrust 與 ToxiGen 基準測試中,於我們測試的 18 種設定裡有 15 種顯示 ΔB 與輸出層級偏誤變化相關;在完整微調下達到 |r| = 0.84(p < 0.001),而在參數高效調適下則變得更依賴模型。對 ΔB 取閾值可偵測偏誤增加的檢查點,ROC AUC 介於 0.65 與 0.99 之間;且在 WildGuardMix 與 DecodingTrust 上,其對三個模型家族的分辨效果均優於基於 SEAT 的基線。ΔB 在錨定集、屬性集與目標模板變動下也保持穩定。我們的方法無需任務特定評估資料,約三分鐘即可稽核一個模型,且相較於本文所考慮的輸出層級基準測試,所需計算量少 3 至 50 倍。我們將其視為對基於輸出的稽核之補充,而非替代。
English
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.