03 / Independent work by Kush Rishi

Model Regression Forensics

What changed between two classifier releases?

In brief

Import saved predictions, compare model versions and inspect changed cases in a local HTML report. A separate study investigates why a newer model makes errors that an older version avoided.

Model Regression ForensicsHTML report
Detail of the classifier report showing the filter controls and eight changed predictions
Eight of 1,969 predictions changed while overall accuracy stayed the same: three new errors, three corrections and two changes between incorrect labels. Banking77: PolyAI, Casanueva et al. (2020), source, CC BY 4.0. Case selection, predictions and grouping were added for this example. Example details.

The question

The application compares saved predictions and checks declared release requirements. A separate research study asks whether a diagnostic ranking can identify the training change responsible for a regression. A successful repair does not necessarily identify a unique cause.

Release comparison software

I implemented the prediction importer, identity checks, slice-policy comparison, supplied-repair assessment and local HTML report. The retained example contains 1,969 cases: eight labels change, including three new errors and three corrections, while the candidate still passes its declared policy. Repairs are unevaluated in this example.

python -m pip install .
mrf-import examples/deployment_comparison/policy.json examples/deployment_comparison/predictions.csv deployment-investigation

From a checkout with Python 3.12 or later, use a new output directory and open its index.html. The example needs no model training or report server.

Walkthrough · Architecture

Study design

The study deliberately changed training labels in a banking-intent classification dataset (Banking77), so the responsible change was known for scoring. These are constructed tests, not observed production failures. Two benchmarks contain five matched label-swap candidates each. A third-party DistilBERT classifier was trained across three paired trajectories per benchmark. Rankings were finalized before truth scoring.

  1. 01Construct candidate changes and paired model releases
  2. 02Rank candidates without planted truth
  3. 03Finalize rankings and evaluate

The comparison includes random ranking, shared target labels, word overlap (lexical Jaccard), and two gradient-based methods for ranking influential training examples: Grad-Dot at the final checkpoint and TracIn across seven checkpoints. Repeated training trajectories are not additional independent benchmarks.

Research results

Label overlap and lexical similarity ranked the planted change first in both benchmarks. Grad-Dot and TracIn ranked it first in one and fifth in the other. The random reference ranked it third in each.

In these two benchmarks, model-based diagnostics did not improve on the label-overlap baseline at rank one. Known target labels and disjoint candidate pairs provide a semantic shortcut for the simple baseline.

Banking77Two constructed benchmarks

Simple baselines found
both planted changes.

Training changeBaseline → retrained model
EvaluationRank five candidate changes
Separate repair exampleTwo repairs → same predictions
Rank of the planted training change. 1 is best; 5 is last.
DiagnosticBenchmark ABenchmark B
Label overlap11
Lexical similarity11
Grad-Dot15
TracIn15
Random reference33

The constructed labels give simple baselines a shortcut. Repeated training runs are not additional independent benchmarks.

Ambiguous repairs

A separate deterministic example restores identical predictions in two ways: correcting feature order or reversing model weights. The report returns ambiguous_repairs and leaves the historical cause not_identified. Passing a policy is not proof of a unique cause.

Limitations

Two constructed settings are a narrow basis for inference. The project does not establish general causal identification, superiority to attribution methods, statistical significance from policy thresholds, or independent-user benefit. No peer-reviewed publication is claimed.

Experiment history

Earlier unsuccessful tasks, confounds and competing repairs remain in the experimental history.

Reproducibility

uv sync --extra dev
uv run ruff check .
uv run ruff format --check .
uv run pytest

Saved-result replay checks aggregation and truth scoring without retraining. It does not regenerate original checkpoints or scores. Optional research dependencies are documented separately.

Current scope

The comparison tool is in maintenance and the research study is complete. Its usefulness to independent users has not been evaluated.