Table of Contents
Fetching ...

Effector: A Python package for regional explanations

Vasilis Gkolemis, Christos Diou, Dimitris Kyriakopoulos, Konstantinos Tsopelas, Julia Herbinger, Hubert Baniecki, Dimitrios Rontogiannis, Loukas Kavouras, Maximilian Muschalik, Theodore Dalamagas, Eirini Ntoutsi, Bernd Bischl, Giuseppe Casalicchio

TL;DR

Effector introduces a unified Python library for global and regional feature effects on tabular data, addressing aggregation bias arising from feature interactions. It combines five global explanations—PDP, d-PDP, ALE, RHALE, and SHAP-DP—with their regional counterparts through a common API and auto-differentiation support to accelerate computations for differentiable models. The paper demonstrates the library on a Bike Sharing dataset, showing how regional explanations reveal context-specific patterns (e.g., by weekday and temperature) that global summaries miss. It also provides a runtime analysis indicating favorable scaling, especially for RHALE, and discusses extensibility and future directions for additional regional explainability techniques. Overall, Effector offers a practical, extensible toolset for benchmarking and applying regional explanations in real-world tabular-data tasks.

Abstract

Effector is a Python package for interpreting machine learning (ML) models that are trained on tabular data through global and regional feature effects. Global effects, like Partial Dependence Plot (PDP) and Accumulated Local Effects (ALE), are widely used for explaining tabular ML models due to their simplicity -- each feature's average influence on the prediction is summarized by a single 1D plot. However, when features are interacting, global effects can be misleading. Regional effects address this by partitioning the input space into disjoint subregions with minimal interactions within each and computing a separate regional effect per subspace. Regional effects are then visualized by a set of 1D plots per feature. Effector provides efficient implementations of state-of-the-art global and regional feature effects methods under a unified API. The package integrates seamlessly with major ML libraries like scikit-learn and PyTorch. It is designed to be modular and extensible, and comes with comprehensive documentation and tutorials. Effector is an open-source project publicly available on Github at https://github.com/givasile/effector.

Effector: A Python package for regional explanations

TL;DR

Effector introduces a unified Python library for global and regional feature effects on tabular data, addressing aggregation bias arising from feature interactions. It combines five global explanations—PDP, d-PDP, ALE, RHALE, and SHAP-DP—with their regional counterparts through a common API and auto-differentiation support to accelerate computations for differentiable models. The paper demonstrates the library on a Bike Sharing dataset, showing how regional explanations reveal context-specific patterns (e.g., by weekday and temperature) that global summaries miss. It also provides a runtime analysis indicating favorable scaling, especially for RHALE, and discusses extensibility and future directions for additional regional explainability techniques. Overall, Effector offers a practical, extensible toolset for benchmarking and applying regional explanations in real-world tabular-data tasks.

Abstract

Effector is a Python package for interpreting machine learning (ML) models that are trained on tabular data through global and regional feature effects. Global effects, like Partial Dependence Plot (PDP) and Accumulated Local Effects (ALE), are widely used for explaining tabular ML models due to their simplicity -- each feature's average influence on the prediction is summarized by a single 1D plot. However, when features are interacting, global effects can be misleading. Regional effects address this by partitioning the input space into disjoint subregions with minimal interactions within each and computing a separate regional effect per subspace. Regional effects are then visualized by a set of 1D plots per feature. Effector provides efficient implementations of state-of-the-art global and regional feature effects methods under a unified API. The package integrates seamlessly with major ML libraries like scikit-learn and PyTorch. It is designed to be modular and extensible, and comes with comprehensive documentation and tutorials. Effector is an open-source project publicly available on Github at https://github.com/givasile/effector.
Paper Structure (12 sections, 1 equation, 5 figures, 2 tables)

This paper contains 12 sections, 1 equation, 5 figures, 2 tables.

Figures (5)

  • Figure 1: Global and regional effects of hour on bike rentals in the Bike Sharing dataset: (a) global effect, (b) regional effect on weekdays, (c) regional effect on weekends.
  • Figure 2: Global PDP for all features.
  • Figure 3: Regional PDP plots for $X_{\mathtt{hr}}$. Top: global effect. Middle: regional effect with split by working day. Bottom: regional effects with further split by temperature on non-working days.
  • Figure 4: Runtime of RHALE, ALE, PDP, and d-PDP for varying (a) $T$, (b) $N$, and (c) $D$.
  • Figure 5: Runtime of SHAP-DP for varying (a) $T$, (b) $N$, and (c) $D$.