TL;DR
This paper investigates how much linguistic knowledge about grammatical "government" (how verbs relate to their arguments) is encoded in BERT's attention mechanisms. They developed a novel probing method to show that BERT learns this information effectively, even in its early layers, and that this knowledge can be used to discover new linguistic patterns.
What Problem Does This Paper Address?
Understanding how natural language processing models, particularly large transformer-based language models like BERT, acquire and represent linguistic knowledge is a major research challenge. While these models excel at various NLP tasks, their internal workings remain somewhat opaque. This paper focuses on a specific linguistic phenomenon: grammatical "government." Government refers to the relationship between a verb (or other head word) and its dependent arguments (e.g., what case a noun phrase should take, or which preposition a verb requires). This is a fundamental aspect of syntax and semantics, and understanding how LMs handle it can reveal insights into their linguistic capabilities. The authors aim to answer two key questions: (1) Do LMs encode government knowledge, and where is it located? (2) Can this knowledge be extracted to build useful linguistic resources?
Methods
The core of the paper's methodology is probing. They use a probing classifier (e.g., logistic regression, random forest) trained on representations extracted from BERT's attention heads. Specifically, for each transformer layer and attention head, they extract weights that represent the relationship between a governor (verb) and its potential governee (argument). These weights are pooled and fed into the classifier.
To address their research questions, they employ several techniques:
- Probing classifiers: They train various classifiers to predict government relations.
- Layer-wise analysis: They investigate which transformer layers are most crucial for encoding government knowledge.
- Attention head ablation: They systematically remove attention heads to determine their individual contributions.
- "Unseen" pattern evaluation: They withhold specific government patterns or verbs from the training data to test the model's ability to generalize and discover novel linguistic rules.
Datasets
The authors created a new benchmark called the Government Bank. This bank contains manually collected government rules for verbs in Finnish and Russian.
For training and evaluating their probing classifiers, they used:
- Universal Dependency (UD) corpus: For Finnish (v2.12).
- Taiga and SynTagRus corpora: For Russian.
- WMT News Crawl monolingual training data: For both Finnish and Russian.
Key Insights and Ideas
- BERT "knows" government: The probing classifiers achieve high accuracy, demonstrating that BERT's internal representations encode significant information about grammatical government.
- Early layers are key: Government knowledge is predominantly encoded in the early layers of BERT, suggesting that fundamental syntactic structures are learned early in the model's processing pipeline.
- A few heads are powerful: A small number of attention heads are sufficient to encode enough government information for accurate prediction, implying specialization within the model's attention mechanisms.
- Discovering new rules: The probing classifiers can generalize beyond their training data, successfully identifying novel government patterns and verbs not seen during training. This highlights the potential for LMs to aid in linguistic resource creation.
- Language differences: While both Finnish and Russian show strong encoding of government, there are subtle differences, such as Russian's information being slightly more distributed across layers and Finnish requiring fewer top heads for optimal performance.
Key Results
- High Accuracy: Probing classifiers achieved accuracy and F₁ scores over 80% for both Finnish and Russian in detecting government relations.
- Layer Contribution: Performance increased rapidly with the first few layers (layers 1-4 for Finnish, 5-6 for Russian) and then plateaued, indicating early encoding of syntactic information.
- Attention Head Importance: For Finnish, the top 3 attention heads contained most of the crucial information, while for Russian, 17-20 heads were needed for similar performance.
- Unseen Patterns: Classifiers demonstrated good accuracy (e.g., 79-83% for Finnish, 77-81% for Russian) in discovering unseen government patterns and verbs.
Limitations and Future Work
- Limited Languages: The current study is limited to Finnish and Russian. Extending to more languages requires building language-specific Government Banks and data.
- BERT-base Focus: Experiments were conducted using only the BERT-base model. Future work will explore other transformer architectures.
- Probing Methodology: The paper acknowledges criticism of correlation probing and plans to explore other probing methodologies and model representations.
- Dataset Size and Completeness: The Government Bank, while extensive, is not exhaustive. Future work aims to use larger datasets and identify more government relations.
- Broader Constructions: The current focus is on verbal government. Future research will extend to other parts of speech (nouns, adjectives) and more complex constructions.
Summary updated