Learning Music Helps You Read: Using Transfer to Study Linguistic Structure in Language Models
Isabel Papadimitriou, Dan Jurafsky
TL;DR
This paper investigates how neural LSTM language models acquire abstract syntactic representations by pretraining on non-linguistic structured data and transferring to natural language. The proposed Test for Inductive Bias via Language model Transfer (TILT) isolates structural knowledge by freezing LSTM weights and only fine-tuning embeddings on a new language, removing lexical confounds. The results show that music and code pretraining yield substantial cross-language gains, and that simple artificial grammars with recursive or paired-token structures also help, indicating that non-surface structure drives generalization. In cross-linguistic experiments, transfer strength tracks typological syntactic similarity, suggesting that LSTMs encode cross-language structural properties beyond surface vocabulary.
Abstract
We propose transfer learning as a method for analyzing the encoding of grammatical structure in neural language models. We train LSTMs on non-linguistic data and evaluate their performance on natural language to assess which kinds of data induce generalizable structural features that LSTMs can use for natural language. We find that training on non-linguistic data with latent structure (MIDI music or Java code) improves test performance on natural language, despite no overlap in surface form or vocabulary. To pinpoint the kinds of abstract structure that models may be encoding to lead to this improvement, we run similar experiments with two artificial parentheses languages: one which has a hierarchical recursive structure, and a control which has paired tokens but no recursion. Surprisingly, training a model on either of these artificial languages leads to the same substantial gains when testing on natural language. Further experiments on transfer between natural languages controlling for vocabulary overlap show that zero-shot performance on a test language is highly correlated with typological syntactic similarity to the training language, suggesting that representations induced by pre-training correspond to the cross-linguistic syntactic properties. Our results provide insights into the ways that neural models represent abstract syntactic structure, and also about the kind of structural inductive biases which allow for natural language acquisition.
