[Paper Review] On Explaining Your Explanations of BERT: An Empirical Study with Sequence Classification
This paper evaluates four attribution methods—Gradient Sensitivity, Gradient×Input, Layerwise Relevance Propagation (LRP), and LRP with Attention (LAT)—for explaining BERT's decisions in sequence classification tasks. It finds that GS, GI, and LRP produce reliable, robust, and semantically meaningful explanations across sentiment analysis datasets, while LAT performs poorly; crucially, all methods show strong generalization of relevance scores across semantically similar tasks.
BERT, as one of the pretrianed language models, attracts the most attention in recent years for creating new benchmarks across GLUE tasks via fine-tuning. One pressing issue is to open up the blackbox and explain the decision makings of BERT. A number of attribution techniques have been proposed to explain BERT models, but are often limited to sequence to sequence tasks. In this paper, we adapt existing attribution methods on explaining decision makings of BERT in sequence classification tasks. We conduct extensive analyses of four existing attribution methods by applying them to four different datasets in sentiment analysis. We compare the reliability and robustness of each method via various ablation studies. Furthermore, we test whether attribution methods explain generalized semantics across semantically similar tasks. Our work provides solid guidance for using attribution methods to explain decision makings of BERT for downstream classification tasks.
Motivation & Objective
- To assess the reliability and robustness of four attribution methods—GS, GI, LRP, and LAT—in explaining BERT’s decisions for sequence classification.
- To investigate whether attribution methods produce generalizable explanations across semantically similar downstream tasks in sentiment analysis.
- To evaluate the sensitivity of attribution scores to random weight initialization in fine-tuned BERT models.
- To provide empirical guidance for selecting attribution methods when probing BERT’s decision-making in classification tasks.
Proposed method
- Adapts four attribution methods—Gradient Sensitivity (GS), Gradient×Input (GI), Layerwise Relevance Propagation (LRP), and LRP with Attention (LAT)—to BERT models with a classification head.
- Applies these methods to compute token-level relevance scores for input sequences in four sentiment classification datasets: SST-5, SemEval, IMDb, and Yelp.
- Uses ablation studies by successively removing tokens in descending order of relevance to measure model accuracy drop, assessing method reliability.
- Computes Pearson correlation coefficients between relevance scores from different random weight initializations to evaluate robustness.
- Measures cross-dataset correlation of relevance scores for shared vocabulary words to test semantic generalization across tasks.
- Employs L2 norms for gradient-based methods and absolute sum for LRP in relevance score computation, with implementation released publicly.
Experimental results
Research questions
- RQ1How reliable are GS, GI, LRP, and LAT in identifying important tokens for BERT’s classification decisions across multiple sentiment analysis datasets?
- RQ2How robust are the attribution scores to random weight initialization during fine-tuning of BERT?
- RQ3To what extent do attribution methods generalize across semantically similar tasks, such as movie reviews and tweets?
- RQ4Do the relevance scores from different attribution methods correlate meaningfully across datasets with shared semantics?
Key findings
- GS, GI, and LRP show consistent and reliable performance drops when high-relevance tokens are ablated, indicating strong alignment with model decisions.
- LAT performs poorly in ablation studies, with performance drop patterns close to random word removal, suggesting it fails to identify meaningful features.
- All four attribution methods exhibit strong Pearson correlations (r > 0.7) in relevance scores across shared vocabulary between datasets, indicating generalization across semantically similar tasks.
- Random weight initialization affects relevance scores, but the impact is limited—especially for shorter sequences, where consistency is higher.
- LRP produces the most diverse and semantically rich relevance scores, highlighting words with strong emotional semantics more effectively than GS and GI.
- The results suggest that BERT’s internal representations are not only task-specific but also generalize across similar semantic domains, as reflected in consistent attribution patterns.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.