Discretizing raw features into bucketized attribute representations is a popular step before sharing a dataset. It is, however, evident that this step can cause significant bias in data and amplify unfairness in downstream tasks. In this paper, we address this issue by introducing the unbiased binning problem that, given an attribute to bucketize, finds its closest discretization to equal-size binning that satisfies group parity across different buckets. Defining a small set of boundary candidates, we prove that unbiased binning must select its boundaries from this set. We then develop an efficient dynamic programming algorithm on top of the boundary candidates to solve the unbiased binning problem. Finding an unbiased binning may sometimes result in a high price of fairness, or it may not even exist, especially when group values follow different distributions. Considering that a small bias in the group ratios may be tolerable in such settings, we introduce the epsilon-biased binning problem that bounds the group disparities across buckets to a small value epsilon. We first develop a dynamic programming solution, DP, that finds the optimal binning in quadratic time. The DP algorithm, while polynomial, does not scale to very large settings. Therefore, we propose a practically scalable algorithm, based on local search (LS), for epsilon-biased binning. The key component of the LS algorithm is a divide-and-conquer (D&C) algorithm that finds a near-optimal solution for the problem in near-linear time. We prove that D&C finds a valid solution for the problem unless none exists. The LS algorithm then initiates a local search, using the D&C solution as the upper bound, to find the optimal solution.
翻译:将原始特征离散化为分箱属性表示是数据集共享前的常用预处理步骤。然而,这一步骤可能导致显著的数据偏差并加剧下游任务的不公平性。本文通过引入无偏分箱问题来解决这一挑战:在给定待分箱属性的条件下,寻找满足跨箱组别均衡约束且最接近等宽分箱的离散化方案。通过定义小规模边界候选集,我们证明了无偏分箱的边界必须从该集合中选取。基于边界候选集,我们设计了高效的动态规划算法以求解无偏分箱问题。在某些情况下,无偏分箱可能导致较高的公平性代价,甚至不存在可行解——这在组别数值遵循不同分布时尤为显著。考虑到实际场景中可容忍微小组别比例偏差,我们进一步提出ε-有偏分箱问题,将跨箱组别差异约束在较小值ε范围内。首先,我们设计了动态规划算法DP,该算法可在二次时间内找到最优分箱方案。虽然DP算法具有多项式复杂度,但难以扩展到超大规模场景。为此,我们提出基于局部搜索的实用可扩展算法LS来解决ε-有偏分箱问题。LS算法的核心是分治算法D&C,该算法能以近线性时间找到问题的近似最优解。我们证明除非问题无解,否则D&C总能找到有效解。LS算法随后以D&C解为初始上界,通过局部搜索迭代寻找最优解。