TL;DR
This paper investigates whether large language models (LMs) understand the semantic concept of monotonicity, a property of linguistic environments crucial for human inference and for licensing certain grammatical constructions (Negative Polarity Items, or NPIs). The authors find that LMs do indeed encode monotonicity and use this knowledge for NPI licensing, demonstrating a sophisticated semantic understanding that generalizes beyond simple co-occurrence patterns.
What Problem Does This Paper Address?
Understanding the internal workings of large language models (LMs) is a critical challenge in NLP. While LMs excel at many tasks, it's unclear how much genuine linguistic understanding they possess. Specifically, this paper focuses on monotonicity, a fundamental semantic property that governs how inferences change when terms in a sentence are generalized or made more specific. For example, if "Mary didn't eat cookies" is true, then "Mary didn't eat chocolate cookies" is also true (downward monotonicity). Conversely, if "Mary ate chocolate cookies" is true, then "Mary ate cookies" is also true (upward monotonicity). This property is closely tied to the licensing of Negative Polarity Items (NPIs) like "any" or "ever," which are typically only acceptable in downward monotone environments. Previous work has shown LMs can process NPIs, but it's been unclear if this is due to a genuine understanding of monotonicity or simply memorizing co-occurrence patterns. This paper aims to bridge this gap by investigating whether LMs encode monotonicity and use it for NPI licensing in a way analogous to human language processing.
Methods
The authors employ a multi-pronged experimental approach:
- Diagnostic Classifiers (DCs): They train linear classifiers on the hidden states of LMs to predict whether a given linguistic environment is downward monotone (DM) or upward monotone (UM). This helps assess if LMs encode this information.
- NPI Acceptability Task: LMs are evaluated on their ability to assign higher probability to sentences containing NPIs in DM environments compared to UM environments.
- DC Ranking Method: A novel method is introduced to quantify the overlap between the information used by the monotonicity DCs and the information encoded in the LM's decoder weights for NPIs. This helps determine if the LM uses similar cues for both tasks.
- Filtered Corpora Training: To disentangle genuine semantic understanding from co-occurrence heuristics, LMs are trained on modified corpora where either all NPIs are removed, or NPIs within specific environment types are removed.
Datasets
- Full Corpus: The primary training corpus is derived from Gulordava et al. (2018), consisting of English Wikipedia articles (over 90 million tokens).
- NPI Corpus (Warstadt et al., 2019): This corpus, used for evaluation, contains a large set of grammatical and ungrammatical sentences with NPIs, categorized into nine distinct environment classes, each with both DM and UM versions.
Key Insights and Ideas
- LMs Learn Monotonicity: LMs demonstrably encode a notion of monotonicity, forming categories of DM and UM environments.
- Monotonicity is Key for NPIs: This learned monotonicity is actively used by LMs to predict NPI acceptability, mirroring human linguistic behavior.
- Beyond Co-occurrence: The experiments with filtered corpora suggest that LMs generalize their understanding of monotonicity beyond simple surface-level co-occurrence patterns. They can learn about monotonicity even without encountering NPIs in training.
- Shared Representations: The DC ranking experiment reveals a significant overlap between the representations LMs use for monotonicity classification and for NPI processing, indicating a shared semantic foundation.
- Robust Generalization: Despite some reliance on collocational cues, LMs show a robust ability to generalize their understanding of monotonicity to novel environments where NPIs were not present during training.
Key Results
- Monotonicity Probing: Diagnostic classifiers achieved high accuracy (around 97%) in predicting monotonicity from LM hidden states when trained on all environment classes. Even when tested on held-out environment classes, accuracy remained high (above 90% for several classes), indicating a generalized understanding.
- NPI Acceptability: Full LMs showed considerable ability in predicting NPI acceptability, with accuracy well above chance across all environment classes (e.g., 88% average for the Full model). This performance is notably better than some previous studies, possibly due to the evaluation method.
- DC Ranking: The median rank of NPI tokens was very low (9 for the All-ENV DC), indicating a strong alignment between the monotonicity classifier's weights and the LM's NPI decoder weights. This suggests LMs use similar representational cues for both tasks.
- Filtered NPIs (Experiment 4): Training LMs without NPIs in the corpus did not significantly degrade their ability to classify monotonicity, suggesting this knowledge can be learned independently of NPI exposure.
- Filtered Environments (Experiment 5): When NPIs were removed from specific environment types during training, LMs showed only a slight drop in NPI acceptability accuracy, demonstrating generalization from other environments. The DC ranking also showed a slight drop but remained strong, confirming robust generalization.
Limitations and Future Work
- Inferential Properties: The paper raises the question of whether LMs truly learn the inferential properties of DM/UM environments or rely on other shared characteristics. Future work could explore methods to probe these inferential capacities directly.
- Collocational Cues: While the study shows robustness, it acknowledges that LMs do depend partly on collocational cues for NPI licensing. The extent of this reliance and how to further disentangle it remains an area for exploration.
- Advanced Probing: The authors suggest incorporating recent advancements in probing-based interpretability methods to draw stronger conclusions about the semantic knowledge of LMs.
Summary updated