English

Benchmarking Compositionality with Formal Languages

Computation and Language 2023-08-02 v3

Abstract

Recombining known primitive concepts into larger novel combinations is a quintessentially human cognitive capability. Whether large neural models in NLP can acquire this ability while learning from data is an open question. In this paper, we investigate this problem from the perspective of formal languages. We use deterministic finite-state transducers to make an unbounded number of datasets with controllable properties governing compositionality. By randomly sampling over many transducers, we explore which of their properties contribute to learnability of a compositional relation by a neural network. We find that the models either learn the relations completely or not at all. The key is transition coverage, setting a soft learnability limit at 400 examples per transition.

Keywords

Cite

@article{arxiv.2208.08195,
  title  = {Benchmarking Compositionality with Formal Languages},
  author = {Josef Valvoda and Naomi Saphra and Jonathan Rawski and Adina Williams and Ryan Cotterell},
  journal= {arXiv preprint arXiv:2208.08195},
  year   = {2023}
}

Comments

Published at COLING 2022. This version fixes a mistake in Figure 4 and adds a clarifying note in teal. Code is available at https://github.com/valvoda/neuralTransducer

R2 v1 2026-06-25T01:45:46.654Z