Skip to main content
QUICK REVIEW

[Paper Review] Evaluating Compositionality in Sentence Embeddings

Ishita Dasgupta, Demi Guo|arXiv (Cornell University)|Feb 12, 2018
Topic ModelingComputer Science18 citations
TL;DR

This paper introduces a diagnostic dataset to evaluate compositional generalization in sentence embeddings, demonstrating that state-of-the-art models like InferSent fail on structured, compositionally sensitive sentence pairs despite strong performance on standard benchmarks. The key finding is that performance on the new dataset can be significantly improved by augmenting training data with minimal, contrasting examples, revealing that model failures stem from data biases, not architectural limitations.

ABSTRACT

An important challenge for human-like AI is compositional semantics. Recent research has attempted to address this by using deep neural networks to learn vector space embeddings of sentences, which then serve as input to other tasks. We present a new dataset for one such task, `natural language inference' (NLI), that cannot be solved using only word-level knowledge and requires some compositionality. We find that the performance of state of the art sentence embeddings (InferSent; Conneau et al., 2017) on our new dataset is poor. We analyze the decision rules learned by InferSent and find that they are consistent with simple heuristics that are ecologically valid in its training dataset. Further, we find that augmenting training with our dataset improves test performance on our dataset without loss of performance on the original training dataset. This highlights the importance of structured datasets in better understanding and improving AI systems.

Motivation & Objective

  • To develop a diagnostic benchmark that tests compositional generalization in sentence embeddings beyond word-level knowledge.
  • To investigate why state-of-the-art sentence embedding models like InferSent fail on compositionally sensitive natural language inference tasks.
  • To evaluate whether model performance on compositional tasks can be improved through targeted data augmentation without sacrificing performance on standard benchmarks.
  • To identify and analyze heuristic decision rules learned by models that explain their failure on compositionally complex examples.

Proposed method

  • Construct a new natural language inference (NLI) dataset, the Comparisons dataset, containing sentence pairs that require compositional reasoning and cannot be solved using only word-level information.
  • Train and evaluate the InferSent sentence embedding model on both the standard SNLI dataset and the new Comparisons dataset to assess compositional generalization.
  • Analyze decision rules learned by InferSent using feature attribution and pattern analysis to identify ecologically valid heuristics in the training data.
  • Fine-tune InferSent on a combined dataset of SNLI and the Comparisons dataset to test whether performance on the new task improves without degradation on the original.
  • Retrain InferSent from scratch on the combined dataset to verify that the model architecture is capable of learning compositional patterns when provided with appropriate training examples.
  • Use interpretability techniques to examine model behavior and validate that improvements are due to genuine compositional learning rather than shortcut heuristics.

Experimental results

Research questions

  • RQ1Can state-of-the-art sentence embeddings like InferSent generalize compositionally to sentence pairs requiring relational reasoning beyond word-level semantics?
  • RQ2What specific heuristics do models like InferSent learn from training data that lead to failures on compositionally complex examples?
  • RQ3To what extent do biases in the SNLI training data explain the poor performance of InferSent on the new Comparisons dataset?
  • RQ4Can performance on compositionally sensitive examples be improved by augmenting training data with minimal, contrasting examples without degrading performance on standard benchmarks?
  • RQ5Is the InferSent model architecture capable of learning compositional representations when provided with a more structured and diverse training distribution?

Key findings

  • InferSent achieves only 45.36% accuracy on the Comparisons dataset, indicating a significant failure in compositional generalization despite 84.84% accuracy on the SNLI test set.
  • The model's poor performance on the Comparisons dataset is primarily due to data-driven heuristics—such as relying on word co-occurrence patterns—rather than a fundamental limitation of the model architecture.
  • Analysis reveals that the model learns ecologically valid heuristics from the SNLI training data, such as associating certain words with specific entailment relations, which fail on counterexamples in the Comparisons dataset.
  • Fine-tuning on the Comparisons dataset improves test accuracy to 99.8%, demonstrating that the model can learn compositional patterns when exposed to appropriate examples.
  • Retraining from scratch on a combined SNLI and Comparisons dataset achieves 99.55% accuracy on the Comparisons dataset and 84.96% on SNLI, showing that performance on both tasks can be maintained or improved with better training data.
  • The results confirm that the model architecture is capable of compositional reasoning, and that the main barrier to performance is the lack of diverse, structured training examples that expose compositional generalization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.