Permutation feature importance

Also known as: PFI

On this page 7

Permutation feature importance (PFI) is a model-agnostic method that scores each input feature by how much a trained model’s performance drops when that feature’s values are randomly shuffled. In Explainable AI, it is one of the most widely used global explanation techniques, because it needs only a fitted model, a dataset with labels and a performance metric.

The method was popularized by Leo Breiman for random forests and later generalized to any predictor. Its appeal lies in a direct, intuitive interpretation: a feature is important if the model gets noticeably worse once the information in that feature is destroyed.

How permutation feature importance is computed

The procedure starts with a baseline score of the model on a dataset, ideally a held-out validation set. For one feature at a time, the values in that column are randomly permuted across rows, which keeps the feature’s marginal distribution but breaks its association with the target and with the other features. The model predicts again, and the change in score is the importance.

  1. Compute the baseline metric, for example accuracy, AUC or mean squared error.
  2. Shuffle one feature column while leaving all other columns unchanged.
  3. Score the model on the permuted data and record the difference or ratio to the baseline.
  4. Repeat the shuffle 5 to 30 times and average the results to reduce randomness.
  5. Restore the column and continue with the next feature.

The model is never retrained during this process. That makes PFI cheap relative to drop-column importance, but it also means the scores describe this particular fitted model, not the true relationship in the data.

Choices that change the result

Several design decisions shape the importance values, and two analysts using the same model can obtain different rankings if they make different choices. The table summarizes the main parameters and their effects.

ParameterCommon optionsEffect on the scores
Evaluation dataTraining set or held-out setTraining data rewards overfitted features
MetricAccuracy, AUC, log loss, RMSEScale and ranking can differ by metric
Score changeDifference or ratioRatios suit metrics near zero poorly
Number of repeatsTypically 5 to 30More repeats narrow the uncertainty
GroupingSingle feature or feature groupGroups handle one-hot or correlated blocks
Key parameters of permutation feature importance

Held-out data is the recommended default. On training data, a model that memorized noise in a feature will show a large drop when that feature is shuffled, which reflects overfitting rather than genuine predictive value.

Comparison with other attribution methods

PFI answers a global question about model reliance, while many neighboring methods explain individual predictions. The comparison clarifies when each one fits.

MethodScopeRetraining neededMain strength
Permutation feature importanceGlobalNoSimple, metric-based, model-agnostic
Drop-column importanceGlobalYes, once per featureMeasures value of the feature to learning
Impurity-based importanceGlobal, trees onlyNoFree by-product of training
Shapley value methodsLocal and globalNoAdditive, consistent attributions
Partial dependence plotsGlobalNoShows shape of the effect
Permutation feature importance and related techniques

A key difference from impurity-based importance in tree ensembles is bias: impurity scores favor high-cardinality features such as identifiers, whereas PFI on held-out data largely avoids that bias. Unlike Shapley-based attributions, PFI does not say in which direction a feature pushes a prediction.

Correlated features and other pitfalls

The most serious weakness of PFI is its behavior with correlated features. Shuffling one feature of a correlated pair creates unrealistic data points, such as a person who is two meters tall but weighs 40 kilograms, and the model is then evaluated far outside the region it was trained on. The resulting scores can be inflated or misleading.

The opposite effect also occurs. When two features carry the same information, the model can rely on either, so each one may appear unimportant on its own even though removing both would be damaging. The table lists the common problems.

ProblemCauseRemedy
Importance split across twinsStrongly correlated featuresPermute correlated groups together
Extrapolation artifactsShuffled rows are implausibleUse conditional permutation schemes
Unstable rankingsToo few repeats or small dataReport mean and spread over repeats
Negative scoresFeature is noise for the modelTreat as near zero, not as harmful
Misread as causal effectPFI reflects model reliance onlyState the scope in every report
Common PFI problems and remedies

A further caution relates to the Rashomon effect: several equally accurate models may rely on different features, so a low PFI score for one model does not prove that the feature carries no signal in the data.

When to use permutation importance

PFI is most useful as a first global audit of a tabular model: it highlights which inputs drive performance, exposes data leakage when a suspicious feature dominates, and helps decide which features to monitor in production. Libraries such as scikit-learn, InterpretML and Captum offer implementations.

It is a poor fit when features are heavily correlated, when the dataset is very small, or when stakeholders need explanations for single decisions. In those cases, grouped permutation, conditional variants or local methods give a more faithful picture.

Good reporting practice is to show importance as a mean with a spread, such as a box plot over repeats, alongside the baseline metric and the dataset used. A feature whose interval overlaps zero should be described as not reliably important for the model, rather than ranked against features with clearly positive scores. Recomputing PFI after each retraining also reveals shifts in model reliance that may signal drift or a changed data pipeline.

A plain-language summary

Permutation feature importance asks a simple question. How much worse does the model get if one piece of information is scrambled? The method mixes up one column of data at random. Then it checks the model’s score again.

Imagine a quiz team that relies on its history expert. If that person starts giving random answers, the team score falls sharply. If the team barely notices, that person was not doing much. A big drop means the model truly depends on that input. It shows what the model uses, not what causes the real outcome.

An example from practice

A credit risk team at a regional lender trained a gradient boosting model on 120,000 past loan applications to predict default within 12 months. The validation AUC was 0.81, which seemed high for the available data, so the team ran permutation feature importance on a held-out set with 20 repeats per feature.

One feature, the number of days since the last account update, produced an AUC drop of 0.14, far larger than income or debt ratio. Investigation showed that accounts were updated when collections began, so the feature leaked the outcome into the inputs.

After removing it, validation AUC fell to 0.74, a realistic level, and the new ranking placed debt-to-income ratio and payment history at the top. The team avoided deploying a model that would have failed badly on new applicants.