基于参考的LLM偏见检测:通过隐藏状态的相对表示
研究论文 · 2026/09/10
现有的偏见审计方法通常依赖模型输出,需要昂贵的基准测试或评判模型,并可能遗漏从未出现在生成文本中的内部变化。我们提出一种基于参考的方法,通过相关模型变体(例如微调前后)的隐藏状态表示来审计偏见。由于微调会重塑表示几何结构,绝对隐藏状态无法直接比较,因此我们通过每个句子与一组固定锚句的相似度来编码,从而在共享比较空间中生成相对表示。在该空间中,我们测量目标群体与正负属性关联的偏移,称之为表示偏见偏移 ΔB。在三个模型家族以及 WildGuardMix、DecodingTrust 和 ToxiGen 基准上,ΔB 在我们测试的 18 种设置中有 15 种与输出级偏见变化相关,在完全微调下达到 |r| = 0.84(p < 0.001),在参数高效适配下则更依赖模型。对 ΔB 进行阈值化可检测偏见增加的检查点,ROC AUC 在 0.65 到 0.99 之间,并且在 WildGuardMix 和 DecodingTrust 上,它对所有三个模型家族的分辨效果均优于基于 SEAT 的基线。ΔB 在锚句集、属性集和目标模板变化下也保持稳定。我们的方法不需要任务特定的评估数据,审计一个模型约需三分钟,计算量比本文考虑的输出级基准少 3-50 倍。我们认为它是对基于输出的审计的补充,而非替代。
该方法提供了一种高效、无需输出数据的内部偏见审计途径,与输出级审计互补,有助于发现生成文本中未显现的偏见变化。
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.