NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ReCOGS: How Incidental Details of a Logical Form Overshadow an Evaluation of Semantic Interpretation

Zhengxuan Wu, Christopher D. Manning, Christopher Potts · DOI

Abstract

Compositional generalization—the ability to interpret novel combinations of known components—is a cornerstone of human-like intelligence. While the COGS benchmark was designed to measure this capability in neural models, recent results showing near-zero performance on structural generalization tasks suggested a fundamental failure of systematicity. This paper demonstrates that these failures are largely artifacts of the benchmark's output format rather than a lack of semantic reasoning. By introducing ReCOGS, a refined version of the benchmark that addresses redundant syntax, positional biases, and length confounds, we show that models are significantly more capable of compositional generalization than previously reported.

Introduction

In Natural Language Processing (NLP), the ability to understand a sentence like "The bird chased the cat" after learning "The cat chased the dog" and "The bird flew" is known as compositional generalization. The COGS (Compositional Generalization and Semantic Interpretation) benchmark was established to test this by requiring models to map English sentences to mathematical Logical Forms (LFs).

Despite the importance of this task, state-of-the-art models consistently fail on specific "structural" splits—for instance, failing to generalize a modified noun phrase from an object position to a subject position. This research investigates whether these failures stem from a genuine inability to reason compositionally or from incidental details in the specific syntax of the LFs used for evaluation.

Identifying the Confounding Factors

The authors identified several "incidental details" in the original COGS benchmark that set models up for failure:

  1. Redundant Syntax and Bigram Bias: The original LFs contained redundant tokens (e.g., x_ prefixes) and excessive parentheses. This created a "bigram bias" where certain token sequences appeared with overwhelming frequency, causing models to over-rely on local statistical patterns rather than global structure.
  2. The Positional Trap: Variables in COGS were indexed based on their word position (e.g., x_1 for the first word). If a model only saw a specific modifier in the 10th position during training, it struggled to assign the correct index when that modifier appeared in the 1st position during testing. This represents a failure of naming conventions, not semantics.
  3. The Length Confound: Deeply recursive structures (like nested prepositional phrases) naturally result in longer output sequences. Models often failed these tasks not because they couldn't handle the logic of recursion, but because they had never been exposed to sequences of that length during training.

The ReCOGS Methodology

To isolate semantic capability from syntactic noise, the researchers developed ReCOGS. The new benchmark and its associated training methodologies include:

  • Redundant Token Removal: Stripping non-essential characters to balance token distributions.
  • Variable Decoupling: Randomizing variable indices to ensure models learn semantic relationships rather than positional mapping.
  • Length Augmentation: A simple data augmentation strategy where training examples are concatenated. This exposes models to longer sequences without introducing new semantic concepts, effectively decoupling recursion from sequence length.
  • Semantic Exact Match (SEM): A new evaluation metric that checks for semantic equivalence through bijective variable mapping, rather than requiring a literal string match.
  • Structural Adjustments: Treating proper nouns as predicates to avoid collisions and using "filler words" (e.g., "um") or "preposing" (moving phrases to the front) during training to break artificial positional biases.

Key Results and Insights

The transition from COGS to ReCOGS revealed that neural models possess a latent capacity for systematicity that was previously obscured:

From 0% to 80% Accuracy

On the "Object PP $\rightarrow$ Subject PP" split, which was previously considered an impossible hurdle for standard architectures, the combination of data augmentation and preposing allowed models to jump from a 0% success rate to over 80%. This suggests that the models had already learned the necessary semantic components but were being penalized by the rigid formatting of the original test.

Recursion vs. Length

When the length confound was addressed via concatenation, models reached high accuracy on recursion tasks (CP/PP recursion). This indicates that the "recursion limit" often cited in neural network literature may actually be a sequence-length limitation that can be mitigated with better training data distribution.

The LSTM Advantage

In a surprising turn, older LSTM (Long Short-Term Memory) models outperformed modern Transformers on several ReCOGS splits. This suggests that the sequential inductive bias of LSTMs may be better suited for the long-term co-indexing required in semantic parsing than the global attention mechanisms of Transformers.

Discussion and Conclusion

ReCOGS provides a clearer signal for researchers by removing "fake" difficulty. While the benchmark remains challenging—models still struggle with certain lexical and structural shifts—it proves that current architectures are far more systematic than the original COGS results implied.

However, the authors caution against "LF hacking," where researchers might over-optimize output formats to boost scores without improving underlying intelligence. The goal of ReCOGS is not to make the task easier, but to make the evaluation fairer. The quest for true systematicity in AI continues, but we now know that our models are closer to the goal than we once thought.

Summary updated

BibTeX
@article{wu2023recogs,
  author = {Zhengxuan Wu and Christopher D. Manning and Christopher Potts},
  title = {{ReCOGS: How Incidental Details of a Logical Form Overshadow an Evaluation of Semantic Interpretation}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2023},
  doi = {10.1162/tacl\_a\_00623},
}
Figure