How Does Code Pretraining Affect Language Model Task Performance?
Jackson Petty, Sjoerd van Steenkiste, Tal Linzen

TL;DR
Pretraining language models with varying proportions of code affects their performance on diverse tasks, improving structured and mathematical tasks but potentially harming linguistic and knowledge-based tasks.
Contribution
This study systematically investigates how different mixtures of code and natural language in pretraining data causally influence language model performance across multiple tasks.
Findings
Higher code proportions improve compositional and mathematical task performance.
Increasing code data can reduce performance on syntax, morphology, and real-world knowledge tasks.
Controlling data mixture reveals nuanced effects of code on language model capabilities.
Abstract
Large language models are increasingly trained on corpora containing both natural language and non-linguistic data like source code. Aside from aiding programming-related tasks, anecdotal evidence suggests that including code in pretraining corpora may improve performance on other, unrelated tasks, yet to date no work has been able to establish a causal connection by controlling between language and code data. Here we do just this. We pretrain language models on datasets which interleave natural language and code in two different settings: additive, in which the total volume of data seen during pretraining is held constant; and competitive, in which the volume of language data is held constant. We study how the pretraining mixture affects performance on (a) a diverse collection of tasks included in the BigBench benchmark, and (b) compositionality, measured by generalization accuracy on…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsIntelligent Tutoring Systems and Adaptive Learning · Speech and dialogue systems · Natural Language Processing Techniques
