AILGOct 31, 2023

Causal Interpretation of Self-Attention in Pre-Trained Transformers

arXiv:2310.20307v148 citationsh-index: 9
Originality Incremental advance
AI Analysis

This provides a causal explanation for Transformer outcomes, which is incremental as it builds on existing models without new training.

The authors tackled the problem of interpreting self-attention in Transformers by proposing a causal interpretation as a structural equation model, enabling zero-shot causal discovery from pre-trained models without retraining. They demonstrated this method in sentiment classification and recommendation tasks.

We propose a causal interpretation of self-attention in the Transformer neural network architecture. We interpret self-attention as a mechanism that estimates a structural equation model for a given input sequence of symbols (tokens). The structural equation model can be interpreted, in turn, as a causal structure over the input symbols under the specific context of the input sequence. Importantly, this interpretation remains valid in the presence of latent confounders. Following this interpretation, we estimate conditional independence relations between input symbols by calculating partial correlations between their corresponding representations in the deepest attention layer. This enables learning the causal structure over an input sequence using existing constraint-based algorithms. In this sense, existing pre-trained Transformers can be utilized for zero-shot causal-discovery. We demonstrate this method by providing causal explanations for the outcomes of Transformers in two tasks: sentiment classification (NLP) and recommendation.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes