TL;DR
This paper investigates whether recurrent neural networks (RNNs), commonly used for sentence embeddings, truly understand grammatical structure or just rely on simple heuristics. By "probing" these embeddings for main clause tense, they found that even simple bag-of-words models perform surprisingly well, suggesting RNNs might not be as sophisticated as we'd like to believe.
What Problem Does This Paper Address?
A major goal in natural language processing (NLP) is to create sentence embeddings – fixed-length numerical representations of sentences – that accurately capture their meaning. Many linguistic phenomena, like tense, are deeply tied to sentence structure. While RNNs (like LSTMs and SRNs) are powerful tools for encoding sentences, it's unclear if they truly grasp these structure-dependent aspects or if they've learned superficial patterns that work for common cases. Previous work showed RNNs performing well on "probing" tasks (predicting a linguistic feature from the embedding), but the test data was often biased towards simple sentences, making it hard to tell if the RNNs were genuinely understanding structure. This paper aims to address this by designing a more robust probing task to differentiate true structural understanding from learned heuristics.
Methods
The core method is "probing," where a trained model's sentence embeddings are used to predict a specific linguistic feature. In this case, the feature is the main clause tense (past or present). The authors extend a previous experimental setup:
- Training Sentence Embeddings: They train autoencoders using either Simple Recurrent Networks (SRNs) or Long Short-Term Memory (LSTM) networks. These autoencoders are trained on large Wikipedia datasets in four languages (English, Spanish, French, Italian).
- Probing Task: They then use the encoder part of these trained autoencoders to generate sentence representations. A simple linear classifier (L1-regularized logistic regression) is trained to predict the main clause tense from these representations.
- Introducing Distractors: A key innovation is the inclusion of "distractors" – other words in the sentence that have tense-inflected forms but differ from the main clause tense (e.g., "We know who won"). The hypothesis is that if the RNN embedding truly understands structure, it should be less affected by these distractors than a model relying on simpler heuristics.
- Baselines: They compare the RNNs against three bag-of-vectors (BoV) baselines (summing, averaging, and Smooth Inverse Frequency) which are known to be less sensitive to structure.
Datasets
- Training Data: One million sentences per language (English, Spanish, French, Italian) from Wikipedia, with lengths between 5 and 70 tokens. This data is used to train the sentence embedding models (RNNs and BoV).
- Probing Data: Sentences from Universal Dependencies (UD) treebanks. After filtering and combining with Wikipedia vocabulary, they obtained between 12k and 31k sentences per language for the probing task. These were split into 70% training and 30% testing sets, with a constraint to prevent word form overlap between training and test sets for tense-related words.
Key Insights and Ideas
- BoV Models are Surprisingly Strong: Even simple BoV models, which are inherently structure-agnostic, achieve high accuracy (84-91%) on predicting main clause tense. This is a crucial baseline, as it suggests that a significant portion of tense information might be directly encoded in word embeddings or easily captured by simple aggregation.
- The "Flawed Heuristic" Concern: The high performance of BoV models, and potentially RNNs, might be due to learning "flawed heuristics" that work well on grammatically simple sentences, rather than true structural understanding. This is a significant concern for building robust NLP systems.
- Distractors as a Diagnostic Tool: The introduction of conflicting tensed words as distractors is a clever way to test for genuine structural sensitivity. The expectation is that if an embedding is truly structure-dependent, it should be more robust to these distractors.
Key Results
- BoV Baseline Performance: The paper reports that the summed BoV baseline consistently and significantly outperforms other BoV baselines.
- Effect of Conflicting Tensed Words: Figure 1 shows that for the summed BoV baseline, as the number of conflicting tensed forms in a sentence increases, the error rate on the probing task also tends to increase across all four languages. This is expected for BoV models and serves as a baseline for evaluating RNNs.
- No Correlation with Sentence Length: Contrary to some previous findings, this study found no correlation between sentence length and probing performance for their baseline models.
Limitations and Future Work
- Work in Progress: The paper is an extended abstract reporting on work in progress. They have completed data collection, preprocessing, experimental design, and obtained results for BoV baselines.
- Future Work: The next crucial step is to train and evaluate SRN- and LSTM-based autoencoders on their data and assess their representations using the probing task. The ultimate goal is to understand to what extent RNNs exhibit a similar insensitivity to structure-dependence as observed in the BoV baselines. They also highlight that their data sources allow for easy extension to other languages with Wikipedia and UD corpora.
Summary updated