Skip to content

Shortcut Hunt

You'll open up a trained model, find out which inputs drive its predictions, and catch it relying on something it shouldn't.

About

A model with a good score can still be right for the wrong reasons, and nobody tells you until it meets the case where the shortcut fails. Interpretation tools let you ask which features a model leans on and how one prediction was reached, and the answer is often a stand-in: a postcode doing the work of income, a timestamp doing the work of a season, a background doing the work of the thing in front of it. Take a model you've already trained in this track, or a new one on a free tabular dataset with at least ten features, and interrogate it. What counts is a feature ranking you computed by shuffling, explanations of individual predictions, one shortcut you found and tested by taking it away, and a model card you'd stand behind. Leaks, where a column is the answer in disguise, were Held-Out Test; this is the subtler kind.

At a glance

Per requirement
35 XP
Completion bonus
300 XP
Requirements
5
Takes
Two weekends
Skill level
Advanced (years of practice)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
On your own
Locked for now
Earn two more Uncommon badges in Machine Learning to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Rank the features by permutation importance, by hand. For each feature in turn, shuffle that column in the validation set, rescore, and record how much the score dropped. A feature that costs nothing when shuffled isn't being used. Do it with a loop rather than a library call the first time, so you see that it's just shuffling. Take a screenshot of the ranked list. Photo
  2. 2
    Plot how the prediction moves as you slide one top feature across its range. Hold the other features at a typical row, vary the top feature from its minimum to its maximum, and plot the model's output. Then do the same for a feature near the bottom of the ranking. A jagged or backwards-looking curve on an important feature is worth a hard look. Take a screenshot of the two curves. Photo
  3. 3
    Explain three individual predictions, including one wrong one. Use SHAP values, a local linear approximation, or your own shuffling on a single row to show which features pushed that one prediction up or down. Pick one confident correct prediction, one confident wrong one, and one near the threshold. Take a screenshot of the three explanations side by side. Photo
  4. 4
    Find a shortcut and score the model on rows where it can't use it. Take the feature you suspect is standing in for something else and build a slice of the validation set where it stops helping: rows where the proxy and the real signal point different ways, or the same rows with that one column shuffled or set to its median. Score the model on that slice next to its score on the rest. A drop of ten points or more means it learned the stand-in and not the thing. If your dataset has no obvious proxy, the public loan, housing and medical sets usually do. Take a screenshot of the two scores with the suspect feature named. Photo
  5. 5
    Write a one-page model card for the model you'd keep. What it predicts, what data it was trained on, the baseline and the score, the features it relies on most, who it would be wrong about and why, and one thing it must not be used for. Keep it plain and under 400 words. Post a screenshot of the card. Photo