跳转至

公平性不变式:解释与缓解公平性缺陷的关系方法

文章背景与核心概要

在刑事司法和金融信贷等高风险领域中,数据驱动的软件系统正被广泛部署,但这些系统往往容易暴露出个体歧视问题——即程序对仅在受保护属性(如种族、性别、年龄)上有所不同的相似个体产生不合理的差异化结果。现有的解释技术通常局限于评估单个输入的决策,而忽视了歧视本质上具有关系性,需要通过比较原始样本与反事实样本对来揭示。

为了解决这一痛点,本文作者引入了 REMI 这一自动化框架,用于定位、解释和缓解个体公平性缺陷。该方法受到形式化方法中循环不变式综合(loop-invariant synthesis)的启发,将反事实公平性建模为一个关系不变式发现问题,并通过双向约束来强制要求原始样本与反事实样本对产生完全一致的结果。REMI 能够利用数据对齐技术推导出可解释的规则,作为“公平性不变式”安全护栏,在无需重新训练模型的情况下有选择性地拦截或重新标记不公平的预测。实验表明,该方法在定位真实公平性缺陷方面的准确率超过 83%,并将黑盒模型中的歧视性决策降低了多达 70%。


arXiv 标识符: arXiv:2608.26209 [cs.SE]
发布/提交时间: 2026年8月26日
会议: 第35届 ACM SIGSOFT 软件测试与分析国际研讨会 (ISSTA 2026)
作者: Ranit Debnath Akash, Ashish Kumar, Gang Tan, Saeid Tizpaz-Niari


📌 摘要与总结

Data-driven software systems deployed in high-stakes domains (such as criminal justice and financial lending) often suffer from individual discrimination—where programs yield unjustified disparate outcomes for similar individuals differing only in protected attributes (e.g., race, gender, age).

Current explanation techniques typically evaluate single-input decisions rather than the relational nature of discrimination, which requires comparing original and counterfactual pairs. To address this, the authors introduce REMI, an automated framework for localizing, explaining, and mitigating individual fairness bugs: * Relational Invariant Discovery: Frames counterfactual fairness as a relational invariant synthesis problem inspired by formal methods. * Bidirectional Constraints: Enforces strict identical outcomes for both original and counterfactual sample pairs \((x, x')\). * Interpretable Rule Generation: Utilizes data-alignment techniques to infer "fairness invariants" that act as guardrails to selectively block or relabel unfair predictions without requiring model retraining. * High Performance: Demonstrates success in localizing ground-truth fairness bugs in over 83% of cases and reducing discriminatory decisions in black-box models by up to 70%.

部署在刑事司法和金融信贷等高风险领域的数据驱动软件系统,经常遭受个体歧视的困扰——即对于仅在受保护属性(如种族、性别、年龄)上有所不同的相似个体,程序会产生不合理的差异化结果。

当前的解释技术通常评估单输入决策,而未能捕捉歧视的关系本质,因为后者需要对比原始样本与反事实样本对。为了解决这一问题,作者引入了 REMI,这是一个用于定位、解释和缓解个体公平性缺陷的自动化框架: * 关系不变式发现: 受形式化方法的启发,将反事实公平性构想为一个关系不变式综合问题。 * 双向约束: 对原始样本与反事实样本对 \((x, x')\) 强制执行严格一致的结果要求。 * 可解释规则生成: 利用数据对齐技术推断出“公平性不变式”,作为护栏有选择地拦截或重新标记不公平的预测,而无需对模型进行重新训练。 * 高性能: 在超过 83% 的情况下成功定位了真实的公平性缺陷,并将黑盒模型中的歧视性决策减少了多达 70%。


📑 元数据与参考链接


🔍 摘要

Data-driven software systems are increasingly deployed in high-stakes socio-economic domains, from criminal justice to financial lending. However, these systems often exhibit individual discrimination—unjustified disparities in which a program yields different outcomes for similar individuals who differ only in their protected attributes (e.g., race, gender, age). While existing research has focused on detecting and quantifying these bugs, there remains a critical lack of principled mechanisms to explain and localize individual fairness bugs. Current explanation techniques are largely designed for single-input decisions rather than the relational nature of discrimination, which inherently involves a comparison between an original and a counterfactual pair.

We present REMI, a framework for the automated localization, explanation, and mitigation of individual discrimination. Inspired by loop-invariant synthesis in formal methods, we treat counterfactual fairness as a relational invariant discovery problem. We introduce a bidirectional relational explanation framework that learns over paired examples \((x, x')\) to identify regions of the input space where fairness is violated. Unlike traditional one-way implication pairs used in invariant inference, our approach enforces bidirectional constraints: requiring identical outcomes for both original and counterfactual samples. REMI utilizes three data-alignment techniques to infer interpretable rule-based models that act as "fairness invariants." These rules serve as guardrails to selectively block or relabel unfair predictions without requiring model retraining. Our evaluation on symbolic and neural network programs demonstrates that REMI localizes ground-truth fairness bugs in over 83% of cases, significantly outperforming state-of-the-art baselines and reducing discriminatory decisions in black-box models by up to 70%.

数据驱动的软件系统正日益被部署在从刑事司法到金融信贷等高风险的社会经济领域中。然而,这些系统往往表现出个体歧视——即程序对仅在受保护属性(如种族、性别、年龄)上有所不同的相似个体产生不合理的差异化结果,从而导致不公平。尽管现有研究主要集中在检测和量化这些缺陷上,但目前仍然严重缺乏用于解释和定位个体公平性缺陷的有原则的机制。当前的解释技术主要针对单输入决策设计,而未能契合歧视本身具有的关系性质,因为歧视本质上涉及原始样本与反事实样本对之间的比较。

我们提出了 REMI,这是一个用于自动定位、解释和缓解个体歧视的框架。受形式化方法中循环不变式综合的启发,我们将反事实公平性视为一个关系不变式发现问题。我们引入了一个双向关系解释框架,该框架通过成对样本 \((x, x')\) 进行学习,以识别输入空间中违反公平性的区域。与传统不变式推理中使用的单向蕴含对不同,我们的方法强制实施双向约束:要求原始样本和反事实样本具有完全一致的结果。REMI 利用三种数据alignment(数据对齐)技术来推断可解释的基于规则的模型,这些模型充当“公平性不变式”。这些规则可作为安全护栏,有选择性地拦截或重新标记不公平的预测,而无需重新训练模型。我们在符号程序和神经网络程序上进行的评估表明,REMI 在超过 83% 的情况下成功定位了真实的公平性缺陷,显著优于当前最先进的基线,并将黑盒模型中的歧视性决策减少了多达 70%。