When we build complex machine learning models, we often want to know how a specific feature—like age, temperature, or capsule thickness—influences the final prediction. The traditional tool for this is the Partial Dependence Plot (PDP). However, as researchers like Christoph Molnar and Giuseppe Casalicchio have highlighted in their work on the iml package, PDPs have a fatal flaw: they fail when features are correlated.
Accumulated Local Effects (ALE) have emerged as the standard solution to this problem, providing a way to "unmask" feature influences without falling into the traps of statistical extrapolation.
The Extrapolation Trap
To understand why ALE is necessary, we must first understand why PDPs fail. A PDP calculates the effect of a feature by averaging the model's predictions over the entire marginal distribution of other features.
Imagine a model predicting house prices based on "Number of Rooms" and "Total Square Footage." These two features are highly correlated. If a PDP wants to calculate the effect of having 10 rooms, it will take every house in the dataset—even a tiny 400-square-foot studio—and "force" it to have 10 rooms in the model's input.
As Przemyslaw Biecek notes in Effects and Importances of Model Ingredients, this forces the model to evaluate "impossible" data points. The model has never seen a 400-square-foot house with 10 rooms. Its prediction for such a point is essentially junk, yet the PDP averages this junk into the final result, leading to biased and misleading visualizations.
How ALE Fixes the View
ALE avoids this "extrapolation trap" by using conditional distributions instead of marginal ones. Instead of asking "What would happen if every house had 10 rooms?", ALE asks "For houses that already have roughly 10 rooms, how does a small increase in room count change the prediction?"
The mechanism works in three intuitive steps:
- Localization: It divides the feature of interest into small windows (intervals).
- Differences, not Averages: Within each window, it calculates the difference in predictions for the actual data points in that window when the feature is slightly increased versus slightly decreased.
- Accumulation: It sums (accumulates) these local changes across the entire range of the feature.
By only looking at the differences within local windows, ALE ensures the model is only evaluated on data points that are physically or logically plausible. As Marvin N. Wright and colleagues explain in Machine Learning in Epidemiology, this makes ALE far more robust for real-world data where variables like age, weight, and blood pressure are inextricably linked.
Reliability in High-Stakes Science
The shift from PDP to ALE is not just a theoretical preference; it is a requirement for scientific validity in complex domains.
In physics, M. Giselle Fernández-Godino and Julia B Nakhleh used ALE to decode Inertial Confinement Fusion experiments. In these experiments, laser pulse shapes and capsule dimensions are "entangled." Standard importance metrics would fail to isolate which "knob" actually drives fusion yield, but ALE allows researchers to untangle these relationships by accounting for the correlations inherent in the experimental design.
Similarly, in survival analysis, Sophie Hanna Langbein and Hubert Baniecki argue that ALE is essential for clinical data. Evaluating a model on "impossible patient profiles"—created by the marginal averaging of PDPs—could lead to dangerous misinterpretations of risk factors.
A New Standard for Interpretability
Because of its ability to handle multicollinearity, ALE is increasingly becoming the default recommendation in modern software ecosystems. The mlr3summary package, developed by Susanne Dandl and Bernd Bischl, explicitly chooses ALE over PDP to provide more reliable "summaries" of black-box models.
By centering the explanation on how the model behaves where data actually exists, ALE moves machine learning interpretability away from hypothetical "what-ifs" and toward a grounded understanding of how features truly drive predictions.