Table of Contents
Fetching ...

Accelerating the Global Aggregation of Local Explanations

Alon Mor, Yonatan Belinkov, Benny Kimelfeld

TL;DR

This work tackles the computational challenge of globally aggregating local token attributions (Anchor explanations) by introducing a probabilistic global-aggregation model that accounts for anchor noise and word frequency. It also develops a suite of runtime optimizations, including an anytime incremental evaluation and multiple Anchor-specific speedups, to identify the top-$k$ impactful terms in minutes rather than hours. The key contribution is the probabilistic formulation for $p(w,c)$ and $q(w,c)$, plus practical accelerations (masking tweaks, dynamic confidence, candidate filtering) that deliver up to $30\times$ speedups with high-quality term sets. The approach enables online analysis pipelines and provides insights into model behavior, biases, and potential weaknesses through scalable global explanations.

Abstract

Local explanation methods highlight the input tokens that have a considerable impact on the outcome of classifying the document at hand. For example, the Anchor algorithm applies a statistical analysis of the sensitivity of the classifier to changes in the token. Aggregating local explanations over a dataset provides a global explanation of the model. Such aggregation aims to detect words with the most impact, giving valuable insights about the model, like what it has learned in training and which adversarial examples expose its weaknesses. However, standard aggregation methods bear a high computational cost: a naïve implementation applies a costly algorithm to each token of each document, and hence, it is infeasible for a simple user running in the scope of a short analysis session. % We devise techniques for accelerating the global aggregation of the Anchor algorithm. Specifically, our goal is to compute a set of top-$k$ words with the highest global impact according to different aggregation functions. Some of our techniques are lossless and some are lossy. We show that for a very mild loss of quality, we are able to accelerate the computation by up to 30$\times$, reducing the computation from hours to minutes. We also devise and study a probabilistic model that accounts for noise in the Anchor algorithm and diminishes the bias toward words that are frequent yet low in impact.

Accelerating the Global Aggregation of Local Explanations

TL;DR

This work tackles the computational challenge of globally aggregating local token attributions (Anchor explanations) by introducing a probabilistic global-aggregation model that accounts for anchor noise and word frequency. It also develops a suite of runtime optimizations, including an anytime incremental evaluation and multiple Anchor-specific speedups, to identify the top- impactful terms in minutes rather than hours. The key contribution is the probabilistic formulation for and , plus practical accelerations (masking tweaks, dynamic confidence, candidate filtering) that deliver up to speedups with high-quality term sets. The approach enables online analysis pipelines and provides insights into model behavior, biases, and potential weaknesses through scalable global explanations.

Abstract

Local explanation methods highlight the input tokens that have a considerable impact on the outcome of classifying the document at hand. For example, the Anchor algorithm applies a statistical analysis of the sensitivity of the classifier to changes in the token. Aggregating local explanations over a dataset provides a global explanation of the model. Such aggregation aims to detect words with the most impact, giving valuable insights about the model, like what it has learned in training and which adversarial examples expose its weaknesses. However, standard aggregation methods bear a high computational cost: a naïve implementation applies a costly algorithm to each token of each document, and hence, it is infeasible for a simple user running in the scope of a short analysis session. % We devise techniques for accelerating the global aggregation of the Anchor algorithm. Specifically, our goal is to compute a set of top- words with the highest global impact according to different aggregation functions. Some of our techniques are lossless and some are lossy. We show that for a very mild loss of quality, we are able to accelerate the computation by up to 30, reducing the computation from hours to minutes. We also devise and study a probabilistic model that accounts for noise in the Anchor algorithm and diminishes the bias toward words that are frequent yet low in impact.
Paper Structure (23 sections, 25 equations, 13 figures, 4 tables)

This paper contains 23 sections, 25 equations, 13 figures, 4 tables.

Figures (13)

  • Figure 1: Left: local explanations in a collection of documents for a spam detection task. Top-right: top-10 terms resulting from the global aggregation of (local) anchors. Bottom-right: global aggregation quality; our approach leads to higher quality at a fraction of the computation time.
  • Figure 2: $\mathsf{AOPC}^k(\mathcal{G},c)$ of different aggregation functions $\mathcal{G}$ (y-axis) for varying $k$ (x-axis).
  • Figure 3: $\mathsf{AOPC}^k(\mathcal{G},c)$ for different versions $\mathcal{G}$ of $\mathord{\mathcal{G}_{\mathsf{pr}}}$ and $k=20$, as a function of the computation time. "Optimized" refers to the combination of all optimizations described in \ref{['sec:optimizations']}.
  • Figure 4: $\mathsf{AOPC}^k(\mathcal{G},c)$ for different optimizations of $\mathord{\mathcal{G}_{\mathsf{pr}}}$ and $k=20$, as a function of the computation time. "Optimized" refers to the combination of all optimizations.
  • Figure 5: Ratio of shared terms for different versions of $\mathord{\mathcal{G}_{\mathsf{pr}}}$.
  • ...and 8 more figures