Skip to content
Back to skills

Diagnosing Ml Failures

ASecurity

Isolate the root cause of ML performance drops, inconsistent evaluations, prediction errors, and training-serving mismatches across data, labels, splits, pipelines, models, metrics, and runtime behavior. Use when investigating a reproducible failure or regression, not routine model selection or general performance validation.

  • 30 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 8, 2026
ai-agentsgoperformance

Security analysis

A100/100

Scanned November 8, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill diagnosing-ml-failures --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagnosing Ml Failures?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diagnosing Ml Failures
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-diagnosing-ml-failures/badge)](https://www.skillsdirectory.com/skills/majiayu000-diagnosing-ml-failures)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diagnosing-ml-failures
description: Isolate the root cause of ML performance drops, inconsistent evaluations, prediction errors, and training-serving mismatches across data, labels, splits, pipelines, models, metrics, and runtime behavior. Use when investigating a reproducible failure or regression, not routine model selection or general performance validation.
---

# Diagnosing ML Failures

Turn a vague failure into a minimal, testable discrepancy and isolate the first layer where expected and observed behavior diverge. Do not begin with hyperparameter tuning: it can hide the fault while destroying causal evidence.

## Define the symptom

Capture one concrete failing example or comparison:

- expected versus observed behavior;
- first known bad and last known good run, version, or time window;
- affected population and unaffected control population;
- metric implementation, threshold, and aggregation level;
- exact input, artifact, code revision, configuration, and environment when available.

Reproduce the symptom through the smallest stable entry point. If it is intermittent, estimate frequency and identify what varies between runs before changing the system.

## Isolate the first broken layer

Trace the same records through boundaries in causal order:

1. **Source and semantics:** extraction window, identifiers, units, timestamps, schema, missingness, duplicates, and joins.
2. **Ground truth:** label definition, observation window, reviewer process, label delay, drift, and adjudication.
3. **Split and sampling:** entity overlap, temporal leakage, cohort shift, weighting, and deduplication.
4. **Feature pipeline:** availability time, fit/transform state, ordering, encoding, defaults, and training-serving parity.
5. **Model artifact:** weights, feature contract, class order, preprocessing bundle, and artifact version.
6. **Metric and decision logic:** denominator, grouping, threshold, calibration, exclusions, and business-cost mapping.
7. **Runtime and delivery:** dependency versions, hardware nondeterminism, caching, serialization, concurrency, and response postprocessing.

Compare invariants at each boundary - row counts, key uniqueness, hashes, distributions, schemas, representative record traces - and stop at the earliest divergence. Downstream differences may be consequences, not causes.

## Test competing hypotheses

Maintain multiple plausible hypotheses until evidence distinguishes them. For each hypothesis, define a discriminating test whose outcomes differ between explanations. Prefer controlled swaps and minimal counterfactuals:

- old data with new code versus new data with old code;
- frozen artifact through offline and online pipelines;
- known-good records before and after one transformation;
- recomputed metric from raw predictions versus reported metric;
- independently adjudicated error sample versus existing labels.

Change one explanatory variable at a time where practical. Preserve all failed tests and negative results in a rejected-hypothesis log; they prevent repeated work and constrain future explanations.

## Treat ground truth as a suspect, not an oracle

When apparent model failures may be annotation errors or ambiguous cases, sample errors without cherry-picking. Obtain independent human review only when an authorized reviewer and an approved data-sharing path are available; otherwise specify the review needed without transmitting records. Keep original labels, reviewer decisions, disagreements, and adjudication separate. A corrected label may explain an example without proving the model is correct for the population.

## Close with proof, not plausibility

A diagnosis is complete only when the proposed cause predicts the symptom and an authorized, isolated, reversible intervention removes it without breaking an appropriate control. Verify at the same scope as the original failure: fixing one example does not prove a population regression is resolved. Diagnose and propose a fix by default; modify or deploy the real system only when the user requested that additional action.

Use [assets/failure-investigation-log.md](assets/failure-investigation-log.md) to preserve observations, experiments, rejected hypotheses, root-cause evidence, and regression coverage. For detailed layer probes and controlled isolation patterns, read [references/failure-isolation.md](references/failure-isolation.md).

If several layers remain plausible, report the narrowed boundary, remaining hypotheses, and next discriminating test. Do not label the most intuitive explanation as root cause.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.