Metrics & Evaluation

Slice-Based & Subgroup Evaluation

Why evaluating global aggregate metrics masks severe model failures on critical sub-populations and demographic slices.

🟡 intermediate4 min readevaluationmust-know
Slice-Based Evaluation (Subgroup Analysis) evaluates model performance independently across critical data subsets (e.g. device types, user cohorts, rare categories). A model with 95% global accuracy may suffer a catastrophic 40% failure rate on low-end Android phones or minority demographic slices. Best practices require defining key slices upfront, running automated slicing frameworks (DataSlice, SliceFinder), and enforcing minimum performance floors per slice.

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

  1. User Demographics & Fairness: Age, gender, ethnicity, location, income bracket.
  2. Device & Environment: OS version, low-memory hardware, network speed (3G vs 5G), night vs day.
  3. Data Distribution Tail: Rare item categories, high-value VIP customers, long-tail search queries.
  4. 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

Check yourself

Question 1 of 3

Why is relying solely on global aggregate metrics (e.g. overall dataset F1 = 0.92) dangerous when deploying safety-critical ML models?

More in Metrics & Evaluation

See all →
Precision, Recall & F14 minWhy Accuracy Lies4 minROC-AUC vs PR-AUC4 min