Maximum Subgroup Discrepancy (MSD)
- Maximum Subgroup Discrepancy (MSD) is a measure that detects representation imbalances in protected subgroups by comparing differences in probability mass between two distributions.
- It employs interpretable conjunctions of binary protected attributes to identify specific intersectional groups with significant discrepancies.
- MSD is efficiently computed via mixed-integer optimization, offering finite-sample guarantees and explicit witness subgroups for bias detection and fairness auditing.
Searching arXiv for the cited MSD and related discrepancy papers to ground the article in the current literature. Maximum Subgroup Discrepancy (MSD) is a subgroup-focused, interpretable discrepancy for comparing two distributions with respect to protected attributes. In its concrete 2025 formulation, MSD asks which conjunction-defined protected subgroup has the largest difference in probability mass between two distributions, thereby targeting representation imbalance at the level of semantic or legally salient subpopulations rather than only at the level of global averages (Němeček et al., 4 Feb 2025). The notion is motivated by bias detection, data-quality auditing, and intersectional fairness auditing, and it is explicitly designed for settings in which the number of candidate subgroups is exponential but the analyst still wants finite-sample guarantees and an explicit witness subgroup.
1. Motivation and problem setting
The primary setting is distribution comparison. One has two distributions
and the objective is to quantify whether some protected subgroup is represented differently across them. The motivating examples are data-quality auditing, where a dataset is compared against a trusted reference distribution, and model-output fairness auditing, where one compares the feature distributions of predicted classes such as and (Němeček et al., 4 Feb 2025).
The central critique of standard global distances in this setting is twofold. First, the relevant signal is often subgroup-local rather than global: one wants to know whether there exists a protected subgroup whose mass differs substantially between the two distributions. Second, the paper argues that classical distances such as Total Variation and Wasserstein can be statistically too expensive to estimate in high-dimensional protected-feature settings, especially when the number of protected-feature subgroups is exponential and many intersectional groups are small (Němeček et al., 4 Feb 2025).
The intended feature structure is explicit. Data points lie in , there is a distinguished set of protected attributes , protected attributes are treated as categorical, and for the main theory section they are assumed binary. The binary assumption is justified by preprocessing through quantization for continuous attributes and one-hot encoding for categorical attributes (Němeček et al., 4 Feb 2025).
| Distance notion | Sample complexity statement |
|---|---|
| Total Variation | |
| Wasserstein-2 | |
| MMD | |
| Maximum Subgroup Discrepancy | w.h.p. |
This comparison is the paper’s summary of worst-case behavior in Table 1. A plausible implication is that MSD is positioned less as a universal probability metric than as a task-specific discrepancy tailored to protected-feature subgroup auditing (Němeček et al., 4 Feb 2025).
2. Formal definition and subgroup language
In the formal development, protected attributes are binary. For and 0, the coordinate 1, and the negated literal is
2
The set of literals is
3
A term is a conjunction of literals. For a subset 4, the associated indicator is
5
The paper refers both to the literal set 6 and, by abuse of notation, to the corresponding region
7
as a subgroup. The set of all such subgroups is denoted 8 (Němeček et al., 4 Feb 2025).
This construction captures intersectional groups directly. A subgroup may specify only some protected features and leave others unspecified, so the search space includes single protected features, pairwise intersections, higher-order intersections, and partially specified combinations.
For a distribution 9 and function 0, the paper writes
1
Thus 2 is the probability mass of subgroup 3 under 4. The central one-sided definition is
5
In practical evaluation, the absolute-difference version is used: 6 The paper obtains this empirical form by solving the one-sided problem twice, once with labels as given and once with labels flipped (Němeček et al., 4 Feb 2025).
The introduction also presents a more general template,
7
which motivates a broader family of bias-detection distances. In the main instantiated version, the discrepancy is subgroup mass difference, one-sided in the theory section and absolute in empirical evaluation (Němeček et al., 4 Feb 2025).
The paper gives an equivalent classification view. If samples from 8 are labeled 9 and samples from 0 are labeled 1, then minimizing 0–1 classification error over conjunctions 2 is equivalent to maximizing
3
With flipped labels one obtains the reverse difference, which yields the absolute-discrepancy version. This equivalence is central to the optimization formulation (Němeček et al., 4 Feb 2025).
3. Statistical properties and metric status
The main theorem concerns empirical estimation. Given samples
4
with empirical distributions
5
and 6, the theorem states that with probability at least 7,
8
Equivalently, to achieve estimation error at most 9, one needs
0
The dependence is therefore linear in the number of protected features despite the exponential number of candidate subgroups (Němeček et al., 4 Feb 2025).
The reason is combinatorial rather than measure-theoretic. For each protected feature 1, a term may include 2, include 3, or include neither, so
4
The proof then uses a finite-class uniform concentration bound of the form
5
together with
6
since 7. The exponential class size does not produce exponential sample complexity because only its logarithm enters the bound (Němeček et al., 4 Feb 2025).
The paper also situates MSD between two classical notions on the protected marginal. The fully specified atomic cells are the base terms
8
with exactly 9 members. Define
0
and
1
Then
2
Accordingly, MSD is stronger than checking only the worst fully specified protected-value atom, because it also considers partially specified subgroups, but weaker than Total Variation, because it does not aggregate all atomic discrepancies through an 3-type sum (Němeček et al., 4 Feb 2025).
The paper is careful about metric status. The formally defined object
4
is not symmetric, so it is not a metric. The practical absolute version is symmetric and nonnegative, but the paper does not provide a full metric-proof discussion such as identity of indiscernibles or triangle inequality. It is therefore more precise to treat MSD as a distance-like discrepancy over a restricted function class (Němeček et al., 4 Feb 2025).
4. Computation through mixed-integer optimization
Although the sample complexity is favorable, the subgroup family is exponential. The computational solution proposed in the paper is a Mixed-Integer Optimization (MIO) formulation for conjunction search on empirical data (Němeček et al., 4 Feb 2025).
Let 5 index samples from 6, 7 index samples from 8, and 9. The MIO is
0
The variables have direct subgroup semantics. 1 indicates whether feature 2 is present in the conjunction, 3 indicates whether sample 4 belongs to the subgroup, 5 is the objective variable, and 6 linearizes the absolute-value objective. The objective maximizes
7
The paper notes that the difference of two means lies in 8, so a tight big-9 value of 0 suffices in the absolute-value constraints (Němeček et al., 4 Feb 2025).
The subgroup-membership constraints enforce conjunction semantics. Constraint
1
forces 2 if sample 3 violates any selected literal, and
4
forces 5 when all selected literals are satisfied. The paper remarks that 6 is effectively binary because of these constraints together with the binary nature of 7 and 8 (Němeček et al., 4 Feb 2025).
A minimum subgroup size constraint,
9
is included to prevent degenerate solutions on tiny, statistically unreliable subgroups. In experiments the paper sets
0
If all 1, the conjunction is empty and always true, so 2 for all samples; this corresponds to the trivial subgroup containing everyone (Němeček et al., 4 Feb 2025).
The paper emphasizes exactness rather than heuristic search. It compares MIO against Ripper and BRCG-light and reports that MIO “almost always finds the global optimum within 10 minutes,” with only a few exceptions on the largest or highest-dimensional datasets. This suggests that, for the studied sample sizes, exact conjunction search is practically feasible even though exhaustive enumeration of subgroups is not (Němeček et al., 4 Feb 2025).
5. Relation to adjacent discrepancy notions
MSD belongs to a broader family of max-over-subgroups discrepancy formulations. The most direct generalization in the fairness literature is Maximum Weighted Loss Discrepancy (MWLD),
3
which treats groups as measurable indicator functions and introduces a weighting function 4. In the summary provided for that work, MWLD is described as a strict generalization of MSD-style objectives, with equal-weight max subgroup disparity appearing as a special case and size-weighted versions yielding tractable estimation regimes (Khani et al., 2019).
A distinct but related line studies maximum discrepancy over geometric subgroup classes. “Computing Approximate Statistical Discrepancy” formulates
5
for geometric range spaces, with basic discrepancy
6
and more general scan-statistic objectives 7. In that literature, the subgroup is a geometric range such as a halfspace, disk, or axis-aligned rectangle; the problem is therefore a geometric analogue of maximum subgroup discrepancy rather than protected-feature conjunction search (Matheny et al., 2018). “Approximate Maximum Halfspace Discrepancy” specializes this viewpoint to halfspaces 8 and searches for
9
again with discrepancy defined through subgroup red/blue composition (Matheny et al., 2021).
By contrast, the kernel-testing literature summarized in “0-Sample problem based on generalized maximum mean discrepancy” studies a weighted aggregate of pairwise discrepancies,
1
which is explicitly characterized as an aggregate multi-group discrepancy rather than a worst-case subgroup discrepancy. GMMD is therefore structurally different from MSD: it assumes fixed groups and sums pairwise discrepancies instead of maximizing over a subgroup family (Balogoun et al., 2018).
In robustness and fairness evaluation for image classification, “Better May Not Be Fairer: A Study on Subgroup Discrepancy in Image Classification” does not define MSD by name, but it is explicitly described as conceptually aligned with MSD-style reasoning. Its central empirical lesson is that overall accuracy can hide large subgroup harms, and its proposed metric, MacroStd,
2
is presented as a complementary class-balanced dispersion measure rather than a max-based worst-subgroup statistic (Chiu et al., 2022).
Finally, “Set-Codes with Small Intersections and Small Discrepancies” studies worst-case discrepancy over a designed family of subsets under a common 3 labeling, with
4
That problem is not MSD in the protected-feature or distribution-comparison sense, but it is a combinatorial analogue of controlling maximum discrepancy over a structured family (Gabrys et al., 2019).
6. Empirical behavior, applications, and limitations
The empirical evaluation in the MSD paper uses 10 real-world datasets derived from the 2018 American Community Survey via Folktables. Five are standard Folktables tasks in California—ACSIncome, ACSPublicCoverage, ACSMobility, ACSEmployment, and ACSTravelTime—where the feature distributions of 5 and 6 are compared. Five are state-versus-state population comparisons—Hawaii vs Maine, California vs Wyoming, Mississippi vs New Hampshire, Maryland vs Mississippi, and Louisiana vs Utah—where protected-feature distributions are compared across state pairs (Němeček et al., 4 Feb 2025).
After preprocessing, the feature space is binary or categorical: continuous features are binned into 10 bins, some high-cardinality features are semantically grouped, the number of protected features ranges from 3 to 14, and the number of candidate subgroups ranges from about 7 to over 8. Exhaustive subgroup enumeration is therefore impossible in the studied regime (Němeček et al., 4 Feb 2025).
The baselines are Total Variation, Wasserstein-1, Wasserstein-2, MMD, Ripper, and BRCG-light. For MMD on categorical data the paper uses the overlap kernel
9
Each dataset is subsampled at five sizes in a geometric sequence from 1000 to the full sample size, each configuration is repeated with five random seeds, and each distance computation is given a 10-minute time limit (Němeček et al., 4 Feb 2025).
The reported findings are consistent with the theory. Total Variation and Wasserstein distances “do not converge quickly to the final value,” while MIO-based MSD is described as stable and useful at much smaller sample sizes. The paper concludes that MSD “requires exponentially fewer samples to obtain a good estimate of the true value of the distance” than TV and Wasserstein. MMD is reported as the closest competitor empirically in convergence and variability, but without the same subgroup-level interpretability. Among subgroup learners, MIO consistently finds the highest MSD value because it solves for the global optimum, whereas Ripper and BRCG-light show more variability and often return weaker subgroups (Němeček et al., 4 Feb 2025).
The main applications follow directly from the formulation: data-quality auditing against trusted reference distributions, model-output fairness auditing through subgroup representation imbalance between predicted classes, and intersectional bias detection over conjunction-defined protected groups. The witness subgroup is itself the diagnostic object, which the paper emphasizes as an interpretability advantage because it indicates where bias lives and therefore where intervention might be directed (Němeček et al., 4 Feb 2025).
Several limitations are explicit. The theory assumes binary protected attributes, so discretization or one-hot encoding is required and results depend on the chosen representation. The subgroup class is restricted to conjunctions of protected-value indicators; if relevant bias patterns are not well represented by conjunctions, MSD may miss them. The discrepancy probes only the subgroup family 00, not arbitrary measurable sets, so it is not a full distribution metric in the strongest sense. Optimization can still become hard on very large instances, and the appendix notes seed-to-seed variability that is plausibly related to the supremum structure. The broader MSDD framework is only sketched, with the paper developing mainly the subgroup mass discrepancy instantiation (Němeček et al., 4 Feb 2025).