Abstract
Relations between words are governed by hierarchical structure rather than linear ordering. Sequence-to-sequence (seq2seq) models, despite their success in downstream NLP applications, often fail to generalize in a hierarchy-sensitive manner when performing syntactic transformations—for example, transforming declarative sentences into questions. However, syntactic evaluations of seq2seq models have only observed models that were not pre-trained on natural language data before being trained to perform syntactic transformations, in spite of the fact that pre-training has been found to induce hierarchical linguistic generalizations in language models; in other words, the syntactic capabilities of seq2seq models may have been greatly understated. We address this gap using the pre-trained seq2seq models T5 and BART, as well as their multilingual variants mT5 and mBART. We evaluate whether they generalize hierarchically on two transformations in two languages: question formation and passivization in English and German. We find that pre-trained seq2seq models generalize hierarchically when performing syntactic transformations, whereas models trained from scratch on syntactic transformations do not. This result presents evidence for the learnability of hierarchical syntactic information from non-annotated natural language text while also demonstrating that seq2seq models are capable of syntactic generalization, though only after exposure to much more language data than human learners receive.
Introduction
Human language is inherently hierarchical. We do not simply string words together in a linear sequence; we organize them into nested structures, such as phrases within phrases. For example, to turn the sentence "The dog that chased the cat is hungry" into a question, a human knows to move the main auxiliary verb ("Is the dog that chased the cat hungry?") rather than simply moving the first verb they encounter ("Does the dog that chased...?").
Historically, sequence-to-sequence (seq2seq) models—the architectures powering modern translation and summarization—have been viewed as "structural skeptics." When trained from scratch on small datasets, these models almost exclusively prefer "linear heuristics" (simple rules based on word position) over hierarchical ones. This paper investigates whether modern pre-training—where a model is exposed to massive text corpora before being fine-tuned on a specific task—fundamentally changes this behavior. Does pre-training "color the blank slate" of the model with a structural understanding of language?
Experimental Design: The Poverty of the Stimulus
The researchers utilized a "poverty of the stimulus" experimental framework. They trained models on a dataset where two distinct rules could explain the correct output:
- A Linear Rule: (e.g., "Move the first auxiliary verb to the front.")
- A Hierarchical Rule: (e.g., "Move the main auxiliary verb of the sentence to the front.")
The training data was intentionally ambiguous, as both rules yielded the same result for simple sentences. The critical evaluation occurred during the Generalization Test, which featured complex sentences (such as those containing relative clauses on the subject). In these cases, the linear rule would produce ungrammatical gibberish, while the hierarchical rule would succeed.
The study compared several model types:
- Pre-trained models: T5, BART, and their multilingual counterparts (mT5, mBART).
- Scratch-trained baselines: LSTMs and Transformers initialized with random weights.
- Control models: Pre-trained architectures with randomized weights to determine if the bias stems from the model's depth or the data it consumed.
Datasets and Multilingual Scope
The researchers generated 100,000 examples for two primary tasks: Question Formation and Passivization (converting active sentences to passive). To test the robustness of these findings, they introduced new datasets for German. German is syntactically more complex than English due to its case-marking system, providing a more rigorous test of structural understanding.
Additionally, the authors performed a massive corpus analysis of the mC4 corpus (the 750GB dataset used to train T5). They sought to determine if the models were simply memorizing correct transformations from their pre-training data or if they were truly learning an underlying structural bias.
Key Insights
Pre-training as the Catalyst
The most significant finding was that architecture alone is insufficient to induce hierarchical bias. When the researchers randomized the weights of T5 and re-trained it from scratch, the model reverted to "dumb" linear shortcuts. The hierarchical inductive bias is a direct result of the pre-training process.
Learning from Sparse Evidence
The corpus analysis revealed that "disambiguating" examples—sentences that explicitly prove the hierarchical rule is correct—are incredibly rare in natural language, appearing roughly 2 times in every 3.78 billion sentences. Despite this scarcity, pre-trained models still adopted the hierarchical rule, suggesting they internalize the tree-like nature of language through general exposure rather than direct instruction on specific transformations.
The "Recipe" Strategy and Cross-Lingual Transfer
By testing cross-lingual transfer (training on English and testing on German), the researchers found that models learn a "recipe" of syntactic steps. For instance, mT5 could correctly identify and move the appropriate noun in German after seeing only English examples. However, it struggled when German required language-specific morphological changes (like changing verb endings) that were not present in the English "recipe."
Results and Performance
- Hierarchical Mastery: Pre-trained models achieved nearly 100% accuracy on hierarchical generalization for English question formation and passivization.
- Baseline Failure: Models trained from scratch remained at or near 0% accuracy on generalization sets, confirming they were trapped by linear heuristics.
- The German Advantage: In some instances, models performed better on German than English. This is likely because German’s explicit case markings (e.g., "der" vs. "den") provide clearer surface cues for the model to track the relationship between subjects and objects.
Limitations and Future Directions
While pre-trained models demonstrate sophisticated structural understanding, they are not perfect. The researchers noted a "dropping" problem, where models occasionally omitted prepositional phrases during complex transformations (e.g., moving a noun phrase but forgetting its modifying phrase).
Furthermore, while these models are "smarter" than scratch-trained versions, they are not as efficient as humans. They require billions of words to acquire a bias that a human child develops from a tiny fraction of that data. Future work will focus on whether this hierarchical bias can be induced using "child-scale" data, moving AI closer to the efficiency of human linguistic acquisition.
Summary updated