mlsanityData to 14 Oct 2026

Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)

arXiv 2504.15349 ↗First posted 21 Apr 2025cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

Humans understand new combinations of words encountered if they are combinations of words recognized from different contexts, an ability called Compositional Generalization. The COGS benchmark (Kim and Linzen, 2020) arXiv:2010.05465 reports 0% accuracy for Transformer models on some structural generalizations. We use (Weiss et al., 2021) arXiv:2106.06981's Restricted Access Sequence Processing (RASP), a Transformer-equivalent programming language, to demonstrate that a Transformer Encoder-Decoder can perform COGS and the semantically equivalent ReCOGS_pos (Wu et al., 2024) arXiv:2303.13716 systematically and compositionally: Our RASP models attain near perfect scores on structural generalization splits on COGS (exact match) and ReCOGS_pos (semantic exact match). Our RASP models show the (Re)COGS tasks do not require a hierarchical or tree-structured solution (contrary to (Kim and Linzen, 2020) arXiv:2010.05465, (Yao and Koller, 2022) arXiv:2210.13050, (Murty et al., 2022) arXiv:2211.01288, (Liu et al., 2021) arXiv:2107.06516): we use word-level tokens with an "embedding" layer that tags with possible part of speech, applying just once per encoder pass 19 attention-head compatible flat pattern-matching rules (easily identified with specific training examples), shown using grammar coverage (Zeller et al., 2023) to cover the non-recursive aspects of the input grammar, plus masking out prepositional phrases ("pp noun") and/or sentential complements (cp) when recognizing grammar patterns and extracting nouns related to the main verb in the sentence, and output the next logical form (LF) token (repeating until the LF is complete). The models do not apply recursive, tree-structured rules like "np_det pp np -> np_pp -> np", but score near perfect semantic and string exact match on both COGS and ReCOGS pp recursion, cp recursion using the decoder loop.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 24 of its 44 references that are in the map. First posted on arXiv 21 Apr 2025.

Builds on

24 of 44 references.

References · 24

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
  4. 2015Sequence Level Training with Recurrent Neural Networkscited by 576
  5. 2016Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependenciescited by 354
  6. 2020Transformers as Soft Reasoners over Languagecited by 270
  7. 2020COGS: A Compositional Generalization Challenge Based on Semantic Interpretationcited by 263
  8. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
  9. 2019Assessing BERT's Syntactic Abilitiescited by 192
  10. 2021Thinking Like Transformerscited by 184
  11. 2023What Formal Languages Can Transformers Express? A Surveycited by 124
  12. 2021The Devil is in the Detail: Simple Tricks Improve Systematic Generalization of Transformerscited by 117
12 more
  1. 2022Overcoming a Theoretical Limitation of Self-Attentioncited by 113
  2. 2021Making Transformers Solve Compositional Taskscited by 72
  3. 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
  4. 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
  5. 2022Characterizing Intrinsic Compositionality in Transformers with Tree Projectionscited by 41
  6. 2023The Impact of Depth on Compositional Generalization in Transformer Language Modelscited by 38
  7. 2019Quantity doesn't buy quality syntax with neural language modelscited by 25
  8. 2023ReCOGS: How Incidental Details of a Logical Form Overshadow an Evaluation of Semantic Interpretationcited by 24
  9. 2024Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformerscited by 24
  10. 2023SLOG: A Structural Generalization Benchmark for Semantic Parsingcited by 22
  11. 2021Transformers Generalize Linearlycited by 19
  12. 2023Compositional Program Generation for Few-Shot Systematic Generalizationcited by 4

Built on by

Not cited yet.