Source-linked AI summary
What you can cram into a single vector: Probing sentence embeddings for linguistic properties
Alexis Conneau, German Kruszewski, Guillaume Lample, Loïc Barrault, Marco Baroni
TL;DR
The paper addresses the difficulty of identifying what information sentence embeddings capture when evaluated on complex downstream tasks. It introduces 10 simple probing tasks and applies them to embeddings from multiple encoders and training methods, finding broad linguistic knowledge and architecture- and training-dependent differences.
Problem
Complex downstream tasks make it difficult to determine which linguistic information sentence embeddings retain, despite their strong task performance.
Method
The paper introduces 10 probing tasks for simple linguistic properties and uses them to evaluate three encoders trained in eight distinct ways.
Results
The encoders capture a wide range of linguistic properties above strong baselines, while probing reveals correlations with downstream tasks and differences across embedding methods.
Takeaways & Limitations
Probing tasks provide a way to explore the linguistic information in sentence embeddings rather than simply optimizing performance on complex downstream tasks.
Takeaways & Limitations
The authors identify extending the probing tasks to other languages and studying multi-task training as future work.
Abstract
from arXiv · showhide
Although much effort has recently been devoted to training high-quality sentence embeddings, we still have a poor understanding of what they are capturing. "Downstream" tasks, often based on sentence classification, are commonly used to evaluate the quality of sentence representations. The complexity of the tasks makes it however difficult to infer what kind of information is present in the representations. We introduce here 10 probing tasks designed to capture simple linguistic features of sentences, and we use them to study embeddings generated by three different encoders trained in eight distinct ways, uncovering intriguing properties of both encoders and training methods.
1 Introduction
The paper argues that strong downstream performance does not reveal which linguistic information sentence embeddings retain. It introduces simple probing tasks to make that information more interpretable and comparable across encoders.
- Complex downstream tasks make it difficult to determine which information sentence embeddings use.Such tasks can also contain hidden biases, such as explicit negation cues that support entailment classification.
- Probing tasks classify simple linguistic properties using fixed sentence embeddings from a pretrained encoder.For example, a classifier can predict the tense of a main verb without further tuning the embeddings.
- The paper introduces 10 probing tasks organized by linguistic property type.
- The methodology controls nuisance factors and restricts inputs to single-sentence representations.This design aims to support generality and ease interpretation.
- The study compares diverse encoding architectures and training methods, relates probing to downstream performance, and releases datasets and tools.The release is intended to support probing as a standard way to study sentence embeddings.
2 Probing tasks
The probing benchmark tests surface, syntactic, and semantic information while controlling lexical, length, and dataset-design confounds. Its tasks range from sentence length and word order to hierarchical structure, grammatical number, tense, and semantic plausibility.
- The benchmark requires only single sentence embeddings, supports large training sets, and controls nuisance variables such as lexical cues and sentence length.The datasets contain 100k training, 10k validation, and 10k test sentences per task, with balanced classes.
- Surface information: Surface tasks test whether embeddings preserve sentence length and recover original word content from encoded sentences.SentLen uses six equal-width length bins; WC tests recoverability of input words.
- Syntactic information: Syntactic tasks probe legal word order, parse-tree depth, and the sequence of top constituents.TreeDepth is decorrelated from sentence length and uses eight depth classes; TopConst uses 20 construction classes.
- Semantic information: Tense, subject number, and object number require structural information about the main clause and its arguments while avoiding target-word overlap across partitions.These tasks are grouped with semantic tasks because they require understanding what the sentence denotes for unanalyzed word inputs.
- Semantic information: SOMO tests semantic sensitivity by replacing a noun or verb while matching the corpus frequencies of neighboring replacement bigrams.Human judgments assess whether modified sentences are acceptable.
- Semantic information: CoordInv tests whether models distinguish intact two-clause sentences from versions with the clause order inverted.Original and inverted sentences are balanced by clause length and kept separate across the dataset.
3 Sentence embedding models
The study evaluates three fixed-size sentence encoders across sequence-to-sequence and other training settings. The architectures include recurrent and convolutional models with different mechanisms for pooling token-level representations.
- The paper focuses on three sentence encoders previously shown to perform well on standard NLP tasks.
- Sentence encoder architectures: BiLSTM-last/max builds bidirectional token representations and forms a sentence vector by selecting the last hidden state or dimension-wise maximum.These variants are motivated by prior results in sequence-to-sequence and universal sentence representation learning.
- Sentence encoder architectures: Gated ConvNet uses stacked gated temporal convolutions, positional encodings, and temporal max-pooling to create a fixed-size representation.
- Training methods: The sequence-to-sequence training setup uses neural machine translation on English–French, English–German, and English–Finnish, plus an autoencoder setting.The language pairs vary from similar languages to more distant syntactic relationships.
- Training details: BiLSTM encoders use two layers of 512 hidden units, while the Gated ConvNet uses eight convolutional layers of 512 hidden units.Pre-trained fastText embeddings are used without fine-tuning to isolate encoder-architecture effects and handle out-of-training-set words.
4 Probing task experiments
The experiments show that probing exposes linguistic differences arising from baselines, encoder architectures, and training objectives, often distinct from downstream or training-task performance. Results also reveal strong simple-feature baselines, substantial gaps from human bounds, and limitations on syntactic and semantic anomaly detection.
- Baselines: A healthy gap remains between top baseline performance and human upper bounds, except for Length on SentLen and Naive Bayes baselines on WC.NB-bi-tfidf performs below random on SOMO, indicating that semantic intruders are not supplied by superficial bigram cues.
- Baselines: Bag-of-Vectors performs well overall, including Tense, SubjNum, ObjNum, TopConst, and above-chance TreeDepth, but is random on BShift, SOMO, and CoordInv.Its success on tense and number is explained by sentence-level redundancies: the target feature is also the majority feature in 95.2% of Tense, 75.9% of SubjNum, and 78.7% of ObjNum test sentences.
- Encoding architectures: Encoder architecture strongly preconditions embedding content: proper architectures outperform BoV, Gated ConvNet is comparable to the best LSTM, and BiLSTM-max outperforms BiLSTM-last except on SentLen.BiLSTM-last’s advantage on SentLen concerns a superficial sentence-length feature.
- Training tasks: NMT-trained encoders are more linguistically aware than NLI-trained encoders on probing, although NLI remains better for downstream tasks and clearly outperforms NMT on WC.The authors suggest NLI may preserve shallower word features, whereas NMT may capture richer linguistic features useful for probing.
- Training tasks: Unsupervised training remains effective but trails supervised training: AutoEncoder excels at SentLen yet performs poorly on WC, while untrained BiLSTM-max already performs well.The untrained model’s errors on SOMO differ sharply from human judgments: it labels 83% of sentences as modified, versus humans’ 62% untampered judgments and a 48% ground-truth proportion.
- Training dynamics: NMT probing performance is largely independent of target language, while training-task scores can continue improving after probing curves flatten or decline.WC keeps increasing with epochs; other NMT probing curves flatten early, and SentLen decreases as BLEU continues increasing.
- Probing versus downstream tasks: WC correlates positively with all downstream tasks, SentLen correlates negatively with most, and SOMO and CoordInv correlate positively with many downstream tasks requiring richer semantics.SOMO correlates with entailment but not relatedness, while TopConst and number tasks negatively correlate with several similarity and sentiment datasets.
5 Related work
Earlier work established probing tasks for examining sentence representations, while related research also studied linguistic knowledge in words, NMT systems, and downstream evaluations. This paper broadens probing to more tasks, models, objectives, and sentence-only evaluation.
- Prior probing work: Adi et al. introduced SentLen, WC, and a word-order test using BoV, an autoencoder, and SkipThought trained on probing data.The present work recasts their tasks to require only sentence embeddings and extends evaluation to more tasks, encoders, and training objectives.
- Scope of the present study: Compared with earlier probing work, this study uses larger training sets, more tasks and models, and sentence-level evaluation designed for broader comparison.Earlier work used smaller training sets and a smaller model set, limiting classifier-based evaluation to logistic regression.
- Related linguistic analyses: Other studies investigate word-level morphosyntax, lexical semantics, NMT encoder and decoder behavior, or linguistic phenomena in recurrent networks.Belinkov et al., Dalvi et al., and Sennrich focus on these linguistic properties and NMT settings.
- Downstream evaluation: Conneau et al. proposed a large-scale evaluation of sentence embeddings focused entirely on downstream tasks, motivating complementary probing-based analysis.Downstream evaluation alone is represented here as a related but distinct research direction.
6 Conclusion
The paper introduces probing tasks to examine what linguistic knowledge sentence encoders capture, finding broad information across architectures and training methods while identifying differences between embeddings. It proposes extending the benchmarks to other languages and training settings.
- The probing tasks are intended to explore what information different pre-trained sentence encoders capture, rather than optimize ad-hoc benchmark performance.
- Modern sentence encoders capture a wide range of linguistic properties beyond strong baselines, with correlations between probing and downstream-task performance.
- Encoders with similar training-task performance can produce different embeddings, highlighting the importance of architecture for sentence representations.
- The authors plan to extend probing tasks to other languages, study multi-task training, and use them to find more linguistically aware universal encoders.
Amazon Mechanical Turk survey
Human judgments for SOMO, CoordInv, and BShift were collected through independent Mechanical Turk surveys, quality-controlled with author-labeled items and participant filtering, then aggregated into human upper bounds.
- Participants judged sentence acceptability or anomalousness for the SOMO, CoordInv, and BShift tasks through independent surveys.
- A blind pretest produced control sets from 200 randomly selected sentences per task on which two authors agreed.
- After requiring at least 90% accuracy on 10 control sentences, the retained judgments averaged 2.5, 2.9, and 12 per sentence for SOMO, CoordInv, and BShift.
- The study used only aggregated judgments and recorded no personal data from participants.
Further training details
The appendix describes training-task evaluation and encoder implementation choices, including held-out data, benchmark metrics, and architecture-specific settings. The reported encoder results are similar across the three encoders, while their captured linguistic properties differ.
- NMT and Seq2Tree used two random 10k-sentence development and test sets, whereas NLI used the SNLI development and test sets.
- The three encoders achieved similar training-task results but differed in the linguistic properties their sentence embeddings captured.
- Training-task performance used BLEU for NMT and accuracy for Seq2Tree and NLI.
- For probing tasks, the authors used sigmoid MLPs with tuned regularization, hidden-state counts, and dropout, switching to logistic regression for WC.
Logistic regression results
Logistic regression performs close to an MLP on probing tasks, suggesting that most tested linguistic properties are accessible through a linear readout, while nuanced tasks benefit more from nonlinear capacity.
- Logistic regression approximates MLP performance, suggesting that most linguistic properties can be extracted with a linear readout of the embeddings.For BiLSTM-max trained on French NMT, MLP improvements above 3% occur on TreeDepth, SOMO, and CoordInv.
Downstream task results
Downstream evaluations compare sentence encoder architectures and pre-training methods across SentEval tasks, while probing results examine how embedding size changes linguistic performance. BiLSTM-max performs strongly, and NLI pre-training benefits from larger embeddings whereas NMT En-Fr does not.
- SentEval evaluates pre-trained sentence embeddings on tasks including subjectivity, question-type classification, paraphrase detection, and entailment without fine-tuning.
- BiLSTM-max has a slight edge over GatedConvNet on downstream tasks and is effective even without training.
- The evaluated models do not lag much behind state-of-the-art general-purpose sentence encoders.
- NLI is the best source task for pre-training, although NMT pre-training produces models that capture more linguistic properties.
- Increasing embedding dimension and model capacity improves probing performance for NLI-trained BiLSTM-max, but does not boost the NMT En-Fr encoder.