Skip to main content
QUICK REVIEW

[Paper Review] COGS: A Compositional Generalization Challenge Based on Semantic Interpretation

Najoung Kim, Tal Linzen|arXiv (Cornell University)|Oct 12, 2020
Natural Language Processing TechniquesComputer Science33 references8 citations
TL;DR

COGS is a semantic parsing benchmark designed to evaluate compositional generalization in NLP models by introducing systematic out-of-distribution gaps—such as novel combinations of familiar words and syntactic structures—requiring models to generalize beyond training data. Despite near-perfect in-distribution accuracy (96–99%), Transformers and LSTMs achieve only 16–35% generalization accuracy, with high sensitivity to random seed, revealing fundamental limitations in compositional generalization capacity.

ABSTRACT

Natural language is characterized by compositionality: the meaning of a complex expression is constructed from the meanings of its constituent parts. To facilitate the evaluation of the compositional abilities of language processing architectures, we introduce COGS, a semantic parsing dataset based on a fragment of English. The evaluation portion of COGS contains multiple systematic gaps that can only be addressed by compositional generalization; these include new combinations of familiar syntactic structures, or new combinations of familiar words and familiar structures. In experiments with Transformers and LSTMs, we found that in-distribution accuracy on the COGS test set was near-perfect (96--99%), but generalization accuracy was substantially lower (16--35%) and showed high sensitivity to random seed ($\pm$6--8%). These findings indicate that contemporary standard NLP models are limited in their compositional generalization capacity, and position COGS as a good way to measure progress.

Motivation & Objective

  • To address the lack of robust benchmarks that test compositional generalization in natural language processing beyond simple pattern matching.
  • To evaluate whether modern neural architectures like Transformers and LSTMs can generalize compositionally to novel combinations of familiar syntactic structures and words.
  • To identify structural and lexical generalization gaps that expose limitations in current models' inductive biases.
  • To provide a benchmark grounded in formal semantics, using lambda calculus-based semantic representations to ensure linguistic plausibility and compositional fidelity.

Proposed method

  • COGS constructs a semantic parsing dataset based on a fragment of English, with training and evaluation sets systematically differing in structural and lexical combinations.
  • The evaluation set includes systematic gaps such as novel word-structure combinations, new grammatical roles for familiar phrases, and deeper embedding levels (up to depth 12) in right-branching structures.
  • Semantic representations are generated using lambda calculus, inspired by formal semantics, to ensure compositional structure and meaning alignment.
  • Models are trained to map natural language sentences to their corresponding semantic forms using sequence-to-sequence learning, treating semantic parsing as a sequence-to-sequence task.
  • Generalization tasks include interpreting familiar words in novel syntactic roles (e.g., object-position NPs in subject positions), verb argument structure alternations, and PP modification in unobserved syntactic positions.
  • The dataset includes controlled variations to test structural generalization (e.g., novel phrase nesting depths) and lexical generalization (e.g., new word-structure pairings), with all structures based on a formal grammar.

Experimental results

Research questions

  • RQ1Can standard neural language models like Transformers and LSTMs generalize compositionally to novel combinations of familiar words and syntactic structures not seen during training?
  • RQ2To what extent does generalization performance vary across random seeds, indicating instability in learning compositional inductive biases?
  • RQ3Does structural generalization (e.g., novel phrase nesting or argument role shifts) pose a greater challenge than lexical generalization (e.g., new word-structure pairings)?
  • RQ4Are models capable of generalizing to deeper levels of syntactic embedding (e.g., depth 12), despite human processing degradation at similar depths?
  • RQ5Does the absence of certain syntactic constructions in training (e.g., PP modifiers in subject position) prevent models from generalizing to them, even when the meaning is compositionally derivable?

Key findings

  • In-distribution test accuracy for Transformers and LSTMs on COGS was consistently high, ranging from 96% to 99%, indicating strong performance on seen patterns.
  • Out-of-distribution generalization accuracy was substantially lower, ranging from 16% to 35%, highlighting a critical failure in compositional generalization.
  • Generalization performance showed high sensitivity to random seed, with a standard deviation of 6–8% across runs, indicating unstable learning of compositional inductive biases.
  • Structural generalization—such as novel combinations of syntactic structures or new grammatical roles for familiar phrases—proved more challenging than lexical generalization, which involved only new word-structure pairings.
  • Models struggled significantly with generalizing to deeper embedding depths (e.g., depth 12), achieving near-zero accuracy at depth 3, suggesting a lack of robust structural inductive bias.
  • The results indicate that current standard NLP models lack the compositional inductive biases necessary for human-like systematicity, even when trained from scratch on a controlled grammar.

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.