Feature attribution
Feature attribution is a technique for estimating or assigning the contribution of individual input features to a model’s output.
Ensemble Methods for Machine Learning
Feature attribution is a technique for assigning portions of a model output to individual input features.
- How it is used
- Explains individual model predictions through local feature importance.
- How deep it goes
- Explains coalition-based contributions and practical TreeSHAP computation, without developing the full underlying mathematics.
- Examples
- Uses a team-prize coalition analogy, an XGBoost test prediction, and waterfall and force visualizations.
- What you can do after
- Apply it via SHAP and TreeSHAP to compute and visualize contributions for individual predictions.
Read how Ensemble Methods for Machine Learning explains feature attribution →
Transformers in Action
A feature attribution method assigns importance scores to input features to indicate their contribution to a model prediction.
- How it is used
- Uses feature importance scores to inspect, debug, and communicate how language-model predictions depend on input features.
- How deep it goes
- Explains perturbation, baselines, token visualization, templates, and LIME workflows, but does not derive attribution mathematics or algorithm internals.
- Examples
- Demonstrates generated interests, token heat maps, templated inputs, baseline comparisons, and sentiment explanations for a positive movie review.
- What you can do after
- Diagnose/debug with Captum or LIME by generating local feature scores, visualizing influential tokens, and evaluating model limitations.
Read how Transformers in Action explains feature attribution →
Related concepts
- SHAPincludes · SHAP is a feature-attribution method that explains model outputs by assigning input features contributions based on Shapley values.
- LIMEincludes · LIME is a model-agnostic explanation technique that approximates a model near an individual input with an interpretable surrogate to explain its prediction.
- attributionkind of · Attribution is the association of content, contributions, decisions, or outcomes with their sources, creators, or causes.
- interpretabilityused by · Interpretability is the degree to which people can understand a model’s behavior, outputs, predictions, or the factors that produce them.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

