← All articles
Blog
November 14, 2026

Feature Importance in Machine Learning: A Practical Guide

Feature Importance in Machine Learning: A Practical Guide

Two scientists are staring at the same ranked list and disagreeing. The model was trained on eighteen months of formulation and test data, it predicts tensile strength well enough to screen candidates, and it says cure temperature matters more than compatibilizer dosage. The chemist who has spent a decade on this blend doesn't buy it. Neither of them is wrong yet, and that's the uncomfortable part.

A feature importance score is not a verdict. It's a compressed statement about how one model used one dataset, and it shifts when you change the model, the training rows, or the method that produced it. Read those numbers carefully and they'll tell you where to look next. Read them carelessly and they'll send you to the bench chasing a supplier code that only ever proxied a mixing change nobody recorded.

Table of Contents

Feature Importance Methods Compared at a Glance

Feature importance in machine learning is a score that shows how much a trained model's predictions depend on each input column. It describes how the model uses information under one dataset and one set of assumptions, not how the physical world behaves.

Six methods cover most of what shows up in a materials R&D project. Read each row across: scope tells you whether the score applies to the whole dataset or to a single prediction, the middle columns tell you what you can apply it to, and the pitfall tells you how it fails.

MethodScopeWorks WithWhat It MeasuresMain Pitfall
Linear coefficientsGlobalLinear and logistic modelsChange in output per unit of a standardized inputMisleading when features are correlated or left unscaled
Impurity importance (Gini or MDI)GlobalTree ensemblesTotal impurity reduction from splits on the featureFavors continuous and high-cardinality features
Permutation importanceGlobalAny fitted modelDrop in model score after shuffling one featureShuffled values can create unrealistic combinations
SHAPGlobal and localAny model; fast exact version for treesContribution of each feature to each predictionDepends on the background data and feature dependence
LIMELocalAny modelWeights of a local linear surrogate around one predictionResults change with sampling and kernel width
Gain importance (XGBoost, LightGBM)GlobalBoosted tree modelsLoss reduction from splits on the featureRanks frequently used features, not necessarily useful ones

The three questions that choose the method

Ask what model type you're using, whether the question is dataset-wide or about one prediction, and whether your inputs are correlated. The first answer narrows the field: a linear model has coefficients, a boosted ensemble has gain and TreeSHAP, a black-box neural network needs permutation or LIME. The second answer sets the scope. The third answer decides how much weight the ranking deserves at all, because correlated inputs make every method split credit in its own arbitrary way.

A polymer team modeling tensile strength from six inputs will watch ingredient ratio and cure temperature swap places depending on the method. Impurity importance tends to push ingredient ratio up because it's continuous with many distinct values. Permutation importance pushes cure temperature up because shuffling it destroys more accuracy. SHAP on a tree model agrees with permutation on the top two and orders the rest differently. None of those three results is broken. They answered different questions.

The ranking isn't a property of the material. It's a property of the question, and the method has to be chosen before the ranking is read.

What Coefficients and Tree Scores Really Tell You

Bake the same cake twice, change one ingredient, taste the difference. That's the intuition behind every importance score: how far the outcome moves when one input moves. The methods differ in how they simulate that nudge, and each simulation carries its own distortion.

Coefficients and the units trap

A linear coefficient reports the change in output per unit change in one input, holding the others fixed. "Holding the others fixed" is where it breaks down when inputs are correlated. Units break it faster: if tensile strength is in MPa and plasticizer content is in percent, an unscaled model produces a plasticizer coefficient that dwarfs everything else purely because of magnitude. Standardize your inputs before you compare coefficients across features. The sign stays meaningful either way, and direction is often the most useful thing you'll get from a linear model.

Why impurity importance inflates some columns

Impurity importance, also called Gini importance or mean decrease in impurity, adds up how much each split on a feature reduced node impurity, averaged across the forest. It arrives free with training, which is why it ends up in slide decks without anyone asking how it was computed. Its bias is structural. A continuous feature offers many candidate split points, so trees split on it more often, so it accumulates more impurity reduction. High-cardinality categoricals behave the same way.

Say you fit a random forest to 1,200 formulation records and an experiment ID column slips into the feature matrix. Under impurity importance it can land third, ahead of a real process parameter, because it has hundreds of distinct values and the trees keep finding splits for it. Gain importance in XGBoost and LightGBM has a similar lean: it measures loss reduction from splits, so it rewards columns the boosting process used often rather than columns that correspond to levers a chemist can set.

Practical rule: Add one shuffled copy of a real column to every run. If a feature can't outrank that noise column, it hasn't earned a line in your report.

That single control catches most of the embarrassment impurity and gain importance produce, and it costs one extra column.

Permutation Importance and Why It Tracks Accuracy

Permutation importance asks a blunt question: how much worse does the model get when this column becomes useless? Start with what that looks like in practice.

An illustration explaining permutation feature importance by showing how shuffling a dataset column affects machine learning model accuracy.

The method was formalized in Leo Breiman's 2001 random forest paper, which introduced an out-of-bag permutation procedure tied directly to predictive performance. Each tree is evaluated on the observations it never saw in training, first with all values intact and then after one feature's values are randomly permuted. The importance is the increase in that tree's misclassification rate after permutation, averaged across the forest. A feature scores high when disrupting it costs real accuracy.

You can run the same test on any fitted model with a held-out set. Shuffle one column, score the model, record the drop, repeat five to ten times and average out the randomness. Two details decide whether the number means anything. Hold out the data first, because permutation on training rows measures memorization rather than generalization and inflates every score. Keep the model frozen, so you're measuring reliance, not retraining.

Correlated inputs split the credit

If two inputs carry overlapping signal, shuffling one leaves the other intact and the model barely suffers. Both features look unimportant even though the information matters. The fix is grouped permutation: shuffle the correlated block together, as one unit, and read the joint drop. Grouping by domain knowledge beats grouping by correlation threshold, because ingredients that are chemically constrained together belong in the same group regardless of what the matrix says.

Here is a short walkthrough of the shuffle in action.

Where shuffling invents impossible materials

Permutation assumes features are interchangeable. Formulations aren't. If your inputs include component fractions that must sum to 100 percent, shuffling the resin column produces rows describing mixtures that cannot exist, and the model's poor response to them reflects nonsense inputs rather than the resin's role. The same applies to a cure temperature paired with a catalyst loading in a fixed ratio, or a molecular weight tied to a synthesis route.

Say a viscosity model scores R-squared 0.91 on held-out batches. Shuffling filler loading drops it to 0.74, which is a large, believable loss. Shuffling a colour code moves it by almost nothing. That contrast is the useful output: one column carries predictive weight, the other doesn't. What you can't conclude is that a one-point change in filler loading shifts viscosity by any specific amount. The score is a loss in predictive accuracy, not an effect size in physical units.

Explaining Single Predictions with SHAP and LIME

A formulator asks why the model predicted 4.2 MPa adhesion strength for one specific formulation. A dataset-wide ranking can't answer that. Local explanation methods earn their place here, because the question moved from "what matters generally" to "what drove this number."

SHAP, introduced in Lundberg and Lee's 2017 paper, assigns each feature a contribution to an individual prediction using Shapley values from cooperative game theory. Each feature's value represents how far it moves the prediction from a baseline, averaged across the feature's possible coalitions. The contributions add up to the gap between the prediction and that baseline, which is why the explanations feel satisfying: the arithmetic closes.

For the 4.2 MPa case, cure temperature contributes +0.9 MPa against the baseline and plasticizer content contributes -0.4 MPa. The rest comes from four other inputs. A chemist can argue with those numbers one at a time, which is exactly the point.

Global and local are two views of one model

Average the absolute SHAP value of each feature across the dataset and you get a global ranking. Look at one row's contributions and you get a local explanation. The Lundberg and Lee paper also made the case for consistency: earlier attribution methods could report a feature as less important after you changed the model to rely on it more. Exact tree-based SHAP calculations, usually called TreeSHAP, made the correct version fast enough for gradient-boosted models.

The background data changes the answer. Shapley values are measured relative to a reference distribution, so explaining a formulation against the full historical dataset produces different numbers than explaining it against the last six months of production batches. Decide which reference is scientifically meaningful, then state it in the report.

What LIME does differently

LIME perturbs one sample, fits a simple weighted linear model around that neighborhood, and reports the surrogate's weights as the explanation. It works on any model, including ones you can't inspect. It's also unstable: change the random sampling or the kernel width and the weights move. If you use it, run it with several seeds and only trust features that survive all of them.

A comparison chart explaining the difference between SHAP and LIME for interpreting single machine learning predictions.

The selection rule is straightforward. Use SHAP when you have tree or ensemble models and need global and local views from the same framework. Use LIME when the model is opaque, the question is local, and a quick sanity check is enough.

Regulated industries have already worked through the documentation side of this problem. Banking supervisors demanded per-decision reasoning long before materials labs did, and Visbanking's explainable AI in banking overview shows how institutions record model reasoning at the level of an individual decision, which is the same reporting discipline a formulation explanation needs.

Where Importance Rankings Mislead You

The most common misreading is one sentence long: the model says this input is important, therefore raising it will raise the property. That conclusion doesn't follow, and recent methodological work shows how quickly the reasoning breaks. Work on spurious attributions demonstrates that even a simple two-feature setting can produce misleading explanations through collider bias and suppression, with an association that can disappear or reverse once the analysis shifts from observational to causal framing.

Three failure modes account for most bad reads.

Correlated variables split credit. Two ingredients dosed together, or a process temperature that always tracks line speed, will divide their shared contribution arbitrarily. A genuine driver can look weak because its partner absorbed the signal.

Proxies absorb unrecorded changes. A catalyst brand ranks high in a model of cure performance. Dig into the batch records and the switch to that supplier coincided with a longer mixing time nobody logged as a variable. Change the brand alone at the bench and the effect vanishes, because the brand was never the cause.

Measurement artifacts look like material effects. A test protocol updated mid-campaign, a new operator on the tensile rig, or a calibration drift on the rheometer all enter the dataset as shifts the model dutifully attributes to whichever feature changed at the same time.

A causal diagram drawn with the people who ran the experiments is the cheapest defense. Ask which arrows are physically plausible, then check whether the model's top features sit on them.

A short checklist before you trust a rank

  • Draw the causal graph with process and formulation experts, and mark which variables the team can set.
  • Add the noise column as a negative control in every run, the same shuffled column from your permutation check, and discard anything that can't beat it.
  • Demand a mechanism for each top driver, in one sentence a chemist would accept.
  • Test the lever in a small controlled run that changes only that variable, before any formulation change.

When credit splits between two variables, report the uncertainty instead of a single ordered list. Two drivers sharing credit is a finding, and it points to a grouped experiment rather than a choice between them.

Validating Importance Across Batches and Shifts

A ranking that survives a random split can still fail the moment a new supplier lot, season, or line enters the data. Separate two failures before trusting any score. Predictive drift is accuracy dropping on new batches. Explanatory drift is quieter: predictions still look acceptable while the model's reasons move, so the dashboard stays green and the formulation team walks toward the wrong lever.

Treat each importance score as a hypothesis with three gates: agreement across method families, stability across batches and subgroups, and a controlled run that changes only that variable. The first two gates are where most rankings fail. A 2026 reliability study reports that explanation reliability can degrade while predictive performance stays high, and cites a climate-science comparison where global SHAP rankings from feed-forward neural networks and XGBoost agreed at 82 percent of monitoring stations and disagreed at 18 percent. In materials terms, that is enough model-dependent uncertainty to keep a top-ranked plasticizer or cure temperature in the hypothesis column until it survives the audit.

A diagram illustrating the process for validating feature importance across different data batches and model shifts.

Run the audit in this order.

  1. Freeze the model and split by batch. Hold out entire campaigns, suppliers or plants rather than random rows, so the holdout looks like the next production period.
  2. Score each subgroup separately. Compute importance per supplier, season, scale and production line, then compare the shortlists side by side.
  3. Put intervals on every score. Bootstrap by resampling batches, refit, and rank features each time so a narrow margin cannot masquerade as a clear winner.
  4. Run a second model family. Compare a neural network against gradient-boosted trees on the same data, because agreement across different learning biases is stronger evidence than a high score from one algorithm.
  5. Recompute on the newest batches. Attribution order should hold while accuracy stays acceptable.
  6. Label each driver as stable, conditional or unstable, and let only the first category drive decisions.
CheckHow to Run ItStable Result Looks Like
Batch-split holdoutFreeze the model and split by batch or campaign, not at randomAccuracy holds on unseen batches
Subgroup auditCompute importance separately per supplier, plant, season or scaleThe same top three drivers appear in most subgroups
Bootstrap intervalsRefit on resampled batches and rank features each timeTop drivers keep non-overlapping intervals
Cross-model agreementCompare rankings from neural networks and gradient-boosted treesBoth families agree on the top drivers, with disagreement flagged
Recent-batch shift testRecompute importance on the most recent held-out batchesAttribution order holds while accuracy stays acceptable
Driver classificationSort each driver using the checks aboveEach driver is labelled stable, conditional or unstable

The deliverable is a stability profile per driver: its label, its interval, the subgroups where it held, and the controlled run still owed. When screening turns into formal validation, keep the same audit trail discipline described by a quality assurance guide for device makers: record the frozen model, batch split, settings and outcome so the result can be checked later.

Using Importance to Plan the Next Formulation Experiments

A ranking is only useful if it changes what happens at the bench next week. Sort the output into two buckets. Predictive drivers are variables the model leans on, which may include supplier codes, batch identifiers or test dates. Controllable levers are inputs the team can set on purpose: dosage, mixing speed, cure temperature, molecular weight target. Only the overlap is worth an experiment.

That distinction reshapes the next design. Instead of a broad screen across eight factors, hold the six that nothing points to at their current values and vary two. Fewer conditions, more replicates, and a result you can attribute.

Interactions deserve their own check. Two ingredients can be irrelevant alone and decisive together, and a model with interaction terms or a synergy analysis will flag those pairs. Test the pair as a pair. A one-factor-at-a-time design will miss it every time.

Microstructure features belong in the same loop. Particle size distribution percentiles, dispersion scores read from electron micrographs, or domain sizes extracted from scattering data can all enter the model as inputs, and their importance tells you whether imaging is worth the lab time for a given property. If a dispersion score ranks near the bottom for tensile strength and near the top for conductivity, that's a decision about where to spend characterization effort.

Say a polymer blend model uses six inputs and the stable top two are compatibilizer dosage and mixing speed. The next design varies those two, adds a centre-point control to detect curvature, and keeps the other four fixed. Six runs instead of the twenty-four a full factorial would demand, and the answer speaks directly to the model's claim.

The ranking tells you where to look first, not what the final recipe should be.

Confirm Top Drivers Before You Change the Formulation

Act on a driver only when it passes three gates, in order.

Gate one is agreement across method families. The feature ranks in the top group under at least two methods, for example permutation importance and SHAP on the same tree model. One method alone is a hint.

Gate two is stability. The same feature keeps its rank in most subgroups and in the most recent batches, with bootstrap intervals that don't collapse to noise. A driver that only appears when the whole dataset is pooled is conditional at best.

Gate three is a controlled experiment. A small run that changes only that variable shows a measurable effect in the predicted direction. Until then, the driver is a hypothesis with a good reputation.

A driver that fails any gate stays on the hypothesis list. It doesn't enter a formulation change, and it doesn't get written into a specification.

The next step is small enough to finish this month. Pick the two highest stable levers, design a verification run with a centre-point control and one repeat at the centre, and record the measured result next to the model's predicted value. If the measured shift falls inside the prediction interval, the lever moves to the approved list. If it doesn't, it goes back to the hypothesis list and the model gets a closer look.

Every Polymerize AI recommendation comes with feature importance, confidence scores and historical precedents that scientists can verify. Polymerize Labs shows feature attribution maps, causal pathway analysis and confidence scoring, so each prediction arrives with its contributing factors and similar historical experiments rather than a bare number. That's the difference between a ranked list and a driver your team can defend in a technical review.


The three-gate workflow above is what Polymerize Labs is built to support. Its 35+ domain-guided models predict material properties, optimize formulations and explain the science behind each recommendation, with feature attribution maps and causal pathway analysis attached to every prediction so your team can check a driver's agreement and stability before committing bench time. Bring your historical formulation and test data to Polymerize and see which drivers survive the gates on your own materials.

Put your R&D data to work

See how materials teams use Polymerize to plan fewer experiments and reach target properties faster.