Enregistré dans:
Détails bibliographiques
Auteurs principaux: Qin, Tian, Saphra, Naomi, Alvarez-Melis, David
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:https://arxiv.org/abs/2412.04619
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866915520382500864
author Qin, Tian
Saphra, Naomi
Alvarez-Melis, David
author_facet Qin, Tian
Saphra, Naomi
Alvarez-Melis, David
contents Early in training, LMs can behave like n-gram models, but eventually they often learn tree-based syntactic rules and generalize hierarchically out of distribution (OOD). We study this shift using controlled grammar-learning tasks: question formation and tense inflection. We find that a model learns to generalize hierarchically if its training data is _complex_-in particular, if it includes center-embedded clauses, a special syntactic structure. Under this definition, complex data drives hierarchical rules, while less complex data encourages shortcut learning in the form of n-gram-like linear rules. Furthermore, we find that a model uses rules to generalize, whether hierarchical or linear, if its training data is _diverse_-in particular, if it includes many distinct syntax trees in the training set. Under this definition, diverse data promotes stable rule learning, whereas less diverse data promotes memorization of individual syntactic sequences. Finally, intermediate diversity and intermediate complexity form an *unstable regime*, which is characterized by oscillatory learning dynamics and inconsistent behaviors across random seeds. These results highlight the central role of training data in shaping generalization and explain why competing strategies can lead to unstable outcomes.
format Preprint
id arxiv_https___arxiv_org_abs_2412_04619
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Sometimes I am a Tree: Data Drives Unstable Hierarchical Generalization
Qin, Tian
Saphra, Naomi
Alvarez-Melis, David
Machine Learning
Computation and Language
Early in training, LMs can behave like n-gram models, but eventually they often learn tree-based syntactic rules and generalize hierarchically out of distribution (OOD). We study this shift using controlled grammar-learning tasks: question formation and tense inflection. We find that a model learns to generalize hierarchically if its training data is _complex_-in particular, if it includes center-embedded clauses, a special syntactic structure. Under this definition, complex data drives hierarchical rules, while less complex data encourages shortcut learning in the form of n-gram-like linear rules. Furthermore, we find that a model uses rules to generalize, whether hierarchical or linear, if its training data is _diverse_-in particular, if it includes many distinct syntax trees in the training set. Under this definition, diverse data promotes stable rule learning, whereas less diverse data promotes memorization of individual syntactic sequences. Finally, intermediate diversity and intermediate complexity form an *unstable regime*, which is characterized by oscillatory learning dynamics and inconsistent behaviors across random seeds. These results highlight the central role of training data in shaping generalization and explain why competing strategies can lead to unstable outcomes.
title Sometimes I am a Tree: Data Drives Unstable Hierarchical Generalization
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2412.04619