Signed Relevance Score for Attention-Based Neural Network Interpretation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Attention-based neural networks operate as 'black-boxes' and do not provide explanations for their prediction outcomes, making it unclear whether the model has learned correct concepts, and attention weights alone do not indicate the directional relevance of input tokens to the prediction.
Innovation Solution
A method that computes a signed relevance score by taking the gradient of the loss with respect to the attention weights and multiplying it with the attention weights, providing explanations on the contribution of tokens to the outcome, and using layer-wise relevance propagation to redistribute relevance from contextual embeddings to input words.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If attention-based neural networks are used for prediction, then prediction performance is improved, but interpretability of the model deteriorates
Solution Approach 1:
The patent introduces attention weights as an intermediary mechanism that bridges the gap between the neural network's internal processing and interpretable explanations. These attention weights serve as a mediator that quantifies the relevance between input tokens and predictions, making the black-box model's decision-making process visible and interpretable without altering the underlying prediction performance
Solution Approach 2:
The patent transforms the uninterpretable internal states of the neural network into interpretable parameters by computing attention weights and relevance scores. This parameter transformation converts abstract neural activations into meaningful relevance metrics that can be directly interpreted to explain model predictions
2Loss of information
If attention weights are used to explain model behavior, then model interpretability is improved, but directional relevance information is lost
Solution Approach 1:
Instead of using attention weights directly as relevance scores, the patent inverts the approach by computing the gradient of the loss function with respect to the attention weights. This inversion transforms the forward-pass attention mechanism into a backward-pass relevance measurement, revealing the directional impact of each token on the prediction outcome
Solution Approach 2:
The patent changes the parameter representation from raw attention weights to gradient-based relevance scores. This parameter transformation preserves and enhances directional information by using the sign and magnitude of gradients to indicate whether each token contributes positively or negatively to the prediction
3Measurement precision
If gradient computation is performed to determine relevance scores, then directional relevance information is improved, but computational complexity increases
Solution Approach 1:
The patent leverages the existing gradient computation infrastructure already present in attention-based neural networks for training purposes. By reusing the same computational graphs and gradient mechanisms for explanation generation, the system achieves directional relevance information without requiring separate complex computational pathways
Data Source
AI summary
Providing an explanation for model outcome can include receiving input data, and passing the input data through an attention-based neural network, where the attention-based neural network learns attention weights associated with contextual embeddings corresponding to tokens of the input data and predicts an outcome corresponding to the input data. Based on an attention weight associated with a contextual embedding corresponding to a token of the input data, a signed relevance score can be determined to associate with the token for quantifying the token's relevance to the outcome. Based on the signed relevance score, an explanation of the token's contribution toward or against the outcome can be provided. The signed relevance score can be computed as a gradient of loss with respect to the attention weight.


