> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.umnai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.umnai.com/_mcp/server.

# Module and feature importance

Module and feature importance use attributions to interpret an Umnai model at a global level.

They summarise attribution values across a dataset or segment, making it easier to see which parts of the model have the largest average effect on predictions.

## Module importance

Module importance ranks XNN modules by their global contribution.

An [XNN](../../explainable-neural-net-xnn) is composed of modules. Each module represents either a feature or a feature interaction. Module importance uses module attributions to show which modules have the largest impact, on average, across the whole dataset or a selected segment.

This helps answer questions such as:

| Question                                          | Example                                                     |
| ------------------------------------------------- | ----------------------------------------------------------- |
| Which model components matter most overall?       | Rank modules by average absolute attribution.               |
| Which interactions are most influential?          | Compare interaction modules against single-feature modules. |
| Does a segment rely on different model behaviour? | Compare module importance for one segment against another.  |

The calculation uses the mean of the absolute value of module attributions across the dataset or segment of interest.

The sign of the attribution is ignored for importance. This means a module can be important whether it usually increases or decreases predictions.

![Module importance plot](https://files.buildwithfern.com/umnai.docs.buildwithfern.com/fa1ed4fdc1aceba95ac9befa85f502321ccf2fdb9d9a11fdab8a0a0c3444f668/assets/images/module-importance-plot.png)

## Feature importance

Feature importance ranks individual input features by their global contribution.

A feature can affect a prediction directly through its own module, and indirectly through interactions with other features. To account for both, the calculation uses attribution [decompositions](../../explainable-neural-net-xnn#decompositions), which allocate interaction effects back to the features involved.

The result is a feature-level view of impact across the whole dataset or a selected segment. It shows which input features have the largest average effect on predictions, regardless of whether those effects come from direct feature behaviour, interaction behaviour, or both.

The calculation takes the mean of the absolute value of decomposed module attributions across multiple data rows, then groups those values by feature.

![Feature importance plot](https://files.buildwithfern.com/umnai.docs.buildwithfern.com/29bc71557941ebedcb05dae691a39205f1d1e83975850b27a89c54e50eff67f4/assets/images/feature-importance-plot.png)

## Module importance compared with feature importance

Module importance and feature importance answer related but different questions.

| Explanation        | Unit of analysis                                    | Best for                                                          |
| ------------------ | --------------------------------------------------- | ----------------------------------------------------------------- |
| Module importance  | Modules, including feature interactions.            | Understanding which model components or interactions matter most. |
| Feature importance | Individual features, using decomposed attributions. | Understanding which input features matter most overall.           |

Use module importance when you want to see the model's structure and the effect of feature interactions.

Use feature importance when you want a feature-level summary that aggregates direct and interaction effects back to individual features.

## Segment-level importance

Both module importance and feature importance can be calculated for the whole dataset or for a data segment.

Segment-level importance is useful when the model behaves differently for different groups of data. Comparing importance across segments can show whether a feature, interaction, or module matters more in one region of the data than another.