Accumulated local effects (ALE) are a global, model-agnostic explanation method that shows how a single feature, or a pair of features, influences the average prediction of a machine learning model. In Explainable AI, the resulting ALE plot is the preferred alternative to the partial dependence plot when input features are correlated, because it avoids evaluating the model on unrealistic combinations of feature values.
The method was introduced by Daniel Apley and Jingyu Zhu. Its central idea is to measure small prediction differences within narrow intervals of a feature, average them over the observations that actually fall in each interval, and then accumulate those local effects across the feature range.
How accumulated local effects are computed
ALE estimates the effect of a feature by integrating local partial derivatives of the model, approximated with finite differences. The algorithm for one numeric feature follows a fixed sequence of steps.
- Split the feature range into intervals, usually at quantiles of the data, so that each interval holds a similar number of observations.
- For every observation in an interval, set the feature to the upper and lower interval bounds while keeping all other features at their observed values.
- Compute the difference between the two predictions and average these differences within the interval.
- Add the averaged differences cumulatively from the lowest interval to the highest.
- Center the curve so that its mean effect over the data is zero.
Because each observation is only moved to the edges of its own narrow interval, the model is evaluated close to the observed data distribution. This is the property that makes ALE robust under correlation. The table lists the parameters that control the result.
| Parameter | Typical setting | Effect on the plot |
|---|---|---|
| Number of intervals | 10 to 50 quantile bins | More bins add detail and noise |
| Interval boundaries | Quantiles of the feature | Equal data per bin, stable averages |
| Centering | Mean effect set to zero | Values read as deviation from average |
| Feature order (categorical) | Ordered by similarity | Changes the shape of the curve |
| Prediction scale | Raw, log-odds or probability | Determines units on the y-axis |
Why ALE handles correlated features better
ALE handles correlated features better because it averages over the conditional distribution within each interval instead of over the full marginal distribution. A partial dependence plot replaces a feature with a fixed value for every row, which creates impossible data points when features are dependent.
Consider a house price model where living area and number of rooms are strongly correlated. A partial dependence plot for living area would evaluate a 30 square meter apartment with eight rooms. The model has never seen such a case, so its prediction there is extrapolation, and the resulting curve can be misleading. ALE only shifts living area slightly for houses that already have similar areas, so the room count stays realistic.
A second advantage is isolation of the main effect. When features are correlated, a marginal method mixes the effect of the target feature with the effects of its correlated partners. ALE differences cancel the contribution of other features within each interval, which yields a cleaner first-order effect.
ALE compared with other global explanation methods
ALE belongs to the family of feature effect methods, which describe how predictions change with a feature, rather than how important the feature is overall. The table compares it with its closest neighbors.
| Method | Main output | Behavior with correlated features |
|---|---|---|
| Accumulated local effects | Centered average effect curve | Robust, stays near the data |
| Partial dependence plot | Average prediction curve | Biased by unrealistic inputs |
| Individual conditional expectation plot | One curve per observation | Same extrapolation problem as PDP |
| Permutation feature importance | Single importance score | Can overstate correlated features |
| SHAP dependence plot | Attribution per observation | Depends on the chosen background data |
ALE does not replace attribution methods such as Shapley values. It answers a global shape question (does risk rise steadily with age, or only after 60), whereas attributions answer a local question about one prediction.
Second-order ALE and interactions
Second-order ALE estimates the pure interaction effect of two features after their individual main effects have been removed. The computation uses a two-dimensional grid of cells and second-order finite differences, so the plot shows only what the pair adds beyond the sum of the separate effects.
This differs from a two-way partial dependence plot, which mixes main effects and interaction in one surface. A flat second-order ALE surface indicates little interaction, which complements statistics such as Friedman’s H-statistic. Sparse grid cells are the main risk: when few observations fall into a cell, the estimate there is unstable and should not be read closely.
Practical use and limitations
ALE is most useful when analysts need a trustworthy global view of tabular models such as gradient boosting or random forests with dependent inputs. It is implemented in open-source libraries for R and Python and is fast, because it needs roughly two predictions per observation per feature.
| Situation | Recommended method | Reason |
|---|---|---|
| Correlated tabular features | ALE plot | Avoids extrapolation |
| Independent features, simple reporting | Partial dependence plot | Easier to explain to audiences |
| Heterogeneous effects across groups | ICE curves plus ALE | ALE hides individual variation |
| Explaining one decision | Local attribution method | ALE describes averages only |
The method has limits that practitioners should state. ALE values are conditional and centered, so they cannot be read as absolute predictions. The curve becomes jagged with too many intervals and hides structure with too few. Categorical features lack a natural order, so the result depends on the ordering heuristic. Finally, ALE explains the model, not the world: a clear effect curve is not evidence of a causal relationship.
The short version
An ALE plot shows how one input pushes a model’s predictions up or down. It does this by making tiny changes to real examples. It never invents strange cases that could not exist.
Think of checking how a little more sunshine affects plant growth. You do not move a desert cactus into a rainforest. You compare similar plants with slightly different light and add up the small differences. The key benefit is a fair picture even when inputs move together.
Where it makes a difference
A health insurer reviews a gradient boosting model that predicts hospital readmission risk. Patient age and the number of chronic conditions are strongly correlated. A partial dependence plot suggests that risk falls for patients over 85, which surprises the clinical reviewers.
The data science team computes an ALE plot with 20 quantile intervals. It shows that risk rises steadily with age and flattens after about 80, with no decline. The earlier dip came from the model being evaluated on unrealistic patients, such as 90-year-olds with no chronic conditions, a region with almost no training data.
The team replaces the partial dependence plot in its model documentation with the ALE result and adds a second-order ALE plot for age and conditions. The reviewers approve the model, and the governance report now describes effects that match clinical experience.