What is a data slice?
A data slice is a meaningful subset of your data carved out by some attribute, for example all nighttime images, all small objects, or all samples from a particular sensor. Instead of asking how a model does overall, slicing asks how it does on each segment, which is where real weaknesses tend to hide.
Slices are typically defined using metadata or model outputs, and they turn a single score into a per-segment report card.
Key takeaways
- A slice is a subset defined by a shared attribute or condition.
- Per-slice evaluation exposes weaknesses hidden by aggregate metrics.
- Slices are usually defined via metadata or predictions.
How it works
You define a slice with a rule over metadata or labels, such as a class, a capture condition, or a size range, then compute metrics on just that subset. Comparing slice-level scores against the overall score highlights segments where the model underperforms, which then guides targeted data collection or fixes.
Why it matters
A model can post a strong average while failing badly on an important segment, and that failure only becomes visible when you slice. Slice-based evaluation is central to responsible model assessment and to a data-centric workflow, since it points precisely to which data needs attention.
Frequently asked questions
How is a slice different from a cluster?
A slice is defined by a known rule over attributes you choose, while a cluster is discovered automatically by grouping similar samples without predefined rules.
Why evaluate on slices instead of the whole dataset?
Because aggregate metrics average away segment-level failures. Slicing reveals where a model is weak so you can fix it.
Related terms