> 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.

# Local explanations

Local explanations describe the prediction from an Umnai model for a query or batch of queries.

They answer the question:

> Why did the model produce this prediction?

A local explanation focuses on a specific data point while keeping a connection to the global structure of the [XNN](../../explainable-neural-net-xnn). It shows the prediction, the attributions that built it, the partitions and rules that activated, and the confidence-related signals associated with the prediction.

## Local explanation components

Local explanations include several components.

| Component                                                                   | Description                                                                                       |
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [Prediction](./predictions-and-attributions#prediction)                     | The model output for a query.                                                                     |
| [Module attributions](./predictions-and-attributions#module-attributions)   | Contributions from each feature or feature interaction module.                                    |
| [Feature attributions](./predictions-and-attributions#feature-attributions) | Contributions grouped by individual input feature.                                                |
| [Activations](./predictions-and-attributions#activations)                   | The path taken by a query through the model, including activated partitions and rules.            |
| [Decision action table](./decision-action-table)                            | A table that combines rules, attributions, decompositions, and activations for local explanation. |
| [Strengths and weaknesses](./strengths-and-weaknesses)                      | Strength and uncertainty measures for a prediction.                                               |
| [Context explanations](../context-explanations)                             | Comparative explanations, such as control swaps and nearest-neighbour analysis.                   |

## Predictions and attributions

Predictions are built from attributions.

For regression problems, the prediction is the sum of module attributions plus the model intercept. For classification problems, that sum is compared with a threshold to determine the predicted class.

Module attributions explain how much each module contributed to the prediction. Feature attributions group those contributions by individual feature, including decomposed contributions from interaction modules.

## Activations

Activations show the path taken by a query through the model.

For a given query, activation data identifies which [partition](../../explainable-neural-net-xnn#partition) and embedded [rule](../../explainable-neural-net-xnn#rule) were activated in each [module](../../explainable-neural-net-xnn#module).

This connects the prediction to the model structure that produced it.

## Decision action table

The Decision Action Table, or DAT, brings key parts of a local explanation into a single table.

It includes module attributions, feature attributions, decompositions, activation data, and activated rules. It can be used to analyse conditions, contributions, and actions for a query.

## Strengths and weaknesses

Strengths and weaknesses, or SAW, provide confidence-related measures for a prediction.

Strength reflects the amount of training data in the activated partitions and the quality of the partition model fit. Uncertainty reflects estimator variance and partition prediction variance. For a prediction, these measures are calculated by aggregating across the activated partitions.

## Context explanations

Context explanations make local explanations richer by adding comparison or scenario context.

Examples include:

| Context explanation | Description                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------------------- |
| Control swap        | Compare a query with another version of the same query where a categorical value has been changed. |
| Nearest neighbour   | Compare a query with similar, dissimilar, or related queries.                                      |

These comparisons help explain how a prediction changes, or why it is similar to or different from other cases.