Slice-Based & Subgroup Evaluation
Why evaluating global aggregate metrics masks severe model failures on critical sub-populations and demographic slices.
Simpson's Paradox & The Aggregate Fallacy
A model can show improving global metrics while simultaneously degrading across every individual subgroup:
GLOBAL AGGREGATE METRIC: 92% ACCURACY
┌─────────────────────────────────────────────────────────────────────────────┐
│ Slice 1: High-End iOS Users (80% of data) ──► Accuracy = 96% (GREAT) │
│ Slice 2: Low-End Android Users (15% of data) ──► Accuracy = 65% (POOR) │
│ Slice 3: New Un-onboarded Users (5% of data) ──► Accuracy = 42% (CRITICAL) │
└─────────────────────────────────────────────────────────────────────────────┘
Relying on the 92% aggregate metric masks the fact that the product is failing 100% of new users and low-end devices!
Taxonomies of Critical Slices
- User Demographics & Fairness: Age, gender, ethnicity, location, income bracket.
- Device & Environment: OS version, low-memory hardware, network speed (3G vs 5G), night vs day.
- Data Distribution Tail: Rare item categories, high-value VIP customers, long-tail search queries.
- Temporal Slices: Peak holiday traffic, weekend vs weekday, post-app release cohorts.
Automated Slice Discovery (SliceFinder)
Instead of manually guessing slices, automated slice-finding tools (e.g. SliceFinder, Anchor, TensorFlow Data Validation) fit decision trees or clustering over feature spaces to locate feature intersections $(X_1 = a \land X_2 = b)$ with maximum metric drops relative to global baseline:
$$\text{Slice Score}(S) = \text{Size}(S) \cdot \left( \text{Metric}_{\text{global}} - \text{Metric}(S) \right)$$
Say this out loud
"Slice-based evaluation breaks down model metrics across critical sub-populations like hardware specs, user cohorts, and protected demographics. Global metrics mask severe failures on minority slices due to Simpson's paradox. In production, we define slice SLAs upfront, run automated slice discovery to locate high-error feature intersections, and enforce minimum performance floors per slice before deployment."
Follow-ups to expect
- How do you fix a underperforming slice without breaking overall performance? Add slice-specific sample weights during training, up-sample the failing slice, use multi-task learning with slice heads, or apply slice-specific decision thresholds.
- What is Min-Max Fairness Optimization? An optimization objective that maximizes the performance of the worst-performing subgroup slice: $\max_\theta \min_{s \in S} \text{Metric}(s; \theta)$.
Check yourself
Why is relying solely on global aggregate metrics (e.g. overall dataset F1 = 0.92) dangerous when deploying safety-critical ML models?